CN110602772A - WiFi module control method, control device, electronic device and storage medium - Google Patents

WiFi module control method, control device, electronic device and storage medium Download PDF

Info

Publication number
CN110602772A
CN110602772A CN201910865974.9A CN201910865974A CN110602772A CN 110602772 A CN110602772 A CN 110602772A CN 201910865974 A CN201910865974 A CN 201910865974A CN 110602772 A CN110602772 A CN 110602772A
Authority
CN
China
Prior art keywords
wifi module
mobile data
electronic device
data network
module
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.)
Pending
Application number
CN201910865974.9A
Other languages
Chinese (zh)
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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201910865974.9A priority Critical patent/CN110602772A/en
Publication of CN110602772A publication Critical patent/CN110602772A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0254Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity detecting a user operation or a tactile contact or a motion of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • H04W52/028Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof switching on or off only a part of the equipment circuit blocks
    • 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 Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a WiFi module control method, a control device, an electronic device and a storage medium. The WiFi module control method comprises the following steps: acquiring a network connection state of the electronic device, wherein the network connection state comprises a connection state of a WiFi module and a connection state of a mobile data network module; acquiring a screen state of a display screen; and when the network connection state meets the specified condition and the display screen is in the screen-off state, closing the WiFi module, and establishing the connection between the electronic device and the mobile data network through the mobile data network module. When the network connection state meets the specified condition and the display screen is in the screen-off state, the WiFi module is closed, the situation that the electronic device consumes excessive electric quantity due to the fact that the WiFi module is repeatedly connected with the network is avoided, the cruising ability of the electronic device is improved, meanwhile, the mobile data network is connected through the mobile data network module, and the situation that the electronic device is in the state without network connection is avoided.

Description

