CN105960004B - Mobile terminal positioning function control method and mobile terminal - Google Patents

Mobile terminal positioning function control method and mobile terminal Download PDF

Info

Publication number
CN105960004B
CN105960004B CN201610505811.6A CN201610505811A CN105960004B CN 105960004 B CN105960004 B CN 105960004B CN 201610505811 A CN201610505811 A CN 201610505811A CN 105960004 B CN105960004 B CN 105960004B
Authority
CN
China
Prior art keywords
mobile terminal
screen
positioning function
positioning
application program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610505811.6A
Other languages
Chinese (zh)
Other versions
CN105960004A (en
Inventor
侯现龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Original Assignee
Yulong Computer Telecommunication Scientific Shenzhen 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 Yulong Computer Telecommunication Scientific Shenzhen Co Ltd filed Critical Yulong Computer Telecommunication Scientific Shenzhen Co Ltd
Priority to CN201610505811.6A priority Critical patent/CN105960004B/en
Publication of CN105960004A publication Critical patent/CN105960004A/en
Application granted granted Critical
Publication of CN105960004B publication Critical patent/CN105960004B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • 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
    • 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/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the invention discloses a mobile terminal positioning function control method and a mobile terminal, wherein the method comprises the following steps: detecting whether an application program initiates a positioning request or not in the mobile terminal so as to call a positioning function; when detecting that an application program initiates a positioning request to call the positioning function, detecting the current screen state of the mobile terminal, wherein the screen state comprises a screen on state and a screen off state; and if the current screen state of the mobile terminal is the screen off state, closing the positioning function of the mobile terminal. The embodiment of the invention also discloses a corresponding mobile terminal. The technical scheme provided by the embodiment of the invention can reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the safety of user data.

Description

Mobile terminal positioning function control method and mobile terminal
Technical Field
The invention relates to the field of communication, in particular to a mobile terminal positioning function control method and a mobile terminal.
Background
At present, more and more applications with positioning functions are provided on mobile terminals, such as hundred-degree maps, drip-and-shoot vehicles, popular comments, QQ, WeChat and the like, and the applications can realize the functions of real-time positioning, navigation and the like, thereby bringing great convenience to daily life and work of users.
In the prior art, when a user uses these third-party applications providing location service functions, in order to improve the accuracy of location, the applications prompt the user to start a location function in a mobile terminal system; however, when the user selects to quit the application, the application does not actively prompt the user to turn off the GPS function, which may cause the GPS positioning service to run in the background for a long time regardless of whether the application is used, thereby occupying the system memory for a long time, increasing the system memory overhead, greatly increasing the power consumption of the mobile terminal, and simultaneously posing a certain threat to the privacy security of the user.
Disclosure of Invention
The embodiment of the invention provides a mobile terminal positioning function control method and a mobile terminal, aiming to avoid the problems of increased system memory overhead, high power consumption and leaked user privacy caused by that a GPS positioning service is always operated in a background.
A first aspect of an embodiment of the present invention provides a method for controlling a positioning function of a mobile terminal, including:
detecting whether an application program initiates a positioning request or not in the mobile terminal so as to call a positioning function;
when detecting that an application program initiates a positioning request to call the positioning function, detecting the current screen state of the mobile terminal, wherein the screen state comprises a screen on state and a screen off state;
and if the current screen state of the mobile terminal is the screen off state, closing the positioning function of the mobile terminal.
With reference to the first aspect, in some possible implementations, a screen-off event of the mobile terminal is monitored;
when the screen-off event of the mobile terminal is detected, detecting whether an application program of the mobile terminal initiates a positioning request or not so as to call the positioning function;
and if the positioning request initiated by the application program is detected to be absent so as to call the positioning function, closing the positioning function.
With reference to the first aspect, in some possible implementation manners, after detecting whether an application program initiating a positioning request exists in the mobile terminal to invoke the positioning function, the method further includes:
if detecting that the positioning request initiated by the application program exists, calling the positioning function, and detecting whether the execution of the positioning request initiated by the application program is finished;
and if the execution is finished, closing the positioning function.
With reference to the first aspect, in some possible implementations, after the turning off the positioning function, the method further includes:
monitoring a screen-lightening event of the mobile terminal;
and when the screen-up event is monitored, opening the positioning function of the mobile terminal.
With reference to the first aspect, in some possible implementations, the positioning function includes at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
With reference to the first aspect, in some possible implementations, the monitoring a screen-off event of a mobile terminal includes:
detecting whether screen-off operation is received; if the screen-off operation is detected, monitoring a screen-off event of the mobile terminal;
or detecting whether a touch operation aiming at the mobile terminal is received within a preset time period, and if the touch operation aiming at the mobile terminal is not received within the preset time period, monitoring a screen-off event of the mobile terminal.
A second aspect of an embodiment of the present invention provides a mobile terminal, including:
the mobile terminal comprises a detection unit, a processing unit and a processing unit, wherein the detection unit is used for detecting whether an application program initiates a positioning request or not so as to call a positioning function;
the detection unit is further configured to detect a current screen state of the mobile terminal when detecting that there is a positioning request initiated by an application program to call the positioning function, where the screen state includes a screen-on state and a screen-off state;
and the control unit is used for closing the positioning function of the mobile terminal if the current screen state of the mobile terminal is a screen-off state.
With reference to the second aspect, in some possible implementations, the monitoring unit is configured to monitor a screen-off event of the mobile terminal;
the detection unit is used for detecting whether an application program initiates a positioning request or not when the monitoring unit detects a screen-off event of the mobile terminal so as to call the positioning function;
the control unit is further configured to close the positioning function when the detection unit detects that no application program initiates a positioning request to call the positioning function.
With reference to the second aspect, in some possible implementation manners, after detecting whether an application program-initiated positioning request exists in the mobile terminal to invoke the positioning function, the detecting unit is further configured to detect whether the application program-initiated positioning request is executed completely if it is detected that the application program-initiated positioning request exists to invoke the positioning function;
the control unit is further configured to close the positioning function when the detection unit detects that the execution of the positioning request initiated by the application program is completed.
With reference to the second aspect, in some possible implementations, the monitoring unit is further configured to monitor a screen-up event of the mobile terminal after the control unit turns off the positioning function;
the control unit is further configured to turn on the positioning function of the mobile terminal when the monitoring unit monitors the screen-up event.
With reference to the second aspect, in some possible implementations, the positioning function includes at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
It can be seen that, in the technical solution of the embodiment of the present invention, the mobile terminal detects whether there is a location request initiated by an application program in the mobile terminal to invoke a location function, and detects the current screen state of the mobile terminal when it is detected that there is a location request initiated by an application program to invoke the location function, and if the current screen state of the mobile terminal is a screen-off state, the location function of the mobile terminal is turned off, so as to avoid the problems of increased system memory overhead, large power consumption and leakage of user privacy caused by the location service always running in the background, thereby facilitating to reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the user data security.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for controlling a positioning function of a mobile terminal according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for controlling a positioning function of a mobile terminal according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal according to a fourth embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some embodiments of the present invention, but not all 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 invention.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, and in the above-described drawings, are used for distinguishing between different objects and not for describing a particular order. Furthermore, "include" and "have" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for controlling a positioning function of a mobile terminal according to a first embodiment of the present invention, where as shown in fig. 1, the method for controlling a positioning function of a mobile terminal according to an embodiment of the present invention includes the following steps:
s101, the mobile terminal detects whether the application program of the mobile terminal initiates a positioning request so as to call a positioning function.
Wherein the positioning function comprises at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
Specifically, the Global Positioning System (GPS) is abbreviated as GPS. In short, the system is composed of 24 satellites covering the world, and can ensure that 4 satellites can be observed at any point on the earth at any time, so that the satellite can acquire the longitude and latitude and the height of the observation point, and functions of navigation, positioning, time service and the like are realized. The base station Location Service, also called mobile Location Based Service, LBS for short, is a value added Service that obtains the Location information (longitude and latitude coordinates) of the mobile terminal user through the network (such as GSM network) of the telecom mobile operator, and provides corresponding services for the user under the support of the electronic map platform, such as the dynamic Location query Service provided by the current chinese mobile dynamic zone. Network positioning means that no matter what way the mobile terminal uses, internet access, wireless, wired, optical fiber and dial-up, the mobile terminal always has an IP address/MAC address, the access end also has an IP address and an MAC address, and the IP addresses are distributed according to sections, and the distributed IP addresses of certain access gateways in a region are always in the same section, so that the IP address of the mobile terminal is obtained, and the position of the mobile terminal is approximately obtained. Meanwhile, when the mobile terminal accesses the internet, the server can collect information of the IP address, the MAC address and the actual position. When an application program in the mobile terminal initiates a positioning request in the future, the server compares the collected data to find an address as accurate as possible.
S102, when detecting that an application program initiates a positioning request to call the positioning function, the mobile terminal detects the current screen state of the mobile terminal, wherein the screen state comprises a screen-on state and a screen-off state.
Specifically, the mobile terminal detects the current screen state of the mobile terminal when detecting that an application program initiates a positioning request to call the positioning function and when checking that the positioning function of the mobile terminal is in an open state. The performing action of checking whether the positioning function of the mobile terminal is in the on state may be performed before, after, or simultaneously with the step of detecting whether the mobile terminal has an application program to initiate a positioning request to invoke the positioning function, which is not limited in the embodiments of the present invention.
If the current screen state of the mobile terminal is a screen off state, executing step S103; if the current screen state of the mobile terminal is a bright screen state, executing step S104;
s103, if the current screen state of the mobile terminal is the screen off state, the mobile terminal closes the positioning function of the mobile terminal.
And S104, if the current screen state of the mobile terminal is a bright screen state, the mobile terminal maintains the positioning function of the mobile terminal to be in an open state.
It can be seen that, in the technical solution of the embodiment of the present invention, the mobile terminal detects whether there is a location request initiated by an application program in the mobile terminal to invoke a location function, and detects the current screen state of the mobile terminal when it is detected that there is a location request initiated by an application program to invoke the location function, and if the current screen state of the mobile terminal is a screen-off state, the location function of the mobile terminal is turned off, so as to avoid the problems of increased system memory overhead, large power consumption and leakage of user privacy caused by the location service always running in the background, thereby facilitating to reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the user data security.
Optionally, in some embodiments of the present invention, the mobile terminal may further perform the following operations:
monitoring a screen-off event of the mobile terminal;
when the screen-off event of the mobile terminal is detected, detecting whether an application program of the mobile terminal initiates a positioning request or not so as to call the positioning function;
and if the positioning request initiated by the application program is detected to be absent so as to call the positioning function, closing the positioning function.
Optionally, in some embodiments of the present invention, after detecting whether the mobile terminal has an application program to initiate a positioning request, the mobile terminal may further perform the following operations:
if detecting that the positioning request initiated by the application program exists, calling the positioning function, and detecting whether the execution of the positioning request initiated by the application program is finished;
and if the execution is finished, closing the positioning function.
Optionally, in some embodiments of the present invention, after the mobile terminal turns off the positioning function, the mobile terminal may further perform the following operations:
monitoring a screen-lightening event of the mobile terminal;
and when the screen-up event is monitored, opening the positioning function of the mobile terminal.
Optionally, in some embodiments of the present invention, the positioning function includes at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling a positioning function of a mobile terminal according to a second embodiment of the present invention, where as shown in fig. 2, the method for controlling a positioning function of a mobile terminal according to the embodiment of the present invention includes the following steps:
s201, the mobile terminal monitors a screen-off event of the mobile terminal.
The device may be any device having communication and storage functions, including but not limited to a mobile phone, a mobile computer, a tablet computer, a Personal Digital Assistant (PDA), a media player, a smart watch, smart glasses, a smart band, and the like.
The specific implementation manner of monitoring the screen-off event of the mobile terminal may be:
detecting whether screen-off operation is received; if the screen-off operation is detected, monitoring a screen-off event of the mobile terminal;
or detecting whether a touch operation aiming at the mobile terminal is received within a preset time period, and if the touch operation aiming at the mobile terminal is not received within the preset time period, monitoring a screen-off event of the mobile terminal.
Specifically, the mobile terminal may detect whether a screen-off operation is received, where the screen-off operation may be a screen-off key triggered by a user, and if the screen-off operation is detected, the screen-off event of the mobile terminal is monitored, where the screen-off key of the mobile terminal may be a dedicated key responsible for turning on and off a display screen, or any key in the mobile terminal; or, the mobile terminal may detect whether a touch operation directed to the mobile terminal is received within a preset time period, and if the touch operation directed to the mobile terminal is not received within the preset time period, the screen-off event of the mobile terminal is monitored, for example, if the mobile terminal may detect whether the touch operation directed to the mobile terminal is received within 30s, and if the touch operation directed to the mobile terminal is not received within 30s, the mobile terminal may regard the current state as an unused state, and at this time, the screen-off event of the mobile terminal may be monitored.
S202, when monitoring the screen-off event, the mobile terminal detects whether an application program of the mobile terminal initiates a positioning request so as to call the positioning function.
Specifically, when the mobile terminal monitors the screen-off event and checks that the positioning function of the mobile terminal is started, it is detected whether an application program of the mobile terminal initiates a positioning request, so as to call the positioning function.
Specifically, the mobile terminal may monitor a screen-off event of the mobile terminal when detecting that a positioning function of the mobile terminal is turned on, and detect whether an application program initiates a positioning request to call the positioning function when detecting that the screen-off event is detected; or the mobile terminal can monitor a screen-off event of the mobile terminal, detect whether a positioning function of the mobile terminal is started or not when the screen-off event is monitored, and detect whether an application program initiates a positioning request or not when the positioning function of the mobile terminal is started so as to call the positioning function.
When the application program needs to detect the geographic position, a positioning request is sent to a positioning module of the mobile terminal to call a positioning function. When detecting that the application program initiates the positioning request at the mobile terminal, the system may also count all the application programs calling the positioning function as requesters initiating the positioning, so as to facilitate whether the subsequent positioning request initiated by the application program is executed completely.
If the mobile terminal detects that no application program exists in the mobile terminal to initiate a positioning request so as to call the positioning function, executing step S203 and then executing steps S206 to S207; if the mobile terminal detects that the mobile terminal has the application program to initiate the positioning request so as to call the positioning function, the mobile terminal executes steps S204 to S205 and then executes steps S206 to S207.
S203, if the mobile terminal detects that no application program initiates a positioning request to call the positioning function, closing the positioning function of the mobile terminal.
S204, if the mobile terminal detects that the application program initiates a positioning request, the mobile terminal calls the positioning function and detects whether the execution of the positioning request initiated by the application program is finished;
and S205, if the execution is finished, the mobile terminal closes the positioning function.
S206, the mobile terminal monitors the screen-on event of the mobile terminal.
The mobile terminal can detect whether a screen-up operation of a user is received or not, namely, whether the user triggers a screen-up key or not, and if the user triggers the screen-up key, the screen-up event of the mobile terminal is monitored. The screen-on key of the mobile terminal may be a dedicated key for turning on and off the display screen, or any key in the mobile terminal.
S207, the mobile terminal opens the positioning function of the mobile terminal when monitoring the screen-up event.
It can be seen that, in the technical solution of the embodiment of the present invention, the mobile terminal detects whether there is a location request initiated by an application program in the mobile terminal to invoke a location function, and detects the current screen state of the mobile terminal when it is detected that there is a location request initiated by an application program to invoke the location function, and if the current screen state of the mobile terminal is a screen-off state, the location function of the mobile terminal is turned off, so as to avoid the problems of increased system memory overhead, large power consumption and leakage of user privacy caused by the location service always running in the background, thereby facilitating to reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the user data security.
For convenience of description, only the relevant parts of the embodiments of the present invention are shown, and details of the specific technology are not disclosed.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a mobile terminal according to a third embodiment of the present invention, and as shown in fig. 3, the mobile terminal according to the embodiment of the present invention includes the following units:
a detecting unit 301, configured to detect whether a mobile terminal has an application program to initiate a positioning request, so as to invoke a positioning function;
the detecting unit 301 is further configured to detect a current screen state of the mobile terminal when detecting that there is a positioning request initiated by an application program to call the positioning function, where the screen state includes a screen-on state and a screen-off state;
a control unit 302, configured to close a positioning function of the mobile terminal if the current screen state of the mobile terminal is a screen-off state.
Optionally, in some embodiments of the present invention, the mobile terminal may further include:
a monitoring unit 303, configured to monitor a screen-off event of the mobile terminal;
the detecting unit 301, when the monitoring unit 303 detects a screen-off event of the mobile terminal, is further configured to detect whether an application program of the mobile terminal initiates a positioning request, so as to invoke the positioning function;
the control unit 302 is further configured to close the positioning function when the detection unit detects that there is no application program initiating a positioning request to invoke the positioning function.
Optionally, in some embodiments of the present invention, after detecting whether the mobile terminal has an application program-initiated positioning request to invoke the positioning function, the detecting unit 301 is further configured to detect whether the application program-initiated positioning request is executed completely if it is detected that the application program-initiated positioning request exists to invoke the positioning function;
the control unit 302 is further configured to close the positioning function when the detection unit detects that the execution of the positioning request initiated by the application program is completed.
Optionally, in some embodiments of the present invention, the monitoring unit 303 is further configured to monitor a screen-up event of the mobile terminal after the control unit 302 turns off the positioning function;
the control unit 302 is further configured to turn on the positioning function of the mobile terminal when the monitoring unit monitors the screen-up event.
Optionally, in some embodiments of the present invention, the positioning function includes at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
Specifically, the detailed implementation of each unit may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 and fig. 2, which is not repeated herein.
It can be seen that, in the technical solution of the embodiment of the present invention, the mobile terminal detects whether there is a location request initiated by an application program in the mobile terminal to invoke a location function, and detects the current screen state of the mobile terminal when it is detected that there is a location request initiated by an application program to invoke the location function, and if the current screen state of the mobile terminal is a screen-off state, the location function of the mobile terminal is turned off, so as to avoid the problems of increased system memory overhead, large power consumption and leakage of user privacy caused by the location service always running in the background, thereby facilitating to reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the user data security.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a mobile terminal according to a fourth embodiment of the present invention. As shown in fig. 4, the mobile terminal in the embodiment of the present invention includes: at least one processor 401, e.g., a CPU, at least one receiver 403, at least one memory 404, at least one transmitter 405, at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The receiver 403 and the transmitter 405 of the apparatus in the embodiment of the present invention may be wired transmission ports, or may also be wireless devices, for example, including an antenna apparatus, which is used for performing signaling or data communication with other node devices. The memory 404 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 404 may optionally be at least one memory device located remotely from the processor 401. A set of program codes is stored in the memory 404 and the processor 401 can call the codes stored in the memory 404 through the communication bus 402 to perform the related functions.
The processor 401 is configured to detect whether the mobile terminal has an application program to initiate a positioning request, so as to invoke a positioning function; when detecting that an application program initiates a positioning request to call the positioning function, detecting the current screen state of the mobile terminal, wherein the screen state comprises a screen on state and a screen off state; and if the current screen state of the mobile terminal is the screen off state, closing the positioning function of the mobile terminal.
Optionally, in some embodiments of the present invention, the processor 401 may further be configured to monitor a screen-off event of the mobile terminal; when the screen-off event of the mobile terminal is detected, detecting whether an application program of the mobile terminal initiates a positioning request or not so as to call the positioning function; and if the positioning request initiated by the application program is detected to be absent so as to call the positioning function, closing the positioning function.
Optionally, in some embodiments of the present invention, after the processor 401 is configured to detect whether the mobile terminal has an application program initiated positioning request to invoke the positioning function, if it is detected that the application program initiated positioning request exists to invoke the positioning function, it is further configured to detect whether the execution of the positioning request initiated by the application program is completed; and if the execution is finished, closing the positioning function.
Optionally, in some embodiments of the present invention, the processor 401, after being configured to turn off the positioning function, may be further configured to monitor a bright screen event of the mobile terminal; and when the screen-up event is monitored, opening the positioning function of the mobile terminal.
Optionally, in some embodiments of the present invention, the positioning function includes at least one of the following functions: a GPS positioning function, a network positioning function, and a base station positioning function.
Specifically, the detailed implementation of each unit may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 and fig. 2, which is not repeated herein.
It can be seen that, in the technical solution of the embodiment of the present invention, the mobile terminal detects whether there is a location request initiated by an application program in the mobile terminal to invoke a location function, and detects the current screen state of the mobile terminal when it is detected that there is a location request initiated by an application program to invoke the location function, and if the current screen state of the mobile terminal is a screen-off state, the location function of the mobile terminal is turned off, so as to avoid the problems of increased system memory overhead, large power consumption and leakage of user privacy caused by the location service always running in the background, thereby facilitating to reduce the system overhead of the mobile terminal, prolong the endurance time and ensure the user data security.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the program includes some or all of the steps of any one of the service process monitoring methods described in the above method embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and elements referred to are not necessarily required to practice the invention.
The order of the steps of the method of the embodiments of the present invention may be adjusted, combined, or deleted according to actual needs. The units of the terminal of the embodiment of the invention can be integrated, further divided or deleted according to actual needs.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are illustrative, and for example, the division of the units is a logical division, and in actual implementation, there may be other divisions, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a 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 stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable storage medium, and the storage medium may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above detailed description is provided for the mobile terminal positioning function control method and the mobile terminal provided by the embodiment of the present invention, and a specific example is applied in the present document to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (6)

1. A method for controlling a positioning function of a mobile terminal is characterized by comprising the following steps:
detecting whether a mobile terminal has an application program to initiate a positioning request so as to call a positioning function, wherein the positioning function is one of the following functions: network function positioning or base station positioning functions;
when detecting that an application program initiates a positioning request to call the positioning function, detecting the current screen state of the mobile terminal, wherein the screen state comprises a screen on state and a screen off state;
if the current screen state of the mobile terminal is a screen-off state, closing the positioning function of the mobile terminal;
wherein the method further comprises:
monitoring the screen-off event of the mobile terminal, specifically comprising the following steps: detecting whether screen-off operation is received; if the screen-off operation is detected, in order to monitor a screen-off event of the mobile terminal, triggering a screen-off key by a screen-off operation user;
when the screen-off event of the mobile terminal is detected, detecting whether an application program of the mobile terminal initiates a positioning request or not so as to call the positioning function;
if detecting that no application program initiates a positioning request to call the positioning function, closing the positioning function;
after detecting whether the mobile terminal has an application program to initiate a positioning request to call the positioning function, the method further includes:
if detecting that the positioning request initiated by the application program exists, calling the positioning function, and detecting whether the execution of the positioning request initiated by the application program is finished;
and if the execution is finished, closing the positioning function.
2. The method of claim 1, wherein after said turning off said positioning function, said method further comprises:
monitoring a screen-lightening event of the mobile terminal;
and when the screen-up event is monitored, opening the positioning function of the mobile terminal.
3. The method of claim 2, wherein the positioning function further comprises the following: and a GPS positioning function.
4. A mobile terminal, comprising:
the mobile terminal comprises a detection unit and a processing unit, wherein the detection unit is used for detecting whether a mobile terminal has an application program to initiate a positioning request so as to call a positioning function, and the positioning function is one of the following functions: network function positioning or base station positioning functions;
the detection unit is further configured to detect a current screen state of the mobile terminal when detecting that there is a positioning request initiated by an application program to call the positioning function, where the screen state includes a screen-on state and a screen-off state;
the control unit is used for closing the positioning function of the mobile terminal if the current screen state of the mobile terminal is a screen-off state;
wherein the mobile terminal further comprises:
the monitoring unit is used for monitoring the screen-off event of the mobile terminal, and specifically comprises the following steps: detecting whether screen-off operation is received; if the screen-off operation is detected, in order to monitor a screen-off event of the mobile terminal, triggering a screen-off key by a screen-off operation user;
the detection unit is used for detecting whether an application program initiates a positioning request or not when the monitoring unit detects a screen-off event of the mobile terminal so as to call the positioning function;
the control unit is used for closing the positioning function when the detection unit detects that no application program initiates a positioning request to call the positioning function;
the detection unit is used for detecting whether an application program initiated positioning request exists in the mobile terminal or not so as to call the positioning function, and then detecting whether the application program initiated positioning request is executed or not if the application program initiated positioning request is detected to call the positioning function;
the control unit is further configured to close the positioning function when the detection unit detects that the execution of the positioning request initiated by the application program is completed.
5. The mobile terminal of claim 4,
the monitoring unit is further configured to monitor a screen-up event of the mobile terminal after the control unit closes the positioning function;
the control unit is further configured to turn on the positioning function of the mobile terminal when the monitoring unit monitors the screen-up event.
6. The mobile terminal of claim 5, wherein the positioning function further comprises: and a GPS positioning function.
CN201610505811.6A 2016-06-30 2016-06-30 Mobile terminal positioning function control method and mobile terminal Active CN105960004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610505811.6A CN105960004B (en) 2016-06-30 2016-06-30 Mobile terminal positioning function control method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610505811.6A CN105960004B (en) 2016-06-30 2016-06-30 Mobile terminal positioning function control method and mobile terminal

Publications (2)

Publication Number Publication Date
CN105960004A CN105960004A (en) 2016-09-21
CN105960004B true CN105960004B (en) 2020-04-07

Family

ID=56902742

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610505811.6A Active CN105960004B (en) 2016-06-30 2016-06-30 Mobile terminal positioning function control method and mobile terminal

Country Status (1)

Country Link
CN (1) CN105960004B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106231563A (en) * 2016-09-29 2016-12-14 宇龙计算机通信科技(深圳)有限公司 A kind of reduce the method for power consumption, device and terminal
CN107884796A (en) * 2016-09-30 2018-04-06 中兴通讯股份有限公司 A kind of global positioning system location processing method and terminal
CN108170484A (en) * 2016-12-05 2018-06-15 中兴通讯股份有限公司 A kind of control method and device
CN106888432A (en) * 2017-01-23 2017-06-23 北京奇虎科技有限公司 The optimization method of alignment system performance, device and mobile terminal
CN106851801B (en) * 2017-01-23 2019-11-26 北京安云世纪科技有限公司 Optimization method, device and the mobile terminal of positioning system performance
CN106878945B (en) * 2017-01-23 2019-11-26 北京安云世纪科技有限公司 Optimization method, device and the mobile terminal of positioning system performance
CN107040979B (en) * 2017-03-23 2020-05-19 北京珠穆朗玛移动通信有限公司 Control method of functional module and mobile terminal
CN107148074A (en) * 2017-06-06 2017-09-08 深圳天珑无线科技有限公司 A kind of location processing method and its electronic equipment
CN107317923B (en) * 2017-06-19 2021-06-01 深圳传音通讯有限公司 Method, device and terminal for controlling GPS running state
CN107423618B (en) * 2017-07-12 2021-08-10 惠州Tcl移动通信有限公司 Application program satellite positioning request control method, storage device and mobile terminal
CN107786746B (en) * 2017-10-27 2020-10-30 北京小米移动软件有限公司 Control method, device and system for traffic application and storage medium
CN116546132B (en) * 2023-07-06 2023-11-03 荣耀终端有限公司 Network identification method, device, mobile terminal and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012735A (en) * 2009-09-07 2011-04-13 三竹资讯股份有限公司 Power supply management method for mobile device
CN103491262A (en) * 2013-09-24 2014-01-01 广州市久邦数码科技有限公司 Intelligent power saving mode switching system of mobile terminal
CN104780269A (en) * 2015-03-24 2015-07-15 广东欧珀移动通信有限公司 Method and device for regulating performance of mobile terminal based on electric quantity
CN104793995A (en) * 2015-04-27 2015-07-22 广东欧珀移动通信有限公司 Method and device for controlling GPS invocation
CN105550204A (en) * 2015-12-01 2016-05-04 小米科技有限责任公司 Method and device for controlling position locating module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012735A (en) * 2009-09-07 2011-04-13 三竹资讯股份有限公司 Power supply management method for mobile device
CN103491262A (en) * 2013-09-24 2014-01-01 广州市久邦数码科技有限公司 Intelligent power saving mode switching system of mobile terminal
CN104780269A (en) * 2015-03-24 2015-07-15 广东欧珀移动通信有限公司 Method and device for regulating performance of mobile terminal based on electric quantity
CN104793995A (en) * 2015-04-27 2015-07-22 广东欧珀移动通信有限公司 Method and device for controlling GPS invocation
CN105550204A (en) * 2015-12-01 2016-05-04 小米科技有限责任公司 Method and device for controlling position locating module

Also Published As

Publication number Publication date
CN105960004A (en) 2016-09-21

Similar Documents

Publication Publication Date Title
CN105960004B (en) Mobile terminal positioning function control method and mobile terminal
CN112492589B (en) Method and device for accessing equipment identifier
CN111757426B (en) Roaming network access method and device
CN106155789B (en) Application freezing method and mobile terminal
WO2018149137A1 (en) Wireless fidelity (wi-fi) connection method and related product
EP3107335B1 (en) Network searching method of terminal and terminal
CN106465248B (en) Roaming network access method and device
CN104486727A (en) Mobile phone anti-theft method and system based on Android system
WO2018166265A1 (en) Method for searching for network and terminal
JP2020509622A (en) Wireless network type detection method and apparatus and electronic device
CN104023315A (en) Password input method and device based on geographical location information
CN113114669B (en) GOIP gateway identification method, device, equipment and storage medium based on gateway data
US10111047B2 (en) Positioning method and device
CN109923506A (en) Information processing method and positioning chip, mobile terminal
EP2843918B1 (en) Restricting the operation of an electronic device
CN113132906B (en) Virtual positioning identification method and device, storage medium and electronic equipment
CN106791134B (en) Method for dialing network telephone, mobile terminal and vehicle-mounted device
CN107396313B (en) Positioning triggering method and system
CN106375993B (en) Electronic equipment, electronic equipment searching system and method
CN114501566A (en) Network switching method and device
CN105204836B (en) Information processing method and electronic equipment
CN107864275B (en) Application setting method and device, mobile terminal and computer readable storage medium
CN108770043B (en) Network marking method, device, readable storage medium and mobile terminal
CN108111561B (en) Data downloading method and equipment thereof
WO2019134638A1 (en) Information processing method and device, terminal, and storage medium

Legal Events

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