CN104639725A - Interface switching method and device - Google Patents

Interface switching method and device Download PDF

Info

Publication number
CN104639725A
CN104639725A CN201310557208.9A CN201310557208A CN104639725A CN 104639725 A CN104639725 A CN 104639725A CN 201310557208 A CN201310557208 A CN 201310557208A CN 104639725 A CN104639725 A CN 104639725A
Authority
CN
China
Prior art keywords
interface
frame coordinate
animation
key frame
switching
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.)
Granted
Application number
CN201310557208.9A
Other languages
Chinese (zh)
Other versions
CN104639725B (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

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses an interface switching method and device. According to an embodiment, the method includes receiving an interface switching instruction, acquiring interface drawing data corresponding to the interface after the switching according to the interface switching instruction, and calling a preset animation curve; according to the called preset animation curve, displaying the animation from the interface before switching to the interface after switching; detecting whether the acquired interface drawing data generate the interface after switching or not; if not, acquiring the current time, and acquiring and displaying the display location of the image frame corresponding to the current time according to the animation curve and the current time; if yes, displaying the interface after switching. The method has the advantages that the animation of the interface switching process can be displayed rapidly and stably, and the man-machine interactivity is improved.

Description

Interface switching method and device
Technical field
The present invention relates to computer realm, also relate to interface display technology, particularly relate to a kind of interface switching method and device.
Background technology
At present, when changing interface, realized by animation by the interface of interface excessively after switching before switching; Animation curve reflects animation from initial state to done state in this process, along with the change of time, and the intensity of variation of object state; Conventional animation curve is that EaseIn(enters slowly) and EaseOut(go out slowly), the cut scene utilizing existing animation curve to obtain cannot embody animation feature fast, thus cause causing switching to feel slowly to user in handoff procedure, changing interface is not smooth; If shortening animation time, then can bring very lofty sensation to user, man-machine interaction is low.
Summary of the invention
Given this, be necessary to provide a kind of interface switching method and device, the smoothness realizing interface with the animation by showing fast and stable switches.
The embodiment of the invention discloses a kind of interface switching method, comprise the following steps:
Reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously;
According to the described animation curve called, show by switching the animation of front interface to described switching rear interface;
Whether the described interface drawing data detected according to obtaining has generated described switching rear interface;
If the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show;
If the described interface drawing data detected according to obtaining has generated described switching rear interface, then show described switching rear interface.
The embodiment of the invention also discloses a kind of changing interface device, comprising:
Data acquisition module, for reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously;
Animation display module, for according to the described animation curve called, shows by switching the animation of front interface to described switching rear interface;
Whether interface detecting module, generated described switching rear interface for the described interface drawing data detected according to obtaining;
Interface display module, if generated described switching rear interface for the described interface drawing data detected according to obtaining, has then shown described switching rear interface;
Described animation display module also for, if the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show.
Embodiment of the present invention reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously; According to the described animation curve called, show by switching the animation of front interface to described switching rear interface; Whether the described interface drawing data detected according to obtaining has generated described switching rear interface; If the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show; If the described interface drawing data detected according to obtaining has generated described switching rear interface, then show described switching rear interface; There is the beneficial effect of the animation in quick smoothly display interface handoff procedure, improve man-machine interaction.
Accompanying drawing explanation
Fig. 1 is interface switching method first embodiment schematic flow sheet of the present invention;
Fig. 2 is the animation curve one embodiment view 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.
The realization of embodiment of the present invention object, functional characteristics and advantage will in conjunction with the embodiments, are described further with reference to accompanying drawing.
Embodiment
Technical scheme of the present invention is further illustrated below in conjunction with Figure of description and specific embodiment.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
Fig. 1 is interface switching method first embodiment schematic flow sheet of the present invention; As shown in Figure 1, interface switching method of the present invention comprises the following steps:
Step S01, reception interface switching command, obtain the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, call the animation curve pre-set simultaneously;
When terminal receives the changing interface instruction triggered user side, respond described changing interface instruction, obtain the interface drawing data that this switching rear interface pointed by changing interface instruction is corresponding; Meanwhile, terminal calls the animation curve pre-set; In this course, terminal can show the image pre-set, or terminal can still show switching front interface; Certainly, terminal also can show without interface during view data; But terminal retain and show switch front interface bring the visual experience of user can be better.
Due to the speed of service for CPU corresponding to different terminals, the speed of the animation curve that terminal is called also can be different, but under normal circumstances, the speed that terminal calls default animation curve generally all exceedes the reaction speed of human eye, therefore, receive in this process of animation curve that changing interface instruction to terminal demonstration calls in terminal, the particular content shown by terminal does not limit.
The described animation curve that step S02, basis are called, shows by switching the animation of front interface to described switching rear interface;
After terminal calls the animation curve pre-set, according to the described animation curve called, show by switching front interface to switching animation corresponding to rear interface.Fig. 2 is the animation curve one embodiment view pre-set in interface switching method of the present invention, and terminal can animation curve according to Fig. 2, the image that display is corresponding.
Such as, in a concrete application scenarios, user clicks " default " this display control on mobile phone desktop, ites is desirable to be switched by mobile phone desktop to enter this interface of default; Then when mobile phone receives the above-mentioned changing interface instruction that user triggers, mobile phone obtains this switching rear interface pointed by changing interface instruction interface drawing data as corresponding in this interface of default in the present embodiment embody rule scene; While mobile phone obtains interface drawing data corresponding to switching rear interface, mobile phone calls and switches to by mobile phone desktop the animation curve pre-set in this process of Operation system setting interface, and shows.
Whether step S03, the described interface drawing data detected according to obtaining have generated described switching rear interface; If so, then step S04 is performed; If not, then step S05 is performed;
Step S04, acquisition current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show;
Step S05, show described switching rear interface.
Terminal, while the animation curve that display is modulated, obtains the interface drawing data switched corresponding to rear interface, and according to the interface drawing data got, draws and switch rear interface.Terminal, while the animation curve that display is modulated, is also constantly detecting whether completed according to the interface drawing data obtained the drawing switching rear interface.
The described interface drawing data detected according to obtaining in terminal has generated described switching rear interface, then terminal pulls the switching rear interface of generation, animation according to the animation curve pre-set is switched to described switching rear interface, and shows described switching rear interface.
If the described interface drawing data that terminal detects according to obtaining not yet generates described switching rear interface, then terminal obtains current time, according to the current time of the animation curve called and acquisition, terminal obtains the display position of the picture frame corresponding to current time in animation curve and continues display animation.As shown in Figure 2, if on this time point of Tx, terminal detects the work generating described switching rear interface according to the interface drawing data obtained and not yet completes, then terminal is according to the animation curve called, search the position Sx corresponding to picture frame of animation curve corresponding to this time point of Tx, obtain the coordinate (Tx, Sx) of picture frame corresponding to this time point of Sx, according to the coordinate of the picture frame obtained, continue the picture frame that display is corresponding; Or terminal is according to the value of the Tx obtained, and the functional relation of the position corresponding in conjunction with this animation curve and time value, calculates the position that the picture frame of this time point of acquisition Tx is corresponding.
In the present embodiment, terminal obtains current time can determine current time according to the clock frequency of terminal inner timer and count value; Such as, counting from sometime, when arriving current point in time, obtaining from counting to the total count value arriving current time; Utilize the total count value obtained divided by the clock frequency of timer, namely obtain current time.
In a preferred embodiment, in the animation curve shown in Fig. 2, the relation of the position y that picture frame is corresponding and time x meets following relational expression:
y=Vmax*x^n/(k^n+x^n);
Wherein, described Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve; The value of above-mentioned parameter Vmax, k and n can adjust according to the actual requirements; Such as, according to the switching rear interface pointed by the switching front interface of terminal demonstration and changing interface instruction, and pull the time span of corresponding switching rear interface to arrange the different values of above-mentioned parameter in conjunction with terminal; Or, according to the dissimilar concrete value arranging above-mentioned parameter at the interface switched shown by front and back; Or, according to pulling interface drawing data and generating according to the interface drawing data obtained the concrete value etc. that the duration switching rear interface arranges above-mentioned parameter; The present embodiment does not limit the concrete foundation of above-mentioned parameter value and concrete value.
In a preferred embodiment, for the ease of calling, above-mentioned parameter Vmax, k and n directly can be set and correspond to the dissimilar concrete span configuring above-mentioned parameter difference correspondence switching forward/backward operation interface; Meanwhile, the switching type at forward/backward operation interface and the mapping relations of above-mentioned each group of parameter value scope are set up.Terminal, just can the type of type corresponding to switching rear interface pointed by changing interface instruction and the current switching front interface not yet switched when receiving changing interface instruction, call with above-mentioned switching before and after the value of above-mentioned each parameter that maps of interface type.
Such as, in concrete application scenarios, for mobile phone, operation interface corresponding to default is switched to by this operation interface of mobile phone desktop, owing to being all that mobile phone this locality directly pulls and switches interface drawing data corresponding to rear interface, therefore this process required time can be shorter, then terminal can utilize the type for switching interface, front and back to call value corresponding to above-mentioned parameter.Again such as, the operation interface of UC browser homepage corresponding to this display control of UC browser is switched to by this operation interface of mobile phone desktop, because UC browser is application program, UC browser homepage is application program operation interface, be limited to the reasons such as network speed, under normal circumstances, pulling the time needed for the drawing data of interface corresponding to UC browser homepage can be longer than the time pulling terminal local system data, therefore, terminal can utilize and also generate the duration of switching rear interface to call value corresponding to above-mentioned parameter for pulling interface drawing data during interface switching.
Embodiment of the present invention reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously; According to the described animation curve called, show by switching the animation of front interface to described switching rear interface; Whether the described interface drawing data detected according to obtaining has generated described switching rear interface; If the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show; If the described interface drawing data detected according to obtaining has generated described switching rear interface, then show described switching rear interface; 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 interface type switching front and back, improve the efficiency of changing interface and the intelligent of terminal.
Fig. 3 is interface switching method second embodiment schematic flow sheet of the present invention; Described in the present embodiment and Fig. 2, the difference of embodiment adds step S11, arranges described animation curve; The present embodiment is only described step S11, and relevant other steps involved by interface switching method of the present invention please refer to the specific descriptions of related embodiment, do not repeat them here.
As shown in Figure 3, interface switching method of the present invention, in step S01, reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously, also comprise before:
Step S11, animation curve is set;
In the present embodiment, terminal arranges animation curve, and is preserved in the local database by the animation curve set.In a preferred embodiment, in order to improve the fluency of changing interface, terminal can arrange different animation curves according to the type switching front interface and switching rear interface, and sets up the mapping relations switching front interface and switch the type of rear interface and the animation curve of setting.
In the present embodiment, terminal is set up using the time as transverse axis, using positional distance as the coordinate system of the longitudinal axis; Based on the above-mentioned coordinate system set up, draw corresponding animation curve.In the above-mentioned coordinate system set up, the position of start image frame when terminal setup times is 0 is as start frame coordinate, and the position arranging picture frame corresponding to Preset Time point is as end frame coordinate.In the present embodiment, terminal is also provided with two key frame coordinates i.e. the first key frame coordinate and the second key frame coordinate, and arranges start frame coordinate to the first display parameters of described first key frame coordinate, the second display parameters of described first key frame coordinate to the second key frame coordinate and described second key frame coordinate to the 3rd display parameters of end frame coordinate; According to the start frame coordinate arranged, end frame coordinate, the first key frame coordinate and the second key frame coordinate, and the first display parameters, the second display parameters and the 3rd display parameters, draw described animation curve; Wherein, the respective time point that described start frame coordinate, the first key frame coordinate, the second key frame coordinate and end frame coordinate are corresponding is respectively arranged in order according to sequencing; Described first display parameters, the second display parameters and the 3rd display parameters comprise: the movement locus of the direction of motion of image conversion mode, image and the picture frame of composition diagram picture.
Further, in order to improve man-machine interaction, enriching the sensory experience of user, can arrange on animation curve more than the key frame coordinate of two and display parameters corresponding to each key frame.
Continue to be described for the animation curve shown in Fig. 2.In animation curve shown in Fig. 2, the first key frame coordinate S1(t1 that terminal is arranged, s1) corresponding in the animation curve shown in Fig. 2 point is S1, second key frame coordinate (t2, s2) corresponding in the animation curve shown in Fig. 2 point is S2, and the point that start frame coordinate (0, s0) is corresponding in the animation curve shown in Fig. 2 is S0, end frame coordinate is Sn(tn, sn).State the first display parameters based on what arrange, in the first duration T1, the picture frame of correspondence is converted into described first key frame coordinate S1(t1, s1 by start frame coordinate (0, s0)); Arrive described first key frame coordinate points S1 time, according to arrange described second display parameters, in the second duration T2 by the picture frame of correspondence by described first key frame coordinate S1(t1, s1) be converted into described second key frame coordinate S2(t2, s2); And when arrival second key frame coordinate points S2, in the 3rd duration T3, utilize described 3rd display parameters arranged, the picture frame that transfer pair is answered, until the display of this animation terminates.Described start frame coordinate S0(0, s0) to the first key frame coordinate S1(t1, s1) distance between each self-corresponding position | s1-s0| is L1, with the ratio V1=L1/T1 of the first duration T1; Described first key frame coordinate S1(t1, s1) to the second key frame coordinate S2(t2, s2) distance between each self-corresponding position | s2-s1| is L2, with the ratio V2=L2/T2 of the second duration T2; And described second key frame coordinate S2(t2, s2) to end frame coordinate Sn(tn, sn) distance between each self-corresponding position | sn-s2| is L3, with the ratio V3=L3/T3 of the 3rd duration T3; The magnitude relationship of described V1, V2 and V3 is: the difference of V1 and V3 is within the scope of preset difference value, and V2 is then far longer than V1 or V3; Can be understood as, V1 and V3 is more or less the same, and V2 is then far longer than V1 or V3.
Based on above description, according to main two parts of the animation shown by the animation curve shown in Fig. 2: first part, the mode of terminal demonstration animation is for enter at a slow speed, as shown in Figure 2 by coordinate points S0 to S1, then the animation of terminal demonstration completes more than 85% distance fast as shown in Figure 2 by coordinate points S1 to S2, but the displaying time that terminal uses just consumes 38% of the whole procedure for displaying required time of animation, the animation of this part terminal demonstration brings user visual experience fast.Terminal utilizes the display mode of the animation shown by the animation curve shown in Fig. 2 to be: the entering at a slow speed of animation starting to have unusual short time (this time t1 is 7.6% of the whole displaying time of animation), there is a buffering like this, animation can not seem lofty, is natural and tripping to the impression of user; The second part, it is the stopping at a slow speed of the animation of terminal demonstration, the time that the animation of this part of terminal demonstration uses occupies 62% of the whole procedure for displaying required time of animation, but animation change distance accounts for animation from change starting point to 15% of the whole distance of change terminal, just can stop very stably, just very steady to the sensation of user.Because whole animation curve is all smooth, so the animation entirety of terminal demonstration is very smooth, the Part I of the animation of terminal demonstration embodies animation feature fast, and Part II embodies the stable feature of animation.So in application scenarios handoff procedure, to user, the animation of terminal demonstration feels that changing interface is very fast, do not wait for sense, very stably can be switched to second scenario again simultaneously, add whole animation curve smooth, therefore, during terminal demonstration animation, the display interface of whole animation is all very natural and tripping.
The embodiment of the present invention arranges the display that when animation curve is changing interface, animation is quick, stable and provides precondition; Further, terminal can arrange corresponding animation curve according to switching the dissimilar of interface, front and back, further increases changing interface efficiency, makes 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, changing interface device of the present invention comprises: 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, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously;
When data acquisition module 01 receives the changing interface instruction triggered user side, respond described changing interface instruction, obtain the interface drawing data that this switching rear interface pointed by changing interface instruction is corresponding; Meanwhile, data acquisition module 01 calls the animation curve pre-set; In this course, terminal can show the image pre-set, or terminal can still show switching front interface; Certainly, terminal also can show without interface during view data; But terminal retain and show switch front interface bring the visual experience of user can be better.
Due to the speed of service for CPU corresponding to different terminals, the speed of the animation curve that data acquisition module 01 calls also can be different, but under normal circumstances, the speed that data acquisition module 01 calls default animation curve generally all exceedes the reaction speed of human eye, therefore, receive changing interface instruction to animation display module 02 at data acquisition module 01 to show in this process of animation curve called, the particular content shown by terminal does not limit.
Animation display module 02, for according to the described animation curve called, shows by switching the animation of front interface to described switching rear interface;
After data acquisition module 01 calls the animation curve pre-set, animation display module 02, according to the described animation curve called, shows by switching front interface to switching animation corresponding to rear interface.Animation display module 02 can animation curve according to Fig. 2, the image that display is corresponding.
Such as, in a concrete application scenarios, user clicks " default " this display control on mobile phone desktop, ites is desirable to be switched by mobile phone desktop to enter this interface of default; Then when data acquisition module 01 receives the above-mentioned changing interface instruction that user triggers, data acquisition module 01 obtains this switching rear interface pointed by changing interface instruction interface drawing data as corresponding in this interface of default in the present embodiment embody rule scene; While data acquisition module 01 obtains interface drawing data corresponding to switching rear interface, data acquisition module 01 calls and switches to by mobile phone desktop the animation curve pre-set in this process of Operation system setting interface, and shows according to the animation curve that data acquisition module 01 calls the animation that data acquisition module 01 calls by animation display module 02.
Whether interface detecting module 03, generated described switching rear interface for the described interface drawing data detected according to obtaining;
Interface display module 04, if generated described switching rear interface for the described interface drawing data detected according to obtaining, has then shown described switching rear interface;
Described animation display module 02 also for, if the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show.
Animation display module 02 is while the animation curve that display is modulated, and data acquisition module 01 obtains the interface drawing data switched corresponding to rear interface, and according to the interface drawing data got, draws and switch rear interface.Data acquisition module 01 is while the animation curve that display is modulated, and interface detecting module 03 is constantly detecting whether completed according to the interface drawing data obtained the drawing switching rear interface.
The described interface drawing data detected according to obtaining at interface detecting module 03 has generated described switching rear interface, then interface display module 04 pulls the switching rear interface of generation, animation according to the animation curve pre-set is switched to described switching rear interface, and shows described switching rear interface.
If the described interface drawing data that interface detecting module 03 detects according to obtaining not yet generates described switching rear interface, then animation display module 02 obtains current time, according to the current time of the animation curve called and acquisition, animation display module 02 obtains the display position of the picture frame corresponding to current time in animation curve and continues display animation.As shown in Figure 2, if on this time point of Tx, interface detecting module 03 detects the work generating described switching rear interface according to the interface drawing data obtained and not yet completes, the then animation curve that calls according to data acquisition module 01 of animation display module 02, search the position Sx corresponding to picture frame of animation curve corresponding to this time point of Tx, obtain the coordinate (Tx of picture frame corresponding to this time point of Sx, Sx), animation display module 02, according to the coordinate of the picture frame obtained, continues the picture frame that display is corresponding; Or animation display module 02 is according to the value of the Tx obtained, and the functional relation of the position corresponding in conjunction with this animation curve and time value, calculates the position that the picture frame of this time point of acquisition Tx is corresponding.
In the present embodiment, animation display module 02 obtains current time can determine current time according to the clock frequency of terminal inner timer and count value; Such as, count from sometime, when arriving current point in time, animation display module 02 obtains from counting to the total count value arriving current time; Animation display module 02 utilizes the total count value obtained divided by the clock frequency of timer, namely obtains current time.
In a preferred embodiment, in the animation curve shown in Fig. 2, the relation of the position y that picture frame is corresponding and time x meets following relational expression:
y=Vmax*x^n/(k^n+x^n);
Wherein, described Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve; The value of above-mentioned parameter Vmax, k and n can adjust according to the actual requirements; Such as, according to the switching rear interface pointed by the switching front interface of terminal demonstration and changing interface instruction, and pull the time span of corresponding switching rear interface to arrange the different values of above-mentioned parameter in conjunction with terminal; Or, according to the dissimilar concrete value arranging above-mentioned parameter at the interface switched shown by front and back; Or, according to pulling interface drawing data and generating according to the interface drawing data obtained the concrete value etc. that the duration switching rear interface arranges above-mentioned parameter; The present embodiment does not limit the concrete foundation of above-mentioned parameter value and concrete value.
In a preferred embodiment, for the ease of calling, above-mentioned parameter Vmax, k and n directly can be set and correspond to the dissimilar concrete span configuring above-mentioned parameter difference correspondence switching forward/backward operation interface; Meanwhile, the switching type at forward/backward operation interface and the mapping relations of above-mentioned each group of parameter value scope are set up.Terminal, just can the type of type corresponding to switching rear interface pointed by changing interface instruction and the current switching front interface not yet switched when receiving changing interface instruction, call with above-mentioned switching before and after the value of above-mentioned each parameter that maps of interface type.
Such as, in concrete application scenarios, for mobile phone, operation interface corresponding to default is switched to by this operation interface of mobile phone desktop, owing to being all that mobile phone this locality directly pulls and switches interface drawing data corresponding to rear interface, therefore this process required time can be shorter, then terminal can utilize the type for switching interface, front and back to call value corresponding to above-mentioned parameter.Again such as, the operation interface of UC browser homepage corresponding to this display control of UC browser is switched to by this operation interface of mobile phone desktop, because UC browser is application program, UC browser homepage is application program operation interface, be limited to the reasons such as network speed, under normal circumstances, pulling the time needed for the drawing data of interface corresponding to UC browser homepage can be longer than the time pulling terminal local system data, therefore, terminal can utilize and also generate the duration of switching rear interface to call value corresponding to above-mentioned parameter for pulling interface drawing data during interface switching.
Embodiment of the present invention reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously; According to the described animation curve called, show by switching the animation of front interface to described switching rear interface; Whether the described interface drawing data detected according to obtaining has generated described switching rear interface; If the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show; If the described interface drawing data detected according to obtaining has generated described switching rear interface, then show described switching rear interface; 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 interface type switching front and back, improve the efficiency of changing interface and the intelligent of terminal.
Fig. 5 is changing interface device second embodiment high-level schematic functional block diagram of the present invention; Described in the present embodiment and Fig. 4, the difference of embodiment adds cartoon setting module 05; The present embodiment is only described cartoon setting module 05, and relevant other modules involved by changing interface device of the present invention please refer to the specific descriptions of related embodiment, do not repeat them here.
As shown in Figure 5, changing interface device of the present invention also comprises:
Cartoon setting module 05, for arranging described animation curve.
In the present embodiment, cartoon setting module 05 arranges animation curve, and is preserved in the local database by the animation curve set.In a preferred embodiment, in order to improve the fluency of changing interface, cartoon setting module 05 can arrange different animation curves according to the type switching front interface and switching rear interface, and sets up the mapping relations switching front interface and switch the type of rear interface and the animation curve of setting.
In the present embodiment, cartoon setting module 05 was set up using the time as transverse axis, using positional distance as the coordinate system of the longitudinal axis; Based on the above-mentioned coordinate system set up, cartoon setting module 05 draws corresponding animation curve.In the above-mentioned coordinate system set up, the position of start image frame when cartoon setting module 05 setup times is 0 is as start frame coordinate, and the position arranging picture frame corresponding to Preset Time point is as end frame coordinate.In the present embodiment, cartoon setting module 05 is also provided with two key frame coordinates i.e. the first key frame coordinate and the second key frame coordinate, and arranges start frame coordinate to the first display parameters of described first key frame coordinate, the second display parameters of described first key frame coordinate to the second key frame coordinate and described second key frame coordinate to the 3rd display parameters of end frame coordinate; According to the start frame coordinate arranged, end frame coordinate, the first key frame coordinate and the second key frame coordinate, and the first display parameters, the second display parameters and the 3rd display parameters, cartoon setting module 05 draws described animation curve; Wherein, the respective time point that described start frame coordinate, the first key frame coordinate, the second key frame coordinate and end frame coordinate are corresponding is respectively arranged in order according to sequencing; Described first display parameters, the second display parameters and the 3rd display parameters comprise: the movement locus of the direction of motion of image conversion mode, image and the picture frame of composition diagram picture.
Further, in order to improve man-machine interaction, enrich the sensory experience of user, cartoon setting module 05 can be arranged more than the key frame coordinate of two and display parameters corresponding to each key frame on animation curve.
Continue to be described for the animation curve shown in Fig. 2.In animation curve shown in Fig. 2, the first key frame coordinate (t1 that cartoon setting module 05 is arranged, s1) corresponding in the animation curve shown in Fig. 2 point is S1, second key frame coordinate (t2, s2) corresponding in the animation curve shown in Fig. 2 point is S2, and the point that start frame coordinate (0, s0) is corresponding in the animation curve shown in Fig. 2 is S0, end frame coordinate is (tn, sn).What arrange based on cartoon setting module 05 states the first display parameters, and the picture frame of correspondence is converted into described first key frame coordinate (t1, s1) by start frame coordinate (0, s0) by animation display module 02 in the first duration T1; When arriving described first key frame coordinate points S1, according to described second display parameters that cartoon setting module 05 is arranged, the picture frame of correspondence is converted into described second key frame coordinate (t2, s2) by described first key frame coordinate (t1, s1) by animation display module 02 in the second duration T2; And when arrival second key frame coordinate points S2, in the 3rd duration T3, described 3rd display parameters utilizing cartoon setting module 05 to arrange, the picture frame that animation display module 02 transfer pair is answered, until the display of this animation terminates.Distance between described start frame coordinate (0, s0) to the first each self-corresponding position of key frame coordinate (t1, s1) | s1-s0| is L1, with the ratio V1=L1/T1 of the first duration T1; Distance between described first key frame coordinate (t1, s1) to the second each self-corresponding position of key frame coordinate (t2, s2) | s2-s1| is L2, with the ratio V2=L2/T2 of the second duration T2; And the distance between described second key frame coordinate (t2, s2) to each self-corresponding position of end frame coordinate (tn, sn) | sn-s2| is L3, with the ratio V3=L3/T3 of the 3rd duration T3; The magnitude relationship of described V1, V2 and V3 is: the difference of V1 and V3 is within the scope of preset difference value, and V2 is then far longer than V1 or V3; Can be understood as, V1 and V3 is more or less the same, and V2 is then far longer than V1 or V3.
Based on above description, according to main two parts of the animation shown by the animation curve shown in Fig. 2: first part, the animate that animation display module 02 shows is for enter at a slow speed, as shown in Figure 2 by coordinate points S0 to S1, then the animation that animation display module 02 shows completes more than 85% distance fast as shown in Figure 2 by coordinate points S1 to S2, but the displaying time that animation display module 02 uses just consumes 38% of the whole procedure for displaying required time of animation, the animation of this part animation display module 02 display brings user visual experience fast.Animation display module 02 utilizes the display mode of the animation shown by the animation curve shown in Fig. 2 to be: the entering at a slow speed of animation starting to have unusual short time (this time t1 is 7.6% of the whole displaying time of animation), there is a buffering like this, animation can not seem lofty, is natural and tripping to the impression of user; The second part, it is the stopping at a slow speed of the animation that animation display module 02 shows, the time that the animation of this part that animation display module 02 shows uses occupies 62% of the whole procedure for displaying required time of animation, but animation change distance accounts for animation from change starting point to 15% of the whole distance of change terminal, just can stop very stably, just very steady to the sensation of user.Because whole animation curve is all smooth, so the animation entirety that animation display module 02 shows is very smooth, the Part I of the animation that animation display module 02 shows embodies animation feature fast, and Part II embodies the stable feature of animation.So in application scenarios handoff procedure, to user, the animation that animation display module 02 shows feels that changing interface is very fast, do not wait for sense, very stably can be switched to second scenario again simultaneously, add whole animation curve smooth, therefore, when animation display module 02 shows animation, the display interface of whole animation is all very natural and tripping.
The embodiment of the present invention arranges the display that when animation curve is changing interface, animation is quick, stable and provides precondition; Further, terminal can arrange corresponding animation curve according to switching the dissimilar of interface, front and back, further increases changing interface efficiency, makes changing interface more smooth.
It should be noted that, in this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or device.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the device comprising this key element and also there is other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that above-described embodiment method can add required general hardware platform by software and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD, changing interface device described in Fig. 4, Fig. 5) in, it (can be mobile phone that this storage medium comprises some instructions in order to make a station terminal equipment, computer, server, or the network equipment, or the changing interface device described in Fig. 4, Fig. 5) etc.) perform method described in the present invention each embodiment.
The foregoing is only the preferred embodiments of the present invention; not thereby its scope of the claims is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; directly or indirectly be used in the technical field that other are relevant, be all in like manner included in scope of patent protection of the present invention.