WiFi module control method, control device, electronic device and storage medium
Technical Field
The application relates to the technical field of electronic devices, in particular to a WiFi module control method, a control device, an electronic device and a storage medium.
Background
In electronic devices such as mobile phones and tablets, the electronic devices can be connected in a communication manner through a Wireless Local Area Network (WLAN), however, when signals of the WLAN are unstable, the electronic devices consume too much electric power, and thus the cruising ability of the electronic devices is reduced.
Disclosure of Invention
An object of the present application is to provide a WiFi module control method, a control device, an electronic device and a storage medium, so as to solve the above problems.
In a first aspect, an embodiment of the present application provides a WiFi module control method, where the WiFi module control method is applied to an electronic device, the electronic device includes a display screen, a WiFi module, and a mobile data network module, and the WiFi module control method includes: acquiring a network connection state of the electronic device, wherein the network connection state comprises a connection state of a WiFi module and a connection state of a mobile data network module; acquiring a screen state of a display screen; and when the network connection state meets the specified condition and the display screen is in the screen-off state, closing the WiFi module, and establishing the connection between the electronic device and the mobile data network through the mobile data network module.
In a second aspect, an embodiment of the present application provides a WiFi module control device, where the WiFi module control device is applied to an electronic device, the electronic device includes a display screen, a WiFi module, and a mobile data network module, the WiFi module control device includes a network connection state acquisition unit, a screen state acquisition unit, and a control unit, the network connection state acquisition unit is used to acquire a network connection state of the electronic device, and the network connection state includes a connection state of the WiFi module and a connection state of the mobile data network module; the screen state acquisition unit is used for acquiring the screen state of the display screen; the control unit is used for closing the WiFi module when the network connection state meets the specified condition and the display screen is in the screen-off state, and establishing connection between the electronic device and the mobile data network through the mobile data network module.
In a third aspect, embodiments of the present application provide an electronic device, which includes a display screen, a WiFi module, a mobile data network module, one or more memories, a processor, and one or more applications, where the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the WiFi module control method described above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium. The computer readable storage medium stores program codes, and the program codes can be called by the processor to execute the WiFi module control method.
According to the WiFi module control method, the WiFi module control device, the electronic device and the storage medium, the network connection state and the screen state of the electronic device are obtained, when the network connection state meets the specified condition and the display screen is in the screen extinguishing state, the WiFi module is turned off, the situation that the electronic device consumes excessive electric quantity due to the fact that the WiFi module is connected with the network repeatedly is avoided, the cruising ability of the electronic device is improved, meanwhile, the connection between the electronic device and the mobile data network is established through the mobile data network module, and the situation that the electronic device is in the state without network connection is avoided.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating a WiFi module control method provided in an embodiment of the present application.
Fig. 3 is a flowchart illustrating a WiFi module control method according to another embodiment of the present application.
Fig. 4 is a flowchart illustrating a WiFi module control method according to another embodiment of the present application.
Fig. 5 is a flowchart illustrating a WiFi module control method according to another embodiment of the present application.
Fig. 6 is a flowchart illustrating a WiFi module control method according to yet another embodiment of the present application.
Fig. 7 is a schematic unit diagram of a WiFi module control apparatus provided in an embodiment of the present application.
Fig. 8 is a module schematic diagram of an electronic device according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a storage medium according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In electronic devices such as mobile phones and tablet computers, the electronic devices can be connected to each other through a Wireless Local Area Network (WLAN), however, when signals of the WLAN are unstable, the electronic devices consume too much power, and thus the cruising ability of the electronic devices is reduced.
Based on this, referring to fig. 1 and fig. 2, an embodiment of the present application provides a Wireless Fidelity (WiFi) module control method, where the WiFi module control method is applied to an electronic device 100, the electronic device 100 includes a display 101, a WiFi module 102, and a mobile data network module 103, and the WiFi module control method includes the steps of:
s020: acquiring a network connection state of the electronic device 100, wherein the network connection state comprises a connection state of the WiFi module 102 and a connection state of the mobile data network module 103;
s040: acquiring the screen state of the display screen 101;
s060: when the network connection state meets the specified condition and the display screen 101 is in the screen-off state, the WiFi module 102 is turned off, and the connection between the electronic device 100 and the mobile data network is established through the mobile data network module 103.
Specifically, the electronic apparatus 100 may be a mobile phone, a tablet, a computer, a wearable device, and the like, and as shown in fig. 1, the electronic apparatus 100 is taken as an example in the embodiment of the present application for description. The display 101 may be a liquid crystal display 101, a light emitting diode display 101, an organic light emitting diode display 101, or the like, and the display 101 is capable of displaying images for users to browse. The WiFi module 102 and the mobile data network module 103 can both implement network connection of the electronic device 100, the WiFi module 102 implements data transmission between the electronic device 100 and a network by connecting with a WiFi network, and the mobile data network module 103 implements data transmission between the electronic device 100 and the network by connecting with a mobile data network.
In some embodiments, the electronic device 100 may further include a housing 104, the display screen 101 being mounted to the housing 104, the housing 104 being capable of being held by a user to facilitate the user in browsing content displayed by the display screen 101; the WiFi module 102 and the mobile data network module 103 are both installed in the housing 104, so that the situation that the WiFi module 102 and the mobile data network module 103 are directly affected by external collision to cause unstable work is avoided.
The network connection state of the WiFi module 102 includes a network stable connection state, a network disconnection state, and a network unstable state. Generally, when the network connection state of the WiFi module 102 is in the network stable connection state, it indicates that the WiFi module 102 can be normally connected to the WiFi network and enables the electronic device 100 to perform data transmission through the WiFi network; when the network connection state of the WiFi module 102 is in a network disconnection state, it indicates that the WiFi module 102 is not connected to the WiFi network, and the electronic device 100 cannot perform data transmission through the WiFi network; when the network connection state of the WiFi module 102 is in a network unstable state, the WiFi module 102 may repeatedly connect and disconnect the WiFi network; or although the WiFi module 102 can be connected to the WiFi network, the variation range of the Received Signal Strength Indication (RSSI) of the WiFi module 102 in a short time is large, which shows a strong and weak situation; or the WiFi module 102 can connect to the WiFi network, but the WiFi signal received by the WiFi module 102 is weak due to the RSSI strength being insufficient.
Similarly to the WiFi module 102, the network connection state of the mobile data network module 103 also includes a network stable connection state, a network disconnection state, and a network unstable state.
The screen states of the display screen 101 include a bright screen state and a dead screen state. Generally, when the screen of the display screen 101 is in a bright screen state, it indicates that the user is operating the electronic device 100, in this embodiment, the bright screen state refers to a bright screen state caused by the user operation, and does not include a state in which the screen is lighted due to an incoming call; when the screen of the display screen 101 is in the screen-off state, it indicates that the user is not operating the electronic apparatus 100.
According to the WiFi module control method, the network connection state and the screen state of the electronic device 100 are obtained, when the network connection state meets specified conditions, for example, the network connection state of the WiFi module 102 is in a network instable state, the network connection state of the mobile data network module 103 is in a normal registration state and can be communicated, and the display screen 101 is in a screen-off state, the WiFi module 102 is closed, excessive electric quantity consumption of the electronic device 100 caused by repeated network connection of the WiFi module 102 is avoided, the cruising ability of the electronic device 100 is improved, meanwhile, connection between the electronic device 100 and the mobile data network is established through the mobile data network module 103, and the electronic device 100 is prevented from being in a state without network connection.
In the above embodiment, the network connection state of the electronic device 100 and the screen state of the display screen 101 are not affected, and the steps S020 and S040 may not be executed sequentially or may be executed simultaneously. In an embodiment, when the network connection status does not satisfy a specified condition, for example, when the network connection status of the WiFi module 102 is in a network stable connection status, it indicates that the WiFi module 102 is not repeatedly connected to the network, and at this time, the WiFi module 102 is not turned off regardless of whether the display 101 is in a screen-off status.
In one embodiment, when the network connection state does not satisfy the specified condition or the display screen 101 is in the bright screen state, the network connection state of the electronic device 100 and the screen state of the display screen 101 are re-acquired until the network connection state satisfies the specified condition and the display screen 101 is in the off screen state, and corresponding operations are executed.
In one embodiment, the specified conditions include that the mobile data network module 103 is in a normal registration state and that the signal strength of the WiFi module 102 is less than a preset strength threshold.
Specifically, when the mobile data network module 103 is in the normal registration state, which indicates that the mobile data network module 103 can be normally and stably connected to the mobile data network, the electronic device 100 may perform data transmission or not perform data transmission through the mobile data network. When the signal strength of the WiFi module 102 is smaller than the preset strength threshold, for example, an absolute value of RSSI of-105 decibel milliwatts (dBm) is taken as the preset strength threshold, that is, the preset strength threshold | -105| dBm; if the RSSI of the WiFi module 102 is-100 dBm absolute value as the signal strength of the WiFi module 102, that is, the signal strength is | -100| dBm, since | -100| dBm is smaller than | -105| dBm, it indicates that the network connection status of the WiFi module 102 is in a network unstable status. The specified condition can prevent the electronic device 100 from being in a state of no network connection even if the WiFi module 102 is turned off, while ensuring that the mobile data network module 103 can be normally and stably connected to the mobile data network.
If the signal strength of the WiFi module 102 is not less than the preset strength threshold, the operation of turning off the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 is not performed.
In one embodiment, the specified conditions include that the mobile data network module 103 is in a normal registration state and the number of times of repeated connection of the WiFi module 102 within a preset unit time is equal to or greater than a preset number threshold.
Specifically, when the mobile data network module 103 is in the normal registration state, which indicates that the mobile data network module 103 can be normally and stably connected to the mobile data network, the electronic device 100 may perform data transmission or not perform data transmission through the mobile data network. The preset unit time may be thirty seconds, forty seconds, fifty seconds, sixty seconds, etc., and the preset number threshold may be three times, four times, five times, six times, etc. For example, the number of times that the WiFi module 102 is repeatedly connected within sixty seconds is equal to five times, which indicates that the network connection state of the WiFi module 102 is in a network unstable state, at this time, regardless of the RSSI strength of the WiFi module 102, the WiFi module 102 repeatedly connects to the WiFi network, which may cause the electronic device 100 to consume too much power, and under the specified condition, under the condition that the mobile data network module 103 is ensured to be normally and stably connected to the mobile data network, by turning off the WiFi module 102, it is possible to avoid that the WiFi module 102 repeatedly connects to the WiFi network, which may shorten the duration of the electronic device 100.
If the number of times of the repeated connection of the WiFi module 102 in the preset unit time is less than the preset number threshold, the operation of closing the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 is not performed.
In one embodiment, the specified condition includes that the mobile data network module 103 is in a normal registration state, the signal strength of the WiFi module 102 is less than a preset strength threshold, and the number of times of repeated connection of the WiFi module 102 in a preset unit time is equal to or greater than a preset number threshold.
Specifically, the preset intensity threshold, the preset unit time, and the preset number threshold refer to the above-described embodiments. The electronic device 100 detects the signal strength of the WiFi module 102 and the number of times of the WiFi module 102 repeatedly connecting within a preset unit time, and executes corresponding operations when it is ensured that the signal strength is less than a preset strength threshold and the number of times of the repeated connection is equal to or greater than a preset number threshold, so that the electronic device 100 can avoid excessively using a mobile data network for data transmission, reduce the flow consumption of the mobile data network, and thus, the electronic device is beneficial to reducing the cost of the mobile data flow of the user.
The electronic device 100 may detect the signal strength of the WiFi module 102 and detect that the WiFi module 102 is repeatedly connected within the preset unit time, and the detection may be performed simultaneously.
Referring to fig. 3, in an embodiment, after step S040 and before step S060, the method for controlling the WiFi module 102 further includes the steps of:
s050: acquiring the current moment;
s051: when the current time is within the preset time period, the operations of turning off the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 are performed.
Specifically, the current time may be a time point recorded by a clock application of the electronic device 100, or may be a time point when the electronic device 100 recognizes a network clock after connecting to a network. The preset time period may be a default time period in the electronic device 100, or may be a time period set individually by the user according to the user's own habit. Generally, the user is in a rest state without using the electronic apparatus 100 for a preset period of time. For example, taking twenty-four hour production as an example, the preset time period is 02:00:00 to 06:00:00 (hour: minute: second), if the current time is 03:00:00, the user does not use the electronic apparatus 100 because the current time is within the preset time period, and if the network connection state satisfies the specified condition and the display screen 101 is in the screen-off state, the operation of turning off the WiFi module 102 and establishing the connection of the electronic apparatus 100 with the mobile data network through the mobile data network module 103 is performed. The WiFi module 102 is turned off in the preset time period instead of other time periods, so that the influence caused by turning off the WiFi module 102 when the user operates the electronic device 100 can be avoided, the phenomenon that the electronic device 100 consumes excessive electric quantity due to the fact that the WiFi module 102 is repeatedly connected with a network is also avoided, the cruising ability of the electronic device 100 is improved, meanwhile, the electronic device 100 is connected with a mobile data network through the mobile data network module 103, and the electronic device 100 is prevented from being in a state without network connection.
In one embodiment, the preset time period may include one continuous time period, and the user may set the preset time period to two or more continuous times. For example, the preset time period is 23:00:00 to 06:00:00, 13:00:00 to 12:00:00, wherein the time period of 23:00:00 to 06:00:00 corresponds to the sleeping time of the user at night, and the time period of 13:00:00 to 12:00:00 corresponds to the noon break time of the user. In the preset time period, generally, the rest time of the user is the rest time without using the electronic device 100, when the network connection state of the electronic device 100 meets the specified condition and the display screen 101 is in the screen-off state, the endurance of the electronic device 100 is improved by turning off the WiFi module 102, and meanwhile, the operation of turning off the WiFi module 102 has little influence on the user.
In this embodiment, after the control method performs step S051, if the network connection state meets the specified condition and the display screen 101 is in the screen-off state, and the current time is still within the preset time period, the close state of the WiFi module 102 and the connection state of the mobile data network module 103 are maintained.
In this embodiment, after the control method performs step S051, if the network connection state meets the specified condition and the display screen 101 is in the screen-off state, and the current time is not within the preset time period, the network connection state of the electronic device 100 and the screen state of the display screen are obtained again.
In one embodiment, if the current time is not within the preset time period, the network connection state of the electronic device 100 and the screen state of the display screen are re-acquired.
Referring to fig. 4, in an embodiment, after step S060, the method for controlling the WiFi module 102 further includes the steps of:
s080: acquiring the current moment;
s081: when the current time is not within the preset time period, the mobile data network module 103 is turned off, and a connection between the electronic device 100 and a WiFi network is established through the WiFi module 102.
Specifically, the obtaining manner of the current time and the setting of the preset time period may refer to the above-described embodiments. When the current time is not within the preset time period, indicating that the user needs to use the electronic device 100 within the time period, in order to avoid that the user uses the mobile data network to transmit a large amount of data and generate excessive mobile data traffic charges because the user does not know or forget that the WiFi module 102 is in the off state, the electronic device 100 can avoid causing expensive mobile data traffic charges to the user by turning off the mobile data network module 103 and establishing a connection with the WiFi network through the WiFi module 102 when the current time is not within the preset time period. In addition, if the network connection state of the WiFi module 102 is still in the network unstable state at this time, the user can know that the current network is in the unstable connection state by using the electronic device 100 to access the network data, so that the user can adjust the network used by the electronic device 100 according to the actual needs of the user.
In one embodiment, before and after the execution of step S060, the control method of the WiFi module 102 may include both step S050 and step S051, and step S080 and step S081. For example, after acquiring the network connection status of the electronic device 100 and the screen status of the display screen 101, the following steps are performed:
s050: acquiring the current moment;
s051: when the current time is within a preset time period, closing the WiFi module 102, and establishing a connection between the electronic device 100 and a mobile data network through the mobile data network module 103;
s060: when the network connection state meets the specified condition and the display screen 101 is in the screen-off state, keeping the closing state of the WiFi module 102 and the connection state of the mobile data network module 103;
s080: acquiring the current moment;
s081: when the current time is not within the preset time period, the mobile data network module 103 is turned off, and a connection between the electronic device 100 and a WiFi network is established through the WiFi module 102.
By acquiring the current time, the electronic device 100 can, on one hand, turn off the WiFi module 102 in the preset time period but not in other time periods, thereby avoiding the influence caused by turning off the WiFi module 102 in the process of operating the electronic device 100 by the user; on the other hand, the method can avoid causing expensive mobile data traffic cost to the user, and is also beneficial for the user to adjust the network used by the electronic device 100 according to the actual needs of the user.
Referring to fig. 1 and 5, in an embodiment, the electronic device 100 further includes a battery 105, and after step S040 and before step S060, the method for controlling the WiFi module 102 further includes the steps of:
s052: acquiring the residual capacity of the battery 105;
s053: when the remaining capacity of the battery 105 is lower than the preset capacity value, the operations of turning off the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 are performed.
Specifically, a battery 105 is disposed within the housing 104, the battery 105 being used to provide power to other components of the electronic device 100. The preset electric quantity value may be a default electric quantity value in the electronic device 100, or may be an electric quantity value set individually by the user according to the user's own needs. Generally, when the remaining power is higher than the preset power value, it indicates that the power of the electronic device 100 can meet the user requirement, the user does not need to consider the cruising ability of the electronic device 100, and when the remaining power of the battery 105 is lower than the preset power value, it indicates that the cruising ability of the electronic device 100 may not meet the user requirement. For example, the preset power value may be 30%, if the remaining power of the battery 105 is 25%, and since the remaining power is lower than the preset power value, if the network connection state meets the specified condition and the display screen 101 is in the screen-off state, the operation of turning off the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 is performed, so that the situation that the WiFi module 102 repeatedly connects to the network to consume too much power of the electronic device 100 is avoided, and the duration of the electronic device 100 is advantageously prolonged.
In one embodiment, the control method of the WiFi module 102 may further include step S050 and step S051, step S080 and step S081 in the case that the step S052 and step S053 are included.
In one embodiment, if the current time is within a preset time period, the operation of turning off the WiFi module 102 and establishing the connection between the electronic device 100 and the mobile data network through the mobile data network module 103 is performed; then, when the remaining capacity of the battery 105 is lower than the preset capacity value, if the electronic device 100 is already in a state of turning off the WiFi module 102 and connecting to the mobile data network through the mobile data network module 103, maintaining the state of the electronic device 100; if the electronic device 100 does not turn off the WiFi module 102 and does not connect with the mobile data network through the mobile data network module 103, an operation of turning off the WiFi module 102 and establishing a connection of the electronic device 100 with the mobile data network through the mobile data network module 103 is performed.
Referring to fig. 6, in an embodiment, after step S060, the WiFi module control method further includes the steps of:
s090: when the display screen 101 receives the screen-on command, the mobile data network module 103 is turned off, and a connection between the electronic device 100 and the WiFi network is established through the WiFi module 102.
Specifically, the screen-lighting instruction refers to an instruction for lighting the display screen 101 by triggering the electronic device 100 by the user, and excludes an instruction for lighting the display screen 101 due to a notification message received by the electronic device 100. For example, the screen-up command may be generated by the user pressing a key of the electronic apparatus 100, or may be generated by the user touching the display screen 101. When the display screen 101 receives the screen-up instruction, indicating that the user needs to operate the electronic device 100, the mobile data network module 103 is turned off, and the connection between the electronic device 100 and the WiFi network is established through the WiFi module 102. On one hand, the problem that the user uses too much mobile data traffic to cause expensive mobile data traffic cost can be avoided, and on the other hand, if the network connection state of the WiFi module 102 is still in a network unstable state at this time, the user can know the current network connection state by accessing the network data through the electronic device 100, which is beneficial for the user to make adjustments according to the actual situation of the user.
In one embodiment, in the case that the control method of the WiFi module 102 includes the step S090, the control method may further include the steps S080 and S081, the steps S050 and S051, and the steps S052 and S053.
In one embodiment, after step S060, the WiFi module control method further includes the steps of: acquiring that the display screen 101 receives a lighting instruction; when the lighting instruction meets the preset condition, the current states of the WiFi module 102 and the mobile data network module 103 are maintained. The preset condition may be that the user presses a key of the electronic device 100, or that the user touches the display screen in a single-click manner, a double-click manner, or the like. The electronic device 100 is different from the lighting instruction sent by the application program, for example, the short message application program sends the lighting instruction after receiving the short message, so that the electronic device 100 is prevented from frequently turning off and turning on the WiFi module 102, power consumption of the electronic device 100 is reduced, and endurance of the electronic device 100 is prolonged.
Referring to fig. 7, an embodiment of the present application further provides a WiFi module control apparatus 400, where the control apparatus 400 is applied to an electronic apparatus 100, the electronic apparatus 100 includes a display screen 101, a WiFi module 102, and a mobile data network module 103, the WiFi module control apparatus 400 includes a network connection state obtaining unit 420, a screen state obtaining unit 440, and a control unit 460, where the network connection state obtaining unit 420 is configured to obtain a network connection state of the electronic apparatus 100, and the network connection state includes a connection state of the WiFi module 102 and a connection state of the mobile data network module 103; the screen state acquiring unit 440 is configured to acquire a screen state of the display screen 101; the control unit 460 is configured to close the WiFi module 102 and establish a connection between the electronic device 100 and the mobile data network through the mobile data network module 103 when the network connection status satisfies a specified condition and the display screen 101 is in the screen-off status.
The WiFi module control apparatus 400 provided in the present application obtains the network connection status and the screen status of the electronic apparatus 100, when the network connection status satisfies a specific condition, for example, the network connection status of the WiFi module 102 is in a network unstable status, and the network connection status of the mobile data network module 103 is in a normal registration, a state that can be connected, and the display screen 101 is in a screen-off status, close the WiFi module 102, avoid the WiFi module 102 from repeatedly connecting to the network and causing the electronic apparatus 100 to consume too much electric power, improve the endurance of the electronic apparatus 100, establish the connection between the electronic apparatus 100 and the mobile data network through the mobile data network module 103, and avoid the electronic apparatus 100 being in a state without network connection.
In some embodiments, the WiFi module control apparatus 400 further includes a first time acquisition unit and a first execution unit. After the screen state acquiring unit 440 performs the operation and before the control unit 460 performs the operation, the first acquiring unit is configured to acquire the current time; the first execution unit is configured to, when the current time is within a preset time period, execute an operation of turning off the WiFi module 102 and establishing a connection between the electronic device 100 and a mobile data network through the mobile data network module 103. The WiFi module 102 is turned off in the preset time period instead of other time periods, so that the influence caused by turning off the WiFi module 102 when the user operates the electronic device 100 can be avoided, the phenomenon that the electronic device 100 consumes excessive electric quantity due to the fact that the WiFi module 102 is repeatedly connected with a network is also avoided, the cruising ability of the electronic device 100 is improved, meanwhile, the electronic device 100 is connected with a mobile data network through the mobile data network module 103, and the electronic device 100 is prevented from being in a state without network connection.
In some embodiments, the WiFi module control apparatus 400 further includes a second time obtaining unit and a second executing unit. After the control unit 460 performs the operation, the second obtaining unit is configured to obtain the current time, and the second executing unit is configured to close the mobile data network module 103 and establish a connection between the electronic device 100 and the WiFi network through the WiFi module 102 when the current time is not within the preset time period. The electronic device 100 can avoid causing expensive mobile data traffic charges to the user by turning off the mobile data network module 103 and establishing a connection with the WiFi network through the WiFi module 102 when the current time is not within the preset time period. In addition, if the network connection state of the WiFi module 102 is still in the network unstable state at this time, the user can know that the current network is in the unstable connection state by using the electronic device 100 to access the network data, so that the user can adjust the network used by the electronic device 100 according to the actual needs of the user.
In some embodiments, the WiFi module control apparatus 400 further includes a power obtaining unit and a third executing unit. The power acquiring unit is used for acquiring the remaining power of the battery 105 after the screen state acquiring unit 440 performs the operation and before the control unit 460 performs the operation; the third execution unit is configured to execute an operation of turning off the WiFi module 102 and establishing a connection between the electronic device 100 and the mobile data network through the mobile data network module 103 when the remaining power of the battery 105 is lower than the preset power value, so that excessive power consumption of the electronic device 100 due to repeated network connection of the WiFi module 102 is avoided, and the duration of the electronic device 100 is prolonged.
In some embodiments, the WiFi module control apparatus 400 further includes a fourth execution unit. After the control unit 460 performs the operation, the fourth execution unit is configured to close the mobile data network module 103 and establish a connection between the electronic device 100 and the WiFi network through the WiFi module 102 when the display 101 receives the screen-up instruction. On one hand, the expensive mobile data traffic cost caused by the excessive use of the mobile data traffic by the user can be avoided, and on the other hand, if the network connection state of the WiFi module 102 is still in the network unstable state at this time, the user can know the current network connection state by accessing the network data through the electronic device 100, which is beneficial for the user to make adjustments according to the actual situation of the user.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the WiFi module control apparatus 400 and the units described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 8, based on the WiFi module control method and the WiFi module control apparatus 400, another electronic apparatus 100 capable of performing the WiFi module control method is provided in the embodiments of the present application. The electronic device 100 includes one or more processors 302 (only one shown), one or more applications, a memory 304, the WiFi module 102, the mobile data network module 103, and the display 101 coupled to each other. Wherein one or more application programs are stored in the memory and configured to be executed by the one or more processors 302, the one or more programs configured to perform the WiFi module control method of any of the embodiments described above.
Processor 302 may include one or more processing cores, among others. The processor 302 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 304 and invoking data stored in the memory 304. Alternatively, the processor 302 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 302 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 302, but may be implemented by a communication chip.
The Memory 304 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 304 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 304 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), etc.
The WiFi module 102 may be used to connect with a WiFi network to enable the electronic device 100 to perform data transmission with the network. The mobile data network module 103 may be used to connect with a mobile data network to enable the electronic device 100 to perform data transmission with the network. The display 101 may be a liquid crystal display or a light emitting diode display or an organic light emitting diode display.
It should be understood that the electronic device 100 in the present embodiment may be a mobile phone or a smart phone (e.g., an iPhone-based phone, Android-based phone), a portable game device (e.g., a Nintendo DS, playstatio portable, game Advance, iPhone), a laptop computer, a PDA, a portable internet device, a music player, a data storage device, and the like. The electronic device 100 may also be any of a plurality of electronic devices 100, the plurality of electronic devices 100 including, but not limited to, cellular phones, smart phones, other wireless communication devices, personal digital assistants, audio players, other media players, music recorders, video recorders, cameras, other media recorders, radios, medical equipment, vehicle transportation equipment, calculators, programmable remote controls, pagers, laptop computers, desktop computers, printers, netbook computers, Personal Digital Assistants (PDAs), Portable Multimedia Players (PMPs), moving Picture experts group (MPEG-1 or MPEG-2) Audio layer 3(MP3) players, portable medical equipment, and digital cameras, and combinations thereof.
Referring to fig. 9, a block diagram of a computer-readable storage medium according to an embodiment of the present application is provided. The computer readable medium 800 has stored therein program code that can be invoked by a processor to perform the control method of the WiFi module 102 of any of the above embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform the control method of the WiFi module 102 of any of the embodiments described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (11)

