CN104639725B - interface switching method and device - Google Patents

interface switching method and device Download PDF

Info

Publication number
CN104639725B
CN104639725B CN201310557208.9A CN201310557208A CN104639725B CN 104639725 B CN104639725 B CN 104639725B CN 201310557208 A CN201310557208 A CN 201310557208A CN 104639725 B CN104639725 B CN 104639725B
Authority
CN
China
Prior art keywords
interface
animation
switching
frame coordinate
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310557208.9A
Other languages
Chinese (zh)
Other versions
CN104639725A (en
Inventor
许峰峰
李慧
孙皓然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310557208.9A priority Critical patent/CN104639725B/en
Publication of CN104639725A publication Critical patent/CN104639725A/en
Application granted granted Critical
Publication of CN104639725B publication Critical patent/CN104639725B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention discloses a kind of interface switching method and device, reception interface switching command of the embodiment of the present invention, obtains interface drawing data corresponding to interface after the pointed switching of the changing interface instruction, while call the animation curve pre-set;According to the animation curve of calling, the animation to interface after the switching by switching front interface is shown;Whether detecting has generated interface after the switching according to the interface drawing data of acquisition;Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, current time is obtained, according to the animation curve and current time, obtains the display location of picture frame and display corresponding to the current time;Interface after the switching has been generated according to the interface drawing data of acquisition if detecting, has shown interface after the switching;Beneficial effect with the animation in quick smoothly display interface handoff procedure, improves man-machine interaction.

Description

Interface switching method and device
Technical field
The present invention relates to computer realm, further relates to interface display technology, more particularly to a kind of interface switching method and dress Put.
Background technology
At present, in changing interface, by the interface before switching excessively to switching after interface be to be realized by animation;It is dynamic Trace reflects animation from beginning state to done state during this, change over time, the change of object state Degree;Conventional animation curve is EaseIn(Slowly enter)And EaseOut(Slowly go out), the interlude that is obtained using existing animation curve Animation can not embody the characteristics of animation is quick, so as to cause to cause to switch slow sensation, boundary to user in handoff procedure Face switching is not smooth;If shortening animation time, very lofty sensation can be brought to user, man-machine interaction is low.
The content of the invention
In consideration of it, it is necessary to provide a kind of interface switching method and device, with by showing that the animation of fast and stable is realized The smooth switching at interface.
The embodiment of the invention discloses a kind of interface switching method, comprise the following steps:
Reception interface switching command, interface corresponding to interface is drawn after obtaining the pointed switching of the changing interface instruction Data, while call the animation curve pre-set;
According to the animation curve of calling, the animation to interface after the switching by switching front interface is shown;
Whether detecting has generated interface after the switching according to the interface drawing data of acquisition;
Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, when obtaining current Between, according to the animation curve and current time, obtain the display location of picture frame and display corresponding to the current time;
Interface after the switching has been generated according to the interface drawing data of acquisition if detecting, has shown the switching Interface afterwards.
The embodiment of the invention also discloses a kind of changing interface device, including:
Data acquisition module, for reception interface switching command, after obtaining the pointed switching of the changing interface instruction Interface drawing data corresponding to interface, while call the animation curve pre-set;
Animation display module, for the animation curve according to calling, show by after switching front interface to the switching The animation at interface;
Interface detecting module, for detecting according to whether the interface drawing data of acquisition has generated boundary after the switching Face;
Interface display module, if the interface drawing data for detecting according to acquisition has generated boundary after the switching Face, then show interface after the switching;
The animation display module is additionally operable to, if detecting according to not yet generating the interface drawing data of acquisition Interface after switching, then obtain current time, according to the animation curve and current time, obtains and schemes corresponding to the current time Display location and display as frame.
Reception interface switching command of the embodiment of the present invention, obtain interface pair after the pointed switching of the changing interface instruction The interface drawing data answered, while call the animation curve pre-set;According to the animation curve of calling, show by switching Animation of the front interface to interface after the switching;Whether detecting has generated the switching according to the interface drawing data of acquisition Interface afterwards;Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, when obtaining current Between, according to the animation curve and current time, obtain the display location of picture frame and display corresponding to the current time;If Detect and interface after the switching has been generated according to the interface drawing data of acquisition, then show interface after the switching;Tool There is the beneficial effect of the animation in quick smoothly display interface handoff procedure, improve man-machine interaction.
Brief description of the drawings
Fig. 1 is interface switching method first embodiment schematic flow sheet of the present invention;
Fig. 2 is the embodiment view of animation curve one pre-set in interface switching method of the present invention;
Fig. 3 is interface switching method second embodiment schematic flow sheet of the present invention;
Fig. 4 is changing interface device first embodiment high-level schematic functional block diagram of the present invention;
Fig. 5 is changing interface device second embodiment high-level schematic functional block diagram of the present invention.
Realization, functional characteristics and the advantage of purpose of the embodiment of the present invention will be done furtherly referring to the drawings in conjunction with the embodiments It is bright.
Embodiment
Technical scheme is further illustrated below in conjunction with Figure of description and specific embodiment.It should be appreciated that this The specific embodiment of place description is not intended to limit the present invention only to explain the present invention.
Fig. 1 is interface switching method first embodiment schematic flow sheet of the present invention;As shown in figure 1, changing interface of the present invention Method comprises the following steps:
Step S01, reception interface switching command, obtain after the pointed switching of changing interface instruction corresponding to interface Interface drawing data, while call the animation curve pre-set;
When terminal receives the changing interface instruction of user side triggering, the changing interface instruction is responded, obtains the interface Interface drawing data corresponding to interface after switching pointed by switching command;Meanwhile terminal calls the animation curve pre-set; In this course, terminal can show that the image pre-set, or terminal can still show switching front interface;Certainly, Terminal can also show interface during no view data;But terminal retains and shows that switching front interface brings the visual experience of user Can be better.
Due to the speed of service for CPU corresponding to different terminals, the speed for the animation curve that terminal is called also can be Difference, but under normal circumstances, terminal calls the speed of default animation curve to be typically above the reaction speed of human eye, therefore, Receive changing interface in terminal and instruct to terminal and show called animation curve during this, it is specific shown by terminal Content does not limit.
Step S02, according to the animation curve of calling, show by switching front interface to after the switching interface it is dynamic Draw;
After terminal calls the animation curve pre-set, according to the animation curve of calling, show by switching front interface Animation corresponding to interface after to switching.Fig. 2 is the embodiment shape of animation curve one pre-set in interface switching method of the present invention State schematic diagram, terminal can be according to the animation curves shown in Fig. 2, image corresponding to display.
For example in a specific application scenarios, user clicks on " default " this display control on mobile phone desktop, Wish to switch into this interface of default by mobile phone desktop;The above-mentioned changing interface that user's triggering is then received in mobile phone refers to When making, mobile phone obtains interface after the pointed switching of changing interface instruction such as the system in the present embodiment concrete application scene is set Interface drawing data corresponding to this fixed interface;While interface drawing data corresponding to interface after mobile phone obtains switching, hand Machine calls switches to the animation curve that system sets interface to pre-set during this by mobile phone desktop, and shows.
Step S03, whether detecting has generated interface after the switching according to the interface drawing data of acquisition;If so, Then perform step S04;If it is not, then perform step S05;
Step S04, current time is obtained, according to the animation curve and current time, it is corresponding to obtain the current time Picture frame display location and display;
Step S05, interface after the display switching.
Terminal obtains the interface drawing data corresponding to interface after switching while the animation curve that display has been called, And according to the interface drawing data got, draw interface after switching.Terminal display called animation curve while, The drawing at interface after whether continuous detecting has completed switching according to the interface drawing data of acquisition.
Detected in terminal and interface after the switching has been generated according to the interface drawing data of acquisition, then terminal pulls Interface after the switching of generation, the animation shown by animation curve that basis is pre-set switch to interface after the switching, and Show interface after the switching.
If terminal detects not yet generates interface after the switching according to the interface drawing data of acquisition, terminal obtains Current time is taken, according to the animation curve of calling and the current time obtained, when corresponding to current in terminal acquisition animation curve Between picture frame display location and continue show animation.If as shown in Fig. 2 on this time point of Tx, terminal detects root Not yet completed according to the work at interface after the interface drawing data generation switching of acquisition, then terminal is bent according to the animation of calling Line, the position Sx corresponding to the picture frame of animation curve corresponding to this time point of Tx is searched, it is corresponding to obtain this time point of Sx Picture frame coordinate(Tx, Sx), according to the coordinate of the picture frame of acquisition, continue to show corresponding picture frame;Or terminal root According to the Tx of acquisition value, position and the functional relation of time value with reference to corresponding to the animation curve, calculate obtain Tx this Position corresponding to the picture frame at one time point.
In the present embodiment, terminal obtain current time can according to the clock frequency and count value of terminal inner timer come Determine current time;Such as from sometime point start counting up, when reaching current point in time, obtain since counting to Up to the total count value of current time;Using obtained total count value divided by the clock frequency of timer, that is, obtain current time.
In a preferred embodiment, in the animation curve shown in Fig. 2, position y corresponding to picture frame and time x relation Meet following relational expression:
y=Vmax*x^n/(k^n+x^n);
Wherein, the Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve;Above-mentioned parameter Vmax, k and n value can be adjusted according to the actual requirements;Such as the switching front interface shown according to terminal and interface Interface after switching pointed by switching command, and with reference to terminal pull corresponding to switch after interface time span it is above-mentioned to set The different values of parameter;Or the specific of above-mentioned parameter is set to take according to the different type at interface shown before and after switching Value;Or according to pulling interface drawing data and set according to the duration at interface after the interface drawing data generation switching of acquisition Put specific value of above-mentioned parameter etc.;The present embodiment is not limited the concrete foundation of above-mentioned parameter value and specific value.
In a preferred embodiment, for the ease of calling, it can directly set above-mentioned parameter Vmax, k and n to correspond to and cut Change the different type at forward/backward operation interface configure above-mentioned parameter respectively corresponding to specific span;Meanwhile before establishing switching The mapping relations of the type of operation interface and above-mentioned each group parameter value scope afterwards.Terminal receive changing interface instruction when, Type corresponding to interface and the current switching front interface not yet switched after pointed switching can be instructed according to changing interface Type, call the value of the above-mentioned each parameter mapped with interface type before and after above-mentioned switching.
For example in specific application scenarios, by taking mobile phone as an example, system is switched to by mobile phone desktop this operation interface and set Operation interface corresponding to fixed, due to being the local interface drawing data corresponding to interface after directly pulling switching of mobile phone, therefore Can be shorter the time required to this process, then terminal can utilize the type for interface before and after switching to call above-mentioned parameter corresponding Value.Again for example, the UC browsers as corresponding to mobile phone desktop this operation interface switches to UC browsers this display controls The operation interface of homepage, because UC browsers are application program, UC browsers homepage is application program operation interface, is limited to net The reasons such as network speed, it is generally the case that the time pulled corresponding to UC browser homepages needed for the drawing data of interface can be than pulling The time of terminal local system data will be grown, and therefore, terminal can be utilized for pulling interface drawing data simultaneously during switching interface The duration at interface calls value corresponding to above-mentioned parameter after generation switching.
Reception interface switching command of the embodiment of the present invention, obtain interface pair after the pointed switching of the changing interface instruction The interface drawing data answered, while call the animation curve pre-set;According to the animation curve of calling, show by switching Animation of the front interface to interface after the switching;Whether detecting has generated the switching according to the interface drawing data of acquisition Interface afterwards;Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, when obtaining current Between, according to the animation curve and current time, obtain the display location of picture frame and display corresponding to the current time;If Detect and interface after the switching has been generated according to the interface drawing data of acquisition, then show interface after the switching;Tool There is the beneficial effect of the animation in quick smoothly display interface handoff procedure, improve man-machine interaction;Further, Because terminal can call corresponding animation curve according to the front and rear interface type of switching, improve changing interface efficiency and Terminal it is intelligent.
Fig. 3 is interface switching method second embodiment schematic flow sheet of the present invention;The present embodiment and embodiment described in Fig. 2 Difference is to add step S11, set the animation curve;Only step S11 is described for the present embodiment, the relevant present invention Other steps involved by interface switching method refer to the specific descriptions of related embodiment, will not be repeated here.
As shown in figure 3, interface switching method of the present invention in step S01, reception interface switching command, obtains the interface and cut Interface drawing data corresponding to interface after the pointed switching of instruction is changed, while calls the animation curve pre-set, also before Including:
Step S11, animation curve is set;
In the present embodiment, terminal sets animation curve, and the animation curve set is preserved in the local database. In one preferred embodiment, in order to improve the fluency of changing interface, terminal can be according to interface after switching front interface and switching Type different animation curves is set, and establish the type and the animation curve of setting at interface after switching front interface and switching Mapping relations.
In the present embodiment, terminal is established using the time as transverse axis, the coordinate system of the longitudinal axis is used as using positional distance;Based on foundation Above-mentioned coordinate system, animation curve corresponding to drafting.In the above-mentioned coordinate system of foundation, the starting when terminal setting time is 0 The position of picture frame sets the position of picture frame corresponding to preset time point as end frame coordinate as starting frame coordinate. In the present embodiment, terminal is also provided with two the i.e. first crucial frame coordinates of crucial frame coordinate and the second crucial frame coordinate, and sets The first display parameters, the first crucial frame coordinate to the second key frame of starting frame coordinate to the described first crucial frame coordinate are sat The display parameters of target second and the second crucial frame coordinate are to the 3rd display parameters for terminating frame coordinate;According to rising for setting Beginning frame coordinate, terminate frame coordinate, the first crucial frame coordinate and the second crucial frame coordinate, and the first display parameters, the second display Parameter and the 3rd display parameters, draw the animation curve;Wherein, the starting frame coordinate, the first crucial frame coordinate, second are closed Corresponding respective time point is arranged in order according to sequencing respectively for key frame coordinate and end frame coordinate;The first display ginseng Number, the second display parameters and the 3rd display parameters include:The image of image mapping mode, the direction of motion of image and composition image The movement locus of frame.
Further, in order to improve man-machine interaction, the sensory experience of user is enriched, can be set on animation curve Put display parameters corresponding to more than two crucial frame coordinate and each key frame.
Continuation is described by taking the animation curve shown in Fig. 2 as an example.In animation curve shown in Fig. 2, terminal set the One crucial frame coordinate S1(T1, s1)Corresponding point is S1 in the animation curve shown in Fig. 2, the second crucial frame coordinate(T2, s2) Corresponding point is S2 in the animation curve shown in Fig. 2, originates frame coordinate(0, s0)Corresponding in the animation curve shown in Fig. 2 Point is S0, and end frame coordinate is Sn(Tn, sn).First display parameters are stated based on setting, in the first duration T1 by corresponding to Picture frame is by starting frame coordinate(0, s0)It is converted into the described first crucial frame coordinate S1(T1, s1);It is crucial reaching described first During frame coordinate point S1, according to second display parameters of setting, by corresponding picture frame by described in the second duration T2 One crucial frame coordinate S1(T1, s1)It is converted into the described second crucial frame coordinate S2(T2, s2);And reach the second crucial frame coordinate During point S2, in the 3rd duration T3, using the 3rd display parameters of setting, picture frame corresponding to conversion, until the animation Display terminates.The starting frame coordinate S0(0, s0)To the first crucial frame coordinate S1(T1, s1)Between each self-corresponding position Distance | s1-s0 | it is L1, ratio V1=L1/T1 with the first duration T1;The first crucial frame coordinate S1(T1, s1)To second Crucial frame coordinate S2(T2, s2)The distance between each self-corresponding position | s2-s1 | be L2, with the second duration T2 ratio V2= L2/T2;And the second crucial frame coordinate S2(T2, s2)To terminating frame coordinate Sn(Tn, sn)Between each self-corresponding position Distance | sn-s2 | be L3, ratio V3=L3/T3 with the 3rd duration T3;Described V1, V2 and V3 magnitude relationship is:V1 and V3 Difference in the range of preset difference value, and V2 is then far longer than V1 or V3;It is to be understood that V1 is more or less the same with V3, and V2 is then It is far longer than V1 or V3.
Based on above description, according to main two parts of animation shown by the animation curve shown in Fig. 2:First portion Point, terminal shows the mode of animation to enter at a slow speed, and as shown in Figure 2 by coordinate points S0 to S1, the animation that then terminal is shown is fast It is whole that more than 85% distance of speed completion shows that the time just consumes animation by coordinate points S1 to S2, but used in terminal as shown in Figure 2 38% the time required to individual display process, the animation that this part terminal is shown brings the quick visual experience of user.Terminal utilizes The display mode of the animation shown by animation curve shown in Fig. 2 is:Begin with unusual short time(Time t1 is animation The 7.6% of whole display time)Animation entrance at a slow speed, so have a buffering, animation will not seem lofty, to user's It is experienced as natural and tripping;The second part, is the stopping at a slow speed for the animation that terminal is shown, the animation for this part that terminal is shown The used time occupy animation entirely show the time required to process 62%, but animation change distance accounts for animation from change Point just can smoothly stop, the sensation to user is just very steady very much to changing the 15% of the whole distance of terminal.Due to whole animation Curve is all smooth, so the animation that terminal is shown is overall very smooth, the Part I for the animation that terminal is shown, which embodies, to be set out Draw the characteristics of quick, Part II embodies the characteristics of animation is stable.So in application scenarios handoff procedure, what terminal was shown Animation to user feel be changing interface it is very fast, without waiting for sense, while and can is stably switched to second field very much Scape, along with whole animation curve is smooth, therefore, the display interface of whole animation is all to flow naturally very much when terminal shows animation Smooth.
The embodiment of the present invention sets animation curve when being changing interface animation is quick, display stably provides premise bar Part;Further, terminal can according to before and after switching interface different type set corresponding to animation curve, further increase Changing interface efficiency, make changing interface more smooth.
Fig. 4 is changing interface device first embodiment high-level schematic functional block diagram of the present invention;As shown in figure 4, interface of the present invention Switching device includes:Data acquisition module 01, animation display module 02, interface detecting module 03 and interface display module 04.
Data acquisition module 01, for reception interface switching command, obtain the pointed switching of the changing interface instruction Interface drawing data corresponding to interface afterwards, while call the animation curve pre-set;
When data acquisition module 01 receives the changing interface instruction of user side triggering, the changing interface instruction is responded, Obtain the changing interface and instruct interface drawing data corresponding to interface after pointed switching;Meanwhile data acquisition module 01 is adjusted With the animation curve pre-set;In this course, terminal can show the image pre-set, or terminal can be still Display switching front interface;Certainly, interface when terminal can also show no view data;But terminal retains and shows switching prezone The visual experience that face brings user can be better.
Due to the speed for the animation curve that the speed of service for CPU corresponding to different terminals, data acquisition module 01 are called Degree would also vary from, but under normal circumstances, data acquisition module 01 calls the speed of default animation curve to be typically above The reaction speed of human eye, therefore, receive changing interface in data acquisition module 01 and instruct to the display of animation display module 02 institute During this, the particular content shown by terminal does not limit the animation curve of calling.
Animation display module 02, for the animation curve according to calling, show by switching front interface to the switching The animation at interface afterwards;
After data acquisition module 01 calls the animation curve pre-set, animation display module 02 is according to the described dynamic of calling Trace, show the animation as corresponding to switching front interface to interface after switching.Animation display module 02 can be according to Fig. 2 Animation curve, image corresponding to display.
For example in a specific application scenarios, user clicks on " default " this display control on mobile phone desktop, Wish to switch into this interface of default by mobile phone desktop;Then the above-mentioned of user's triggering is received in data acquisition module 01 When changing interface instructs, interface such as the present embodiment has after data acquisition module 01 obtains the pointed switching of changing interface instruction Interface drawing data corresponding to this interface of default in body application scenarios;The boundary after data acquisition module 01 obtains switching Corresponding to face while the drawing data of interface, data acquisition module 01 call by mobile phone desktop switch to system set interface this During the animation curve that pre-sets, and the animation curve called by animation display module 02 according to data acquisition module 01 come The animation that display data acquisition module 01 calls.
Interface detecting module 03, after whether having generated the switching according to the interface drawing data of acquisition for detecting Interface;
Interface display module 04, if after having generated the switching for the interface drawing data detected according to acquisition Interface, then show interface after the switching;
The animation display module 02 is additionally operable to, and institute is not yet generated according to the interface drawing data of acquisition if detecting Interface after switching is stated, then obtains current time, according to the animation curve and current time, obtains corresponding to the current time The display location of picture frame and display.
For animation display module 02 while the animation curve that display has been called, data acquisition module 01 obtains boundary after switching Interface drawing data corresponding to face, and according to the interface drawing data got, draw interface after switching.Data acquisition module 01 while the animation curve that display has been called, interface drawing data of the interface detecting module 03 in continuous detecting according to acquisition Whether the drawing at switch after interface has been completed.
Detected in interface detecting module 03 and interface after the switching generated according to the interface drawing data of acquisition, Then interface display module 04 pulls interface after the switching of generation, and the animation according to the animation curve pre-set is switched Interface after to the switching, and show interface after the switching.
If interface detecting module 03 detects not yet generates boundary after the switching according to the interface drawing data of acquisition Face, then animation display module 02 obtain current time, according to the animation curve of calling and obtain current time, animation show mould Block 02 obtains the display location for the picture frame for corresponding to current time in animation curve and continues to show animation.If as shown in Fig. 2 On this time point of Tx, interface detecting module 03 detects interface after the interface drawing data generation switching according to acquisition Work not yet complete, then the animation curve that animation display module 02 calls according to data acquisition module 01, search Tx this when Between point corresponding to animation curve picture frame corresponding to position Sx, obtain the coordinate of picture frame corresponding to this time point of Sx (Tx, Sx), animation display module 02 continues to show corresponding picture frame according to the coordinate of the picture frame of acquisition;Or animation shows Show value of the module 02 according to the Tx of acquisition, position and the functional relation of time value, meter with reference to corresponding to the animation curve Calculate and obtain position corresponding to the picture frame at this time point of Tx.
In the present embodiment, animation display module 02 obtains current time can be according to the clock frequency of terminal inner timer Current time is determined with count value;For example started counting up from sometime point, when reaching current point in time, animation is shown Since module 02 is obtained counting to the total count value for reaching current time;Animation display module 02 utilizes obtained total count value Divided by the clock frequency of timer, that is, obtain current time.
In a preferred embodiment, in the animation curve shown in Fig. 2, position y corresponding to picture frame and time x relation Meet following relational expression:
y=Vmax*x^n/(k^n+x^n);
Wherein, the Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve;Above-mentioned parameter Vmax, k and n value can be adjusted according to the actual requirements;Such as the switching front interface shown according to terminal and interface Interface after switching pointed by switching command, and with reference to terminal pull corresponding to switch after interface time span it is above-mentioned to set The different values of parameter;Or the specific of above-mentioned parameter is set to take according to the different type at interface shown before and after switching Value;Or according to pulling interface drawing data and set according to the duration at interface after the interface drawing data generation switching of acquisition Put specific value of above-mentioned parameter etc.;The present embodiment is not limited the concrete foundation of above-mentioned parameter value and specific value.
In a preferred embodiment, for the ease of calling, it can directly set above-mentioned parameter Vmax, k and n to correspond to and cut Change the different type at forward/backward operation interface configure above-mentioned parameter respectively corresponding to specific span;Meanwhile before establishing switching The mapping relations of the type of operation interface and above-mentioned each group parameter value scope afterwards.Terminal receive changing interface instruction when, Type corresponding to interface and the current switching front interface not yet switched after pointed switching can be instructed according to changing interface Type, call the value of the above-mentioned each parameter mapped with interface type before and after above-mentioned switching.
For example in specific application scenarios, by taking mobile phone as an example, system is switched to by mobile phone desktop this operation interface and set Operation interface corresponding to fixed, due to being the local interface drawing data corresponding to interface after directly pulling switching of mobile phone, therefore Can be shorter the time required to this process, then terminal can utilize the type for interface before and after switching to call above-mentioned parameter corresponding Value.Again for example, the UC browsers as corresponding to mobile phone desktop this operation interface switches to UC browsers this display controls The operation interface of homepage, because UC browsers are application program, UC browsers homepage is application program operation interface, is limited to net The reasons such as network speed, it is generally the case that the time pulled corresponding to UC browser homepages needed for the drawing data of interface can be than pulling The time of terminal local system data will be grown, and therefore, terminal can be utilized for pulling interface drawing data simultaneously during switching interface The duration at interface calls value corresponding to above-mentioned parameter after generation switching.
Reception interface switching command of the embodiment of the present invention, obtain interface pair after the pointed switching of the changing interface instruction The interface drawing data answered, while call the animation curve pre-set;According to the animation curve of calling, show by switching Animation of the front interface to interface after the switching;Whether detecting has generated the switching according to the interface drawing data of acquisition Interface afterwards;Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, when obtaining current Between, according to the animation curve and current time, obtain the display location of picture frame and display corresponding to the current time;If Detect and interface after the switching has been generated according to the interface drawing data of acquisition, then show interface after the switching;Tool There is the beneficial effect of the animation in quick smoothly display interface handoff procedure, improve man-machine interaction;Further, Because terminal can call corresponding animation curve according to the front and rear interface type of switching, improve changing interface efficiency and Terminal it is intelligent.
Fig. 5 is changing interface device second embodiment high-level schematic functional block diagram of the present invention;The present embodiment and implementation described in Fig. 4 The difference of example is to add cartoon setting module 05;Only cartoon setting module 05 is described for the present embodiment, the relevant present invention Other modules involved by changing interface device refer to the specific descriptions of related embodiment, will not be repeated here.
As shown in figure 5, changing interface device of the present invention also includes:
Cartoon setting module 05, for setting the animation curve.
In the present embodiment, cartoon setting module 05 sets animation curve, and the animation curve set is stored in into local In database.In a preferred embodiment, in order to improve the fluency of changing interface, cartoon setting module 05 can be according to cutting The type for changing interface after front interface and switching sets different animation curves, and establishes interface after switching front interface and switching Type and the mapping relations of the animation curve set.
In the present embodiment, cartoon setting module 05 is established using the time as transverse axis, the coordinate of the longitudinal axis is used as using positional distance System;Above-mentioned coordinate system based on foundation, cartoon setting module 05 draw corresponding animation curve.In the above-mentioned coordinate system of foundation In, the position of the start image frame when setting time of cartoon setting module 05 is 0 sets preset time as starting frame coordinate The position of picture frame corresponding to point is as end frame coordinate.In the present embodiment, cartoon setting module 05 is also provided with two keys Frame coordinate is the first crucial frame coordinate and the second crucial frame coordinate, and sets starting frame coordinate to the described first crucial frame coordinate First display parameters, the second display parameters of the first crucial frame coordinate to the second crucial frame coordinate and second key Frame coordinate is to the 3rd display parameters for terminating frame coordinate;According to the starting frame coordinate of setting, terminate frame coordinate, the first key frame seat Mark and the second crucial frame coordinate, and the first display parameters, the second display parameters and the 3rd display parameters, cartoon setting module 05 Draw the animation curve;Wherein, starting frame coordinate, the first crucial frame coordinate, the second crucial frame coordinate and the end frame are sat Corresponding respective time point is arranged in order mark according to sequencing respectively;First display parameters, the second display parameters and 3rd display parameters include:The movement locus of the picture frame of image mapping mode, the direction of motion of image and composition image.
Further, in order to improve man-machine interaction, the sensory experience of user is enriched, cartoon setting module 05 can be with Display parameters corresponding to more than two crucial frame coordinate and each key frame are set on animation curve.
Continuation is described by taking the animation curve shown in Fig. 2 as an example.In animation curve shown in Fig. 2, cartoon setting module 05 the first crucial frame coordinate set(T1, s1)Corresponding point is S1 in the animation curve shown in Fig. 2, the second crucial frame coordinate (T2, s2)Corresponding point is S2 in the animation curve shown in Fig. 2, originates frame coordinate(0, s0)In the animation curve shown in Fig. 2 In corresponding point be S0, terminate frame coordinate be(Tn, sn).The first display parameters are stated based on what cartoon setting module 05 was set, are moved Picture display module 02 is in the first duration T1 by corresponding picture frame by starting frame coordinate(0, s0)It is crucial to be converted into described first Frame coordinate(T1, s1);When reaching the first key frame coordinate points S1, according to described the second of the setting of cartoon setting module 05 Display parameters, animation display module 02 is in the second duration T2 by corresponding picture frame by the described first crucial frame coordinate(T1, s1)It is converted into the described second crucial frame coordinate(T2, s2);And when reaching the second key frame coordinate points S2, in the 3rd duration T3 The 3rd display parameters that are interior, being set using cartoon setting module 05, animation display module 02 convert corresponding picture frame, directly Show and terminate to the animation.The starting frame coordinate(0, s0)To the first crucial frame coordinate(T1, s1)Each self-corresponding position it Between distance | s1-s0 | be L1, ratio V1=L1/T1 with the first duration T1;The first crucial frame coordinate(T1, s1)To Two crucial frame coordinates(T2, s2)The distance between each self-corresponding position | s2-s1 | be L2, with the second duration T2 ratio V2= L2/T2;And the second crucial frame coordinate(T2, s2)To terminating frame coordinate(Tn, sn)Between each self-corresponding position away from From | sn-s2 | it is L3, ratio V3=L3/T3 with the 3rd duration T3;Described V1, V2 and V3 magnitude relationship is:V1 and V3 difference Value is in the range of preset difference value, and V2 is then far longer than V1 or V3;It is to be understood that V1 is more or less the same with V3, and V2 is then much More than V1 or V3.
Based on above description, according to main two parts of animation shown by the animation curve shown in Fig. 2:First portion Point, the animation mode that animation display module 02 is shown is enters at a slow speed, and as shown in Figure 2 by coordinate points S0 to S1, then animation shows Show that the animation that module 02 is shown is rapidly completed more than 85% distance as shown in Figure 2 by coordinate points S1 to S2, but animation display module 02 The used display time just consume animation entirely show the time required to process 38%, this part animation display module 02 The animation of display brings the quick visual experience of user.Animation display module 02 is using shown by the animation curve shown in Fig. 2 The display mode of animation is:Begin with unusual short time(Time t1 is that animation entirely shows the 7.6% of the time)Animation Entrance at a slow speed, so have a buffering, animation will not seem lofty, to user be experienced as it is natural and tripping;The second part, It is the stopping at a slow speed for the animation that animation display module 02 is shown, the animation for this part that animation display module 02 is shown is used Time occupy animation entirely show the time required to process 62%, but animation change distance accounts for animation from change starting point to change Change the 15% of the whole distance of terminal, just can smoothly stop very much, the sensation to user is just very steady.Due to whole animation curve all It is smooth, so the animation that animation display module 02 is shown is overall very smooth, the of the animation that animation display module 02 is shown A part embodies the characteristics of animation is quick, and Part II embodies the characteristics of animation is stable.So switched in application scenarios Cheng Zhong, the animation that animation display module 02 is shown to user feel be changing interface it is very fast, without waiting for sense, while again Second scenario can be stably switched to very much, along with whole animation curve is smooth, therefore, animation display module 02 shows animation When whole animation display interface be all very natural and tripping.
The embodiment of the present invention sets animation curve when being changing interface animation is quick, display stably provides premise bar Part;Further, terminal can according to before and after switching interface different type set corresponding to animation curve, further increase Changing interface efficiency, make changing interface more smooth.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence " including one ... ", it is not excluded that including Other identical element also be present in the process of the key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium (Such as ROM/RAM, magnetic disc, CD, the changing interface device described in Fig. 4, Fig. 5)In, the storage medium include some instructions to A so that station terminal equipment(Can be mobile phone, computer, server, the either network equipment or the interface described in Fig. 4, Fig. 5 Switching device)Deng)Perform the method described in each embodiment of the present invention.
The preferred embodiments of the present invention are the foregoing is only, not thereby limit its scope of the claims, it is every to utilize the present invention The equivalent structure or equivalent flow conversion that specification and accompanying drawing content are made, directly or indirectly it is used in other related technology necks Domain, it is included within the scope of the present invention.

Claims (14)

1. a kind of interface switching method, it is characterised in that comprise the following steps:
Reception interface switching command, number is drawn at interface corresponding to interface after obtaining the pointed switching of the changing interface instruction According to, while call the animation curve pre-set;
According to the animation curve of calling, the animation to interface after the switching by switching front interface is shown;
Whether detecting has generated interface after the switching according to the interface drawing data of acquisition;
Interface after the switching is not yet generated according to the interface drawing data of acquisition if detecting, obtains current time, According to the animation curve and current time, the display location of picture frame and display corresponding to the current time are obtained;
Interface after the switching has been generated according to the interface drawing data of acquisition if detecting, has shown boundary after the switching Face;
The animation curve according to calling, show is included by switching front interface to the animation at interface after the switching:
The animation is shown in a manner of entering at a slow speed, is then rapidly completed in the animation more than 85% distance, finally with The mode stopped at a slow speed shows the animation.
2. the method as described in claim 1, it is characterised in that also include:
The animation curve is set.
3. method as claimed in claim 2, it is characterised in that described to set the animation curve to include:
Establish using the time as transverse axis, the coordinate system of the longitudinal axis is used as using positional distance;
In the coordinate system of foundation, the position of the start image frame when setting time is 0 is stopped as starting frame coordinate, setting Only show the position of picture frame corresponding to the time point of the animation as end frame coordinate;Meanwhile the first key frame is set to sit Mark and the second crucial frame coordinate, and set starting frame coordinate to the described first crucial frame coordinate the first display parameters, described the Second display parameters of one crucial frame coordinate to the second crucial frame coordinate and the second crucial frame coordinate are to terminating frame coordinate The 3rd display parameters;
According to the starting frame coordinate of setting, terminate frame coordinate, the first crucial frame coordinate and the second crucial frame coordinate, and first shows Show parameter, the second display parameters and the 3rd display parameters, draw the animation curve;
Wherein, it is each corresponding to the starting frame coordinate, the first crucial frame coordinate, the second crucial frame coordinate and end frame coordinate difference From time point be arranged in order according to sequencing;First display parameters, the second display parameters and the 3rd display parameters bag Include:The movement locus of the picture frame of image mapping mode, the direction of motion of image and composition image.
4. method as claimed in claim 3, it is characterised in that the animation curve according to calling, show by switching Front interface to interface after the switching animation, including:
According to first display parameters of setting, by corresponding picture frame by start frame coordinate transform to institute in the first duration State the first crucial frame coordinate;
, will be corresponding in the second duration according to second display parameters of setting when reaching the first crucial frame coordinate Picture frame by the first key frame coordinate transform to the described second crucial frame coordinate;And reach the second crucial frame coordinate When, by corresponding picture frame by the second key frame coordinate transform to the end frame coordinate in the 3rd duration;
The starting frame coordinate is to respective the distance between the corresponding position L1 of the first crucial frame coordinate, the ratio with the first duration T1 Value V1=L1/T1;The first crucial frame coordinate is to respective the distance between the corresponding position L2 of the second crucial frame coordinate, with Two duration T2 ratio V2=L2/T2;And the second crucial frame coordinate is to terminating frame coordinate each between corresponding position Distance L3, the ratio V3=L3/T3 with the 3rd duration T3;Described V1, V2 and V3 magnitude relationship is:V1 and V3 difference exists In the range of preset difference value, and V2 is then far longer than V1 or V3.
5. the method as described in claim 1, it is characterised in that the position y and time x of picture frame pass in the animation curve It is that formula is:
Y=Vmax*x^n/ (k^n+x^n);
Wherein, the Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve.
6. method as claimed in claim 5, it is characterised in that described parameter Vmax, k and n span are by the switching The type at interface determines after front interface and switching.
7. the method as described in claim any one of 1-6, it is characterised in that the acquisition current time includes:
Current time is determined by obtaining clock frequency and the count value of terminal inner timer.
A kind of 8. changing interface device, it is characterised in that including:
Data acquisition module, for reception interface switching command, obtain interface after the pointed switching of the changing interface instruction Corresponding interface drawing data, while call the animation curve pre-set;
Animation display module, for the animation curve according to calling, show by switching front interface to interface after the switching Animation;
Interface detecting module, for detecting according to whether the interface drawing data of acquisition has generated interface after the switching;
Interface display module, if the interface drawing data for detecting according to acquisition has generated interface after the switching, Then show interface after the switching;
The animation display module is additionally operable to, and the switching is not yet generated according to the interface drawing data of acquisition if detecting Interface afterwards, then current time is obtained, according to the animation curve and current time, obtain picture frame corresponding to the current time Display location and display;
The animation display module, is specifically used for:The animation is shown in a manner of entering at a slow speed, is then rapidly completed described dynamic More than 85% distance in picture, finally shows the animation in a manner of stopping at a slow speed.
9. device as claimed in claim 8, it is characterised in that also include:
Cartoon setting module, for setting the animation curve.
10. device as claimed in claim 9, it is characterised in that the cartoon setting module is used for:
Establish using the time as transverse axis, the coordinate system of the longitudinal axis is used as using positional distance;
In the coordinate system of foundation, the position of the start image frame when setting time is 0 is stopped as starting frame coordinate, setting Only show the position of picture frame corresponding to the time point of the animation as end frame coordinate;Meanwhile the first key frame is set to sit Mark and the second crucial frame coordinate, and set starting frame coordinate to the described first crucial frame coordinate the first display parameters, described the Second display parameters of one crucial frame coordinate to the second crucial frame coordinate and the second crucial frame coordinate are to terminating frame coordinate The 3rd display parameters;
According to the starting frame coordinate of setting, terminate frame coordinate, the first crucial frame coordinate and the second crucial frame coordinate, and first shows Show parameter, the second display parameters and the 3rd display parameters, draw the animation curve;
Wherein, it is each corresponding to the starting frame coordinate, the first crucial frame coordinate, the second crucial frame coordinate and end frame coordinate difference From time point be arranged in order according to sequencing;First display parameters, the second display parameters and the 3rd display parameters bag Include:The movement locus of the picture frame of image mapping mode, the direction of motion of image and composition image.
11. device as claimed in claim 10, it is characterised in that the animation display module is additionally operable to:
According to first display parameters of setting, by corresponding picture frame by start frame coordinate transform to institute in the first duration State the first crucial frame coordinate;
, will be corresponding in the second duration according to second display parameters of setting when reaching the first crucial frame coordinate Picture frame by the first key frame coordinate transform to the described second crucial frame coordinate;And reach the second crucial frame coordinate When, by corresponding picture frame by the second key frame coordinate transform to the end frame coordinate in the 3rd duration;
The starting frame coordinate is to respective the distance between the corresponding position L1 of the first crucial frame coordinate, the ratio with the first duration T1 Value V1=L1/T1;The first crucial frame coordinate is to respective the distance between the corresponding position L2 of the second crucial frame coordinate, with Two duration T2 ratio V2=L2/T2;And the second crucial frame coordinate is to terminating frame coordinate each between corresponding position Distance L3, the ratio V3=L3/T3 with the 3rd duration T3;Described V1, V2 and V3 magnitude relationship is:V1 and V3 difference exists In the range of preset difference value, and V2 is then far longer than V1 or V3.
12. device as claimed in claim 8, it is characterised in that the position y and time x of picture frame in the animation curve Relational expression is:
Y=Vmax*x^n/ (k^n+x^n);
Wherein, the Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve.
13. device as claimed in claim 12, it is characterised in that described parameter Vmax, k and n span are cut by described The type at interface determines after changing front interface and switching.
14. the device as described in claim any one of 8-13, it is characterised in that the animation display module is additionally operable to:
Current time is determined by obtaining clock frequency and the count value of terminal inner timer.
CN201310557208.9A 2013-11-08 2013-11-08 interface switching method and device Active CN104639725B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310557208.9A CN104639725B (en) 2013-11-08 2013-11-08 interface switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310557208.9A CN104639725B (en) 2013-11-08 2013-11-08 interface switching method and device

Publications (2)

Publication Number Publication Date
CN104639725A CN104639725A (en) 2015-05-20
CN104639725B true CN104639725B (en) 2017-12-15

Family

ID=53218019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310557208.9A Active CN104639725B (en) 2013-11-08 2013-11-08 interface switching method and device

Country Status (1)

Country Link
CN (1) CN104639725B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160697B (en) * 2015-08-28 2018-08-31 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN105354051B (en) * 2015-09-30 2019-06-21 北京金山安全软件有限公司 Method and device for presenting information flow card and electronic equipment
CN105825537B (en) * 2015-11-30 2017-10-13 维沃移动通信有限公司 A kind of method and terminal for generating animation curve
CN106231398A (en) * 2016-07-28 2016-12-14 深圳Tcl数字技术有限公司 The display packing of animated menu and device
CN108153456B (en) * 2016-12-05 2021-08-20 珠海金山办公软件有限公司 Interface switching method and device
CN108282598B (en) * 2017-05-19 2020-12-15 广州华多网络科技有限公司 Software broadcasting guide system and method
CN111488816A (en) * 2017-09-12 2020-08-04 Oppo广东移动通信有限公司 Method for previewing face information and related product
CN107704300A (en) * 2017-09-25 2018-02-16 联想(北京)有限公司 Information processing method and electronic equipment
WO2020102956A1 (en) * 2018-11-20 2020-05-28 深圳市欢太科技有限公司 Interface display method and apparatus, and computer storable medium and electronic device
CN110659082A (en) * 2019-09-11 2020-01-07 Oppo(重庆)智能科技有限公司 Application program interface display method and device, terminal and storage medium
CN110812843B (en) * 2019-10-30 2023-09-15 腾讯科技(深圳)有限公司 Interactive method and device based on virtual image and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270352A (en) * 2010-06-02 2011-12-07 腾讯科技(深圳)有限公司 Method and apparatus for playing animation
CN102541519A (en) * 2010-12-15 2012-07-04 沈阳新邮通信设备有限公司 Method for processing screen switchover special effect information customized by user
CN102541491A (en) * 2010-12-14 2012-07-04 北京新媒传信科技有限公司 Method for switching interfaces of mobile terminal and system
CN102541515A (en) * 2010-12-08 2012-07-04 腾讯科技(深圳)有限公司 Method and device for realizing special screen switching effect
CN103176689A (en) * 2011-12-26 2013-06-26 腾讯科技(深圳)有限公司 Interface switching method and interface switching system
CN103176684A (en) * 2011-12-22 2013-06-26 中兴通讯股份有限公司 Method and device for switching multi-zone interface

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102270352A (en) * 2010-06-02 2011-12-07 腾讯科技(深圳)有限公司 Method and apparatus for playing animation
CN102541515A (en) * 2010-12-08 2012-07-04 腾讯科技(深圳)有限公司 Method and device for realizing special screen switching effect
CN102541491A (en) * 2010-12-14 2012-07-04 北京新媒传信科技有限公司 Method for switching interfaces of mobile terminal and system
CN102541519A (en) * 2010-12-15 2012-07-04 沈阳新邮通信设备有限公司 Method for processing screen switchover special effect information customized by user
CN103176684A (en) * 2011-12-22 2013-06-26 中兴通讯股份有限公司 Method and device for switching multi-zone interface
CN103176689A (en) * 2011-12-26 2013-06-26 腾讯科技(深圳)有限公司 Interface switching method and interface switching system

Also Published As

Publication number Publication date
CN104639725A (en) 2015-05-20

Similar Documents

Publication Publication Date Title
CN104639725B (en) interface switching method and device
CN105855719B (en) A kind of laser marking machine marking method and device
CN102270081B (en) A kind of method and device adjusting size of list element
CN103902165B (en) The method and apparatus for realizing menu background
CN103677266B (en) Electronic equipment and display control method and system thereof
US20210398334A1 (en) Method for creating image editing model, and electronic device and storage medium thereof
CN105847785A (en) Image processing method, device and system
CN107808191A (en) The output intent and system of the multi-modal interaction of visual human
CN104503564B (en) Control method and device for picture refreshing of application program
CN104680421B (en) A kind of saleable vector graphics SVG display methods and device
CN106817349A (en) A kind of method and device for making communication interface produce animation effect in communication process
CN106462256A (en) A function recommendation method, system and robot based on positive wakeup
CN103377212B (en) The method of a kind of Voice command browser action, system and browser
CN104281399B (en) The system and method for correspondence target text are translated according to gesture
CN109151008A (en) A kind of human-computer dialogue flow control method and system of unaware
CN100505840C (en) Method and device for transmitting face synthesized video
CN105005441B (en) A kind of display methods and electronic equipment of instant video
CN103561156A (en) Method for awakening voice assistant through displacement
CN109729391A (en) A kind of sending method and system of multipath media stream
CN108038160B (en) Dynamic animation store method, dynamic animation call method and device
CN101655989A (en) 3D special-efficacy graphic user interface system and method of mobile phone
CN102263789A (en) Call patterning assisting system
CN106293485B (en) A kind of terminal control method and device based on touch track
CN101656782A (en) Planar special-effect graph user interface system of mobile phone and method
CN102495727A (en) Method for synthesizing icons in interface of intelligent handheld device system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant