Disclosure of Invention
In view of the above, the present invention mainly aims to provide a method and an apparatus for switching a contextual model of a mobile terminal, which can automatically switch the contextual model of the mobile terminal, thereby improving user experience.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for switching contextual models of a mobile terminal, which comprises the following steps: setting a switching parameter on the mobile terminal; the method further comprises the following steps:
and judging whether the contextual model needs to be switched according to the switching parameters, determining the need, and switching the corresponding contextual model.
In the foregoing solution, the handover parameter includes: the time length of the timer, the time period of the silent mode, the time period of the standard mode and the noise threshold value;
the judging whether the contextual model needs to be switched according to the switching parameters, determining the need, and switching the corresponding contextual model comprises the following steps:
starting a timer, acquiring current time after the timer is overtime, judging whether the current time is in the time period of the current activated contextual model, analyzing the environment of the mobile terminal and/or the motion state of the mobile terminal and/or the sound decibel value of the environment of the mobile terminal after determining that the current time is not in the time period of the current activated contextual model, and switching the corresponding contextual model according to the analysis result.
In the above scheme, the currently activated contextual model is a standard model, the analyzing the environment of the mobile terminal and/or the motion state of the mobile terminal and/or the sound decibel value of the environment of the mobile terminal, and switching the corresponding contextual model according to the analysis result is performed by:
and judging whether the environment where the mobile terminal is located is a dark environment or not, if so, further judging whether the motion state of the mobile terminal is static or not, if so, further judging whether the sound decibel value of the environment where the mobile terminal is located is lower than a preset noise threshold value, if so, switching the standard mode into a mute mode.
In the above scheme, the currently activated contextual model is a silent mode, the analyzing is performed on the environment where the mobile terminal is located, and/or the motion state of the mobile terminal, and/or the sound decibel value of the environment where the mobile terminal is located, and the switching of the corresponding contextual model is performed according to the analysis result, where:
judging whether the environment of the mobile terminal is a bright environment or not, if so, switching the mute mode to a standard mode, if so, further judging whether the motion state of the mobile terminal is motion or not, if so, switching the mute mode to the standard mode, if so, further judging whether the sound decibel value of the environment of the mobile terminal is higher than a preset noise threshold value, and if so, switching the mute mode to the standard mode.
In the above scheme, the method further comprises:
after the environment where the mobile terminal is located is determined to be a bright environment, no operation is performed; or,
after the motion state of the mobile terminal is determined to be motion, no operation is performed; or,
and when the sound decibel value of the environment where the mobile terminal is located is higher than the preset noise threshold value, no operation is performed.
In the above scheme, the method further comprises:
and after the sound decibel value of the environment where the mobile terminal is located is determined to be lower than the preset noise threshold value, no operation is performed.
In the foregoing solution, the handover parameter further includes: an automatic transfer switch.
In the above scheme, the method further comprises:
and after determining that the current time is within the time period of the currently activated contextual model, not performing any operation.
The invention also provides a device for switching the contextual model of the mobile terminal, which comprises: the device comprises a setting unit, a judging unit and a control unit; wherein,
the mobile terminal comprises a setting unit, a switching unit and a switching unit, wherein the setting unit is used for setting switching parameters on the mobile terminal;
the judging unit is used for judging whether the contextual model needs to be switched according to the switching parameters, determining the need and sending the determination result to the control unit;
and the control unit is used for switching the corresponding contextual model after receiving the determination result sent by the judgment unit.
In the foregoing solution, the handover parameter includes: the time length of the timer, the time period of the silent mode, the time period of the standard mode and the noise threshold value;
the judging unit further includes: the device comprises a timer, a judging module and an analyzing module; wherein,
the timer is used for triggering the judgment module after the timeout;
the judging module is used for acquiring the current time after receiving the triggering information of the timer, judging whether the current time is in the time period of the currently activated contextual model, and triggering the analyzing module after determining that the current time is not in the time period of the currently activated contextual model;
the analysis module is used for analyzing the environment of the mobile terminal and/or the motion state of the mobile terminal and/or the sound decibel value of the environment of the mobile terminal after receiving the trigger information of the judgment module, and sending the analysis result to the control unit;
the control unit is specifically configured to: and after receiving the analysis result of the analysis module, switching the corresponding contextual model according to the analysis result.
In the foregoing solution, the analysis module further includes: the device comprises a light sensing module, an acceleration sensing module and a noise sensing module; wherein,
if the currently activated contextual model is the standard mode, the light sensing module is used for judging whether the environment where the mobile terminal is located is a dark environment or not after receiving the triggering information of the judging module, and triggering the acceleration sensing module after determining that the environment where the mobile terminal is located is the dark environment;
the acceleration sensing module is used for judging whether the motion state of the mobile terminal is static or not after receiving the triggering information of the light sensing module, and triggering the noise sensing module after determining that the motion state of the mobile terminal is static;
the noise sensing module is used for judging whether the sound decibel value of the environment where the mobile terminal is located is lower than a preset noise threshold value or not after receiving the triggering information of the acceleration sensing module, and sending a determination result to the control unit after determining that the sound decibel value of the environment where the mobile terminal is located is lower than the preset noise threshold value;
the control unit is specifically configured to: and after receiving the determination result sent by the noise induction module, switching the standard mode into a mute mode.
In the above scheme, if the currently activated contextual model is the silent mode, the light sensing module is configured to determine whether the environment where the mobile terminal is located is a bright environment after receiving the trigger information of the determining module, send a determination result to the control unit if it is determined that the environment where the mobile terminal is located is a bright environment, and trigger the acceleration sensing module if it is determined that the environment where the mobile terminal is located is a dark environment;
the acceleration sensing module is used for judging whether the motion state of the mobile terminal is motion or not after receiving the triggering information of the light sensing module, sending a determination result to the control unit if the motion state of the mobile terminal is determined to be motion, and triggering the noise sensing module if the motion state of the mobile terminal is determined to be static;
the noise sensing module is used for judging whether the sound decibel value of the environment where the mobile terminal is located is higher than a preset noise threshold value or not after receiving the triggering information of the acceleration sensing module, and sending a determination result to the control unit after determining that the sound decibel value of the environment where the mobile terminal is located is higher than the preset noise threshold value;
the control unit is specifically configured to: and after receiving the determination result of the light sensing module, the acceleration sensing module or the noise sensing module, switching the mute mode into a standard mode.
In the above solution, the switching parameter further includes an automatic switch;
the device further comprises an automatic change-over switch for triggering the timer to start after the automatic change-over switch is turned on.
According to the scheme for switching the contextual model of the mobile terminal, the switching parameters are set on the mobile terminal, whether the contextual model needs to be switched or not is judged according to the switching parameters, the need is determined, and the corresponding contextual model is switched, namely: after the timer is overtime, the current time is acquired, whether the current time is in the time period of the current activated contextual model or not is judged, after the current time is determined not to be in the time period of the current activated contextual model, the environment of the mobile terminal, and/or the motion state of the mobile terminal, and/or the sound decibel value of the environment of the mobile terminal are analyzed, and the corresponding contextual model is switched according to the analysis result, so that the switching of the contextual model of the mobile terminal can be automatically realized, and the user experience is further improved.
In addition, if the currently activated contextual model is the standard mode, whether the environment where the mobile terminal is located is a dark environment is judged, if yes, whether the motion state of the mobile terminal is static is further judged, if yes, whether the sound decibel value of the environment where the mobile terminal is located is lower than a preset noise threshold value is further judged, and if yes, the standard mode is switched to the mute mode; if the currently activated contextual model is the silent mode, whether the environment where the mobile terminal is located is a bright environment or not is judged, if yes, the silent mode is switched to the standard mode, if not, whether the motion state of the mobile terminal is motion is further judged, if yes, the silent mode is switched to the standard mode, if not, whether the sound decibel value of the environment where the mobile terminal is located is higher than a preset noise threshold value is further judged, if yes, the silent mode is switched to the standard mode, and therefore switching can be conducted according to the actual environment where the mobile terminal is located and the actual use condition of the mobile terminal, and user experience is further improved.
Besides, an automatic change-over switch can be arranged simultaneously, so that the mobile terminal can automatically switch the contextual model after the automatic change-over switch is turned on according to user requirements, and user experience is further improved.
Detailed Description
The basic idea of the invention is: setting switching parameters on the mobile terminal, judging whether the contextual model needs to be switched according to the switching parameters, determining the need, and switching the corresponding contextual model.
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
The method for switching the contextual model of the mobile terminal, as shown in fig. 1, comprises the following steps:
step 101: setting switching parameters on the mobile terminal, and then executing step 102;
here, the mobile terminal may be a mobile phone or the like;
the switching parameters at least comprise the duration of a timer, a silent mode time period, a standard mode time period and a noise threshold.
The duration of the timer is set according to the user requirements, such as: may be set for 1 minute, 10 minutes, 30 minutes, etc.;
setting a mute mode time period and a standard mode time period according to user requirements, such as: the silent mode period may be set to: 22: 01-the next day 07:00, setting the standard mode time period as follows: 07: 01-22: 00;
setting a noise threshold according to user requirements, such as: the residential standards of China stipulate that outdoor decibels do not exceed 40 decibels at night, so a user can set the noise threshold to be 40 decibels;
in order to further facilitate the use of the user, when the duration of the timer, the silent mode time period, the standard mode time period, and the noise threshold are set, an automatic change-over switch may be further set simultaneously, that is: the switching parameters may further include an automatic switch, when the user turns on the automatic switch, the automatic switching of the contextual model may be implemented on the mobile terminal used by the user, and if the user does not want to use the contextual model automatic switching function of the mobile terminal, the automatic switch may be turned off, and the mobile terminal may not automatically switch the contextual model.
Step 102: and judging whether the contextual model needs to be switched according to the switching parameters, determining the need, and switching the corresponding contextual model.
Specifically, a timer is started, the current time is acquired after the timer is overtime, whether the current time is in the time period of the currently activated contextual model or not is judged, the environment of the mobile terminal, and/or the motion state of the mobile terminal, and/or the sound decibel value of the environment of the mobile terminal are analyzed after the current time is determined not to be in the time period of the currently activated contextual model, and the corresponding contextual model is switched according to the analysis result;
here, in the actual use process, in order to realize that the judgment and the switching of the contextual model can be performed in real time, the timer may be set to be started again after time out;
generally, a mobile terminal is provided with a clock, so that the current time can be acquired through the clock in the actual use process;
the currently activated contextual model refers to the contextual model currently used by the user;
if the currently activated contextual model is the standard model, analyzing the environment of the mobile terminal, and/or the motion state of the mobile terminal, and/or the sound decibel value of the environment of the mobile terminal, and switching the corresponding contextual model according to the analysis result, specifically:
judging whether the environment of the mobile terminal is a dark environment or not, if so, further judging whether the motion state of the mobile terminal is static or not, if so, further judging whether the sound decibel value of the environment of the mobile terminal is lower than a preset noise threshold value or not, and if so, switching the standard mode into a mute mode;
in the actual use process, the mobile terminal is provided with a light sensor, an acceleration sensor and a noise sensor, the environment where the mobile terminal is located can be known to be a dark environment or a bright environment through the sensing result of the light sensor, the current motion state of the mobile terminal can be known to be static or moving through the sensing result of the acceleration sensor, and the sound decibel value of the environment where the mobile terminal is located can be obtained through the noise sensor;
when the environment where the mobile terminal is located is determined to be a bright environment, no operation is performed; when the motion state of the mobile terminal is determined to be motion, no operation is performed; when the sound decibel value of the environment where the mobile terminal is located is higher than a preset noise threshold value, no operation is performed;
if the currently activated contextual model is the silent mode, analyzing the environment of the mobile terminal, and/or the motion state of the mobile terminal, and/or the sound decibel value of the environment of the mobile terminal, and switching the corresponding contextual model according to the analysis result, specifically:
judging whether the environment of the mobile terminal is a bright environment or not, if so, switching the mute mode to a standard mode, if not, further judging whether the motion state of the mobile terminal is motion or not, if so, switching the mute mode to the standard mode, if not, further judging whether the sound decibel value of the environment of the mobile terminal is higher than a preset noise threshold value or not, and if so, switching the mute mode to the standard mode;
when the sound decibel value of the environment where the mobile terminal is located is lower than a preset noise threshold value, no operation is performed;
and after determining that the current time is within the time period of the currently activated contextual model, not performing any operation.
The present invention will be described in further detail with reference to examples.
In this embodiment, it is set that the current time is acquired once every one minute, that is: setting the time length of the timer to be 1 minute, starting the timer again after the timer is overtime, and circulating the steps; setting a mute mode time period to be 22: 01-the next day of 07:00, setting a standard mode time period to be 07: 01-22: 00, setting a noise threshold to be 40 decibels, and setting a currently activated contextual model to be a standard mode.
After the timer is overtime, assuming that the acquired current time is 22:00, and the 22:00 is in the standard mode time period, no operation is performed;
after the timer is overtime again, the obtained current time is 22:01, and 22:01 is not in the time period of the standard mode, so that whether the environment where the mobile terminal is located is a dark environment or not is judged, if yes, whether the motion state of the mobile terminal is static or not is further judged, if yes, whether the sound decibel value of the environment where the mobile terminal is located is lower than a preset noise threshold value or not is further judged, and if yes, the standard mode is switched to the mute mode;
when the environment where the mobile terminal is located is determined to be a bright environment, no operation is performed; when the motion state of the mobile terminal is determined to be motion, no operation is performed; when the sound decibel value of the environment where the mobile terminal is located is higher than a preset noise threshold value, no operation is performed;
if the scene mode is successfully switched to the mute mode in the time of 22:01, the current time is 22:02 after the timer is overtime again, and no operation is performed because 22:02 is in the mute mode time period;
when the current time is 07:01 in the morning, 07:01 is not in a mute mode time period, so that whether the environment where the mobile terminal is located is a bright environment or not is judged, if yes, the mute mode is switched to a standard mode, if not, whether the motion state of the mobile terminal is motion or not is further judged, if yes, the mute mode is switched to the standard mode, if not, whether the sound decibel value of the environment where the mobile terminal is located is higher than a preset noise threshold value or not is further judged, and if yes, the mute mode is switched to the standard mode;
and when the sound decibel value of the environment where the mobile terminal is located is lower than the preset noise threshold value, no operation is performed.
In order to implement the above method, the present invention further provides a device for switching a profile of a mobile terminal, as shown in fig. 2, the device includes: a setting unit 21, a judging unit 22, and a control unit 23; wherein,
a setting unit 21 for setting a handover parameter on the mobile terminal;
a judging unit 22, configured to judge whether to perform contextual model switching according to the switching parameter, determine that it is necessary, and send a determination result to the control unit 23;
and the control unit 23 is configured to perform corresponding profile switching after receiving the determination result sent by the determining unit 22.
The switching parameters comprise the duration of a timer, a silent mode time period, a standard mode time period and a noise threshold;
the judging unit 22 may further include: the device comprises a timer, a judging module and an analyzing module; wherein,
the timer is used for triggering the judgment module after the timeout;
the judging module is used for acquiring the current time after receiving the triggering information of the timer, judging whether the current time is in the time period of the currently activated contextual model, and triggering the analyzing module after determining that the current time is not in the time period of the currently activated contextual model;
the analysis module is configured to, after receiving the trigger information of the determination module, analyze an environment in which the mobile terminal is located, and/or a motion state of the mobile terminal, and/or a sound decibel value of the environment in which the mobile terminal is located, and send an analysis result to the control unit 23;
the control unit 23 is specifically configured to: and after receiving the analysis result of the analysis module, switching the corresponding contextual model according to the analysis result.
Wherein the switching parameter may further comprise an automatic switch; the device may further comprise an automatic transfer switch for triggering the timer to start after the automatic transfer switch is turned on.
The analysis module may further include: the device comprises a light sensing module, an acceleration sensing module and a noise sensing module; wherein,
if the currently activated contextual model is the standard mode, the light sensing module is used for judging whether the environment where the mobile terminal is located is a dark environment or not after receiving the triggering information of the judging module, and triggering the acceleration sensing module after determining that the environment where the mobile terminal is located is the dark environment;
the acceleration sensing module is used for judging whether the motion state of the mobile terminal is static or not after receiving the triggering information of the light sensing module, and triggering the noise sensing module after determining that the motion state of the mobile terminal is static;
the noise sensing module is configured to determine whether a sound decibel value of an environment where the mobile terminal is located is lower than a preset noise threshold value after receiving the trigger information of the acceleration sensing module, and send a determination result to the control unit 23 after determining that the sound decibel value of the environment where the mobile terminal is located is lower than the preset noise threshold value;
the control unit 23 is specifically configured to: and after receiving the determination result sent by the noise induction module, switching the standard mode into a mute mode.
If the currently activated contextual model is the silent mode, the light sensing module is configured to determine whether the environment in which the mobile terminal is located is a bright environment after receiving the trigger information of the determining module, send a determination result to the control unit 23 if it is determined that the environment in which the mobile terminal is located is a bright environment, and trigger the acceleration sensing module if it is determined that the environment in which the mobile terminal is located is a dark environment;
the acceleration sensing module is used for judging whether the motion state of the mobile terminal is motion or not after receiving the triggering information of the light sensing module, sending a determination result to the control unit 23 after determining that the motion state of the mobile terminal is motion, and triggering the noise sensing module after determining that the motion state of the mobile terminal is static;
the noise sensing module is configured to determine whether a sound decibel value of an environment where the mobile terminal is located is higher than a preset noise threshold value after receiving the trigger information of the acceleration sensing module, and send a determination result to the control unit 23 after determining that the sound decibel value of the environment where the mobile terminal is located is higher than the preset noise threshold value;
the control unit 23 is specifically configured to: and after receiving the determination result of the light sensing module, the acceleration sensing module or the noise sensing module, switching the mute mode into a standard mode.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.