Smart mobile phone automatic hand-up method
Technical field
The present invention relates to smart mobile phone control technology, specifically, it is a kind of smart mobile phone automatic hand-up method.
Background technology
The quickening of rhythm of life is added in popularization with smart mobile phone, and everybody increasingly wishes the mobile phone of oneself more human nature
Change., after having put through phone, when mobile phone is pressed close to ear, mobile terminal being capable of automatic distinguishing screen for for example present user.
But after the completion of the user's communication, need to place it in face of, wait screen just can go by phone hang up button after lighting, especially
After being the phone hang-up button that present intelligent mobile terminal deletes hardware, especially inconvenient.
Content of the invention
For the deficiencies in the prior art, the present invention provides a kind of smart mobile phone automatic hand-up method, finishes in user's communication
Afterwards, mobile phone can be can achieve automatic hand-up according to default track is mobile, it is to avoid wait bright screen simultaneously presses hang up button
Trouble.
For reaching above-mentioned purpose, concrete technical scheme of the present invention is as follows:
A kind of smart mobile phone automatic hand-up method is it is characterised in that include desired guiding trajectory establishment step and movement locus knowledge
Other step, wherein:
Described desired guiding trajectory establishment step is carried out according to following:
S11: start, total sampling number n and each sampling number m is set, and initialization counter n=1;
S12: system prompt " setting n-th movement locus " time delay t second, then initialization counter m=1;
S13: gather the three-dimensional coordinate in m-th motor point according to the default sampling interval, then enumerator m=m+1 is set;
S14: judge whether enumerator m is more than each sampling number m, if yes then enter step s15, otherwise return to step
s13;
S15: the D coordinates value of m point in storage n-th sample track, then arranges enumerator n=n+1;
s16;Judge whether enumerator n is more than total sampling number n, if it is, entering step s17, otherwise return to step
S12 continues collection movement locus next time;
S17: using the changes in coordinates scope in each motor point in n sample track as desired guiding trajectory, terminate desired guiding trajectory
Establishment step;
Described movement locus identification step is carried out according to following:
S21: starting, judge whether to be in talking state, if it is, entering step s22 to continue identification, otherwise terminating;
S22: judging whether call belongs to hand-held and answer state, if it is, entering step s23 to continue identification, otherwise tying
Bundle;
S23: the movement locus of collection mobile phone;
S24: judge whether the movement locus that m sampled point of continuous sampling is formed belong to the coordinate model of desired guiding trajectory
Enclose, if it is, entering step s25, otherwise return to step s23;
S25: close call;
S26: movement locus identification step terminates.
Based on said method it is found that there is a range of desired guiding trajectory, in handss by repeatedly setting up one
Hold under call shape, mobile phone can be realized automatic hand-up according to the motion of default track, desired guiding trajectory has certain tolerance model
Enclose, as long as mobile phone movement locus meet its scope and all can achieve Intelligent Recognition, on the one hand can improve the intelligence degree of mobile phone,
Bring good Consumer's Experience, on the other hand can also avoid waiting bright screen during on-hook and pressing the trouble of hang up button, save
Mobile phone energy consumption.
In order to ensure accuracy and the reliability of movement locus identification, arranging total sampling number n in step s11 is 3~5
Secondary;The points sampled each time are 10~50 points.
As further describing, the three-dimensional coordinate in each motor point passes through gravity sensor and gyroscope obtains, and respectively
It is designated as (xi,yi,zi), in step s17, in n sample track, the changes in coordinates scope in each motor point is designated as respectivelyWherein i=1~m,Represent i-th in n sample track
The minima in x direction for the motor point and maximum;Represent that in n sample track, i-th motor point is in y direction
Minima and maximum;Represent the minima in z direction of i-th motor point in n sample track and maximum;
In movement locus identification step, if each sampled point (xi,yi,zi), i=1~m all existsIn scope, then the movement locus that this m sampled point is formed belong to default rail
The coordinate range of mark.
By being quantified to movement locus using the three-dimensional coordinate acquired in gravity sensor and gyroscope, utilize simultaneously
Setting is repeated several times, the minima according to each motor point and maximum are limiting the moving range of movement locus so that motion
The identification of track is convenient, improves the accuracy rate of algorithm.
Answer state and wired preferably, being not belonging to the hand-held situation answering state in step s22 and including bluetooth earphone
Earphone receiving state, it is to avoid be difficult to obtain the trouble of accurate movement locus in time under other answering modes.
The remarkable result of the present invention is:
Algorithm is simple, and it is convenient to realize, and after user's communication finishes, can move mobile phone according to default track can be real
Existing automatic hand-up, it is to avoid wait bright screen and press the trouble of hang up button, on the one hand can improve Consumer's Experience, on the other hand
System energy consumption can also be reduced.
Brief description
Fig. 1 is the operation principle block diagram of the present invention;
Fig. 2 is desired guiding trajectory establishment step flow chart;
Fig. 3 is movement locus identification step flow chart.
Specific embodiment
Below in conjunction with the accompanying drawings the specific embodiment and operation principle of the present invention is described in further detail.
As shown in Figure 1-Figure 3, a kind of smart mobile phone automatic hand-up method, including desired guiding trajectory establishment step and movement locus
Identification step, wherein:
Described desired guiding trajectory establishment step is carried out according to following:
S11: start, total sampling number n and each sampling number m is set, and initialization counter n=1;
S12: system prompt " setting n-th movement locus " time delay t second, then initialization counter m=1;
S13: gather the three-dimensional coordinate in m-th motor point according to the default sampling interval, then enumerator m=m+1 is set;
S14: judge whether enumerator m is more than each sampling number m, if yes then enter step s15, otherwise return to step
s13;
S15: the D coordinates value of m point in storage n-th sample track, then arranges enumerator n=n+1;
s16;Judge whether enumerator n is more than total sampling number n, if it is, entering step s17, otherwise return to step
S12 continues collection movement locus next time;
S17: using the changes in coordinates scope in each motor point in n sample track as desired guiding trajectory, terminate desired guiding trajectory
Establishment step;
Described movement locus identification step is carried out according to following:
S21: starting, judge whether to be in talking state, if it is, entering step s22 to continue identification, otherwise terminating;
S22: judging whether call belongs to hand-held and answer state, if it is, entering step s23 to continue identification, otherwise tying
Bundle;
S23: the movement locus of collection mobile phone;
S24: judge whether the movement locus that m sampled point of continuous sampling is formed belong to the coordinate model of desired guiding trajectory
Enclose, if it is, entering step s25, otherwise return to step s23;
S25: close call;
S26: movement locus identification step terminates.
In the present embodiment, arranging total sampling number n in step s11 is 3 times;The points sampled each time are 15
Point, the three-dimensional coordinate in each motor point passes through gravity sensor and gyroscope obtains, and is designated as (x respectivelyi,yi,zi), in step
In s17, in 3 sample track, the changes in coordinates scope in each motor point is designated as respectively Wherein i=1~15,Represent i-th motor point minima in x direction in 3 sample track
And maximum;Represent the minima in y direction of i-th motor point in 3 sample track and maximum;Represent the minima in z direction of i-th motor point in 3 sample track and maximum;
In movement locus identification step, if each sampled point (xi,yi,zi), i=1~15 all existIn scope, then the movement locus that this 15 sampled points are formed belong to default
The coordinate range of track.
In this example by mobile phone as a example transferring to this track of trouser pocket in one's ear, in desired guiding trajectory, obtained by five times default
Each motor point three-dimensional coordinate respectively as shown in Table 1 to Table 3, by analyzing the maximum in all directions of each point
And minima, you can obtain the desired guiding trajectory coordinate range shown in table 4, in movement locus comparison process, same collection is continuous
15 points, if coordinate of each point is corresponding in turn in table 4 limited range, assert movement locus and desired guiding trajectory
Identical, thus automatically executing corresponding on-hook program, control end of conversation.
This method carries out automatic hand-up control to it mainly for hand-held answering under state, is not belonging to handss in step s22
The situation holding the state of answering includes that bluetooth earphone answers state and wired earphone answers state.Under such conditions, due to mobile phone
Its state of Real-time Collection can need not be gone using gravity sensor or gyroscope with remains stationary, therefore can use other side
Formula carries out on-hook control.
Last it should be noted that the present embodiment only the preferred embodiments of the present invention are described however it is not limited to
The embodiment of Figure of description indication, those of ordinary skill in the art under the enlightenment of the present invention, without prejudice to the present invention
On the premise of objective and claim, can make and representing as multiple types, such as change sampling number during desired guiding trajectory and
Sampling number, changes limiting mode of desired guiding trajectory etc., these conversion each fall within the scope of the present invention.
Subordinate list: