Embodiment
Core of the present invention provides the display control method and the portable terminal of portable terminal, obtain the acceleration that mobile terminal display screen moves on all directions, according to acceleration the position that the displaying contents on the display screen carries out on all directions is changed, and the displaying contents after the outgoing position conversion.
In order to make those skilled in the art person understand the present invention program better, and above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
The first embodiment flow process of the display control method of portable terminal of the present invention is as shown in Figure 1:
Step 101: obtain the acceleration that mobile terminal display screen moves on all directions.
Concrete, the acceleration that can on all directions, move by the acceleration transducer reading displayed screen that sets in advance.
Step 102: the position that the displaying contents on the display screen carries out on all directions is changed according to acceleration.
Concrete, obtain display screen location parameter on all directions in the coordinate system that sets in advance, call the position transformational relation of setting up in advance, with location parameter and acceleration input parameter as the position transformational relation, calculate display screen location parameter after the conversion on all directions in coordinate system according to the position transformational relation, adjust the position of displaying contents on display screen according to the location parameter after the conversion, the invariant position of displaying contents in coordinate system before and after adjusting.
Step 103: the displaying contents after the outgoing position conversion.
The second embodiment flow process of the display control method of portable terminal of the present invention as shown in Figure 2, this embodiment shows in detail the demonstration control procedure of portable terminal:
Step 201: mobile terminal-opening.
Step 202: set in advance minimum acceleration threshold value and high acceleration threshold value.
In order to prevent that portable terminal from still carrying out the position conversion to displaying contents when translational speed is slow, therefore minimum acceleration threshold value is set, so that translational acceleration when being lower than this minimum acceleration threshold value, needn't carry out the position conversion, to avoid expending the electric weight of portable terminal; And, for fear of the portable terminal translational acceleration when too fast, the position conversion excessively causes the reading property variation of displaying contents, therefore high acceleration threshold value is set, so that translational acceleration is when being higher than this high acceleration threshold value, be that translational acceleration carries out the position conversion with this high acceleration threshold value.
Step 203: judge whether the enable possition translation function, if then execution in step 204; Otherwise, execution in step 210.
Because the unlatching of position transformation function requires portable terminal to carry out corresponding calculated, and computational process can consume the electric weight of portable terminal, therefore can select whether to open this position transformation function as required, if open just with the displaying contents output after the conversion of position, if unlatching is not just directly exported displaying contents.
Step 204: the acceleration that the display screen that reads portable terminal by the acceleration transducer that sets in advance moves on all directions.
Acceleration transducer is a kind of electronic equipment that can measure accelerative force, its by measuring because the acceleration that gravity causes can calculate equipment angle of inclination with respect to the horizontal plane, by analyzing dynamic acceleration, the mode that can acquisition equipment moves.
In the embodiment of the invention, when display screen is mobile in two dimensional surface, X-axis acceleration and the Y-axis acceleration of acceleration transducer reading displayed screen in the two-dimensional coordinate system that sets in advance; When display screen was mobile in three-dimensional planar, acceleration transducer read X-axis acceleration, Y-axis acceleration and the Z axle acceleration of described display screen in the three-dimensional system of coordinate that sets in advance.
Step 205: judge that whether acceleration is greater than minimum acceleration threshold value, if then execution in step 206; Otherwise, execution in step 210.
Step 206: judge that whether acceleration is less than high acceleration threshold value, if then execution in step 207; Otherwise execution in step 208.
Step 207: execution in step 209 is changed in the position that displaying contents carries out on all directions according to acceleration.
Obtain display screen location parameter on all directions in the coordinate system that sets in advance, call the position transformational relation of setting up in advance, with location parameter and acceleration input parameter as the position transformational relation, calculate display screen location parameter after the conversion on all directions in coordinate system according to the position transformational relation, adjust the position of displaying contents on display screen according to the location parameter after the conversion, the invariant position of displaying contents in coordinate system before and after adjusting.
Step 208: displaying contents is carried out position conversion on all directions according to high acceleration threshold value.
This step is consistent with the position transfer process of step 207, and different only being do not repeat them here location parameter and the input parameter of high acceleration as the position transformational relation.
Step 209: the displaying contents after the outgoing position conversion, finish current flow process.
Step 210: directly export displaying contents, finish current flow process.
The 3rd embodiment flow process of the display control method of portable terminal of the present invention as shown in Figure 3, it is example that this embodiment moves in two dimensional surface with mobile phone, the displaying contents that shows mobile phone display screen shows control, so that the constant process of the relative customer location of displaying contents:
Step 301: set in advance position transformation function, and minimum acceleration threshold value and high acceleration threshold value.
Step 302: judge whether the enable possition translation function, if then execution in step 303; Otherwise, execution in step 309.
Step 303: by X-axis acceleration and the Y-axis acceleration of acceleration transducer reading displayed screen in two-dimensional coordinate system that sets in advance.
Acceleration transducer can detect the acceleration of X-axis and Y-axis both direction, and acceleration transducer can be exported analog signal or digital signal.Wherein, analog signal is exactly an output voltage, after mobile phone is read concrete magnitude of voltage, just can obtain the acceleration of X-axis and Y-axis respectively by analog/digital conversion; Digital signal is exactly an output pulse signal, by detecting the acceleration that duty of ratio just can draw X-axis and Y-axis respectively.
Step 304: judge that whether acceleration is greater than minimum acceleration threshold value, if then execution in step 305; Otherwise, execution in step 309.
Step 305: judge that whether acceleration is less than high acceleration threshold value, if then execution in step 306; Otherwise, execution in step 307.
Step 306: displaying contents is carried out position conversion, execution in step 308 according to X-axis acceleration and Y-axis acceleration.
Mobile phone only moves in X-axis and Y direction in the present embodiment, and therefore the reduction formula by acceleration calculation displaying contents displacement is as follows:
fx(a
x)=b
x(v
x×a
x×T+0.5×a
x×T
2); (1)
fy(a
y)=by(v
y×a
y×T+0.5×a
y×T
2); (2)
Wherein, v
x=v
X0+ a
x* T, v
y=v
Y0+ ay * T; (3)
Wherein, a
xAnd a
yBe respectively the X-axis of reading by acceleration transducer and the accekeration of Y-axis, function f x (a
x) be the formula that calculates mobile phone X-axis displacement (with respect to display screen); Function f y (a
y) be the formula that calculates the moving distance of mobile phone y-axis shift (with respect to display screen).
Wherein, T is a sense cycle; v
xBe the axial translational speed of x, b
xBe the X-axis coefficient, mainly the actual displacement of mobile phone being converted to screen content need be in the oppositely mobile distance of display screen upper edge X-axis; b
yBe the Y-axis coefficient, mainly the actual displacement of mobile phone being converted to screen content need be in the oppositely mobile distance of display screen upper edge Y-axis.v
xCan be by previous speed (v
X0) calculate, Y-axis does not repeat them here by that analogy.
The computing formula of carrying out the position conversion is as follows:
X’=X-fx(a
x);Y’=Y-fy(a
y); (4)
Wherein, X and Y are respectively displaying contents coordinates on X-axis and Y-axis before the conversion of position, with the fx (a that calculates
x) and fy (a
y) bring in the following formula (4), can obtain displaying contents on display screen respectively along the moving distance X of X-axis and y-axis shift ' and Y '.
Need to prove, present embodiment only shows the displaying contents transfer process of mobile phone when two dimensional surface moves, in like manner, when mobile phone moves at three dimensions, account form in the account form that moves relative to display screen on each reference axis and when two dimension is consistent, all by acceleration calculation speed, and, do not repeat them here by the distance that speed calculation moves.
Step 307: displaying contents is moved according to high acceleration threshold value.
Step 308: the displaying contents after outgoing position moves on the display screen, finish current flow process.
As shown in Figure 4, be embodiment illustrated in fig. 3 in schematic diagram before and after the conversion of displaying contents position, wherein left side figure changes the preceding displaying contents and the relative position of display screen, with the lower side of display screen and limit, left side X-axis and the Y-axis as reference axis; When according to as right figure in during arrow direction indication moving display screen, then calculating by abovementioned steps to make displaying contents move right on display screen, thereby guarantee that the relative position of displaying contents on reference axis is constant, just displaying contents is with respect to the invariant position of human eye.
Step 309: on display screen, directly export displaying contents, finish current flow process.
By the embodiment of the invention described above display control method as can be known, when shake appears in portable terminal, when causing showing instability, conversion by displaying contents, make displaying contents not be moved with respect to the user, improved the exhibit stabilization of portable terminal, and, therefore improved user experience because portable terminal can guarantee the stable of displaying contents.
Corresponding with the embodiment of display control method of the present invention, the present invention also provides the embodiment of portable terminal.
The first embodiment block diagram of portable terminal of the present invention as shown in Figure 5, this portable terminal comprises: acceleration obtainment unit 510, position converting unit 520 and content output unit 530.
Wherein, acceleration obtainment unit 510 is used to obtain the acceleration that mobile terminal display screen moves on all directions; Position converting unit 520 is used for according to described acceleration the position that the displaying contents on the described display screen carries out on the described all directions being changed; Content output unit 530 is used to export the displaying contents after change described position.
The second embodiment block diagram of portable terminal of the present invention as shown in Figure 6, this portable terminal comprises: function-judging unit 610, acceleration obtainment unit 620, the first default unit 630, first judging unit 640, position converting unit 650 and content output unit 660.
Wherein, function-judging unit 610 is used to judge whether to open the position transformation function that sets in advance; Acceleration obtainment unit 620 be used for when the judged result of described function-judging unit 610 when being, obtain the acceleration that described mobile terminal display screen moves; The first default unit 630 is used to set in advance minimum acceleration threshold value; First judging unit 640 is used to judge that whether described acceleration is greater than described minimum acceleration threshold value; Position converting unit 650 comprises first converting unit (not shown among Fig. 6), be used for when the judged result of described first judging unit 640 when being, according to described acceleration described displaying contents is carried out position conversion on all directions; Content output unit 660 is used to export the displaying contents after change described position, described content output unit 660 also comprises first output unit (not shown among Fig. 6), be used for when the judged result of described first judging unit 640 for not or the judged result of described function-judging unit 610 for not the time, directly export described displaying contents.
Wherein, acceleration obtainment unit 620 can comprise acceleration transducer (not shown among Fig. 6): this unit is used for reading the acceleration that described display screen moves by the acceleration transducer that sets in advance on all directions.
Wherein, position converting unit 650 can comprise (not shown among Fig. 6): parameter acquiring unit is used for obtaining the location parameter of described display screen at the coordinate system that sets in advance; Concern call unit, be used to call in advance the position transformational relation of setting up, with described location parameter and described acceleration input parameter as described position transformational relation; Parameter calculation unit calculates described display screen location parameter after the conversion on all directions in described coordinate system according to described position transformational relation; Position adjustment unit is used for adjusting the position of described displaying contents on described display screen according to the location parameter after the described conversion, the invariant position of displaying contents in described coordinate system before and after the described adjustment.
The 3rd embodiment block diagram of portable terminal of the present invention as shown in Figure 7, this portable terminal comprises: acceleration obtainment unit 710, the second default unit 720, second judging unit 730, position converting unit 740 and content output unit 750.
Wherein, acceleration obtainment unit 710 is used to obtain the acceleration that described mobile terminal display screen moves on all directions; The second default unit 720 is used to set in advance high acceleration threshold value; Second judging unit 730 is used to judge that whether described acceleration is greater than described high acceleration threshold value; Position converting unit 740 comprises second converting unit (not shown among Fig. 7), be used for when the judged result of described second judging unit 730 when being, according to described high acceleration threshold value described displaying contents is carried out position conversion on all directions, perhaps, when the judged result of described second judging unit 730 for not the time, according to described acceleration described displaying contents is carried out position conversion on all directions; Content output unit 750 is used to export the displaying contents after change described position.
Wherein, acceleration obtainment unit 710 can comprise acceleration transducer (not shown among Fig. 7): this unit is used for reading the acceleration that described display screen moves by the acceleration transducer that sets in advance on all directions.
Wherein, position converting unit 740 can comprise (not shown among Fig. 7): parameter acquiring unit is used for obtaining the location parameter of described display screen at the coordinate system that sets in advance; Concern call unit, be used to call in advance the position transformational relation of setting up, with described location parameter and described acceleration input parameter as described position transformational relation; Parameter calculation unit calculates described display screen location parameter after the conversion on all directions in described coordinate system according to described position transformational relation; Position adjustment unit is used for adjusting the position of described displaying contents on described display screen according to the location parameter after the described conversion, the invariant position of displaying contents in described coordinate system before and after the described adjustment.
By above technical scheme provided by the invention as seen, obtain the acceleration that mobile terminal display screen moves in the embodiment of the invention on all directions, the position that displaying contents carries out on all directions is changed the displaying contents after the outgoing position conversion according to this acceleration.Use the embodiment of the invention,, when causing showing instability,, make displaying contents not be moved, improved the exhibit stabilization of portable terminal with respect to the user by the conversion of displaying contents when shake appears in portable terminal; And, therefore improved user experience because portable terminal can guarantee the stable of displaying contents.
Those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Above-described embodiment of the present invention does not constitute the qualification to protection range of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.