1. A WiFi module control method is applied to an electronic device, the electronic device comprises a display screen, a WiFi module and a mobile data network module, and the WiFi module control method comprises the following steps:
acquiring a network connection state of the electronic device, wherein the network connection state comprises a connection state of the WiFi module and a connection state of the mobile data network module;
acquiring the screen state of the display screen;
and when the network connection state meets the specified condition and the display screen is in the screen-off state, closing the WiFi module, and establishing the connection between the electronic device and the mobile data network through the mobile data network module.
2. The WiFi module control method of claim 1, wherein the specified condition comprises that the mobile data network module is in a normal registration state and the signal strength of the WiFi module is less than a preset strength threshold.
3. The WiFi module control method of claim 2, wherein the specified condition further includes that the number of times the WiFi module is repeatedly connected within a preset unit time is equal to or greater than a preset number threshold.
4. The WiFi module control method of claim 1, wherein the specified conditions include that the mobile data network module is in a normal registration state and the number of times of the WiFi module connecting repeatedly within a preset unit time is equal to or greater than a preset number threshold.
5. The WiFi module control method of claim 1, wherein after the obtaining the screen status of the display screen, and before the turning off the WiFi module and establishing the connection between the electronic device and a mobile data network through the mobile data network module, the WiFi module control method further comprises:
acquiring the current moment;
and when the current moment is within a preset time period, executing the operation of closing the WiFi module and establishing the connection between the electronic device and a mobile data network through the mobile data network module.
6. The WiFi module control method of claim 1, wherein the electronic device further comprises a battery, and after the obtaining the screen status of the display screen, and before the turning off the WiFi module and establishing the connection between the electronic device and the mobile data network through the mobile data network module, the WiFi module control method further comprises:
acquiring the residual capacity of the battery;
and when the residual electric quantity of the battery is lower than a preset electric quantity value, the operation of closing the WiFi module and establishing the connection between the electronic device and a mobile data network through the mobile data network module is executed.
7. The WiFi module control method of claim 1, wherein after the said turning off the WiFi module and establishing the connection between the electronic device and mobile data network through the mobile data network module, the WiFi module control method further comprises:
and when the display screen receives a screen lightening instruction, closing the mobile data network module, and establishing the connection between the electronic device and a WiFi network through the WiFi module.
8. The WiFi module control method of claim 1, wherein after the said turning off the WiFi module and establishing the connection between the electronic device and mobile data network through the mobile data network module, the WiFi module control method further comprises:
acquiring the current moment;
and when the current moment is not within a preset time period, closing the mobile data network module, and establishing the connection between the electronic device and a WiFi network through the WiFi module.
9. The utility model provides a wiFi module control device, is applied to electron device, electron device includes display screen, wiFi module and mobile data network module, its characterized in that, wiFi module control device includes:
a network connection state acquiring unit, configured to acquire a network connection state of the electronic device, where the network connection state includes a connection state of the WiFi module and a connection state of the mobile data network module;
the screen state acquisition unit is used for acquiring the screen state of the display screen;
and the control unit is used for closing the WiFi module and establishing the connection between the electronic device and the mobile data network through the mobile data network module when the network connection state meets the specified condition and the display screen is in the screen-off state.
10. An electronic device, comprising:
the mobile data network comprises a display screen, a WiFi module and a mobile data network module;
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the WiFi module control method of any of claims 1-8.
11. A computer-readable storage medium having program code stored therein, the program code being invoked by a processor to perform the WiFi module control method of any of claims 1-8.
CN201910865974.9A 2019-09-12 2019-09-12 WiFi module control method, control device, electronic device and storage medium Pending CN110602772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910865974.9A CN110602772A (en) 2019-09-12 2019-09-12 WiFi module control method, control device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910865974.9A CN110602772A (en) 2019-09-12 2019-09-12 WiFi module control method, control device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN110602772A true CN110602772A (en) 2019-12-20

Family

ID=68859222

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910865974.9A Pending CN110602772A (en) 2019-09-12 2019-09-12 WiFi module control method, control device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN110602772A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556804A (en) * 2020-04-24 2021-10-26 华为技术有限公司 Communication network setting method and terminal device
CN114173395A (en) * 2021-12-07 2022-03-11 天翼物联科技有限公司 Network access control method and device, Internet of things terminal equipment and storage medium
CN116347559A (en) * 2023-01-13 2023-06-27 荣耀终端有限公司 Network access method and network access device of electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438079A (en) * 2011-09-22 2012-05-02 中兴通讯股份有限公司 Mobile terminal and control method of wireless fidelity module thereof
US20130005333A1 (en) * 2012-01-05 2013-01-03 Hsin-Ti Chueh Power Saving Method And Related Communication Device
CN105163355A (en) * 2015-09-29 2015-12-16 努比亚技术有限公司 Method and device for switching networks of mobile terminal
CN105873157A (en) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 Automatic network switching method and device, and mobile terminal
CN106255146A (en) * 2016-08-16 2016-12-21 广东欧珀移动通信有限公司 The electricity-saving control method of a kind of terminal, device and terminal
CN106507403A (en) * 2016-10-31 2017-03-15 广州华凌制冷设备有限公司 The control method of wireless network module and control device
CN106535249A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Control method and control device for wireless local area networks, and terminal
CN109982417A (en) * 2019-01-24 2019-07-05 深圳绿米联创科技有限公司 Sensor control method, sensor control, sensor and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438079A (en) * 2011-09-22 2012-05-02 中兴通讯股份有限公司 Mobile terminal and control method of wireless fidelity module thereof
US20130005333A1 (en) * 2012-01-05 2013-01-03 Hsin-Ti Chueh Power Saving Method And Related Communication Device
CN105163355A (en) * 2015-09-29 2015-12-16 努比亚技术有限公司 Method and device for switching networks of mobile terminal
CN105873157A (en) * 2015-11-13 2016-08-17 乐视移动智能信息技术(北京)有限公司 Automatic network switching method and device, and mobile terminal
CN106255146A (en) * 2016-08-16 2016-12-21 广东欧珀移动通信有限公司 The electricity-saving control method of a kind of terminal, device and terminal
CN106535249A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Control method and control device for wireless local area networks, and terminal
CN106507403A (en) * 2016-10-31 2017-03-15 广州华凌制冷设备有限公司 The control method of wireless network module and control device
CN109982417A (en) * 2019-01-24 2019-07-05 深圳绿米联创科技有限公司 Sensor control method, sensor control, sensor and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113556804A (en) * 2020-04-24 2021-10-26 华为技术有限公司 Communication network setting method and terminal device
CN114173395A (en) * 2021-12-07 2022-03-11 天翼物联科技有限公司 Network access control method and device, Internet of things terminal equipment and storage medium
CN114173395B (en) * 2021-12-07 2023-10-20 天翼物联科技有限公司 Network access control method and device, internet of things terminal equipment and storage medium
CN116347559A (en) * 2023-01-13 2023-06-27 荣耀终端有限公司 Network access method and network access device of electronic equipment
CN116347559B (en) * 2023-01-13 2024-03-26 荣耀终端有限公司 Network access method and network access device of electronic equipment

