WO2018103374A1 - 一种控制方法和装置 - Google Patents

一种控制方法和装置 Download PDF

Info

Publication number
WO2018103374A1
WO2018103374A1 PCT/CN2017/098848 CN2017098848W WO2018103374A1 WO 2018103374 A1 WO2018103374 A1 WO 2018103374A1 CN 2017098848 W CN2017098848 W CN 2017098848W WO 2018103374 A1 WO2018103374 A1 WO 2018103374A1
Authority
WO
WIPO (PCT)
Prior art keywords
positioning
application
precision
function
positioning function
Prior art date
Application number
PCT/CN2017/098848
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 WO2018103374A1 publication Critical patent/WO2018103374A1/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • 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
    • 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

Definitions

  • the present disclosure relates to the field of communication technologies, and in particular, to a control method and apparatus.
  • the positioning modes that the application can use when using the positioning function include: high-precision positioning mode and coarse precision positioning mode.
  • the high-precision positioning mode uses GPS (Global Positioning System) for positioning. High-precision positioning mode consumes a lot of power, especially when using GSP positioning.
  • GPS Global Positioning System
  • the coarse precision positioning mode uses WLAN (Wireless Local Area Networks), Bluetooth or mobile network positioning.
  • the coarse precision positioning mode consumes less power than the high-precision positioning mode.
  • the user Before the application uses the positioning function, the user needs to manually turn on the positioning function, such as turning on the GPS module, the WLAN module, and the Bluetooth module. After using the mobile terminal, if you want to reduce the power consumption of the mobile terminal, the user needs to manually turn off the positioning function. For the user, the use of the positioning function is not smart enough, and the operation process is complicated.
  • the embodiments of the present disclosure provide a control method and apparatus for solving the problem that the use of the existing positioning function is not intelligent enough.
  • An embodiment of the present disclosure provides a control method, including: determining an application having high-precision positioning authority; and if the application requests high-precision positioning, opening the high-precision positioning corresponding to the application a positioning function; monitoring an operating state of the application and/or a positioning state of the positioning function, and controlling an enabling parameter of the positioning function according to the monitoring result.
  • the positioning function corresponding to the high-precision positioning mode is enabled for the application, including: acquiring in the positioning request initiated by the application. a positioning precision keyword; if the positioning precision keyword is a high-precision positioning mode, the positioning function corresponding to the high-precision positioning mode is turned on for the application.
  • the application program with high-precision positioning permission is determined, including: acquiring an application package corresponding to the application; in the application package, viewing access permission information of the application; if the access permission information includes high-precision positioning The permission information determines that the application has high-precision positioning authority.
  • the monitoring the working status of the application, and controlling the enabling parameter of the positioning function according to the monitoring result includes: if the process is detected to be destroyed or the application is running in the background, then the GPS.
  • the monitoring the positioning status of the positioning function, and performing the switching control on the positioning function according to the monitoring result including: if the location information reported by the positioning function is not changed, and the duration exceeds the preset second
  • the time threshold turns off the positioning function.
  • An embodiment of the present disclosure further provides a control apparatus, the apparatus comprising: a determining module configured to determine an application having high-precision positioning authority; and an opening module configured to: if the application requests high-precision positioning, The application program starts the positioning function corresponding to the high-precision positioning; the control module is configured to monitor an operating state of the application and/or a positioning state of the positioning function, and control the enabling of the positioning function according to the monitoring result. parameter.
  • the opening module is configured to obtain a positioning precision keyword in a positioning request initiated by the application; if the positioning precision keyword is a high-precision positioning mode, The application starts the positioning function corresponding to the high-precision positioning mode.
  • the determining module is configured to obtain an application package corresponding to the application; in the application package, view the access permission information of the application; if the access permission information includes high-precision positioning permission information, determine The application has high precision positioning rights.
  • the control module is configured to: if the process is detected to be destroyed or the application is running in the background, the positioning function is turned off.
  • the control module is configured to: if the location information reported by the positioning function is not changed, and the duration exceeds a preset second time threshold, the positioning function is turned off.
  • a storage medium is further provided, and the storage medium may store an execution instruction for performing the implementation of the control method in the above embodiment.
  • the positioning function corresponding to the high-precision positioning is automatically turned on, and the opening and closing states of the positioning function are intelligently controlled according to the usage of the positioning function, thereby reducing system overhead and reducing power consumption. the amount.
  • FIG. 1 is a flowchart of a control method according to a first embodiment of the present disclosure
  • FIG. 2 is a flowchart of a control method according to a second embodiment of the present disclosure
  • FIG. 3 is a flow chart showing the steps of opening a positioning function according to a third embodiment of the present disclosure
  • FIG. 4 is a flow chart showing the steps of positioning function control according to a fourth embodiment of the present disclosure.
  • FIG. 5 is a configuration diagram of a control device according to a fifth embodiment of the present disclosure.
  • FIG. 1 is a flowchart of a control method according to a first embodiment of the present disclosure.
  • the execution subject of this embodiment is a mobile terminal.
  • step S110 an application with high-precision positioning authority is determined.
  • the application has high-precision positioning permission, coarse precision positioning permission, or both high-precision positioning permission and coarse precision positioning permission.
  • Step S120 If the application requests high-precision positioning, the positioning function corresponding to the high-precision positioning is turned on for the application.
  • the positioning precision keyword is obtained in the positioning request initiated by the application; if the positioning precision keyword is the high-precision positioning mode, the positioning function corresponding to the high-precision positioning mode is enabled for the application.
  • the positioning accuracy keyword can be a high precision positioning mode or a coarse precision positioning mode.
  • the high-precision positioning mode corresponds to high-precision positioning
  • the coarse-precision positioning mode corresponds to coarse precision positioning.
  • an application with high-precision positioning permission can request high-precision positioning.
  • An application with coarse precision positioning permission can request coarse precision positioning, and an application with high-precision positioning permission and coarse precision positioning permission can Requesting high-precision positioning and requesting access to coarse precision positioning.
  • An application with high-precision positioning permission and coarse precision positioning authority is also an application with high-precision positioning permission, but in the positioning request initiated by the positioning request keyword, the positioning precision keyword can be either a high-precision positioning mode or a coarse Accuracy positioning mode, so the positioning function corresponding to high-precision positioning is enabled only when an application with high-precision positioning permission requests high-precision positioning.
  • Step S130 Monitor an operating state of the application and/or a positioning state of the positioning function, and control an enabling parameter of the positioning function according to the monitoring result.
  • the enable parameters include: On and Off. Monitoring the working state of the application and/or the positioning state of the positioning function, and performing switching control on the positioning function according to the monitoring result.
  • the positioning function is turned off. If it is detected that the location information reported by the positioning function does not change, and the duration exceeds a preset second time threshold, the positioning function is turned off.
  • the positioning function corresponding to the high-precision positioning is automatically turned on, and the opening and closing states of the positioning function are intelligently controlled according to the usage of the positioning function, thereby reducing system overhead and reducing power consumption.
  • control method of the present disclosure is further described below.
  • 2 is a flow chart of a control method according to a second embodiment of the present disclosure.
  • Step S210 Acquire a positioning precision keyword in a positioning request initiated by an application.
  • the application is an application pre-installed in the mobile terminal.
  • the application is Baidu map, Didi taxi, mobile Taobao, public comment and so on.
  • the application is an application that has positioning rights and can use the positioning function.
  • the positioning accuracy requirements include a high-precision positioning mode and a coarse-precision positioning mode, wherein the positioning accuracy of the high-precision positioning mode is higher than the positioning accuracy of the coarse-precision positioning mode.
  • Step S220 If the positioning precision keyword is a high-precision positioning mode, the positioning function corresponding to the high-precision positioning mode is turned on.
  • the positioning accuracy keyword is a high-precision positioning mode or a coarse-precision positioning mode.
  • Positioning functions include, but are not limited to, GPS positioning function, WLAN positioning function, Bluetooth positioning function, and mobile communication positioning function.
  • GPS positioning enables satellite positioning.
  • the WLAN positioning function, the Bluetooth positioning function, and the mobile communication positioning function can all access the network, and the WLAN positioning function, the Bluetooth positioning function, and the mobile terminal communication positioning function can all be positioned according to the signal strength.
  • the high-precision positioning mode is used for high-precision positioning, and the corresponding positioning function can be a GPS positioning function.
  • the coarse precision positioning mode is used for coarse precision positioning, and the corresponding positioning function may be a WLAN positioning function, a Bluetooth positioning function, and a mobile communication positioning function. Normally, the WLAN positioning function, the Bluetooth positioning function, and the mobile communication positioning function are turned on.
  • the positioning function corresponding to the high-precision positioning mode is turned on. If the positioning precision keyword is the coarse precision positioning mode, the positioning function corresponding to the coarse precision positioning mode is turned on. In general, the positioning function corresponding to the coarse precision positioning mode is on.
  • the application has high-precision positioning permission, coarse precision positioning permission, or both high-precision positioning permission and coarse precision positioning permission.
  • Applications with high-precision positioning permissions can request high-precision positioning.
  • Applications with coarse precision targeting can request coarse precision positioning.
  • an application with high-precision positioning permission and coarse precision positioning permission can request high-precision positioning and can request coarse precision positioning.
  • the positioning function corresponding to the high-precision positioning mode consumes a large amount of power during positioning, and the system memory overhead is large. Therefore, in order to reduce system power consumption and reduce system memory overhead, the embodiment initiates positioning in an application with high-precision positioning authority.
  • the positioning precision keyword is obtained in the positioning request, and when the positioning precision keyword is in the high-precision positioning mode, the positioning function corresponding to the high-precision positioning mode is turned on, and the positioning function is switched.
  • the application can use the positioning function to perform the positioning operation, turn off the positioning function, and the application cannot use the positioning function.
  • the positioning operation is, for example, a sliding navigation interface, displaying a position identifier on a map, and prompting a voice road condition.
  • the positioning operation can be performed by turning on the positioning function corresponding to the high-precision positioning mode.
  • the positioning function reports the current location information every predetermined time period. For example: report the current GPS information of the mobile terminal.
  • Step S230 monitoring an operating state of the application and/or a positioning state of the positioning function, and performing switching control on the positioning function according to the monitoring result.
  • the working state of the application and/or the positioning state of the positioning function can reflect the application's use of the positioning function.
  • the working state of the application includes but is not limited to: off, on, running, and being operated.
  • the positioning status of the positioning function includes, but is not limited to, a change in the position information of the positioning.
  • the first method is to monitor the working state of the application, and perform switching control on the positioning function according to the monitoring result, including: if the application is detected to be closed, the positioning function is turned off; or, if the application is detected, the mobile terminal is in the off state When the operation is run and the application exceeds the preset first time threshold and is not operated, the positioning function is turned off.
  • the first time threshold is an empirical value or an experimentally obtained value.
  • the positioning function is disabled in the screen state of the mobile terminal, if the application is still running, the working state of the application can be continuously monitored. If the screen of the mobile terminal is detected, the application performs positioning. Operation, such as sliding the navigation interface, can re-open the positioning function and perform positioning operations.
  • the second method is to monitor the positioning status of the positioning function, and perform switching control on the positioning function according to the monitoring result, including: if the position information reported by the positioning function is not changed, and the duration exceeds the preset second time threshold, the method is closed. GPS. For example, according to the positioning information reported by the positioning function, the time when the mobile terminal is in the same geographical location exceeds the second time threshold, and the positioning function can be turned off. After the positioning function is turned off, if the location information reported by the positioning function starts to change, the positioning function is re-enabled and the positioning operation is performed.
  • the positioning function is switched and controlled by using the combination of the first mode and the second mode, which is specifically described in the third embodiment.
  • the positioning function should intelligently control the opening and closing states of the positioning function according to the usage of the positioning function, thereby reducing system overhead and reducing power consumption.
  • This embodiment describes a step of turning on the positioning function corresponding to the high-precision positioning mode.
  • FIG. 3 it is a flowchart of the steps of opening the positioning function according to the third embodiment of the present disclosure.
  • the positioning function corresponding to the coarse precision positioning mode has been turned on.
  • Step S310 acquiring information of an application having high-precision positioning authority, and forming an application list.
  • the application may have high-precision positioning permission, coarse precision positioning authority, or both high-precision positioning permission and coarse precision positioning permission, the application list is set so as to distinguish which applications have high-precision positioning authority.
  • the application package corresponding to the application may be obtained in advance, and the access permission information of the application is viewed in the application package, and if the application has high-precision positioning permission, the information of the application is recorded in the application list. It is also possible to record the information of the application into the application list when the application requests the mobile terminal to grant high-precision positioning permission.
  • the application list can be in the form of a stack in which the name or identity of the application can be stored.
  • the application list stack is shown in Table 1, but is not limited to the contents in Table 1.
  • Step S320 receiving a positioning request initiated by an application.
  • Baidu map application selects the “navigation” function, at which time the Baidu map application will send a location request to the mobile terminal.
  • Step S330 determining, according to the application list, whether the application that initiates the positioning request has high-precision positioning authority; if yes, executing step S340, and if not, ending the process.
  • the positioning request carries the information of the application; according to the information of the application, whether the information of the application exists in the application list; if it exists, the application has high-precision positioning permission; if not, the description The app does not have high-precision targeting permissions.
  • the process can be ended when it is determined that the application does not have high-precision positioning authority.
  • Step S340 obtaining a positioning precision keyword from the positioning request initiated by the application.
  • Positioning requirements include: positioning accuracy requirements.
  • the positioning accuracy requirement is determined by the positioning accuracy keyword.
  • the positioning accuracy keyword is 1 for the high-precision positioning mode, and the positioning accuracy keyword is 0 for the coarse-precision positioning mode.
  • Step S350 determining whether the positioning precision keyword is a high-precision positioning mode; if yes, executing step S360; if not, ending the flow.
  • the application may have high-precision positioning permission and coarse-precision positioning permission at the same time, it may request to enter the high-precision positioning mode, or may request to enter the coarse-precision positioning mode, so it is necessary to identify the positioning precision keyword in the positioning request initiated by the application. Determine whether the application with high-precision positioning authority requests to enter the high-precision positioning mode.
  • the positioning function corresponding to the coarse precision positioning mode is enabled by default, and after determining that the positioning precision keyword is the coarse precision positioning mode, the flow can be directly ended.
  • step S360 the positioning function corresponding to the high-precision positioning mode is turned on.
  • an opening instruction is sent to the positioning module corresponding to the positioning function, or an opening instruction is sent to the switching control module of the positioning module, and the positioning module is turned on by the switch control module.
  • the positioning accuracy requirement is a high-precision positioning mode
  • an instruction for turning on the GPS positioning function is sent to the GPS function switch control module, and the GPS function switch control module automatically turns on the GPS after receiving the instruction for turning on the GPS positioning function.
  • the positioning function at this time, the GPS module starts to work, and the GPS module reports the GPS information every predetermined time period, and the application program can use the GPS information to display the current position.
  • This embodiment further describes the steps of the positioning function control.
  • 4 is a flow chart showing the steps of positioning function control according to a fourth embodiment of the present disclosure.
  • Step S410 monitoring the working state of the application and the positioning state of the positioning function.
  • step S420 it is judged whether the application is closed; if yes, step S460 is performed; if not, step S430 is performed.
  • the positioning operation When the application is closed, the positioning operation will not be performed, and the location information reported by the positioning function will not be used, which means that the positioning function of the application can be turned off.
  • Step S430 determining whether the positioning request initiated by the application is ready for positioning; if yes, executing step S440; if not, proceeding to step S430.
  • the positioning function is enabled, and the positioning module corresponding to the positioning function needs to be positioned according to the positioning request, and after the positioning preparation is completed, the positioning information of the positioning is reported to the application every predetermined time period, and the positioning position of the application every predetermined time period.
  • the information is updated.
  • the positioning preparation is completed by specifying the position information that the bit module can provide positioning.
  • Step S440 determining whether the location information reported by the positioning function has not changed continuously for a plurality of update periods; if yes, executing step S460; if not, executing step S450.
  • the predetermined time period is an update period.
  • the length of time of consecutive multiple update cycles is equal to the length of the second time threshold. For example, if the update period of the location information is 20 s and the second time threshold is 5 min, then the location information reported by the location function does not change for 15 consecutive update periods, and step S450 can be performed.
  • Step S450 determining whether the application program is not operated when the mobile terminal is in the screen-off state exceeds the first time threshold; if yes, executing step S460; if not, executing step S420.
  • Step S460 the positioning function corresponding to the high-precision positioning mode is turned off.
  • FIG. 5 is a configuration diagram of a control device according to a fifth embodiment of the present disclosure.
  • the device of this embodiment may be disposed on the mobile terminal side.
  • the positioning function control device comprises:
  • the determination module 510 is configured to determine an application with high precision positioning rights.
  • the opening module 520 is configured to enable the positioning function corresponding to the high-precision positioning for the application if the application requests high-precision positioning.
  • the control module 530 is configured to monitor an operating state of the application and/or a positioning state of the positioning function, and control an enabling parameter of the positioning function according to the monitoring result.
  • the opening module 510 is configured to obtain a positioning precision keyword in the positioning request initiated by the application; if the positioning precision keyword is a high-precision positioning mode, enable the high-precision positioning mode to be corresponding Positioning function.
  • the determining module 510 is configured to acquire an application package corresponding to the application; in the application package, view the access permission information of the application; if the access permission information includes a high-precision positioning permission Information, determining that the application has high-precision positioning rights limit.
  • control module 530 is configured to turn off the location function if it is detected that the application is being destroyed or the application is running in the background.
  • control module 530 is configured to close the positioning function if the location information reported by the positioning function is not changed and the duration exceeds a preset second time threshold.
  • the foregoing technical solutions provided by the embodiments of the present disclosure can be applied to the control process, and when the positioning request is required to perform high-precision positioning, the positioning function corresponding to the high-precision positioning is automatically turned on, and the positioning function is intelligently controlled according to the usage of the positioning function. Turns on and off, reducing system overhead and reducing power consumption.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种控制方法和装置,该方法包括:确定具有高精度定位权限的应用程序(S110);如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能(S120);监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数(S130)。上述方法在定位请求要求进行高精度定位时,自动开启高精度定位对应的定位功能,根据定位功能的使用情况,智能地控制定位功能的开启和关闭状态,减少***开销,降低耗电量。

