CN107704754A - A kind of terminal control method and device, computer-readable recording medium - Google Patents

A kind of terminal control method and device, computer-readable recording medium Download PDF

Info

Publication number
CN107704754A
CN107704754A CN201710724968.2A CN201710724968A CN107704754A CN 107704754 A CN107704754 A CN 107704754A CN 201710724968 A CN201710724968 A CN 201710724968A CN 107704754 A CN107704754 A CN 107704754A
Authority
CN
China
Prior art keywords
terminal
application program
gripping
number
working condition
Prior art date
Application number
CN201710724968.2A
Other languages
Chinese (zh)
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 努比亚技术有限公司
Priority to CN201710724968.2A priority Critical patent/CN107704754A/en
Publication of CN107704754A publication Critical patent/CN107704754A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 – G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of power-saving mode
    • G06F1/3234Power saving characterised by the action undertaken

Abstract

The invention discloses a kind of terminal control method and device, computer-readable recording medium, for it is existing due to terminal without using and need obtain positional information application program in the case of running background, location updating can be asked automatically in real time, so as to cause power consumption of terminal too high, and the defects of data traffic waste, the present invention according to the current running parameter of terminal by judging working condition that terminal is presently in, if the working condition of terminal is gripping and unlocking screen state, terminal control application program obtains the current location information of terminal according to position updating request, so as to avoid user in the case of unwitting, application program actively accesses position, and then avoid privacy of user and be compromised.Meanwhile when it is not gripping and unlocking screen state that terminal, which is in, illustrate that user does not have using terminal now, by forbidding the application program to access position, the power consumption of terminal can be reduced, improves the endurance of terminal.

Description

A kind of terminal control method and device, computer-readable recording medium

Technical field

, can more specifically to a kind of terminal control method and device, computer the present invention relates to field of mobile terminals Read storage medium.

Background technology

With the continuous development of terminal technology, progress, the application program that mobile terminal uses is also more and more, especially right In the use of the applications such as map, chat, user can usually use navigation feature, but after navigation has been used, user is often Forget to close, so as to cause the consumption of the waste of data traffic and terminal power.

At present, when accessing position for these application requests, GPS service modules can check the power of the application program Limit, and constantly prompt the user whether that needs carry out confirmation operation, if forbidding application program to obtain position, then do not provide position The service of putting;If allowing application program to obtain position, then location-based service is provided;Such prompting can cause user to detest very much It is tired, the usage experience of user is greatly reduced, while its operation is also relatively complicated, therefore, how to avoid user from not making Current geographic position is got with application program during terminal, is urgently solved so as to protect the privacy of user and reduce power consumption of terminal to turn into Certainly the problem of.

The content of the invention

The technical problem to be solved in the present invention is that avoiding user's application program when without using terminal can get Current geographic position, so as to protect the problem of privacy of user is with power consumption of terminal is reduced, for the technical problem, there is provided a kind of Terminal control method and device, computer-readable recording medium.

In order to solve the above technical problems, the present invention provides a kind of terminal control method, methods described includes:

When receiving the position updating request of application program, the current running parameter of terminal is obtained;

Judge whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter;

If the working condition is gripping and unlocking screen state, working as terminal, is obtained according to the position updating request Front position information;

If the working condition is not gripping and unlocking screen state, the location updating that the application program is sent is intercepted Request.

Optionally, the running parameter includes:The number of the sensor being triggered on the terminal side and screen Display brightness;

It is described to judge whether the current working condition of terminal is gripping and unlocking screen state bag according to the running parameter Include:

Whether the number for the sensor being triggered described in judgement meets number as defined in the grip state;

If the number of the sensor being triggered meet the grip state as defined in number, judge the terminal The display brightness of screen;

If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen shape State.

Optionally, after judging the working condition for gripping and unlocking screen state according to the running parameter, also Including:Judge whether the application program is to belong under the self-defined pattern that user is set according to own actual situation to allow to run Application program;If belonging under self-defined pattern allows the application program of operation, obtained eventually according to the position updating request The current location information at end.

Optionally, after judging the working condition for gripping and unlocking screen state according to the running parameter, also Including:

Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;

If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the current location of terminal Information.

Optionally, detect includes on the screen of the terminal in the presence of the sliding touch operation for meeting preparatory condition:

