Summary of the invention
The main technical problem to be solved in the present invention is, provides a kind of alarm method and device, can work as user and use under faulty posture during mobile terminal and carry out alarm.
For solving the problems of the technologies described above, the invention provides a kind of alarm method, comprising the steps:
The positional information that characterizing consumer uses mobile terminal under faulty posture is set;
In the process that described mobile terminal uses, detect the kinematic parameter of described mobile terminal, obtain the current positional information of described mobile terminal according to described kinematic parameter;
Judge whether the current positional information of described mobile terminal matches with the positional information arranged, and if so, then thinks that user uses mobile terminal under faulty posture, and carries out the first alarm.
Further, described positional information comprises: the screen of mobile terminal is towards the inclination angle with described mobile terminal, and described inclination angle is the angle of described mobile terminal and surface level.
Further, the described step judging that whether the current positional information of described mobile terminal matches with the positional information arranged comprises:
Judge whether the screen of current described mobile terminal is towards being upward, if not, then judge that the positional information of the positional information that described mobile terminal is current and setting matches, if, then judge that the inclination angle of current described mobile terminal is whether within the scope of the inclination angle arranged, if so, then judge that the positional information of the positional information that described mobile terminal is current and setting matches.
Further, the step of the kinematic parameter of the described mobile terminal of described detection comprises:
The acceleration of described mobile terminal on X, Y, Z axis three directions is obtained by three axle acceleration sensors;
According to the acceleration in Z-direction obtain described mobile terminal screen towards;
The described step obtaining the current positional information of described mobile terminal according to described kinematic parameter comprises:
The inclination angle of described mobile terminal is calculated according to the accelerometer in X, Y direction.
Further, described method also comprises:
In the process that mobile terminal uses, detect the distance between eyes of user and the screen of described mobile terminal, judge this distance whether in preset range, if so, then carry out the second alarm.
Further, the step of the distance between described detection eyes of user and the screen of described mobile terminal comprises:
By the image of camera collection user, utilize the distance between the method for image procossing detection eyes of user and the screen of described mobile terminal.
Further, judging that the current positional information of described mobile terminal also comprises before whether matching with the positional information arranged: timing course;
Described step of carrying out the first alarm and described second alarm comprises: judge whether the time value of now timing is greater than preset time threshold, if be greater than, then carry out alarm.
Further, described timing course specifically comprises:
Timer resets, start timing;
Whether changed by the posture of the current use mobile terminal of sensor senses user;
If so, then reset timer and restart timing, if not, then continue timing.
Also for ease of and solve above-mentioned technical matters, present invention also offers a kind of alarm device, comprising: module, first detection module, the first judge module and the first alarm module are set;
Described module uses mobile terminal under faulty posture positional information for arranging characterizing consumer is set;
Described first detection module is used for, in the process used at described mobile terminal, detecting the kinematic parameter of described mobile terminal, obtaining the current positional information of described mobile terminal according to described kinematic parameter;
Described first judge module is for judging whether the current positional information of described mobile terminal matches with the positional information arranged, and if so, then thinks that user uses mobile terminal under faulty posture, and notifies that described first alarm module carries out the first alarm.
Further, described positional information comprises: the screen of mobile terminal is towards the inclination angle with described mobile terminal, and described inclination angle is the angle of described mobile terminal and surface level.
Further, described first judge module is for judging whether the screen of current described mobile terminal is towards being upward, if not, then judge that the positional information of the positional information that described mobile terminal is current and setting matches, if, then judge that the inclination angle of current described mobile terminal is whether within the scope of the inclination angle arranged, and if so, then judges that the positional information of the positional information that described mobile terminal is current and setting matches.
Further, described first detection module comprises three axle acceleration sensor and computing modules;
Described three axle acceleration sensors are for obtaining the acceleration of described mobile terminal on X, Y, Z axis three directions;
Described computing module for obtain according to the acceleration in Z-direction described mobile terminal screen towards, and calculate the inclination angle of described mobile terminal according to the accelerometer in X, Y direction.
Further, described alarm device also comprises: the second detection module, the second judge module and the second alarm module;
Described second detection module is used for, in the process used at mobile terminal, detecting the distance between eyes of user and the screen of described mobile terminal;
Described second judge module for the distance that judges described second detection module and detect whether in preset range;
Described second alarm module is used for carrying out the second alarm when described second judge module is judged as YES.
Further, described second detection module comprises camera and image processing module;
Described camera is for gathering the image of user;
Described image processing module is for processing the distance between the screen drawing eyes of user and described mobile terminal to the image of the user gathered.
Further, described alarm device also comprises timing module;
Described timing module is used for judging that the current positional information of described mobile terminal starts timing before whether matching with the positional information of setting;
Described first alarm module is used for when described first judge module is judged as YES, and judges whether described timing module time value is now greater than preset time threshold, if be greater than, then and alarm;
Described second alarm module is used for when described second judge module is judged as YES, and judges whether described timing module time value is now greater than preset time threshold, if be greater than, then and alarm.
Further, described timing module comprises: timer, sensor and timing control module;
Described timer is used for resetting, starting timing;
Whether described timing control module is used for being changed by the posture of the current use mobile terminal of sensor senses user, if so, notifies that described timer resets and restarts timing, if not, then notifies that described timer continues timing.
The invention has the beneficial effects as follows:
The invention provides a kind of alarm method and device can work as user and use under faulty posture during mobile terminal and carry out alarm.Alarm method of the present invention comprises: arrange the positional information that characterizing consumer uses mobile terminal under faulty posture, in the process that described mobile terminal uses, detect the kinematic parameter of described mobile terminal, obtain the current positional information of described mobile terminal according to described kinematic parameter, judge whether the current positional information of described mobile terminal matches with the positional information arranged, and if so, then thinks that user uses mobile terminal under faulty posture, and carries out the first alarm, alarm method of the present invention indirectly obtains user by the positional information that the kinematic parameter acquisition mobile terminal of mobile terminal is current and uses mobile terminal posture, then by judging whether the use the posture whether current positional information of mobile terminal uses the positional information of mobile terminal to match with the characterizing consumer arranged indirectly to judge user current under faulty posture is the faulty posture arranged, if so, then alarm, such as when the screen that positional information comprises mobile terminal towards time, alarm method of the present invention is set and can detects the current acceleration of mobile terminal, by acceleration judge current mobile terminal towards, if down, when arranging characterizing consumer and using screen that the positional information of described mobile terminal is mobile terminal down under faulty posture, then think that user uses mobile terminal under faulty posture, now user very large may on be in the posture of lying down to use mobile terminal, so when thinking that user uses described mobile terminal under faulty posture, mobile terminal will alarm reminding user be current is in faulty posture, alarm method of the present invention can the health of lifting mobile terminal user.
Embodiment
By reference to the accompanying drawings the present invention is described in further detail below by embodiment.
Embodiment one:
As shown in Figure 1, present embodiments provide a kind of alarm method, comprise the following steps:
Step 101: the positional information that characterizing consumer uses mobile terminal under faulty posture is set;
Step 102: in the process that described mobile terminal uses, detect the kinematic parameter of described mobile terminal, obtains the current positional information of described mobile terminal according to described kinematic parameter;
Step 103: judge whether the current positional information of described mobile terminal matches with the positional information arranged, and if so, then performs step 104, if not, then performs step 105;
Step 104: think that user uses described mobile terminal under faulty posture, and carry out the first alarm;
Step 105: think that user uses described mobile terminal under normal posture, do not carry out alarm.
The alarm method of the present embodiment obtains the current positional information of mobile terminal by the kinematic parameter of mobile terminal, then by judging whether the current positional information of mobile terminal uses the positional information of mobile terminal to match with the characterizing consumer arranged and judge user uses mobile terminal under whether being in faulty posture under faulty posture, if so, then alarm, such as when the screen that positional information comprises mobile terminal towards time, alarm method of the present invention is set and can detects the current acceleration of mobile terminal, by acceleration judge current mobile terminal towards, if down, when arranging characterizing consumer and using screen that the positional information of described mobile terminal is mobile terminal down under faulty posture, then think that user uses mobile terminal under faulty posture, now user very large may on be in the posture of lying down to use mobile terminal, so when thinking that user uses described mobile terminal under faulty posture, mobile terminal will alarm reminding user be current is in faulty posture, alarm method of the present invention can the health of lifting mobile terminal user.The alarm method of the present embodiment obtains the posture of the current use mobile terminal of user indirectly by the positional information detecting mobile terminal, and indirectly judge that active user uses whether the posture of mobile terminal is faulty posture by judging whether current location information and the positional information of setting mate, whether user is in not posture also alarm in time to utilize the alarm method of the present embodiment to determine fast.
Arrange characterizing consumer in the present embodiment uses the positional information of mobile terminal can be under faulty posture: positional information when user uses mobile terminal under faulty posture residing for mobile terminal.The faulty posture of the present embodiment to be by several relatively larger to body harm faulty posture, such as, can to use mobile terminal by lying down, uprightly bowing to use mobile terminal or face up head and use the faulty posture such as mobile terminal.In the present embodiment, positional information is corresponding with user's faulty posture; So characterizing consumer use under faulty posture the positional information of mobile terminal can for characterizing consumer uprightly bow use mobile terminal time mobile terminal positional information, this positional information can comprise: the screen of mobile terminal is towards the inclination angle with described mobile terminal, described inclination angle is the angle of described mobile terminal and surface level, user uprightly bow use mobile terminal be screen upward, inclination angle is within the scope of certain.In the present embodiment, user can according to the faulty posture self using mobile terminal to be accustomed to carrying out arranging self, and in the present embodiment positional information be not limited only to towards and inclination angle, the positional information that other characterize posture can also be comprised, the translational speed of such as mobile terminal.The positional information that in the present embodiment, different faulty posture is corresponding is different.
The kinematic parameter of the present embodiment can comprise: acceleration, speed, angular velocity, displacement of the lines, angular acceleration or other parameters relevant to object of which movement.
Introduce a kind of process whether current positional information of described mobile terminal matches with the positional information arranged that judges below:
Arrange characterizing consumer use under faulty posture the screen of mobile terminal towards and inclination angle;
Obtain the current screen of described mobile terminal according to described kinematic parameter towards the current inclination with described mobile terminal, described inclination angle is the angle of described mobile terminal and surface level;
Judge whether the current screen of mobile terminal matches towards with inclination angle with the screen arranged towards with inclination angle, if coupling, then thinks that user uses described mobile terminal under faulty posture, and carries out the first alarm.
In this situation, the alarm method of the present embodiment mainly through judge mobile terminal screen towards with inclination angle to judge whether user is in faulty posture, such as when mobile terminal screen down time (user is that the posture of lying down is to use mobile terminal), now judge that user is in default faulty posture, then send alarm reminding user, again such as when mobile terminal screen upward, but inclination angle is less than given threshold value (such as 45 degree), illustrate that user is using mobile phone (may produce damage to user's cervical vertebra for a long time under this posture) with upper body erect posture, now will judge that the current posture of user is default faulty posture, then alarm is sent, reminding user.Therefore, judge described in the present embodiment alarm method step 103 that the process whether current positional information of described mobile terminal matches with the positional information arranged comprises:
Judge whether the screen of current described mobile terminal is towards being upward, if not, then judge that the positional information of the positional information that described mobile terminal is current and setting matches, if, then judge that the inclination angle of current described mobile terminal is whether within the scope of the inclination angle arranged, if so, then judge that the positional information of the positional information that described mobile terminal is current and setting matches.
That is, when described mobile terminal screen upward and the inclination angle of described mobile terminal in preset range, think that the posture of the described mobile terminal of the current use of user is faulty posture; When described mobile terminal screen down time, judge that the posture of the described mobile terminal of the current use of user is as faulty posture.
The alarm method of certain the present embodiment is only for judging the faulty posture of user other characteristics of mobile terminal can also be utilized to judge the faulty posture of user towards with inclination angle with utilizing.
As shown in Figure 2, lower mask body introduces the alarm method of the present embodiment, comprising:
Step 201: the positional information that characterizing consumer uses mobile terminal under faulty posture is set;
The positional information now arranged comprises: when user uses mobile terminal under faulty posture, the inclination angle scope of mobile terminal and screen towards.
Step 202: in the process that mobile terminal uses, detect the kinematic parameter of described mobile terminal, the screen obtaining current mobile terminal according to described kinematic parameter towards and inclination angle;
Step 203: whether upward to judge the screen of mobile terminal, if so, then performs step 204, if not, then performs step 205;
Step 204: judge that the inclination angle of described mobile terminal is whether in preset range, if so, then performs step 205, if not, then perform step 206;
Step 205: think that the positional information of mobile terminal current location information and setting matches, now user uses mobile terminal under faulty posture, and mobile terminal carries out alarm;
Step 206: think that the positional information of mobile terminal current location information and setting does not match, now user uses mobile terminal under normal posture, and mobile terminal does not carry out alarm.
In alarm method described in Fig. 2, faulty posture comprises: uprightly bow and use mobile terminal (screen upward and inclination angle within the scope of certain) and lie down use mobile terminal (screen down).The alarm method of the present embodiment can adopt during this two kinds of gesture operation mobile terminals user and send alarm, the fault of reminding user, can not keep for a long time, thus improve the health of user.
The kinematic parameter detecting mobile terminal in the present embodiment can detect the parameter of mobile terminal by sensor, such as, can obtain the acceleration of described mobile terminal on X, Y, Z axis three directions by three axle acceleration sensors; Obtaining towards the positive and negative of z acceleration that directly can obtain 3-axis acceleration sensor of mobile terminal screen, when Z axis acceleration is timing, then screen is upward, and when Z axis acceleration is for time negative, then screen is down; Inclination angle can calculate corresponding anti-tan trigonometric function value with x, y-axis accekeration and obtain.
As shown in Figure 3, the alarm method of the present embodiment can comprise as follows:
Step 301: after mobile phone is waken up, namely monitoring is opened on backstage;
Step 302: mobile phone, in the process used, is crossed three axle acceleration sensors and obtained the acceleration of mobile phone on X, Y, Z axis three directions;
Step 303: judge whether the acceleration in Z-direction is greater than zero, if so, then performs step 304; If not, then step 307 is performed;
Step 304: judge mobile phone screen upward, think that user is now family orthostatism;
Step 305: the inclination angle going out mobile phone according to the acceleration calculation in X, Y direction, judges whether described inclination angle is greater than predetermined threshold value a, if so, then performs step 306, if not, then performs step 302;
Step 306: judge that user is now in the posture of bowing and seeing the mobile phone, carry out alarm;
Step 307: judge that user is in the posture of lying down and using mobile phone, carry out alarm.
The alarm mode of the present embodiment comprises a variety of, such as, can comprise the various forms such as sound, display, vibrations and carry out alarm, so that reminding user.
The mobile terminal of the present embodiment can be smart mobile phone, panel computer etc., the sensor that the sensor of the present embodiment originally can carry for mobile terminal, also can be specially at the sensor that mobile terminal increases.
Embodiment two:
As shown in Figure 4, present embodiments provide a kind of alarm method, on the basis of above-described embodiment one, also comprise:
Step 401: in the process that mobile terminal uses, detect the distance between eyes of user and the screen of described mobile terminal,
Step 402: judge that the distance detected is whether in preset range, if so, then performs step 403, if not, then perform step 404;
Step 403: carry out the second alarm;
Step 404: keep mobile terminal duty, do not carry out alarm.
When whether the alarm method of the present embodiment judges in preset range whether user uses mobile terminal by the distance detected between eyes of user and the screen of described mobile terminal, from excessively close to, if the distance detected is in preset range, then think the eyes of user from mobile terminal screen excessively close to, easily cause user's myopia, so send alarm.
The sequential of the process of the step 401-404 of the present embodiment does not limit, and it before detection kinematic parameter, after also can detecting kinematic parameter, also can carry out with step 102-103 simultaneously.The step 401-404 of the present embodiment can in embodiment one before arbitrary step, perform afterwards or simultaneously in a word.
The distance that the present embodiment detects between eyes of user and the screen of described mobile terminal can comprise:
By the image of camera collection user, utilize the distance between the method for image procossing detection eyes of user and the screen of described mobile terminal.Such as extract the distance between eyes of user, converse corresponding distance according to physical parameters such as camera focal lengths.
In order to keep some faulty postures for a long time by reminding user, the alarm method of the present embodiment is judging that the current positional information of described mobile terminal also comprises before whether matching with the positional information arranged: timing course;
The step of carrying out the first alarm in the present embodiment and carrying out the second alarm comprises: judge whether the time value of now timing is greater than preset time threshold, if be greater than, then carry out alarm.The alarm method of the present embodiment can also the alarm at once when judging to use mobile terminal under user is in faulty posture.
Introduce the alarm method of the present embodiment below in detail, as shown in Figure 5, comprise step below:
Step1: after mobile phone is waken up, namely monitoring is opened on backstage;
Step12: calculate the distance between eyes and screen by the method for image procossing.
Such as extract the distance between eyes of user, converse corresponding distance according to physical parameters such as camera focal lengths.
Step13: the current distance calculated and given threshold value L make comparisons, if be less than L, entry time determination flow; If be greater than L, then return step Step12 and continue monitoring.
Step14: if the duration of hypotelorism is greater than corresponding threshold time T_EYE, then enters next step and provide the corresponding prompting of user.
This duration is start timer time to judging that current distance is less than the time value between the threshold value L moment.
Step22: by the value of the acceleration transducer read calculate mobile phone screen towards, inclination angle etc.
Such as, towards z acceleration positive and negative that directly can obtain 3-axis acceleration sensor; Inclination angle can calculate corresponding anti-tan trigonometric function value by x, y value and obtain.
Originally the sequential relationship implementing middle step Step22 and step Step12 does not limit, and can comprise: step Step22 performs before step Step12, step Step22 performs after step Step12, or step Step22 and step Step12 performs simultaneously.
Step23: if judged towards upwards, think that user is now family orthostatism, entry angle determination flow; If downwards, think that user is now that the posture of lying down uses mobile phone, entering the corresponding time compares Step34.
Step24: judge whether the mobile phone inclination angle that step22 calculates is less than threshold alpha, if be less than, thinks that user is in the posture of bowing and seeing the mobile phone, and enters the corresponding time to compare; Otherwise just continue monitoring and return step Step22.
Step25: whether compare the duration arrives the reminder time T_NECK leaned over a book, if to, enter next step, if do not arrive, then continue monitoring and return step Step22.
This duration is start timer time to judging that inclination angle is less than the time value between the threshold alpha moment.
Step26 call user's attention activity protection cervical vertebra.
Judge before Step34:(that mobile phone is towards downwards) judge whether the duration arrives the T_LIE time, namely enter Step35 if arrived, if do not arrived, continue monitoring and return step Step22.
This duration is start timer time to judging the time value of mobile phone screen down between the moment.
Step35: the long-time recumbency of reminding user uses mobile phone to damage eyesight.
As shown in Figure 6, in the present embodiment, the process of timing comprises (for mobile phone):
Step 601, detect that mobile phone wakes up, namely user brings into use mobile phone, just enters timing and starts;
Step 602, timer resets, and timing starts;
Step 603, obtains the absolute velocity values of mobile phone by motion sensor;
Step 604, judges whether absolute velocity is greater than threshold value Speed0; If be greater than, then thought that user is changing and use the posture of mobile terminal, after changing posture, get back to step 602 and reset timer and restart timing; If be not more than, then thought that user does not change and use the posture of mobile terminal execution step 605 to continue timing.Give tacit consent to characterizing consumer in alarm method shown in Fig. 5 uses the positional information of mobile terminal to be under faulty posture: mobile phone screen is less than threshold alpha, mobile phone screen down with inclination angle upward.
The acceleration change amount of X, Y, Z tri-on axle of mobile terminal can be detected by sensor in the present embodiment alarm method, then calculate absolute velocity values according to the acceleration change gauge of X, Y, Z tri-on axle.
First alarm and second alarm of the present embodiment can be identical process.
The alarm method of the present embodiment can also send alarm when the eye distance screen of user is too near, can protect the eyesight of user.
Embodiment three:
As shown in Figure 7, present embodiments provide a kind of alarm device, comprising: module, first detection module, the first judge module and the first alarm module are set;
Described module uses mobile terminal under faulty posture positional information for arranging characterizing consumer is set;
Described first detection module is used for, in the process used at described mobile terminal, detecting the kinematic parameter of described mobile terminal, obtaining the current positional information of described mobile terminal according to described kinematic parameter;
Described first judge module is for judging whether the current positional information of described mobile terminal matches with the positional information arranged, and if so, then thinks that user uses mobile terminal under faulty posture, and notifies that described first alarm module carries out the first alarm.
Preferentially, described in the present embodiment, positional information comprises: the screen of mobile terminal is towards the inclination angle with described mobile terminal, and described inclination angle is the angle of described mobile terminal and surface level.
Particularly, in the present embodiment, the first judge module is for judging whether the screen of current described mobile terminal is towards being upward, if not, then judge that the positional information of the positional information that described mobile terminal is current and setting matches, if, then judge that the inclination angle of current described mobile terminal is whether within the scope of the inclination angle arranged, and if so, then judges that the positional information of the positional information that described mobile terminal is current and setting matches.
As shown in Figure 8, first detection module described in the present embodiment comprises three axle acceleration sensor and computing modules;
Described three axle acceleration sensors are for obtaining the acceleration of described mobile terminal on X, Y, Z axis three directions;
Described computing module for obtain according to the acceleration in Z-direction described mobile terminal screen towards, and calculate the inclination angle of described mobile terminal according to the accelerometer in X, Y direction.
The alarm device of this enforcement can send alarm when user is in faulty posture use mobile terminal, and reminding user uses correct posture, improves the health of user.The course of work of the present embodiment alarm device can the description of each step of reference example a pair alarm method.
Embodiment four:
As shown in Figure 9, on the basis of embodiment three, present embodiments provide a kind of alarm device and also comprise: the second detection module, the second judge module and the second alarm module;
Described second detection module is used for, in the process used at mobile terminal, detecting the distance between eyes of user and the screen of described mobile terminal;
Described second judge module for the distance that judges described second detection module and detect whether in preset range;
Described second alarm module is used for carrying out the second alarm when described second judge module is judged as YES.
As shown in Figure 10, described in the present embodiment, the second detection module comprises camera and image processing module;
Described camera is for gathering the image of user;
Described image processing module is for processing the distance between the screen drawing eyes of user and described mobile terminal to the image of the user gathered.
As shown in figure 11, the alarm device of the present embodiment also comprises: timing module;
Described timing module is used for judging that the current positional information of described mobile terminal starts timing before whether matching with the positional information of setting;
Described first alarm module is used for when described first judge module is judged as YES, and judges whether described timing module time value is now greater than preset time threshold, if be greater than, then and alarm;
Described second alarm module is used for when described second judge module is judged as YES, and judges whether described timing module time value is now greater than preset time threshold, if be greater than, then and alarm.
As shown in figure 12, preferentially described timing module comprises: timer, sensor and timing control module;
Described timer is used for resetting, starting timing;
Whether described timing control module is used for being changed by the posture of the current use mobile terminal of sensor senses user, if so, notifies that described timer resets and restarts timing, if not, then notifies that described timer continues timing.
The course of work that the alarm device of the present embodiment is concrete, can describe alarm method in reference example two.
The alarm device of the present embodiment can work as user's posture to be faulty posture and all can to send alarm when the eye distance screen of user is too near, can also protect the eyesight of user like this.
Above content is in conjunction with concrete embodiment further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, some simple deduction or replace can also be made, all should be considered as belonging to protection scope of the present invention.