CN109511139B - WIFI control method and device, mobile device and computer-readable storage medium - Google Patents

WIFI control method and device, mobile device and computer-readable storage medium Download PDF

Info

Publication number
CN109511139B
CN109511139B CN201811558955.3A CN201811558955A CN109511139B CN 109511139 B CN109511139 B CN 109511139B CN 201811558955 A CN201811558955 A CN 201811558955A CN 109511139 B CN109511139 B CN 109511139B
Authority
CN
China
Prior art keywords
application
wifi
state
control information
information
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
CN201811558955.3A
Other languages
Chinese (zh)
Other versions
CN109511139A (en
Inventor
林进全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201811558955.3A priority Critical patent/CN109511139B/en
Publication of CN109511139A publication Critical patent/CN109511139A/en
Application granted granted Critical
Publication of CN109511139B publication Critical patent/CN109511139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W80/00Wireless network protocols or protocol adaptations to wireless operation
    • H04W80/08Upper layer protocols
    • H04W80/12Application layer protocols, e.g. WAP [Wireless Application Protocol]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/16Central resource management; Negotiation of resources or communication parameters, e.g. negotiating bandwidth or QoS [Quality of Service]
    • H04W28/18Negotiating wireless communication parameters
    • H04W28/22Negotiating communication rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/08Load balancing or load distribution
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application relates to a WIFI control method and device, a mobile device and a computer readable storage medium. The method comprises the following steps: acquiring state information of an application, and determining the current state of the application according to the state information; when the application type of the application is a preset application type and the current state is an application entering state, enabling control information is generated; and controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information. WIFI is intelligently enabled, and the sleep mode is exited, so that network delay is reduced, and the requirement of a specific scene on the network transmission rate is met.

Description

WIFI control method and device, mobile device and computer-readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a WIFI control method, apparatus, mobile device, and computer-readable storage medium.
Background
With the development of computer technology, more and more mobile devices provide wireless internet access services for users. Wireless local area network (WIFI) technology is a technology that can provide Wireless access to the internet for users.
At present, the WIFI working mode of the mobile device comprises a sleep mode, and the traditional WIFI control method can often control WIFI to enter the sleep mode under the condition of relatively low data volume, so that the power consumption is reduced, but the influence caused by the traditional WIFI control method is that the network delay is increased, and the transmission rate is reduced.
Disclosure of Invention
The embodiment of the application provides a WIFI control method and device, a mobile device and a computer readable storage medium, WIFI can be intelligently enabled through applied state information, and a sleep mode is quitted, so that network delay is reduced, and the requirement of a specific scene on the network transmission rate is met.
A WIFI control method comprises the following steps:
acquiring state information of an application, and determining the current state of the application according to the state information;
when the application type of the application is a preset application type and the current state is an application entering state, enabling control information is generated;
and controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information.
A WIFI control apparatus, comprising:
the application state determining module is used for acquiring the state information of the application and determining the current state of the application according to the state information;
the first generation module is used for generating starting control information when the application type of the application is a preset application type and the current state is an application entering state;
and the WIFI enabling module is used for controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information.
A mobile device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring state information of an application, and determining the current state of the application according to the state information;
when the application type of the application is a preset application type and the current state is an application entering state, enabling control information is generated;
and controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring state information of an application, and determining the current state of the application according to the state information;
when the application type of the application is a preset application type and the current state is an application entering state, enabling control information is generated;
and controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information.
According to the WIFI control method, the WIFI control device, the electronic equipment and the computer readable storage medium, the application state information is obtained, the current state of the application is determined according to the state information, the enabling control information is generated when the application type of the application is the preset application type and the current state is the application entering state, the mobile equipment is controlled to enter the WIFI enabling state according to the enabling control information, when the mobile equipment enters the application of the specific preset type according to the current state of the application, WIFI is intelligently enabled, the mobile equipment exits from the sleep mode, therefore, network delay is reduced, and the requirement of a specific scene on the network transmission rate is met.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is an application environment diagram of a WIFI control method in an embodiment;
fig. 2 is a diagram of an application environment of a WIFI control method in another embodiment;
fig. 3 is a flowchart of a WIFI control method in one embodiment;
fig. 4 is a schematic flowchart of a WIFI control method in a specific embodiment;
fig. 5 is a block diagram of a WIFI control device according to an embodiment;
fig. 6 is a block diagram of another embodiment of a WIFI control apparatus;
FIG. 7 is a diagram illustrating an internal structure of a mobile device according to an embodiment;
fig. 8 is a schematic structural diagram of a mobile phone in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
Fig. 1 is an application environment diagram of a WIFI control method in an embodiment. As shown in fig. 1, the application environment includes a mobile device 110, the mobile device 110 includes a WIFI chip, an application is installed on the mobile device 110, when the application runs, the mobile device 110 obtains state information of the application, determines a current state of the application according to the state information of the application, generates enabling control information when the application type of the application is a preset application type and the current state is an application entry state, controls the mobile device to enter the WIFI enabling state according to the enabling control information, and can determine, through the state information of the application, that when the application of the preset application type is entered, the WIFI is intelligently enabled, and the sleep mode is exited, so that network latency is reduced, and requirements of a specific scene on a network transmission rate are met. The mobile device 110 may be a smart phone, a tablet computer, a wearable device, a personal digital assistant, and the like.
It can be understood that, in an embodiment, as shown in fig. 2, the application environment includes a mobile device 110 and a server 120, where the server 120 obtains state information of an application corresponding to the mobile device 110, and the server 120 determines a current state of the application according to the state information, generates enabling control information when the application type of the application is a preset application type and the current state is an application entry state, and then sends the enabling control information to the mobile device 110, and controls the mobile device 110 to enter a WIFI enabling state according to the enabling control information, and can complete intelligent WIFI enabling through interaction between the mobile device 110 and the server 120, and exit from a sleep mode, thereby reducing network latency and meeting a requirement of a specific scenario on a network transmission rate. The logic for generating the corresponding enabling control information is placed on the server, so that resources of the mobile device can be saved, and the corresponding WIFI enabling control information can be generated quickly according to the state information and the application type of the application in a complex scene.
Fig. 3 is a flowchart of a WIFI control method in one embodiment. As shown in fig. 3, a WIFI control is described by taking the application to the above application environment as an example, and specifically includes:
step 202, obtaining the state information of the application, and determining the current state of the application according to the state information.
The state information of the application refers to state information corresponding to an application running on the mobile device, and may include state information corresponding to one or more applications. The state information refers to information related to the current running state of the application, such as entry notification information or exit notification information, running length information, application type information, and the like.
Specifically, the mobile device may obtain the state information of the application, for example, the mobile device obtains the state information of the application through a broadcast sent by an operating system, or the mobile device intercepts the state information corresponding to each application through an installed program. The state information corresponding to the application of the mobile device can also be acquired by the server in the interaction process with the server in the application running process, and if the server receives an application entry request sent by the mobile device, the state information corresponding to the application of the mobile device is acquired according to the application entry request and is used as the application entry information. And determining the current state of the application according to the state information, wherein the current state comprises an application entering state, an application exiting state and an already running state, and the current state can also determine the running time of the application, the number of online users corresponding to the application and the like.
And 204, when the application type of the application is a preset application type and the current state is an application entering state, generating enabling control information.
The enabling control information is WIFI mode control information and is used for controlling WIFI to enter a corresponding working mode, namely an enabling mode, and the mobile device enters a WIFI enabling state in the enabling mode.
Specifically, the application types may be divided according to different dividing manners, for example, the application types may be classified according to the application requirement information, where the requirement information includes power consumption information, delay range information, network transmission rate information, and the like, for example, the application types are classified according to the application functions, such as an instant messaging type, a game type, a video type, and the like, and for example, the application types are divided into an online game application, an online video application, and the like. The preset application type can be customized according to requirements, such as being defined as an online game application or a video communication application, and can also be defined as a specific application through a plurality of preset conditions, such as a microblog application.
The current state is an application entering state, and an application representing a preset application type is started to run, and represents that the mobile device enters a specific scene. In one embodiment, the preset application types include a plurality of application types, the corresponding application state information includes a plurality of application state information, the application state information of each preset application type is integrated, and the enabling control information is generated only when the application state information of each application is determined to be the application entering state.
And step 206, controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information.
Specifically, the enabling control information is used for controlling the WIFI to enter a WIFI enabling state, if the WIFI enters the WIFI enabling state after exiting the sleep mode, the network transmission efficiency can be guaranteed when the WIFI enabling state is entered, and an application scenario with high requirements on network transmission speed and high real-time performance is met. The change of the WIFI state can be controlled by sending an instruction to the WIFI chip. In one embodiment, the mobile device is controlled to enter different WIFI states through the WIFI working mode control function interface, different WIFI working mode control function interfaces are provided in different operating systems, and therefore instructions can be sent to the WIFI chip through the WIFI working mode control function interface to control the change of the WIFI states.
According to the WIFI control method in the embodiment, the state information of the application is acquired, the current state of the application is determined according to the state information, when the application type of the application is the preset application type, and the current state is the application entering state, enabling control information is generated, the mobile device is controlled to enter the WIFI enabling state according to the enabling control information, when the application entering the specific preset type can be judged according to the current state of the application, the WIFI is enabled intelligently, the sleep mode is exited, the network delay is reduced, and the requirement of a specific scene on the network transmission rate is met.
In one embodiment, when the application type of the application is a preset application type and the current state is an application exit state, sleep control information is generated, and the mobile device is controlled to enter a WIFI sleep state according to the sleep control information.
The preset application type can be customized according to requirements, such as being defined as an online game application or a video communication application, and can also be defined as a specific certain application through a plurality of preset conditions, such as a microblog application. The preset application type here is consistent with the preset application type in the above-described embodiment. The sleep control information is used for controlling the WIFI to enter a WIFI sleep state, and the power consumption of the WIFI chip can be reduced when the WIFI enters the WIFI sleep state.
The current state is an application exit state, which indicates that the application of the preset application type is about to exit from running, wherein exiting from running comprises completely exiting and exiting the main thread to enter background running. The sleep control information is generated when the mobile device exits the application of the preset application type, and the sleep control information is used for controlling the mobile device to enter a WIFI sleep state, so that the mobile device can be dynamically switched to a WIFI sleep mode, the power consumption of a WIFI chip is reduced, and the influence of the power consumption on other scenes except the preset application type can not be caused. In one embodiment, the mobile device is controlled to enter the WIFI dormant state through the WIFI working mode control function interface, different WIFI working mode control function interfaces are provided in different operating systems, and therefore instructions can be sent to the WIFI chip through the WIFI working mode control function interface to control the change of the WIFI state.
In this embodiment, the dormancy control information is generated according to the state information of the application, and the dormancy control information can be automatically generated when the application type of the application is the preset application type and the current state is the application exit state, so that the mobile device is intelligently controlled to enter the dormant state, the power consumption of the WIFI chip is reduced, and the electric quantity of the mobile device is saved.
In one embodiment, the preset application type is an application type requiring that power consumption is lower than a first preset threshold value when running, and the delay requirement is that the delay time length is smaller than a second preset threshold value.
Specifically, the power consumption of the application with the power consumption lower than the first preset threshold is not large, the delay requirement is that the delay time is shorter than the second preset threshold, so that the real-time requirement of the application is high, the WIFI sleep mode is closed when the application enters the application, and the application enters the sleep mode when the application exits, so that the network delay is optimized, and meanwhile, the power consumption of other scenes cannot be influenced. The first preset threshold and the second preset threshold can be customized, and in one embodiment, the preset application type is an online game application.
In one embodiment, the method further comprises: the method comprises the steps of obtaining current electric quantity information of the mobile device, when the mobile device is in a WIFI enabled state at present, generating dormancy control information if the current electric quantity corresponding to the current electric quantity information is lower than a preset electric quantity threshold value, and controlling the mobile device to enter a WIFI dormant state according to the dormancy control information.
Specifically, if the current electric quantity corresponding to the current electric quantity information is lower than a preset electric quantity threshold value, it indicates that the power consumption of the current mobile device needs to be reduced, and at this time, dormancy control information needs to be generated to control the mobile device to enter a WIFI dormancy state. If the WIFI sleep mode is closed according to the state information of the application, the WIFI sleep mode can be automatically entered when the electric quantity of the mobile equipment is insufficient, and the WIFI working mode can be intelligently adjusted according to the current state of the application and the electric quantity information of the mobile equipment.
In one embodiment, the method further comprises: the WIFI enabled state of the mobile device is maintained until the current state of the application is the application exit state.
Specifically, the WIFI enabling state of the mobile device is maintained until the current state is the application exit state, the application is guaranteed not to enter a WIFI sleep mode no matter how much the data volume is, the data transmission rate is guaranteed, the time delay of the application of the preset application type in the operation process is reduced, the requirement on real-time performance under the scene of the operation of the application of the preset application type is met, and the fluency of an application interface is guaranteed.
In one embodiment, the method further comprises: the application layer of the application writes the enabling control information into the device node created by the kernel of the mobile device, when the kernel of the mobile device monitors that the information of the device node changes, the enabling control information in the device node is read, and the kernel of the mobile device controls the mobile device to enter a WIFI enabling state according to the enabling control information.
Specifically, the application layer determines whether to generate enable control information or sleep control information according to the state information of the application of the preset application type, so as to send a message to a kernel of the mobile device to turn on and turn off the WIFI sleep mode. In the embodiment, the WIFI chip is determined to enter and exit the sleep mode through the mode of reading and writing the device nodes and the values of the written nodes.
The device node corresponds to a flag bit, and when the value of the flag bit is 1, the device node enters the sleep mode, and when the value of the flag bit is 0, the device node exits the sleep mode. The application layer of the application writes the enable control information into the device node created by the kernel of the mobile device, i.e., writes 0 in the device node. The kernel of the mobile device can create a device node by the interface function of the system when the kernel is started, and in one embodiment, the kernel creates a sys/fs/openclose device node by the interface function device _ create of the system. The WIFI mode control information is written into a device node created by a kernel of the mobile device by the application layer, if the mobile device enters a preset application, the starting control information is written, the node value in the device node is written into 0 by the application layer, the preset application exits, the dormancy control information is written into, and the node value in the device node is written into 1 by the application layer. When the kernel of the mobile device monitors that the information of the device node changes, the current WIFI mode control information in the device node is read, and if the read node value is 0, the device exits from the sleep mode through an interface function in a network subsystem of the kernel, for example, through wlan _ hdd _ set _ powersave in an Android system. If the read node value is 1, the core enters a sleep mode through an interface function in a network subsystem of the kernel, for example, through wlan _ hdd _ Set _ powersave in an Android system. The general interface function sends an instruction message to the WIFI chip to dynamically turn on or turn off the WIFI sleep mode.
In this embodiment, the WIFI chip is determined to enter the WIFI enabled state and the WIFI dormant state by reading and writing the device node and by writing the value of the device node, which is simple and convenient.
In one embodiment, step 202 includes: the application layer of the mobile equipment obtains the state information of the application and determines the current state of the application according to the state information. Step 204 comprises: and when the application type of the application is a preset application type and the current state is an application entering state, the application layer generates enabling control information. The WIFI control method further comprises the following steps: the application layer passes enablement control information to the kernel of the mobile device. Controlling the mobile device to enter the WIFI enabled state according to the enabling control information in step 206 includes: and the kernel of the mobile equipment controls the mobile equipment to enter a WIFI enabling state according to the enabling control information.
The application layer of the mobile device obtains state information of the application, determines the current state of the application according to the state information, generates enabling control information when the application type of the application is a preset application type and the current state is an application entering state, places the enabling control information on the upper layer of the mobile device, transmits the enabling control information to the kernel of the mobile device through the application layer, and provides core system services, so that the mobile device is controlled to enter a WIFI enabling state through the kernel of the mobile device. The WIFI automatic change from the sleep mode to the start-up mode is completed through different layers of labor division cooperation, the whole mode change process is efficient and ordered, and when the WIFI working mode change fails, the problem is located easily through testing of different layers. When the application layer transmits the WIFI mode control information to the kernel of the mobile device, different communication modes such as a netlink communication mode and a read-write device node can be selected according to needs to perform communication.
In one embodiment, step 202 comprises: when detecting that the state of the application operated by the mobile equipment is changed, a system of the mobile equipment generates state information of the application and broadcasts the state information, and an application layer of the mobile equipment receives the application state information broadcasted by the system of the mobile equipment.
Specifically, a mobile device system, such as an Android system, is provided with a plurality of system broadcasts, and corresponding system broadcasts are basically sent out as long as basic operations of the mobile device are involved. Such as: starting, changing network state, taking pictures, closing and starting screens, lighting insufficiently, entering applications, exiting applications and the like. The system broadcast is sent out and received by the corresponding receiver, and the system broadcast is automatically sent out by the system when a specific event occurs in the system. The application layer of the mobile equipment receives the state information of the application broadcasted by the system of the mobile equipment, and the state information of the application is received through the broadcast sent by the system of the mobile equipment automatically, so that the convenience of controlling the mobile equipment to enter different WIFI states is improved. In one embodiment, the application layer may determine whether the current application ENTERs the game mode or exits the game mode by monitoring broadcast of the content. It will be appreciated that the IOS system or other system application layer may also listen for broadcasts from the system, and the specific listening mode may vary according to the operating system.
In one embodiment, the application layer encapsulates the WIFI mode control information in a socket packet and sends the socket packet to the kernel of the mobile device.
In this embodiment, the WIFI mode control information includes start control information and sleep control information, the application layer of the mobile device and the kernel of the mobile device send a message through a socket function, and the WIFI mode control information may be encapsulated in a socket data packet, for example, in a preset field or an extension field, and the kernel of the mobile device obtains the WIFI mode control information by analyzing the socket data packet.
In a specific embodiment, as shown in fig. 4, the WIFI control method includes the following specific steps:
1) And starting up the mobile equipment, and enabling the WIFI chip of the mobile equipment to enter a sleep mode by default.
2) And the kernel of the mobile equipment creates equipment nodes sys/fs/openclosed through an interface function device _ create of the system.
3) The application layer of the mobile device receives the broadcast which is sent by the system and enters the game mode, the value of the device node is written into 0, the kernel monitors that the value of the node is changed into 0, and the mobile device is controlled to exit the WIFI sleep mode through the WIFI mode adjusting function wlan _ hdd _ set _ powersave.
4) After the game exits, the application layer of the mobile device receives the broadcast of exiting the game sent by the system, writes the value of the device node as 1, monitors that the value of the node changes into 1, and calls the function WIFI mode adjustment function wlan _ hdd _ set _ powersave to control the mobile device to enter the WIFI sleep mode.
In the embodiment, the WIFI working mode is automatically adjusted according to the notification of entering or exiting the game, so that the game delay can be well reduced, and the power consumption can be reduced when the game exits.
It can be understood that the WIFI control method can be applied to a video application, besides a game application.
It should be understood that although the various steps in the flow charts of fig. 3-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. 3-4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of performance of which is not necessarily sequential, but may be performed in turn or alternating with other steps or at least portions of sub-steps or stages of other steps.
Fig. 5 is a block diagram of a WIFI control apparatus according to an embodiment. As shown in fig. 5, a WIFI control apparatus includes an application state determining module 302, a first generating module 304, and a WIFI enabling module 306. Wherein:
the application state determining module 302 is configured to obtain state information of an application, and determine a current state of the application according to the state information.
The first generating module 304 is configured to generate the enabling control information when the application type of the application is the preset application type and the current state is the application entry state.
And a WIFI enabling module 306, configured to control the mobile device to enter a WIFI enabled state according to the enabling control information.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
a second generating module 308, configured to generate the sleep control information when the application type of the application is the preset application type and the current state is the application exit state.
And a WIFI sleep module 310, configured to control the mobile device to enter a WIFI sleep state according to the sleep control information.
In one embodiment, the preset application type is an application type requiring that the power consumption is lower than a first preset threshold value when running, and the delay requirement is that the delay time length is smaller than a second preset threshold value.
In an embodiment, the second generating module 308 is further configured to obtain current power information of the mobile device, and when the mobile device is currently in a WIFI enabled state, if a current power corresponding to the current power information is lower than a preset power threshold, generate sleep control information, and enter the WIFI sleep module 310.
In one embodiment, as shown in fig. 6, the apparatus further comprises:
a device node control module 312, configured to write the enabling control information into a device node created by a kernel of the mobile device through an application layer of the application; when the kernel of the mobile equipment monitors that the information of the equipment node changes, the enabling control information in the equipment node is read, and the kernel of the mobile equipment controls the mobile equipment to enter a WIFI enabling state according to the enabling control information.
The division of each module in the WIFI control apparatus is only used for illustration, and in other embodiments, the WIFI control apparatus may be divided into different modules as needed to complete all or part of the functions of the WIFI control apparatus.
For specific limitations of the WIFI control apparatus, reference may be made to the above limitations of the WIFI control method, which is not described herein again. Each module in the above-mentioned WIFI control apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent of a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 7 is a schematic diagram of the internal structure of the mobile device in one embodiment. As shown in fig. 7, the mobile device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor to implement a WIFI control method provided in the following embodiments. The internal memory provides a cached operating environment for operating system computer programs in the non-volatile storage medium. The electronic device may be a mobile phone, a tablet computer, or a personal digital assistant or a wearable device, etc.
The modules in the WIFI control apparatus provided in the embodiment of the present application may be implemented in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides the mobile equipment. As shown in fig. 8, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The mobile device may be any terminal device including a mobile phone, a tablet computer, a PDA (personal digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, and the like, taking the mobile device as the mobile phone as an example:
fig. 8 is a block diagram of a partial structure of a mobile phone related to a mobile device provided in an embodiment of the present application. Referring to fig. 8, the handset includes: radio Frequency (RF) circuit 410, memory 420, input unit 430, display unit 440, sensor 450, audio circuit 440, wireless fidelity (WiFi) module 470, processor 480, and power supply 490. Those skilled in the art will appreciate that the handset configuration shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 410 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 480; the uplink data may also be transmitted to the base station. Typically, the RF circuit includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuitry 410 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), general Packet Radio Service (GPRS), code Division Multiple Access (CDMA), wideband Code Division Multiple Access (WCDMA), long Term Evolution (LTE), email, short Messaging Service (SMS), etc.
The memory 420 may be used to store software programs and modules, and the processor 480 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as an application of a sound playing function, an application of an image playing function, etc.), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 420 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 430 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 400. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, which may also be referred to as a touch screen, may collect touch operations of a user on or near the touch panel 431 (e.g., operations of a user on or near the touch panel 431 using any suitable object or accessory such as a finger or a stylus) and drive a corresponding connection device according to a preset program. In one embodiment, the touch panel 431 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 480, and receives and executes commands sent from the processor 480. In addition, the touch panel 431 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 430 may include other input devices 432 in addition to the touch panel 431. In particular, the other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 440 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The display unit 440 may include a display panel 441. In one embodiment, the Display panel 441 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 480 to determine the type of the touch event, and then the processor 480 provides a corresponding visual output on the display panel 441 according to the type of the touch event. Although in fig. 4, the touch panel 431 and the display panel 441 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 431 and the display panel 441 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 400 can also include at least one sensor 450, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 441 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 441 and/or the backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
Audio circuitry 440, speaker 441, and microphone 442 may provide an audio interface between the user and the handset. The audio circuit 440 may transmit the electrical signal converted from the received audio data to the speaker 441, and the audio signal is converted by the speaker 441 into a sound signal for output; on the other hand, the microphone 442 converts the collected sound signal into an electrical signal, which is received by the audio circuit 440 and converted into audio data, and the audio data is processed by the audio data output processor 480, and then the audio data is transmitted to another mobile phone through the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
WiFi belongs to a short-distance wireless transmission technology, and the mobile phone can help a user to receive and send emails, browse webpages, access streaming media and the like through the WiFi module 470, and provides wireless broadband internet access for the user. Although fig. 8 shows WiFi module 470, it is understood that it does not belong to the essential components of handset 400 and may be omitted as desired.
The processor 480 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory 420, thereby integrally monitoring the mobile phone. In one embodiment, processor 480 may include one or more processing units. In one embodiment, processor 480 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 480.
The handset 400 also includes a power supply 490 (e.g., a battery) for powering the various components, preferably the power supply is logically connected to the processor 480 via a power management system, such that the power management system performs functions of managing charging, discharging, and power consumption.
In one embodiment, the cell phone 400 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor 480 included in the mobile device executes the computer program stored in the memory, the steps of the WIFI control method in the above embodiments are implemented.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the WIFI control method in the various embodiments described above.
A computer program product containing instructions which, when run on a computer, cause the computer to perform the method of WIFI control in the various embodiments described above.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A WIFI control method is characterized by comprising the following steps:
acquiring state information of an application, and determining the current state of the application according to the state information;
when the application type of the application is a preset application type and the current state is an application entering state, enabling control information is generated, the application entering state indicates that the application of the preset application type is to be started to run, and the enabling control information is WIFI mode control information and is used for controlling WIFI to enter a corresponding working mode;
and controlling the mobile equipment to enter a WIFI enabled state according to the enabling control information, keeping the WIFI in a sleep mode, and entering the WIFI sleep mode again until the sleep control information is received.
2. The method of claim 1, further comprising:
and when the application type of the application is the preset application type and the current state is the application exit state, generating dormancy control information, and controlling the mobile equipment to enter a WIFI dormancy state according to the dormancy control information.
3. The method according to claim 1 or 2, wherein the preset application type is an application type requiring that power consumption is lower than a first preset threshold value when running, and requiring that delay time is less than a second preset threshold value when running.
4. The method of claim 1, further comprising:
acquiring current electric quantity information of the mobile equipment;
when the mobile equipment is in a WIFI enabled state currently, if the current electric quantity corresponding to the current electric quantity information is lower than a preset electric quantity threshold value, generating dormancy control information;
and controlling the mobile equipment to enter a WIFI sleep state according to the sleep control information.
5. The method of claim 1, further comprising:
maintaining the WIFI enabled state of the mobile device until the current state of the application is the application exit state.
6. The method of claim 1, further comprising:
the application layer of the application writes the enabling control information into a device node created by a kernel of the mobile device;
when the kernel of the mobile equipment monitors that the information of the equipment node changes, the enabling control information in the equipment node is read;
and the kernel of the mobile equipment controls the mobile equipment to enter a WIFI enabling state according to the enabling control information.
7. A WIFI control apparatus, comprising:
the application state determining module is used for acquiring the state information of the application and determining the current state of the application according to the state information;
the first generation module is used for generating enabling control information when the application type of the application is a preset application type and the current state is an application entering state, wherein the application entering state indicates that the application of the preset application type is to be started to run, and the enabling control information is WIFI mode control information and is used for controlling WIFI to enter a corresponding working mode;
and the WIFI enabling module is used for controlling the mobile equipment to enter a WIFI enabling state according to the enabling control information, keeping the WIFI in a sleep mode, and entering the WIFI sleep mode again until the sleep control information is received.
8. The apparatus of claim 7, further comprising:
a second generating module, configured to generate sleep control information when the application type of the application is the preset application type and the current state is an application exit state;
and the WIFI dormancy module is used for controlling the mobile equipment to enter a WIFI dormancy state according to the dormancy control information.
9. A mobile device comprising a memory and a processor, the memory having stored thereon a computer program that, when executed by the processor, causes the processor to carry out the steps of the method according to any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811558955.3A 2018-12-19 2018-12-19 WIFI control method and device, mobile device and computer-readable storage medium Active CN109511139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811558955.3A CN109511139B (en) 2018-12-19 2018-12-19 WIFI control method and device, mobile device and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811558955.3A CN109511139B (en) 2018-12-19 2018-12-19 WIFI control method and device, mobile device and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN109511139A CN109511139A (en) 2019-03-22
CN109511139B true CN109511139B (en) 2023-01-03

Family

ID=65753745

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811558955.3A Active CN109511139B (en) 2018-12-19 2018-12-19 WIFI control method and device, mobile device and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN109511139B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021031049A1 (en) 2019-08-17 2021-02-25 Zte Corporation Signaling methods for reducing power consumption of wireless devices
CN111163510B (en) * 2019-12-27 2023-09-22 Oppo广东移动通信有限公司 Network control method and device, storage medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1618208A (en) * 2001-11-27 2005-05-18 英特尔公司 Device and method for intelligent wireless communication selection
CN104333891A (en) * 2014-10-30 2015-02-04 国家电网公司 Low-power WiFi communication chip based on passive awakening and method thereof
CN105677322A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Night sleep message display method and device and electronic equipment
WO2016197456A1 (en) * 2015-06-09 2016-12-15 中兴通讯股份有限公司 Method and device for controlling residential gateway
CN107329559A (en) * 2017-06-30 2017-11-07 宇龙计算机通信科技(深圳)有限公司 A kind of application control method, device, terminal and storage medium
CN107708191A (en) * 2017-09-30 2018-02-16 北京小米移动软件有限公司 Terminal control method, device and computer-readable recording medium
CN108012027A (en) * 2017-11-28 2018-05-08 北京小米移动软件有限公司 The method and apparatus for managing application program

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622079B (en) * 2012-02-25 2015-02-04 华为终端有限公司 Sleep method, wakening method and mobile terminal device
US9813815B2 (en) * 2014-05-20 2017-11-07 Gn Hearing A/S Method of wireless transmission of digital audio
CN104601701B (en) * 2015-01-16 2019-04-05 深圳市中兴物联科技有限公司 In-vehicle networking equipment and In-vehicle networking implementation method
CN104991635A (en) * 2015-07-27 2015-10-21 联想(北京)有限公司 Electronic device and control method thereof
CN105657797A (en) * 2015-08-26 2016-06-08 宇龙计算机通信科技(深圳)有限公司 Power consumption control method and system of mobile terminal
CN106055076B (en) * 2016-05-31 2019-07-16 Oppo广东移动通信有限公司 A kind of sensor method for closing and device
CN106412344A (en) * 2016-08-30 2017-02-15 上海卓易科技股份有限公司 Method and device for reducing Bluetooth power consumption of bracelet
CN106878562A (en) * 2017-03-02 2017-06-20 东软集团股份有限公司 Control the method and device of wifi functional switches
CN107708190A (en) * 2017-09-29 2018-02-16 努比亚技术有限公司 Wi Fi control methods, mobile terminal and computer-readable recording medium
CN108052196A (en) * 2017-12-29 2018-05-18 北京元心科技有限公司 Power consumption control method, device and terminal device
CN108388414B (en) * 2018-02-05 2020-05-12 Oppo广东移动通信有限公司 Screen-off control method and device for terminal, computer-readable storage medium and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1618208A (en) * 2001-11-27 2005-05-18 英特尔公司 Device and method for intelligent wireless communication selection
CN104333891A (en) * 2014-10-30 2015-02-04 国家电网公司 Low-power WiFi communication chip based on passive awakening and method thereof
WO2016197456A1 (en) * 2015-06-09 2016-12-15 中兴通讯股份有限公司 Method and device for controlling residential gateway
CN105677322A (en) * 2015-12-29 2016-06-15 北京金山安全软件有限公司 Night sleep message display method and device and electronic equipment
CN107329559A (en) * 2017-06-30 2017-11-07 宇龙计算机通信科技(深圳)有限公司 A kind of application control method, device, terminal and storage medium
CN107708191A (en) * 2017-09-30 2018-02-16 北京小米移动软件有限公司 Terminal control method, device and computer-readable recording medium
CN108012027A (en) * 2017-11-28 2018-05-08 北京小米移动软件有限公司 The method and apparatus for managing application program

Also Published As

Publication number Publication date
CN109511139A (en) 2019-03-22

Similar Documents

Publication Publication Date Title
JP6076501B2 (en) Method, apparatus, facility, system, program, and recording medium for controlling on / off of wireless network
CN108320744B (en) Voice processing method and device, electronic equipment and computer readable storage medium
WO2020024732A1 (en) Process processing method, electronic device, and computer-readable storage medium
CN107786424B (en) Audio and video communication method, terminal and server
CN108541013B (en) Information processing method, device, mobile terminal and computer readable storage medium
CN112703714A (en) Application program processing method and device, computer equipment and computer readable storage medium
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN104281621A (en) Method and device for browsing web page
EP2869604B1 (en) Method, apparatus and device for processing a mobile terminal resource
WO2018161788A1 (en) Multimedia data sharing method and device
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN112805988B (en) Call control method and device, computer readable storage medium and electronic equipment
CN110032430B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN109992309B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN110018886B (en) Application state switching method and device, electronic equipment and readable storage medium
CN110018885B (en) Application program freezing method and device, storage medium and terminal
CN106454953B (en) Flow control method, device and terminal
CN112987907B (en) Control method and device of wearable device, electronic device and readable storage medium
CN109375995B (en) Application freezing method and device, storage medium and electronic equipment
CN112997471B (en) Audio channel switching method and device, readable storage medium and electronic equipment
CN109992360B (en) Process processing method and device, electronic equipment and computer readable storage medium
CN110046033B (en) Application program processing method and device, electronic equipment and computer readable storage medium
CN107908527B (en) Application icon display method and device
CN109992395B (en) Application freezing method and device, terminal and computer readable storage medium
CN112261634B (en) Bluetooth transmission control method and device, terminal 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