WO2020133433A1 - Network switching method and related apparatus - Google Patents

Network switching method and related apparatus Download PDF

Info

Publication number
WO2020133433A1
WO2020133433A1 PCT/CN2018/125680 CN2018125680W WO2020133433A1 WO 2020133433 A1 WO2020133433 A1 WO 2020133433A1 CN 2018125680 W CN2018125680 W CN 2018125680W WO 2020133433 A1 WO2020133433 A1 WO 2020133433A1
Authority
WO
WIPO (PCT)
Prior art keywords
network
electronic device
traffic
mobile data
data
Prior art date
Application number
PCT/CN2018/125680
Other languages
French (fr)
Chinese (zh)
Inventor
陈景远
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2018/125680 priority Critical patent/WO2020133433A1/en
Priority to CN201880099423.XA priority patent/CN112997528B/en
Publication of WO2020133433A1 publication Critical patent/WO2020133433A1/en

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

Definitions

  • This application relates to the field of communication technology, and in particular to a network switching method and related equipment.
  • Wireless fidelity (Wireless-Fidelity, Wi-Fi) networks and mobile data networks are currently two commonly used wireless networks.
  • Electronic devices such as smart phones, etc.
  • Wi-Fi network uses Wi-Fi network to access the Internet without consuming the data of the mobile data network of the electronic device, which is the preferred way for people to access the Internet.
  • the network quality of the Wi-Fi network is not good, the network cannot be switched intelligently in time, which affects the network rate.
  • the embodiments of the present application provide a network switching method and related equipment, which are used to timely and intelligently switch the network when the network quality of the Wi-Fi network is not good to improve the network rate.
  • an embodiment of the present application provides a network switching method, which is applied to an electronic device, and the method includes:
  • the mobile data switch is turned on, and the wireless network of the electronic device is switched to the mobile data network.
  • an embodiment of the present application provides a network switching device, which is applied to an electronic device, and the device includes:
  • a detection unit configured to detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device
  • a determining unit configured to determine the traffic plan of the mobile data network used by the electronic device when it is detected 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 switching unit is used to turn on the mobile data switch and switch the wireless network of the electronic device to the mobile data network when the data package is an unlimited data package.
  • an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory, and are configured by the The processor executes, and the program includes instructions for executing steps in the method described in the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium for storing a computer program, which is executed by a processor as described in the first aspect of the embodiment of the present application Part or all of the steps described in the method.
  • an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in the method described in the first aspect.
  • the computer program product may be a software installation package.
  • the electronic device 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, it determines the traffic plan of the mobile data network it uses; When the data plan is an unlimited data plan, turn on the mobile data switch and switch the currently used Wi-Fi network to the mobile data network. It realizes that when the network quality of the Wi-Fi network is not good, it can switch the network intelligently in time, increase the network speed, and then improve the Internet experience.
  • FIG. 1A is a schematic diagram of a program running space of a smart phone
  • Figure 1B is a system architecture diagram of an Android system
  • FIG. 2 is a schematic flowchart of a network switching method provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of another network switching method provided by an embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by 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.
  • electronic devices such as smart phones are generally provided with a program running space
  • 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 applications
  • the program is a third-party application program installed by the electronic device.
  • the software algorithm of the network switching method described in the embodiment of the present application may run in the user space, and the operating system space runs the operating system of the electronic device.
  • the electronic device can specifically run the Android Android system, the mobile operating system iOS developed by Apple, etc., which is not limited here.
  • the corresponding user space includes an application layer (Applications) in the Android system
  • the operating system space may include an application framework layer (Application) in the Android system Framework), system runtime library layer (including system runtime library layer Libraries and Android runtime Android Runtime), Linux kernel layer (Linux Kernel).
  • the application layer includes various application programs that directly interact with the user, or service programs written in the Java language and running in the background.
  • the application framework layer provides a series of class libraries required for the development of Android applications, which can be used to reuse components, and can also be personalized through inheritance.
  • the system runtime layer is the support of the application framework and provides services for various components in the Android system.
  • the system runtime library layer is composed of the system class library and the Android runtime.
  • the Android runtime contains two parts: the core library and the Dalvik virtual machine.
  • the Linux kernel layer is used to implement core functions such as hardware device drivers, process and memory management, network protocol stack, power management, and wireless communication.
  • Electronic devices can include various handheld devices with wireless communication capabilities, in-vehicle devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices, or other processing devices that are communicatively connected to wireless modems, and various Various forms of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal equipment (terminal), etc.
  • UE User Equipment
  • MS Mobile Station
  • terminal terminal
  • FIG. 2 is a schematic flowchart of a network switching method according to an embodiment of the present application, which is applied to an electronic device and includes the following steps:
  • Step 201 Detect the network quality of the Wi-Fi network currently used by the electronic device.
  • the network quality includes at least one of the following: signal strength, network delay, and real-time network speed.
  • Signal strength refers to the broadband received power that the electronic device receives over the channel bandwidth.
  • Network delay refers to the round-trip time when a data packet is sent from the user's electronic device to the server, and then immediately returned from the server to the user's electronic device.
  • Real-time network speed refers to the length of time it takes to request and return data when the current electronic device is online, when uploading and downloading data.
  • a specific method for detecting the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device is: acquiring the currently used WLAN information included in the network setting interface; parsing the WLAN information to obtain the current The network quality of the Wi-Fi network used.
  • Another specific method for detecting the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device is: determining whether a network analysis application is installed in the electronic device; if a network analysis application is installed, then Start a network analysis application; detect the network quality of the Wi-Fi network currently used by the electronic device through the network analysis application to obtain the network quality of the Wi-Fi network currently used by the electronic device.
  • 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 it is detected 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, determine the traffic package of the mobile data network used by the electronic device.
  • the network quality of the Wi-Fi network currently used by the electronic device is less than or equal to the preset network quality includes at least one of the following: the signal strength of the Wi-Fi network currently used by the electronic device is less than or equal to the preset Signal strength, the network delay of the Wi-Fi network currently used by the electronic device is greater 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 device is less than or equal to the preset Average real-time network speed.
  • the average real-time network speed is the average value of the real-time network speed within a preset time.
  • the preset time is 5 minutes, 10 minutes, 15 minutes or other values.
  • the data package of the mobile data network includes, for example, an unlimited data package and a non-unlimited data package.
  • Step 203 When the data package is an unlimited data package, turn on the mobile data switch, and switch the wireless network of the electronic device to the mobile data network.
  • the unlimited traffic package includes high-speed traffic and low-speed traffic.
  • High-speed traffic refers to unlimited-speed traffic.
  • Low-speed traffic refers to the traffic where the network rate is lower than the preset value after the operator limits the mobile network.
  • High-speed traffic can be used under the fifth-generation mobile communication technology (5th-Generation wireless telephone technology, 5G) network and the fourth-generation mobile communication technology (4th-Generation wireless telephone technology, 4G) network.
  • Low-speed traffic can be used in the second-generation mobile communication technology (2-Generation wireless telephone technology, 2G) network and the third-generation mobile communication technology (3rd-Generation wireless telephone technology, 2G) network.
  • the mobile data switch is used to turn on or off the mobile data network of the electronic device.
  • the Wi-Fi switch can be turned off or not, which is not limited here.
  • the Wi-Fi switch is used to turn on or off the Wi-Fi network of electronic devices.
  • the data plan of the mobile data network used by it is determined; For unlimited data plans, turn on the mobile data switch and switch the currently used Wi-Fi network to the mobile data network. It realizes that when the network quality of the Wi-Fi network is not good, it can switch the network intelligently in time, increase the network speed, and then improve the Internet experience.
  • the method further includes:
  • At least one running application is closed, the at least one application does not include an application running in the foreground, and the priority of the at least one application Less than or equal to the predetermined priority.
  • the first threshold may be preset by the electronic device or set by the user, for example, it may be 1G, 5G, 10G, or other values, which is not limited herein.
  • the applications running on the electronic device include applications running in the foreground and applications running in the background.
  • the application running in the foreground can be one application or multiple applications
  • the application running in the background can be one application or multiple applications. Not limited here.
  • the priority of the application may be the usage priority of the application, or an important priority of the application.
  • the priority may be determined by the electronic device based on the frequency of use of the application in a period of time, or may be user-defined, which is not limited herein.
  • the priority of an 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 and video, etc., or may be user-defined. Not limited here.
  • the method further includes:
  • the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, a reminder message is output, the reminder message is used to remind the switching of the network; when a confirmation switching instruction for the reminder message is detected, the wireless network of the electronic device is switched to mobile data The internet.
  • the method of outputting the reminder information may be at least one of a display method and a voice method.
  • the confirmation instruction may be triggered by the user performing touch operation on the specified position of the operation interface, or may be triggered by the user pressing a specified key of the electronic device.
  • the touch operation may be a click operation, a multi-click operation, a slide operation, a slide operation + a click operation, a slide operation + a multi-click operation, etc.
  • the method further includes:
  • the mobile data switch When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the mobile data switch is turned on, and a link aggregation function is enabled. Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
  • the electronic device keeps the Wi-Fi switch turned on.
  • the method further includes:
  • 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 so on.
  • the data network module can support the second-generation mobile communication technology (2-Generation wireless telephone technology, 2G) network, the third-generation mobile communication technology (3rd-Generation wireless telephone technology, 3G) network, and long-term evolution (Long Term Evolution, LTE) Networks, 5th-Generation wireless technology (5G) networks, etc.
  • the distribution weight is used to indicate the importance of the distribution of data flow.
  • the determined at least two offload weights correspond to the at least two wireless network modules one-to-one.
  • the sum of the at least two shunt weights is equal to 1.
  • a specific implementation manner of separately determining the offload weights of the at least two wireless network modules according to the acquired at least two peak transmission rates determining the at least two according to the acquired at least two peak transmission rates and setting rules
  • the offload weight of the wireless network module, the preset rule is that the offload weight is equal to the peak transmission rate divided by the sum of the at least two peak transmission rates.
  • a specific implementation manner of offloading the at least two wireless network modules according to the determined at least two offload weights includes: according to the number of data streams currently established by the electronic device and the determined at least two offload weights are the at least two A wireless network module is offloaded.
  • step 203 determines that the shunt weight of the wifi module is 1/3, and the shunt weight of the data network module is 2/3, if the electronic device is currently There are 3 established data streams, then the electronic device allocates 1 data stream to the wifi module and 2 data streams to the data network module.
  • step 203 determines that the shunt weight of the wifi module is 1/3, and the shunt weight of the data network module is 2/3, if the electronic device There are currently 4 data streams established, then the electronic device allocates 1 data stream to the wifi module and 3 data streams to the data network module.
  • the data stream is a collection of data packets of the same data type. For example, video data packets belong to the same data stream, and picture data packets belong to the same data stream.
  • the electronic device in the state of link aggregation, separately obtains the current peak transmission rates of at least two wireless network modules used for link aggregation, and then transmits based on the determined at least two peak transmissions The rate determines the offload weights of the at least two wireless network modules respectively, and finally offloads the at least two wireless network modules based on the determined at least two offload weights, thereby achieving reasonable offloading of different wireless network modules in the link aggregation state, and further Improve the stability of data transmission.
  • a specific implementation manner of determining the traffic package of the mobile data network used by the electronic device is:
  • the preset keywords are, for example, unlimited, high-speed traffic, low-speed traffic, and so on.
  • the method before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold, the method further includes:
  • the traffic query request may be, for example, a preset short message, a preset WeChat message, and a preset phone number.
  • the phone query method for China Mobile's traffic usage information is to call 10086 and dial 2
  • the SMS query method is to send 103 to 10086
  • the phone query method for China Unicom's traffic usage information is to call 10011
  • the SMS query method is to send cxll to 10010
  • the telephone inquiry method of China Telecom's traffic usage information is to call 10000, and the SMS inquiry method is to send 108 to 10001.
  • the flow query information of the electronic device is determined by sending a flow query request to the operator, thereby ensuring the accuracy of information acquisition.
  • a specific implementation manner of determining the traffic package of the mobile data network used by the electronic device is: under the first condition, determining the traffic package of the mobile data network used by the electronic device
  • the first condition includes at least one of the following: there is no connectable Wi-Fi network other than the currently used Wi-Fi network, the number of currently running applications is greater than or equal to the second threshold, and the applications currently running in the foreground For scheduled applications.
  • no other Wi-Fi network that can be connected includes a Wi-Fi network that can be received but cannot be connected to or cannot be received.
  • the second threshold may be set by the system or may be set by the user, for example, may be 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.
  • the method further includes:
  • the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the network connection information of the router associated with the Wi-Fi network is detected, and the network connection information includes at least one of the following: frequency band, bandwidth, and channel; and the network connection information of the router is adjusted.
  • the frequency range of the 2.4G band is 2.4GHZ-2.4835GHZ.
  • the frequency range of 5G is 5.15GHZ-5.825GHZ.
  • the channel refers to the working channel of the router.
  • Each channel is 22MHZ wide, and only 20MH is actually used to transmit data, and the other 2MHZ is used to isolate the channel.
  • a total of 83.5MHZ is available for 2.4G, and there is mostly overlap between channels.
  • the center frequency of each channel is separated by 5MHZ.
  • Table 1 The mapping relationship between channel, center frequency and frequency range in 2.4GH is shown in Table 1.
  • the bandwidth is divided into 20MHZ and 40MHZ. Because there will be overlaps between channels and channels, there will be conflicts between channels and channels.
  • the transmission efficiency of 40 MHz bandwidth is lower than that of 20 MHz bandwidth.
  • Detect the number of electronic devices accessing the channel obtain the management website, login account and login password of the router; switch the current channel of the router to the channel with the least access to electronic devices.
  • Detect the rating of the channel obtain the management website address, login account and login password of the router; switch the current channel of the router to the channel with the highest rating.
  • Detect the number of electronic devices connected to the frequency band obtain the management website, login account and login password of the router; switch the current frequency band of the router to the frequency band with the least access to electronic devices.
  • Detect the current access bandwidth obtain the management website address, login account and login password of the router; switch the current bandwidth of the router to another frequency band.
  • FIG. 3 is a schematic flowchart of another network switching method provided by an embodiment of the present application, which is applied to an electronic device.
  • the network switching method includes:
  • Step 301 Detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device.
  • Step 302 When it is detected 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, obtain a short message about the traffic package stored in the electronic device.
  • Step 303 Parse the short message to obtain at least one keyword.
  • Step 304 When a preset keyword is included in the at least one keyword, determine that the data package of the mobile data network used by the electronic device is an unlimited data package, and the preset keyword and the unlimited data package Related.
  • Step 305 When the at least one keyword does not include a preset keyword, determine that the data plan of the mobile data network used by the electronic device is not an unlimited data plan.
  • Step 306 When the data package is an unlimited data package, turn on the mobile data switch, and switch the Wi-Fi network currently used by the electronic device to the mobile data network.
  • Step 307 Send a traffic query request to the operator, where the traffic query request is used to request query of traffic usage information of the electronic device.
  • Step 308 Receive traffic usage information sent by the operator in response to the traffic query request, where the traffic usage information includes the remaining traffic of the high-speed traffic of the unlimited traffic package.
  • Step 309 When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than the first threshold, close at least one application that is running, the at least one application does not include an application currently running in the foreground, the at least one The priority of the application is less than or equal to the predetermined priority.
  • Step 310 When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device.
  • step 311 or step 313 is executed.
  • Step 311 Output reminder information, the reminder information is used to remind to switch the network.
  • Step 312 When a confirmation switching instruction for the reminder information is detected, switch the wireless network of the electronic device to a mobile data network.
  • Step 313 Turn on the mobile data switch and enable the link aggregation function. Under the link aggregation function, the electronic device uses the Wi-Fi network and the mobile data network at the same time.
  • FIG. 4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the electronic device includes a processor, a memory, a communication interface, and a Or multiple 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:
  • the mobile data switch is turned on, and the wireless network of the electronic device is switched to the mobile data network.
  • the above-mentioned program includes instructions that are further used to perform the following steps:
  • the at least one application When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than or equal to the first threshold, close at least one running application, the at least one application does not include an application running in the foreground, and the priority of the at least one application Less than or equal to the predetermined priority.
  • the above program includes instructions that are also used to perform the following steps:
  • the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, a reminder message is output, the reminder message is used to remind the switching of the network; when a confirmation switching instruction for the reminder message is detected, the wireless network of the electronic device is switched to mobile data The internet.
  • the above program includes instructions that are also used to perform the following steps:
  • the mobile data switch When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the mobile data switch is turned on, and a link aggregation function is enabled. Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
  • the above-mentioned program includes instructions specifically for performing the following steps:
  • the above-mentioned program includes instructions that are further used to perform the following steps:
  • the above-mentioned program includes instructions specifically for performing the following steps:
  • the first condition determines the data plan of the mobile data network used by the electronic device; the first condition includes at least one of the following: no other than the Wi-Fi network currently used by the electronic device can be connected In the Wi-Fi network, the number of running applications is greater than or equal to the second threshold, and the currently running application in the foreground is a predetermined application.
  • FIG. 5 is a network switching device provided by an embodiment of the present application, which is applied to an electronic device.
  • the network switching device includes:
  • the detection unit 501 is configured to detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
  • the determining unit 502 is configured to determine the traffic plan of the mobile data network used by the electronic device when it is detected 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 switching unit 503 is configured to turn on the mobile data switch and switch the wireless network of the electronic device to the mobile data network when the data package is an unlimited data package.
  • the apparatus after switching the wireless network of the electronic device to the mobile data network through the switching unit 503, the apparatus further includes:
  • the control unit 504 is configured to close at least one application that is running when it is determined by the determining unit 502 that the remaining flow of the high-speed traffic of the unlimited data package is less than the first threshold, the at least one application does not include the application running in the foreground For applications, the priority of the at least one application is less than or equal to the predetermined priority.
  • the detection 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 data package is not an unlimited data package; the apparatus also includes an output unit 505 for outputting reminder information 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, the reminder information is used
  • the switch unit 503 is also used for reminding to switch the network; the switch unit 503 is also used to switch the wireless network of the electronic device to the mobile data network when the confirmation switch instruction for the reminder information is detected by the detecting unit 501.
  • the detection 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 data package is not an unlimited data package; the control unit 504 , Also used to turn on the mobile data switch and enable the link aggregation function 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 Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
  • the apparatus in determining the traffic package of the mobile data network used by the electronic device by the determining unit 502, the apparatus further includes:
  • An obtaining unit 506, configured to obtain a short message about a flow package stored in the electronic device
  • the parsing unit 507 is used to parse the short message to obtain at least one keyword
  • the determining unit 502 is further configured to determine that the data plan of the mobile data network used by the electronic device is an unlimited data plan when the preset keyword is included in the at least one keyword.
  • Unlimited data package association when the at least one keyword does not include a preset keyword, it is determined that the data package of the mobile data network used by the electronic device is not an unlimited data package.
  • the device before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold by the determining unit 502, the device further includes:
  • the communication unit 508 is configured to send a traffic query request to an operator, where the traffic query request is used to request query of traffic usage information of the electronic device; to receive traffic usage information sent by the operator in response to the traffic query request,
  • the traffic usage information includes the remaining traffic of the high-speed traffic of the unlimited traffic package.
  • the determining unit 502 is further configured to determine the traffic package of the mobile data network used by the electronic device under the first condition; the first condition includes at least one of the following: division There is no other connectable Wi-Fi network outside the Wi-Fi network currently used by the electronic device, the number of currently running applications is greater than or equal to the second threshold, and the applications running in the foreground are predetermined applications.
  • 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.
  • An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to perform part or all of the steps of any method described in the foregoing method embodiments ,
  • the above computer includes electronic equipment.
  • Embodiments of the present application also provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to perform any of the methods described in the foregoing method embodiments Some or all steps of the method.
  • the computer program product may be a software installation package, and the computer includes an electronic device.
  • the disclosed device may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the above-mentioned units is only a division of logical functions.
  • there may be other division methods for example, multiple units or components may be combined or integrated To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple 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.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or software function unit.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory.
  • the technical solution of the present application may essentially be a part that contributes to the prior art or all or part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a memory,
  • Several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the aforementioned memory includes: U disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
  • the program may be stored in a computer-readable memory, and the memory may include: a flash disk , Read-Only Memory (English: Read-Only Memory, abbreviation: ROM), Random Access Device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disk, etc.
  • ROM Read-Only Memory
  • RAM Random Access Device
  • magnetic disk or optical disk etc.