Description

一种控制方法和装置 技术领域
本公开涉及通信技术领域,特别是涉及一种控制方法和装置。
背景技术
目前,移动终端上具有定位功能的应用程序越来越多,如百度地图、滴滴打车、手机淘宝、大众点评等应用程序都具有定位功能。为了保护用户隐私和安全,移动终端仅允许具有定位权限的应用程序使用定位功能。
应用程序在使用定位功能时可以采用的定位模式包括:高精度定位模式和粗精度定位模式。
高精度定位模式使用GPS(全球定位***,Global Positioning System)进行定位。高精度定位模式的耗电量高,尤其是使用GSP定位的耗电量最高。
粗精度定位模式使用WLAN(无线局域网,Wireless Local Area Networks)、蓝牙或者移动网络定位。相对于高精度定位模式,粗精度定位模式的耗电量低。
在应用程序使用定位功能之前,需要用户手动开启定位功能,如打开GPS模块,WLAN模块,蓝牙模块,在使用完毕之后,如果希望降低移动终端的耗电量,则需要用户手动关闭定位功能。对于用户而言,定位功能的使用不够智能,且操作过程比较复杂。
发明内容
本公开实施例提供一种控制方法和装置,用以解决现有定位功能的使用不够智能的问题。
为了解决上述技术问题,本公开实施例是通过以下技术方案来解决的:
本公开实施例提供一种控制方法,所述方法包括:确定具有高精度定位权限的应用程序;如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能;监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
其中,如果所述应用程序发起用于进入高精度定位模式的定位请求,则为所述应用程序开启所述高精度定位模式对应的定位功能,包括:在所述应用程序发起的定位请求中获取定位精度关键字;如果所述定位精度关键字为高精度定位模式,则为所述应用程序开启所述高精度定位模式对应的定位功能。
其中,确定具有高精度定位权限的应用程序,包括:获取应用程序对应的应用包;在所述应用包中,查看所述应用程序的访问权限信息;如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权限。
其中,监测所述应用程序的工作状态,并根据监测结果控制所述定位功能的使能参数,包括:如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。
其中,监测所述定位功能的定位状态,并根据监测结果对所述定位功能进行开关控制,包括:如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
本公开实施例还提供一种控制装置,所述装置包括:确定模块,设置为确定具有高精度定位权限的应用程序;开启模块,设置为如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能;控制模块,设置为监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
其中,所述开启模块,设置为在所述应用程序发起的定位请求中获取定位精度关键字;如果所述定位精度关键字为高精度定位模式,则为所述 应用程序开启所述高精度定位模式对应的定位功能。
其中,所述确定模块,设置为获取应用程序对应的应用包;在所述应用包中,查看所述应用程序的访问权限信息;如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权限。
其中,所述控制模块,设置为:如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。
其中,所述控制模块,设置为:如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
在本公开实施例中,还提供了一种存储介质,该存储介质可以存储有执行指令,该执行指令用于执行上述实施例中的控制方法的实现。
本公开实施例有益效果如下:
本公开实施例在定位请求要求进行高精度定位时,自动开启高精度定位对应的定位功能,根据定位功能的使用情况,智能地控制定位功能的开启和关闭状态,减少******开销,降低耗电量。
附图说明
图1是根据本公开第一实施例的控制方法的流程图;
图2是根据本公开第二实施例的控制方法的流程图;
图3是根据本公开第三实施例的开启定位功能的步骤流程图;
图4是根据本公开第四实施例的定位功能控制的步骤流程图;
图5是根据本公开第五实施例的控制装置的结构图。
具体实施方式
以下结合附图以及实施例,对本公开进行进一步详细说明。应当理解, 此处所描述的具体实施例仅仅用以解释本公开,并不限定本公开。
实施例一
本实施例提供一种控制方法。图1是根据本公开第一实施例的控制方法的流程图。本实施例的执行主体为移动终端。
步骤S110,确定具有高精度定位权限的应用程序。
应用程序具有高精度定位权限,粗精度定位权限,或者同时具有高精度定位权限和粗精度定位权限。
获取应用程序对应的应用包;在所述应用包中,查看所述应用程序的访问权限信息;如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权限。
步骤S120,如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能。
在应用程序发起的定位请求中获取定位精度关键字;如果定位精度关键字为高精度定位模式,则为该应用程序开启该高精度定位模式对应的定位功能。
定位精度关键字可以为高精度定位模式或者粗精度定位模式。高精度定位模式对应高精度定位,粗精度定位模式对应粗精度定位。
可选的,具有高精度定位权限的应用程序可以请求进行高精度定位,具有粗精度定位权限的应用程序可以请求进行粗精度定位,同时具有高精度定位权限和粗精度定位权限的应用程序即可以请求进行高精度定位又可以请求进入粗精度定位。
由于同时具有高精度定位权限和粗精度定位权限的应用程序,也是具有高精度定位权限的应用程序,但在其发起的定位请求中,定位精度关键字既可以为高精度定位模式也可以为粗精度定位模式,所以仅在具有高精度定位权限的应用程序请求进行高精度定位时,才开启高精度定位对应的定位功能。
步骤S130,监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
使能参数包括:开和关。监测所述应用程序的工作状态和/或所述定位功能的定位状态,根据监测结果对所述定位功能进行开关控制。
可选的,如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
本实施例在定位请求要求进行高精度定位时,自动开启高精度定位对应的定位功能,根据定位功能的使用情况,智能地控制定位功能的开启和关闭状态,减少***开销,降低耗电量。
下面对本公开的控制方法进行进一步地描述。图2是根据本公开第二实施例的控制方法的流程图。
步骤S210,在应用程序发起的定位请求中获取定位精度关键字。
应用程序是预先安装在移动终端中的应用程序。例如:应用程序为百度地图、滴滴打车、手机淘宝、大众点评等。
在本实施例中,应用程序为具有定位权限,可以使用定位功能的应用程序。
应用程序在需要使用定位功能时需要发起定位请求,在该定位请求中携带定位精度关键字。定位精度关键字用于指出应用程序的定位精度需求。定位精度需求包括高精度定位模式和粗精度定位模式,其中,高精度定位模式的定位精度高于粗精度定位模式的定位精度。
步骤S220,如果所述定位精度关键字为高精度定位模式,则开启所述高精度定位模式对应的定位功能。
定位精度关键字为高精度定位模式或粗精度定位模式。
定位功能包括但不限于:GPS定位功能、WLAN定位功能、蓝牙定位功能和移动通信定位功能。GPS定位功能可以实现卫星定位。WLAN定位功能、蓝牙定位功能和移动通信定位功能都可以接入网络,WLAN定位功能、蓝牙定位功能和移动终端通信定位功能都可以根据信号强度实现定位。
高精度定位模式用于进行高精度定位,对应的定位功能可以是GPS定位功能。
粗精度定位模式用于进行粗精度定位,对应的定位功能可以是WLAN定位功能、蓝牙定位功能和移动通信定位功能。通常情况下,WLAN定位功能、蓝牙定位功能和移动通信定位功能为开启状态。
如果定位精度关键字为高精度定位模式,则开启高精度定位模式对应的定位功能。如果定位精度关键字为粗精度定位模式,则开启粗精度定位模式对应的定位功能。一般情况下,粗精度定位模式对应的定位功能处于开启状态。
应用程序具有高精度定位权限,粗精度定位权限,或者同时具有高精度定位权限和粗精度定位权限。具有高精度定位权限的应用程序可以请求进行高精度定位。具有粗精度定位权限的应用程序可以请求进行粗精度定位。同时具有高精度定位权限和粗精度定位权限的应用程序即可请求进行高精度定位又可以请求进行粗精度定位。
由于高精度定位模式对应的定位功能在定位时耗电量高,且***内存开销大,所以本实施例为了降低***耗电量,减少***内存开销,在具有高精度定位权限的应用程序发起定位请求时,在定位请求中获取定位精度关键字,并且在该定位精度关键字为高精度定位模式时,开启高精度定位模式对应的定位功能,并对定位功能进行开关控制。
开启定位功能,应用程序可以使用定位功能,执行定位操作,关闭定位功能,应用程序不能使用定位功能。定位操作例如是:滑动导航界面,在地图中显示位置标识,进行语音路况提示等。
开启高精度定位模式对应的定位功能就可以执行定位操作。在定位过程中,该定位功能会每隔预定时间段上报一次当前的位置信息。例如:上报移动终端当前的GPS信息。
步骤S230,监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果对所述定位功能进行开关控制。
应用程序的工作状态和/或定位功能的定位状态可以反映出应用程序对定位功能的使用情况。应用程序的工作状态包括但不限于:关闭、开启、运行、***作。定位功能的定位状态包括但不限于:定位的位置信息的变化。
方式一,监测应用程序的工作状态,并根据监测结果对定位功能进行开关控制,包括:如果监测到应用程序被关闭,则关闭定位功能;或者,如果监测到应用程序在移动终端灭屏状态下运行,且应用程序超过预设的第一时间阈值没有***作,则关闭定位功能。第一时间阈值为经验值或实验获得的值。
当然,在移动终端灭屏状态下关闭该定位功能之后,如果监测到应用程序还在运行,那么可以继续监测应用程序的工作状态,如果监测到移动终端屏幕被点亮,且该应用程序执行定位操作,如滑动导航界面,则可以重新开启该定位功能并执行定位操作。
方式二,监测定位功能的定位状态,并根据监测结果对定位功能进行开关控制,包括:如果监测到定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭定位功能。例如:根据定位功能上报的定位信息,移动终端处于同一地理位置的时间超过了第二时间阈值,这时可以关闭定位功能。在关闭定位功能之后,如果监测到定位功能上报的位置信息开始变化,则重新开启该定位功能并执行定位操作。
方式三,采用方式一和方式二结合的方式对定位功能进行开关控制,具体将在实施例三中进行描述。
本实施例在定位请求要求进行高精度定位时,自动开启高精度定位对 应的定位功能,根据定位功能的使用情况,智能地控制定位功能的开启和关闭状态,减少***开销,降低耗电量。
实施例三
本实施例对开启高精度定位模式对应的定位功能的步骤进行说明,如图3所示,为根据本公开第三实施例的开启定位功能的步骤流程图。在本实施例中,粗精度定位模式对应的定位功能已经被开启。
步骤S310,获取具有高精度定位权限的应用程序的信息,形成应用列表。
由于应用程序可能具有高精度定位权限,粗精度定位权限,或者同时具有高精度定位权限和粗精度定位权限,所以设置应用列表,以便后续区分哪些应用程序具有高精度定位权限。
可以预先获取应用程序对应的应用包,在该应用包中,查看该应用程序的访问权限信息,如果应用程序具有高精度定位权限,则将该应用程序的信息记录到应用列表中。也可以在应用程序向移动终端请求授予高精度定位权限时,将该应用程序的信息记录到应用列表中。
应用列表可以采用堆栈的形式,在应用列表堆栈中可以存储应用程序的名称或者标识。应用列表堆栈如表1所示,但不限于表1中的内容。
百度地图
美图秀秀
手机淘宝
滴滴打车
墨迹天气
大众点评
QQ
微信
UC浏览器
照相机
京东商城
今日头条
表1
步骤S320,接收应用程序发起的定位请求。
例如:在百度地图应用使用过程中,选择“导航”功能,这时百度地图应用将向移动终端发送定位请求。
步骤S330,根据该应用列表,判断该发起定位请求的应用程序是否具有高精度定位权限;如果是,则执行步骤S340,如果否,则结束流程。
在定位请求中会携带应用程序的信息;根据应用程序的信息,查询该应用程序的信息是否存在于应用列表中;如果存在,则说明该应用程序具有高精度定位权限;如果不存在,则说明该应用程序不具有高精度定位权限。
由于在本实施例中,粗精度定位模式对应的定位功能默认已经被开启,所以在判定应用程序不具有高精度定位权限时,可以结束流程。
步骤S340,从该应用程序发起的定位请求中获取定位精度关键字。
在定位请求中携带应用程序的定位需求。定位需求包括:定位精度需求。定位精度需求通过定位精度关键字来确定。例如:定位精度关键字为1表示高精度定位模式,定位精度关键字为0表示粗精度定位模式。
步骤S350,判断该定位精度关键字是否为高精度定位模式;如果是,则执行步骤S360;如果否,则结束流程。
由于应用程序可能同时具有高精度定位权限和粗精度定位权限,可以请求进入高精度定位模式,也可以请求进入粗精度定位模式,所以需要对应用程序发起的定位请求中的定位精度关键字进行识别,判断具有高精度定位权限的应用程序是否请求进入高精度定位模式。
在本实施例中,粗精度定位模式对应的定位功能默认已经开启,在判定定位精度关键字为粗精度定位模式之后,可以直接结束流程。
步骤S360,开启高精度定位模式对应的定位功能。
在开启高精度定位模式对应的定位功能时,向该定位功能对应的定位模块发送开启指令,或者向该定位模块的开关控制模块发送开启指令,通过该开关控制模块开启该定位模块。
例如:如果定位精度需求为高精度定位模式,则发送用于开启GPS定位功能的指令给GPS功能开关控制模块,GPS功能开关控制模块接收到该用于开启GPS定位功能的指令后,自动开启GPS定位功能,此时GPS模块开始工作,GPS模块每隔预定时间段上报一次GPS信息,应用程序可以利用该GPS信息进行当前位置显示。
实施例四
本实施例对定位功能控制的步骤进行进一步地的说明。图4是根据本公开第四实施例的定位功能控制的步骤流程图。
步骤S410,监测应用程序的工作状态以及定位功能的定位状态。
步骤S420,判断应用程序是否被关闭;如果是,则执行步骤S460;如果否,执行步骤S430。
应用程序被关闭将不会进行定位操作,也不会使用定位功能上报的位置信息,这意味着应用程序的定位功能可以关闭。
步骤S430,判断应用程序发起的定位请求是否定位准备完成;如果是,则执行步骤S440;如果否,则继续执行步骤S430。
定位功能开启,该定位功能对应的定位模块需要根据定位请求进行定位,并在定位准备完成之后,每隔预定时间段向应用程序上报定位的位置信息,应用程序每隔预定时间段对定位的位置信息进行更新。定位准备完成是指定位模块可以提供定位的位置信息。
步骤S440,判断定位功能上报的位置信息是否连续多个更新周期没有发生变化;如果是,则执行步骤S460;如果否,则执行步骤S450。
由于应用程序每隔预定时间段对定位的位置信息进行更新,那么该预定时间段为更新周期。
连续多个更新周期的时间长度等于第二时间阈值的长度。例如:位置信息的更新周期为20s,第二时间阈值为5min,那么,定位功能上报的位置信息连续15个更新周期没有发生变化,就可以执行步骤S450。
步骤S450,判断应用程序是否在移动终端灭屏状态下超过第一时间阈值没有***作;如果是,则执行步骤S460;如果否,则执行步骤S420。
步骤S460,关闭高精度定位模式对应的定位功能。
实施例五
本实施例提供一种控制装置。图5是根据本公开第五实施例的控制装置的结构图。本实施例的所述装置可以设置在移动终端侧。
该定位功能控制装置,包括:
确定模块510,设置为确定具有高精度定位权限的应用程序。
开启模块520,设置为如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能。
控制模块530,设置为监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
在一个实施例中,开启模块510,设置为在所述应用程序发起的定位请求中获取定位精度关键字;如果所述定位精度关键字为高精度定位模式,则开启所述高精度定位模式对应的定位功能。
在另一实施例中,确定模块510,设置为获取应用程序对应的应用包;在所述应用包中,查看所述应用程序的访问权限信息;如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权 限。
在又一实施例中,控制模块530,设置为如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。
在再一实施例中,控制模块530,设置为如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
本实施例所述的装置的功能已经在图1~图4所示的方法实施例中进行了描述,故本实施例的描述中未详尽之处,可以参见前述实施例中的相关说明,在此不做赘述。
尽管为示例目的,已经公开了本公开的优选实施例,本领域的技术人员将意识到各种改进、增加和取代也是可能的,因此,本公开的范围应当不限于上述实施例。
工业实用性
本公开实施例提供的上述技术方案,可以应用于控制过程中,在定位请求要求进行高精度定位时,自动开启高精度定位对应的定位功能,根据定位功能的使用情况,智能地控制定位功能的开启和关闭状态,减少******开销,降低耗电量。

