WO2024098713A1 - Terminal desktop display method, terminal and computer-readable medium - Google Patents

Terminal desktop display method, terminal and computer-readable medium Download PDF

Info

Publication number
WO2024098713A1
WO2024098713A1 PCT/CN2023/095460 CN2023095460W WO2024098713A1 WO 2024098713 A1 WO2024098713 A1 WO 2024098713A1 CN 2023095460 W CN2023095460 W CN 2023095460W WO 2024098713 A1 WO2024098713 A1 WO 2024098713A1
Authority
WO
WIPO (PCT)
Prior art keywords
icons
value
icon
target icon
desktop
Prior art date
Application number
PCT/CN2023/095460
Other languages
French (fr)
Chinese (zh)
Inventor
温馨
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2024098713A1 publication Critical patent/WO2024098713A1/en

Links

Definitions

  • the present disclosure relates to the field of terminal technology, and in particular to a terminal desktop display method, a terminal, and a computer-readable medium.
  • desktop icons When using mobile phones and other terminal devices, users often switch to the desktop. For example, when unlocking a mobile phone, the lock screen disappears and the desktop icons appear. When exiting an application, the application interface closes and the desktop icons appear.
  • the desktop icon appearance process is generally achieved through desktop animation. Whether the transition from non-existence to existence of icons in desktop animation is smooth will affect the user experience.
  • the embodiments of the present disclosure provide a terminal desktop display method, a terminal, and a computer-readable medium.
  • an embodiment of the present disclosure provides a method for displaying a terminal desktop, comprising: obtaining a current return value corresponding to a frame to be processed, wherein the frame to be processed is one of multiple frames that constitute a desktop animation, and the return values corresponding to different frames conform to a law of elastic numerical changes; determining animation parameters corresponding to the frame to be processed based on the current return value; and outputting an interface image of the frame to be processed based on the animation parameters.
  • an embodiment of the present disclosure provides a terminal, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the terminal desktop display method described in the first aspect of the embodiment of the present disclosure.
  • an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for displaying a terminal desktop described in the first aspect of the embodiment of the present disclosure is implemented.
  • FIG1 is a schematic diagram of a process of displaying a terminal desktop in an embodiment of the present disclosure
  • FIG2 is a flowchart of some steps in another method for displaying a terminal desktop according to an embodiment of the present disclosure
  • FIG3 is a schematic diagram of the composition of a terminal in an embodiment of the present disclosure.
  • FIG4 is a schematic diagram of the composition of a computer-readable medium in an embodiment of the present disclosure.
  • FIG5 is a schematic diagram of desktop coordinates in an embodiment of the present disclosure.
  • FIG6 is a schematic diagram of an elastic unit in an embodiment of the present disclosure.
  • FIG7A is a schematic diagram of a frame of desktop animation in an embodiment of the present disclosure.
  • FIG7B is another schematic diagram of a desktop animation frame in an embodiment of the present disclosure.
  • FIG7C is another schematic diagram of a frame in the desktop animation in an embodiment of the present disclosure.
  • FIG7D is another schematic diagram of a frame of desktop animation in an embodiment of the present disclosure.
  • FIG. 7E is another schematic diagram of a frame of desktop animation in an embodiment of the present disclosure.
  • FIG. 7F is another schematic diagram of a frame of the desktop animation in the embodiment of the present disclosure.
  • the animation effect of switching to the desktop can be summarized into the following three solutions: 1 No animation effect transition, the desktop icons flash directly; 2 The whole desktop is animated, such as the desktop icons are animated with displacement, transparency, scaling and other animations as a whole, and each icon has no personalized difference in the animation effect; 3 According to the coordinate position of the icon at the pixel level on the screen, the animation effect parameters of each icon are calculated, so that different icons have different animation effects, but the icons and images are different. There is no connection, interaction or transferability between the target animation effects.
  • the desktop switching process of solution 1 is very stiff; in solution 2, there is a lack of differentiation between icons during the desktop switching process, and the animation pace of all icons is uniform, which lacks interest; in solution 3, the icons are independent of each other and lack connection, and the overall animation effect does not conform to the actual movement laws of the physical world, and the overall animation is prone to become unsmooth and illogical.
  • an embodiment of the present disclosure provides a method for displaying a terminal desktop, which may include the following operations S1 to S3 .
  • the desktop animation may be an animation in the process of switching from the lock screen interface to the desktop, an animation in the process of switching from the application interface to the desktop, or an animation in the process of switching between different desktops.
  • the disclosed embodiment does not specifically limit this.
  • the desktop animation is composed of multiple frames, and the frame to be processed is any one of the multiple frames that make up the desktop animation.
  • the frame to be processed is any one of the multiple frames that make up the desktop animation.
  • steps S2 and S3 are executed.
  • the disclosed embodiment does not specifically limit the order of steps S1, S2, and S3.
  • steps S1 to S3 may be executed in sequence, or multiple steps may be executed simultaneously.
  • the return values corresponding to different frames are the return values returned by the elastic system.
  • the elastic system is a model that can simulate the laws of elastic transmission motion in the real physical world. It is based on an elastic algorithm and can return a series of return values that conform to the laws of elastic value changes.
  • the elastic system can return a return value for each frame; it can also return an elastic system return value for multiple frames, that is, return a return value every several frames. The disclosed embodiment does not make any special limitation on this.
  • the interface image is a frame of image to be displayed that constitutes the desktop animation.
  • step S3 includes: generating the interface image; outputting the interface image to be displayed on the screen.
  • the return values corresponding to different frames are associated with each other and conform to the law of elastic value change.
  • the animation parameters corresponding to the frame to be processed are determined according to the return values, so that in the desktop animation generated based on the animation parameters, different icons are associated with each other, and the movement of the icons conforms to the law of elastic movement in the real physical world. For example, different icons show an animation effect of pulling each other and being staggered.
  • the movement of icons in the desktop animation is more in line with the movement law of the display world, the animation effect of the icons is more vivid and smoother, the desktop switching process is smoother, and the user experience is improved.
  • the disclosed embodiment does not specifically limit how to determine the animation parameters of the icon in the frame to be processed according to the current return value.
  • determining the animation parameter corresponding to the frame to be processed according to the current return value may include the following operations S21 to S22 .
  • the disclosed embodiment does not specifically limit how to divide the icons on the desktop into multiple elastic units. For example, in terms of rows, one or more rows of icons are divided into one elastic unit. For example, in terms of columns, one or more columns of icons are divided into one elastic unit.
  • the icons on the desktop are divided into a plurality of elastic units, each of which is started in sequence, and the start time of each elastic unit conforms to the law of elastic value change, so that the desktop animation can present an animation effect in which a plurality of elastic units are associated with each other and one elastic unit pulls another elastic unit.
  • the embodiment of the present disclosure does not specifically limit how to determine the animation parameters of each elastic unit to be activated according to the current return value.
  • animation parameters of icons in each elastic unit to be started are determined according to the current return value, including: for any elastic unit to be started, animation parameters of each icon are determined according to the current return value and the coordinate values of each icon in the elastic unit to be started, and the animation parameters include at least one of displacement, scaling, and transparency.
  • the animation parameters of each icon are determined based on the return value and the coordinate values of each coordinate in the elastic unit to be started, so that the animation parameters of each icon also conform to the law of elastic value change, so that the movements of each icon in the desktop animation are interrelated and conform to the law of elastic movement of the display physical world.
  • the displacement of the icon is the displacement of the icon in the elastic unit.
  • the icons on the desktop are divided into multiple elastic units in rows, and the displacement of the icon is the displacement of the icon in the row direction.
  • the displacement of the icon in the previous frame is greater than the displacement of the icon in the next frame, thereby presenting an animation effect of icons moving from far to near in the desktop animation.
  • the icon scaling ratio is the ratio relative to the normal size of the icon on the desktop. In multiple frames of the desktop animation, the icon scaling ratio in the previous frame is greater than the icon scaling ratio in the next frame, thereby presenting an animation effect of the icon changing from large to small in the desktop animation.
  • the transparency of the icon in the previous frame is greater than the transparency of the icon in the next frame, thereby presenting an animation effect in which the icon changes from transparent to opaque in the desktop animation.
  • the displacement of the target icon is determined according to the current return value and the coordinate value of the target icon, including: according to a first mapping relationship, mapping the current return value to a first interval to obtain a first mapping value, the first mapping relationship representing a mapping relationship between the value range of return values corresponding to different frames and the first interval; according to the coordinate value of the target icon, determining the distance between the target icon and the center icon in the elastic unit to be started; and calculating the displacement of the target icon according to the first mapping value and the distance.
  • the return value is a proportional value with a value range of (0,1).
  • the current return value needs to be mapped to the first mapping value in the first interval.
  • the disclosed embodiment does not specifically limit the first interval.
  • the first interval is (p,0), and the value range of p is 500 to 1000.
  • the first interval is (800,0).
  • setting the first interval to (800,0) can make the movement of icons in the desktop animation smoother.
  • the first mapping relationship represents the correspondence between the value range of the return value corresponding to different frames and the first interval.
  • the first mapping value obtained is 400.
  • the coordinates of the icons on the desktop may be grid-level coordinates.
  • each icon corresponds to a grid, with the icon in the upper left corner as the origin, and the coordinates of each icon can be expressed as (cellX, cellX represents the X-axis coordinate value of the icon, and cellY represents the Y-axis coordinate value of the icon.
  • the distance between the target icon and the center icon in the elastic unit to be activated is the difference between the X-axis coordinate values of the target icon and the center icon; if the elastic unit is divided into columns, the distance between the target icon and the center icon in the elastic unit to be activated is the difference between the Y-axis coordinate values of the target icon and the center icon.
  • the embodiment of the present disclosure does not specifically limit this.
  • gapCenterX is the gap
  • cellX is the X-axis coordinate value of the target icon
  • centerCellX is the X-axis coordinate value of the center icon.
  • the elastic unit is divided into lines, the displacement of the icon is the displacement in the X-axis direction, and the displacement of the target icon is calculated according to formula (2):
  • translationX springValueTranslation ⁇ ( 1 ⁇ ?apCenterX + b 1 ⁇ ?apCenterX 2 ) (2)
  • translationX is the displacement of the target icon
  • springValueTranslation is the first mapping value
  • gapCenterX is the gap
  • a 1 and b 1 are constants.
  • the disclosed embodiment does not specifically limit the value ranges of a1 and b1 .
  • the value range of a1 is (0.01, 0.1), and the value range of b1 is (0.05, 0.2).
  • the embodiment of the present disclosure does not specifically limit how to determine the scaling ratio of the target icon.
  • the scaling ratio of the target icon is determined according to the current return value and the coordinate value of the target icon, including: mapping the current return value to the second interval according to a second mapping relationship to obtain a second mapping value, the second mapping relationship representing a mapping relationship between the value range of the return value corresponding to different frames and the second interval; determining the distance between the target icon and the center icon in the elastic unit to be started according to the coordinate value of the target icon; and calculating the scaling ratio of the target icon according to the second mapping value and the spacing.
  • the return value is a proportional value with a value range of (0,1).
  • the current return value needs to be mapped to a second mapping value in the second interval.
  • the disclosed embodiment does not specifically limit the second interval.
  • the second interval is (q1, q2)
  • the value range of q1 is 1.5 to 2.5
  • the value range of q2 is 0.5 to 1.5.
  • the second interval is (2,1).
  • setting the second interval to (2,1) can make the movement of icons in the desktop animation smoother.
  • the second mapping relationship represents the correspondence between the value range of the return value corresponding to different frames and the second interval.
  • the distance between the target icon and the center icon in the elastic unit to be started is the difference between the X-axis coordinate values of the target icon and the center icon; if the elastic unit is divided into columns, the distance between the target icon and the center icon in the elastic unit to be started is the difference between the Y-axis coordinate values of the target icon and the center icon.
  • the distance between the target icon and the center icon in the elastic unit to be activated is expressed by formula (1).
  • the elastic unit is divided into lines, and the scaling ratio of the target icon is calculated according to formula (3):
  • scale is the scaling ratio of the target icon
  • springValueScale is the second mapping value
  • gapCenterX is the spacing
  • b2 and b2 are constants.
  • the disclosed embodiments do not specifically limit the value ranges of a2 and b2 .
  • the value range of a2 is (1, 2)
  • the value range of b2 is (0, 1).
  • the embodiment of the present disclosure does not specifically limit how to calculate the transparency of the target icon.
  • calculating the transparency of the target icon includes: calculating the transparency of the target icon according to the current return value.
  • alpha is the transparency of the target icon
  • springValue is the current return value
  • c is a constant.
  • the embodiment of the present disclosure does not specifically limit the value range of c.
  • the value range of c is (2, 6).
  • animation parameters of each elastic unit to be started are determined based on the current return value, including: for any elastic unit to be started, animation parameters of the widget are determined based on the current return value and the position of the widget in the elastic unit to be started, and the animation parameters include at least one of displacement, scaling, and transparency.
  • the disclosed embodiment does not specifically limit how to determine the animation parameters of the widget.
  • the widget's displacement is not calculated, only the scaling ratio and transparency are calculated.
  • the current return value can be used as the scaling ratio of the widget.
  • the displacement, scaling, and transparency of the widget are calculated, where the displacement is expressed as springValueTranslation ⁇ 0.5, and springValueTranslation is the first mapping value.
  • the display method before obtaining the current return value corresponding to the frame to be processed, the display method further includes: S41, obtaining the coordinate values of each icon on the desktop; S42, dividing the multiple icons into multiple elastic units according to the coordinate values of each icon, each elastic unit including multiple icons.
  • the disclosed embodiment does not specifically limit how to divide the icons on the desktop into multiple elastic units. For example, in terms of rows, one or more rows of icons are divided into one elastic unit. For example, in terms of columns, one or more columns of icons are divided into one elastic unit.
  • rows corresponding to the same elastic unit have the same elastic unit id.
  • multiple icons are divided into multiple elastic units according to the coordinate values of each icon, including: determining one or more rows of icons in the desktop as startup row icons; and dividing one or more rows of icons with the same row spacing as the startup row icons into one elastic unit.
  • the start line icon can be specified arbitrarily.
  • determining one or more rows of icons in the desktop as launch row icons includes: determining one or two rows of icons in the center of the desktop as launch row icons.
  • the position of the middle row of icons is the center position; for example, if there are 7 rows of icons on the desktop, numbered in sequence from 1 to 7, the position of the 4th row of icons is the center position. If there are an even number of rows of icons on the desktop, the positions of the two middle rows of icons are the center position; for example, if there are 6 rows of icons on the desktop, numbered in sequence from 1 to 6, the positions of the 3rd and 4th rows of icons are the center position.
  • the center position may also be confirmed in other ways, for example, confirming the position of one or more icons in the middle as the center position.
  • an embodiment of the present disclosure provides a terminal, which may include but is not limited to: one or more processors 101 , a memory 102 , and one or more I/O interfaces 103 .
  • the memory 102 stores one or more programs.
  • the one or more processors implement the terminal desktop display method described in the first aspect of the embodiment of the present disclosure.
  • One or more I/O interfaces 103 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
  • the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, such as SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I/O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information exchange between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.
  • RAM random access memory
  • ROM read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • FLASH flash memory
  • the I/O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information exchange between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.
  • the processor 101 , the memory 102 , and the I/O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
  • an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for displaying a terminal desktop described in the first aspect of the embodiment of the present disclosure is implemented.
  • the animation parameters of each icon are calculated to obtain the desktop animation.
  • the large system composed of all elastic units begins to return a return value of 0-1 (the return value conforms to the law of elastic numerical change).
  • the subsequent elastic units use the value passed by the previous elastic unit as the starting value to start calculating the animation parameters.
  • the return value is a proportional value ranging from 0 to 1.
  • the animation parameters of the icons in the group are calculated twice to obtain the differences in displacement, scaling, and transparency of the icons in the group.
  • springValueTranslation is the first mapping value corresponding to the displacement
  • springValueScale is the second mapping value corresponding to the scaling ratio
  • the processing strategy for the widget is as follows: if the widget is displayed in the center (in the middle of a row), the displacement of the widget is not calculated, only the scaling ratio and transparency are calculated, wherein the current return value can be used as the scaling ratio of the widget. If the widget is not displayed in the center, but is located on the left/right side of the desktop, the displacement, scaling ratio, and transparency of the widget are calculated, wherein the displacement is expressed as springValueTranslation ⁇ 0.5, wherein springValueTranslation is the first mapping value.
  • gapCenterX
  • gapCenterX is the gap
  • cellX is the X-axis coordinate value of the target icon
  • centerCellX is the X-axis coordinate value of the center icon.
  • the gapCenterX of the four icons in each row from left to right is 1, 0, 0, 1.
  • gapCenterX of the 5 icons in each row from left to right are 2, 1, 0, 1, 2 respectively.
  • translationX is the displacement of the target icon
  • springValueTranslation is the first mapping value
  • gapCenterX is the gap.
  • scale is the scaling ratio of the target icon
  • springValueScale is the second mapping value
  • gapCenterX is the spacing.
  • alpha is the transparency of the target icon
  • springValue is the current return value
  • icons and widgets in the same row have the same transparency.
  • Figures 7A, 7B, 7C, 7D, 7E, and 7F are schematic diagrams of desktop animations generated based on the present embodiment. It can be seen that in the desktop animation, all icons do not appear together, but appear in groups, and the icons in the group are different in displacement, scaling, and transparency. Moreover, the changes in displacement, scaling, and transparency of the icons in the group in different frames conform to the elastic operation rules, showing an animation effect of pulling each other and staggered.
  • the functional modules/units in the can be implemented as software, firmware, hardware and appropriate combinations thereof.
  • the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation.
  • Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
  • Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium).
  • a computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data).
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer.
  • communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
  • the animation parameters of the icon are determined based on the return value, and the interface image is generated based on the animation parameters.
  • the interface images of multiple frames constitute a desktop animation.
  • the return values corresponding to different frames are associated with each other and conform to the law of elastic numerical changes. Therefore, in the desktop animation generated based on the animation parameters, different icons are associated with each other, and the movement of the icons conforms to the law of elastic movement in the real physical world, so that the animation effect of the icons in the desktop switching process is more vivid and smoother, the desktop switching process is smoother, and the user experience is improved.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A terminal desktop display method, a terminal and a computer-readable medium. The method comprises: acquiring a current return value corresponding to a frame to be processed, the frame to be processed being any one of a plurality of frames constituting a desktop animation, and return values corresponding to different frames conforming to the law of elastic numerical value variations (S1); according to the current return value, determining animation parameters corresponding to the frame to be processed (S2); and according to the animation parameters, outputting an interface image of the frame to be processed (S3). Further provided in the present disclosure are a terminal and a computer-readable medium.

Description

终端桌面的显示方法、终端、计算机可读介质Terminal desktop display method, terminal, and computer-readable medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本公开要求享有2022年11月11日提交的名称为“终端桌面的显示方法、终端、计算机可读介质”的中国专利申请202211411829.1的优先权,其全部内容通过引用并入本公开中。The present disclosure claims priority to Chinese patent application No. 202211411829.1 filed on November 11, 2022, entitled “Display method, terminal, and computer-readable medium for terminal desktop,” the entire contents of which are incorporated by reference into the present disclosure.
技术领域Technical Field
本公开涉及终端技术领域,特别涉及一种终端桌面的显示方法、一种终端、一种计算机可读介质。The present disclosure relates to the field of terminal technology, and in particular to a terminal desktop display method, a terminal, and a computer-readable medium.
背景技术Background technique
用户在使用手机等终端设备时,经常会切换到桌面,例如,手机解锁过程中,会经过锁屏界面消失、桌面图标出现两个过程;退出应用程序过程中,会经过应用程度界面关闭、桌面图标出现两个过程。桌面图标出现的过程一般通过桌面动画来实现,而桌面动画中图标从无到有的过渡是否平滑,会影响用户的使用体验。When using mobile phones and other terminal devices, users often switch to the desktop. For example, when unlocking a mobile phone, the lock screen disappears and the desktop icons appear. When exiting an application, the application interface closes and the desktop icons appear. The desktop icon appearance process is generally achieved through desktop animation. Whether the transition from non-existence to existence of icons in desktop animation is smooth will affect the user experience.
发明内容Summary of the invention
本公开实施例提供一种终端桌面的显示方法、一种终端、一种计算机可读介质。The embodiments of the present disclosure provide a terminal desktop display method, a terminal, and a computer-readable medium.
第一方面,本公开实施例提供一种终端桌面的显示方法,包括:获取对应待处理帧的当前返回值,所述待处理帧为组成桌面动画的多个帧中的一者,对应不同帧的返回值符合弹性数值变化规律;根据所述当前返回值确定所述待处理帧对应的动画参数;根据所述动画参数输出所述待处理帧的界面图像。In a first aspect, an embodiment of the present disclosure provides a method for displaying a terminal desktop, comprising: obtaining a current return value corresponding to a frame to be processed, wherein the frame to be processed is one of multiple frames that constitute a desktop animation, and the return values corresponding to different frames conform to a law of elastic numerical changes; determining animation parameters corresponding to the frame to be processed based on the current return value; and outputting an interface image of the frame to be processed based on the animation parameters.
第二方面,本公开实施例提供一种终端,包括:一个或多个处理器;存储器,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本公开实施例第一方面所述的终端桌面的显示方法。In a second aspect, an embodiment of the present disclosure provides a terminal, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the terminal desktop display method described in the first aspect of the embodiment of the present disclosure.
第三方面,本公开实施例提供一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本公开实施例第一方面所述的终端桌面的显示方法。In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for displaying a terminal desktop described in the first aspect of the embodiment of the present disclosure is implemented.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本公开实施例中一种终端桌面的显示方法的流程示意图;FIG1 is a schematic diagram of a process of displaying a terminal desktop in an embodiment of the present disclosure;
图2是本公开实施例中另一种终端桌面的显示方法中部分步骤的流程示意图; FIG2 is a flowchart of some steps in another method for displaying a terminal desktop according to an embodiment of the present disclosure;
图3是本公开实施例中一种终端的组成示意图;FIG3 is a schematic diagram of the composition of a terminal in an embodiment of the present disclosure;
图4是本公开实施例中一种计算机可读介质的组成示意图;FIG4 is a schematic diagram of the composition of a computer-readable medium in an embodiment of the present disclosure;
图5是本公开实施例中一种桌面坐标的示意图;FIG5 is a schematic diagram of desktop coordinates in an embodiment of the present disclosure;
图6是本公开实施例中一种弹性单元的示意图;FIG6 is a schematic diagram of an elastic unit in an embodiment of the present disclosure;
图7A是本公开实施例中桌面动画中的一帧示意图;FIG7A is a schematic diagram of a frame of desktop animation in an embodiment of the present disclosure;
图7B是本公开实施例中桌面动画中的另一帧示意图;FIG7B is another schematic diagram of a desktop animation frame in an embodiment of the present disclosure;
图7C是本公开实施例中桌面动画中的又一帧示意图;FIG7C is another schematic diagram of a frame in the desktop animation in an embodiment of the present disclosure;
图7D是本公开实施例中桌面动画中的再一帧示意图;FIG7D is another schematic diagram of a frame of desktop animation in an embodiment of the present disclosure;
图7E是本公开实施例中桌面动画中的再一帧示意图;以及FIG. 7E is another schematic diagram of a frame of desktop animation in an embodiment of the present disclosure; and
图7F是本公开实施例中桌面动画中的再一帧示意图。FIG. 7F is another schematic diagram of a frame of the desktop animation in the embodiment of the present disclosure.
具体实施方式Detailed ways
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的终端桌面的显示方法、终端、计算机可读介质进行详细描述。In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the terminal desktop display method, terminal, and computer-readable medium provided by the present disclosure are described in detail below with reference to the accompanying drawings.
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
在不冲突的情况下,本公开各实施例及实施例中的各特征可相互组合。In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
如本文所使用的,术语“和/或”包括一个或多个相关列举条目的任何和所有组合。As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
本文所使用的术语仅用于描述特定实施例,且不意欲限制本公开。如本文所使用的,单数形式“一个”和“该”也意欲包括复数形式,除非上下文另外清楚指出。还将理解的是,当本说明书中使用术语“包括”和/或“由……制成”时,指定存在所述特征、整体、步骤、操作、元件和/或组件,但不排除存在或添加一个或多个其它特征、整体、步骤、操作、元件、组件和/或其群组。The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and/or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and/or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and/or groups thereof is not excluded.
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
在一些相关技术中,切换到桌面的动画效果可以概括为如下三种方案:①无动画效果过渡,桌面图标直接闪现;②整体桌面加动画效果,例如桌面图标整体做位移、透明度、缩放等动画,每个图标在动画效果上没有个性化的差异;③根据图标在屏幕中像素级别的坐标位置,计算每个图标的动画效果参数,使得不同图标有不同动画效果,但是图标与图 标的动画效果之间无关联、无交互、无传递性。In some related technologies, the animation effect of switching to the desktop can be summarized into the following three solutions: ① No animation effect transition, the desktop icons flash directly; ② The whole desktop is animated, such as the desktop icons are animated with displacement, transparency, scaling and other animations as a whole, and each icon has no personalized difference in the animation effect; ③ According to the coordinate position of the icon at the pixel level on the screen, the animation effect parameters of each icon are calculated, so that different icons have different animation effects, but the icons and images are different. There is no connection, interaction or transferability between the target animation effects.
通过上述相关技术实现桌面切换时,用户体验都较差。例如,方案①的桌面切换过程非常生硬;方案②桌面切换过程中,图标之间缺乏差异性,所有图标的动画步调统一,缺乏趣味性;方案③图标之间相互独立,缺乏关联,整体动画效果不符合实际的物理世界运动规律,而且整体动画容易变得不流畅且不合逻辑。When implementing desktop switching through the above-mentioned related technologies, the user experience is poor. For example, the desktop switching process of solution ① is very stiff; in solution ②, there is a lack of differentiation between icons during the desktop switching process, and the animation pace of all icons is uniform, which lacks interest; in solution ③, the icons are independent of each other and lack connection, and the overall animation effect does not conform to the actual movement laws of the physical world, and the overall animation is prone to become unsmooth and illogical.
有鉴于此,第一方面,参照图1,本公开实施例提供一种终端桌面的显示方法,可以包括下述操作S1至S3。In view of this, in a first aspect, referring to FIG. 1 , an embodiment of the present disclosure provides a method for displaying a terminal desktop, which may include the following operations S1 to S3 .
S1、获取对应待处理帧的当前返回值,待处理帧为组成桌面动画的多个帧中的一者,对应不同帧的返回值符合弹性数值变化规律。S1. Obtain the current return value of the corresponding frame to be processed, where the frame to be processed is one of multiple frames constituting the desktop animation, and the return values corresponding to different frames conform to the law of elastic value change.
S2、根据当前返回值确定待处理帧对应的动画参数。S2. Determine the animation parameters corresponding to the frame to be processed according to the current return value.
S3、根据动画参数输出待处理帧的界面图像。S3. Outputting the interface image of the frame to be processed according to the animation parameters.
在本公开实施例中,桌面动画可以是由锁屏界面切换到桌面过程中的动画,也可以是由应用程序界面切换到桌面过程中的动画,还可以是不同桌面之间进行切换过程中的动画。本公开实施例对此不做特殊限定。In the disclosed embodiment, the desktop animation may be an animation in the process of switching from the lock screen interface to the desktop, an animation in the process of switching from the application interface to the desktop, or an animation in the process of switching between different desktops. The disclosed embodiment does not specifically limit this.
在本公开实施例中,桌面动画由多个帧组成,待处理帧为组成桌面动画的多个帧中的任意一帧。对于组成桌面动画的每一帧,都至少执行步骤S2和S3。本公开实施例对步骤S1、S2、S3的先后顺序不做特殊限定。例如,可以按照步骤S1至S3的顺序依次执行,也可以同时执行多个步骤。In the disclosed embodiment, the desktop animation is composed of multiple frames, and the frame to be processed is any one of the multiple frames that make up the desktop animation. For each frame that makes up the desktop animation, at least steps S2 and S3 are executed. The disclosed embodiment does not specifically limit the order of steps S1, S2, and S3. For example, steps S1 to S3 may be executed in sequence, or multiple steps may be executed simultaneously.
在一些实施例中,不同帧对应的返回值是弹性系统返回的返回值。弹性系统是能够模拟真实物理世界弹性传递运动规律的模型,其基于弹性算法,能够返回一系列符合弹性数值变化规律的返回值。在本公开实施例中,弹性系统可以对应每一帧返回一个返回值;也可以对应多帧返回一个弹性系统返回值,也即每隔若干帧返回一个返回值。本公开实施例对此不做特殊限定。In some embodiments, the return values corresponding to different frames are the return values returned by the elastic system. The elastic system is a model that can simulate the laws of elastic transmission motion in the real physical world. It is based on an elastic algorithm and can return a series of return values that conform to the laws of elastic value changes. In the disclosed embodiment, the elastic system can return a return value for each frame; it can also return an elastic system return value for multiple frames, that is, return a return value every several frames. The disclosed embodiment does not make any special limitation on this.
在本公开实施例中,界面图像是组成桌面动画的实际要显示的一帧图像。在一些实施例中,步骤S3包括:生成界面图像;输出该界面图像以在屏幕上显示。In the disclosed embodiment, the interface image is a frame of image to be displayed that constitutes the desktop animation. In some embodiments, step S3 includes: generating the interface image; outputting the interface image to be displayed on the screen.
在本公开实施例中,对应不同帧的返回值彼此关联,且符合弹性数值变化规律,根据返回值确定待处理帧对应的动画参数,使基于该动画参数生成的桌面动画中,不同图标相互关联,且图标的运动符合现实物理世界的弹性运动规律。例如,不同图标之间表现出彼此牵拉、错落有致的动画效果。In the disclosed embodiment, the return values corresponding to different frames are associated with each other and conform to the law of elastic value change. The animation parameters corresponding to the frame to be processed are determined according to the return values, so that in the desktop animation generated based on the animation parameters, different icons are associated with each other, and the movement of the icons conforms to the law of elastic movement in the real physical world. For example, different icons show an animation effect of pulling each other and being staggered.
本公开实施例提供终端桌面的显示方法中,桌面动画中图标的运动更加符合显示世界的运动规律,图标的动画效果更加生动、更加流畅,桌面切换过程更加平滑,提升了用户的使用体验。 In the terminal desktop display method provided by the embodiment of the present disclosure, the movement of icons in the desktop animation is more in line with the movement law of the display world, the animation effect of the icons is more vivid and smoother, the desktop switching process is smoother, and the user experience is improved.
本公开实施例对于如何根据当前返回值确定待处理帧中图标的动画参数不做特殊限定。The disclosed embodiment does not specifically limit how to determine the animation parameters of the icon in the frame to be processed according to the current return value.
在一些实施例中,参照图2,根据当前返回值确定待处理帧对应的动画参数,可以包括下述操作S21至S22。In some embodiments, referring to FIG. 2 , determining the animation parameter corresponding to the frame to be processed according to the current return value may include the following operations S21 to S22 .
S21、根据多个弹性单元的启动时间确定待处理帧对应的待启动弹性单元,多个弹性单元的启动时间符合弹性数值变化规律,桌面中的多个图标划分为多个弹性单元,每一个弹性单元包括多个图标。S21. Determine the elastic unit to be started corresponding to the frame to be processed according to the start time of the multiple elastic units, the start time of the multiple elastic units conforms to the elastic value change law, the multiple icons on the desktop are divided into multiple elastic units, and each elastic unit includes multiple icons.
S22、根据当前返回值,确定各个待启动弹性单元中图标的动画参数,得到待处理帧对应的动画参数。S22. Determine the animation parameters of the icons in each elastic unit to be started according to the current return value, and obtain the animation parameters corresponding to the frame to be processed.
本公开实施例对于如何将桌面中的图标划分为多个弹性单元不做特殊限定。例如,以行为单位,将一行或多行图标划分到一个弹性单元中。例如,以列为单位,将一列或多列图标划分到一个弹性单元中。The disclosed embodiment does not specifically limit how to divide the icons on the desktop into multiple elastic units. For example, in terms of rows, one or more rows of icons are divided into one elastic unit. For example, in terms of columns, one or more columns of icons are divided into one elastic unit.
在本公开实施例中,将桌面中的图标划分为多个弹性单元,各个弹性单元依次启动,并且各个弹性单元的启动时间符合弹性数值变化规律,从而能够使桌面动画中呈现出多个弹性单元彼此关联、一个弹性单元牵拉另一个弹性单元的动画效果。In the disclosed embodiment, the icons on the desktop are divided into a plurality of elastic units, each of which is started in sequence, and the start time of each elastic unit conforms to the law of elastic value change, so that the desktop animation can present an animation effect in which a plurality of elastic units are associated with each other and one elastic unit pulls another elastic unit.
本公开实施例对于如何根据当前返回值确定各个待启动弹性单元的动画参数不做特殊限定。The embodiment of the present disclosure does not specifically limit how to determine the animation parameters of each elastic unit to be activated according to the current return value.
在一些实施例中,根据当前返回值,确定各个待启动弹性单元中图标的动画参数,包括:对于任意一个待启动弹性单元,根据当前返回值和待启动弹性单元中各个图标的坐标值,确定各个图标的动画参数,动画参数包括位移、缩放比例、透明度中的至少一者。In some embodiments, animation parameters of icons in each elastic unit to be started are determined according to the current return value, including: for any elastic unit to be started, animation parameters of each icon are determined according to the current return value and the coordinate values of each icon in the elastic unit to be started, and the animation parameters include at least one of displacement, scaling, and transparency.
在本公开实施例中,根据返回值和待启动弹性单元中各个坐标的坐标值,确定各个图标的动画参数,使得各个图标的动画参数也符合弹性数值变化规律,从而使桌面动画中各个图标的运动相互关联,且符合显示物理世界弹性运动规律。In the disclosed embodiment, the animation parameters of each icon are determined based on the return value and the coordinate values of each coordinate in the elastic unit to be started, so that the animation parameters of each icon also conform to the law of elastic value change, so that the movements of each icon in the desktop animation are interrelated and conform to the law of elastic movement of the display physical world.
需要说明的是,图标的位移是在弹性单元中图标的位移,例如,以行为单位将桌面的图标划分为多个弹性单元,图标的位移该图标在行方向上的位移。在桌面动画的多个帧中,前一帧中图标的位移大于后一帧中图标的位移,从而在桌面动画中呈现出图标由远及近的动画效果。It should be noted that the displacement of the icon is the displacement of the icon in the elastic unit. For example, the icons on the desktop are divided into multiple elastic units in rows, and the displacement of the icon is the displacement of the icon in the row direction. In multiple frames of the desktop animation, the displacement of the icon in the previous frame is greater than the displacement of the icon in the next frame, thereby presenting an animation effect of icons moving from far to near in the desktop animation.
图标的缩放比例是相对桌面中图标的正常尺寸的比例。在桌面动画的多个帧中,前一帧中图标的缩放比例大于后一帧中图标的缩放比例,从而在桌面动画中呈现出图标由大变小的动画效果。The icon scaling ratio is the ratio relative to the normal size of the icon on the desktop. In multiple frames of the desktop animation, the icon scaling ratio in the previous frame is greater than the icon scaling ratio in the next frame, thereby presenting an animation effect of the icon changing from large to small in the desktop animation.
在桌面动画的多个帧中,前一帧图标的透明度大于后一帧中图标的透明度,从而在桌面动画中呈现出图标由透明变为不透明的动画效果。In multiple frames of the desktop animation, the transparency of the icon in the previous frame is greater than the transparency of the icon in the next frame, thereby presenting an animation effect in which the icon changes from transparent to opaque in the desktop animation.
本公开实施例中对于如何确定目标图标的位移不做特殊限定。 In the disclosed embodiment, there is no special limitation on how to determine the displacement of the target icon.
在一些实施例中,对于待启动弹性单元中的任意一个目标图标,根据当前返回值和目标图标的坐标值,确定目标图标的位移,包括:根据第一映射关系,将当前返回值映射到第一区间,得到第一映射值,第一映射关系表征对应不同帧的返回值的取值范围与第一区间的映射关系;根据目标图标的坐标值,确定目标图标距离待启动弹性单元中的中心图标的间距;根据第一映射值和间距,计算目标图标的位移。In some embodiments, for any target icon in the elastic unit to be started, the displacement of the target icon is determined according to the current return value and the coordinate value of the target icon, including: according to a first mapping relationship, mapping the current return value to a first interval to obtain a first mapping value, the first mapping relationship representing a mapping relationship between the value range of return values corresponding to different frames and the first interval; according to the coordinate value of the target icon, determining the distance between the target icon and the center icon in the elastic unit to be started; and calculating the displacement of the target icon according to the first mapping value and the distance.
需要说明的是,在本公开实施例中,返回值是一个比例数值,取值范围为(0,1),在确定目标图标的位移时,需要将当前返回值映射为第一区间中的第一映射值。本公开实施例对第一区间不做特殊限定。在一些实施例中,第一区间为(p,0),p的取值范围为500至1000。例如,第一区间为(800,0)。在本公开实施例中,将第一区间设置为(800,0),能够使桌面动画中图标的运动更加平滑。在一些实施例中,第一映射关系表征对应不同帧的返回值的取值范围与第一区间的对应关系。It should be noted that in the disclosed embodiment, the return value is a proportional value with a value range of (0,1). When determining the displacement of the target icon, the current return value needs to be mapped to the first mapping value in the first interval. The disclosed embodiment does not specifically limit the first interval. In some embodiments, the first interval is (p,0), and the value range of p is 500 to 1000. For example, the first interval is (800,0). In the disclosed embodiment, setting the first interval to (800,0) can make the movement of icons in the desktop animation smoother. In some embodiments, the first mapping relationship represents the correspondence between the value range of the return value corresponding to different frames and the first interval.
在一些实施例中,利用映射函数mapValue将当前返回值映射为第一映射值。mapValue可以用如下代码来表示:
public static double mapValueFromRangeToRange(
double value,
double fromLow,
double fromHigh,
double toLow,
double toHigh){
double fromRangeSize=fromHigh-fromLow;
double toRangeSize=toHigh-toLow;
double valueScale=(value-fromLow)/fromRangeSize;
return toLow+(valueScale*toRangeSize);
}
In some embodiments, the current return value is mapped to the first mapping value using a mapping function mapValue. mapValue can be represented by the following code:
public static double mapValueFromRangeToRange(
double value,
double fromLow,
double fromHigh,
double toLow,
double toHigh){
double fromRangeSize = fromHigh - fromLow;
double toRangeSize = toHigh - toLow;
double valueScale = (value - fromLow) / fromRangeSize;
return toLow+(valueScale*toRangeSize);
}
举例说明,当前返回值value=0.5,mapValue的计算过程如下:
fromRangeSize=1-0=1;
toRangeSize=0-800=-800;
valueScale=(0.5-0)/1=0.5;
return 800+(0.5*-800)=400;
For example, the current return value value = 0.5, the calculation process of mapValue is as follows:
fromRangeSize = 1-0 = 1;
toRangeSize = 0-800 = -800;
valueScale = (0.5 - 0) / 1 = 0.5;
return 800+(0.5*-800)=400;
得到的第一映射值为400。The first mapping value obtained is 400.
需要说明的是,在本公开实施例中,桌面中图标的坐标可以为宫格级别的坐标。如图5所示,每一个图标对应一个宫格,以左上角的图标为原点,每个图标的坐标可以用(cellX, cellY)的二元组表示,cellX表示图标的X轴坐标值,cellY表示图标的Y轴坐标值。It should be noted that in the disclosed embodiment, the coordinates of the icons on the desktop may be grid-level coordinates. As shown in FIG. 5 , each icon corresponds to a grid, with the icon in the upper left corner as the origin, and the coordinates of each icon can be expressed as (cellX, cellX represents the X-axis coordinate value of the icon, and cellY represents the Y-axis coordinate value of the icon.
相应地,在本公开实施例中,若以行为单位划分弹性单元,目标图标距离待启动弹性单元中的中心图标的间距,是目标图标与中心图标的X轴坐标值的差;若以列为单位划分弹性单元,目标图标距离待启动弹性单元中的中心图标的间距,是目标图标与中心图标的Y轴坐标值的差。本公开实施例对此不做特殊限定。Accordingly, in the embodiment of the present disclosure, if the elastic unit is divided into rows, the distance between the target icon and the center icon in the elastic unit to be activated is the difference between the X-axis coordinate values of the target icon and the center icon; if the elastic unit is divided into columns, the distance between the target icon and the center icon in the elastic unit to be activated is the difference between the Y-axis coordinate values of the target icon and the center icon. The embodiment of the present disclosure does not specifically limit this.
在一些实施例中,目标图标距离待启动弹性单元中的中心图标的间距用公式(1)表示:
gapCenterX=|cellX-centerCellX|       (1)
In some embodiments, the distance between the target icon and the center icon in the elastic unit to be activated is expressed by formula (1):
gapCenterX=|cellX-centerCellX| (1)
其中,gapCenterX为间距,cellX为目标图标的X轴坐标值,centerCellX为中心图标的X轴坐标值。Among them, gapCenterX is the gap, cellX is the X-axis coordinate value of the target icon, and centerCellX is the X-axis coordinate value of the center icon.
在一些实施例中,以行为单位划分弹性单元,图标的位移为X轴方向上的位移,根据公式(2)计算目标图标的位移:
translationX=springValueTranslation×(1×?apCenterX+b1×?apCenterX2)  (2)
In some embodiments, the elastic unit is divided into lines, the displacement of the icon is the displacement in the X-axis direction, and the displacement of the target icon is calculated according to formula (2):
translationX = springValueTranslation × ( 1 × ?apCenterX + b 1 × ?apCenterX 2 ) (2)
其中,translationX为目标图标的位移,springValueTranslation为第一映射值,gapCenterX为间距,a1、b1为常数。Wherein, translationX is the displacement of the target icon, springValueTranslation is the first mapping value, gapCenterX is the gap, and a 1 and b 1 are constants.
本公开实施例对a1、b1的取值范围不做特殊限定。在一些实施例中,a1的取值范围为(0.01,0.1),b1的取值范围为(0.05,0.2)。例如,a1=0.05,b1=0.1,能够使桌面动画中图标的运动更加平滑。The disclosed embodiment does not specifically limit the value ranges of a1 and b1 . In some embodiments, the value range of a1 is (0.01, 0.1), and the value range of b1 is (0.05, 0.2). For example, a1 = 0.05, b1 = 0.1, which can make the movement of icons in the desktop animation smoother.
本公开实施例对如何确定目标图标的缩放比例不做特殊限定。The embodiment of the present disclosure does not specifically limit how to determine the scaling ratio of the target icon.
在一些实施例中,对于待启动弹性单元中的任意一个目标图标,根据当前返回值和目标图标的坐标值,确定目标图标的缩放比例,包括:根据第二映射关系,将当前返回值映射到第二区间,得到第二映射值,第二映射关系表征对应不同帧的返回值的取值范围与第二区间的映射关系;根据目标图标的坐标值,确定目标图标距离待启动弹性单元中的中心图标的间距;根据第二映射值和间距,计算目标图标的缩放比例。In some embodiments, for any target icon in the elastic unit to be started, the scaling ratio of the target icon is determined according to the current return value and the coordinate value of the target icon, including: mapping the current return value to the second interval according to a second mapping relationship to obtain a second mapping value, the second mapping relationship representing a mapping relationship between the value range of the return value corresponding to different frames and the second interval; determining the distance between the target icon and the center icon in the elastic unit to be started according to the coordinate value of the target icon; and calculating the scaling ratio of the target icon according to the second mapping value and the spacing.
需要说明的是,在本公开实施例中,返回值是一个比例数值,取值范围为(0,1),在确定目标图标的缩放比例时,需要将当前返回值映射为第二区间中的第二映射值。本公开实施例对第二区间不做特殊限定。在一些实施例中,第二区间为(q1,q2),q1的取值范围为1.5至2.5,q2的取值范围为0.5至1.5。例如,第二区间为(2,1)。在本公开实施例中,将第二区间设置为(2,1),能够使桌面动画中图标的运动更加平滑。在一些实施例中,第二映射关系表征对应不同帧的返回值的取值范围与第二区间的对应关系。It should be noted that in the disclosed embodiment, the return value is a proportional value with a value range of (0,1). When determining the scaling ratio of the target icon, the current return value needs to be mapped to a second mapping value in the second interval. The disclosed embodiment does not specifically limit the second interval. In some embodiments, the second interval is (q1, q2), the value range of q1 is 1.5 to 2.5, and the value range of q2 is 0.5 to 1.5. For example, the second interval is (2,1). In the disclosed embodiment, setting the second interval to (2,1) can make the movement of icons in the desktop animation smoother. In some embodiments, the second mapping relationship represents the correspondence between the value range of the return value corresponding to different frames and the second interval.
在本公开实施例中,若以行为单位划分弹性单元,目标图标距离待启动弹性单元中的中心图标的间距,是目标图标与中心图标的X轴坐标值的差;若以列为单位划分弹性单元,目标图标距离待启动弹性单元中的中心图标的间距,是目标图标与中心图标的Y轴坐标值 的差。本公开实施例对此不做特殊限定。在一些实施例中,目标图标距离待启动弹性单元中的中心图标的间距用公式(1)表示。In the embodiment of the present disclosure, if the elastic unit is divided into rows, the distance between the target icon and the center icon in the elastic unit to be started is the difference between the X-axis coordinate values of the target icon and the center icon; if the elastic unit is divided into columns, the distance between the target icon and the center icon in the elastic unit to be started is the difference between the Y-axis coordinate values of the target icon and the center icon. The present disclosure does not specifically limit this. In some embodiments, the distance between the target icon and the center icon in the elastic unit to be activated is expressed by formula (1).
在一些实施例中,以行为单位划分弹性单元,根据公式(3)计算目标图标的缩放比例:
In some embodiments, the elastic unit is divided into lines, and the scaling ratio of the target icon is calculated according to formula (3):
其中,scale为目标图标的缩放比例,springValueScale为第二映射值,gapCenterX为间距,2、b2为常数。Among them, scale is the scaling ratio of the target icon, springValueScale is the second mapping value, gapCenterX is the spacing, and b2 and b2 are constants.
本公开实施例对2、b2的取值范围不做特殊限定。在一些实施例中,a2的取值范围为(1,2),b2的取值范围为(0,1)。例如,a2=1.6,b2=0.4,能够使桌面动画中图标的运动更加平滑。The disclosed embodiments do not specifically limit the value ranges of a2 and b2 . In some embodiments, the value range of a2 is (1, 2), and the value range of b2 is (0, 1). For example, a2 = 1.6, b2 = 0.4, which can make the movement of icons in desktop animation smoother.
本公开实施例对于如何计算目标图标的透明度不做特殊限定。The embodiment of the present disclosure does not specifically limit how to calculate the transparency of the target icon.
在一些实施例中,对于待启动弹性单元中的任意一个目标图标,计算目标图标的透明度,包括:根据当前返回值,计算目标图标的透明度。In some embodiments, for any target icon in the elastic unit to be activated, calculating the transparency of the target icon includes: calculating the transparency of the target icon according to the current return value.
在一些实施例中,根据公式(4)计算目标图标的透明度:
alpha=springValuec        (4)
In some embodiments, the transparency of the target icon is calculated according to formula (4):
alpha=springValue c (4)
其中,alpha为目标图标的透明度,springValue为当前返回值,c为常数。Among them, alpha is the transparency of the target icon, springValue is the current return value, and c is a constant.
本公开实施例对c的取值范围不做特殊限定。在一些实施例中,c的取值范围为(2,6)。在一些实施例中,c=4,能够使桌面动画中图标的运动更加平滑。The embodiment of the present disclosure does not specifically limit the value range of c. In some embodiments, the value range of c is (2, 6). In some embodiments, c=4, which can make the movement of icons in the desktop animation smoother.
在一些实施例中,根据当前返回值,确定各个待启动弹性单元的动画参数,包括:对于任意一个待启动弹性单元,根据当前返回值和待启动弹性单元中小组件(widget)的位置,确定小组件的动画参数,动画参数包括位移、缩放比例、透明度中的至少一者。In some embodiments, animation parameters of each elastic unit to be started are determined based on the current return value, including: for any elastic unit to be started, animation parameters of the widget are determined based on the current return value and the position of the widget in the elastic unit to be started, and the animation parameters include at least one of displacement, scaling, and transparency.
本公开实施例对于如何确定widget的动画参数不做特殊限定。The disclosed embodiment does not specifically limit how to determine the animation parameters of the widget.
例如,如果widget居中展示(在一行的中间位置)则不计算widget的位移,只计算缩放比例和透明度,可以将当前返回值作为widget的缩放比例。For example, if the widget is displayed in the center (in the middle of a row), the widget's displacement is not calculated, only the scaling ratio and transparency are calculated. The current return value can be used as the scaling ratio of the widget.
如果widget不是居中展示,而是位于桌面的左边/右边,则计算widget的位移、缩放比例、透明度,其中,位移表示为springValueTranslation×0.5,springValueTranslation为第一映射值。If the widget is not displayed in the center but is located on the left/right side of the desktop, the displacement, scaling, and transparency of the widget are calculated, where the displacement is expressed as springValueTranslation×0.5, and springValueTranslation is the first mapping value.
在一些实施例中,参照图2,在获取对应待处理帧的当前返回值之前,显示方法还包括:S41、获取桌面中各个图标的坐标值;S42、根据各个图标的坐标值,将多个图标划分为多个弹性单元,每一个弹性单元包括多个图标。In some embodiments, referring to FIG. 2 , before obtaining the current return value corresponding to the frame to be processed, the display method further includes: S41, obtaining the coordinate values of each icon on the desktop; S42, dividing the multiple icons into multiple elastic units according to the coordinate values of each icon, each elastic unit including multiple icons.
本公开实施例对于如何将桌面中的图标划分为多个弹性单元不做特殊限定。例如,以行为单位,将一行或多行图标划分到一个弹性单元中。例如,以列为单位,将一列或多列图标划分到一个弹性单元中。 The disclosed embodiment does not specifically limit how to divide the icons on the desktop into multiple elastic units. For example, in terms of rows, one or more rows of icons are divided into one elastic unit. For example, in terms of columns, one or more columns of icons are divided into one elastic unit.
在本公开实施例中,在以行为单位划分弹性单元时,同一个弹性单元对应的行具有相同的弹性单元id。例如,如图6所示,id=0的行为一个弹性单元,id=1的行为一个弹性单元,id=2的行为一个弹性单元,id=3的行为一个弹性单元。In the disclosed embodiment, when elastic units are divided into rows, rows corresponding to the same elastic unit have the same elastic unit id. For example, as shown in FIG6 , row id=0 is an elastic unit, row id=1 is an elastic unit, row id=2 is an elastic unit, and row id=3 is an elastic unit.
在一些实施例中,根据各个图标的坐标值,将多个图标划分为多个弹性单元,包括:将桌面中的一行或多行图标确定为启动行图标;将与启动行图标的行距相等的一行或多行图标划分到一个弹性单元中。In some embodiments, multiple icons are divided into multiple elastic units according to the coordinate values of each icon, including: determining one or more rows of icons in the desktop as startup row icons; and dividing one or more rows of icons with the same row spacing as the startup row icons into one elastic unit.
在本公开实施例中启动行图标可以任意指定。In the embodiment of the present disclosure, the start line icon can be specified arbitrarily.
在一些实施例中,将桌面中的一行或多行图标确定为启动行图标,包括:将桌面中位于中心位置的一行或两行图标确定为启动行图标。In some embodiments, determining one or more rows of icons in the desktop as launch row icons includes: determining one or two rows of icons in the center of the desktop as launch row icons.
在本公开实施例中,若桌面中有奇数行图标,则中间的一行图标所在的位置为中心位置;例如,桌面中有7行图标,按照1至7顺序编号,则第4行图标所在的位置为中心位置。若桌面中有偶数行图标,则中间的两行图标所在的位置为中心位置;例如,桌面中有6行图标,按照1至6顺序编号,则第3行和第4行图标所在的位置为中心位置。在其他示例性的实施方式中,中心位置也可以根据其他方式确认,例如,将中间的一个或多个图标所在位置确认为中心位置。In the disclosed embodiment, if there are an odd number of rows of icons on the desktop, the position of the middle row of icons is the center position; for example, if there are 7 rows of icons on the desktop, numbered in sequence from 1 to 7, the position of the 4th row of icons is the center position. If there are an even number of rows of icons on the desktop, the positions of the two middle rows of icons are the center position; for example, if there are 6 rows of icons on the desktop, numbered in sequence from 1 to 6, the positions of the 3rd and 4th rows of icons are the center position. In other exemplary embodiments, the center position may also be confirmed in other ways, for example, confirming the position of one or more icons in the middle as the center position.
第二方面,参照图3,本公开实施例提供一种终端,其可以包括但不限于:一个或多个处理器101,存储器102,一个或多个I/O接口103。In a second aspect, referring to FIG. 3 , an embodiment of the present disclosure provides a terminal, which may include but is not limited to: one or more processors 101 , a memory 102 , and one or more I/O interfaces 103 .
存储器102,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现本公开实施例第一方面所述的终端桌面的显示方法。The memory 102 stores one or more programs. When the one or more programs are executed by one or more processors, the one or more processors implement the terminal desktop display method described in the first aspect of the embodiment of the present disclosure.
一个或多个I/O接口103,连接在处理器与存储器之间,配置为实现处理器与存储器的信息交互。One or more I/O interfaces 103 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
处理器101为具有数据处理能力的器件,其包括但不限于中央处理器(CPU)等;存储器102为具有数据存储能力的器件,其包括但不限于随机存取存储器(RAM,如SDRAM、DDR等)、只读存储器(ROM)、带电可擦可编程只读存储器(EEPROM)、闪存(FLASH);I/O接口(读写接口)103连接在处理器101与存储器102间,能实现处理器101与存储器102的信息交互,其包括但不限于数据总线(Bus)等。The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, such as SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I/O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information exchange between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.
在一些实施例中,处理器101、存储器102和I/O接口103通过总线104相互连接,进而与计算设备的其它组件连接。In some embodiments, the processor 101 , the memory 102 , and the I/O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
第三方面,参照图4,本公开实施例提供一种计算机可读介质,其上存储有计算机程序,程序被处理器执行时实现本公开实施例第一方面所述的终端桌面的显示方法。In a third aspect, referring to FIG. 4 , an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for displaying a terminal desktop described in the first aspect of the embodiment of the present disclosure is implemented.
为了使本领域技术人员能够更清楚地理解本公开实施例提供的技术方案,下面通过实施例,对本公开实施例提供的技术方案进行详细说明: In order to enable those skilled in the art to more clearly understand the technical solutions provided by the embodiments of the present disclosure, the technical solutions provided by the embodiments of the present disclosure are described in detail below through examples:
实施例Example
本实施例中,基于如图5所示的桌面布局的宫格级坐标系,对每个图标的动画参数进行计算,进而得到桌面动画。流程如下。In this embodiment, based on the grid-level coordinate system of the desktop layout as shown in FIG5 , the animation parameters of each icon are calculated to obtain the desktop animation.
读取所有图标的坐标位置(cellX,cellY),以此为基础来进行后续的分组和计算。Read the coordinate positions (cellX, cellY) of all icons and use them as a basis for subsequent grouping and calculation.
根据cellY,计算与总行数中心位置的距离,如图6所示,距离相同行划分到一组(一个弹性单元)。According to cellY, the distance from the center position of the total number of rows is calculated, as shown in Figure 6, and the rows with the same distance are divided into one group (one elastic unit).
如图6所示,整个桌面图标是一个链式弹性系统,该系统由4个弹性单元组成(分别是id=0、id=1、id=2、id=3的这四组图标)。动画启动时,由全部弹性单元组成的大系统开始返回0-1的返回值(该返回值符合弹性数值变化规律),此时id=0的这组开始启动,进而向下传递返回值到id=1、id=2、id=3,后续的弹性单元以上一个弹性单元传递来的值为启动值,开始计算动画参数。返回值是一个取值范围为0至1的比例值,计算动画参数时,需要将其映射到满足要求的动画参数的数值范围。需要说明的是,此时在桌面动画中能够实现一组一组牵拉一组、一整行一整行出现的动画效果。As shown in Figure 6, the entire desktop icon is a chain elastic system, which is composed of 4 elastic units (the four groups of icons with id=0, id=1, id=2, and id=3). When the animation starts, the large system composed of all elastic units begins to return a return value of 0-1 (the return value conforms to the law of elastic numerical change). At this time, the group with id=0 starts to start, and then passes the return value downward to id=1, id=2, and id=3. The subsequent elastic units use the value passed by the previous elastic unit as the starting value to start calculating the animation parameters. The return value is a proportional value ranging from 0 to 1. When calculating the animation parameters, it is necessary to map it to the numerical range of the animation parameters that meet the requirements. It should be noted that at this time, in the desktop animation, the animation effect of pulling one group by one group and appearing one row at a time can be achieved.
根据当前返回值,对组内图标的动画参数进行二次计算,获得组内图标位移、缩放比例、透明度上的差异。According to the current return value, the animation parameters of the icons in the group are calculated twice to obtain the differences in displacement, scaling, and transparency of the icons in the group.
1)对当前返回值进行映射,位移从(0,1)映射至(800,0),缩放从(0,1)映射至(2,1)。1) Map the current return value, the displacement is mapped from (0,1) to (800,0), and the scale is mapped from (0,1) to (2,1).
在本实施例中,利用映射函数mapValue进行映射,可以表示为:
springValueTranslation=mapValue(value,0,1,800,0);
springValueScale=mapValue(value,0,1,2,1);
In this embodiment, mapping is performed using a mapping function mapValue, which can be expressed as:
springValueTranslation = mapValue(value,0,1,800,0);
springValueScale = mapValue(value,0,1,2,1);
其中,springValueTranslation为对应位移的第一映射值,pringValueScale为对应缩放比例的第二映射值。Among them, springValueTranslation is the first mapping value corresponding to the displacement, and springValueScale is the second mapping value corresponding to the scaling ratio.
mapValue可以用如下代码来表示:
public static double mapValueFromRangeToRange(
double value,
double fromLow,
double fromHigh,
double toLow,
double toHigh){
double fromRangeSize=fromHigh-fromLow;
double toRangeSize=toHigh-toLow;
double valueScale=(value-fromLow)/fromRangeSize;
return toLow+(valueScale*toRangeSize);
}
mapValue can be expressed as follows:
public static double mapValueFromRangeToRange(
double value,
double fromLow,
double fromHigh,
double toLow,
double toHigh){
double fromRangeSize = fromHigh - fromLow;
double toRangeSize = toHigh - toLow;
double valueScale = (value - fromLow) / fromRangeSize;
return toLow+(valueScale*toRangeSize);
}
在本实施例中,对于widget的处理策略如下:如果widget居中展示(在一行的中间位置)则不计算widget的位移,只计算缩放比例和透明度,其中,可以将当前返回值作为widget的缩放比例。如果widget不是居中展示,而是位于桌面的左边/右边,则计算widget的位移、缩放比例、透明度,其中,位移表示为springValueTranslation×0.5,其中,springValueTranslation为第一映射值。In this embodiment, the processing strategy for the widget is as follows: if the widget is displayed in the center (in the middle of a row), the displacement of the widget is not calculated, only the scaling ratio and transparency are calculated, wherein the current return value can be used as the scaling ratio of the widget. If the widget is not displayed in the center, but is located on the left/right side of the desktop, the displacement, scaling ratio, and transparency of the widget are calculated, wherein the displacement is expressed as springValueTranslation×0.5, wherein springValueTranslation is the first mapping value.
2)计算目标图标在X轴上距离中心图标的间距。
gapCenterX=|cellX-centerCellX|
2) Calculate the distance between the target icon and the center icon on the X-axis.
gapCenterX=|cellX-centerCellX|
其中,gapCenterX为间距,cellX为目标图标的X轴坐标值,centerCellX为中心图标的X轴坐标值。Among them, gapCenterX is the gap, cellX is the X-axis coordinate value of the target icon, and centerCellX is the X-axis coordinate value of the center icon.
在本实施例中,每一行图标数量的奇偶不同,算法略有不同。如图6所示,总共4列,为偶数列,则取中间两列为中心列(cellX=1和cellX=2的两列为中心列)。每行的四个图标从左到右的gapCenterX依次为1,0,0,1。In this embodiment, the number of icons in each row is different, and the algorithm is slightly different. As shown in Figure 6, there are 4 columns in total, and they are even columns, so the two middle columns are taken as the center columns (the two columns with cellX=1 and cellX=2 are the center columns). The gapCenterX of the four icons in each row from left to right is 1, 0, 0, 1.
如果布局为奇数列(比如5列),则cellX=2为中心列,那么每行的5个图标从左到右的gapCenterX依次为2,1,0,1,2。If the layout is an odd number of columns (such as 5 columns), cellX=2 is the center column, and the gapCenterX of the 5 icons in each row from left to right are 2, 1, 0, 1, 2 respectively.
3)根据cellX,计算不同图标在X方向的偏移。
translationX=springValueTranslation×(0.05×gapCenterX+0.1×gapCenterX2)
3) According to cellX, calculate the offset of different icons in the X direction.
translationX = springValueTranslation × (0.05 × gapCenterX + 0.1 × gapCenterX 2 )
其中,translationX为目标图标的位移,springValueTranslation为第一映射值,gapCenterX为间距。Among them, translationX is the displacement of the target icon, springValueTranslation is the first mapping value, and gapCenterX is the gap.
4)根据cellX,计算X、Y方向的缩放。
scale=springValueScale(1.6+0.4×gapCenterX)
4) According to cellX, calculate the scaling in the X and Y directions.
scale = springValueScale (1.6 + 0.4 × gapCenterX)
其中,scale为目标图标的缩放比例,springValueScale为第二映射值,gapCenterX为间距。Among them, scale is the scaling ratio of the target icon, springValueScale is the second mapping value, and gapCenterX is the spacing.
5)计算透明度。
alpha=springValue4
5) Calculate transparency.
alpha=springValue 4
其中,alpha为目标图标的透明度,springValue为当前返回值。Among them, alpha is the transparency of the target icon, and springValue is the current return value.
在本实施例中,同一行中的图标、widget的透明度相同。In this embodiment, icons and widgets in the same row have the same transparency.
图7A、图7B、图7C、图7D、图7E、图7F为基于本实施例生成的桌面动画的示意图,可以看到,桌面动画中,所有图标并非一起出现,而是一组一组出现,且组内图标在位移、缩放比例、透明度上均不相同,而且不同帧中组内图标在位移、缩放比例、透明度的变化符合弹性运行规律,表现出彼此牵拉、错落有致的动画效果。Figures 7A, 7B, 7C, 7D, 7E, and 7F are schematic diagrams of desktop animations generated based on the present embodiment. It can be seen that in the desktop animation, all icons do not appear together, but appear in groups, and the icons in the group are different in displacement, scaling, and transparency. Moreover, the changes in displacement, scaling, and transparency of the icons in the group in different frames conform to the elastic operation rules, showing an animation effect of pulling each other and staggered.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置 中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。It can be understood by those skilled in the art that all or some of the steps, systems, and devices in the method disclosed above may be The functional modules/units in the can be implemented as software, firmware, hardware and appropriate combinations thereof. In hardware implementations, the division between the functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
在本公开实施例中,根据返回值确定图标的动画参数,并根据动画参数生成界面图像,多个帧的界面图像组成桌面动画,对应不同帧的返回值彼此关联,且符合弹性数值变化规律,使得基于该动画参数生成的桌面动画中,不同图标相互关联,且图标的运动符合现实物理世界的弹性运动规律,从而使桌面切换过程中图标的动画效果更加生动、更加流畅,桌面切换过程更加平滑,提升了用户的使用体验。In the disclosed embodiment, the animation parameters of the icon are determined based on the return value, and the interface image is generated based on the animation parameters. The interface images of multiple frames constitute a desktop animation. The return values corresponding to different frames are associated with each other and conform to the law of elastic numerical changes. Therefore, in the desktop animation generated based on the animation parameters, different icons are associated with each other, and the movement of the icons conforms to the law of elastic movement in the real physical world, so that the animation effect of the icons in the desktop switching process is more vivid and smoother, the desktop switching process is smoother, and the user experience is improved.
本文已经公开了示例实施例,并且虽然采用了具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。 Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and/or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and/or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.