Obtain the number of the sliding touch operation on the terminal screen in preset time period;

Judge whether the number of the sliding touch operation is equal to or more than predetermined threshold value;

If the number is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

Optionally, the current location information for allowing the application program to obtain terminal includes

Judge whether the application program is in navigation pattern;

If the application program is in the navigation pattern, the application program is allowed to continuously acquire the present bit of terminal Put;

If the application program is not in the navigation pattern, the application program is allowed to obtain once the terminal Current location information.

Further, present invention also offers a kind of terminal control mechanism, the terminal control mechanism includes reason device, storage Device and communication bus;

The communication bus is used to realize the connection communication between processor and memory;

The processor is used to perform the terminal control program stored in the memory, to realize following steps:

When receiving the position updating request of application program, the current running parameter of terminal is obtained;

Judge whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter;

If the working condition is gripping and unlocking screen state, working as terminal, is obtained according to the position updating request Front position information;

If the working condition is not gripping and unlocking screen state, the location updating that the application program is sent is intercepted Request.

Optionally, the running parameter includes:The number of the sensor being triggered on the terminal side and screen Display brightness;

The processor judges whether the current working condition of terminal is gripping and unlocking screen according to the running parameter State includes:

Whether the number for the sensor being triggered described in judgement meets number as defined in the grip state;

If the number of the sensor being triggered meet the grip state as defined in number, judge the terminal The display brightness of screen;

If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen shape State.

Optionally, the terminal control program stored in memory described in the computing device, it is additionally operable to realize following step Suddenly:

Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;

If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the current location of terminal Information.

Further, present invention also offers a kind of computer-readable recording medium, the computer-readable recording medium It is stored with one or more program, one or more of programs can be by one or more computing device, to realize The step of terminal control method described in any one as describe above.

Beneficial effects of the present invention:

The present invention provides a kind of terminal control method and device, computer-readable recording medium, for existing due to terminal Without using and need obtain positional information application program in the case of running background, can in real time automatically request position more Newly, so as to causing power consumption of terminal too high, and the defects of data traffic wastes, the present invention passes through to join according to the current work of terminal Number judges the working condition that terminal is presently in, if the working condition of terminal is gripping and unlocking screen state, terminal control The application program obtains the current location information of terminal according to position updating request, if the working condition is not to grip and shield Curtain released state, then the position updating request that the application program is sent is intercepted, so as to avoid user in unwitting situation Under, application program actively accesses position, and then avoids privacy of user and be compromised.Meanwhile terminal be in be not grip and During unlocking screen state, illustrate that user does not have using terminal now, by forbidding the application program to access position, can reduce end The power consumption at end, improve the endurance of terminal.

Brief description of the drawings

Below in conjunction with drawings and Examples, the invention will be further described, in accompanying drawing:

Fig. 1 is the hardware architecture diagram for realizing each optional mobile terminal of embodiment one of the present invention;

Fig. 2 is the terminal control method basic flow sheet that first embodiment of the invention provides;

Fig. 3 is the terminal control method refined flow chart that second embodiment of the invention provides;

Fig. 4 is the structural representation for the mobile terminal that third embodiment of the invention provides.

Embodiment

It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.

In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.

Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.

It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.

Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.

The all parts of mobile terminal are specifically introduced with reference to Fig. 1:

Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..

WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.

Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..

A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.

Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.

Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.

User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.

Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.

Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with For transmitting data between mobile terminal 100 and external device (ED).

Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.

Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main Handle radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.

Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.

Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..

Based on above-mentioned mobile terminal hardware configuration, each embodiment of the inventive method is proposed.

First embodiment

Fig. 2 is the terminal control method basic flow sheet that the present embodiment provides, and the terminal control method includes:

S201, receiving the position updating request of application program.

S202, obtain the current running parameter of terminal.

Wherein, the display of number sum of the running parameter including the sensor being triggered on the terminal side is bright Degree;In other examples, the running parameter can also include the parameters such as moving displacement, the translational speed of terminal, work as institute State running parameter for moving displacement, translational speed parameter when, the processor of terminal determines the current work of terminal according to these parameters Make whether state meets to open GPS location function.