Claims (10)

  1. 一种控制方法,所述方法包括:
    确定具有高精度定位权限的应用程序;
    如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能;
    监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
  2. 如权利要求1所述的方法,其中,如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能,包括:
    在所述应用程序发起的定位请求中获取定位精度关键字;
    如果所述定位精度关键字为高精度定位模式,则为所述应用程序开启所述高精度定位模式对应的定位功能。
  3. 如权利要求1所述的方法,其中,确定具有高精度定位权限的应用程序,包括:
    获取应用程序对应的应用包;
    在所述应用包中,查看所述应用程序的访问权限信息;
    如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权限。
  4. 如权利要求1所述的方法,其中,监测所述应用程序的工作状态,并根据监测结果控制所述定位功能的使能参数,包括:
    如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。
  5. 如权利要求1所述的方法,其中,监测所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数,包括:
    如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
  6. 一种控制装置,所述装置包括:
    确定模块,设置为确定具有高精度定位权限的应用程序;
    开启模块,设置为如果所述应用程序请求进行高精度定位,则为所述应用程序开启所述高精度定位对应的定位功能;
    控制模块,设置为监测所述应用程序的工作状态和/或所述定位功能的定位状态,并根据监测结果控制所述定位功能的使能参数。
  7. 如权利要求6所述的装置,其中,所述开启模块,设置为在所述应用程序发起的定位请求中获取定位精度关键字;如果所述定位精度关键字为高精度定位模式,则为所述应用程序开启所述高精度定位模式对应的定位功能。
  8. 如权利要求6所述的装置,其中,所述确定模块,设置为获取应用程序对应的应用包;在所述应用包中,查看所述应用程序的访问权限信息;如果所述访问权限信息中包含高精度定位权限信息,则确定所述应用程序具有高精度定位权限。
  9. 如权利要求6所述的装置,其中,所述控制模块,设置为:
    如果监测到所述应用程序被销毁进程或者所述应用程序在后台运行,则关闭所述定位功能。
  10. 如权利要求6所述的装置,其中,所述控制模块,设置为:
    如果监测到所述定位功能上报的位置信息没有发生变化,且持续时间超过预设的第二时间阈值,则关闭所述定位功能。