Claims (14)

1. an interface switching method, is characterized in that, comprises the following steps:
Reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously;
According to the described animation curve called, show by switching the animation of front interface to described switching rear interface;
Whether the described interface drawing data detected according to obtaining has generated described switching rear interface;
If the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show;
If the described interface drawing data detected according to obtaining has generated described switching rear interface, then show described switching rear interface.
2. the method for claim 1, is characterized in that, also comprises:
Described animation curve is set.
3. method as claimed in claim 2, is characterized in that, describedly arranges described animation curve and comprises:
Set up using the time as transverse axis, using positional distance as the coordinate system of the longitudinal axis;
In the described coordinate system set up, the position of start image frame when setup times is 0, as start frame coordinate, arranges the position of picture frame corresponding to time point stopping the described animation of display as end frame coordinate; Simultaneously, described first key frame coordinate and the second key frame coordinate are set, and start frame coordinate is set to the first display parameters of described first key frame coordinate, the second display parameters of described first key frame coordinate to the second key frame coordinate and described second key frame coordinate to the 3rd display parameters of end frame coordinate;
According to the start frame coordinate arranged, end frame coordinate, the first key frame coordinate and the second key frame coordinate, and the first display parameters, the second display parameters and the 3rd display parameters, draw described animation curve;
Wherein, the respective time point that described start frame coordinate, the first key frame coordinate, the second key frame coordinate and end frame coordinate are corresponding is respectively arranged in order according to sequencing; Described first display parameters, the second display parameters and the 3rd display parameters comprise: the movement locus of the direction of motion of image conversion mode, image and the picture frame of composition diagram picture.
4. method as claimed in claim 3, is characterized in that, the described animation curve that described basis is called, and showing by switching front interface to the animation of described switching rear interface, comprising:
According to described first display parameters arranged, in the first duration by the picture frame of correspondence by start frame coordinate transform to described first key frame coordinate;
When arriving described first key frame coordinate, according to described second display parameters arranged, in the second duration by the picture frame of correspondence by described first key frame coordinate transform to described second key frame coordinate; And when arrival second key frame coordinate, in the 3rd duration by the picture frame of correspondence by described second key frame coordinate transform to described end frame coordinate;
Distance L1 between each self-corresponding position of described start frame coordinate to the first key frame coordinate, with the ratio V1=L1/T1 of the first duration T1; Distance L2 between the described first each self-corresponding position of key frame coordinate to the second key frame coordinate, with the ratio V2=L2/T2 of the second duration T2; And the distance L3 between described second key frame coordinate to each self-corresponding position of end frame coordinate, with the ratio V3=L3/T3 of the 3rd duration T3; The magnitude relationship of described V1, V2 and V3 is: the difference of V1 and V3 is within the scope of preset difference value, and V2 is then far longer than V1 or V3.
5. the method for claim 1, is characterized in that, in described animation curve, the position y of picture frame and the relational expression of time x are:
y=Vmax*x^n/(k^n+x^n);
Wherein, described 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, is characterized in that, the span of described parameter Vmax, k and n is determined by the type of described switching front interface and switching rear interface.
7. the method as described in any one of claim 1-6, is characterized in that, described acquisition current time comprises:
Current time is determined by the clock frequency and count value that obtain terminal inner timer.
8. a changing interface device, is characterized in that, comprising:
Data acquisition module, for reception interface switching command, obtains the interface drawing data that switching rear interface pointed by described changing interface instruction is corresponding, calls the animation curve pre-set simultaneously;
Animation display module, for according to the described animation curve called, shows by switching the animation of front interface to described switching rear interface;
Whether interface detecting module, generated described switching rear interface for the described interface drawing data detected according to obtaining;
Interface display module, if generated described switching rear interface for the described interface drawing data detected according to obtaining, has then shown described switching rear interface;
Described animation display module also for, if the described interface drawing data detected according to obtaining not yet generates described switching rear interface, then obtain current time, according to described animation curve and current time, obtain the display position of picture frame corresponding to described current time and show.
9. device as claimed in claim 8, is characterized in that, also comprise:
Cartoon setting module, for arranging described animation curve.
10. device as claimed in claim 9, it is characterized in that, described cartoon setting module is used for:
Set up using the time as transverse axis, using positional distance as the coordinate system of the longitudinal axis;
In the described coordinate system set up, the position of start image frame when setup times is 0, as start frame coordinate, arranges the position of picture frame corresponding to time point stopping the described animation of display as end frame coordinate; Simultaneously, described first key frame coordinate and the second key frame coordinate are set, and start frame coordinate is set to the first display parameters of described first key frame coordinate, the second display parameters of described first key frame coordinate to the second key frame coordinate and described second key frame coordinate to the 3rd display parameters of end frame coordinate;
According to the start frame coordinate arranged, end frame coordinate, the first key frame coordinate and the second key frame coordinate, and the first display parameters, the second display parameters and the 3rd display parameters, draw described animation curve;
Wherein, the respective time point that described start frame coordinate, the first key frame coordinate, the second key frame coordinate and end frame coordinate are corresponding is respectively arranged in order according to sequencing; Described first display parameters, the second display parameters and the 3rd display parameters comprise: the movement locus of the direction of motion of image conversion mode, image and the picture frame of composition diagram picture.
11. devices as claimed in claim 10, is characterized in that, described animation display module also for:
According to described first display parameters arranged, in the first duration by the picture frame of correspondence by start frame coordinate transform to described first key frame coordinate;
When arriving described first key frame coordinate, according to described second display parameters arranged, in the second duration by the picture frame of correspondence by described first key frame coordinate transform to described second key frame coordinate; And when arrival second key frame coordinate, in the 3rd duration by the picture frame of correspondence by described second key frame coordinate transform to described end frame coordinate;
Distance L1 between each self-corresponding position of described start frame coordinate to the first key frame coordinate, with the ratio V1=L1/T1 of the first duration T1; Distance L2 between the described first each self-corresponding position of key frame coordinate to the second key frame coordinate, with the ratio V2=L2/T2 of the second duration T2; And the distance L3 between described second key frame coordinate to each self-corresponding position of end frame coordinate, with the ratio V3=L3/T3 of the 3rd duration T3; The magnitude relationship of described V1, V2 and V3 is: the difference of V1 and V3 is within the scope of preset difference value, and V2 is then far longer than V1 or V3.
12. devices as claimed in claim 8, is characterized in that, in described animation curve, the position y of picture frame and the relational expression of time x are:
y=Vmax*x^n/(k^n+x^n);
Wherein, described Vmax is the speed parameter of picture frame movement, and k, n are the smoothness parameter of curve.
13. devices as claimed in claim 12, is characterized in that, the span of described parameter Vmax, k and n is determined by the type of described switching front interface and switching rear interface.
14. devices as described in any one of claim 8-13, is characterized in that, described animation display module also for:
Current time is determined by the clock frequency and count value that obtain 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 true CN104639725A (en) 2015-05-20
CN104639725B 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)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105160697A (en) * 2015-08-28 2015-12-16 联想(北京)有限公司 Information processing method and electronic device
CN105354051A (en) * 2015-09-30 2016-02-24 北京金山安全软件有限公司 Method and device for presenting information flow card and electronic equipment
CN105825537A (en) * 2015-11-30 2016-08-03 维沃移动通信有限公司 Method for generating animation curve and terminal
CN106231398A (en) * 2016-07-28 2016-12-14 深圳Tcl数字技术有限公司 The display packing of animated menu and device
CN107704300A (en) * 2017-09-25 2018-02-16 联想(北京)有限公司 Information processing method and electronic equipment
CN108153456A (en) * 2016-12-05 2018-06-12 珠海金山办公软件有限公司 A kind of interface switching method and device
CN108282598A (en) * 2017-05-19 2018-07-13 广州华多网络科技有限公司 A kind of software director system and method
CN110659082A (en) * 2019-09-11 2020-01-07 Oppo(重庆)智能科技有限公司 Application program interface display method and device, terminal and storage medium
CN110812843A (en) * 2019-10-30 2020-02-21 腾讯科技(深圳)有限公司 Interaction method and device based on virtual image and computer storage medium
WO2020102956A1 (en) * 2018-11-20 2020-05-28 深圳市欢太科技有限公司 Interface display method and apparatus, and computer storable medium and electronic device
CN111488816A (en) * 2017-09-12 2020-08-04 Oppo广东移动通信有限公司 Method for previewing face information and related product
CN113420246A (en) * 2021-05-14 2021-09-21 阿里巴巴新加坡控股有限公司 Processing method and device for page transition animation and electronic equipment

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
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
CN102541515A (en) * 2010-12-08 2012-07-04 腾讯科技(深圳)有限公司 Method and device for realizing special screen switching effect
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

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

Cited By (17)

* 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
CN105160697A (en) * 2015-08-28 2015-12-16 联想(北京)有限公司 Information processing method and electronic device
CN105354051A (en) * 2015-09-30 2016-02-24 北京金山安全软件有限公司 Method and device for presenting information flow card and electronic equipment
CN105354051B (en) * 2015-09-30 2019-06-21 北京金山安全软件有限公司 Method and device for presenting information flow card and electronic equipment
CN105825537A (en) * 2015-11-30 2016-08-03 维沃移动通信有限公司 Method for generating animation curve and terminal
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
WO2018018687A1 (en) * 2016-07-28 2018-02-01 深圳Tcl数字技术有限公司 Display method and device for animation menu
CN108153456A (en) * 2016-12-05 2018-06-12 珠海金山办公软件有限公司 A kind of interface switching method and device
CN108282598A (en) * 2017-05-19 2018-07-13 广州华多网络科技有限公司 A kind of software director 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
CN110812843A (en) * 2019-10-30 2020-02-21 腾讯科技(深圳)有限公司 Interaction method and device based on virtual image and computer storage medium
CN110812843B (en) * 2019-10-30 2023-09-15 腾讯科技(深圳)有限公司 Interactive method and device based on virtual image and computer storage medium
CN113420246A (en) * 2021-05-14 2021-09-21 阿里巴巴新加坡控股有限公司 Processing method and device for page transition animation and electronic equipment

Also Published As

Publication number Publication date
CN104639725B (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN104639725A (en) Interface switching method and device
CN103686281B (en) Analog mouse controls method, remote control and the mobile terminal of intelligent television
CN101895634A (en) Method and device for realizing dynamic switching of mobile terminal interface
CN104680421B (en) A kind of saleable vector graphics SVG display methods and device
CN102945116A (en) Interface switching display method and device, and mobile terminal
CN105095459A (en) Dedicated customer service method and device
CN105677265A (en) Display method and terminal
CN103648059A (en) Advertisement broadcasting method and apparatus
CN103942823A (en) Game engine rendering method and device
KR20200115625A (en) How to learn personalized intent
CN104866185B (en) Control interface display methods and device
EP4016529A1 (en) Video sequence layout method, apparatus, electronic device, storage medium and program product
CN103543922A (en) Focus moving method, system and intelligent equipment
CN103561342A (en) Method and device for tabletop switch of smart television and smart television
CN101655989A (en) 3D special-efficacy graphic user interface system and method of mobile phone
CN101155276A (en) Display device for function menu dynamic switch and its implementing method
CN105487871A (en) Method and device for running application programs on intelligent terminal
CN110634174A (en) Expression animation transition method and system and intelligent terminal
CN106406902B (en) A kind of cartoon display method and device of electronic gift
CN106326476A (en) Information processing method and device
CN103365559A (en) Method for drawing sliding trace and mobile terminal
CN110708386A (en) Page display method, terminal device and server
CN103747309B (en) The method and apparatus that the Widget for controlling third-party server to provide is applied
CN102156556B (en) Method for realizing cursor quick sliding of blue-ray player
CN106375190B (en) instant messaging software interface splitting and merging display method and 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