In actual applications, the detection for the number of the sensor being triggered can specifically employ counters to reality Existing, by setting a counter in terminal, the counter will be connected with each sensor signal output end respectively, work as sensing When the output end of device has signal output, sensor corresponding to this explanation has been triggered, and unison counter is carried out to the sensor Record, optionally, the sensor can be pressure sensor, infrared induction sensor etc., when user is held by terminal, Palm can be pressed pressure sensor and cause sensor to produce trigger signal.

It can also similarly be gathered, such as be made up of photo resistance photosensitive using sensor for the display brightness of screen Sensor, the resistance value that terminal handler exports according to light sensor determines the current display brightness of screen, because terminal exists When screen lock state is lit, the display brightness on terminal screen can be dark many than the display brightness of released state sub-screen , therefore, screen locking and released state can be distinguished by brightness, but also can be reduced the feelings of erroneous judgement released state Condition, further increase accuracy of identification.

S203, judge according to the running parameter whether the current working condition of terminal is to grip and unlocking screen state.

In this step, as that the running parameter got is the sensor being triggered on the terminal side During the display brightness of number sum, the working condition for judging that terminal is current is particular by the biography being triggered in the terminal got The number of sensor judges whether current working condition is grip state, and judges that terminal is current according to the display brightness of screen Working condition whether be released state.

In actual applications, when the grip state refers to that the number for the sensor being triggered reaches default numerical value, It is grip state that terminal, which will be determined, and not necessarily user holds with a hand terminal and just cries gripping, and gripping here is with quilt The number of probes of triggering provides, such as, terminal clamped by elastic bracket base in the case of can also grip State, specifically, whether the number that the deterministic process can be the sensor being triggered described in judgement meets the grip state Defined number, if the number of the sensor being triggered meet the grip state as defined in number, judge the end The display brightness of the screen at end, if the display brightness is equal to or more than predetermined luminance value, judges that the terminal is in and grip And unlocking screen state.

In the present embodiment, optionally, grip state is first determined whether, if so, then continuing to determine whether to unlock shape State, if so, then allowing the current location information of some application programs acquisition terminal in terminal.Conciliate further for grip state The judgement order of lock status is not fixed, can also first determine whether released state, if so, then continuing to judge to grip shape State.In other words, when both judged result is meets simultaneously, step S204 is jumped to, it is discontented when there is one in the two Foot, then jump to step S205 and perform intercepting position renewal request.

If S204, the working condition are gripping and unlocking screen state, obtained eventually according to the position updating request The current location information at end.

In the present embodiment, it is right during the current location information of terminal is obtained according to the position updating request The demand of positional information is also not quite similar in different application programs, if needing to be entered according to positional information during the application program During row navigation, then the application program is real-time update for the demand of positional information, if application program simply sends one During positioning address, such as, when user sends the positioning of oneself by application program " wechat " to good friend, then only need to open positioning One-time positioning is carried out to " wechat ", determines the position that terminal is presently in, so, in actual applications, in application program Can be specifically in the step of obtaining current location information:

Judge whether the application program is in navigation pattern;

If the application program is in the navigation pattern, the application program is allowed to continuously acquire the present bit of terminal Put;

If the application program is not in the navigation pattern, the application program is allowed to obtain once the terminal Current location information.

In certain embodiments, step S204 is judging the working condition for gripping and screen according to the running parameter After released state, in addition to:Judge whether the application program is to belong to user to make by oneself according to what own actual situation was set Allow the application program of operation under adopted pattern;If belonging under self-defined pattern allows the application program of operation, according to institute's rheme Put the current location information of renewal acquisition request terminal.

Optionally, self-defined pattern here refers to user according to the actual use conditions of demand of oneself and in terminal Application program carry out customized setting, such as, in list is set, set which application program to allow to obtain positioning and believe Breath, and allow highest access rights, and the application used of these self-defined settings is positioned over to the list under self-defined pattern In, when when it is gripping and unlocking screen state to determine terminal, further whether application program corresponding to judgement belongs to this One in the list of self-defined pattern, if belonging to, allow the operation being defined, that is, can be achieved on according to the position Update the current location information of acquisition request terminal.

If S205, the working condition are not gripping and unlocking screen state, the position that the application program is sent is intercepted Put renewal request.

In this step it is mentioned to working condition refer to judging whether the terminal is grip state and screen One in released state at least be present to be judged as NO, as long as meet to want above-mentioned described situation, terminal will intercept should Position updating request is sent with program.

In other embodiments of the present invention, sometimes occur that the situation of maloperation, such as user are put by mobile phone Put during pocket, inadvertently contacted the operation of unlocked by fingerprint so that mobile phone is unlocked, but at this moment user is simultaneously Do not know, in this case, user is without using mobile phone, therefore, in order to avoid mobile phone also can be automatic in this case The current location information for obtaining terminal is authorized, and causes the waste problem of data traffic, the present embodiment is also set in step S204 The step of being operated on the screen for judge terminal with the presence or absence of sliding touch has been put to avoid the phenomenon of maloperation.

Optionally, after judging the working condition for gripping and unlocking screen state according to the running parameter, also Including:

Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;

If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the current location of terminal Information.

In actual applications, whether have on the screen for judging terminal and meet that the sliding touch operation of preparatory condition is defeated Enter, can specifically be accomplished by the following way:

Mode one:One judgment rule is set first, the judgment rule can be the restriction to sliding touch number of operations, The sliding touch operation of certain amount (being a default threshold value) is detected as defined in being limited in time span;

Then, the number of the sliding touch operation on the terminal screen in preset time period is obtained;

Further, whether the number for the sliding touch operation for judging to get is equal to or more than predetermined threshold value;

If the number is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

Mode two:The rule of sliding touch operation is set according to the use habit of user first, for example can be gone out every 5 seconds An existing touch-control, the touch-control can be prolonged slip or one click etc., it is only necessary to before and after judging twice Operating time at intervals of thinking the rule that meets sliding touch set in advance less than or equal to 5 seconds;

Then, before and after obtaining on the terminal screen in preset time period between the time of sliding touch operation twice Every;

Further, whether the time interval for the sliding touch operation for judging to get is less than or equal to predetermined threshold value;

If the time interval is less than or equal to predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

Mode three:The frequency of use of sliding touch operation is set according to the use habit of user first;

Then, total number of operations of the sliding touch operation on the terminal screen in preset time period is obtained;

Total number of operations and the ratio of preset time period are calculated, obtain the current sliding touch operation of terminal uses frequency Rate;

Further, whether the frequency of use for judging to be calculated is equal to or more than predetermined threshold value;

If the frequency of use is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

In actual applications, above-mentioned all Rule of judgment can also be all provided with being set to the use habit shape of user by user State, it is that user can be with a self-defined terminal work mode, the mode of operation is only to meet the user use habit of oneself, For example, the user, which often in using terminal, is portrait layout, grips terminal, and the sliding touch behaviour occurred when in use on screen The frequency of work is very high, when detecting that above-mentioned two condition all meets, then directly thinks that terminal is in by use state, Ke Yiyun Perhaps the application program in terminal obtains current positional information according to position updating request.

The terminal control method that the present embodiment provides, determines whether to apply journey by judging the working condition of terminal Sequence obtains positional information, if the working condition is gripping and unlocking screen state,

Illustrate that user obtains the current location information of terminal according to the position updating request in using terminal, then permission, So as to avoid user in the case of unwitting, application program actively accesses position, and then avoids privacy of user and let out Dew.In addition, when if judged result is no, illustrate that user does not have using terminal now, by forbidding the application program to access position, The power consumption of terminal can be reduced, so as to improve the endurance of terminal.

Second embodiment

Fig. 3 is the terminal control method refined flow chart that second embodiment of the invention provides, and the terminal control method includes:

S302, request accesses position to application program first upon actuation.

In actual applications, the application program can also send position access request again in the process of running.

S304, GPS service module receive the request of the access position of application program transmission, and initiate one according to request Position updating request.

S306, judges whether application program has the authority for accessing position, if having the authority for accessing position, into step S308, if not accessing the authority of position, terminate this flow.

Specifically, when " without the authority for accessing position ", it can be come out, prompted the user whether with displayed on the terminals Need to open and position, for user option, with the selection according to user, judge whether application program has the authority for accessing position; When " if there is the authority for accessing position ", step S308 is directly entered.

S308, the running parameter of the currently detected terminal of record sensor, the running parameter include screen display brightness, The number of probes of triggering, the frequency of use of screen sliding touch operation, time interval of sliding touch operation etc..

S310, detect the change of the running parameter of record.

S312, judges whether above-mentioned running parameter meets preparatory condition, if not satisfied, then entering step S328, if full Foot, then into step S314.

Specifically, mainly judge terminal in step S312 is in grip state and released state, pass through acquisition To terminal on the number of sensor that is triggered judge whether current working condition is grip state, and according to screen Display brightness judges whether the current working condition of terminal is released state, when both judged result is meets simultaneously, jumps Step S314 is gone to, when being unsatisfactory in the two in the presence of one, then jumps to step S328.

S314, judge with the presence or absence of the sliding touch operation for meeting preparatory condition on screen, if in the presence of performing step S316, if being not present, jump to step S328.

In step S314, judge whether to meet default your cunning of readjusting prices to realize particular by the following manner Dynamic touch control operation, obtain the number of the sliding touch operation on the terminal screen in preset time period;Judge the slip Whether the number of touch control operation is equal to or more than predetermined threshold value;If the number is equal to or more than predetermined threshold value, it is determined that described Sliding touch operation meets preparatory condition.

S316, judges whether application program is in navigation pattern, when in navigation pattern, into step S318, otherwise, Into step S326.

S318, session link is established, that is, the session link of GPS service modules and application program is established, so that application program The current geographic position that GPS service modules navigate to can be got.

S320, update the data, that is, navigate to current geographic position, and update current geographic position.

S322, judge whether to receive ending request, when receiving ending request, into step S323, otherwise, again Into step S320.

S324, terminate session, that is, disconnect the session link of GPS service modules and application program.

S326, update a data.

S328, judges whether the change of data exceedes the time of setting, if not above the time of setting, reenters step Rapid S310, otherwise, into step S330.

S330, terminate service.

The present embodiment provide control control method, by according to the running parameter of terminal determine corresponding to working condition, Determine whether that application program obtains positional information from working condition, so as to avoid user in the case of unwitting, Application program actively accesses position, and then avoids privacy of user and be compromised, while also improves the continuation of the journey energy of end cell Power.

3rd embodiment

Fig. 4 is refer to, Fig. 4 is a kind of structural representation for terminal control mechanism that third embodiment of the invention provides, should Mobile terminal includes:Processor 51, memory 52 and communication bus 53, the communication between processor 51 and memory 52 pass through institute Communication bus 53 is stated to realize.

Processor 51 generally controls the overall operation of the server belonging to itself.For example, processor 51 perform calculate and really The operation such as recognize.Wherein, processor 51 can be central processing unit (CPU).In the present embodiment, processor 51 at least needs to have Such function:When receiving the position updating request of application program, the current running parameter of terminal is obtained, according to the work Make parameter and judge whether the current working condition of terminal is gripping and unlocking screen state, if the working condition is gripping and shields Curtain released state, then the current location information of terminal is obtained according to the position updating request, if the working condition is not held Hold and unlocking screen state, then intercept the position updating request that the application program is sent.

In actual applications, the terminal control mechanism is additionally provided with sensor, and the sensor is mainly used for judging terminal Working condition, for obtaining the various running parameters of terminal, to the processing step of sensor and processor 51, can specifically lead to Cross to set and realize the software code of corresponding function to realize, optionally, memory 52 store processor 51 is readable, processor 51 can The software code of execution, it, which is included, is used for instruction (the i.e. software execution work(that control processor 51 performs function described above Can).In the present embodiment, memory 52, which at least needs to be stored with, realizes that processor 51 performs program and the control that above-mentioned function needs Sensor processed such as operates at the program of the collection of information to the display brightness of screen, sliding touch.

Memory 52, typically using semiconductor memory cell, including random access memory (RAM), read-only storage (ROM), And cache (CACHE), RAM are most important of which memories.Memory 52 is one of part important in computer, It is the bridge linked up with CPU, in computer the operation of all programs all carried out in internal memory, its effect is to be used for The temporarily operational data in storage CPU, and the data exchanged with external memory storages such as hard disks, as long as computer is in operation, CPU will carry out computing needing the data of computing to be transferred in internal memory, and CPU again sends out result after the completion of computing, interior The operation deposited also determines the stable operation of computer.

In the present embodiment, whether the processor 51 is judging the current working condition of terminal according to the running parameter In the step of gripping and unlocking screen state, whether to meet institute particular by the number for the sensor being triggered described in judgement State number as defined in grip state;

If the number of the sensor being triggered meet the grip state as defined in number, judge the terminal The display brightness of screen;

If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen shape State.

The processor 51 performs the terminal control program stored in the memory and realized to be sentenced according to the running parameter After the fixed working condition is gripping and unlocking screen state, in addition to perform the terminal control journey stored in the memory Sequence is to realize following steps:

Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;

If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the current location of terminal Information.

In the present embodiment, the processor 51 exists on the screen for detecting the terminal is realized meets preparatory condition During sliding touch operating procedure, operated particular by the sliding touch obtained on the terminal screen in preset time period Number;

Judge whether the number of the sliding touch operation is equal to or more than predetermined threshold value;

If the number is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

In actual applications, when detecting the sliding touch operating procedure for existing on the screen of the terminal and meeting preparatory condition Default bar can also be judged whether to meet by calculating the time interval of former and later two sliding touch operation in preset time period Part;It can also even be judged by counting the frequency of use of sliding touch operation.

In actual applications, for above-mentioned modules can also use Fig. 1 in processor, user input unit, Sensor and memory realize, be first by the current operating parameters of sensor acquisition terminal, it is current according to what is collected Running parameter judges the working condition of terminal, it is determined that after corresponding working condition, obtains user by user input unit and exists The sliding touch operation inputted on contact panel, the changing rule of record sliding touch operation, is determined corresponding according to changing rule Whether permission application program obtains positional information, if allowing, the control program control that stores in computing device memory The GPS module of terminal obtains the current location information of terminal, and is updated in corresponding application program.

The present embodiment additionally provides a kind of computer-readable recording medium, and the computer-readable recording medium storage has one Individual or multiple programs, one or more of programs can be by one or more computing devices, to realize following steps:

When receiving the position updating request of application program, the current running parameter of terminal is obtained;

Judge whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter;

If the working condition is gripping and unlocking screen state, working as terminal, is obtained according to the position updating request Front position information;

If the working condition is not gripping and unlocking screen state, the location updating that the application program is sent is intercepted Request.

In the present embodiment, the running parameter includes:The number of the sensor being triggered on the terminal side and The display brightness of screen, one or more journey that the processor is stored by performing in the computer-readable recording medium When sequence realizes gripping and the judgement of unlocking screen state, realized particular by following steps:

Whether the number for the sensor being triggered described in judgement meets number as defined in the grip state;

If the number of the sensor being triggered meet the grip state as defined in number, judge the terminal The display brightness of screen;

If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen shape State.

Further, the processor stored by performing in the computer-readable recording medium one or more Program, judging the working condition according to the running parameter to grip and after unlocking screen state, be additionally operable to realize with Lower step:

Judge whether the application program is to belong under the self-defined pattern that user is set according to own actual situation to allow The application program of operation;

If belonging under self-defined pattern allows the application program of operation, terminal is obtained according to the position updating request Current location information.

Further, the processor stored by performing in the computer-readable recording medium one or more Program, it is additionally operable to realize following steps:

Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;

If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the current location of terminal Information.

Wherein, in judging whether to meet the sliding touch operating process of preparatory condition, particular by acquisition institute State the number of the sliding touch operation on terminal screen in preset time period;

Judge whether the number of the sliding touch operation is equal to or more than predetermined threshold value;

If the number is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.

In summary, terminal control method and device provided by the invention, computer-readable recording medium, mainly pass through The working condition that terminal is presently in is judged according to the current running parameter of terminal, if the working condition of terminal is grips and screen During released state, application program described in terminal control obtains the current location information of terminal according to position updating request, if described Working condition is not gripping and unlocking screen state, then the position updating request that the application program is sent is intercepted, so as to avoid For user in the case of unwitting, application program actively accesses position, and then avoid privacy of user and be compromised.Meanwhile When it is not gripping and unlocking screen state that terminal, which is in, illustrate that user does not have using terminal now, by forbidding this to apply journey Sequence accesses position, can reduce the power consumption of terminal, improves the endurance of terminal.

It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.

The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.

Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal (can be mobile phone, computer, service Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.

Embodiments of the invention are described above in conjunction with accompanying drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned embodiment is only schematical, rather than restricted, one of ordinary skill in the art Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make a lot Form, these are belonged within the protection of the present invention.

Claims (10)

1. a kind of terminal control method, it is characterised in that methods described includes:
When receiving the position updating request of application program, the current running parameter of terminal is obtained;
Judge whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter;
If the working condition is gripping and unlocking screen state, the present bit of terminal is obtained according to the position updating request Confidence ceases;
If the working condition is not gripping and unlocking screen state, intercepts the location updating that the application program is sent and ask Ask.
2. terminal control method as claimed in claim 1, it is characterised in that the running parameter includes:The terminal side On the number for the sensor being triggered and the display brightness of screen;
It is described to judge whether the current working condition of terminal is gripping and unlocking screen state includes according to the running parameter:
Whether the number for the sensor being triggered described in judgement meets number as defined in the grip state;
If the number of the sensor being triggered meet the grip state as defined in number, judge the screen of the terminal Display brightness;
If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen state.
3. terminal control method as claimed in claim 2, it is characterised in that the work is being judged according to the running parameter After state is gripping and unlocking screen state, in addition to:Judge whether the application program is to belong to user according to itself reality Allow the application program of operation under the self-defined pattern that border situation is set;If belonging under self-defined pattern allows the application journey of operation Sequence, then the current location information of terminal is obtained according to the position updating request.
4. terminal control method as claimed in claim 1 or 2, it is characterised in that described in being judged according to the running parameter After working condition is gripping and unlocking screen state, in addition to:
Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;
If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the present bit confidence of terminal Breath.
5. terminal control method as claimed in claim 4, it is characterised in that detect on the screen of the terminal and satisfaction be present in advance If the sliding touch operation of condition includes:
Obtain the number of the sliding touch operation on the terminal screen in preset time period;
Judge whether the number of the sliding touch operation is equal to or more than predetermined threshold value;
If the number is equal to or more than predetermined threshold value, it is determined that the sliding touch operation meets preparatory condition.
6. terminal control method as claimed in claim 4, it is characterised in that described to allow the application program to obtain terminal Current location information includes:
Judge whether the application program is in navigation pattern;
If the application program is in the navigation pattern, the application program is allowed to continuously acquire the current location of terminal;
If the application program is not in the navigation pattern, the application program is allowed to obtain once the current of the terminal Positional information.
7. a kind of terminal control mechanism, it is characterised in that it is total that the terminal control mechanism includes processor, memory and communication Line;
The communication bus is used to realize the connection communication between the processor and memory;
The processor is used to perform the terminal control program stored in the memory, to realize following steps:
When receiving the position updating request of application program, the current running parameter of terminal is obtained;
Judge whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter;
If the working condition is gripping and unlocking screen state, the present bit of terminal is obtained according to the position updating request Confidence ceases;
If the working condition is not gripping and unlocking screen state, intercepts the location updating that the application program is sent and ask Ask.
8. terminal control mechanism according to claim 7, it is characterised in that the running parameter includes:The end side The number for the sensor being triggered and the display brightness of screen on side;
The processor judges whether the current working condition of terminal is gripping and unlocking screen state according to the running parameter Including:
Whether the number for the sensor being triggered described in judgement meets number as defined in the grip state;
If the number of the sensor being triggered meet the grip state as defined in number, judge the screen of the terminal Display brightness;
If the display brightness is equal to or more than predetermined luminance value, judge that the terminal is in gripping and unlocking screen state.
9. the terminal control mechanism according to claim 7 or 8, it is characterised in that memory described in the computing device The terminal control program of middle storage, it is additionally operable to realize following steps:
Detect on the screen of the terminal with the presence or absence of the sliding touch operation for meeting preparatory condition;
If being operated in the presence of the sliding touch for meeting preparatory condition, the application program is allowed to obtain the present bit confidence of terminal Breath.
A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be by one or more computing devices, to realize such as claim 1 to 6 Any one of terminal sky control method the step of.
CN201710724968.2A 2017-08-22 2017-08-22 A kind of terminal control method and device, computer-readable recording medium CN107704754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710724968.2A CN107704754A (en) 2017-08-22 2017-08-22 A kind of terminal control method and device, computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710724968.2A CN107704754A (en) 2017-08-22 2017-08-22 A kind of terminal control method and device, computer-readable recording medium

Publications (1)

Publication Number Publication Date
CN107704754A true CN107704754A (en) 2018-02-16

Family

ID=61170233

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710724968.2A CN107704754A (en) 2017-08-22 2017-08-22 A kind of terminal control method and device, computer-readable recording medium

Country Status (1)

Country Link
CN (1) CN107704754A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2667221A2 (en) * 2012-05-24 2013-11-27 LG Electronics, Inc. Mobile terminal and GPS engine control method thereof
CN105208215A (en) * 2015-10-22 2015-12-30 小米科技有限责任公司 Locating control method, device and terminal
CN105357641A (en) * 2015-11-18 2016-02-24 广东欧珀移动通信有限公司 Position updating control method and user terminal
CN106203008A (en) * 2016-06-28 2016-12-07 宇龙计算机通信科技(深圳)有限公司 Terminal control method, terminal control mechanism and terminal
CN106657472A (en) * 2016-12-26 2017-05-10 珠海市魅族科技有限公司 handheld terminal and control method thereof
CN106775380A (en) * 2016-11-24 2017-05-31 宇龙计算机通信科技(深圳)有限公司 Prevent error correction method, device and the mobile terminal of maloperation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2667221A2 (en) * 2012-05-24 2013-11-27 LG Electronics, Inc. Mobile terminal and GPS engine control method thereof
CN105208215A (en) * 2015-10-22 2015-12-30 小米科技有限责任公司 Locating control method, device and terminal
CN105357641A (en) * 2015-11-18 2016-02-24 广东欧珀移动通信有限公司 Position updating control method and user terminal
CN106203008A (en) * 2016-06-28 2016-12-07 宇龙计算机通信科技(深圳)有限公司 Terminal control method, terminal control mechanism and terminal
CN106775380A (en) * 2016-11-24 2017-05-31 宇龙计算机通信科技(深圳)有限公司 Prevent error correction method, device and the mobile terminal of maloperation
CN106657472A (en) * 2016-12-26 2017-05-10 珠海市魅族科技有限公司 handheld terminal and control method thereof

Similar Documents

Publication Publication Date Title
CN103455256B (en) The method and terminal of Rotation screen display picture
CN103472993A (en) Rotation displaying method, device and terminal equipment
CN106445340A (en) Method and device for displaying stereoscopic image by double-screen terminal
CN107045420A (en) Switching method and mobile terminal, the storage medium of application program
CN107145385A (en) A kind of multitask interface display methods, mobile terminal and computer-readable storage medium
CN107580143B (en) A kind of display methods and mobile terminal
CN108196744B (en) A kind of method of adjustment and mobile terminal of task interface
CN107613050B (en) A kind of method and mobile terminal obtaining mobile terminal state
CN106331826A (en) Method, device and system for setting live broadcast template and video mode
CN107219974A (en) A kind of method, mobile terminal and storage medium for showing application software
CN106814934A (en) icon processing method and terminal device
CN107895561A (en) Method, terminal and the computer-readable recording medium of a kind of intelligent bright screen and the screen that goes out
CN107450796B (en) A kind of image processing method, mobile terminal and computer readable storage medium
WO2018133310A1 (en) Dual-screen terminal device and display method
CN107786732A (en) Terminal applies method for pushing, mobile terminal and computer-readable recording medium
CN107277364A (en) A kind of image pickup method, mobile terminal and computer-readable recording medium
CN107181700A (en) Control method, mobile terminal and the storage medium of application program for mobile terminal
CN107153500A (en) It is a kind of to realize the method and apparatus that image is shown
CN107678594A (en) Calibration method, device, terminal device and the storage medium of touch screen
CN107347117A (en) A kind of message management method, mobile terminal and computer-readable recording medium
CN107608607A (en) With the terminal and Related product for preventing maloperation function
CN107613130A (en) A kind of application management method, mobile terminal and computer-readable recording medium
CN107239567A (en) A kind of recognition methods of object scene, equipment and computer-readable recording medium
CN106843672A (en) A kind of terminal screen locking operation device and method
CN107528967A (en) A kind of quick payment method, terminal and computer-readable recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination