CN108881626A - Location-based service control method and Related product - Google Patents

Location-based service control method and Related product Download PDF

Info

Publication number
CN108881626A
CN108881626A CN201810574084.8A CN201810574084A CN108881626A CN 108881626 A CN108881626 A CN 108881626A CN 201810574084 A CN201810574084 A CN 201810574084A CN 108881626 A CN108881626 A CN 108881626A
Authority
CN
China
Prior art keywords
electronic device
message
service
location
control module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810574084.8A
Other languages
Chinese (zh)
Inventor
徐宝松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201810574084.8A priority Critical patent/CN108881626A/en
Publication of CN108881626A publication Critical patent/CN108881626A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72451User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to schedules, e.g. using calendar applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72457User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to geographic location
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

It includes motion sensor that the embodiment of the present application, which discloses a kind of location-based service control method and Related product, the electronic device, and the motion sensor is registered to the motion detection service of the electronic device, and method therein includes:The first message from motion detection service is received first using control module in electronic device, secondly, objective time interval is determined using control module, then, when do not received in objective time interval using control module from the second message of motion detection service, judge whether currently running application program enables location-based service, finally, using control module when judging that currently running application program enables location-based service, application program or closed position service are closed.The embodiment of the present application is conducive to improve the intelligence of the position service function of electronic device control application program, improves memory service efficiency and cruising ability.

Description

