CN116347559B - Network access method and network access device of electronic equipment - Google Patents

Network access method and network access device of electronic equipment Download PDF

Info

Publication number
CN116347559B
CN116347559B CN202310084640.4A CN202310084640A CN116347559B CN 116347559 B CN116347559 B CN 116347559B CN 202310084640 A CN202310084640 A CN 202310084640A CN 116347559 B CN116347559 B CN 116347559B
Authority
CN
China
Prior art keywords
network
wifi
wifi network
electronic device
quality
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310084640.4A
Other languages
Chinese (zh)
Other versions
CN116347559A (en
Inventor
智钢
曹奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310084640.4A priority Critical patent/CN116347559B/en
Publication of CN116347559A publication Critical patent/CN116347559A/en
Application granted granted Critical
Publication of CN116347559B publication Critical patent/CN116347559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/02Access restriction performed under specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/02Access restriction performed under specific conditions
    • H04W48/06Access restriction performed under specific conditions based on traffic conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a network access method and a network access device of electronic equipment, which are suitable for the electronic equipment which is accessed to a cellular network. The method provided by the application comprises the following steps: the electronic equipment is accessed to a WiFi network; the electronic equipment communicates through the cellular network within a first duration after the electronic equipment is accessed to the WiFi network; after the first time period, the electronic device communicates over the WiFi network. The method is beneficial to reducing the probability of network blocking caused by unstable WiFi network quality of the electronic equipment.

Description

Network access method and network access device of electronic equipment
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a network access method and a network access device for an electronic device.
Background
Wireless connectivity (wireless fidelity, wiFi) is a technology that allows electronic devices to connect to a wireless local area network (wireless local area networks, WLAN). After the electronic equipment is connected with WiFi, wiFi quality is unstable, a phenomenon of network jamming often occurs, for example, a browser application cannot open a webpage, chat application receives chat information for a long time, video application plays video jamming and the like, and user experience is seriously affected.
Disclosure of Invention
The network access method and the network access device for the electronic equipment are beneficial to reducing the probability of network blocking caused by unstable WiFi network quality of the electronic equipment.
In a first aspect, a network access method of an electronic device is provided, applicable to an electronic device with an accessed cellular network, and the method includes: the electronic equipment is accessed to a WiFi network; the electronic equipment communicates through the cellular network within a first duration after the electronic equipment is accessed to the WiFi network; after the first time period, the electronic device communicates over the WiFi network.
The electronic device generally comprises a WiFi control, if the WiFi control is in an open state, the electronic device can search WiFi networks nearby the electronic device, and the electronic device can select any one of the WiFi networks to access based on the searched WiFi networks.
There are a number of possible implementations of the electronic device accessing the WiFi network.
In one possible implementation, the electronic device accesses the WiFi network in response to a user's operation to connect to the WiFi network. According to the implementation mode, the electronic equipment can be accessed to the WiFi network selected by the user, and the flexibility is higher.
In another possible implementation, the electronic device automatically accesses the previously connected WiFi network after searching for the WiFi network. According to the implementation mode, the electronic equipment is automatically accessed to the WiFi network, user selection is not needed, operation of a user is reduced, and user experience is improved.
The first duration may be 30 seconds or 33 seconds, etc., which is not limited in this application. And in a first time period after the electronic equipment is accessed to the WiFi network, the electronic equipment and the WiFi network are always in a connection state, but the electronic equipment communicates through the cellular network. The first duration may be referred to as a forced enablement time, that is, a duration in which the cellular network is forced to be used. In the first duration, the electronic equipment communicates through the cellular network no matter how the network quality of the WiFi network is, so that network blocking caused by unstable network quality of the WiFi network of the electronic equipment is avoided. After the first time, the electronic equipment communicates through the WiFi network, so that the requirement of a user for communication based on the WiFi network can be met.
According to the network access method of the electronic equipment, the network quality of the WiFi network does not need to be judged in the first time period after the electronic equipment is accessed to the WiFi network, the electronic equipment directly communicates through the cellular network no matter how the network quality of the WiFi network is, after the first time period, the electronic equipment is switched to the WiFi network from the cellular network, and the communication is carried out through the WiFi network, so that the probability of network blocking caused by unstable quality of the WiFi network of the electronic equipment is reduced.
With reference to the first aspect, in certain implementations of the first aspect, the network quality of the cellular network over the first duration satisfies a first condition, the first condition including a reference signal received power of the cellular network being less than or equal to a first threshold, and a number of times the channel quality of the cellular network is of a first level being less than or equal to a first number of times.
The first condition is used to represent an evaluation criterion for the network quality of the cellular network, and the electronic device may determine whether the network quality of the cellular network meets the first condition, and if the first condition is met, it may indicate that the network quality of the cellular network is good, and if the first condition is not met, it may indicate that the network quality of the cellular network is poor.
The electronic device may obtain, in real time or periodically, a reference signal received power of the cellular network and a channel quality of the cellular network, and determine whether the reference signal received power of the cellular network is less than or equal to a first threshold, and whether a number of times the channel quality of the cellular network is of a first level is less than or equal to a first number of times. If the reference signal received power of the cellular network is less than or equal to a first threshold and the number of times that the channel quality of the cellular network is of the first level is less than or equal to a first number of times, the electronic device may determine that the network quality of the cellular network meets a first condition; if the reference signal received power of the cellular network is greater than the first threshold and/or the number of times the channel quality of the cellular network is the first level is greater than the first number of times, the electronic device may determine that the network quality of the cellular network does not satisfy the first condition.
The first threshold is set by a developer, and may be 110 or 120, and the specific value of the first threshold is not limited in this application. The channel quality of the cellular network can also be understood as the air interface quality of the cellular network, which can be evaluated by means of an algorithm. The algorithm can comprehensively judge the grade of the channel quality based on a plurality of parameters of the cellular network. The channel quality may be classified into a poor, good, and excellent class, or a poor, good, and excellent class. The first level may be poor, but the present application is not limited thereto. The first number may be 3, 5, etc., and this is not a limitation of the present application. The electronic device may evaluate the channel quality of the cellular network in real time or periodically by an algorithm and count the number of occurrences of each level.
The electronic device may determine, during a first time period, whether a network quality of the cellular network satisfies a first condition, and if the first condition is satisfied, communicate through the cellular network.
According to the network access method of the electronic equipment, under the condition that the network quality of the cellular network meets the first condition, communication is conducted through the cellular network, so that the probability of network clamping caused by unstable WiFi network quality of the electronic equipment can be reduced through the cellular network.
With reference to the first aspect, in certain implementation manners of the first aspect, after the first period, the electronic device communicates through a WiFi network, including: at a first time within a second time period after the first time period, if the network quality of the WiFi network meets a second condition, the electronic device communicates through the WiFi network after the first time period, where the second condition includes: the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration.
The signal strength can be represented by how many signal cells are, the more the number of signal cells is, the stronger the signal strength is. For example, the signal bin number full bin may be 5 bins and the second threshold may be 3 bins. The channel quality of the WiFi network can also be understood as the air interface quality of the WiFi network, and the channel quality of the WiFi network can be evaluated through an algorithm. The algorithm can comprehensively judge the grade of the WiFi network based on a plurality of parameters of the WiFi network. The WiFi network may be classified into a poor, good, and excellent class, or a poor, good, and excellent class. The second level may be good, but the present application is not limited thereto. The third duration may be 10 seconds, 12 seconds, etc., which is not limited in this application. The electronic device may evaluate the channel quality of the cellular network in real time or periodically by an algorithm and count the number of occurrences of each level.
The electronic device may acquire the signal strength of the WiFi network and the channel quality of the WiFi network in real time or periodically, and determine whether the signal strength of the WiFi network is greater than or equal to a second threshold, and whether the duration of the channel quality of the WiFi network is of the second level is greater than or equal to a third duration. If the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration time when the channel quality of the WiFi network is at the second level is greater than or equal to the third duration time, the electronic device may determine that the network quality of the WiFi network meets the second condition; if the signal strength of the WiFi network is less than the second threshold, and/or the duration that the channel quality of the WiFi network is of the second level is less than the third duration, the electronic device may determine that the network quality of the WiFi network does not meet the second condition.
And in a second time length after the first time length, the electronic equipment can judge the network quality of the WiFi network, and if the network quality of the WiFi network meets a second condition, the electronic equipment can be switched from the cellular network to the WiFi network and communicate through the WiFi network.
According to the network access method of the electronic equipment, if the network quality of the WiFi network meets the second condition at the first moment in the second time after the first time, the electronic equipment can communicate through the WiFi network, so that the network smoothness is guaranteed, and the requirement of a user on using the WiFi network can be met.
With reference to the first aspect, in certain implementation manners of the first aspect, after the first period, the electronic device communicates through a WiFi network, including: at any time within a second time period after the first time period, if the network quality of the electronic device based on the WiFi network does not meet a second condition, the electronic device communicates through the WiFi network after the second time period, where the second condition includes: the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration.
The sum of the first time period and the second time period may be referred to as a maximum time period, the maximum time period being used to represent the maximum time period for the electronic device to communicate over the cellular network. The maximum duration may also be referred to as the maximum enabled duration, i.e. the maximum duration of using the cellular network.
After the first time period, before the maximum time period, the electronic device may periodically or in real time determine whether the network quality of the WiFi network meets the second condition, and if the network quality of the WiFi network does not meet the second condition in the second time period, the electronic device may communicate through the WiFi network after the second time period.
According to the network access method of the electronic equipment, if the network quality of the WiFi network does not meet the second condition all the time in the second time after the first time, the cellular network is switched to the WiFi network, communication is carried out through the WiFi network, and excessive consumption of data traffic is avoided.
With reference to the first aspect, in certain implementations of the first aspect, the electronic device communicates through a cellular network, including: the electronic equipment provides communication service for the first application program through the cellular network, the first application program is a preset application program, and/or an interface of the first application program is displayed on a foreground of the electronic equipment before the first time period or an interface of the first application program is displayed on the foreground of the electronic equipment within the first time period.
The electronic device may provide communication services only for the preset application through the cellular network. The electronic device may also provide communication services only for applications displayed in the foreground through the cellular network. The electronic device may also provide communication services for the preset application through the cellular network only when an interface of the preset application is displayed on the foreground.
The first application is used to refer to any one of the applications. The preset application may be preset by a developer. For example, the electronic device may save the preset application program to the white list, and the electronic device may determine whether the first application program is an application program in the white list. If the first application program is a preset application program, the electronic equipment provides communication service for the first application program through the cellular network. In this implementation, not all applications may use the cellular network, but only the preset applications may use the cellular network, which is advantageous in avoiding consuming excessive data traffic.
The interface of the first application is displayed in the foreground including two possible scenarios. One possible scenario is that the interface of the first application is displayed in the foreground of the electronic device before the first time period, and the second possible scenario is that the interface of the first application is displayed in the foreground of the electronic device for the first time period. The electronic equipment detects that an interface of the first application program is displayed on the foreground, and provides communication service for the first application program through the cellular network. According to the implementation mode, communication services are provided for the application programs displayed on the foreground only by using the cellular network, so that the user experience is considered while the excessive consumption of data traffic is avoided, and the user experience is improved.
The first application program is a preset application program, an interface of the first application program is displayed on a foreground of the electronic equipment, and the electronic equipment provides communication service for the first application program through a cellular network. The implementation method is beneficial to further avoiding excessive consumption of data traffic and improving user experience.
With reference to the first aspect, in certain implementations of the first aspect, the first application is an application whose data traffic consumption is less than or equal to a third threshold and/or whose frequency of use is greater than or equal to a fourth threshold.
The third threshold and the fourth threshold may be calibrated by a developer through a plurality of experiments, which are not particularly limited in this application.
If the first application is an application whose data traffic consumption is less than or equal to the third threshold, it is advantageous to avoid consuming too much data traffic. If the first application program is an application program with the use frequency being greater than or equal to the fourth threshold value, the use experience of the user is improved. If the first application program is an application program with the data traffic consumption less than or equal to the third threshold value and the usage frequency greater than or equal to the fourth threshold value, the method is beneficial to avoiding excessive consumption of data traffic and improving the usage experience of users.
With reference to the first aspect, in certain implementations of the first aspect, the type of WiFi network is an enterprise network type, an authentication (protein) network type, or an open network type.
The applicant finds that the quality of the WiFi network is often unstable in a specific type of WiFi network, so that a developer can preset the specific type as a preset type in an electronic device, the electronic device can determine whether the accessed WiFi network is a preset type network, if yes, the communication is performed through the cellular network, and if not, the communication is performed through the WiFi network.
The enterprise network type is used to indicate the network used by the company, factory, or enterprise. Authentication (protal) networks are used to indicate networks that require authentication or require password login. The open network type is used to refer to a network that does not require authentication or password login.
The enterprise network type, the authentication (total) network type, or the open network type may be referred to as a preset type. After the electronic equipment is connected to the WiFi network, whether the type of the WiFi network is an enterprise network type, a precursor network type or an open network type can be judged based on the encryption type of the WiFi network, namely whether the type of the WiFi network is a preset type is judged, and if the type is the preset type, the electronic equipment can communicate through the cellular network.
According to the network access method of the electronic equipment, communication can be carried out through the cellular network under the condition that the type of the WiFi network is the enterprise network type, the precursor network type or the open network type, unnecessary network switching is avoided, and the probability of network instability is reduced.
In a second aspect, there is provided a network access device, the device comprising: an access module and a communication module. Wherein, the access module is used for: accessing a WiFi network; the communication module is used for: communication is carried out through the cellular network within a first duration after the WiFi network is accessed; after a first time period, communication is conducted over a WiFi network.
With reference to the second aspect, in some implementations of the second aspect, the network quality of the cellular network within the first time period satisfies a first condition, the first condition includes a reference signal received power of the cellular network being less than or equal to a first threshold, and a number of times the channel quality of the cellular network is of a first level being less than or equal to a first number of times.
With reference to the second aspect, in certain implementations of the second aspect, the communication module is configured to: at a first time within a second time period after the first time period, if the network quality of the WiFi network meets a second condition, communicating through the WiFi network after the first time period, where the second condition includes: the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration.
With reference to the second aspect, in certain implementations of the second aspect, the communication module is configured to: and at any time within a second time period after the first time period, if the network quality based on the WiFi network does not meet a second condition, communicating through the WiFi network after the second time period, wherein the second condition comprises: the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration.
With reference to the second aspect, in certain implementations of the second aspect, the communication module is configured to: communication service is provided for the first application program through the cellular network, the first application program is a preset application program, and/or a foreground where an interface of the first application program is displayed before the first time period or a foreground where an interface of the first application program is displayed in the first time period.
With reference to the second aspect, in certain implementations of the second aspect, the first application is an application whose data traffic consumption is less than or equal to a third threshold and/or whose frequency of use is greater than or equal to a fourth threshold.
With reference to the second aspect, in some implementations of the second aspect, the type of WiFi network is an enterprise network type, a protein network type, or an open network type.
In a third aspect, the present application provides a network access device, comprising: a processor and a memory; the memory stores computer-executable instructions; the processor executes computer-executable instructions stored in the memory to cause the network access to perform the method as described in the first aspect.
In a fourth aspect, the present application provides an electronic device operable to perform the method as described in the first aspect.
In a fifth aspect, the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as described in the first aspect.
In a sixth aspect, the present application provides a computer program product comprising a computer program which, when run, causes a computer to perform the method as described in the first aspect.
In a seventh aspect, the present application provides a chip comprising a processor for invoking a computer program in memory to perform the method according to the first aspect.
It should be understood that, the second aspect to the seventh aspect of the present application correspond to the technical solutions of the first aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding possible embodiments are similar, and are not repeated.
Drawings
FIG. 1 is a block diagram of a software architecture of an electronic device suitable for use with embodiments of the present application;
fig. 2 is a schematic flowchart of a network access method of an electronic device according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a network communication method provided in an embodiment of the present application;
FIG. 4 is a schematic flow chart of another network access method of an electronic device provided in an embodiment of the present application;
FIG. 5 is a schematic flow chart diagram of a network access method of yet another electronic device provided in an embodiment of the present application;
FIG. 6 is a schematic flow chart diagram of another network access method for an electronic device provided in an embodiment of the present application;
fig. 7 is a schematic flowchart of a network access method of another electronic device provided in an embodiment of the present application;
fig. 8 is a schematic block diagram of a network access device provided in an embodiment of the present application;
fig. 9 is a schematic block diagram of another network access device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described below with reference to the accompanying drawings.
Currently, electronic devices may support connections to cellular networks and/or WiFi networks. When the electronic device connects to both the cellular network and the WiFi network, the electronic device may preferentially use the WiFi network to save data traffic. However, the applicant finds that when the electronic device just accesses the WiFi network, the network quality of the WiFi network is unstable, and a phenomenon of network jamming occurs, for example, a browser application cannot open a web page, a chat application receives chat information for a long time, and a video application plays video jamming, which seriously affects user experience.
When the electronic equipment is connected with the cellular network and the WiFi network at the same time, if the network quality of the WiFi network is poor, the electronic equipment can communicate through the cellular network, and if the network quality of the WiFi network is good, the electronic equipment can communicate through the WiFi network. When the electronic equipment is just accessed to the WiFi network, the network quality of the WiFi network is unstable, namely, the network quality is good, when the network quality of the WiFi is poor, the electronic equipment is switched from the WiFi network to the cellular network, when the network quality of the WiFi is good, the electronic equipment is switched from the cellular network to the WiFi network, the situation that the electronic equipment is frequently switched when the electronic equipment is just accessed to the WiFi network can be caused, and the power consumption of the electronic equipment is increased.
In view of this, the embodiment of the application provides a network access method and a network access device for an electronic device, in a first period of time after the electronic device is accessed to a WiFi network, the network quality of the WiFi network does not need to be judged, the electronic device directly communicates through a cellular network no matter how the network quality of the WiFi network is, after the first period of time, the electronic device is switched from the cellular network to the WiFi network, and communicates through the WiFi network, which is favorable for reducing the probability of network blocking caused by unstable WiFi network quality of the electronic device, and can also avoid the situation that the electronic device frequently switches networks when the electronic device is just accessed to the WiFi.
In order to better understand the embodiments of the present application, first, an electronic device provided in the embodiments of the present application is described.
The electronic device may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), etc. The terminal device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving function, a Virtual Reality (VR) terminal device, an augmented reality (augmented reality, AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), or the like.
The method provided by the embodiment of the application can be applied to any electronic equipment supporting simultaneous connection of the cellular network and the WiFi network. For example, wearable terminal devices such as a mobile phone, a tablet PC, a personal computer (personal computer, PC), and a smart watch may be various teaching aids (e.g., learning machine, early education machine), smart toys, portable robots, personal digital assistants (personal digital assistant, PDA), augmented reality (augmented reality, AR) devices, virtual Reality (VR) devices, etc., devices with mobile office functions, devices with smart home functions, devices with video and audio entertainment functions, devices supporting smart travel, etc. It should be understood that embodiments of the present application are not limited to the specific technology and specific device configurations employed by the electronic device.
The software system of the electronic device may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of an electronic device is illustrated.
Fig. 1 is a software architecture block diagram of an electronic device suitable for use in an embodiment of the present application. The layered architecture divides the software system of the electronic device into several layers, each of which has a distinct role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the Android system may be divided into five layers, an application layer (applications), an application framework layer (application framework), an Zhuoyun rows (Android run) and system libraries, a hardware abstraction layer (hardware abstract layer, HAL), and a kernel layer (kernel), respectively.
The application layer may include a series of application packages that run applications by calling an application program interface (application programming interface, API) provided by the application framework layer. As shown in fig. 1, the application package may include a camera, gallery, calendar, conversation, map, and the like.
The application framework layer provides APIs and programming frameworks for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in fig. 1, the application framework layer may include a perception module, a decision module, and an execution module. The sensing module can be used for detecting whether the electronic equipment is connected with the WiFi network, detecting whether a foreground of the electronic equipment is a preset application program, detecting the using duration of the electronic equipment using the cellular network, and detecting cellular data and WiFi data so as to facilitate decision making by the decision making module. The decision module may determine the network quality of the cellular network and the network quality of the WiFi network based on the cellular data and the WiFi data detected by the awareness module, and may determine the type of the WiFi network based on the encryption type of the WiFi network, so as to determine the network (cellular network or WiFi network) currently used by the electronic device based on the network quality of the cellular network, the network quality of the WiFi, and the type of the WiFi network. The decision module may determine whether a maximum usage duration of the cellular network is reached based on the usage duration of the cellular network detected by the sensing module for the electronic device to use, to determine whether to switch from the cellular network to the WiFi network. The execution module is used for using a cellular network or a WiFi network based on the decision of the decision module.
The android runtime includes a core library and virtual machines. And the android running time is responsible for scheduling and managing an android system. The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like. The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), and three-dimensional graphics processing Libraries (e.g., openGL ES), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio video encoding formats, such as: MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc. The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The hardware abstraction layer may include a plurality of library modules, for example, a camera library module, a sensor library module, and the like. The Android system can load a corresponding library module for the equipment hardware, so that the purpose of accessing the equipment hardware by an application program framework layer is achieved. The device hardware may include cameras and sensors, etc., as in electronic devices.
The kernel layer is a layer between hardware and software. The kernel layer is used for driving the hardware so that the hardware works. The kernel layer at least includes a display driver, a camera driver, an audio driver, and the like, which is not limited in this embodiment of the present application.
In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be implemented independently or combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
By way of example, fig. 2 shows a schematic flow chart of a network access method 200 of an electronic device. As shown in fig. 2, the method 200 may be performed by an electronic device, such as a cell phone, that accesses a cellular network. The software architecture of the electronic device may be as shown in fig. 1, but the embodiments of the present application are not limited thereto.
As shown in fig. 2, the method 200 may include the steps of:
s201, the electronic equipment is accessed to a WiFi network.
The electronic device generally comprises a WiFi control, if the WiFi control is in an open state, the electronic device can search WiFi networks nearby the electronic device, and the electronic device can select any one of the WiFi networks to access based on the searched WiFi networks.
There are a number of possible implementations of the electronic device accessing the WiFi network.
In one possible implementation, the electronic device accesses the WiFi network in response to a user's operation to connect to the WiFi network. According to the implementation mode, the electronic equipment can be accessed to the WiFi network selected by the user, and the flexibility is higher.
In another possible implementation, the electronic device automatically accesses the previously connected WiFi network after searching for the WiFi network. According to the implementation mode, the electronic equipment is automatically accessed to the WiFi network, user selection is not needed, operation of a user is reduced, and user experience is improved.
There are many different scenarios in which an electronic device accesses a WiFi network, in one example, the electronic device has accessed a WiFi 1 network within a WiFi 1 network range before entering the WiFi2 network range, and when entering the WiFi2 network range, the electronic device switches from accessing the WiFi 1 network to accessing the WiFi2 network. In another example, the electronic device is not connected to any WiFi 1 network before entering the WiFi2 network range, and when entering the WiFi2 network range, the electronic device is connected to the WiFi2 network, and the specific scenario of the electronic device connected to the WiFi network is not limited in the embodiment of the present application.
S202, the electronic device judges whether the type of the WiFi network is a preset type.
The applicant finds that when not all the WiFi networks are just accessed by the electronic device, the quality of the WiFi network is unstable, and if the quality of the WiFi network is stable, the method of the application may not be used. The applicant also found that the quality of the WiFi network of the specific type is often unstable, so that a developer can preset the specific type as a preset type in the electronic device, the electronic device can determine whether the accessed WiFi network is a preset type network, if yes, the method of the application is used, and if not, the method of the application is not used.
After the electronic equipment is accessed to the WiFi network, the type of the WiFi network can be determined based on the encryption type of the WiFi network, and whether the type of the WiFi network is a preset type or not is further judged. The preset type is preset in the electronic equipment by a developer.
If the type of the WiFi network is the preset type, the electronic equipment executes the subsequent steps, and if the type of the WiFi network is not the preset type, the electronic equipment does not execute the subsequent steps and can communicate through the accessed WiFi network.
According to the implementation method, whether the method is used or not can be judged based on the type of the accessed WiFi network, not all WiFi networks use the method, unnecessary network switching is avoided, and the probability of network instability is reduced.
It should be noted that S202 is optional, and the electronic device may also use the method provided by the embodiment of the present application for all WiFi networks, so as to ensure that the networks do not get stuck, which is beneficial to improving user experience.
Alternatively, the preset types may include at least one of an enterprise network type, a precursor network type, or an open network type. Wherein an open network type network refers to a network without any encryption password.
The applicant finds that the WiFi network of the enterprise network type, the precursor network type or the open network type often has unstable WiFi network quality, so when the electronic device identifies that the type of the accessed WiFi network is the enterprise network type, the precursor network type or the open network type, the electronic device can execute the method provided by the embodiment of the present application.
And S203, if the type of the WiFi network is a preset type, the electronic equipment judges whether the network quality of the cellular network meets a first condition.
The first condition is used for indicating an evaluation criterion for the network quality of the cellular network, if the type of the WiFi network is a preset type, the electronic device may determine whether the network quality of the cellular network meets the first condition, if the first condition is met, the network quality of the cellular network may be indicated to be good, and if the first condition is not met, the network quality of the cellular network may be indicated to be poor.
If the network quality of the cellular network meets the first condition, the electronic device may communicate through the cellular network, i.e. S204 is performed, so as to avoid network jamming caused by unstable WiFi network. If the network quality of the cellular network does not meet the first condition, the electronic device may continue to communicate through the WiFi network without using the method provided by the embodiments of the present application.
Optionally, the first condition may include a reference signal received power (reference signal receiving power, RSRP) of the cellular network being greater than or equal to a first threshold and a number of times the channel quality of the cellular network is of a first level being less than or equal to a first number of times.
The first threshold is set by a developer, and may be 110 or 120, and specific values of the first threshold are not limited in the embodiment of the present application. The channel quality of the cellular network can also be understood as the air interface quality of the cellular network, which can be evaluated by means of an algorithm. The algorithm can comprehensively judge the grade of the channel quality based on a plurality of parameters of the cellular network. The channel quality may be classified into a poor, good, and excellent class, or a poor, good, and excellent class. The first level may be poor, but embodiments of the present application are not limited thereto. The first number may be 3 times, 5 times, etc., which is not limited in the embodiments of the present application. The electronic device may evaluate the channel quality of the cellular network in real time or periodically by an algorithm and count the number of occurrences of each level.
If the RSRP of the cellular network is greater than or equal to the first threshold and the number of times the channel quality of the cellular network is the first level is less than or equal to the first number of times, the network quality of the cellular network satisfies the first condition. If the RSRP of the cellular network is less than the first threshold and/or the number of times the channel quality of the cellular network is of the first level is greater than the first number, the network quality of the cellular network does not meet the first condition.
S204, if the network quality of the cellular network meets the first condition, the electronic equipment can communicate through the cellular network.
If the type of the WiFi network is a preset type, the electronic equipment can communicate through the cellular network, so that network blocking caused by unstable WiFi network is avoided. Before communication through the cellular network, the electronic device may perform S203 described above, determine whether the network quality of the cellular network satisfies the first condition, and in the case where the first condition is satisfied, perform communication through the cellular network, so as to be beneficial to ensure that the problem of network blocking caused by the instability of the WiFi network can be solved through the cellular network, that is, S203 described above is optional.
S205, the electronic equipment judges whether the communication duration of the cellular network reaches a first duration.
The cellular network communication duration is used to represent the duration of use of the cellular network by the electronic device. After the electronic device communicates through the cellular network, the communication duration of the cellular network may be recorded, and whether the communication duration of the cellular network reaches the first duration may be determined. The first duration may be 30 seconds or 33 seconds, or the like, which is not limited in the embodiment of the present application.
If the communication duration of the cellular network does not reach the first duration, the electronic device may continue to communicate through the cellular network until the communication duration of the cellular network reaches the first duration, so the first duration may also be referred to as a forced enabling time, that is, a duration during which the cellular network is forced to be used. If the communication duration of the cellular network reaches the first duration, the electronic device may perform subsequent steps.
It will be appreciated that the electronic device accesses the WiFi network and can communicate over the cellular network under the following conditions: and within a first duration after the WiFi network is accessed, the type of the WiFi network is a preset type, and the network quality of the cellular network meets a first condition. The type of the WiFi network is a preset type, and the network quality of the cellular network meets the first condition.
It should be noted that, in the first period after the WiFi network is accessed, the electronic device may record the network quality of the WiFi network, or may not record the network quality of the WiFi network, which is not limited in the embodiment of the present application. If the electronic device records the network quality of the WiFi network within the first time period after the WiFi network is accessed, the electronic device does not need to determine whether the network quality of the WiFi network meets the first condition.
The electronic device may also periodically or in real time determine whether the network quality of the cellular network satisfies the first condition within a first time period after accessing the WiFi network. If the network quality of the cellular network is degraded, that is, if the network quality of the cellular network does not meet the first condition, the electronic device may switch from the cellular network to the WiFi network, and communicate through the WiFi network.
And S206, if the communication duration of the cellular network reaches the first duration, the electronic equipment can judge whether the network quality of the WiFi network meets the second condition.
After a first time period after accessing the WiFi network, the electronic device may periodically or in real time obtain a network quality of the WiFi network, and determine whether to communicate through the WiFi network based on the network quality of the WiFi network.
The second condition is used for indicating an evaluation criterion for the network quality of the WiFi network, if the network quality of the WiFi network meets the second condition, it can be indicated that the network quality of the WiFi network is good, and if the network quality of the WiFi network does not meet the second condition, it can be indicated that the network quality of the WiFi network is poor.
If the network quality of the WiFi network meets the second condition, the electronic device may communicate through the WiFi network, i.e. execute S208, to avoid consuming excessive data traffic. If the network quality of the WiFi network does not meet the second condition, the electronic device may continue to communicate through the cellular network, and may determine whether the communication duration of the cellular network reaches the maximum duration, i.e. execute S207.
Optionally, the second condition may include: the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration.
The signal strength can be represented by how many signal cells are, the more the number of signal cells is, the stronger the signal strength is. For example, the signal bin number full bin may be 5 bins and the second threshold may be 3 bins. The channel quality of the WiFi network can also be understood as the air interface quality of the WiFi network, and the channel quality of the WiFi network can be evaluated through an algorithm. The algorithm can comprehensively judge the grade of the WiFi network based on a plurality of parameters of the WiFi network. The WiFi network may be classified into a poor, good, and excellent class, or may be classified into a poor, good, and excellent class, and the channel quality class is not specifically limited in the embodiment of the present application. The second level may be good, but embodiments of the present application are not limited thereto. The third duration may be 10 seconds, 12 seconds, etc., which is not limited in this embodiment of the present application. The electronic device may evaluate the channel quality of the cellular network in real time or periodically by an algorithm and count the number of occurrences of each level.
If the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration time when the channel quality of the WiFi network is of the second level is greater than or equal to the third duration time, the network quality of the WiFi network meets the second condition. If the signal strength of the WiFi network is less than the second threshold, and/or the duration of the channel quality of the WiFi network is the second level is less than the third duration, the network quality of the WiFi network does not meet the second condition.
S207, if the network quality of the WiFi network does not meet the second condition, the electronic equipment judges whether the communication duration of the cellular network reaches the maximum duration.
The maximum duration is used to represent a maximum duration for the electronic device to communicate over the cellular network, the maximum duration being greater than the first duration. For example, the first duration is 30 seconds, the maximum duration may be 120 seconds, and the specific length of the maximum duration is not limited in the embodiments of the present application.
The maximum duration may also be referred to as a maximum enabled duration, and if the communication duration of the cellular network reaches the maximum duration, the electronic device may switch from the cellular network to the WiFi network, and communicate through the WiFi network. If the communication duration of the cellular network does not reach the maximum duration, the electronic device may continue to communicate through the cellular network, and periodically or in real time determine whether the network quality of the WiFi network meets the second condition, i.e. execute S206 described above.
And S208, if the network quality of the WiFi network meets a second condition or the communication duration of the cellular network reaches the maximum duration, the electronic equipment can communicate through the WiFi network.
After the first period, before the maximum period, the electronic device may periodically or in real time determine whether the network quality of the WiFi network satisfies the second condition, and in the case that the network quality of the WiFi network satisfies the second condition, switch from the cellular network to the WiFi network, and perform communication through the WiFi network. After the maximum duration, the electronic device communicates through the WiFi network whether the network quality of the WiFi network satisfies the second condition.
The time length difference between the maximum time length and the first time length may be the second time length, and after the first time length, a time before the maximum time length may also be referred to as a time within the second time length after the first time length. If the network quality of the WiFi network meets the second condition at a first time within a second time period after the first time period, the electronic equipment communicates through the WiFi network after the first time period. If the network quality of the electronic device based on the WiFi network does not meet the second condition at any time within the second time after the first time, the electronic device communicates through the WiFi network after the second time.
It will be appreciated that after the electronic device communicates over the cellular network, the electronic device may switch from the cellular network to the WiFi network, communicating over the WiFi network, if: after the first time period, the network quality of the WiFi network meets a second condition; or after the maximum duration, wherein the network quality of the WiFi network does not meet the second condition between the first duration and the maximum duration. The network quality of the WiFi network is optional, that is, the step S206 is optional, and after the communication duration of the cellular network reaches the first duration, the electronic device may directly communicate through the WiFi network.
According to the network access method of the electronic equipment, the network quality of the WiFi network does not need to be judged in the first time period after the electronic equipment is accessed to the WiFi network, no matter what the network quality of the WiFi network is, if the network quality of the cellular network meets the first condition, the electronic equipment directly communicates through the cellular network, after the first time period, if the network quality of the WiFi network meets the second condition, the cellular network is switched to the WiFi network, and communication is carried out through the WiFi network, so that the probability of network blocking caused by unstable WiFi network quality of the electronic equipment is reduced. In addition, if the WiFi network does not meet the second condition until the maximum time after the first time, the electronic device forces to switch from the cellular network to the WiFi network, which is beneficial to avoiding consuming excessive data traffic.
The electronic device communicates over a cellular network or over a WiFi network, that is, when an application or process running on the electronic device applies for a network, the electronic device may provide communication services to it over the cellular network or WiFi network.
To save data traffic of the cellular network, the electronic device may only provide communication services for the preset application through the cellular network. The electronic device may also provide communication services for the preset application through the cellular network only when the interface of the preset application is displayed on the foreground, which is beneficial to further saving the data traffic of the cellular network. The electronic device can only provide communication service for the application program displayed in the foreground, so that the data flow of the cellular network is saved, and the user experience is improved.
Illustratively, fig. 3 shows a schematic flow chart of a network communication method. As shown in fig. 3, if the network quality of the cellular network satisfies the first condition in S204, the electronic device may communicate through the cellular network, and may include the following steps:
s301, the electronic device judges whether an interface of a first application program is displayed on the foreground.
The foreground of the electronic device is used to refer to a display interface of the electronic device. The electronic device determines whether an interface of the first application program is displayed on the foreground. The first application is used to refer to any one of the applications.
The electronic device accesses to the WiFi network, the type of the WiFi network is a preset type, and the network quality of the cellular network meets the first condition, the electronic device may determine whether the foreground displays an interface of the first application program, if the foreground displays an interface of the first application program, the electronic device may determine whether the first application program is a preset application program, that is, execute S303. If the foreground does not display the interface of the first application, the electronic device may periodically or in real time detect whether the foreground displays the interface of the first application in the first duration, that is, execute S302.
And S302, if the foreground does not display the interface of the first application program, the electronic equipment detects whether the foreground displays the interface of the first application program in the first time period.
The first application is used to refer to any application, that is, the electronic device detects whether the foreground displays an interface of the application in a first duration.
S303, if the foreground displays the interface of the first application program or detects that the foreground displays the interface of the first application program within the first duration, the electronic device may determine whether the first application program is a preset application program.
If the foreground displays the interface of the first application program, the interface of the first application program may be opened before the electronic device accesses the WiFi network, that is, the interface of the first application program is displayed in the foreground of the electronic device before the first time. If the interface of the first application program is detected to be displayed on the foreground in the first duration, the first application program is opened after the electronic device is accessed to the WiFi network, that is, the interface of the first application program is displayed on the foreground of the electronic device in the first duration.
The preset application may be preset by a developer. For example, the electronic device may save the preset application program to the white list, and the electronic device may determine whether the first application program is an application program in the white list.
If the first application is a preset application, the electronic device may support the application flow of the first application using the cellular network, that is, execute S304. If the first application is not the preset application, the electronic device may not execute the method provided in the embodiments of the present application.
S304, if the first application program is a preset application program, the electronic device can support the application flow of the first application program by using the cellular network.
For example, if the interface of the first application is displayed in the foreground of the electronic device before the first time period, the electronic device accesses the cellular network before the first time period, and a link exists between the cellular network and the application flow of the first application. After the electronic device accesses the WiFi network, if the first application is a preset application within the first period, the electronic device may not trigger a device mode (DeviceMode) of the WiFi network, so that an application flow of the first application is maintained in the cellular network.
In an exemplary embodiment, if the interface of the first application is displayed on the foreground of the electronic device within the first duration, the electronic device may have access to the WiFi network, and the electronic device may not trigger the DeviceMode of the WiFi network, so that the application flow of the first application is forcedly bound to the cellular network.
It should be noted that, the electronic device may support the application flow of the first application program using the cellular network under the following conditions: the first application program is a preset application program, and/or an interface of the first application program is displayed on a foreground of the electronic device before a first time period or an interface of the first application program is displayed on the foreground of the electronic device within the first time period.
In this implementation, not all applications communicate through the cellular network, but only the preset application displayed in the foreground communicates through the cellular network, which is beneficial to saving the data traffic of the cellular network.
If the electronic device is switched from the cellular network to the WiFi network, communication is performed through the WiFi network, that is, when an application or a process running on the electronic device applies for the network, the electronic device may be switched from the cellular network to the WiFi network, and a communication service is provided for the electronic device through the WiFi network.
After the first period of time, if the network quality of the WiFi network meets the second condition, the electronic device may reestablish a link between the application flow of the first application program and the WiFi network. If the network quality of the WiFi network after the first period of time meets the second condition, and the second application program is detected to be displayed on the foreground, and the second application program is a preset application program, the electronic device may directly establish a link between the application flow of the first application program and the WiFi network, that is, trigger a DeviceMode of the WiFi network, so that the application flow of the first application program is bound to the WiFi network. Wherein the second application is different from the first application.
As an alternative embodiment, the preset application program referred to in the above embodiment may be an application program whose data traffic consumption is less than or equal to the third threshold value, and/or whose usage frequency is greater than or equal to the fourth threshold value.
In one example, a developer may count data traffic consumption and/or usage frequency of various applications, and may set an application whose usage frequency is greater than or equal to a third threshold value as a preset application.
By the implementation mode, the electronic equipment does not need statistics, and the computing power of the electronic equipment can be saved.
In another example, the electronic device may count data traffic consumption and/or frequency of use for various applications, may add applications with data traffic consumption less than or equal to a third threshold and/or with frequency of use greater than or equal to a fourth threshold to the whitelist.
According to the implementation mode, the electronic equipment can flexibly change the preset application program according to the actual requirement of the user, and the flexibility is higher.
The third threshold and the fourth threshold may be calibrated by a developer through a plurality of experiments, which are not specifically limited in the embodiments of the present application.
It can be understood that, if the first application is a preset application, the first application is an application whose data traffic consumption is less than or equal to the third threshold and/or whose frequency of use is greater than or equal to the fourth threshold.
The network access method of the electronic device provided in the embodiment of the present application may be performed by the electronic device in fig. 1, and in particular, the method provided in the embodiment of the present application may be performed by a sensing module, a decision module, and an execution module of the electronic device.
Illustratively, fig. 4 shows a schematic flow chart of a network access method 400 of an electronic device. As shown in fig. 4, the method 400 may include the steps of:
s401, the sensing module detects that the cellular network is accessed.
S402, the sensing module may detect the cellular data and send the cellular data to the decision module, so that the decision module determines the cellular quality based on the cellular data, and the decision module receives the cellular data.
The cellular data may include reference signal received power of the cellular network and channel quality of the cellular network. The sensing module may detect the cellular data in real time or periodically and send the cellular data to the decision module.
S403, the sensing module detects that the WiFi network is accessed.
S404, the sensing module can send indication information for judging the WiFi network type to the decision module, and correspondingly, the decision module receives the indication information for judging the WiFi network type.
The indication information for judging the WiFi network type is used for indicating the decision module to judge whether the WiFi network type is a preset type or not.
S405, the decision module detects that the type of the WiFi network is a preset type based on the indication information for judging the type of the WiFi network.
The decision module can determine whether the type of the WiFi network is a preset type based on the indication information for determining the type of the WiFi network, and if the type of the WiFi network is the preset type, the electronic device can detect that the type of the WiFi network is the preset type.
S406, the decision module sends indication information for detecting the WiFi data to the sensing module, and correspondingly, the sensing module receives the indication information for detecting the WiFi data. The indication information for detecting the WiFi data is used for indicating the sensing module to detect the WiFi data, so that the decision module can judge the network quality of the WiFi network based on the WiFi data.
S407, the sensing module detects WiFi data based on the indication information of the WiFi data.
The WiFi data may include a signal strength of the WiFi network and a channel quality of the WiFi network. The sensing module may detect the WiFi data in real time or periodically and send the WiFi data to the decision module.
S408, the sensing module sends WiFi data to the decision module, and correspondingly, the decision module receives the WiFi data.
S406 to S408 are optional, and the decision module may also instruct the sensing module to detect WiFi data before determining the network quality of the WiFi network. Before judging the network quality of the WiFi network, the embodiment of the present application does not specifically limit the specific time for the decision module to instruct the sensing module to detect the WiFi data.
S409, the sensing module detects that the first application program displayed by the foreground is a preset application program.
The sensing module can detect whether the first application program displayed in the foreground is a preset application program in real time or periodically after detecting that the WiFi network is accessed, and when the first application program displayed in the foreground is the preset application program, the sensing module can detect that the first application program displayed in the foreground is the preset application program.
S410, the perception module sends information including the first application program as a preset application program to the decision module, and correspondingly, the decision module receives the information including the first application program as the preset application program. The information including that the first application program is a preset application program is used for indicating that the first application program is the preset application program.
S411, the decision module determines that the network quality of the cellular network meets a first condition based on the cellular data in a first time period based on the information including the first application program as a preset application program.
The type of the WiFi network is a preset type, the decision module may determine, based on the acquired cellular data, whether the reference signal received power of the cellular network is less than or equal to a first threshold, and whether the number of times that the channel quality of the cellular network is at a first level is less than or equal to a first number of times, and if the reference signal received power of the cellular network is less than or equal to the first threshold, and the number of times that the channel quality of the cellular network is at the first level is less than or equal to the first number of times, the decision module may determine that the network quality of the cellular network meets a first condition. If the network quality of the cellular network meets the first condition and the first application program displayed by the foreground is a preset application program, the decision module can determine to communicate through the cellular network.
Note that the embodiment of the present application does not limit the execution sequence of S409 and S411 described above.
And S412, the decision module sends the indication information of using the cellular network to the execution module, and correspondingly, the execution module receives the indication information of using the cellular network. Wherein the indication information of the cellular network is used for indicating communication through the cellular network.
S413, the execution module supports the application flow of the first application program using the cellular network based on the instruction information of using the cellular network.
According to the network access method of the electronic equipment, in the first time period after the sensing module detects that the WiFi network is accessed, the network quality of the WiFi network does not need to be judged, no matter how the network quality of the WiFi network is, if the type of the WiFi network is the preset type, the first application program displayed by the foreground is the preset application program, and the network quality of the cellular network meets the first condition, the electronic equipment directly uses the cellular network to support the application flow of the first application program, and therefore the probability of network blocking caused by unstable WiFi network quality of the electronic equipment is reduced.
The decision module may determine to communicate over the WiFi network if the network quality of the cellular network does not meet the first condition for a first period of time.
By way of example, fig. 5 shows a schematic flow chart of a network access method 500 of an electronic device. As shown in fig. 5, the method 500 may further include the steps of:
s501, determining that the network quality of the cellular network does not meet a first condition by the decision module based on the cellular data in a first duration.
The type of the WiFi network is a preset type, the decision module may determine, based on the acquired cellular data, whether the reference signal received power of the cellular network is less than or equal to a first threshold, and whether the number of times that the channel quality of the cellular network is at a first level is less than or equal to a first number of times, and if the reference signal received power of the cellular network is greater than the first threshold, and/or the number of times that the channel quality of the cellular network is at the first level is greater than the first number of times, the decision module may determine that the network quality of the cellular network does not satisfy the first condition. The decision module may determine to communicate over the WiFi network if the network quality of the cellular network does not meet the first condition.
S502, the decision module can send indication information for stopping detecting the WiFi data to the sensing module, and correspondingly, the sensing module receives the indication information for stopping detecting the WiFi data. The indication information for stopping detecting the WiFi data is used for indicating the sensing module to stop detecting the WiFi data.
S503, the sensing module stops detecting the WiFi data based on the indication information of stopping detecting the WiFi data.
If the sensing module is not detecting WiFi data, S502 and S503 are optional, that is, the decision module and the sensing module do not perform S406 to S408, and S502 and S503 are not needed.
S504, the decision module sends indication information of using the WiFi network to the execution module, and correspondingly, the execution module receives the indication information of using the WiFi network. The indication information of the WiFi network is used for indicating the decision module to communicate through the WiFi network.
S505, the execution module may support an application flow of the first application program using the WiFi network based on the indication information using the WiFi network.
And in a second time period after the first time period, if the network quality of the WiFi network meets a second condition, the decision module can determine to communicate through the WiFi network.
Illustratively, fig. 6 shows a schematic flow chart of a network access method 600 of an electronic device. As shown in fig. 6, the method 600 may further include the steps of:
s601, detecting that a first time length arrives by a sensing module.
S602, the sensing module can send the indication information for detecting the network quality of the WiFi network to the decision module, and correspondingly, the decision module receives the indication information for detecting the network quality of the WiFi network. The indication information for detecting the network quality of the WiFi network is used for indicating the decision module to detect the network quality of the WiFi network.
And S603, the decision module determines that the network quality of the WiFi network meets the second condition based on the WiFi data based on the indication information of the network quality of the WiFi network.
If the above-mentioned S406 to S408 are not performed, the sensing module and the executing module may be performed before S603.
The WiFi data may include a signal strength of the WiFi network and a channel quality of the WiFi network. The decision module may determine whether the signal strength of the WiFi network is greater than or equal to a second threshold, and determine whether a duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to a third duration. If the signal strength of the WiFi network is greater than or equal to the second threshold, and the duration time when the channel quality of the WiFi network is at the second level is greater than or equal to the third duration time, the decision module may determine that the network quality of the WiFi network meets the second condition.
And S604, the decision module can send indication information for stopping detecting the WiFi data to the sensing module, and correspondingly, the sensing module receives the indication information for stopping detecting the WiFi data. The indication information for stopping detecting the WiFi data is used for indicating the sensing module to stop detecting the WiFi data.
And S605, the sensing module stops detecting the WiFi data based on the indication information of stopping detecting the WiFi data.
And S606, the decision module sends the indication information of using the WiFi network to the execution module, and correspondingly, the execution module receives the indication information of using the WiFi network. The indication information of the WiFi network is used for indicating the decision module to communicate through the WiFi network.
S607, the execution module may support an application flow of the first application program using the WiFi network based on the indication information using the WiFi network.
If the network quality of the WiFi network does not meet the second condition at any time within the second time period after the first time period, the decision module may determine to communicate through the WiFi network.
Illustratively, fig. 7 shows a schematic flow chart of a network access method 700 of an electronic device. As shown in fig. 7, the method 700 may further include the steps of:
and S701, at any time in a second time period after the first time period, the decision module determines that the network quality of the WiFi network does not meet a second condition based on the WiFi data.
The decision module may determine whether the signal strength of the WiFi network is greater than or equal to a second threshold, and determine whether a duration of time when the channel quality of the WiFi network is of the second level is greater than or equal to a third duration. If the signal strength of the WiFi network is less than the second threshold, and/or the duration that the channel quality of the WiFi network is of the second level is less than the third duration, the decision module may determine that the network quality of the WiFi network does not meet the second condition.
S702, the decision module can send indication information for stopping detecting the WiFi data to the sensing module, and correspondingly, the sensing module receives the indication information for stopping detecting the WiFi data. The indication information for stopping detecting the WiFi data is used for indicating the sensing module to stop detecting the WiFi data.
And S703, stopping detecting the WiFi data by the sensing module based on the indication information of stopping detecting the WiFi data.
And S704, the decision module sends the indication information of using the WiFi network to the execution module, and correspondingly, the execution module receives the indication information of using the WiFi network. The indication information of the WiFi network is used for indicating the decision module to communicate through the WiFi network.
S705, the execution module may support an application flow of the first application program using the WiFi network based on the indication information using the WiFi network.
The sequence numbers of the processes in the above embodiments do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not be construed as limiting the implementation process of the embodiments of the present application.
The method provided by the embodiment of the present application is described in detail above with reference to fig. 1 to 7, and the apparatus provided by the embodiment of the present application will be described in detail below with reference to fig. 8 and 9.
Fig. 8 shows a schematic block diagram of a network access device 800 provided in an embodiment of the present application. As shown in fig. 8, the network access device 800 includes: an access module 810 and a communication module 820. Wherein, the access module 810 is configured to: accessing a WiFi network; the communication module 820 is configured to: communication is carried out through the cellular network within a first duration after the WiFi network is accessed; after a first time period, communication is conducted over a WiFi network.
It should be appreciated that the network access device 800 herein is embodied in the form of functional modules. The term module herein may refer to an application specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an alternative example, it will be understood by those skilled in the art that the network access apparatus 800 may be specifically an electronic device in the foregoing method embodiment, or the functions of the electronic device in the foregoing method embodiment may be integrated in the network access apparatus 800, and the network access apparatus 800 may be configured to execute each flow and/or step corresponding to the electronic device in the foregoing method embodiment, which is not repeated herein.
The network access device 800 has a function of implementing the corresponding steps executed by the electronic device in the method embodiment; the above functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
In an embodiment of the present application, the network access device 800 in fig. 8 may also be a chip or a chip system, for example: system on chip (SoC).
Fig. 9 is a schematic block diagram of another network access device 900 provided in an embodiment of the present application. As shown in fig. 9, the network access device 900 includes: a processor 910, a transceiver 920, and a memory 930. Wherein the processor 910, the transceiver 920, and the memory 930 are in communication with each other through an internal connection path, the memory 930 is configured to store instructions, and the processor 910 is configured to execute the instructions stored in the memory 930 to control the transceiver 920 to transmit signals and/or receive signals.
It should be understood that the network access apparatus 900 may be specifically an electronic device in the foregoing method embodiment, or the functions of the electronic device in the foregoing method embodiment may be integrated in the network access apparatus 900, and the network access apparatus 900 may be configured to perform each step and/or flow corresponding to the electronic device in the foregoing method embodiment. The memory 930 may optionally include read-only memory and random access memory and provide instructions and data to the processor 910. A portion of memory 930 may also include nonvolatile random access memory. For example, the memory 930 may also store information of the device type. The processor 910 may be configured to execute instructions stored in the memory 930, and when the processor 910 executes the instructions, the processor 910 may perform various steps and/or flows corresponding to the electronic device in the above-described method embodiments.
It is to be appreciated that in embodiments of the present application, the processor 910 may be a central processing unit (central processing unit, CPU), but may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor executes instructions in the memory to perform the steps of the method described above in conjunction with its hardware. To avoid repetition, a detailed description is not provided herein.
The application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, where the computer program is used to implement a method corresponding to the electronic device in the method embodiment.
The application also provides a chip system for supporting the electronic device in the method embodiment to realize the functions shown in the application embodiment.
The present application also provides a computer program product comprising a computer program (which may also be referred to as code, or instructions) which, when run on a computer, is capable of performing the method corresponding to the electronic device shown in the above method embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system, apparatus and module may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely specific embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiments of the present application, and the changes or substitutions are intended to be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (7)