Abstract

Provided in embodiments of the present invention are a network switching method and a related apparatus applicable to an electronic apparatus. The network switching method comprises: detecting network quality of a Wi-Fi network currently used by an electronic apparatus; if the detected network quality of the Wi-Fi network currently used by the electronic apparatus is less than or equal to preset network quality, determining a data usage package of a mobile data network used by the electronic apparatus; and if the data usage package is an unlimited data usage package, turning on a mobile data switch, and switching the electronic apparatus from the wireless network to the mobile data network. The embodiments of the present invention can realize automatic switching between networks in the event of poor network quality, thereby simplifying a network switching process, and improving user experience.

Description

网络切换方法及相关设备Network switching method and related equipment 技术领域Technical field
本申请涉及通信技术领域,具体涉及一种网络切换方法及相关设备。This application relates to the field of communication technology, and in particular to a network switching method and related equipment.
背景技术Background technique
无线保真(Wireless-Fidelity,Wi-Fi)网络和移动数据网络是目前常用的两种无线网络。电子设备(如智能手机等)使用Wi-Fi网络上网不消耗电子设备的移动数据网络的流量,是人们优先选择的上网方式。目前,在Wi-Fi网络的网络质量不好时,无法及时智能地网络切换,影响网络速率。Wireless fidelity (Wireless-Fidelity, Wi-Fi) networks and mobile data networks are currently two commonly used wireless networks. Electronic devices (such as smart phones, etc.) use Wi-Fi network to access the Internet without consuming the data of the mobile data network of the electronic device, which is the preferred way for people to access the Internet. At present, when the network quality of the Wi-Fi network is not good, the network cannot be switched intelligently in time, which affects the network rate.
发明内容Summary of the invention
本申请实施例提供一种网络切换方法及相关设备,用于在Wi-Fi网络的网络质量不好时,及时智能地切换网络,提升网络速率。The embodiments of the present application provide a network switching method and related equipment, which are used to timely and intelligently switch the network when the network quality of the Wi-Fi network is not good to improve the network rate.
第一方面,本申请实施例提供一种网络切换方法,应用于电子设备,所述方法包括: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:
检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;Detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;When it is detected 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, determine the traffic package of the mobile data network used by the electronic device;
在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备的无线网络切换至移动数据网络。When the data package is an unlimited data package, the mobile data switch is turned on, and the wireless network of the electronic device is switched to the mobile data network.
第二方面,本申请实施例提供一种网络切换装置,应用于电子设备,所述装置包括:In a second aspect, an embodiment of the present application provides a network switching device, which is applied to an electronic device, and the device includes:
检测单元,用于检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;A detection unit, configured to detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
确定单元,用于在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;A determining unit, configured to determine the traffic plan of the mobile data network used by the electronic device when it is detected 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 switching unit is used to turn on the mobile data switch and switch the wireless network of the electronic device to the mobile data network when the data package is an unlimited data 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, the one or more programs are stored in the memory, and are configured by the The processor executes, and the program includes instructions for executing steps in the method described in the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述计算机程序被处理器执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。According to a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, which is executed by a processor as described in the first aspect of the embodiment of the present application Part or all of the steps described in the method.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面所述的方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to execute as implemented in the present application Examples of some or all of the steps described in the method described in the first aspect. The computer program product may be a software installation package.
可以看出,在本申请实施例中,电子设备在检测到其当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定其所使用的移动数据网络的流量套餐;在流量套餐为不限流量套餐时,开启移动数据开关,以及将当前所使用的Wi-Fi网络切换至移动数据网络。实现了在Wi-Fi网络的网络质量不好时,及时智能地进行网络切换,提升网络速率,进而提升上网体验。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, it determines the traffic plan of the mobile data network it uses; When the data plan is an unlimited data plan, turn on the mobile data switch and switch the currently used Wi-Fi network to the mobile data network. It realizes that when the network quality of the Wi-Fi network is not good, it can switch the network intelligently in time, increase the network speed, and then improve the Internet experience.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Those of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1A是一种智能手机的程序运行空间的示意图;FIG. 1A is a schematic diagram of a program running space of a smart phone;
图1B是一种安卓系统的系统架构图;Figure 1B is a system architecture diagram of an Android system;
图2是本申请实施例提供的一种网络切换方法的流程示意图;2 is a schematic flowchart of a network switching method provided by an embodiment of the present application;
图3是本申请实施例提供的另一种网络切换方法的流程示意图;3 is a schematic flowchart of another network switching method provided by an embodiment of the present application;
图4是本申请实施例提供的一种电子设备的结构示意图;4 is a schematic structural diagram of an electronic device provided by an embodiment of the present application;
图5是本申请实施例提供的一种网络切换装置的结构示意图。5 is a schematic structural diagram of a network switching device according to an embodiment of the present application.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of this application, but not all the embodiments. Based on the embodiments in this application, all other embodiments obtained by a person of ordinary skill in the art without creative work shall fall within the scope of protection of this application.
以下分别进行详细说明。The details are described below.
本申请的说明书和权利要求书及所述附图中的术语“第一”、“第二”、“第三”和“第四”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", and "fourth" in the description and claims of the present application and the accompanying drawings are used to distinguish different objects, not to describe a specific order . In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to “embodiments” means that specific features, structures, or characteristics described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art understand explicitly and implicitly that the embodiments described herein can be combined with other embodiments.
如图1A所示,目前智能手机等电子设备一般设置有程序运行空间,该程序运行空间包括用户空间和操作系统空间,其中,用户空间运行有一个或多个应用程序,该一个或多个应用程序为电子设备安装的第三方应用程序,本申请实施例所描述的网络切换方法的软件算法可以运行在用户空间,操作系统空间运行有电子设备的操作系统。As shown in FIG. 1A, at present, electronic devices such as smart phones are generally provided with a program running space, and 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 applications The program is a third-party application program installed by the electronic device. The software algorithm of the network switching method described in the embodiment of the present application may run in the user space, and the operating system space runs the operating system of the electronic device.
该电子设备具体可以运行安卓Android系统、苹果公司开发的移动操作系统iOS等,此处不做唯一限定。如图1B所示,以所述电子设备运行有Android系统为例,对应的用户空间包括该Android系统中的应用层(Applications), 操作系统空间可以包括该Android系统中的应用程序框架层(Application Framework)、系统运行库层(包括系统运行库层Libraries和Android运行时Android Runtime)、Linux内核层(Linux Kernel)。其中,应用层上包括各类与用户直接交互的应用程序,或由Java语言编写的运行于后台的服务程序。例如,智能手机上实现的常见基本功能的程序,诸如短消息业务(Short Messaging Service,SMS)短信,电话拨号,图片浏览器,日历,游戏,地图,万维网(World Wide Web,Web)浏览器等程序,以及开发人员开发的其他应用程序。应用程序框架层提供开发Android应用程序所需的一系列类库,能够用于重用组件,也可以通过继承实现个性化的扩展。系统运行库层是应用程序框架的支撑,为Android系统中的各个组件提供服务。系统运行库层由系统类库和Android运行时构成。Android运行时包含核心库和Dalvik虚拟机两部分。Linux内核层用于实现硬件设备驱动,进程和内存管理,网络协议栈,电源管理,无线通信等核心功能。The electronic device can specifically run the Android Android system, the mobile operating system iOS developed by Apple, etc., which is not limited here. As shown in FIG. 1B, taking an Android system running on the electronic device as an example, 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) in the Android system Framework), system runtime library layer (including system runtime library layer Libraries and Android runtime Android Runtime), Linux kernel layer (Linux Kernel). Among them, the application layer includes various application programs that directly interact with the user, or service programs written in the Java language and running in the background. For example, programs for common basic functions implemented on smartphones, such as short message service (Short Messaging Service, SMS), phone dialing, photo browser, calendar, games, maps, World Wide Web (Web) browser, etc. Programs, and other applications developed by developers. The application framework layer provides a series of class libraries required for the development of Android applications, which can be used to reuse components, and can also be personalized through inheritance. The system runtime layer is the support of the application framework and provides services for various components in the Android system. The system runtime library layer is composed of the system class library and the Android runtime. The Android runtime contains two parts: the core library and the Dalvik virtual machine. The Linux kernel layer is used to implement core functions such as hardware device drivers, process and memory management, network protocol stack, power management, and wireless communication.
电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备(例如智能手表、智能手环、计步器等)、计算设备或通信连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为电子设备。Electronic devices can include various handheld devices with wireless communication capabilities, in-vehicle devices, wearable devices (such as smart watches, smart bracelets, pedometers, etc.), computing devices, or other processing devices that are communicatively connected to wireless modems, and various Various forms of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal equipment (terminal), etc. For convenience of description, the devices mentioned above are collectively referred to as electronic devices.
下面对本申请实施例进行详细介绍。The following describes the embodiments of the present application in detail.
请参见图2,图2为本申请实施例提供的一种网络切换方法的流程示意图,应用于电子设备,包括以下步骤:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of a network switching method according to an embodiment of the present application, which is applied to an electronic device and includes the following steps:
步骤201:检测所述电子设备当前所使用的Wi-Fi网络的网络质量。Step 201: Detect the network quality of the Wi-Fi network currently used by the electronic device.
其中,网络质量包括以下至少一种:信号强度、网络延时、实时网速。信号强度是指电子设备接收到信道带宽上的宽带接收功率。网络延时是指一个数据包从用户的电子设备发送到服务器,然后再立即从服务器返回用户电子设备的来回时间。实时网速是指当前电子设备上网时,上传和下载数据时,请求和返回数据所用时间的长短。Among them, the network quality includes at least one of the following: signal strength, network delay, and real-time network speed. Signal strength refers to the broadband received power that the electronic device receives over the channel bandwidth. Network delay refers to the round-trip time when a data packet is sent from the user's electronic device to the server, and then immediately returned from the server to the user's electronic device. Real-time network speed refers to the length of time it takes to request and return data when the current electronic device is online, when uploading and downloading data.
进一步地,检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量的一具体方式为:获取网络设置界面中包括的当前所使用的WLAN信息; 解析所述WLAN信息,得到当前所使用的Wi-Fi网络的网络质量。Further, a specific method for detecting the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device is: acquiring the currently used WLAN information included in the network setting interface; parsing the WLAN information to obtain the current The network quality of the Wi-Fi network used.
进一步地,检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量的另一具体方式为:确定所述电子设备中是否安装有网络分析应用;若安装有网络分析应用,则开启网络分析应用;通过所述网络分析应用检测电子设备当前所使用的Wi-Fi网络的网络质量,得到电子设备当前所使用的Wi-Fi网络的网络质量。Further, another specific method for detecting the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device is: determining whether a network analysis application is installed in the electronic device; if a network analysis application is installed, then Start a network analysis application; detect the network quality of the Wi-Fi network currently used by the electronic device through the network analysis application to obtain the network quality of the Wi-Fi network currently used by the electronic device.
其中,网络分析应用例如可以为Wi-Fi万能助手、Wi-Fi分析仪、Wi-Fi信号检测应用或是其他的应用。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.
步骤202:在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐。Step 202: When it is detected 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, determine the traffic package of the mobile data network used by the electronic device.
其中,所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量包括以下至少一种:所述电子设备当前所使用的Wi-Fi网络的信号强度小于或等于预设信号强度,所述电子设备当前所使用的Wi-Fi网络的网络延时大于或等于预设网络延时,所述电子设备当前所使用的Wi-Fi网络的平均实时网速小于或等于预设平均实时网速。Wherein, the network quality of the Wi-Fi network currently used by the electronic device is less than or equal to the preset network quality includes at least one of the following: the signal strength of the Wi-Fi network currently used by the electronic device is less than or equal to the preset Signal strength, the network delay of the Wi-Fi network currently used by the electronic device is greater 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 device is less than or equal to the preset Average real-time network speed.
其中,平均实时网速为预设时间内的实时网速的平均值。预设时间为5分钟、10分钟、15分钟或是其他值。Among them, the average real-time network speed is the average value of the real-time network speed within a preset time. The preset time is 5 minutes, 10 minutes, 15 minutes or other values.
其中,移动数据网络的流量套餐例如有不限流量套餐、非不限流量套餐等。Among them, the data package of the mobile data network includes, for example, an unlimited data package and a non-unlimited data package.
步骤203:在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备的无线网络切换至移动数据网络。Step 203: When the data package is an unlimited data package, turn on the mobile data switch, and switch the wireless network of the electronic device to the mobile data network.
其中,不限流量套餐包括高速流量和低速流量,高速流量是指不限速的流量,低速流量是指运营商对移动网络进行限速后,网络速率低于预设值的流量。高速流量可在第五代手机通信技术(5th-Generation wireless telephone technology,5G)网络、第四代手机通信技术(4th-Generation wireless telephone technology,4G)网络下使用。低速流量可在第二代手机通信技术(2-Generation wireless telephone technology,2G)网络、第三代手机通信技术(3rd-Generation wireless telephone technology,2G)网络下使用。Among them, the unlimited traffic package includes high-speed traffic and low-speed traffic. High-speed traffic refers to unlimited-speed traffic. Low-speed traffic refers to the traffic where the network rate is lower than the preset value after the operator limits the mobile network. High-speed traffic can be used under the fifth-generation mobile communication technology (5th-Generation wireless telephone technology, 5G) network and the fourth-generation mobile communication technology (4th-Generation wireless telephone technology, 4G) network. Low-speed traffic can be used in the second-generation mobile communication technology (2-Generation wireless telephone technology, 2G) network and the third-generation mobile communication technology (3rd-Generation wireless telephone technology, 2G) network.
其中,移动数据开关用于开启或关闭电子设备的移动数据网络。开启移动 数据开关之后,Wi-Fi开关可以关闭,也可以不关闭,在此不作限定。Wi-Fi开关用于开启或关闭电子设备的Wi-Fi网络。Among them, the mobile data switch is used to turn on or off the mobile data network of the electronic device. After turning on the mobile data switch, the Wi-Fi switch can be turned off or not, which is not limited here. The Wi-Fi switch is used to turn on or off the Wi-Fi network of electronic devices.
可以看出,在本申请实施例中,在检测到其当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定其所使用的移动数据网络的流量套餐;在流量套餐为不限流量套餐时,开启移动数据开关,以及将当前所使用的Wi-Fi网络切换至移动数据网络。实现了在Wi-Fi网络的网络质量不好时,及时智能地进行网络切换,提升网络速率,进而提升上网体验。It can be seen that in the embodiment of the present application, when it is detected that the network quality of the Wi-Fi network currently used is less than or equal to the preset network quality, the data plan of the mobile data network used by it is determined; For unlimited data plans, turn on the mobile data switch and switch the currently used Wi-Fi network to the mobile data network. It realizes that when the network quality of the Wi-Fi network is not good, it can switch the network intelligently in time, increase the network speed, and then improve the Internet experience.
在本申请的一实现方式中,在将所述电子设备的无线网络切换至移动数据网络之后,所述方法还包括: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:
在确定所述不限流量套餐的高速流量的剩余流量小于或等于第一阈值时,关闭正在运行的至少一个应用,所述至少一个应用不包括前台运行的应用,所述至少一个应用的优先级小于或等于预定优先级。When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than or equal to the first threshold, at least one running application is closed, the at least one application does not include an application running in the foreground, and the priority of the at least one application Less than or equal to the predetermined priority.
其中,所述第一阈值可以是电子设备预设的也可以是用户为设定的,例如可以为1G、5G、10G或是其他值,在此不作限定。The first threshold may be preset by the electronic device or set by the user, for example, it may be 1G, 5G, 10G, or other values, which is not limited herein.
其中,电子设备正在运行的应用包括前台运行的应用和后台运行的应用,前台运行的应用可以是一个应用也可以是多个应用,后台运行的应用程序可以是一个应用也可以是多个应用,在此不作限定。Among them, the applications running on the electronic device include applications running in the foreground and applications running in the background. The application running in the foreground can be one application or multiple applications, and the application running in the background can be one application or multiple applications. Not limited here.
其中,应用的优先级可以是应用的使用优先级、也可以是应用的重要优先级等。在应用的优先级为应用的使用优先级时,该优先级可以是电子设备基于应用在一段时间内的使用频率确定的,也可以是用户自定义的,在此不作限定。在应用的优先级为应用的重要优先级时,该优先级可以是电子设备基于应用的类型确定的,应用的类型有安全、即时通信、新闻、音视频等,也可以是用户自定义的,在此不作限定。Among them, the priority of the application may be the usage priority of the application, or an important priority of the application. 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 frequency of use of the application in a period of time, or may be user-defined, which is not limited herein. When the priority of an 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 and video, etc., or may be user-defined. Not limited here.
可以看出,在本申请实施例中,在确定不限流量套餐的高速流量剩余不是很多值时,关闭后台一些优先级比较低的应用,减少电子设备的流量消耗,以及提高前台运行应用的传输速率。It can be seen that in the embodiment of the present application, when it is determined that the high-speed data remaining of the unlimited data package is not a lot of values, close some applications with lower priority in the background, reduce the traffic consumption of electronic devices, and improve the transmission of applications running in the foreground rate.
在本申请的一实现方式中,所述方法还包括:In an implementation manner of the present application, the method further includes:
在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;在检测到所述电子设备当前所使用的Wi-Fi网络的 网络质量仍然小于或等于所述预定网络质量时,输出提醒信息,所述提醒信息用于提醒切换网络;在检测到针对所述提醒信息的确认切换指令时,将所述电子设备的无线网络切换至移动数据网络。When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, a reminder message is output, the reminder message is used to remind the switching of the network; when a confirmation switching instruction for the reminder message is detected, the wireless network of the electronic device is switched to mobile data The internet.
其中,输出提醒信息的方式可以是显示方式、语音方式中的至少一种。The method of outputting the reminder information may be at least one of a display method and a voice method.
其中,确认指令可以是用户针对操作界面的指定位置进行触控操作触发的,也可以是用户针对所述电子设备的指定按键进行按压触发的。触控操作可以是单击操作、多击操作、滑动操作、滑动操作+单击操作、滑动操作+多击操作等。Wherein, the confirmation instruction may be triggered by the user performing touch operation on the specified position of the operation interface, or may be triggered by the user pressing a specified key of the electronic device. The touch operation may be a click operation, a multi-click operation, a slide operation, a slide operation + a click operation, a slide operation + a multi-click operation, etc.
可以看出,在本申请实施例中,在流量套餐不为不限流量套餐时,继续检测Wi-Fi网络的网络质量,若Wi-Fi网络的网络质量仍然不行,输出提醒信息,提醒切换网络,以及时提醒用户网络质量不行,避免了电子设备长时间处于网络质量不好的情况下,提升上网体验。It can be seen that in the embodiment of the present application, when the data plan is not an unlimited data plan, continue to check the network quality of the Wi-Fi network. If the network quality of the Wi-Fi network is still not good, a reminder message is output to remind the network to switch , Promptly remind users that the network quality is not enough, to avoid the electronic equipment in the case of poor network quality for a long time, improve the Internet experience.
在本申请的一实现方式中,所述方法还包括:In an implementation manner of the present application, the method further includes:
在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,开启所述移动数据开关,以及启用链路聚合功能,在所述链路聚合功能下,所述电子设备同时使用Wi-Fi网络和移动数据网络。When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the mobile data switch is turned on, and a link aggregation function is enabled. Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
其中,在开启移动数据开关之后,电子设备保持Wi-Fi开关开启。After the mobile data switch is turned on, the electronic device keeps the Wi-Fi switch turned on.
进一步地,电子设备启用链路聚合功能之后,所述方法还包括:Further, after the electronic device enables the link aggregation function, the method further includes:
分别获取用于链路聚合的至少两个无线网络模块当前的峰值传输速率;根据获取的至少两个峰值传输速率分别确定所述至少两个无线网络模块的分流权重;根据确定的至少两个分流权重为所述至少两个无线网络模块分流。Separately obtaining current peak transmission rates of at least two wireless network modules for link aggregation; separately determining the offload weights of the at least two wireless network modules according to the obtained at least two peak transmission rates; according to the determined at least two offloads The weight is divided between the at least two wireless network modules.
其中,无线网络模块例如有wifi模块、蓝牙模块、数据网络模块、邻近感知网络(neighbor awareness network,NAN)网络模块等等。数据网络模块可支持第二代手机通信技术(2-Generation wireless telephone technology,2G)网络、第三代手机通信技术(3rd-Generation wireless telephone technology,3G)网络、长期演进(Long Term Evolution,LTE)网络、第五代手机通信技术(5th-Generation wireless telephone technology,5G)网络等等。Among them, 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 so on. The data network module can support the second-generation mobile communication technology (2-Generation wireless telephone technology, 2G) network, the third-generation mobile communication technology (3rd-Generation wireless telephone technology, 3G) network, and long-term evolution (Long Term Evolution, LTE) Networks, 5th-Generation wireless technology (5G) networks, etc.
其中,分流权重用于表示在分数据流时的重要程度。Among them, the distribution weight is used to indicate the importance of the distribution of data flow.
其中,确定的至少两个分流权重与该至少两个无线网络模块一一对应。所述至少两个分流权重的和等于1。Wherein, the determined at least two offload weights correspond to the at least two wireless network modules one-to-one. The sum of the at least two shunt weights is equal to 1.
进一步地,根据获取的至少两个峰值传输速率分别确定所述至少两个无线网络模块的分流权重的具体实现方式:根据获取的至少两个峰值传输速率和设定规则分别确定所述至少两个无线网络模块的分流权重,所述预设规则为分流权重等于峰值传输速率除于所述至少两个峰值传输速率的和。Further, a specific implementation manner of separately determining the offload weights of the at least two wireless network modules according to the acquired at least two peak transmission rates: determining the at least two according to the acquired at least two peak transmission rates and setting rules The offload weight of the wireless network module, the preset rule is that the offload weight is equal to the peak transmission rate divided by the sum of the at least two peak transmission rates.
进一步地,根据确定的至少两个分流权重为所述至少两个无线网络模块分流的具体实现方式有:根据电子设备当前建立的数据流的数量和确定的至少两个分流权重为所述至少两个无线网络模块分流。Further, a specific implementation manner of offloading the at least two wireless network modules according to the determined at least two offload weights includes: according to the number of data streams currently established by the electronic device and the determined at least two offload weights are the at least two A wireless network module is offloaded.
举例来说,假设用于链路聚合的无线网络模块为wifi模块和数据网络模块,步骤203确定wifi模块的分流权重为1/3,数据网络模块的分流权重为2/3,假如电子设备当前建立的数据流有3条,那么电子设备将1条数据流分给wifi模块,将2条数据流分给数据网络模块。又举例来说,假设用于链路聚合的无线网络模块为wifi模块和数据网络模块,步骤203确定wifi模块的分流权重为1/3,数据网络模块的分流权重为2/3,假如电子设备当前建立的数据流有4条,那么电子设备将1条数据流分给wifi模块,将3条数据流分给数据网络模块。For example, assuming that the wireless network module used for link aggregation is a wifi module and a data network module, step 203 determines that the shunt weight of the wifi module is 1/3, and the shunt weight of the data network module is 2/3, if the electronic device is currently There are 3 established data streams, then the electronic device allocates 1 data stream to the wifi module and 2 data streams to the data network module. For another example, assuming that the wireless network module used for link aggregation is a wifi module and a data network module, step 203 determines that the shunt weight of the wifi module is 1/3, and the shunt weight of the data network module is 2/3, if the electronic device There are currently 4 data streams established, then the electronic device allocates 1 data stream to the wifi module and 3 data streams to the data network module.
其中,数据流为同一数据类型的数据包集合,例如,视频类数据包同属于一个数据流,图片类数据包同属于一个数据流等。The data stream is a collection of data packets of the same data type. For example, video data packets belong to the same data stream, and picture data packets belong to the same data stream.
可以看出,在本申请实施例中,在处于链路聚合状态下,电子设备分别获取用于链路聚合的至少两个无线网络模块当前的峰值传输速率,然后基于确定的至少两个峰值传输速率分别确定该至少两个无线网络模块的分流权重,最后基于确定的至少两个分流权重为该至少两个无线网络模块分流,实现了在链路聚合状态下合理为不同无线网络模块分流,进而提升数据传输的稳定性。It can be seen that in the embodiment of the present application, in the state of link aggregation, the electronic device separately obtains the current peak transmission rates of at least two wireless network modules used for link aggregation, and then transmits based on the determined at least two peak transmissions The rate determines the offload weights of the at least two wireless network modules respectively, and finally offloads the at least two wireless network modules based on the determined at least two offload weights, thereby achieving reasonable offloading of different wireless network modules in the link aggregation state, and further Improve the stability of data transmission.
在本申请的一实现方式中,确定所述电子设备所使用的移动数据网络的流量套餐的一具体实现方式为:In an implementation manner of the present application, a specific implementation manner of determining the traffic package of the mobile data network used by the electronic device is:
获取所述电子设备中存储的有关流量套餐的短消息;解析所述短消息,得到至少一个关键词;在所述至少一个关键词中包含有预设关键词时,确定所述 电子设备所使用的移动数据网络的流量套餐为不限流量套餐,所述预设关键词与不限流量套餐关联;在所述至少一个关键词中不包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐不为不限流量套餐。Obtaining a short message about a data package stored in the electronic device; parsing the short message to obtain at least one keyword; when the at least one keyword contains a preset keyword, determining that the electronic device uses Of the mobile data network's data plan is an unlimited data plan, and the preset keyword is associated with the unlimited data plan; when the at least one keyword does not include the preset keyword, it is determined that the electronic device is used The mobile data network's data plan is not an unlimited data plan.
其中,所述预设关键词例如为不限量、高速流量、低速流量等。The preset keywords are, for example, unlimited, high-speed traffic, low-speed traffic, and so on.
在本申请的一实现方式中,在确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值之前,所述方法还包括:In an implementation manner of the present application, before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold, the method further includes:
向运营商发送流量查询请求,所述流量查询请求用于请求查询所述电子设备的流量使用信息;接收所述运营商针对所述流量查询请求而发送的流量使用信息,所述流量使用信息包含所述不限流量套餐的高速流量的剩余流量。Sending a traffic query request to an operator, where the traffic query request is used to request query of traffic usage information of the electronic device; receiving traffic usage information sent by the operator in response to the traffic query request, the traffic usage information including The remaining flow of the high-speed flow of the unlimited flow package.
其中,所述流量查询请求例如可以是预设短信消息、预设微信消息、预设电话号码。例如中国移动的流量使用信息的电话查询方法为致电10086以及拨号2,短信查询方法为发送103到10086;中国联通的流量使用信息的电话查询方法为致电10011,短信查询方法为发送cxll到10010;中国电信的流量使用信息的电话查询方法为致电10000,短信查询方法为发送108到10001。The traffic query request may be, for example, a preset short message, a preset WeChat message, and a preset phone number. For example, the phone query method for China Mobile's traffic usage information is to call 10086 and dial 2, the SMS query method is to send 103 to 10086; the phone query method for China Unicom's traffic usage information is to call 10011, and the SMS query method is to send cxll to 10010; The telephone inquiry method of China Telecom's traffic usage information is to call 10000, and the SMS inquiry method is to send 108 to 10001.
可以看出,在本申请实施例中,通过向运营商发送流量查询请求确定电子设备的流量使用信息,保证了信息获取的准确性。It can be seen that, in the embodiment of the present application, the flow query information of the electronic device is determined by sending a flow query request to the operator, thereby ensuring the accuracy of information acquisition.
在本申请的一实现方式中,确定所述电子设备所使用的移动数据网络的流量套餐的一具体实现方式为:在第一条件下,确定所述电子设备所使用的移动数据网络的流量套餐;所述第一条件包括以下至少一种:除当前所使用的Wi-Fi网络外无其他可连接的Wi-Fi网络,当前正在运行的应用数量大于或等于第二阈值,前台当前运行的应用为预定应用。In an implementation manner of the present application, a specific implementation manner of determining the traffic package of the mobile data network used by the electronic device is: under the first condition, determining the traffic package of the mobile data network used by the electronic device The first condition includes at least one of the following: there is no connectable Wi-Fi network other than the currently used Wi-Fi network, the number of currently running applications is greater than or equal to the second threshold, and the applications currently running in the foreground For scheduled applications.
其中,无其他可连接的Wi-Fi网络包括可以接收到的Wi-Fi网络但无法连接上、接收不到的Wi-Fi网络等。其中,所述第二阈值可以是系统设定的也可以是用户设定的阈值,例如可以为5个、8个、10个或其他值。其中,预设应用例如可以是视频类应用、游戏类应用、音频类应用或是其他应用等。Among them, no other Wi-Fi network that can be connected includes a Wi-Fi network that can be received but cannot be connected to or cannot be received. The second threshold may be set by the system or may be set by the user, for example, may be 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:
在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于预定网络质量时,检测所述Wi-Fi网络关联的路由器 的网络连接信息,所述网络连接信息包括以下至少一种:频段、频宽、信道;调整所述路由器的网络连接信息。When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the network connection information of the router associated with the Wi-Fi network is detected, and the network connection information includes at least one of the following: frequency band, bandwidth, and channel; and the network connection information of the router is adjusted.
其中,常见的频段主要有两个:2.4G频段和5G频段。2.4G频段的频率范围为2.4GHZ—2.4835GHZ。5G的频率范围为5.15GHZ—5.825GHZ。其中,信道指的是路由器的工作信道。2.4G频段一共设有14个信道,但在我国只允许使用前13个信道。每个信道22MHZ宽,实际用来传输数据的只有20MH,另外2MHZ用来隔离信道。2.4G一共可用83.5MHZ,信道与信道之间大多会有重叠。每个信道的中心频率间隔5MHZ。2.4GH中信道、中心频率和频率范围的映射关系如表1所示。Among them, there are two common frequency bands: 2.4G frequency band and 5G frequency band. The frequency range of the 2.4G band is 2.4GHZ-2.4835GHZ. The frequency range of 5G is 5.15GHZ-5.825GHZ. Among them, the channel refers to the working channel of the router. There are 14 channels in the 2.4G frequency band, but only the first 13 channels are allowed in my country. Each channel is 22MHZ wide, and only 20MH is actually used to transmit data, and the other 2MHZ is used to isolate the channel. A total of 83.5MHZ is available for 2.4G, and there is mostly overlap between channels. The center frequency of each channel is separated by 5MHZ. The mapping relationship between channel, center frequency and frequency range in 2.4GH is shown in Table 1.
表1Table 1
信道channel 中心频率(MHZ)Center frequency (MHZ) 频率范围(MHZ)Frequency range (MHZ)
0101 24122412 2401-24232401-2423
0202 24172417 2406-24282406-2428
0303 24222422 2411-24332411-2433
0404 24272427 2416-24382416-2438
0505 24322432 2421-24432421-2443
0606 24372437 2426-24482426-2448
0707 24422442 2431-4532431-453
0808 24472447 2426-24482426-2448
0909 24522452 2441-24632441-2463
1010 24572457 2446-24682446-2468
1111 24622462 2451-24732451-2473
1212 24672467 2456-24782456-2478
1313 24722472 2461-24832461-2483
其中,频宽分为20MHZ和40MHZ。由于信道与信道之间大多会有重叠,因此信道与信道之间会有冲突,40MHZ频宽的传输效率低于20MHZ频宽的传输效率。Among them, the bandwidth is divided into 20MHZ and 40MHZ. Because there will be overlaps between channels and channels, there will be conflicts between channels and channels. The transmission efficiency of 40 MHz bandwidth is lower than that of 20 MHz bandwidth.
进一步地,调整所述网络连接信息具体的一具体实现方式为:Further, a specific implementation manner for adjusting the network connection information is:
检测接入信道的电子设备数量;获取所述路由器的管理网址、登录账号以及登录密码;将所述路由器的当前信道切换至接入电子设备最少的信道。Detect the number of electronic devices accessing the channel; obtain the management website, login account and login password of the router; switch the current channel of the router to the channel with the least access to electronic devices.
进一步地,调整所述网络连接信息具体的另一实现方式为:Further, another specific implementation manner for adjusting the network connection information is:
检测信道的评级;获取所述路由器的管理网址、登录账号以及登录密码;将所述路由器的当前信道切换至评级最高的信道。Detect the rating of the channel; obtain the management website address, login account and login password of the router; switch the current channel of the router to the channel with the highest rating.
进一步地,调整所述网络连接信息具体的另一实现方式为:Further, another specific implementation manner for adjusting the network connection information is:
检测接入频段的电子设备数量;获取所述路由器的管理网址、登录账号以及登录密码;将所述路由器的当前频段切换至接入电子设备最少的频段。Detect the number of electronic devices connected to the frequency band; obtain the management website, login account and login password of the router; switch the current frequency band of the router to the frequency band with the least access to electronic devices.
进一步地,调整所述网络连接信息具体的另一实现方式为:Further, another specific implementation manner for adjusting the network connection information is:
检测当前接入的频宽;获取所述路由器的管理网址、登录账号以及登录密码;将所述路由器的当前频宽切换至另一频段。Detect the current access bandwidth; obtain the management website address, login account and login password of the router; switch the current bandwidth of the router to another frequency band.
与所述图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的另一种网络切换方法的流程示意图,应用于电子设备,本网络切换方法包括:Consistent with the embodiment shown in FIG. 2, please refer to FIG. 3. FIG. 3 is a schematic flowchart of another network switching method provided by an embodiment of the present application, which is applied to an electronic device. The network switching method includes:
步骤301:检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量。Step 301: Detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device.
步骤302:在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,获取所述电子设备中存储的有关流量套餐的短消息。Step 302: When it is detected 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, obtain a short message about the traffic package stored in the electronic device.
步骤303:解析所述短消息,得到至少一个关键词。Step 303: Parse the short message to obtain at least one keyword.
步骤304:在所述至少一个关键词中包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐为不限流量套餐,所述预设关键词与不限流量套餐关联。Step 304: When a preset keyword is included in the at least one keyword, determine that the data package of the mobile data network used by the electronic device is an unlimited data package, and the preset keyword and the unlimited data package Related.
步骤305:在所述至少一个关键词中不包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐不为不限流量套餐。Step 305: When the at least one keyword does not include a preset keyword, determine that the data plan of the mobile data network used by the electronic device is not an unlimited data plan.
步骤306:在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备当前所使用的Wi-Fi网络切换至移动数据网络。Step 306: When the data package is an unlimited data package, turn on the mobile data switch, and switch the Wi-Fi network currently used by the electronic device to the mobile data network.
步骤307:向运营商发送流量查询请求,所述流量查询请求用于请求查询所述电子设备的流量使用信息。Step 307: Send a traffic query request to the operator, where the traffic query request is used to request query of traffic usage information of the electronic device.
步骤308:接收所述运营商针对所述流量查询请求而发送的流量使用信息,所述流量使用信息包含所述不限流量套餐的高速流量的剩余流量。Step 308: Receive traffic usage information sent by the operator in response to the traffic query request, where the traffic usage information includes the remaining traffic of the high-speed traffic of the unlimited traffic package.
步骤309:在确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值时,关闭正在运行的至少一个应用,所述至少一个应用不包括前台当前运行的应用,所述至少一个应用的优先级小于或等于预定优先级。Step 309: When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than the first threshold, close at least one application that is running, the at least one application does not include an application currently running in the foreground, the at least one The priority of the application is less than or equal to the predetermined priority.
步骤310:在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量。Step 310: When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device.
在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,执行步骤311或步骤313。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, step 311 or step 313 is executed.
步骤311:输出提醒信息,所述提醒信息用于提醒切换网络。Step 311: Output reminder information, the reminder information is used to remind to switch the network.
步骤312:在检测到针对所述提醒信息的确认切换指令时,将所述电子设备的无线网络切换至移动数据网络。Step 312: When a confirmation switching instruction for the reminder information is detected, switch the wireless network of the electronic device to a mobile data network.
步骤313:开启移动数据开关,以及启用链路聚合功能,在所述链路聚合功能下,所述电子设备同时使用Wi-Fi网络和移动数据网络。Step 313: Turn on the mobile data switch and enable the link aggregation function. Under the link aggregation function, the electronic device uses the Wi-Fi network and the mobile data network at the same time.
需要说明的是,本实施例的具体实现过程可参见上述方法实施例所述的具体实现过程,在此不再叙述。It should be noted that, for the specific implementation process of this embodiment, reference may be made to the specific implementation process described in the foregoing method embodiments, and details are not described herein.
与上述图2和图3所示的实施例一致的,请参阅图4,图4是本申请实施例提供的一种电子设备的结构示意图,该电子设备包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行以下步骤的指令:Consistent with the above embodiments shown in FIG. 2 and FIG. 3, please refer to FIG. 4, which is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device includes a processor, a memory, a communication interface, and a Or multiple 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:
检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;Detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;When it is detected 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, determine the traffic package of the mobile data network used by the electronic device;
在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备的无线网络切换至移动数据网络。When the data package is an unlimited data package, the mobile data switch is turned on, and the wireless network of the electronic device is switched to the mobile data network.
在本申请的一实现方式中,在将所述电子设备的无线网络切换至移动数据网络之后,上述程序包括还用于执行以下步骤的指令:In an implementation manner of the present application, after switching the wireless network of the electronic device to a mobile data network, the above-mentioned program includes instructions that are further used to perform the following steps:
在确定所述不限流量套餐的高速流量的剩余流量小于或等于第一阈值时, 关闭正在运行的至少一个应用,所述至少一个应用不包括前台运行的应用,所述至少一个应用的优先级小于或等于预定优先级。When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than or equal to the first threshold, close at least one running application, the at least one application does not include an application running in the foreground, and the priority of the at least one application Less than or equal to the predetermined priority.
在本申请的一实现方式中,上述程序包括还用于执行以下步骤的指令:In an implementation manner of the present application, the above program includes instructions that are also used to perform the following steps:
在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,输出提醒信息,所述提醒信息用于提醒切换网络;在检测到针对所述提醒信息的确认切换指令时,将所述电子设备的无线网络切换至移动数据网络。When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, a reminder message is output, the reminder message is used to remind the switching of the network; when a confirmation switching instruction for the reminder message is detected, the wireless network of the electronic device is switched to mobile data The internet.
在本申请的一实现方式中,上述程序包括还用于执行以下步骤的指令:In an implementation manner of the present application, the above program includes instructions that are also used to perform the following steps:
在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,开启所述移动数据开关,以及启用链路聚合功能,在所述链路聚合功能下,所述电子设备同时使用Wi-Fi网络和移动数据网络。When the data package is not an unlimited data package, continue to detect the network quality of the Wi-Fi network currently used by the electronic device; after detecting that the network quality of the Wi-Fi network currently used by the electronic device is still When it is less than or equal to the predetermined network quality, the mobile data switch is turned on, and a link aggregation function is enabled. Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
在本申请的一实现方式中,在确定所述电子设备所使用的移动数据网络的流量套餐方面,上述程序包括具体用于执行以下步骤的指令:In an implementation manner of the present application, in terms of determining a data plan of a mobile data network used by the electronic device, the above-mentioned program includes instructions specifically for performing the following steps:
获取所述电子设备中存储的有关流量套餐的短消息;解析所述短消息,得到至少一个关键词;在所述至少一个关键词中包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐为不限流量套餐,所述预设关键词与不限流量套餐关联;在所述至少一个关键词中不包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐不为不限流量套餐。Obtaining a short message about a data package stored in the electronic device; parsing the short message to obtain at least one keyword; when the at least one keyword contains a preset keyword, determining that the electronic device uses Of the mobile data network's data plan is an unlimited data plan, and the preset keyword is associated with the unlimited data plan; when the at least one keyword does not include the preset keyword, it is determined that the electronic device is used The mobile data network's data plan is not an unlimited data plan.
在本申请的一实现方式中,在确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值之前,上述程序包括还用于执行以下步骤的指令:In an implementation manner of the present application, before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold, the above-mentioned program includes instructions that are further used to perform the following steps:
向运营商发送流量查询请求,所述流量查询请求用于请求查询所述电子设备的流量使用信息;接收所述运营商针对所述流量查询请求而发送的流量使用信息,所述流量使用信息包含所述不限流量套餐的高速流量的剩余流量。Sending a traffic query request to an operator, where the traffic query request is used to request query of traffic usage information of the electronic device; receiving traffic usage information sent by the operator in response to the traffic query request, the traffic usage information including The remaining flow of the high-speed flow of the unlimited flow package.
在本申请的一实现方式中,在确定所述电子设备所使用的移动数据网络的流量套餐方面,上述程序包括具体用于执行以下步骤的指令:In an implementation manner of the present application, in terms of determining a data plan of a mobile data network used by the electronic device, the above-mentioned program includes instructions specifically for performing the following steps:
在第一条件下,确定所述电子设备所使用的移动数据网络的流量套餐;所 述第一条件包括以下至少一种:除所述电子设备当前所使用的Wi-Fi网络外无其他可连接的Wi-Fi网络,正在运行的应用数量大于或等于第二阈值,前台当前运行的应用为预定应用。Under the first condition, determine the data plan of the mobile data network used by the electronic device; the first condition includes at least one of the following: no other than the Wi-Fi network currently used by the electronic device can be connected In the Wi-Fi network, the number of running applications is greater than or equal to the second threshold, and the currently running application in the foreground is a predetermined application.
需要说明的是,本实施例的具体实现过程可参见上述方法实施例所述的具体实现过程,在此不再叙述。It should be noted that, for the specific implementation process of this embodiment, reference may be made to the specific implementation process described in the foregoing method embodiments, and details are not described herein.
请参阅图5,图5是本申请实施例提供的一种网络切换装置,应用于电子设备,该网络切换装置包括:Please refer to FIG. 5. FIG. 5 is a network switching device provided by an embodiment of the present application, which is applied to an electronic device. The network switching device includes:
检测单元501,用于检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;The detection unit 501 is configured to detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
确定单元502,用于在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;The determining unit 502 is configured to determine the traffic plan of the mobile data network used by the electronic device when it is detected 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;
切换单元503,用于在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备的无线网络切换至移动数据网络。The switching unit 503 is configured to turn on the mobile data switch and switch the wireless network of the electronic device to the mobile data network when the data package is an unlimited data package.
在本申请的一实现方式中,在通过切换单元503将所述电子设备的无线网络切换至移动数据网络之后,所述装置还包括:In an implementation manner of the present application, after switching the wireless network of the electronic device to the mobile data network through the switching unit 503, the apparatus further includes:
控制单元504,用于在通过确定单元502确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值时,关闭正在运行的至少一个应用,所述至少一个应用不包括前台运行的应用,所述至少一个应用的优先级小于或等于预定优先级。The control unit 504 is configured to close at least one application that is running when it is determined by the determining unit 502 that the remaining flow of the high-speed traffic of the unlimited data package is less than the first threshold, the at least one application does not include the application running in the foreground For applications, the priority of the at least one application is less than or equal to the predetermined priority.
在本申请的一实现方式中,检测单元501,还用于在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;所述装置还包括输出单元505,用于在通过检测单元501检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,输出提醒信息,所述提醒信息用于提醒切换网络;切换单元503,还用于在通过检测单元501检测到针对所述提醒信息的确认切换指令时,将所述电子设备的无线网络切换至移动数据网络。In an implementation manner of the present application, the detection 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 data package is not an unlimited data package; the apparatus Also includes an output unit 505 for outputting reminder information 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, the reminder information is used The switch unit 503 is also used for reminding to switch the network; the switch unit 503 is also used to switch the wireless network of the electronic device to the mobile data network when the confirmation switch instruction for the reminder information is detected by the detecting unit 501.
在本申请的一实现方式中,检测单元501,还用于在所述流量套餐不为不 限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;控制单元504,还用于在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,开启所述移动数据开关,以及启用链路聚合功能,在所述链路聚合功能下,所述电子设备同时使用Wi-Fi网络和移动数据网络。In an implementation manner of the present application, the detection 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 data package is not an unlimited data package; the control unit 504 , Also used to turn on the mobile data switch and enable the link aggregation function 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 Under the link aggregation function, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
在本申请的一实现方式中,在通过确定单元502确定所述电子设备所使用的移动数据网络的流量套餐方面,所述装置还包括:In an implementation manner of the present application, in determining the traffic package of the mobile data network used by the electronic device by the determining unit 502, the apparatus further includes:
获取单元506,用于获取所述电子设备中存储的有关流量套餐的短消息;An obtaining unit 506, configured to obtain a short message about a flow package stored in the electronic device;
解析单元507,用于解析所述短消息,得到至少一个关键词;The parsing unit 507 is used to parse the short message to obtain at least one keyword;
确定单元502,还用于在所述至少一个关键词中包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐为不限流量套餐,所述预设关键词与不限流量套餐关联;在所述至少一个关键词中不包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐不为不限流量套餐。The determining unit 502 is further configured to determine that the data plan of the mobile data network used by the electronic device is an unlimited data plan when the preset keyword is included in the at least one keyword. Unlimited data package association; when the at least one keyword does not include a preset keyword, it is determined that the data package of the mobile data network used by the electronic device is not an unlimited data package.
在本申请的一实现方式中,在通过确定单元502确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值之前,所述装置还包括:In an implementation manner of the present application, before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold by the determining unit 502, the device further includes:
通信单元508,用于向运营商发送流量查询请求,所述流量查询请求用于请求查询所述电子设备的流量使用信息;接收所述运营商针对所述流量查询请求而发送的流量使用信息,所述流量使用信息包含所述不限流量套餐的高速流量的剩余流量。The communication unit 508 is configured to send a traffic query request to an operator, where the traffic query request is used to request query of traffic usage information of the electronic device; to receive traffic usage information sent by the operator in response to the traffic query request, The traffic usage information includes the remaining traffic of the high-speed traffic of the unlimited traffic package.
在本申请的一实现方式中,确定单元502:还用于在第一条件下,确定所述电子设备所使用的移动数据网络的流量套餐;所述第一条件包括以下至少一种:除所述电子设备当前所使用的Wi-Fi网络外无其他可连接的Wi-Fi网络,当前正在运行的应用数量大于或等于第二阈值,前台运行的应用为预定应用。In an implementation manner of the present application, the determining unit 502 is further configured to determine the traffic package of the mobile data network used by the electronic device under the first condition; the first condition includes at least one of the following: division There is no other connectable Wi-Fi network outside the Wi-Fi network currently used by the electronic device, the number of currently running applications is greater than or equal to the second threshold, and the applications running in the foreground are predetermined applications.
需要说明的是,检测单元501、确定单元502、切换单元503、控制单元504、输出单元505、获取单元506和解析单元507可通过处理器实现,通信单元508可通过通信接口实现。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.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括电子设备。An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to perform part or all of the steps of any method described in the foregoing method embodiments , The above computer includes electronic equipment.
本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括电子设备。Embodiments of the present application also provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium that stores the computer program, and the computer program is operable to cause the computer to perform any of the methods described in the foregoing method embodiments Some or all steps of the method. The computer program product may be a software installation package, and the computer includes an electronic device.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that this application is not limited by the sequence of actions described. Because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not detailed in an embodiment, you can refer to the related descriptions of other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above-mentioned units is only a division of logical functions. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or integrated To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple 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 into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software function unit.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部 或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable memory. Based on such an understanding, the technical solution of the present application may essentially be a part that contributes to the prior art or all or part of the technical solution may be embodied in the form of a software product, and the computer software product is stored in a memory, Several instructions are included to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application. The aforementioned memory includes: U disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps in the various methods of the foregoing embodiments may be completed by instructing relevant hardware through a program. The program may be stored in a computer-readable memory, and the memory may include: a flash disk , Read-Only Memory (English: Read-Only Memory, abbreviation: ROM), Random Access Device (English: Random Access Memory, abbreviation: RAM), magnetic disk or optical disk, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application are described in detail above, and specific examples are used in this article to explain the principles and implementation of the present application. The descriptions of the above embodiments are only used to help understand the method and the core idea of the present application; Those of ordinary skill in the art, according to the ideas of the present application, may have changes in specific implementations and application scopes. In summary, the content of this specification should not be construed as limiting the present application.

Claims (10)

  1. 一种网络切换方法,其特征在于,应用于电子设备,包括:A network switching method, which is characterized in that it is applied to electronic equipment and includes:
    检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;Detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
    在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;When it is detected 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, determine the traffic package of the mobile data network used by the electronic device;
    在所述流量套餐为不限流量套餐时,开启移动数据开关,以及将所述电子设备的无线网络切换至移动数据网络。When the data package is an unlimited data package, the mobile data switch is turned on, and the wireless network of the electronic device is switched to the mobile data network.
  2. 根据权利1所述的方法,其特征在于,所述将所述电子设备的无线网络切换至移动数据网络之后,所述方法还包括:The method according to claim 1, wherein after the wireless network of the electronic device is switched to a mobile data network, the method further comprises:
    在确定所述不限流量套餐的高速流量的剩余流量小于或等于第一阈值时,关闭正在运行的至少一个应用,所述至少一个应用不包括前台运行的应用,所述至少一个应用的优先级小于或等于预定优先级。When it is determined that the remaining traffic of the high-speed traffic of the unlimited data package is less than or equal to the first threshold, at least one running application is closed, the at least one application does not include an application running in the foreground, and the priority of the at least one application Less than or equal to the predetermined priority.
  3. 根据权利1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;Continue to detect the network quality of the Wi-Fi network currently used by the electronic device when the data package is not an unlimited data package;
    在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,输出提醒信息,所述提醒信息用于提醒切换网络;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, output reminder information, the reminder information is used to remind the switch of the network;
    在检测到针对所述提醒信息的确认切换指令时,将所述电子设备的无线网络切换至移动数据网络。When a confirmation switching instruction for the reminder information is detected, the wireless network of the electronic device is switched to the mobile data network.
  4. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, wherein the method further comprises:
    在所述流量套餐不为不限流量套餐时,继续检测所述电子设备当前所使用的Wi-Fi网络的网络质量;Continue to detect the network quality of the Wi-Fi network currently used by the electronic device when the data package is not an unlimited data package;
    在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量仍然小于或等于所述预定网络质量时,开启所述移动数据开关,以及启用链路聚合功能,在所述链路聚合功能下,所述电子设备同时使用Wi-Fi网络和移动数据网络。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, the mobile data switch is turned on, and the link aggregation function is enabled, and the link aggregation function Next, the electronic device uses a Wi-Fi network and a mobile data network at the same time.
  5. 根据权利1-4任一项所述的方法,其特征在于,所述确定所述电子设备所使用的移动数据网络的流量套餐,包括:The method according to any one of claims 1-4, wherein the determining a traffic plan of a mobile data network used by the electronic device includes:
    获取所述电子设备中存储的有关流量套餐的短消息;Obtaining short messages about flow packages stored in the electronic device;
    解析所述短消息,得到至少一个关键词;Parse the short message to obtain at least one keyword;
    在所述至少一个关键词中包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐为不限流量套餐,所述预设关键词与不限流量套餐关联;When the at least one keyword includes a preset keyword, it is determined that the data package of the mobile data network used by the electronic device is an unlimited data package, and the preset keyword is associated with the unlimited data package;
    在所述至少一个关键词中不包含有预设关键词时,确定所述电子设备所使用的移动数据网络的流量套餐不为不限流量套餐。When the preset keyword is not included in the at least one keyword, it is determined that the data plan of the mobile data network used by the electronic device is not an unlimited data plan.
  6. 根据权利2-5任一项所述的方法,其特征在于,所述确定所述不限流量套餐的高速流量的剩余流量小于所述第一阈值之前,所述方法还包括:The method according to any one of claims 2-5, wherein before determining that the remaining flow of the high-speed flow of the unlimited flow package is less than the first threshold, the method further comprises:
    向运营商发送流量查询请求,所述流量查询请求用于请求查询所述电子设备的流量使用信息;Sending a traffic query request to an operator, where the traffic query request is used to request query of traffic usage information of the electronic device;
    接收所述运营商针对所述流量查询请求而发送的流量使用信息,所述流量使用信息包含所述不限流量套餐的高速流量的剩余流量。Receiving traffic usage information sent by the operator in response to the traffic query request, the traffic usage information including the remaining traffic of the high-speed traffic of the unlimited traffic package.
  7. 根据权利1-6任一项所述的方法,其特征在于,所述确定所述电子设备所使用的移动数据网络的流量套餐,包括:The method according to any one of claims 1-6, wherein the determining a traffic plan of a mobile data network used by the electronic device includes:
    在第一条件下,确定所述电子设备所使用的移动数据网络的流量套餐;Under the first condition, determine the traffic package of the mobile data network used by the electronic device;
    所述第一条件包括以下至少一种:除所述电子设备当前所连接的Wi-Fi网络外无其他可连接的Wi-Fi网络,正在运行的应用的数量大于或等于第二阈值,前台运行的应用为预定应用。The first condition includes at least one of the following: there is no connectable Wi-Fi network other than the Wi-Fi network to which the electronic device is currently connected, the number of running applications is greater than or equal to the second threshold, and the foreground is running Is the intended application.
  8. 一种网络切换装置,其特征在于,应用于电子设备,所述装置包括:A network switching device is characterized by being applied to electronic equipment. The device includes:
    检测单元,用于检测所述电子设备当前所使用的无线保真Wi-Fi网络的网络质量;A detection unit, configured to detect the network quality of the wireless fidelity Wi-Fi network currently used by the electronic device;
    确定单元,用于在检测到所述电子设备当前所使用的Wi-Fi网络的网络质量小于或等于预设网络质量时,确定所述电子设备所使用的移动数据网络的流量套餐;A determining unit, configured to determine the traffic plan of the mobile data network used by the electronic device when it is detected 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 switching unit is used to turn on the mobile data switch and switch the wireless network of the electronic device to the mobile data network when the data package is an unlimited data package.
  9. 一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-7任一项所述的方法中 的步骤的指令。An electronic device, characterized in that it includes a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory, and are configured to be executed by the processor, The program includes instructions for performing the steps in the method of any one of claims 1-7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序被处理器执行,以实现如权利要求1-7任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program, the computer program is executed by a processor to implement the method according to any one of claims 1-7.
PCT/CN2018/125680 2018-12-29 2018-12-29 Network switching method and related apparatus WO2020133433A1 (en)

Priority Applications (2)

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

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 (1)

Publication Number Publication Date
WO2020133433A1 true WO2020133433A1 (en) 2020-07-02

Family

ID=71125796

Family Applications (1)

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

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
CN113993103A (en) * 2021-10-22 2022-01-28 安徽江淮汽车集团股份有限公司 Network automatic interconnection method for vehicle-mounted terminal
CN115002848A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Network switching method, medium, program product and electronic device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115696483B (en) * 2021-07-30 2023-10-31 荣耀终端有限公司 Network link switching method based on electronic equipment state and electronic equipment
CN116155729A (en) * 2021-11-22 2023-05-23 荣耀终端有限公司 Network acceleration method based on user traffic portrayal and related electronic equipment

Citations (5)

* 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
WO2018090456A1 (en) * 2016-11-18 2018-05-24 宇龙计算机通信科技(深圳)有限公司 Terminal data usage-based control method and device
CN108494464A (en) * 2018-03-13 2018-09-04 广东欧珀移动通信有限公司 Method of controlling antenna, antenna module, electronic equipment and storage medium
CN108990110A (en) * 2018-07-26 2018-12-11 Oppo广东移动通信有限公司 Network flux management method, device, storage medium and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106817731B (en) * 2015-11-30 2020-08-25 华为终端有限公司 Network switching method of terminal and terminal equipment
CN105554831B (en) * 2016-01-28 2020-06-16 广西东信易联科技有限公司 Network switching device and method
CN105848129A (en) * 2016-03-29 2016-08-10 乐视控股(北京)有限公司 Mobile data traffic monitoring method, device and handset

Patent Citations (5)

* 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
WO2018090456A1 (en) * 2016-11-18 2018-05-24 宇龙计算机通信科技(深圳)有限公司 Terminal data usage-based control method and device
CN108494464A (en) * 2018-03-13 2018-09-04 广东欧珀移动通信有限公司 Method of controlling antenna, antenna module, electronic equipment and storage medium
CN108990110A (en) * 2018-07-26 2018-12-11 Oppo广东移动通信有限公司 Network flux management method, device, storage medium and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113993103A (en) * 2021-10-22 2022-01-28 安徽江淮汽车集团股份有限公司 Network automatic interconnection method for vehicle-mounted terminal
CN113993103B (en) * 2021-10-22 2024-01-19 安徽江淮汽车集团股份有限公司 Network automatic interconnection method for vehicle-mounted terminal
CN115002848A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Network switching method, medium, program product and electronic device

Also Published As

Publication number Publication date
CN112997528A (en) 2021-06-18
CN112997528B (en) 2022-12-27

Similar Documents

Publication Publication Date Title
WO2020133433A1 (en) Network switching method and related apparatus
WO2020147627A1 (en) Link selection method and related apparatus
US20210360650A1 (en) Packet offloading method, mobile terminal, and storage medium
WO2020164475A1 (en) Data distribution method and apparatus, mobile terminal, and storage medium
WO2020143680A1 (en) Data transmission method and related apparatus
WO2020147606A1 (en) Wireless roaming method and device
US10805875B2 (en) Method and apparatus for automatically selecting network according to tariff, server, and terminal
US8606290B2 (en) Method and apparatus for performing a demotion in a cellular communications network
CN109151950B (en) Access control method, network equipment and terminal equipment
US20200192457A1 (en) Power-saving processing method and device, mobile terminal and computer-readable storage medium
US11070466B2 (en) Method for link aggregation and related devices
US10045263B2 (en) Network switching method and terminal device
WO2020098411A1 (en) Electromagnetic interference control method and related apparatus
WO2017173577A1 (en) Network access method and terminal
WO2022193890A1 (en) Resource scheduling method and apparatus
WO2020114038A1 (en) Network shunting method and relevant device
CN113099497B (en) Network switching method, storage medium and electronic equipment
WO2020164521A1 (en) Data packet distribution method and apparatus, and mobile terminal and storage medium
TWI678903B (en) Method for uplink data transmission, and terminal
CN111970738B (en) Network switching control method, device and computer readable storage medium
WO2020043059A1 (en) Method and apparatus for displaying service identifier and storage medium
CN108737378B (en) Dual-mode communication networking method and system based on medium access control layer
WO2016165088A1 (en) Traffic statistics collecting method, device and terminal device
WO2022105706A1 (en) Voice call quality determination method and apparatus
CN103856924B (en) PCC strategy achieving method and device

Legal Events

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

Ref document number: 18944626

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 08/11/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18944626

Country of ref document: EP

Kind code of ref document: A1