WO2018103381A1 - 加快终端Wi-Fi工作站模式关闭速度的方法及移动终端 - Google Patents

加快终端Wi-Fi工作站模式关闭速度的方法及移动终端 Download PDF

Info

Publication number
WO2018103381A1
WO2018103381A1 PCT/CN2017/099201 CN2017099201W WO2018103381A1 WO 2018103381 A1 WO2018103381 A1 WO 2018103381A1 CN 2017099201 W CN2017099201 W CN 2017099201W WO 2018103381 A1 WO2018103381 A1 WO 2018103381A1
Authority
WO
WIPO (PCT)
Prior art keywords
application layer
terminal
thread
wpa
mode
Prior art date
Application number
PCT/CN2017/099201
Other languages
English (en)
French (fr)
Inventor
蒋世民
Original Assignee
广东欧珀移动通信有限公司
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 广东欧珀移动通信有限公司 filed Critical 广东欧珀移动通信有限公司
Publication of WO2018103381A1 publication Critical patent/WO2018103381A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/04Arrangements for maintaining operational condition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/543Local

Definitions

  • the present invention claims the priority of the prior invention filed on December 7, 2016, entitled “Method for speeding up the closing speed of the terminal WiFi workstation mode and mobile terminal” application number 201611119559.1, the content of the above prior application being introduced Into this text.
  • the present invention relates to the field of mobile terminal technologies, and in particular, to a method for speeding up a Wi-Fi workstation mode shutdown speed of a terminal and a mobile terminal.
  • Wi-Fi Wireless fidelity
  • IEEE 802.11 IEEE-defined wireless network communication
  • a Wi-Fi-enabled mobile communication terminal such as a mobile phone
  • Wi-Fi STA Wireless Fidelity Station
  • the mobile communication terminal works in In the Wi-Fi workstation mode, as a terminal connection router, it can also be used as a Wi-Fi AP (wireless fidelity access point) to access other Wi-Fi STAs.
  • Wi-Fi STA Wireless Fidelity Station
  • Wi-Fi AP wireless fidelity access point
  • an embodiment of the present invention provides a method for speeding up a Wi-Fi workstation mode shutdown speed of a terminal, where the method is applied to a terminal installed with an Android system, where the Android system includes a driver layer, an application layer, and a wpa-supplicant process.
  • the wpa-supplicant process is configured to process data exchange between the application layer and the driver layer, and the method includes:
  • the terminal invokes an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received
  • the terminal invokes the application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, invokes the driver layer to start the first thread to perform the shutdown wpa-supplicant process, and opens the second The thread performs a message reporting to the application layer that the Wi-Fi workstation mode is closed, and the message is used to notify the application layer to disconnect the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • an embodiment of the present invention provides a mobile terminal, where the mobile terminal is installed with an Android system, where the Android system includes a driver layer, an application layer, and a wpa-supplicant process, where the wpa-supplicant process is used for processing Data exchange between the application layer and the driver layer, where the mobile terminal includes:
  • a detecting unit configured to invoke an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received
  • An execution unit configured to: when the detecting unit invokes an application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, invoke the driver layer to start the first thread to execute the shutdown wpa-supplicant process, and start the second thread to execute the
  • the application layer reports a message that the Wi-Fi workstation mode is closed, and the message is used to notify the application layer to disconnect the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • an embodiment of the present invention provides a mobile terminal, including:
  • processor a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface are connected by the communication bus and complete communication with each other;
  • the memory stores executable program code for wireless communication
  • the processor is configured to invoke the executable program code in the memory to perform some or all of the steps described in any of the methods of the first aspect of the embodiments of the present invention.
  • an embodiment of the present invention provides a storage medium, where the storage medium stores a program, and the program is used to perform the steps described in any one of the first aspects of the embodiments of the present invention.
  • FIG. 1 is a schematic flowchart of a method for speeding up a Wi-Fi workstation mode shutdown speed of a terminal according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart diagram of another method for speeding up a Wi-Fi workstation mode shutdown speed according to an embodiment of the present invention
  • FIG. 3 is a schematic flow chart of another method for speeding up a Wi-Fi workstation mode shutdown speed according to an embodiment of the present invention
  • 4-1 is a block diagram of a unit structure of a mobile terminal according to an embodiment of the present invention.
  • 4-2 is a block diagram of a unit structure of a mobile terminal according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another mobile terminal according to an embodiment of the present invention.
  • references to "an embodiment” herein mean that a particular feature, structure, or characteristic described in connection with the embodiments can be included in at least one embodiment of the invention.
  • the appearances of the phrases in various places in the specification are not necessarily referring to the same embodiment, and are not exclusive or alternative to the other embodiments. Example. Those skilled in the art will understand and implicitly understand that the embodiments described herein can be combined with other embodiments.
  • the Wi-Fi workstation mode is slowed down, resulting in the mobile communication terminal being in the Wi-Fi workstation mode. Switching to Wi-Fi access point mode or moving data networks is slower.
  • the terminal invokes the application layer to detect whether the instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi-Fi workstation mode is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, where the message is used to notify the application layer to disconnect the application layer and
  • the driver layer is based on the data exchange path of the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode off, which is beneficial to speed up the shutdown speed of the terminal Wi-Fi workstation mode, thereby facilitating the mobile terminal to switch from the Wi-Fi workstation mode. Switching speed to Wi-Fi access point mode or mobile data network.
  • FIG. 1 is a schematic diagram of a method for speeding up a Wi-Fi workstation mode shutdown speed according to an embodiment of the present invention.
  • the method is applied to a terminal installed with an Android system, where the Android system includes a driver layer and an application layer.
  • the wpa-supplicant process the wpa-supplicant process is used to process data exchange between the application layer and the driver layer, as shown in FIG. 1 , in the embodiment of the present invention, the speed of the terminal Wi-Fi workstation mode is accelerated.
  • Methods include:
  • the terminal invokes an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received.
  • the terminal includes, but is not limited to, a portable mobile terminal such as a smart phone, a tablet computer, a notebook computer, a personal digital assistant, and the like, and may also include a non-mobile terminal such as a desktop computer.
  • a portable mobile terminal such as a smart phone, a tablet computer, a notebook computer, a personal digital assistant, and the like
  • a non-mobile terminal such as a desktop computer.
  • the instruction to turn off the Wi-Fi workstation mode may be a local command or a remote remote command.
  • the man-machine can be passed
  • the interactive interface receives an instruction triggered by the user to turn off the Wi-Fi workstation mode.
  • the terminal invokes the application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, the terminal invokes the driver layer to start the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the
  • the application layer reports a message that the Wi-Fi workstation mode is closed, and the message is used to notify the application layer to disconnect the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • wpa-supplicant was originally an open source project source code, which was modified by Google to join the android mobile platform. It is mainly used to support WEP, WPA/WPA2 and WAPI wireless protocols and encryption authentication, but the actual work content is through socket ( Regardless of whether the wpa-supplicant and the application layer or the wpa-supplicant and the driver layer use socket communication, the driver interacts with the driver to report data to the user, and the user can send a command to the wpa-supplicant to drive the Wi-Fi chip through the socket. That is, simply put, wpa-supplicant is the relay station of the Wi-Fi driver layer and the application layer plus support for protocol and encryption authentication.
  • the Android Wi-Fi system introduces wpa_supplicant, and its entire Wi-Fi system defines the upper user interface and the lower layer driver interface with wpa_supplicant as the core. That is, in the Android system, when the Wi-Fi workstation mode is turned on, a process called wpa-supplicant is loaded, which is used to handle the data exchange between the application layer and the driver layer, when the Wi-Fi workstation mode is turned off. Will uninstall wpa_supplicant, and then notify the application layer Wi-Fi workstation mode is off, in order to start switching to the data network or access point mode.
  • a new thread can be opened to synchronize the unloading of wpa-supplicant and the main thread to report the Wi-Fi workstation mode shutdown message to the application layer, thereby speeding up the terminal Wi-Fi workstation mode shutdown speed.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open application layer and driver layer based on The data exchange path of the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode off, which is beneficial to speed up the shutdown speed of the terminal Wi-Fi workstation mode, thereby facilitating the mobile terminal to switch from the Wi-Fi workstation mode. Switching speed to Wi-Fi access point mode or mobile data network.
  • the terminal may further perform the following: operating:
  • the mobile communication network identifier is displayed on the display screen of the terminal.
  • the terminal may further perform the following: operating:
  • the terminal invokes the application layer to receive the message that the Wi-Fi workstation mode is off, detecting whether an instruction to enable the Wi-Fi access point mode is received;
  • the Wi-Fi access point mode identifier is displayed on the display screen of the terminal.
  • the terminal invokes the application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, invokes the driver layer to enable the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the instruction.
  • the terminal may also perform the following operations:
  • the terminal When the current CPU usage of the mobile terminal is detected to be less than or equal to a preset threshold, the terminal is called to enable the first thread to start the shutdown wpa-supplicant process, and the second thread is executed to report to the application layer.
  • the steps for the Wi-Fi workstation mode to close the message When the current CPU usage of the mobile terminal is detected to be less than or equal to a preset threshold, the terminal is called to enable the first thread to start the shutdown wpa-supplicant process, and the second thread is executed to report to the application layer.
  • the steps for the Wi-Fi workstation mode to close the message.
  • the terminal invokes the application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, invokes the driver layer to enable the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the instruction.
  • the terminal may also perform the following operations:
  • the terminal When detecting that the current remaining power is greater than or equal to the preset power threshold, the terminal invoking the driver layer to start the first thread to perform the shutdown wpa-supplicant process, and starting the second thread to execute to the application layer The step of reporting a message that the Wi-Fi workstation mode is off.
  • FIG. 2 is another method for speeding up the closing speed of a Wi-Fi workstation mode of a terminal according to an embodiment of the present invention.
  • the method is applied to a terminal installed with an Android system, where the Android system includes a driver layer and an application. And a wpa-supplicant process, where the wpa-supplicant process is used to process data exchange between the application layer and the driver layer.
  • the method for speeding up the shutdown speed of the terminal Wi-Fi workstation mode includes:
  • the terminal invokes an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received.
  • the terminal When detecting that the current CPU usage of the mobile terminal is less than or equal to a preset threshold, the terminal invokes the driver layer to enable the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute to the application layer. And reporting, by the application layer, the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open the data exchange path between the application layer and the driver layer based on the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode shutdown, which is beneficial to speed up the terminal.
  • the Wi-Fi workstation mode turns off the speed, which in turn facilitates the switching speed of the mobile terminal from the Wi-Fi workstation mode to the Wi-Fi access point mode or the mobile data network.
  • FIG. 3 is another method for speeding up the shutdown speed of a terminal Wi-Fi workstation mode according to an embodiment of the present invention.
  • the method is applied to a terminal installed with an Android system, and the Android system includes a driver layer and an application. And a wpa-supplicant process, where the wpa-supplicant process is used to process data exchange between the application layer and the driver layer.
  • the method for speeding up the shutdown speed of the terminal Wi-Fi workstation mode includes:
  • the terminal invokes an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received.
  • the terminal When detecting that the current remaining power is greater than or equal to the preset power threshold, the terminal invokes the driver layer to start the first thread to perform the shutdown wpa-supplicant process, and starts the second thread to execute the application.
  • the layer reports a message that the Wi-Fi workstation mode is closed, and the message is used to notify the application layer to disconnect the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open the data exchange path between the application layer and the driver layer based on the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode shutdown, which is beneficial to speed up the terminal.
  • the Wi-Fi workstation mode turns off the speed, which in turn facilitates the switching speed of the mobile terminal from the Wi-Fi workstation mode to the Wi-Fi access point mode or the mobile data network.
  • the apparatus embodiment of the present invention is used to implement the method implemented by the method embodiment of the present invention.
  • the mobile terminal is installed with an Android system, and the Android system includes a driver layer, an application layer, and a wpa-supplicant process, where the wpa-supplicant process is used to process data exchange between the application layer and the driver layer, as shown in FIG. 4 .
  • the mobile terminal may include a detecting unit 401 and an executing unit 402, where:
  • the detecting unit 401 is configured to invoke an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received;
  • the executing unit 402 is configured to: when the detecting unit 401 invokes an application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, invoke the driving layer to start the first thread to execute the shutdown wpa-supplicant process, and enable the second The thread performs a message reporting to the application layer that the Wi-Fi workstation mode is closed, and the message is used to notify the application layer to disconnect the data exchange path of the application layer and the driver layer based on the wpa-supplicant process.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open the data exchange path between the application layer and the driver layer based on the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode off, which is beneficial to speed up the shutdown speed of the terminal Wi-Fi workstation mode, thereby facilitating the mobile terminal to switch from the Wi-Fi workstation mode. Switching speed to Wi-Fi access point mode or mobile data network.
  • FIG. 4-2 is a block diagram of another unit of a mobile terminal according to an embodiment of the present invention.
  • the mobile terminal may include a detecting unit 401 and an implementation in the embodiment corresponding to FIG. 4-1.
  • the mobile terminal further includes:
  • a first display unit 403 after the execution unit 402 is configured to invoke the driver layer to start the first thread to perform the shutdown wpa-supplicant process, and after the second thread is started to perform the reporting of the Wi-Fi workstation mode shutdown message to the application layer, And when the application layer of the mobile terminal receives the message that the Wi-Fi workstation mode is turned off, displaying the mobile communication network identifier on the display screen of the mobile terminal.
  • the detecting unit 401 is configured to invoke the driving layer to start the first thread to perform the shutdown wpa-supplicant process, and enable the second thread to perform the reporting to the application layer to report the Wi-Fi workstation mode to be closed.
  • the message is further configured to: when the application layer of the mobile terminal receives the message that the Wi-Fi workstation mode is turned off, detecting whether an instruction to enable the Wi-Fi access point mode is received;
  • the mobile terminal further includes:
  • the second display unit 404 is configured to display a Wi-Fi access point mode identifier on a display screen of the mobile terminal when detecting that the instruction to enable the Wi-Fi access point mode is received.
  • the detecting unit 401 is configured to: when the terminal invokes the application layer to detect the receiving the instruction to disable the Wi-Fi workstation mode, the executing unit 402 is configured to invoke the driving layer to start the first thread to perform the closing wpa-
  • the supplicant process is used to detect whether the current CPU usage of the terminal is less than or equal to a preset threshold before the second thread performs the message of reporting the Wi-Fi workstation mode shutdown to the application layer.
  • the mobile terminal further includes:
  • the first triggering unit 405 is configured to trigger the execution unit 402 to execute the terminal to invoke the driver layer to start the first thread when the detecting unit 401 detects that the current CPU usage of the mobile terminal is less than or equal to a preset threshold.
  • the operation of shutting down the wpa-supplicant process is performed, and the second thread is started to perform a message reporting the Wi-Fi workstation mode shutdown to the application layer.
  • the detecting unit 401 is configured to: when the mobile terminal invokes an application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, the executing unit 402 is configured to invoke the driving layer to enable the first thread to perform the closing of the wpa.
  • the -supplicant process is used to detect whether the current remaining power of the terminal is greater than or equal to the preset power threshold before the second thread performs the message of reporting the Wi-Fi workstation mode shutdown to the application layer.
  • the mobile terminal further includes:
  • the second triggering unit 406 is configured to: when the detecting unit 401 detects that the current remaining power is greater than or equal to the preset power threshold, the execution unit 402 is configured to perform the terminal to invoke the driver layer to start first.
  • the thread execution closes the wpa-supplicant process, and starts the second thread to perform an operation of reporting the message of the Wi-Fi workstation mode shutdown to the application layer.
  • the mobile terminal described in the device embodiment of the present invention is presented in the form of a functional unit.
  • the term "unit” as used herein shall be understood to mean the broadest possible meaning, and the object for implementing the functions described for each "unit” may be, for example, an integrated circuit ASIC, a single circuit for executing one or more software or firmware.
  • a processor shared, dedicated or chipset
  • memory of the program combinatorial logic, and/or other suitable components that perform the functions described above.
  • the function of the foregoing detecting unit to call the application layer to detect whether the instruction to turn off the Wi-Fi workstation mode is received may be implemented by the mobile terminal shown in FIG. 5, and may be specifically called by the processor 101 by calling the memory 102. Executable program code that calls the application layer to detect if an instruction to turn off the Wi-Fi station mode is received.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open the data exchange path between the application layer and the driver layer based on the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode off, which is beneficial to speed up the shutdown speed of the terminal Wi-Fi workstation mode, thereby facilitating the mobile terminal to switch from the Wi-Fi workstation mode. Switching speed to Wi-Fi access point mode or mobile data network.
  • An embodiment of the present invention further provides another mobile terminal, where the mobile terminal is installed with a terminal of an Android system, where the Android system includes a driver layer, an application layer, and a wpa-supplicant process, where the wpa-supplicant process is used for processing Data exchange between the application layer and the driver layer.
  • the Android system includes a driver layer, an application layer, and a wpa-supplicant process, where the wpa-supplicant process is used for processing Data exchange between the application layer and the driver layer.
  • the processor 101 includes: a processor 101, a memory 102, a communication interface 103, and a communication bus 104;
  • the processor 101, the memory 102, and the communication interface 103 are connected and communicate with each other through the communication bus 104;
  • the processor 101 controls wireless communication with the external cellular network through the communication interface 103;
  • the communication interface 103 includes but is not limited to an antenna, an amplifier, and a transceiver Signal, coupler, LNA (Low Noise Amplifier), duplexer, etc.
  • the memory 102 includes at least one of: a random access memory, a nonvolatile memory, and an external memory, the memory 102 storing executable program code capable of directing the processor 101 to perform the method embodiment of the present invention
  • a method specifically for speeding up the shutdown speed of a terminal Wi-Fi workstation mode is disclosed.
  • the processor 101 is configured to invoke an application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received; when the processor 101 invokes an application layer to detect that the instruction to turn off the Wi-Fi workstation mode is received, The processor 101 is further configured to invoke the driver layer to enable the first thread to execute the shutdown wpa-supplicant process, and enable the second thread to perform a message reporting the Wi-Fi workstation mode shutdown to the application layer, where the message is used to notify the application.
  • the layer disconnects the data exchange path of the application layer from the driver layer based on the wpa-supplicant process.
  • the processor 101 is configured to invoke the driver layer to start the first thread to perform the shutdown wpa-supplicant process, and start the second thread to perform the reporting of the Wi-Fi workstation mode shutdown message to the application layer
  • the processor 101 is further configured to display a mobile communication network identifier on a display screen of the mobile terminal when the mobile terminal terminal invokes an application layer to receive the message that the Wi-Fi workstation mode is turned off.
  • the processor 101 is further configured to: when the terminal invokes the message that the application layer receives the Wi-Fi workstation mode off, detecting whether an instruction to enable the Wi-Fi access point mode is received; detecting that the opening is received When the Wi-Fi access point mode is commanded, the Wi-Fi access point mode identifier is displayed on the display screen of the terminal.
  • the calling driver layer starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the orientation.
  • the application layer reports the message that the Wi-Fi workstation mode is off, it is further used to detect whether the current CPU usage of the terminal is less than or equal to a preset threshold;
  • the execution driver layer starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to perform the message reporting the Wi-Fi workstation mode shutdown to the application layer. operating.
  • the calling driver layer starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the orientation.
  • the application layer reports the message that the Wi-Fi workstation mode is off, it is further used to detect whether the current remaining power of the terminal is greater than or equal to a preset power threshold; when detecting that the current remaining power is greater than or equal to the preset
  • the execution of the calling driver layer starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to perform the operation of reporting the Wi-Fi workstation mode shutdown message to the application layer.
  • the terminal invokes the application layer to detect whether an instruction to turn off the Wi-Fi workstation mode is received, and the application layer of the terminal detects that the Wi is turned off.
  • the driver layer of the terminal starts the first thread to execute the shutdown wpa-supplicant process, and starts the second thread to execute the message reporting the Wi-Fi workstation mode shutdown to the application layer, the message is used to notify the application layer to break. Open the data exchange path between the application layer and the driver layer based on the wpa-supplicant process.
  • the mobile terminal will close the wpa-supplicant process and report the message to the application layer to report the Wi-Fi workstation mode off, which is beneficial to speed up the shutdown speed of the terminal Wi-Fi workstation mode, thereby facilitating the mobile terminal to switch from the Wi-Fi workstation mode. Switching speed to Wi-Fi access point mode or mobile data network.
  • the embodiment of the present invention further provides another mobile terminal.
  • the mobile terminal may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a car computer, and the like, and the mobile terminal is used as a mobile phone as an example:
  • PDA personal digital assistant
  • POS point of sales
  • FIG. 6 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal provided by an embodiment of the present invention.
  • the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, and wireless fidelity (wireless).
  • RF radio frequency
  • Fidelity, Wi-Fi) module 970, processor 980, and power supply 990 and the like Fidelity, Wi-Fi module 970, processor 980, and power supply 990 and the like.
  • the structure of the handset shown in FIG. 6 does not constitute a limitation to the handset, and may include more or less components than those illustrated, or some components may be combined, or different components may be arranged.
  • the RF circuit 910 can be used for receiving and transmitting information.
  • RF circuit 910 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.
  • LNA low noise amplifier
  • RF circuitry 910 can also communicate with the network and other devices via wireless communication.
  • the above wireless communication may use any communication standard or protocol, including but not limited to global system of mobile communication (GSM), general packet radio service (GPRS), code division multiple access (code division) Multiple access (CDMA), wideband code division multiple access (WCDMA), long term evolution (LTE), e-mail, short message service (SMS), and the like.
  • GSM global system of mobile communication
  • GPRS general packet radio service
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • LTE long term evolution
  • SMS short message service
  • the memory 920 can be used to store software programs and modules, and the processor 980 executes various functional applications and data processing of the mobile phone by running software programs and modules stored in the memory 920.
  • the memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function, and the like; the storage data area may store data created according to usage of the mobile phone, and the like.
  • memory 920 can include high speed random access memory, and can 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 930 can be configured to receive input numeric or character information and to generate key signal inputs related to user settings and function controls of the handset.
  • the input unit 930 can include a fingerprint identification module 931 and other input devices 932.
  • the fingerprint identification module 931 can collect fingerprint data of the user.
  • the fingerprint identification module 931 can include an optical fingerprint module, a capacitive fingerprint module, and a radio frequency fingerprint module.
  • the fingerprint identification module 931 is an example of a capacitive fingerprint recognition module, and specifically includes a sensing electrode (an abnormal sensing electrode and a normal sensing electrode) and a signal processing circuit (such as an amplifying circuit, a noise suppression circuit, and a mode) connected to the sensing electrode. Number conversion circuit, etc.).
  • the input unit 930 may also include other input devices 932.
  • other input devices 932 may include but are not limited to physical keyboards, function keys (such as volume control buttons, switch buttons) One or more of a trackball, a mouse, a joystick, and the like.
  • the display unit 940 can be used to display information input by the user or information provided to the user as well as various menus of the mobile phone.
  • the display unit 940 can include a display screen 941.
  • the display screen 941 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the fingerprint recognition module 931 and the display screen 941 function as two separate components to implement the input and input functions of the mobile phone, in some embodiments, the fingerprint recognition module 931 and the display screen 941 can be Integrated to achieve the input and output functions of the phone.
  • the handset may also include at least one type of sensor 950, such as a light sensor, motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen 941 according to the brightness of the ambient light, and the proximity sensor may turn off the display screen 941 and/or when the mobile phone moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the mobile phone can be used to identify the gesture of the mobile phone (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the gesture of the mobile phone such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the mobile phone can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • An audio circuit 960, a speaker 961, and a microphone 962 can provide an audio interface between the user and the handset.
  • the audio circuit 960 can transmit the converted electrical data of the received audio data to the speaker 961, and convert it into a sound signal output by the speaker 961.
  • the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data output processor 980, sent to the other mobile phone via the RF circuit 910, or outputted to the memory 920 for further processing.
  • Wi-Fi is a short-range wireless transmission technology.
  • the mobile phone can help users to send and receive e-mail, browse web pages and access streaming media through the Wi-Fi module 970, which provides users with wireless broadband Internet access.
  • FIG. 6 shows the Wi-Fi module 970, it can be understood that it does not belong to the essential configuration of the mobile phone, and can be omitted as needed within the scope of not changing the essence of the invention.
  • the processor 980 is the control center of the handset, connecting various portions of the entire handset using various interfaces and lines, by running or executing software programs and/or modules stored in the memory 920, and calling The data stored in the memory 920 performs various functions of the mobile phone and processes the data, thereby performing overall monitoring of the mobile phone.
  • the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It will be appreciated that the above described modem processor may also not be integrated into the processor 980.
  • the handset also includes a power source 990 (such as a battery) that supplies power to the various components.
  • a power source 990 such as a battery
  • the power source can be logically coupled to the processor 980 through a power management system to manage functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • each step method flow can be implemented based on the structure of the mobile phone.
  • each unit function can be implemented based on the structure of the handset.
  • the embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium can store a program, and the program includes any one of the methods described in the foregoing method embodiments for speeding up the closing speed of the Wi-Fi workstation mode of the terminal. Some or all of the steps.
  • the disclosed apparatus may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • Another point, the mutual coupling or direct coupling or communication connection shown or discussed The connection may be an indirect coupling or communication connection through some interface, device or unit, and may be in electrical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a memory. A number of instructions are included to cause a computer device (which may be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing memory includes: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk, and the like, which can store program codes.

Abstract

一种加快终端Wi-Fi工作站模式关闭速度的方法及移动终端,其中的方法包括:所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令(S101);在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息(S102),所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。

Description

加快终端Wi-Fi工作站模式关闭速度的方法及移动终端
本发明要求2016年12月7日递交的发明名称为“加快终端WiFi工作站模式关闭速度的方法及移动终端”的申请号201611119559.1的在先申请优先权,上述在先申请的内容以引入的方式并入本文本中。
技术领域
本发明涉及移动终端技术领域,具体涉及一种加快终端Wi-Fi工作站模式关闭速度的方法及移动终端。
背景技术
无线保真(wireless fidelity,Wi-Fi)是IEEE定义的一个无线网络通信的工业标准(IEEE 802.11)。现有技术中具有Wi-Fi功能的移动通信终端(例如手机),其Wi-Fi功能即可以作为Wi-Fi STA(wireless fidelity station,Wi-Fi工作站)来实现,即该移动通信终端工作在Wi-Fi工作站模式下,作为终端连接路由器上网,也可以作为Wi-Fi AP(wireless fidelity access point,Wi-Fi接入点)来接入其他Wi-Fi STA,即作为接入点为周边设备提供网络接入服务。
发明内容
第一方面,本发明实施例提供一种加快终端Wi-Fi工作站模式关闭速度的方法,所述方法应用于安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,所述方法包括:
所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二 线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
第二方面,本发明实施例提供了一种移动终端,所述移动终端安装有安卓系统,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,所述移动终端包括:
检测单元,用于调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
执行单元,用于在所述检测单元调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
第三方面,本发明实施例提供了一种移动终端,包括:
处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线连接并完成相互间的通信;
所述存储器存储有可执行程序代码,所述通信接口用于无线通信;
所述处理器用于调用所述存储器中的所述可执行程序代码,执行本发明实施例第一方面任一方法中所描述的部分或全部步骤。
第四方面,本发明实施例提供了一种存储介质,所述存储介质存储有程序,所述程序用于执行本发明实施例第一方面任一方法所述的步骤。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例公开的一种加快终端Wi-Fi工作站模式关闭速度的方法的流程示意图;
图2是本发明实施例公开的另一种加快终端Wi-Fi工作站模式关闭速度的方法的流程示意图;
图3是本发明实施例公开的另一种加快终端Wi-Fi工作站模式关闭速度的方法的流程示意图;
图4-1是本发明实施例公开的一种移动终端的单元组成框图;
图4-2是本发明实施例公开的一种移动终端的单元组成框图;
图5是本发明实施例公开的一种移动终端的结构示意图;
图6是本发明实施例公开的另一种移动终端的结构示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实 施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。
现有技术中,当移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络时,由于Wi-Fi工作站模式关闭速度较慢,导致移动通信终端由Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的速度较慢。
本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
为了更好理解本发明实施例公开的一种加快终端Wi-Fi工作站模式关闭速度的方法及移动终端,下面对本发明实施例进行详细介绍。
请参阅图1,图1是本发明实施例提供的一种加快终端Wi-Fi工作站模式关闭速度的方法,所述方法应用于安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,如图1所示,本发明实施例中的加快终端Wi-Fi工作站模式关闭速度的方法包括:
S101、所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令。
其中,所述终端包括但不限于智能手机(Smart Phone)、平板电脑、笔记本电脑、个人数字助理等便携式移动终端,也可以包括台式计算机等非移动终端。
这里,所述关闭Wi-Fi工作站模式的指令可以是本地指令,也可以是远程遥控指令。当所述关闭Wi-Fi工作站模式的指令是本地指令时,可以通过人机 交互界面接收由用户触发的关闭Wi-Fi工作站模式的指令。
S102、在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
其中,wpa-supplicant原本是开源项目源码,被谷歌修改后加入android移动平台,它主要是用来支持WEP,WPA/WPA2和WAPI无线协议和加密认证的,而实际上的工作内容是通过socket(不管是wpa-supplicant与应用层还是wpa-supplicant与驱动层都采用socket通讯)与驱动交互上报数据给用户,而用户可以通过socket发送命令给wpa-supplicant调动驱动层来对Wi-Fi芯片操作,即,简单地说,wpa-supplicant就是Wi-Fi驱动层和应用层的中转站外加对协议和加密认证的支持。
安卓Wi-Fi系统引入了wpa_supplicant,它的整个Wi-Fi系统以wpa_supplicant为核心来定义上层用户接口和下层驱动接口。即,在安卓系统中,打开Wi-Fi工作站模式的时候会加载一个叫做wpa-supplicant的进程,他是用来处理应用层与驱动层的数据交换的核心,在关闭Wi-Fi工作站模式的时候会去卸载wpa_supplicant,然后通知应用层Wi-Fi工作站模式关闭,这样之后才能开始切换到数据网络或者接入点模式。由于卸载wpa-supplicant耗时长并且与向应用层上报Wi-Fi工作站模式关闭的消息没有关系,所以,在本发明实施例中,在关闭Wi-Fi的过程中,当所有其他流程都已经完成,可以另外开辟一个新的线程来同步处理卸载wpa-supplicant与主线程向应用层上报Wi-Fi工作站模式关闭的消息,进而实现加快终端Wi-Fi工作站模式关闭速度。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于 wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
可选的,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述终端还可以执行以下操作:
当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述终端的显示屏幕上显示移动通信网络标识。
可选的,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述终端还可以执行以下操作:
当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;
在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述终端的显示屏幕上显示Wi-Fi接入点模式标识。
可选的,在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,所述终端还可以执行以下操作:
检测所述终端当前的CPU使用率是否小于或等于预设阈值;
在检测到所述移动终端当前的CPU使用率小于或等于预设阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的步骤。
可选的,在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,所述终端还可以执行以下操作:
检测所述终端当前的剩余电量是否大于或等于预设电量阈值;
在检测到所述移动终端当当前的剩余电量大于或等于预设电量阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的步骤。
请参阅图2,图2是本发明实施例提供的另一种加快终端Wi-Fi工作站模式关闭速度的方法,所述方法应用于安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,如图2所示,本加快终端Wi-Fi工作站模式关闭速度的方法包括:
S201、所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令。
S202、在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,检测所述终端当前的CPU使用率是否小于或等于预设阈值。
S203、在检测到所述移动终端当前的CPU使用率小于或等于预设阈值时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
S204、当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述终端的显示屏幕上显示移动通信网络标识。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端 Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
请参阅图3,图3是本发明实施例提供的另一种加快终端Wi-Fi工作站模式关闭速度的方法,所述方法应用于安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,如图3所示,本加快终端Wi-Fi工作站模式关闭速度的方法包括:
S301、所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令。
S302、在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,检测所述终端当前的剩余电量是否大于或等于预设电量阈值。
S303、在检测到所述移动终端当当前的剩余电量大于或等于预设电量阈值时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
S304、当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令。
S305、在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述终端的显示屏幕上显示Wi-Fi接入点模式标识。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端 Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
下面为本发明装置实施例,本发明装置实施例用于执行本发明方法实施例所实现的方法。所述移动终端安装有安卓系统,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,如图4-1所示,该移动终端可以包括检测单元401和执行单元402,其中:
所述检测单元401,用于调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
所述执行单元402,用于在所述检测单元401调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
如图4-2所示,图4-2是本发明实施例提供的另一种移动终端的单元组成框图,该移动终端可以包括如图4-1对应的实施例中的检测单元401和执行单元402。
可选的,所述移动终端还包括:
第一显示单元403,在所述执行单元402用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,用于当所述移动终端的应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述移动终端的显示屏幕上显示移动通信网络标识。
可选的,所述检测单元401,在所述执行单元402用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,还用于当所述移动终端的应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;
所述移动终端还包括:
第二显示单元404,用于在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述移动终端的显示屏幕上显示Wi-Fi接入点模式标识。
可选的,所述检测单元401,在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述执行单元402用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述终端当前的CPU使用率是否小于或等于预设阈值;
所述移动终端还包括:
第一触发单元405,用于在所述检测单元401检测到所述移动终端当前的CPU使用率小于或等于预设阈值时,触发所述执行单元402执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
可选的,所述检测单元401,在所述移动终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述执行单元402用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述终端当前的剩余电量是否大于或等于预设电量阈值;
所述移动终端还包括:
第二触发单元406,用于在所述检测单元401检测到所述移动终端当当前的剩余电量大于或等于预设电量阈值时,触发所述执行单元402执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
需要注意的是,本发明装置实施例所描述的移动终端是以功能单元的形式呈现。这里所使用的术语“单元”应当理解为尽可能最宽的含义,用于实现各个“单元”所描述功能的对象例如可以是集成电路ASIC,单个电路,用于执行一个或多个软件或固件程序的处理器(共享的、专用的或芯片组)和存储器,组合逻辑电路,和/或提供实现上述功能的其他合适的组件。
举例来说,上述所述检测单元调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令的功能可以由图5所示的移动终端来实现,具体可以通过处理器101通过调用存储器102中的可执行程序代码,调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
本发明实施例还提供了另一种移动终端,所述移动终端安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换。如图5所示,包括:处理器101,存储器102,通信接口103和通信总线104;其中, 处理器101、存储器102和通信接口103通过通信总线104连接并完成相互间的通信;处理器101通过通信接口103控制与外部蜂窝网的无线通信;通信接口103包括但不限于天线、放大器、收发信机、耦合器、LNA(Low Noise Amplifier,低噪声放大器)、双工器等。存储器102包括以下至少一种:随机存取存贮器、非易失性存储器以及外部存储器,存储器102中存储有可执行程序代码,该可执行程序代码能够引导处理器101执行本发明方法实施例中具体披露的加快终端Wi-Fi工作站模式关闭速度的方法。
所述处理器101,用于调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;在所述处理器101调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述处理器101还用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
可选的,在所述处理器101用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述处理器101还用于当所述移动终端终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述移动终端的显示屏幕上显示移动通信网络标识。
可选的,在所述处理器101用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述处理器101还用于当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述终端的显示屏幕上显示Wi-Fi接入点模式标识。
可选的,在所述处理器101调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述终端当前的CPU使用率是否小于或等于预设阈值;在检测到所述移 动终端当前的CPU使用率小于或等于预设阈值时,执行驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
可选的,在所述处理器101调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述终端当前的剩余电量是否大于或等于预设电量阈值;在检测到所述移动终端当当前的剩余电量大于或等于预设电量阈值时,执行调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
可以看出,本发明实施例提供的加快终端Wi-Fi工作站模式关闭速度的方法中,终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,在终端的应用层检测接收到关闭Wi-Fi工作站模式的指令时,终端的驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向应用层上报Wi-Fi工作站模式关闭的消息,上述消息用于通知应用层断开应用层与驱动层基于wpa-supplicant进程的数据交换通路。可见,移动终端将关闭wpa-supplicant进程与向应用层上报Wi-Fi工作站模式关闭的消息并行处理,有利于加快终端Wi-Fi工作站模式关闭速度,进而有利于移动终端从Wi-Fi工作站模式切换到Wi-Fi接入点模式或者移动数据网络的切换速度。
本发明实施例还提供了另一种移动终端,如图6所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该移动终端可以为包括手机、平板电脑、个人数字助理(personal digital assistant,PDA)、销售终端(point of sales,POS)、车载电脑等任意终端设备,以移动终端为手机为例:
图6示出的是与本发明实施例提供的移动终端相关的手机的部分结构的框图。参考图6,手机包括:射频(radio frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(wireless  fidelity,Wi-Fi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图6中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图6对手机的各个构成部件进行具体的介绍:
RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(global system of mobile communication,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址(code division multiple access,CDMA)、宽带码分多址(wideband code division multiple access,WCDMA)、长期演进(long term evolution,LTE)、电子邮件、短消息服务(short message service,SMS)等。
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据手机的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元930可用于接收输入的数字或字符信息,以及生成与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括指纹识别模组931以及其他输入设备932。指纹识别模组931,可采集用户在其上的指纹数据。可选的,指纹识别模组931可包括光学式指纹模块、电容式指纹模块以及射频式指纹模块。以指纹识别模组931为电容式指纹识别模组为例,具体包括感应电极(异常感应电极和正常感应电极)和与所述感应电极连接的信号处理电路(如放大电路、噪声抑制电路、模数转化电路,等等)。除了指纹识别模组931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键 等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示屏941,可选的,可以采用液晶显示器(liquid crystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示屏941。虽然在图6中,指纹识别模组931与显示屏941是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将指纹识别模组931与显示屏941集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器950,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示屏941的亮度,接近传感器可在手机移动到耳边时,关闭显示屏941和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音信号输出;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据输出处理器980处理后,经RF电路910以发送给比如另一手机,或者将音频数据输出至存储器920以便进一步处理。
Wi-Fi属于短距离无线传输技术,手机通过Wi-Fi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图6示出了Wi-Fi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用 存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器980可包括一个或多个处理单元;优选的,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。
手机还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。
前述图1、图2和图3所示的实施例中,各步骤方法流程可以基于该手机的结构实现。
前述图4-1和4-2所示的实施例中,各单元功能可以基于该手机的结构实现。
本发明实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的任何一种加快终端Wi-Fi工作站模式关闭速度的方法的部分或全部步骤。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连 接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(read-only memory,ROM)、随机存取器(random access memory,RAM)、磁盘或光盘等。
以上对本发明实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (20)

  1. 一种加快终端Wi-Fi工作站模式关闭速度的方法,其特征在于,所述方法应用于安装有安卓系统的终端,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,所述方法包括:
    所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
    在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
  2. 如权利要求1所述的方法,其特征在于,所述关闭Wi-Fi工作站模式的指令包括本地指令,和/或远程遥控指令。
  3. 如权利要求1所述的方法,其特征在于,当所述关闭Wi-Fi工作站模式的指令是本地指令时,所述终端调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令,包括
    所述终端调用应用层检测是否通过人机交互界面接收到由用户触发的关闭Wi-Fi工作站模式的指令。
  4. 如权利要求1所述的方法,其特征在于,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述方法还包括:
    当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述终端的显示屏幕上显示移动通信网络标识。
  5. 如权利要求1所述的方法,其特征在于,所述终端调用驱动层开启第 一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,所述方法还包括:
    当所述终端调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;
    在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述终端的显示屏幕上显示Wi-Fi接入点模式标识。
  6. 如权利要求4或5所述的方法,其特征在于,在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,所述方法还包括:
    检测所述终端当前的CPU使用率是否小于或等于预设阈值;
    在检测到所述终端当前的CPU使用率小于或等于预设阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的步骤。
  7. 如权利要求4或5所述的方法,其特征在于,在所述终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,所述方法还包括:
    检测所述终端当前的剩余电量是否大于或等于预设电量阈值;
    在检测到所述终端当前的剩余电量大于或等于预设电量阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的步骤。
  8. 一种移动终端,其特征在于,所述移动终端安装有安卓系统,所述安卓系统包括驱动层、应用层和wpa-supplicant进程,所述wpa-supplicant进程用于处理所述应用层和所述驱动层的数据交换,所述移动终端包括:
    检测单元,用于调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
    执行单元,用于在所述检测单元调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
  9. 如权利要求8所述的移动终端,其特征在于,所述关闭Wi-Fi工作站模式的指令包括本地指令,和/或远程遥控指令。
  10. 如权利要求8所述的移动终端,其特征在于,当所述关闭Wi-Fi工作站模式的指令是本地指令时,所述检测单元,具体用于调用应用层检测是否通过人机交互界面接收到由用户触发的关闭Wi-Fi工作站模式的指令。
  11. 如权利要求8所述的移动终端,其特征在于,所述移动终端还包括:
    第一显示单元,在所述执行单元用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,用于当所述移动终端的应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述移动终端的显示屏幕上显示移动通信网络标识。
  12. 如权利要求8所述的移动终端,其特征在于,
    所述检测单元,在所述执行单元用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之后,还用于当所述移动终端的应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;
    所述移动终端还包括:
    第二显示单元,用于在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述移动终端的显示屏幕上显示Wi-Fi接入点模式标识。
  13. 如权利要求11或12所述的移动终端,其特征在于,
    所述检测单元,在所述移动终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述执行单元用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述终端当前的CPU使用率是否小于或等于预设阈值;
    所述移动终端还包括:
    第一触发单元,用于在所述检测单元检测到所述移动终端当前的CPU使用率小于或等于预设阈值时,触发所述执行单元执行调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
  14. 如权利要求11或12所述的移动终端,其特征在于,
    所述检测单元,在所述移动终端调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,所述执行单元用于调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息之前,还用于检测所述移动终端当前的剩余电量是否大于或等于预设电量阈值;
    所述移动终端还包括:
    第二触发单元,用于在所述检测单元检测到所述移动终端在当前的剩余电量大于或等于预设电量阈值时,触发所述执行单元执行调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
  15. 一种移动终端,其特征在于,包括:
    处理器、存储器、通信接口和通信总线,所述处理器、所述存储器和所述通信接口通过所述通信总线连接并完成相互间的通信;
    所述存储器存储有可执行程序代码,所述通信接口用于无线通信;
    所述处理器用于调用所述存储器中的所述可执行程序代码,执行以下操作:
    调用应用层检测是否接收到关闭Wi-Fi工作站模式的指令;
    在调用应用层检测接收到所述关闭Wi-Fi工作站模式的指令时,调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息,所述消息用于通知所述应用层断开所述应用层与所述驱动层基于所述wpa-supplicant进程的数据交换通路。
  16. 如权利要求15所述的移动终端,其特征在于,所述关闭Wi-Fi工作站模式的指令包括本地指令,和/或远程遥控指令。
  17. 如权利要求15所述的移动终端,其特征在于,所述处理器还用于调用所述存储器中的所述可执行程序代码,执行以下操作:
    当调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,在所述终端的显示屏幕上显示移动通信网络标识。
  18. 如权利要求15所述的移动终端,其特征在于,所述处理器还用于调用所述存储器中的所述可执行程序代码,执行以下操作:
    当调用应用层接收到所述Wi-Fi工作站模式关闭的消息时,检测是否接收到开启Wi-Fi接入点模式的指令;
    在检测到接收到所述开启Wi-Fi接入点模式的指令时,在所述终端的显示屏幕上显示Wi-Fi接入点模式标识。
  19. 如权利要求15所述的移动终端,其特征在于,所述处理器还用于调用所述存储器中的所述可执行程序代码,执行以下操作:
    检测所述终端当前的CPU使用率是否小于或等于预设阈值;
    在检测到所述终端当前的CPU使用率小于或等于预设阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程 执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
  20. 如权利要求15所述的移动终端,其特征在于,所述处理器还用于调用所述存储器中的所述可执行程序代码,执行以下操作:
    检测所述终端当前的剩余电量是否大于或等于预设电量阈值;
    在检测到所述终端当前的剩余电量大于或等于预设电量阈值时,执行所述终端调用驱动层开启第一线程执行关闭wpa-supplicant进程,并开启第二线程执行向所述应用层上报Wi-Fi工作站模式关闭的消息的操作。
PCT/CN2017/099201 2016-12-07 2017-08-26 加快终端Wi-Fi工作站模式关闭速度的方法及移动终端 WO2018103381A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611119559.1A CN106708633B (zh) 2016-12-07 2016-12-07 加快终端WiFi工作站模式关闭速度的方法及移动终端
CN201611119559.1 2016-12-07

Publications (1)

Publication Number Publication Date
WO2018103381A1 true WO2018103381A1 (zh) 2018-06-14

Family

ID=58937613

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099201 WO2018103381A1 (zh) 2016-12-07 2017-08-26 加快终端Wi-Fi工作站模式关闭速度的方法及移动终端

Country Status (2)

Country Link
CN (1) CN106708633B (zh)
WO (1) WO2018103381A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040535A (zh) * 2020-09-02 2020-12-04 青岛海信传媒网络技术有限公司 一种Wifi处理方法及显示设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106708633B (zh) * 2016-12-07 2018-07-06 广东欧珀移动通信有限公司 加快终端WiFi工作站模式关闭速度的方法及移动终端
CN107479934B (zh) * 2017-08-22 2020-08-11 四川长虹电器股份有限公司 Android设备Wi-Fi快速开关的方法
CN112272398B (zh) * 2020-11-13 2024-01-19 Oppo广东移动通信有限公司 一种数据传输方法、装置、电子设备及存储介质
CN112312394B (zh) * 2020-11-27 2023-03-31 展讯半导体(成都)有限公司 一种无线保真Wi-Fi管理方法、装置及相关设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100284370A1 (en) * 2009-05-07 2010-11-11 Prince Samar Wireless network inter-technology handoffs
CN102567022A (zh) * 2011-12-28 2012-07-11 中国电子科技集团公司第四十一研究所 一种频谱分析仪类仪器系统的框架式设计方法
CN205356588U (zh) * 2016-01-14 2016-06-29 南京融教科技有限公司 一种基于Wi-Fi的智能中控系统
CN106020942A (zh) * 2016-05-05 2016-10-12 四川安嵌科技有限公司 一种基于多系统的WiFi设备复用方法及装置
CN106060971A (zh) * 2016-06-24 2016-10-26 付韶明 一种无线网络信号增强设备
CN106708633A (zh) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 加快终端WiFi工作站模式关闭速度的方法及移动终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100284370A1 (en) * 2009-05-07 2010-11-11 Prince Samar Wireless network inter-technology handoffs
CN102567022A (zh) * 2011-12-28 2012-07-11 中国电子科技集团公司第四十一研究所 一种频谱分析仪类仪器系统的框架式设计方法
CN205356588U (zh) * 2016-01-14 2016-06-29 南京融教科技有限公司 一种基于Wi-Fi的智能中控系统
CN106020942A (zh) * 2016-05-05 2016-10-12 四川安嵌科技有限公司 一种基于多系统的WiFi设备复用方法及装置
CN106060971A (zh) * 2016-06-24 2016-10-26 付韶明 一种无线网络信号增强设备
CN106708633A (zh) * 2016-12-07 2017-05-24 广东欧珀移动通信有限公司 加快终端WiFi工作站模式关闭速度的方法及移动终端

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040535A (zh) * 2020-09-02 2020-12-04 青岛海信传媒网络技术有限公司 一种Wifi处理方法及显示设备
CN112040535B (zh) * 2020-09-02 2022-10-28 青岛海信传媒网络技术有限公司 一种Wifi处理方法及显示设备

Also Published As

Publication number Publication date
CN106708633B (zh) 2018-07-06
CN106708633A (zh) 2017-05-24

Similar Documents

Publication Publication Date Title
WO2018103381A1 (zh) 加快终端Wi-Fi工作站模式关闭速度的方法及移动终端
US11212677B2 (en) Method for accessing wireless network, and terminal device
US10813058B2 (en) Method for processing information and terminal device
WO2018049881A1 (zh) 一种数据迁移方法及装置
WO2018049886A1 (zh) 建立热点的方法及终端设备
WO2017215512A1 (zh) 音频流处理方法及相关设备
WO2018049913A1 (zh) 数据传输方法及相关设备
WO2018103443A1 (zh) 一种网络定位方法及终端设备
WO2018045878A1 (zh) 触摸屏参数的调整方法及相关产品
WO2018219119A1 (zh) 应用功能的控制方法及相关产品
WO2018049884A1 (zh) 一种数据迁移方法及装置
WO2017206895A1 (zh) 应用控制方法及相关设备
WO2019029618A1 (zh) Ims语音通话网络的切换方法、存储设备及移动终端
WO2018126804A1 (zh) 一种小区注册方法及装置
WO2018049885A1 (zh) 一种数据迁移方法及装置
WO2018214744A1 (zh) 信息处理方法及相关产品
WO2018133519A1 (zh) 一种小区注册方法及装置
WO2019011324A1 (zh) 确定移动终端接入方式的方法、存储介质及移动终端
WO2019047973A1 (zh) 一种终端操作方法及终端、计算机可读存储介质
WO2019034110A1 (zh) 按键控制方法、存储介质及智能终端
CN110072013B (zh) 终端控制方法及装置
WO2019011231A1 (zh) 降低移动终端sar值的方法及存储介质、移动终端
CN105100361B (zh) 移动终端的录音方法及装置
WO2017000495A1 (zh) 一种添加联系人的方法及设备
WO2019109987A1 (zh) 移动终端及指纹录音操作处理方法、及存储介质

Legal Events

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

Ref document number: 17878968

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17878968

Country of ref document: EP

Kind code of ref document: A1