Claims (15)

  1. 一种终端桌面的显示方法,包括:A method for displaying a terminal desktop, comprising:
    获取对应待处理帧的当前返回值,其中,所述待处理帧为组成桌面动画的多个帧中的任意一者,对应不同帧的返回值符合弹性数值变化规律;Obtaining the current return value of the corresponding frame to be processed, wherein the frame to be processed is any one of the multiple frames constituting the desktop animation, and the return values corresponding to different frames conform to the law of elastic value change;
    根据所述当前返回值确定所述待处理帧对应的动画参数;以及Determine the animation parameter corresponding to the frame to be processed according to the current return value; and
    根据所述动画参数输出所述待处理帧的界面图像。The interface image of the frame to be processed is output according to the animation parameters.
  2. 根据权利要求1所述的显示方法,其中,根据所述当前返回值确定所述待处理帧对应的动画参数,包括:The display method according to claim 1, wherein determining the animation parameter corresponding to the frame to be processed according to the current return value comprises:
    根据多个弹性单元的启动时间确定所述待处理帧对应的待启动弹性单元,其中,多个所述弹性单元的启动时间符合弹性数值变化规律,桌面中的多个图标划分为所述多个弹性单元,每一个弹性单元包括多个图标;Determine the elastic unit to be started corresponding to the frame to be processed according to the start time of the plurality of elastic units, wherein the start time of the plurality of elastic units conforms to the elastic value change rule, the plurality of icons on the desktop are divided into the plurality of elastic units, and each elastic unit includes a plurality of icons;
    根据所述当前返回值,确定各个所述待启动弹性单元中图标的动画参数,得到所述待处理帧对应的动画参数。According to the current return value, the animation parameters of the icons in each of the elastic units to be activated are determined to obtain the animation parameters corresponding to the frame to be processed.
  3. 根据权利要求2所述的显示方法,其中,根据所述当前返回值,确定各个所述待启动弹性单元中图标的动画参数,包括:The display method according to claim 2, wherein determining the animation parameters of the icons in each of the elastic units to be started according to the current return value comprises:
    对于任意一个所述待启动弹性单元,根据所述当前返回值和所述待启动弹性单元中各个图标的坐标值,确定各个图标的动画参数,其中,所述动画参数包括位移、缩放比例、透明度中的至少一者。For any of the elastic units to be activated, animation parameters of each icon are determined according to the current return value and the coordinate values of each icon in the elastic unit to be activated, wherein the animation parameters include at least one of displacement, scaling, and transparency.
  4. 根据权利要求3所述的显示方法,其中,对于所述待启动弹性单元中的任意一个目标图标,根据所述当前返回值和所述目标图标的坐标值,确定所述目标图标的位移,包括:The display method according to claim 3, wherein, for any target icon in the elastic unit to be activated, determining the displacement of the target icon according to the current return value and the coordinate value of the target icon comprises:
    根据第一映射关系,将所述当前返回值映射到第一区间,得到第一映射值,其中,所述第一映射关系表征对应不同帧的返回值的取值范围与所述第一区间的映射关系;According to a first mapping relationship, the current return value is mapped to a first interval to obtain a first mapping value, wherein the first mapping relationship represents a mapping relationship between a value range of return values corresponding to different frames and the first interval;
    根据所述目标图标的坐标值,确定所述目标图标距离所述待启动弹性单元中的中心图标的间距;以及Determining the distance between the target icon and the center icon in the elastic unit to be activated according to the coordinate value of the target icon; and
    根据所述第一映射值和所述间距,计算所述目标图标的位移。The displacement of the target icon is calculated according to the first mapping value and the distance.
  5. 根据权利要求4所述的显示方法,其中,根据以下公式计算所述目标图标的位移:
    translationX=springValueTranslation×(a1×gapCenterX+b1×gapCenterX2)
    The display method according to claim 4, wherein the displacement of the target icon is calculated according to the following formula:
    translationX = springValueTranslation × (a 1 × gapCenterX + b 1 × gapCenterX 2 )
    其中,translationX为所述目标图标的位移,springValueTranslation为所述第一映射值,gapCenterX为所述间距,a1、b1为常数。Wherein, translationX is the displacement of the target icon, springValueTranslation is the first mapping value, gapCenterX is the gap, and a 1 and b 1 are constants.
  6. 根据权利要求3所述的显示方法,其中,对于所述待启动弹性单元中的任意一个目标图标,根据所述当前返回值和所述目标图标的坐标值,确定所述目标图标的缩放比例,包括: The display method according to claim 3, wherein, for any target icon in the elastic unit to be activated, determining the scaling ratio of the target icon according to the current return value and the coordinate value of the target icon comprises:
    根据第二映射关系,将所述当前返回值映射到第二区间,得到第二映射值,其中,所述第二映射关系表征对应不同帧的返回值的取值范围与所述第二区间的映射关系;According to a second mapping relationship, mapping the current return value to a second interval to obtain a second mapping value, wherein the second mapping relationship represents a mapping relationship between a value range of return values corresponding to different frames and the second interval;
    根据所述目标图标的坐标值,确定所述目标图标距离所述待启动弹性单元中的中心图标的间距;以及Determining the distance between the target icon and the center icon in the elastic unit to be activated according to the coordinate value of the target icon; and
    根据所述第二映射值和所述间距,计算所述目标图标的缩放比例。The scaling ratio of the target icon is calculated according to the second mapping value and the distance.
  7. 根据权利要求6所述的显示方法,其中,根据以下公式计算所述目标图标的缩放比例:
    The display method according to claim 6, wherein the scaling ratio of the target icon is calculated according to the following formula:
    其中,scale为所述目标图标的缩放比例,springValueScale为所述第二映射值,gapCenterX为所述间距,a2、b2为常数。Wherein, scale is the scaling ratio of the target icon, springValueScale is the second mapping value, gapCenterX is the spacing, and a 2 and b 2 are constants.
  8. 根据权利要求3所述的显示方法,其中,对于所述待启动弹性单元中的任意一个目标图标,计算所述目标图标的透明度,包括:The display method according to claim 3, wherein, for any target icon in the elastic unit to be activated, calculating the transparency of the target icon comprises:
    根据所述当前返回值,计算所述目标图标的透明度。The transparency of the target icon is calculated according to the current return value.
  9. 根据权利要求8所述的显示方法,其中,根据以下公式计算所述目标图标的透明度:
    alpha=springValuec
    The display method according to claim 8, wherein the transparency of the target icon is calculated according to the following formula:
    alpha=springValue c
    其中,alph为所述目标图标的透明度,springValue为所述当前返回值,c为常数。Among them, alph is the transparency of the target icon, springValue is the current return value, and c is a constant.
  10. 根据权利要求2所述的显示方法,其中,根据所述当前返回值,确定各个所述待启动弹性单元的动画参数,包括:The display method according to claim 2, wherein, according to the current return value, determining the animation parameters of each of the elastic units to be started comprises:
    对于任意一个所述待启动弹性单元,根据所述当前返回值和所述待启动弹性单元中小组件的位置,确定所述小组件的动画参数,其中,所述动画参数包括位移、缩放比例、透明度中的至少一者。For any of the elastic units to be started, the animation parameters of the widget are determined according to the current return value and the position of the widget in the elastic unit to be started, wherein the animation parameters include at least one of displacement, scaling, and transparency.
  11. 根据权利要求1至10中任意一项所述的显示方法,其中,在获取对应待处理帧的当前返回值之前,所述显示方法还包括:The display method according to any one of claims 1 to 10, wherein before obtaining the current return value corresponding to the frame to be processed, the display method further comprises:
    获取桌面中各个图标的坐标值;Get the coordinate values of each icon on the desktop;
    根据各个图标的坐标值,将多个图标划分为多个所述弹性单元,其中,每一个所述弹性单元包括多个图标。According to the coordinate values of each icon, a plurality of icons are divided into a plurality of elastic units, wherein each of the elastic units includes a plurality of icons.
  12. 根据权利要求11所述的显示方法,其中,根据各个图标的坐标值,将多个图标划分为多个所述弹性单元,包括:The display method according to claim 11, wherein dividing a plurality of icons into a plurality of elastic units according to the coordinate values of the respective icons comprises:
    将桌面中的一行或多行图标确定为启动行图标;以及Identifying one or more rows of icons on the desktop as launch row icons; and
    将与所述启动行图标的行距相等的一行或多行图标划分到一个所述弹性单元中。One or more rows of icons having the same row spacing as that of the start row of icons are divided into one of the elastic units.
  13. 根据权利要求12所述的显示方法,其中,将桌面中的一行或多行图标确定为启动行图标,包括: The display method according to claim 12, wherein determining one or more rows of icons in the desktop as startup row icons comprises:
    将桌面中位于中心位置的一行或两行图标确定为所述启动行图标。One or two rows of icons located in the center of the desktop are determined as the startup row icons.
  14. 一种终端,包括:A terminal, comprising:
    一个或多个处理器;one or more processors;
    存储器,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现根据权利要求1至13中任意一项所述的终端桌面的显示方法。A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the terminal desktop display method according to any one of claims 1 to 13.
  15. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现根据权利要求1至13中任意一项所述的终端桌面的显示方法。 A computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the terminal desktop display method according to any one of claims 1 to 13 is implemented.
PCT/CN2023/095460 2022-11-11 2023-05-22 Terminal desktop display method, terminal and computer-readable medium WO2024098713A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211411829.1 2022-11-11
CN202211411829.1A CN118069003A (en) 2022-11-11 2022-11-11 Display method of terminal desktop, terminal and computer readable medium

Publications (1)

Publication Number Publication Date
WO2024098713A1 true WO2024098713A1 (en) 2024-05-16

Family

ID=91031841

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/095460 WO2024098713A1 (en) 2022-11-11 2023-05-22 Terminal desktop display method, terminal and computer-readable medium

Country Status (2)

Country Link
CN (1) CN118069003A (en)
WO (1) WO2024098713A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329649A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 Cartoon display method, terminal and computer-readable recording medium
CN107340964A (en) * 2017-06-02 2017-11-10 武汉斗鱼网络科技有限公司 The animation effect implementation method and device of a kind of view
CN109271073A (en) * 2018-08-31 2019-01-25 努比亚技术有限公司 Desktop dynamic icon implementation method, terminal and computer-readable medium
CN114691002A (en) * 2020-12-14 2022-07-01 华为技术有限公司 Page sliding processing method and related device
CN114995929A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Popup window display method and device
CN115220621A (en) * 2021-04-20 2022-10-21 华为技术有限公司 Graphical interface display method, electronic device, medium, and program product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107340964A (en) * 2017-06-02 2017-11-10 武汉斗鱼网络科技有限公司 The animation effect implementation method and device of a kind of view
CN107329649A (en) * 2017-06-14 2017-11-07 努比亚技术有限公司 Cartoon display method, terminal and computer-readable recording medium
CN109271073A (en) * 2018-08-31 2019-01-25 努比亚技术有限公司 Desktop dynamic icon implementation method, terminal and computer-readable medium
CN114691002A (en) * 2020-12-14 2022-07-01 华为技术有限公司 Page sliding processing method and related device
CN115220621A (en) * 2021-04-20 2022-10-21 华为技术有限公司 Graphical interface display method, electronic device, medium, and program product
CN114995929A (en) * 2021-11-17 2022-09-02 荣耀终端有限公司 Popup window display method and device

Also Published As

Publication number Publication date
CN118069003A (en) 2024-05-24

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
US7710429B2 (en) Stationary semantic zooming
WO2022110903A1 (en) Method and system for rendering panoramic video
US20120102437A1 (en) Notification Group Touch Gesture Dismissal Techniques
CN111803945B (en) Interface rendering method and device, electronic equipment and storage medium
US20120102400A1 (en) Touch Gesture Notification Dismissal Techniques
CN112835499B (en) Carousel graph display method, device, equipment and medium
WO2019085906A1 (en) Exposure calculation method and device, terminal, and readable storage medium
CN108596955A (en) A kind of image detecting method, image detection device and mobile terminal
CN109636885B (en) Sequential frame animation production method and system for H5 page
CN107704242A (en) The horizontal application method and electronic equipment of a kind of vertically displaying screen
US20230316476A1 (en) Image splicing method and apparatus, and electonic device and computer-readable storage medium
CN106294463A (en) The data point update method of a kind of performance graph and equipment
CN114041111A (en) Handwriting drawing method, apparatus, electronic device, medium, and program product
CN103400565A (en) Interface blocked refreshing method based on GDI (Graphics Device Interface)
US20140325404A1 (en) Generating Screen Data
WO2024098713A1 (en) Terminal desktop display method, terminal and computer-readable medium
JP2021089711A (en) Video jitter detection method and apparatus
CN114924822B (en) Screenshot method and device of three-dimensional topological structure, electronic equipment and storage medium
US20130063482A1 (en) Application programming interface for a bitmap composition engine
CN113268301B (en) Animation generation method, device, equipment and storage medium
CN114629800A (en) Visual generation method, device, terminal and storage medium for industrial control network target range
CN113703653A (en) Image processing method, device, equipment and computer readable storage medium
CN107404427A (en) One kind chat background display method and device
CN106775634A (en) One kind displaying block display method and device