Similar Documents

Publication Publication Date Title
US10440652B2 (en) Power management of a mobile communications device
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
WO2018032581A1 (en) Method and apparatus for application program control
CN106250223B (en) Background process management method and terminal equipment
CN110018901B (en) Memory recovery method and device, computer equipment and computer readable storage medium
CN106776036A (en) A kind of resource allocation methods and device
CN110602772A (en) WiFi module control method, control device, electronic device and storage medium
CN106817753B (en) Method and device for saving electricity by switching background gray scales and mobile terminal
CN106406924B (en) Control method and device for starting and quitting picture of application program and mobile terminal
CN112996089B (en) Data transmission method, device, storage medium and electronic equipment
CN110032266B (en) Information processing method, information processing device, computer equipment and computer readable storage medium
CN110187752A (en) Application operation method and device and terminal equipment
WO2017206903A1 (en) Application control method and related device
CN110543333B (en) Sleep processing method and device for processor, mobile terminal and storage medium
CN107404569B (en) System control method, terminal and computer readable storage medium
CN106454953B (en) Flow control method, device and terminal
CN109511139B (en) WIFI control method and device, mobile device and computer-readable storage medium
CN108255282A (en) A kind of terminal processes management method and terminal
CN109753352A (en) Using processing method, electronic device and the computer readable storage medium freezed
CN106817751B (en) Data sending method and mobile terminal
CN112433694B (en) Light intensity adjusting method and device, storage medium and mobile terminal
CN111045738B (en) Electronic equipment control method and device, electronic equipment and storage medium
CN110471622B (en) SD card data writing method and device, storage medium and terminal
CN111831100B (en) Electronic device control method and device, storage medium and electronic device
CN109726003B (en) Application unfreezing processing method, electronic device and computer readable 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220

RJ01 Rejection of invention patent application after publication