Summary of the invention
The technical problem to be solved in the present invention is that in view of the deficiencies of the prior art, providing a kind of shifting based on touch screen
Dynamic terminal awakening method and system can solve existing mobile terminal power key and are easily damaged by this method, and existing
Mobile terminal wake-up mode complexity power consumption it is high, the problem of being easy false triggering, waste electricity.
In order to solve the above-mentioned technical problem, the technical solution adopted in the present invention is as follows:
A kind of mobile terminal awakening method based on touch screen, wherein the described method comprises the following steps:
S1, mobile terminal preset basic point, angle upper threshold and angle upper threshold for waking up touch screen;
S2, when mobile terminal sleep, detection touch touch screen sliding trajectory, obtain beginning and end coordinate;
The relationship of S3, the angle for judging starting point and basic point line and terminal and basic point line and angle threshold value, if symbol
It closes and requires, then wake up mobile terminal.
The mobile terminal awakening method based on touch screen, wherein in the step S1, the basic point is mobile whole
One is held in the coordinate of touch screen quadrangle.
The mobile terminal awakening method based on touch screen, wherein in the step S1, the angle upper threshold
It is expressed as ah, the angle lower threshold is expressed as al, and ah and al meets, and 90 degree > ah > al > 0 degree.
The mobile terminal awakening method based on touch screen, wherein the step S2 further include:
S21, detect mobile terminal touch screen whether suspend mode, if touch screen is updated to the second firmware by suspend mode.
The mobile terminal awakening method based on touch screen, wherein in the step S21, second firmware is
Detect the firmware of touch screen wake operation in the dormant state for mobile terminal.
The mobile terminal awakening method based on touch screen, wherein the step S3 is specifically included:
S31, the touch touch screen operation of detection mobile terminal in the dormant state, judge the starting point and the end that touch touch screen
The relationship of point and basic point line angle and angle threshold value wakes up touch screen if met the requirements;
S32, when waking up touch screen, touch screen is updated to the first firmware, first firmware is for mobile terminal
In the firmware of wake-up states normal use touch screen.
The mobile terminal awakening method based on touch screen, wherein in the step S3, the starting point and basic point connect
The relationship of the angle and angle threshold value of line and terminal and basic point line are as follows: starting point and basic point line and terminal and basic point line
Angle is greater than angle lower threshold, and is less than angle upper threshold.
Mobile terminal based on touch screen wakes up system, wherein the system comprises:
Module is preset, for presetting basic point, angle Upper threshold for waking up touch product on mobile terminals
Value and angle upper threshold;
Detection module, for when mobile terminal sleep, detection to touch the sliding trajectory of touch screen, acquisition beginning and end
Coordinate;
Mobile terminal wake-up module, for judging the angle and angle door of starting point and basic point line and terminal and basic point line
The relationship of limit value wakes up mobile terminal if met the requirements.
The mobile terminal based on touch screen wakes up system, and the module that presets includes:
Basic point presets module, for basic point coordinate to be arranged under touch screen wake-up states;
Angle threshold value setup module, for dividing into angled upper threshold and angle Lower Threshold in touch screen wake-up states
Value.
The mobile terminal based on touch screen wakes up system, and the mobile terminal wake-up module includes: firmware update
Touch screen is updated to the second firmware when for touch screen dormant state by module, and whens touch screen wake-up states updates touch screen
For the first firmware.
The utility model has the advantages that compared with prior art, mobile terminal awakening method provided by the present invention based on touch screen and
Touch screen is updated to second and consolidated by system, setting basic point default first and angle threshold value when touch screen is dormant state
Part, mobile terminal touch screen incude touch trajectory, obtain corresponding beginning and end coordinate, judge starting point and basic point line and terminal
Mobile terminal is waken up if met the requirements with the angle of basic point line and the relationship of angle threshold value;It allows users to
After mobile terminal extinguishes display screen, by sliding wake-up touch screen in touch screen, to accurately wake up mobile terminal, reduce
The number that power key is pressed, avoids false triggering.Meanwhile when touch screen is dormant state, touch screen is updated to the
Two firmwares, are only used for detection touch screen wake operation, participate in detection without central processing unit, play and save detection energy consumption
Effect.
Specific embodiment
The present invention provides mobile terminal awakening method and system based on touch screen, to make the purpose of the present invention, technical side
Case and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that specific reality described herein
Example is applied only to explain the present invention, is not intended to limit the present invention.
With reference to the accompanying drawing, by the description of the embodiment, further explanation of the contents of the invention are made.
Referring to Figure 1, Fig. 1 is that the present invention is based on the flow charts of the mobile terminal awakening method preferred embodiment of touch screen.
As shown, the described method comprises the following steps:
S100, mobile terminal preset basic point, angle upper threshold and angle upper threshold for waking up touch screen;
S200, when mobile terminal sleep, detection touch touch screen sliding trajectory, obtain beginning and end coordinate;
The relationship of S300, the angle for judging starting point and basic point line and terminal and basic point line and angle threshold value, if
It meets the requirements, then wakes up mobile terminal.
Above-mentioned steps are described in detail below with reference to specific embodiment.
In the step s 100, basic point, angle upper threshold and angle upper threshold are preset on mobile terminals.Specifically
For, the mobile terminal can be the mobile terminals such as mobile phone, tablet computer.The mobile terminal has touch screen and display
Screen, this is the prior art, and and will not be described here in detail.The basic point is one or more of four angle point of mobile terminal touch screen, example
Such as: the touch screen for being tpw*tpl for resolution ratio, selection mobile terminal touch screen lower left point are coordinate origin, establish coordinate
It is XY, then the entire screen of mobile phone is respectively positioned on coordinate system XY first quartile, then the coordinate of four angle point of touch screen can be denoted as:
(0,0), (0, tpl), (tpw, 0), (tpw, tpl);So basic point coordinate can be matched are as follows: (0,0), (0, tpl), (tpw, 0),
One or more in (tpw, tpl).
In the present embodiment, the basic point is chosen for 1, and coordinate is denoted as (x0, y0), then basic point (x0, y0) coordinate
It can be one in (0,0), (0, tpl), (tpw, 0), (tpw, tpl), referring to figure 2..
Further, the angle upper threshold and angle upper threshold are preset, value range are as follows: 90 degree >
Ah > al > 0 degree.
Specifically, in the present embodiment, the angle upper threshold can be 60, and the angle lower threshold can be 40
In step s 200, when mobile terminal sleep, detection touches the sliding trajectory of touch screen, obtains beginning and end
Coordinate.Existing mobile terminal can not touch touch screen after display screen suspend mode, or need to wake up by complicated operation
Touch screen.And the present invention then uses after mobile terminal sleep, and mobile terminal touch screen is updated to the second firmware, described second
Firmware detects touch screen wake operation for mobile terminal in the dormant state.Second firmware, which detects, touches touch screen
Sliding trajectory, wherein sliding trajectory is 1.Obtain touch touch screen first touch point coordinate p1, coordinate be denoted as (x1,
Y1), when user discharge touch screen when obtain release touch screen before the last one touch point coordinate p2, coordinate be denoted as (x2,
Y2)), p2 is on the sliding trajectory using p1 as starting point, the terminal of p2 sliding trajectory thus.Further, the sliding trajectory can be with
Be it is a plurality of, such as 2,3.
In step S300, the angle of starting point and basic point line and terminal and basic point line and the pass of angle threshold value are judged
System, if met the requirements, wakes up mobile terminal.Specifically, as acquisition starting point p1(x1, y1 in step S200), terminal is sat
Mark p2(x2, y2) after, in this step, calculates the straight line by basic point p(x0, y0) and starting point (x1, y1) and pass through basic point p
The angle a of the straight line of (x0, y0) and terminal (x2, y2), judges angle a and angle upper threshold ah and angle lower threshold later
Relationship between al wakes up touch screen, and touch screen is updated to the first firmware if ah > a > al;If a is unsatisfactory for
Relational expression ah > a > al wakes up touch screen then terminating, and touch screen is the second firmware.The setting of the present invention in this way, so that with
It family can be after mobile terminal extinguishes display screen, by sliding wake-up touch screen in touch screen, to accurately to wake up movement
Terminal reduces the number that power key is pressed, avoids false triggering.Meanwhile when touch screen is dormant state, by touch screen
It is updated to the second firmware, is only used for detection touch screen wake operation, participates in detection without central processing unit, plays saving inspection
Survey the effect of energy consumption.Further, the basic point can choose multiple, such as two, and it is logical can to calculate separately beginning and end
The angle of the straight line of same basic point is crossed, two angles is thus obtained, is denoted as a1 and a2, judges a1, a2 and ah and al respectively
Relationship wakes up touch screen if meeting ah > a1 > al and ah > a2 > al.The accuracy for waking up touch screen can be provided in this way,
False triggering is further avoided, provide battery of mobile terminal uses the time.When basic point is 3 or 4, can use identical
Method judged, the accuracy for waking up touch screen can be further provided for, it is here with no restrictions for basic point number, above
It is only to provide specific example to be illustrated.
Specifically, in the present embodiment, angle a can be, but not limited to using following calculating process such as, calculate pass through first
Basic point p(x0, y0) and starting point (x1, y1) straight line slope k 1,
k1=(y1-y0)/(x1-x0);
Secondly the slope k 2 of the straight line by basic point p(x0, y0) and terminal (x2, y2) is calculated,
k2=(y2-y0)/(x2-x0);
Angle a is finally calculated,
a=arctan|(k1-k2)/(1+k1*k2)|。
To sum up, referring to figure 3., Fig. 3 is that the present invention is based on the streams of the mobile terminal awakening method specific embodiment of touch screen
Cheng Tu comprising following steps:
S10, mobile terminal be wake-up states when, preset basic point coordinate (x0, y0), angle upper threshold ah and angle
Spend lower threshold al;
S20, when mobile terminal is switched to dormant state by wake-up states, touch screen is updated to the second firmware;
S30, when mobile terminal in a dormant state when, if detect user touch touch screen, obtain first touch
Point coordinate, if coordinate is (x1, y1), the last one touch point before release touch screen is obtained when user discharges touch screen is sat
Mark, if coordinate is (x2, y2);
S40, according to coordinate (x1, y1), (x2, y2) and pre-set coordinate (x0, y0), calculate (x0, y0), (x1,
Y1) the angle a that line and (x0, y0), (x2, y2) link;
S50, judge a whether in the range of presetting, i.e. the relationship of a and ah and al;
If S60, a meet ah > a > al, mobile terminal is waken up, i.e. mobile terminal is switched to bright screen by dormant state and calls out
The state of waking up, is updated to the first firmware for touch screen;If a is unsatisfactory for ah > a > al, step S30 is jumped to, waiting is touched next time
It touches.
The present invention provides another specific embodiment, and user is slided on mobile terminal touch screen using two fingers
Row, presets basic point p(x0, y0), angle Upper threshold ah, angle Lower Threshold al;Detection user when not touched touches touching
The touch point for touching screen is denoted as starting point 1 and starting point 2, and 1 coordinate of start of record is P1(x1, y1), the coordinate of starting point 2 is P2(x2,
Y2);Assign p1(x1, y1) and p2(x2, y2) to p3(x3, y3), p4(x4, y4);
The angle aa of the line of the line and terminal 1 and basic point p of zequin 1 and basic point p, the line of starting point 2 and basic point p
With the angle ab of terminal 2 and the line of basic point p.
Compare the relationship of aa, ab and angle threshold ah and al, if aa and ab meet, ah > aa > al, ah > ab > al, then
Touch screen is waken up, otherwise stops waking up touch screen.
Here, when obtaining starting point, terminal point coordinate, selection mobile phone screen lower left point is coordinate origin, establishes coordinate system XY,
So the entire screen of mobile phone is respectively positioned on coordinate system XY first quartile, i.e. cross, the ordinate value of starting point cross, ordinate value and terminal are equal
For positive value.
In the present embodiment, the calculating process of aa, ab are specifically as follows:
The slope k 1 of the straight line by basic point p(x0, y0) and starting point (x1, y1) is calculated first,
k1=(y1-y0)/(x1-x0);
Secondly the slope k 2 of the straight line by basic point p(x0, y0) and terminal (x2, y2) is calculated,
k2=(y2-y0)/(x2-x0);
Angle aa is finally calculated,
aa=arctan|(k1-k2)/(1+k1*k2)|。
The slope k 3 of the straight line by basic point p(x0, y0) and starting point (x3, y3) is calculated first,
K3=(y3-y0)/(x3-x0);
Secondly the slope k 4 of the straight line by basic point p(x0, y0) and terminal (x4, y4) is calculated,
K4=(y4-y0)/(x4-x0);
Angle ab is finally calculated,
ab=arctan|(k3-k4)/(1+k3*k4)|。
The present invention also provides the mobile terminals based on touch screen to wake up system, referring to figure 4., wherein the system packet
It includes:
Module is preset, for presetting basic point, angle upper threshold and angle upper threshold on mobile terminals;
Detection module, for when mobile terminal sleep, detection to touch the sliding trajectory of touch screen, acquisition beginning and end
Coordinate;
Mobile terminal wake-up module, for judging the angle and angle door of starting point and basic point line and terminal and basic point line
The relationship of limit value wakes up mobile terminal if met the requirements.
The mobile terminal awakening method system based on touch screen, the module that presets include:
Basic point presets module, for basic point coordinate to be arranged under touch screen wake-up states;
Angle threshold value setup module, for dividing into angled upper threshold and angle Lower Threshold in touch screen wake-up states
Value.
The mobile terminal awakening method system based on touch screen, the mobile terminal wake-up module includes: firmware
Touch screen is updated to the second firmware when for touch screen dormant state by update module, by touch screen when touch screen wake-up states
It is updated to the first firmware.
In conclusion a kind of mobile terminal awakening method and system based on touch screen provided by the invention, by moving
Basic point, angle upper threshold and angle upper threshold are preset in dynamic terminal;When mobile terminal sleep, touch screen is updated
For the second firmware, the detection of the second firmware touches the sliding trajectory of touch screen, obtains beginning and end coordinate;Judge starting point and basic point
Line and terminal and the angle of basic point line and the relationship of angle threshold value wake up mobile terminal if met the requirements;And it will
Touch screen is updated to the first firmware;Mobile terminal display screen is effectively prevented by false triggering, mobile terminal is accurately connect
The touch operation of user is received to accurately wake up mobile terminal, can pass through after mobile terminal extinguishes display screen and touch touch screen
Mobile terminal accurately is waken up, reduces the number that power key is pressed, brings to user and greatly facilitate.Meanwhile it touching
Touch screen be dormant state when, touch screen is updated to the second firmware, be only used for detection touch screen wake operation, without center
Processor participates in detection, plays the role of saving detection energy consumption.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can
With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention
Protect range.