Location-based service control method and Related product
Technical field
This application involves field of navigation technology, and in particular to a kind of location-based service control method and Related product.
Background technique
With a large amount of popularization and applications of the electronic devices such as smart phone, smart phone can support using more and more, Function is stronger and stronger, and smart phone develops towards diversification, personalized direction, becomes indispensable electricity in user's life Sub- articles.User usually passes through the forms such as finger touch, voice input and electronic device interacts, and control electronic device is completed Types of functionality.For smart phone in addition to being a kind of tool of communications, it also provides great convenience to the trip of people.By initial Map class application, develops to that class of calling a taxi, class of riding, that movement class etc. is brought by geographical location information to user is convenient.
Summary of the invention
The embodiment of the present application provides a kind of location-based service control method and Related product, is conducive to improve electronic device control The intelligence of the position service function of application program processed.
In a first aspect, the embodiment of the present application provides a kind of location-based service control method, it is applied to electronic device, the electronics Device includes motion sensor, and the motion sensor is registered to the motion detection service of the electronic device, the method Including:
The first message from the motion detection service is received using control module, wherein the first message is used for Indicate that the electronic device remains static;
Application control module determines objective time interval, wherein the start time of the objective time interval is to receive described the The time of one message;
The application manages module is not received in the objective time interval from the motion detection service second and disappears When breath, judge whether currently running application program enables location-based service, the second message is for indicating the electronic device It moves;
The application control module is when judging that the currently running application program enables location-based service, described in closing Application program closes the location-based service.
Second aspect, the embodiment of the present application provides a kind of location-based service control device, including is applied to electronic device, described Electronic device includes motion sensor, and the motion sensor is registered to the motion detection service of the electronic device, described Location-based service control device includes receiving unit, determination unit and closing unit, wherein
The receiving unit receives the first message from the motion detection service for application control module, wherein The first message is for indicating that the electronic device remains static;
The determination unit determines objective time interval for application control module, wherein the time of the objective time interval Starting point is to receive the time of the first message;
The receiving unit is also used to the application control module and does not receive in the objective time interval from the fortune When the second message of dynamic detection service, judge whether currently running application program enables location-based service, the second message is used It is moved in the expression electronic device;
The closing unit is judging the currently running application program enable bit for application control module When setting service, closes the application program or close the location-based service.
The third aspect, the embodiment of the present application provide a kind of electronic device, including processor, memory, communication interface and One or more programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned It manages device to execute, above procedure is included the steps that for executing in the embodiment of the present application first aspect or second aspect either method Instruction.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, wherein above-mentioned computer-readable Storage medium storage is used for the computer program of electronic data interchange, wherein above-mentioned computer program executes computer such as Step some or all of described in the embodiment of the present application first aspect or second aspect either method.
5th aspect, the embodiment of the present application provide a kind of computer program product, wherein above-mentioned computer program product Non-transient computer readable storage medium including storing computer program, above-mentioned computer program are operable to make to calculate Machine executes the step some or all of as described in the embodiment of the present application first aspect or second aspect either method.The calculating Machine program product can be a software installation packet.
As can be seen that receiving in electronic device using control module and being examined from the movement first in the embodiment of the present application The first message of service is surveyed, secondly, application control module determines objective time interval, then, the application control module is in institute It states when do not received in objective time interval from the second message of the motion detection service, judges that currently running application program is No enabling location-based service, finally, module is managed in the application is judging currently running application program enabling position clothes When business, closes the application program or close the location-based service.It can be seen that electronic device position user apart from detection and exist The scene that objective time interval does not move really, since the scene is without using location information, can be serviced with closed position or Using avoiding the position service function from occupying Installed System Memory continuous drain always, be conducive to improve electronic device control using journey The intelligence of the position service function of sequence improves memory service efficiency and cruising ability.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be to needed in the embodiment attached Figure is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for this field For those of ordinary skill, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Figure 1A is a kind of schematic diagram of the program running space of smart phone;
Figure 1B is a kind of system architecture diagram of Android system;
Fig. 2 is a kind of flow diagram of location-based service control method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of another location-based service control method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of another location-based service control method provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of electronic device provided by the embodiments of the present application;
Fig. 6 is a kind of functional unit composition block diagram of location-based service control device provided by the embodiments of the present application;
Fig. 7 is a kind of functional unit composition block diagram of location-based service control device provided by the embodiments of the present application;
Fig. 8 is that the embodiment of the present application provides a kind of structural schematic diagram of smart phone.
Specific embodiment
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
The description and claims of this application and term " first " in above-mentioned attached drawing, " second " etc. are for distinguishing Different objects, are not use to describe a particular order.In addition, term " includes " and " having " and their any deformations, it is intended that It is to cover and non-exclusive includes.Such as the process, method, system, product or equipment for containing a series of steps or units do not have It is defined in listed step or unit, but optionally further comprising the step of not listing or unit, or optionally also wrap Include other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
As shown in Figure 1A, the electronic devices such as smart phone are typically provided with program running space at present, and program operation is empty Between include user's space and operating system space, wherein user's space operation have one or more application program, this or more A application program is the third party application of electronic device installation.
The electronic device can specifically run the Mobile operating system iOS of Android android system, Apple Inc.'s exploitation Deng not doing unique restriction herein.As shown in Figure 1B, by taking electronic device operation has android system as an example, corresponding user Space includes the application layer (Applications) in the android system, and operating system space may include the Android system Application framework layer (Application Framework), system Runtime Library layer (including system Runtime Library layer in system Android Runtime when Libraries and Android are run), Linux inner core (Linux Kernel).Wherein, it applies It include all kinds of application programs directly interacted with user, or the service routine for running on backstage write by Java language on layer. For example, the program for the common basic function realized on smart phone, such as short message service (Short Messaging Service, SMS) short message, dialing, Photo Browser, calendar, game, map, WWW (World Wide Web, Web) programs such as browser and the other applications of developer's exploitation.Application framework layer provides exploitation Android A series of class libraries needed for application program can be used in reusing component, can also realize personalized extension by inheriting.System Runtime Library layer is the support of application framework, provides service for the various components in android system.System Runtime Library layer by System class libraries and Android are constituted when running.It include core library and Dalvik virtual machine two parts when Android is run.Linux Inner nuclear layer is for realizing hardware device drivers, process and memory management, network protocol stack, power management, the cores such as wireless communication Function.
Electronic device may include the various handheld devices with wireless communication function, mobile unit, wearable device (example Such as smartwatch, Intelligent bracelet, pedometer), calculate equipment or be connected to other processing equipments of radio modem, with And various forms of user equipmenies (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) etc..For convenience of description, apparatus mentioned above is referred to as electronic device.Below to the application reality Example is applied to describe in detail.
Referring to Fig. 2, Fig. 2 is that the embodiment of the present application provides a kind of flow diagram of location-based service control method, answer For electronic device, the electronic device includes motion sensor, and the motion sensor is registered to the electronic device Motion detection service, the location-based service control method in the embodiment of the present application include:
S201 receives the first message from the motion detection service using control module, wherein the first message For indicating that the electronic device remains static.
Wherein, it is used to manage the execution of application program using control module, controls the behavior of application program, can be electronics Equipment is made by oneself or is provided by remaining manufacturer, does not do unique restriction herein.
S202, the application control module determine objective time interval, wherein the start time of the objective time interval is reception institute State the time of first message.
Wherein, objective time interval can be five minutes, ten minutes, 15 minutes etc., can have user's sets itself, according to user Historical operation duration setting or manufacturer dispatch from the factory when set, do not do unique restriction herein.
S203, application control module do not receive the from the motion detection service in the objective time interval When two message, judge whether currently running application program enables location-based service, the second message is for indicating the electronics Device moves.
Wherein, location-based service refers to the service for positioning electronic device, can be realized by position monitor, position monitor Including GPS positioning, network positions and request positioning.
S204, the application control module are closed when judging that the currently running application program enables location-based service It closes the application program or closes the location-based service.
As can be seen that receiving in electronic device using control module and being examined from the movement first in the embodiment of the present application The first message of service is surveyed, secondly, application control module determines objective time interval, then, the application control module is in institute It states when do not received in objective time interval from the second message of the motion detection service, judges that currently running application program is No enabling location-based service, finally, module is managed in the application is judging currently running application program enabling position clothes When business, closes the application program or close the location-based service.It can be seen that electronic device position user apart from detection and exist The scene that objective time interval does not move really, since the scene is without using location information, can be serviced with closed position or Using avoiding the position service function from occupying Installed System Memory continuous drain always, be conducive to improve electronic device control using journey The intelligence of the position service function of sequence improves memory service efficiency and cruising ability.
In a possible example, the first message is the motion detection service detection to data, and according to institute It states and sends when electronic device described in data judging remains static.
For example, when navigation application is opened, electronic device detects that current kinematic parameter is 0m/s, determines current It remains static, starts timer, and the timing duration of current timer is ten minutes, into process is continued to monitor, ten In minute, kinematic parameter is 0m/s always, then judges that Current electronic device is in and do not carry out the mobile scene in position, then stop leading The operation for the GPS positioning function applied of navigating.
As it can be seen that electronic device is determined into after stationary state in this example, movement is continued to monitor in the period when pre-designed Parameter, can accurately both judge whether user really has position movement, rather than only move lower electronic device, and be avoided that User is not using positioning function, but forget closed position service and caused by the fast situation of power consumption, be conducive to improve Electronic device controls the intelligence and accuracy of the position service function of application program.
In a possible example, the second message is for indicating that the electronic device moves, described second Message is that the motion detection service is sent when detecting that the electronic device change in location meets preset condition, described pre- If condition be the electronic device first position and the second position between linear distance be less than pre-determined distance, described first The electronic device is set in the position of the start time, the second position is the electronic device in the preset period of time The position of the interior any point-in-time in addition to the start time.
Wherein, pre-determined distance can be for 0.5CM, 1CM etc., setting when can have user's sets itself or manufacturer to dispatch from the factory, this Unique restriction is not done in place.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
As it can be seen that electronic device is determined into after stationary state in this example, movement is continued to monitor in the period when pre-designed Parameter, can accurately both judge whether user really has position movement, rather than only move lower electronic device, and be avoided that User is not using positioning function, but forget closed position service and caused by the fast situation of power consumption, be conducive to improve Electronic device controls the intelligence and accuracy of the position service function of application program.
In a possible example, after application control module determines objective time interval, the method also includes: When the application control module is received in the objective time interval from the second message of the motion detection service, institute is removed Objective time interval is stated, detects whether the electronic device remains static again.
As it can be seen that in this example, the lasting operation motion sensor of electronic device carries out monitoring position, is detecting fortune When dynamic, timer is reset, carries out new detection, and then can comprehensively be monitored to electronic device, avoided the occurrence of and accidentally close The case where location-based service, occurs, and is conducive to the intelligent and accurate of the position service function for improving electronic device control application program Property.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
Referring to Fig. 3, Fig. 3 is that the embodiment of the present application provides a kind of flow diagram of location-based service control method, answer For electronic device, the electronic device includes motion sensor, and the motion sensor is registered to the electronic device Motion detection service, the location-based service control method in the embodiment of the present application include:
The data of the motion sensor are monitored in S301, motion detection service.
Wherein, motion sensor can be gravity sensor, and linear acceleration sensors, rotating vector sensor is important Motion sensor, pedometer walk detection sensor, accelerometer and gyro sensor etc., do not do unique restriction herein.Movement passes Sensor for supervision equipment (such as:Move, tilt, shake, rotate or wave) it is highly useful.Wherein, data can for acceleration, Speed, time, height, angle etc. do not do unique restriction herein.
S302, the motion detection service when being remained static according to the Data Detection to the electronic device, First message is sent to application control module, wherein the first message is for indicating that the electronic device remains static.
Whether the change in location of S303, electronic device described in the motion detection service detection meet preset condition, described Preset condition be the electronic device first position and the second position between linear distance be less than pre-determined distance, described first Position is the electronic device in the position of the start time, and the second position is the electronic device in the target The position of any point-in-time in section in addition to the start time.
Wherein, pre-determined distance can be for 0.5CM, 1CM etc., setting when can have user's sets itself or manufacturer to dispatch from the factory, this Unique restriction is not done in place.
Wherein, location-based service refers to the service for positioning electronic device, can be realized by position monitor, position monitor Including GPS positioning, network positions and request positioning.
As can be seen that motion detection service first listens to the number of motion sensor in electronic device in the embodiment of the present application According to secondly, motion detection service when being remained static according to Data Detection to electronic device, is sent to application control module First message, finally, whether the change in location of motion detection service detection electronic device meets preset condition.It can be seen that electronic device By monitoring motion state, the scene that positioning user does not move really in objective time interval, since the scene is believed without using position Breath, therefore can service or apply with closed position, it avoids the position service function from occupying Installed System Memory continuous drain always, has Conducive to the intelligence for the position service function for improving electronic device control application program, memory service efficiency and continuation of the journey energy are improved Power.
In a possible example, the first message is used to indicate the application control module and executes following operation: It determines the objective time interval, and does not receive the second message from the motion detection service in the objective time interval When, judge whether currently running application program enables location-based service, and judging the currently running application program When enabling location-based service, closes the application program or close the location-based service.
In a possible example, the start time of the objective time interval is the time for receiving the first message, institute Second message is stated for indicating that the electronic device moves, the second message is the motion detection service in detection institute State what electronic device was sent when the change in location for detecting the electronic device meets the preset condition.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
Wherein, objective time interval can be five minutes, ten minutes, 15 minutes etc., can have user's sets itself, according to user Historical operation duration setting or manufacturer dispatch from the factory when set, do not do unique restriction herein.
As it can be seen that electronic device is determined into after stationary state in this example, movement is continued to monitor in the period when pre-designed Parameter, can accurately both judge whether user really has position movement, rather than only move lower electronic device, and be avoided that User is not using positioning function, but forget closed position service and caused by the fast situation of power consumption, be conducive to improve Electronic device controls the intelligence and accuracy of the position service function of application program.
In a possible example, the first message is also used to indicate that the application control module executes following behaviour Make:
When received in the objective time interval from the second message of the motion detection service, when removing the target Section, detects whether the electronic device remains static again.
As it can be seen that in this example, the lasting operation motion sensor of electronic device carries out monitoring position, is detecting fortune When dynamic, timer is reset, carries out new detection, and then can comprehensively be monitored to electronic device, avoided the occurrence of and accidentally close The case where location-based service, occurs, and is conducive to the intelligent and accurate of the position service function for improving electronic device control application program Property.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
Referring to Fig. 4, Fig. 4 is that the embodiment of the present application provides a kind of flow diagram of location-based service control method, answer For electronic device, the electronic device includes motion sensor, and the motion sensor is registered to the electronic device Motion detection service, the location-based service control method in the embodiment of the present application include:
S401, the data of motion sensor are monitored in motion detection service in electronic device.
S402, motion detection service manage mould when remaining static according to Data Detection to electronic device, to application Block sends first message.
S403 receives the first message from motion detection service using control module in electronic device.
S404 determines objective time interval using control module.
The change in location of S405, motion detection service detection electronic device meet preset condition.
S406 sentences when do not received in objective time interval using control module from the second message of motion detection service Whether currently running application program of breaking enables location-based service.
S407 is closed using control module when judging that currently running application program enables location-based service and is applied journey Sequence or closed position service.
As can be seen that motion detection service first listens to the number of motion sensor in electronic device in the embodiment of the present application According to motion detection service sends first when remaining static according to Data Detection to electronic device, to application control module Message, secondly, the first message from motion detection service is received using control module in electronic device, it is true using control module It sets the goal the period, again, the change in location of motion detection service detection electronic device meets preset condition, then, using control When module is not received in objective time interval from the second message of motion detection service, judge that currently running application program is No enabling location-based service, finally, application control module is closed when judging that currently running application program enables location-based service Application program or closed position service.It can be seen that electronic device being capable of location-based service by monitoring moving state to target application Function is controlled, and the position service function is avoided to occupy Installed System Memory continuous drain always, is conducive to improve electronic device control The intelligence of the position service function of application program processed improves memory service efficiency and cruising ability.
It is above-mentioned that mainly the scheme of the embodiment of the present application is described from the angle of method side implementation procedure.It is understood that , in order to realize the above functions, it comprises execute the corresponding hardware configuration of each function and/or software mould for electronic device Block.Those skilled in the art should be readily appreciated that, in conjunction with each exemplary unit of embodiment description presented herein And algorithm steps, the application can be realized with the combining form of hardware or hardware and computer software.Some function actually with Hardware or computer software drive the mode of hardware to execute, the specific application and design constraint item depending on technical solution Part.Professional technician can specifically realize described function to each using distinct methods, but this reality Now it is not considered that exceeding scope of the present application.
The embodiment of the present application can carry out the division of functional unit according to above method example to electronic device, for example, can With each functional unit of each function division of correspondence, two or more functions can also be integrated in a processing unit In.Above-mentioned integrated unit both can take the form of hardware realization, can also realize in the form of software functional units.It needs It is noted that be schematical, only a kind of logical function partition to the division of unit in the embodiment of the present application, it is practical real It is current that there may be another division manner.
It is consistent with above-mentioned Fig. 2, Fig. 3, embodiment shown in Fig. 4, referring to Fig. 5, Fig. 5 is provided by the embodiments of the present application A kind of structural schematic diagram of electronic device, as shown, the electronic device includes processor, memory, communication interface and one A or multiple programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned processing Device executes, and above procedure includes the instruction for executing following steps;
The first message from the motion detection service is received using control module, wherein the first message is used for Indicate that the electronic device remains static;
Application control module determines objective time interval, wherein the start time of the objective time interval is to receive described the The time of one message;
The application manages module is not received in the objective time interval from the motion detection service second and disappears When breath, judge whether currently running application program enables location-based service, the second message is for indicating the electronic device It moves;
The application control module is when judging that the currently running application program enables location-based service, described in closing Application program closes the location-based service.
As can be seen that receiving in electronic device using control module and being examined from the movement first in the embodiment of the present application The first message of service is surveyed, secondly, application control module determines objective time interval, then, the application control module is in institute It states when do not received in objective time interval from the second message of the motion detection service, judges that currently running application program is No enabling location-based service, finally, module is managed in the application is judging currently running application program enabling position clothes When business, closes the application program or close the location-based service.It can be seen that electronic device position user apart from detection and exist The scene that objective time interval does not move really, since the scene is without using location information, can be serviced with closed position or Using avoiding the position service function from occupying Installed System Memory continuous drain always, be conducive to improve electronic device control using journey The intelligence of the position service function of sequence improves memory service efficiency and cruising ability.
In a possible example, the first message is the motion detection service detection to data, and according to institute It states and sends when electronic device described in data judging remains static.
In a possible example, the second message is for indicating that the electronic device moves, described second Message is that the motion detection service is sent when detecting that the electronic device change in location meets preset condition, described pre- If condition be the electronic device first position and the second position between linear distance be less than pre-determined distance, described first The electronic device is set in the position of the start time, the second position is the electronic device in the preset period of time The position of the interior any point-in-time in addition to the start time.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
In a possible example, after application control module determines objective time interval, the method also includes: When the application control module is received in the objective time interval from the second message of the motion detection service, institute is removed Objective time interval is stated, detects whether the electronic device remains static again.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
It is consistent with above-mentioned Fig. 2, Fig. 3, embodiment shown in Fig. 4, referring to Fig. 5, Fig. 5 is provided by the embodiments of the present application A kind of structural schematic diagram of electronic device, as shown, the electronic device includes processor, memory, communication interface and one A or multiple programs, wherein said one or multiple programs are stored in above-mentioned memory, and are configured by above-mentioned processing Device executes, and above procedure includes the instruction for executing following steps;
The data of the motion sensor are monitored in the motion detection service;
The motion detection service according to the Data Detection to the electronic device when remaining static, to application It manages module and sends first message, wherein the first message is for indicating that the electronic device remains static;
Whether the change in location of electronic device described in the motion detection service detection meets preset condition, the default item Part is that the linear distance between the first position and the second position of the electronic device is less than pre-determined distance, and the first position is For the electronic device in the position of the start time, the second position is that the electronic device removes in the objective time interval The position of any point-in-time except the start time.
As can be seen that motion detection service first listens to the number of motion sensor in electronic device in the embodiment of the present application According to secondly, motion detection service when being remained static according to Data Detection to electronic device, is sent to application control module First message, finally, whether the change in location of motion detection service detection electronic device meets preset condition.It can be seen that electronic device By monitoring motion state, the scene that positioning user does not move really in objective time interval, since the scene is believed without using position Breath, therefore can service or apply with closed position, it avoids the position service function from occupying Installed System Memory continuous drain always, has Conducive to the intelligence for the position service function for improving electronic device control application program, memory service efficiency and continuation of the journey energy are improved Power.
In a possible example, the first message is used to indicate the application control module and executes following operation: It determines the objective time interval, and does not receive the second message from the motion detection service in the objective time interval When, judge whether currently running application program enables location-based service, and judging the currently running application program When enabling location-based service, closes the application program or close the location-based service.
In a possible example, the start time of the objective time interval is the time for receiving the first message, institute Second message is stated for indicating that the electronic device moves, the second message is the motion detection service in detection institute State what electronic device was sent when the change in location for detecting the electronic device meets the preset condition.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
In a possible example, the first message is also used to indicate that the application control module executes following behaviour Make:When received in the objective time interval from the second message of the motion detection service, the objective time interval is removed, weight Newly detect whether the electronic device remains static.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
Fig. 6 is the functional unit composition block diagram of location-based service control device 600 involved in the embodiment of the present application.The position Service control device 600 is set applied to electronic device, the electronic device includes motion sensor, and the motion sensor is infused Volume arrives the motion detection service of the electronic device, which includes receiving unit 601, determination unit 602 and closing unit 603, wherein
The receiving unit 601 receives the first message from the motion detection service for application control module, In, the first message is for indicating that the electronic device remains static;
The determination unit 602 determines objective time interval for application control module, wherein the objective time interval Start time is the time for receiving the first message;
The receiving unit 601 is also used to the application control module and does not receive in the objective time interval from institute When stating the second message of motion detection service, judge whether currently running application program enables location-based service, described second disappears Breath is for indicating that the electronic device moves;
The closing unit 603 is judging that the currently running application program opens for application control module When with location-based service, closes the application program or close the location-based service.
As can be seen that receiving in electronic device using control module and being examined from the movement first in the embodiment of the present application The first message of service is surveyed, secondly, application control module determines objective time interval, then, the application control module is in institute It states when do not received in objective time interval from the second message of the motion detection service, judges that currently running application program is No enabling location-based service, finally, module is managed in the application is judging currently running application program enabling position clothes When business, closes the application program or close the location-based service.As it can be seen that electronic device, which passes through application control module, carries out position The shutoff operation for setting service is conducive to improve the intelligence of application management module control position service function in electronic device, mentions High memory service efficiency and cruising ability.
In a possible example, the first message is the motion detection service detection to data, and according to institute It states and sends when electronic device described in data judging remains static.
In a possible example, the second message is for indicating that the electronic device moves, described second Message is that the motion detection service is sent when detecting that the electronic device change in location meets preset condition, described pre- If condition be the electronic device first position and the second position between linear distance be less than pre-determined distance, described first The electronic device is set in the position of the start time, the second position is the electronic device in the preset period of time The position of the interior any point-in-time in addition to the start time.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
In a possible example, after application control module determines objective time interval, the receiving unit 601 It is specifically used for:The application control module receives the second message from the motion detection service in the objective time interval When, the objective time interval is removed, detects whether the electronic device remains static again.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
Fig. 7 is the functional unit composition block diagram of location-based service control device 700 involved in the embodiment of the present application.The position Service control device 700 is set applied to electronic device, the electronic device includes motion sensor, and the motion sensor is infused Volume arrives the motion detection service of the electronic device, which includes monitoring unit 701, transmission unit 702 and detection unit 703, wherein
The monitoring unit 701 monitors the data of the motion sensor for motion detection service;
The transmission unit 702, for the motion detection service according to the Data Detection to the electronic device When remaining static, first message is sent to application control module, wherein the first message is for indicating the electronics dress It sets and remains static;
Whether the detection unit 703, the change in location for electronic device described in the motion detection service detection are full Sufficient preset condition, the preset condition are that the linear distance between the first position and the second position of the electronic device is less than in advance If distance, the first position is the electronic device in the position of the start time, and the second position is the electronics The position of any point-in-time of the device in the objective time interval in addition to the start time.
As can be seen that motion detection service first listens to the number of motion sensor in electronic device in the embodiment of the present application According to secondly, motion detection service when being remained static according to Data Detection to electronic device, is sent to application control module First message, finally, whether the change in location of motion detection service detection electronic device meets preset condition.It can be seen that electronic device By monitoring motion state, carry out positioning the scene that user does not move really in objective time interval apart from detection, due to the scene without Location information need to be used, therefore can service or apply with closed position, the position service function is avoided to occupy in system always Continuous drain is deposited, is conducive to the intelligence for improving the position service function of electronic device control application program, improves memory and use Efficiency and cruising ability.
In a possible example, the first message is used to indicate the application control module and executes following operation: It determines the objective time interval, and does not receive the second message from the motion detection service in the objective time interval When, judge whether currently running application program enables location-based service, and judging the currently running application program When enabling location-based service, closes the application program or close the location-based service.
In a possible example, the start time of the objective time interval is the time for receiving the first message, institute Second message is stated for indicating that the electronic device moves, the second message is the motion detection service in detection institute State what electronic device was sent when the change in location for detecting the electronic device meets the preset condition.
In a possible example, the objective time interval is the timing period of target timing device, the target timing device Module timer according to set by the first message is managed for the application.
In a possible example, the electronic device further includes receiving unit 704, and the first message is also used to refer to Show that the application control module executes following operation, the receiving unit 704 is specifically used for:It is received in the objective time interval When from the second message of the motion detection service, the objective time interval is removed, detects whether the electronic device is located again In stationary state.
In a possible example, the type of the motion sensor be type-effectively-movement type_ significant_motion。
Referring to Fig. 8, Fig. 8 is that the embodiment of the present application provides a kind of structural schematic diagram of smart phone 800, the intelligence Mobile phone 800 includes:Shell 810, touching display screen 820, mainboard 830, battery 840 and subplate 850, before being provided on mainboard 830 Camera 831, processor 832, memory 833, power management chip 834 etc. are set, oscillator 851, integrated sound are provided on subplate Interface 853 is filled in chamber 852, VOOC sudden strain of a muscle.
Wherein, the first message from the motion detection service is received first using control module in electronic device, Secondary, the application control module determines objective time interval, and then, the application control module does not receive in the objective time interval When from the second message of the motion detection service, judge whether currently running application program enables location-based service, finally, The application control module closes the application program when judging that the currently running application program enables location-based service Or close the location-based service.
The processor 832 is the control centre of smart phone, utilizes various interfaces and the entire smart phone of connection Various pieces, by running or execute the software program and/or module that are stored in memory 833, and call and be stored in Data in memory 833 execute the various functions and processing data of smart phone, to carry out whole prison to smart phone Control.Optionally, processor 832 may include one or more processing units;Preferably, processor 832 can integrate application processor And modem processor, wherein the main processing operation system of application processor, user interface and application program etc., modulatedemodulate Processor is adjusted mainly to handle wireless communication.It is understood that the modem processor can not also be integrated into processor In 832.The processor 832 for example can be central processing unit (Central Processing Unit, CPU), general procedure Device, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application- Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) either other programmable logic device, transistor logic, hardware component or any combination thereof.It can To realize or execute various illustrative logic blocks, module and circuit in conjunction with described in present disclosure.The place Reason device is also possible to realize the combination of computing function, such as combines comprising one or more microprocessors, DSP and microprocessor Combination etc..
The memory 833 can be used for storing software program and module, and processor 832 is stored in memory by operation 833 software program and module, thereby executing the various function application and data processing of smart phone.Memory 833 can It mainly include storing program area and storage data area, wherein storing program area can be needed for storage program area, at least one function Application program etc.;Storage data area, which can be stored, uses created data etc. according to smart phone.In addition, memory 833 May include high-speed random access memory, can also include nonvolatile memory, a for example, at least disk memory, Flush memory device or other volatile solid-state parts.The memory 833 for example can be random access memory (Random Access Memory, RAM), flash memory, read-only memory (Read Only Memory, ROM), the read-only storage of erasable programmable Device (Erasable Programmable ROM, EPROM), Electrically Erasable Programmable Read-Only Memory (Electrically EPROM, EEPROM), register, hard disk, mobile hard disk, CD-ROM (CD-ROM) or any other shape well known in the art The storage medium of formula.
The embodiment of the present application also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity The computer program of subdata exchange, the computer program make computer execute any as recorded in above method embodiment Some or all of method step, above-mentioned computer include mobile terminal.
The embodiment of the present application also provides a kind of computer program product, and above-mentioned computer program product includes storing calculating The non-transient computer readable storage medium of machine program, above-mentioned computer program are operable to that computer is made to execute such as above-mentioned side Some or all of either record method step in method embodiment.The computer program product can be a software installation Packet, above-mentioned computer includes mobile terminal.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit, It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer-readable access to memory.Based on this understanding, technical solution of the present invention substantially or Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment (can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the present invention Step.And memory above-mentioned includes:USB flash disk, read-only memory (read-only memory, ROM), random access memory The various media that can store program code such as (random access memory, RAM), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory May include:Flash disk, read-only memory (read-only memory, ROM), random access device (random access Memory, RAM), disk or CD etc..
The embodiment of the present application is described in detail above, specific case used herein to the principle of the present invention and Embodiment is expounded, and the above description of the embodiment is only used to help understand the method for the present invention and its core ideas; At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the present invention There is change place, in conclusion the contents of this specification are not to be construed as limiting the invention.

Claims (10)

1. a kind of location-based service control method, which is characterized in that be applied to electronic device, the electronic device includes motion-sensing Device, the motion sensor are registered to the motion detection service of the electronic device, the method includes:
The first message from the motion detection service is received using control module, wherein the first message is for indicating The electronic device remains static;
The application control module determines objective time interval, wherein the start time of the objective time interval is to receive described first to disappear The time of breath;
When the application control module is not received in the objective time interval from the second message of the motion detection service, Judge whether currently running application program enables location-based service, the second message is for indicating that the electronic device moves It is dynamic;
The application control module closes the application when judging that the currently running application program enables location-based service Program closes the location-based service.
2. the method according to claim 1, wherein the first message is that the motion detection service detection arrives Data, and when electronic device according to the data judging remains static, sends.
3. method according to claim 1 or 2, which is characterized in that the second message is for indicating the electronic device It moves, the second message is that the motion detection service is detecting the default item of electronic device change in location satisfaction It is sent when part, the preset condition is that the linear distance between the first position and the second position of the electronic device is less than in advance If distance, the first position is the electronic device in the position of the start time, and the second position is the electronics The position of any point-in-time of the device in the preset period of time in addition to the start time.
4. the method according to claim 1, wherein the objective time interval be target timing device the timing period, The target timing device is that module timer according to set by the first message is managed in the application.
5. method according to claim 1 or 2, which is characterized in that the application control module determine objective time interval it Afterwards, the method also includes:
When the application control module is received in the objective time interval from the second message of the motion detection service, clearly Except the objective time interval, detect whether the electronic device remains static again.
6. method according to claim 1-5, which is characterized in that the type of the motion sensor is type- Effectively-movement type_significant_motion.
7. a kind of location-based service control device, which is characterized in that including being applied to electronic device, the electronic device includes movement Sensor, the motion sensor are registered to the motion detection service of the electronic device, the location-based service control device Including receiving unit, determination unit and closing unit, wherein
The receiving unit receives the first message from the motion detection service for application control module, wherein described First message is for indicating that the electronic device remains static;
The determination unit determines objective time interval for application control module, wherein the start time of the objective time interval For the time for receiving the first message;
The receiving unit is also used to the application control module and is not received in the objective time interval from movement inspection When surveying the second message of service, judge whether currently running application program enables location-based service, the second message is used for table Show that the electronic device moves;
The closing unit is judging currently running application program enabling position clothes for application control module When business, closes the application program or close the location-based service.
8. location-based service control device according to claim 7, which is characterized in that the first message is the movement inspection Service detection is surveyed to data, and when electronic device according to the data judging remains static sends.
9. a kind of electronic device, which is characterized in that including processor, memory, communication interface, and one or more programs, One or more of programs are stored in the memory, and are configured to be executed by the processor, described program packet Include the instruction for executing the step in the method according to claim 1 to 7.
10. a kind of computer readable storage medium, which is characterized in that storage is used for the computer program of electronic data interchange, In, the computer program makes computer execute the method according to claim 1 to 7.
CN201810574084.8A 2018-06-06 2018-06-06 Location-based service control method and Related product Pending CN108881626A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810574084.8A CN108881626A (en) 2018-06-06 2018-06-06 Location-based service control method and Related product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810574084.8A CN108881626A (en) 2018-06-06 2018-06-06 Location-based service control method and Related product

Publications (1)

Publication Number Publication Date
CN108881626A true CN108881626A (en) 2018-11-23

Family

ID=64337059

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810574084.8A Pending CN108881626A (en) 2018-06-06 2018-06-06 Location-based service control method and Related product

Country Status (1)

Country Link
CN (1) CN108881626A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116755977A (en) * 2023-08-08 2023-09-15 荣耀终端有限公司 Motion monitoring method, electronic device and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105188115A (en) * 2015-07-31 2015-12-23 广东欧珀移动通信有限公司 Method and device for saving electricity for intelligent terminal
CN105657772A (en) * 2016-03-21 2016-06-08 广东小天才科技有限公司 Method and system for automatically switching terminal modes
CN105682032A (en) * 2016-01-13 2016-06-15 广东欧珀移动通信有限公司 Positioning mode control method, positioning mode control device and mobile terminal
CN106793040A (en) * 2016-12-30 2017-05-31 深圳天珑无线科技有限公司 Terminal control method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105188115A (en) * 2015-07-31 2015-12-23 广东欧珀移动通信有限公司 Method and device for saving electricity for intelligent terminal
CN105682032A (en) * 2016-01-13 2016-06-15 广东欧珀移动通信有限公司 Positioning mode control method, positioning mode control device and mobile terminal
CN105657772A (en) * 2016-03-21 2016-06-08 广东小天才科技有限公司 Method and system for automatically switching terminal modes
CN106793040A (en) * 2016-12-30 2017-05-31 深圳天珑无线科技有限公司 Terminal control method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116755977A (en) * 2023-08-08 2023-09-15 荣耀终端有限公司 Motion monitoring method, electronic device and computer readable storage medium
CN116755977B (en) * 2023-08-08 2024-04-12 荣耀终端有限公司 Motion monitoring method, electronic device and computer readable storage medium

Similar Documents

Publication Publication Date Title
EP3567477B1 (en) Method for preloading application, storage medium, and terminal
CN108415739B (en) Hook method and device for dynamic link library function and storage medium
CN107861814A (en) Resource allocation method and equipment
CN106549464A (en) A kind of charge control method, device and computer equipment
CN103389863B (en) A kind of display control method and device
CN103476064A (en) Method and device for flow control of terminal device and terminal device
CN107786738B (en) Network control method and equipment
CN107786748A (en) Method for displaying image and equipment
CN110168483A (en) What Display on the same screen was not different applies shortcut menu
CN107635078A (en) Game control method and equipment
CN108196814A (en) Pronunciation inputting method and Related product
CN104158962B (en) Mobile terminal display screen control method and its system
CN109074303A (en) A kind of Caton detection method and device
CN108055386B (en) Mobile terminal, management method thereof and storage device
CN107832111A (en) Game application control method and equipment
CN109061611A (en) Proximity sensor calibration method and relevant apparatus
CN107832142A (en) The resource allocation method and equipment of application program
CN111966491A (en) Method for counting occupied memory and terminal equipment
CN109714476A (en) Data processing method, device, mobile terminal and storage medium
CN108881626A (en) Location-based service control method and Related product
CN108762983A (en) Multi-medium data restoration methods and device
CN114879879B (en) Method for displaying health code, electronic equipment and storage medium
CN107890667B (en) Game application control method and equipment
CN116088716B (en) Window management method and terminal equipment
CN108132817B (en) Object management method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181123