Summary of the invention
The technical problem to be solved in the present invention is to overcome the defect that in prior art, mobile terminal cannot carry out the automatic switchover of contextual model, and a kind of method and mobile terminal of contextual model automatic switchover of mobile terminal is provided.
The present invention solves above-mentioned technical problem by following technical proposals:
The method that the contextual model of mobile terminal automatically switches, described mobile terminal comprises a front-facing camera and a timer, its feature is, said method comprising the steps of:
S
1, after mobile terminal receives a unlocking operation, automatically open described front-facing camera;
S
2, identify whether the image that described front-facing camera obtains is people's face, and close described front-facing camera when being at recognition result;
S
3, the contextual model of mobile terminal is switched to one second contextual model by one first contextual model;
S
4, judge that whether mobile terminal receives an operation, if so, enters step S
5; If not, enter step S
6;
S
5, judge that whether described operation is screen locking operation, if so, enters step S
9; If not, return to step S
4;
S
6, described timer time of starting the mobile terminal not receive operation carries out timing;
S
7, judge that whether the timing time of described timer reaches one first duration, if so, enters step S
8; If not, will after described timer zero clearing, return to step S
4;
S
8, open described front-facing camera and identify whether the image that described front-facing camera obtains is people's face, if so, will after described timer zero clearing, return to step S
4; If not, enter step S
9;
S
9, the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model.
In this programme, the image obtaining at identification front-facing camera adopts existing face recognition technology to identify it while whether being people's face, by the function in conjunction with mobile terminal front-facing camera and face recognition technology, whether can judge is accurately that user is using mobile terminal, then the switching of execution contextual model that just can be correct according to the result of judgement, while having avoided mobile terminal to be considered to the situation of artificial use when being touched by false touch and the mistake of issuable contextual model is switched.In addition the operation receiving for mobile terminal, comprises operations such as pressing the operation of physical button and the slip on touch-screen, click.Wherein the situation for the screen locking operation receiving can directly make second contextual model of mobile terminal from switching switch back again the first initial contextual model.
When artificial unlocking mobile terminal, (image that now front-facing camera obtains generally all can behave face) can make mobile terminal automatically switch to the second contextual model, and mobile terminal under the second contextual model state does not have the operated time to reach certain time length and be not while artificially gripping mobile terminal, to make second contextual model of mobile terminal from switching switch back again the first initial contextual model.That is to say, the switching of the contextual model of whole process is to be all based upon user using mobile terminal or do not using the switching of carrying out on the basis of mobile terminal, therefore, this programme can not realized the automatic switchover of contextual model by the mode of artificial manual switchover, and can carry out according to user's actual service condition the automatic switchover of contextual model, this automatic switchover no matter user in which type of occasion, as meeting, the occasions such as office, as long as user is using mobile terminal, the contextual model adapting to environment facies that just the contextual model of mobile terminal can be automatically switched to user wishes, can not form mistake switches, improved the accuracy automatically switching.
Preferably, step S
6with step S
7between also comprise:
S
61, judge the mobile terminal screen that whether automatically goes out, if so, enter step S
62; If not, enter step S
7;
S
62, open described front-facing camera and identify whether the image that described front-facing camera obtains is people's face, if so, enter step S
63; If not, enter step S
9;
S
63, judge mobile terminal go out screen time whether reach one second duration, if so, enter step S
9; If not, will after described timer zero clearing, return to step S
4.
For mobile terminal, never receive in the time period of operation, mobile terminal may go out screen automatically to save electric weight, while reaching the second duration for the screen that goes out, can make mobile terminal comparatively switch back fast the first contextual model, and need not, again to not having the time of operation to judge, improve switching efficiency.In addition, this judgement for the screen that whether goes out had both gone for mobile terminal to be arranged to not go out for a long time the pattern of screen to be user-friendly to, also go for mobile phone to be arranged to go out in the short time pattern of screen to save the electric weight of mobile terminal, improved the flexibility that mobile terminal switches contextual model.
Preferably, the span of described the first duration is 30-60s, and the span of described the second duration is 2-5s.
Preferably, described the first contextual model is different from described the second contextual model, and described the first contextual model and described the second contextual model are any one in mode standard, silent mode, conference model, outdoor pattern, interruption-free pattern, off-line mode, offline mode, vehicle-mounted pattern and home mode.
The present invention also provides a kind of mobile terminal, comprise a front-facing camera and a timer, its feature is, described mobile terminal also comprises a camera switch module, a face recognition module, a contextual model handover module, one first judge module, one second judge module and one the 3rd judge module
Described face recognition module is for identifying whether the image that described front-facing camera obtains is people's face;
Described camera switch module is used for after mobile terminal receives a unlocking operation, opening described front-facing camera, and calls described face recognition module; Described face recognition module is called described camera switch module at recognition result when being and is closed described front-facing camera, and calls described contextual model handover module the contextual model of mobile terminal is switched to one second contextual model by one first contextual model;
Described the first judge module is used for judging whether mobile terminal receives an operation, if so, calls described the second judge module; If not, enable the time that described timer do not receive operation to mobile terminal and carry out timing;
Described the second judge module is used for judging whether described operation is screen locking operation, if so, calls described contextual model handover module the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model; If not, call described the first judge module;
Described the 3rd judge module, for judging whether the timing time of described timer reaches one first duration, if so, calls described camera switch module and opens described front-facing camera and call described face recognition module; If not, by the timing time zero clearing of described timer and call described the first judge module; Described face recognition module recognition result be while being by the timing time zero clearing of described timer and call described the first judge module, otherwise call described contextual model handover module, the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model.
Preferably, described mobile terminal also comprises one the 4th judge module and one the 5th judge module,
Described the 4th judge module, for judge the mobile terminal screen that whether automatically goes out after described timer starts timing, if so, calls described camera switch module and opens described front-facing camera and call described face recognition module; If not, call described the 3rd judge module; Described face recognition module is called described the 5th judge module when being at recognition result, otherwise, call described contextual model handover module the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model;
Described the 5th judge module for judge mobile terminal go out screen time whether reach one second duration, if so, call described contextual model handover module the contextual model of mobile terminal switched to described the first contextual model by described the second contextual model; If not, by the timing time zero clearing of described timer and call described the first judge module.
Preferably, the span of described the first duration is 30-60s, and the span of described the second duration is 2-5s.
Preferably, described the first contextual model is different from described the second contextual model, and described the first contextual model and described the second contextual model are any one in mode standard, silent mode, conference model, outdoor pattern, interruption-free pattern, off-line mode, offline mode, vehicle-mounted pattern and home mode.
Positive progressive effect of the present invention is: by the function in conjunction with mobile terminal front-facing camera and face recognition technology, can be to being whether that user is using mobile terminal to confirm, while being considered to artificial situation about using while having avoided mobile terminal to be touched by false touch and the mistake of issuable contextual model is switched, improved the accuracy automatically switching.
Embodiment
Mode below by embodiment further illustrates the present invention, but does not therefore limit the present invention among described scope of embodiments.
Embodiment 1
A kind of method that the present embodiment provides contextual model of mobile terminal to automatically switch, described mobile terminal comprises a front-facing camera 1 and a timer 2, as shown in Figure 1-2, said method comprising the steps of:
Step 101, after receiving a unlocking operation, automatically opens mobile terminal described front-facing camera;
Step 102, identify whether the image that described front-facing camera obtains is people's face, and close described front-facing camera when being at recognition result; Front-facing camera now and face recognition technology are in order to be confirmed to be manual operation;
Step 103, the contextual model of mobile terminal is switched to one second contextual model by one first contextual model; Wherein, described the first contextual model is mode standard, and described the second contextual model is silent mode;
Step 104, judge that whether mobile terminal receives an operation, if so, enters step 105; If not, enter step 106;
Step 105, judge that whether described operation is screen locking operation, if so, enters step 109; If not, return to step 104; Because screen locking operation is the operation that can cause the contextual model of mobile terminal to change, therefore can classify a special operation as and again judge;
Step 106, described timer start the mobile terminal not receive the time of operation and carry out timing;
Step 107, judge that whether the timing time of described timer reaches one first duration, if so, enters step 108; If not, will after described timer zero clearing, return to step 104; Wherein, the first duration value is 30s;
Step 108, open described front-facing camera and identify whether the image that described front-facing camera obtains is people's face, if so, will after described timer zero clearing, return to step 104; If not, enter step 109;
Step 109, the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model.
The present embodiment also provides a kind of mobile terminal, as shown in Figure 2, described mobile terminal also comprises a camera switch module 3, a face recognition module 4, a contextual model handover module 5, one first judge module 6, one second judge module 7 and one the 3rd judge module 8
Whether face recognition module 4 is people's face for the image of identifying front-facing camera 1 and obtaining;
Camera switch module 3 is opened front-facing camera 1 for receive a unlocking operation at mobile terminal after, and calls face recognition module 4; Face recognition module 4 is called camera switch module 3 at recognition result when being and is closed front-facing camera 1, and calls contextual model handover module 5 contextual model of mobile terminal is switched to one second contextual model by one first contextual model; Wherein, described the first contextual model is mode standard, and described the second contextual model is silent mode;
The first judge module 6, for judging whether mobile terminal receives an operation, if so, calls the second judge module 7; If not, enable the time that 2 pairs of mobile terminals of timer do not receive operation and carry out timing;
The second judge module 7 is for judging that whether described operation is screen locking operation, if so, calls contextual model handover module 5 contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model; If not, call described the first judge module;
The 3rd judge module 8, for judging whether the timing time of described timer reaches one first duration, if so, calls camera switch module 3 and opens front-facing camera 1 and call face recognition module 4; If not, by the timing time zero clearing of timer 2 and call the first judge module 6; Face recognition module 4 recognition result be while being by the timing time zero clearing of timer 2 and call the first judge module 6, otherwise call contextual model handover module 5, the contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model; Wherein, the first duration value is 30s;
The effect having in order to describe the present embodiment, with the switching of a specific situation pattern as an example, suppose that mobile terminal is herein our usual used smart mobile phone, smart mobile phone contextual model is originally mode standard, contextual model after setting will be switched is silent mode, the occasion of user in the meeting that debriefs, mobile phone also relative set becomes the situation of not going out for a long time and shielding, to facilitate user's ongoing operation mobile phone, therefore, most of users can steal the mobile phone of playing oneself under this occasion.User draws out manual unlocking mobile phone after mobile phone in this case, after release completes, camera switch module can be opened front-facing camera, now user is using mobile phone, front-facing camera obtains the image in the scene of finding a view, whether face recognition module adopts face recognition technology to identify this image is people's face, image is now people's face really, now camera switch module can be closed front-facing camera, and contextual model handover module also can switch to silent mode by mode standard by the contextual model of mobile phone.
Then, whether the mobile phone of the first judge module judgement under silent mode receives an operation, as slide, yet, user is temporary transient after release also not to be operated and is still gripping mobile phone mobile phone, now, timer just starts the mobile phone not receive the time of operation and carries out timing, to confirm user's operating handset not really, when timing to 10 second, user has clicked touch-screen and has browsed the news in mobile phone, the time data that now mobile phone is not received to operation before timer can be cleared, therefore mobile phone can keep silent mode in user browses time of news always.
Yet whether the first judge module is still receiving an operation continuation judgement to mobile phone, user has put into mobile phone in the handbag of carrying after browsing page, intend to listen report a little while, now, mobile phone without putting through receives that the time of operation obviously can be greater than the 30s that the first duration arranges, therefore, before switching contextual model, also need further to confirm whether user is also likely using mobile phone, so camera switch module can be opened front-facing camera, because mobile phone has been put into handbag, obviously, the image that face recognition module identification front-facing camera obtains is not people's face, therefore, confirm that mobile phone has not been operated really, contextual model handover module just can switch to mode standard by silent mode by the contextual model of mobile phone.
Visible, the present embodiment can not realized the automatic switchover of contextual model by the mode of artificial manual switchover, can to the actual service condition of mobile phone, carry out according to user the automatic switchover of contextual model, by the function in conjunction with mobile terminal front-facing camera and face recognition technology, can be to being whether that user is using mobile terminal to confirm, while being considered to artificial situation about using while having avoided mobile terminal to be touched by false touch and the mistake of issuable contextual model is switched, improved the accuracy automatically switching.
Embodiment 2
A kind of method that the present embodiment provides contextual model of mobile terminal to automatically switch, described mobile terminal comprises a front-facing camera 1 and a timer 2, as shown in Figure 3-4, the difference of the method for the method of the present embodiment and embodiment 1 is: between the step 106 of embodiment 1 and step 107, also comprise:
Step 1061, judge the mobile terminal screen that whether automatically goes out, if so, enter step 1062; If not, enter step 107;
Step 1062, open described front-facing camera and identify whether the image that described front-facing camera obtains is people's face, if so, enter step 1063; If not, enter step 109; While opening front-facing camera, can not make mobile terminal become bright screen state from the screen state that goes out, this step be in the situation that the image of go out screen and identification for people's face, can directly switch to the second contextual model, and removed the judgement to the time of the screen that goes out from, improved the execution efficiency automatically switching;
Step 1063, judge mobile terminal go out screen time whether reach one second duration, if so, enter step 109; If not, will after described timer zero clearing, return to step 104, wherein, the second duration value is 3s; Screen time of going out illustrates that now mobile terminal has been subject to triggering and the current screen state that goes out being changed while not reaching, and as for this change, by which kind of triggering, is caused, only needs to judge whether this triggering judges again because received external operation; To the further judgement of the time of the screen that goes out, be while making at short notice mobile terminal bright screen again for fear of user, the words of the screen duration that goes out if do not judge can cause mobile terminal to produce the switching of contextual model frequently;
The present embodiment also provides a kind of mobile terminal, and as shown in Figure 4, the difference of the mobile terminal of the mobile terminal of the present embodiment and embodiment 1 is: the mobile terminal of the present embodiment also comprises one the 4th judge module 9 and one the 5th judge module 10,
The 4th judge module 9, for judging the mobile terminal screen that whether automatically goes out after starting timing at timer 2, if so, calls camera switch module 3 and opens front-facing camera 1 and call face recognition module 4; If not, call the 3rd judge module 8; Face recognition module 4 is called the 5th judge module 10 when being at recognition result, otherwise, call contextual model handover module 5 contextual model of mobile terminal is switched to described the first contextual model by described the second contextual model;
The 5th judge module 10 for judge mobile terminal go out screen time whether reach one second duration, if so, call contextual model handover module 5 contextual model of mobile terminal switched to described the first contextual model by described the second contextual model; If not, by the timing time zero clearing of timer 2 and call the first judge module 6, wherein, the second duration value is 3s.
The effect having in order to describe the present embodiment, with the switching of a specific situation pattern as an example, the present embodiment is identical with the execution sight that in embodiment 1, the contextual model of mobile phone is switched to silent mode by mode standard, but now user is arranged to will automatically to go out the situation of screen after the time of 15s to save electric weight by mobile phone.
Then, whether the mobile phone of the first judge module judgement under silent mode receives an operation, as slide, yet mobile phone automatically goes out and has shielded after through 15 seconds, user is gripping mobile phone always, now, the 4th judge module is learnt that mobile phone goes out and has been shielded, camera switch module can be opened front-facing camera again, face recognition module continues the image that identification front-facing camera obtains, image is now still people's face, people is described or using mobile phone, just mobile phone is not operated; Therefore, whether need to reaffirm that user is with regard to inoperation mobile phone, so the 5th judge module can judge go out time of screen of mobile phone and whether reach the 3s that the second duration arranges, yet, user is gripping mobile phone but operating handset not always, the 5th judge module judgement mobile phone has not been used really, and therefore, contextual model handover module switches to mode standard by the contextual model of mobile terminal by silent mode.
Therefore, the present embodiment can also improve the execution efficiency of automatic switchover of the contextual model of mobile phone in the effect that reaches embodiment 1.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art is not deviating under the prerequisite of principle of the present invention and essence, can make various changes or modifications to these execution modes, but these changes and modification all fall into protection scope of the present invention.