PCT/CN2017/098848 2016-12-05 2017-08-24 一种控制方法和装置 WO2018103374A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611100040.9A CN108170484A (zh) 2016-12-05 2016-12-05 一种控制方法和装置
CN201611100040.9 2016-12-05

Publications (1)

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

Family

ID=62490676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098848 WO2018103374A1 (zh) 2016-12-05 2017-08-24 一种控制方法和装置

Country Status (2)

Country Link
CN (1) CN108170484A (zh)
WO (1) WO2018103374A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109302681A (zh) * 2018-08-30 2019-02-01 努比亚技术有限公司 一种位置信息处理方法、设备及计算机可读存储介质
CN115718911B (zh) * 2022-11-24 2023-10-13 深圳市欧度利方科技有限公司 一种儿童平板权限管理方法、***、平板电脑及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088657A (zh) * 2010-11-19 2011-06-08 厦门雅迅网络股份有限公司 一种gps模块的省电方法
WO2013152349A1 (en) * 2012-04-06 2013-10-10 Yang Shaofeng Intelligent power saving method for mobile devices running location based service (lbs) applications
CN104793995A (zh) * 2015-04-27 2015-07-22 广东欧珀移动通信有限公司 控制gps调用的方法及装置
US20150350825A1 (en) * 2014-06-03 2015-12-03 Samsung Electronics Co., Ltd. Method for providing position associated information and electronic device supporting the same
CN105933521A (zh) * 2016-04-22 2016-09-07 广东小天才科技有限公司 一种移动终端选择定位模式的方法和装置
CN105960004A (zh) * 2016-06-30 2016-09-21 宇龙计算机通信科技(深圳)有限公司 一种移动终端定位功能控制方法及移动终端

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365399B (zh) * 2013-06-26 2017-02-08 贝壳网际(北京)安全技术有限公司 移动终端应用对象的控制方法及装置
CN105101366B (zh) * 2015-05-29 2019-02-22 努比亚技术有限公司 移动终端控制方法及移动终端

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088657A (zh) * 2010-11-19 2011-06-08 厦门雅迅网络股份有限公司 一种gps模块的省电方法
WO2013152349A1 (en) * 2012-04-06 2013-10-10 Yang Shaofeng Intelligent power saving method for mobile devices running location based service (lbs) applications
US20150350825A1 (en) * 2014-06-03 2015-12-03 Samsung Electronics Co., Ltd. Method for providing position associated information and electronic device supporting the same
CN104793995A (zh) * 2015-04-27 2015-07-22 广东欧珀移动通信有限公司 控制gps调用的方法及装置
CN105933521A (zh) * 2016-04-22 2016-09-07 广东小天才科技有限公司 一种移动终端选择定位模式的方法和装置
CN105960004A (zh) * 2016-06-30 2016-09-21 宇龙计算机通信科技(深圳)有限公司 一种移动终端定位功能控制方法及移动终端

Also Published As

Publication number Publication date
CN108170484A (zh) 2018-06-15

Similar Documents

Publication Publication Date Title
US11089476B2 (en) Network access control method and apparatus
US10057115B2 (en) Device resource management based on contextual planning
EP3171644B1 (en) Method and apparatus for selecting network
US20160062843A1 (en) Methods and devices for backing up file
US20170105237A1 (en) Methods and apparatuses for network connection
WO2015131559A1 (zh) 终端及其功能控制方法、装置和通信***
CN102819715A (zh) Api监控方法和装置
CN104239140A (zh) 一种移动终端及其控制操作***切换的方法和装置
WO2018103374A1 (zh) 一种控制方法和装置
WO2023098235A1 (zh) 设备连接切换方法、装置、电子设备和计算机可读存储介质
CN105792328A (zh) 终端设备网络连接方法、装置和终端设备
AU2017261545B2 (en) Blocking functionality on a smart device
WO2023028782A1 (zh) 上报信息的方法、装置、通信设备及存储介质
CN105704758A (zh) 一种基于流量监测关闭社交类应用程序的方法及装置
WO2017041608A1 (zh) ***开关的锁定方法、装置和移动终端
KR20230029940A (ko) 리소스 지시 방법과 장치, 리소스 결정 방법과 장치(resource indication method and apparatus, and resource determination method and apparatus)
WO2014176998A1 (zh) 一种多屏***中应用激活控制方法、装置及移动终端
WO2017101336A1 (zh) 快捷开关的控制方法及装置
US11303718B2 (en) Method and device to manage temporary content on a mobile device
KR102186552B1 (ko) 통신 모듈 제어를 위한 장치 및 방법
CN107071008B (zh) 终端设备的定位方法、装置和设备
CN105843833A (zh) 一种移动终端应用偏好参数管理方法及***
WO2016201734A1 (zh) 应用程序的运行控制方法、***和终端
WO2017215306A1 (zh) 一种移动终端及其网络接入的方法
WO2016165440A1 (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: 17877502

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: 17877502

Country of ref document: EP

Kind code of ref document: A1