1. A network access method for an electronic device, wherein the electronic device has access to a cellular network, the method comprising:
the electronic equipment is accessed to a WiFi network;
if the type of the WiFi network is a preset type, the electronic equipment communicates through the cellular network within a first duration after the electronic equipment is accessed to the WiFi network; the network quality of the cellular network in the first duration meets a first condition, wherein the first condition comprises that the reference signal receiving power of the cellular network is smaller than or equal to a first threshold value, and the times that the channel quality of the cellular network is of a first level are smaller than or equal to a first times;
after the first time period, the electronic device communicates through the WiFi network;
the electronic device communicates through the cellular network, comprising:
the electronic equipment provides communication service for a first application program through the cellular network, the first application program is a preset application program, and/or an interface of the first application program is displayed on a foreground of the electronic equipment before the first time period or the interface of the first application program is displayed on the foreground of the electronic equipment within the first time period.
2. The method of claim 1, wherein after the first time period, the electronic device communicates over the WiFi network, comprising:
at a first time within a second time period after the first time period, if the network quality of the WiFi network meets a second condition, the electronic device communicates through the WiFi network after the first time period, where the second condition includes: and the signal strength of the WiFi network is larger than or equal to a second threshold value, and the duration time when the channel quality of the WiFi network is of a second level is longer than or equal to a third duration time.
3. The method of claim 1 or 2, wherein after the first time period, the electronic device communicates over the WiFi network, comprising:
at any time within a second time period after the first time period, if the network quality of the electronic device based on the WiFi network does not meet a second condition, the electronic device communicates through the WiFi network after the second time period, where the second condition includes: and the signal strength of the WiFi network is larger than or equal to a second threshold value, and the duration time when the channel quality of the WiFi network is of a second level is longer than or equal to a third duration time.
4. The method according to claim 1, wherein the first application is an application whose data traffic consumption is less than or equal to a third threshold value and/or whose frequency of use is greater than or equal to a fourth threshold value.
5. The method according to any one of claims 1 to 4, wherein the type of WiFi network is an enterprise network type, an authentication network type or an open network type.
6. A network access device, comprising: a processor and a memory storing computer-executable instructions that, when executed by the processor, cause the network access device to perform the method of any one of claims 1 to 5.
7. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method according to any one of claims 1 to 5.
CN202310084640.4A 2023-01-13 2023-01-13 Network access method and network access device of electronic equipment Active CN116347559B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310084640.4A CN116347559B (en) 2023-01-13 2023-01-13 Network access method and network access device of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310084640.4A CN116347559B (en) 2023-01-13 2023-01-13 Network access method and network access device of electronic equipment

Publications (2)

Publication Number Publication Date
CN116347559A CN116347559A (en) 2023-06-27
CN116347559B true CN116347559B (en) 2024-03-26

Family

ID=86886648

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310084640.4A Active CN116347559B (en) 2023-01-13 2023-01-13 Network access method and network access device of electronic equipment

Country Status (1)

Country Link
CN (1) CN116347559B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703256A (en) * 2015-03-20 2015-06-10 惠州Tcl移动通信有限公司 Method and system of dynamically connecting MT (Mobile Terminal) with quick AP (Access Point)
CN106130896A (en) * 2016-06-23 2016-11-16 广州鲁邦通物联网科技有限公司 The selection changing method of the router under a kind of many wifi hotspot environment and system
CN108337706A (en) * 2018-02-05 2018-07-27 广东欧珀移动通信有限公司 A kind of switching method of wireless network, mobile terminal and storage medium
CN108494951A (en) * 2018-03-02 2018-09-04 深圳前海桔子信息技术有限公司 Data capture method, device, equipment and storage medium are not read
CN110602772A (en) * 2019-09-12 2019-12-20 Oppo(重庆)智能科技有限公司 WiFi module control method, control device, electronic device and storage medium
CN112954114A (en) * 2021-02-20 2021-06-11 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium
CN113055957A (en) * 2021-03-15 2021-06-29 歌尔科技有限公司 Cellular mobile network access method, terminal equipment and readable storage medium
WO2022237309A1 (en) * 2021-05-14 2022-11-17 荣耀终端有限公司 Peak downloading method and apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120120944A1 (en) * 2010-11-15 2012-05-17 Xue Yang Methods and apparatuses for multi-radio coexistence
WO2013100629A1 (en) * 2011-12-27 2013-07-04 엘지전자 주식회사 Method for offloading data in wireless communication system and apparatus for same
CN103906138B (en) * 2012-12-26 2017-04-26 财团法人工业技术研究院 Instantaneous switching communication system, mobile management entity, user equipment and method for performing traffic offload
US9781662B2 (en) * 2013-08-06 2017-10-03 Htc Corporation Method of performing wireless local area network measurement in wireless communication systems
US11503527B2 (en) * 2019-10-03 2022-11-15 Apple Inc. WLAN to cellular handover techniques for voice calls
US11252631B2 (en) * 2020-02-27 2022-02-15 Microsoft Technology Licensing, Llc Intelligent indicators of dynamic connectivity alternatives

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104703256A (en) * 2015-03-20 2015-06-10 惠州Tcl移动通信有限公司 Method and system of dynamically connecting MT (Mobile Terminal) with quick AP (Access Point)
CN106130896A (en) * 2016-06-23 2016-11-16 广州鲁邦通物联网科技有限公司 The selection changing method of the router under a kind of many wifi hotspot environment and system
CN108337706A (en) * 2018-02-05 2018-07-27 广东欧珀移动通信有限公司 A kind of switching method of wireless network, mobile terminal and storage medium
CN108494951A (en) * 2018-03-02 2018-09-04 深圳前海桔子信息技术有限公司 Data capture method, device, equipment and storage medium are not read
CN110602772A (en) * 2019-09-12 2019-12-20 Oppo(重庆)智能科技有限公司 WiFi module control method, control device, electronic device and storage medium
CN112954114A (en) * 2021-02-20 2021-06-11 北京字节跳动网络技术有限公司 Terminal control method and device, terminal and storage medium
CN113055957A (en) * 2021-03-15 2021-06-29 歌尔科技有限公司 Cellular mobile network access method, terminal equipment and readable storage medium
WO2022237309A1 (en) * 2021-05-14 2022-11-17 荣耀终端有限公司 Peak downloading method and apparatus

Also Published As

Publication number Publication date
CN116347559A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
EP3552351B1 (en) Method and migration managing module for managing a migration of a service
US8855618B2 (en) Apparatus and method for adaptively operating an application program
CN108347277A (en) Method of controlling antenna, device, storage medium and electronic equipment
CN103383620B (en) Show method and the mobile terminal of help information on mobile terminals
CN109376062B (en) Network state prompting method and related device
CN112469096B (en) Cell switching method and device
CN107861603A (en) Power consumption control method and equipment
EP3544344A1 (en) Operation mode switching method and user equipment
CN114125901A (en) Network measurement method, network measurement device, electronic equipment and storage medium
KR20150123865A (en) Dynamic power management of context aware services
CN107360317B (en) Application program resource leakage detection method, mobile terminal and storage medium
CN116347559B (en) Network access method and network access device of electronic equipment
US20240098452A1 (en) Device tracking detection method and electronic device
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
US20090190607A1 (en) Method and apparatus for transmitting data and method and apparatus for performing data task
CN112752145A (en) Video identification method and related equipment
CN104112056A (en) Method and system for detecting data processing faults
CN113439263A (en) Application cleaning method and device, storage medium and electronic equipment
CN110049537A (en) Power saving method, device, equipment and storage medium for intelligent wearable equipment
CN116088716A (en) Window management method and terminal equipment
CN107609117A (en) Log information report method, device and storage medium, ADSP and terminal
CN109032729B (en) Mobile terminal, method for preventing automatic page refreshing of mobile terminal and storage medium
CN116027876B (en) Absolute static state information acquisition method and electronic equipment
CN113760164A (en) Display device and response method of control operation thereof
CN114884920B (en) Communication method, electronic equipment and storage medium

Legal Events

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