Animation playing method, vehicle-mounted terminal and computer program product
Patent Information
- Application Number
- CN202511688752.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2045-11-18
AI Technical Summary
然而,某些动画在播放时会存在跳帧或残影现象,从而影响用户体验
[0024]第三方面,本申请实施例提供一种计算机程序产品,包括计算机程序或指令,所述计算机程序或指令被处理器或车载终端执行时,实现本申请第一方面所述的方法。
Smart Images

Figure CN121143695B_ABST
Abstract
Description
Technical Field
[0001] This application relates to vehicle technology, including but not limited to animation playback methods, in-vehicle terminals, and computer program products. Background Technology
[0002] Animation playback is a key technology in graphical user interface design, widely used in in-vehicle terminals, mobile devices, web pages, and games. Its core objective is to achieve a smooth visual motion effect by continuously displaying frames. However, some animations exhibit frame skipping or ghosting during playback, thus affecting the user experience. Summary of the Invention
[0003] In a first aspect, embodiments of this application provide an animation playback method, the method comprising: when a machine instruction is executed, determining the playback start position of a plurality of frame images based on the start position and / or end position of the repositioned animation playback; and sequentially playing the frame images based on the playback start position of the frame images.
[0004] In this embodiment of the application, when the machine instruction is executed, the playback start position of multiple frame images is determined based on the start position and / or end position of the repositioned animation playback; thereby, the frame images are played sequentially based on the playback start position of the frame images; thus, it is beneficial to reduce frame skipping or ghosting phenomena generated during animation playback.
[0005] Further, in some embodiments, determining the playback start position of multiple frame images based on the start and / or end positions of the repositioned animation playback includes: determining the playback start position of the (i+1)th frame image based on the start and / or end positions of the repositioned animation playback, the playback order of the i-th frame image in the multiple frame images, and the playback start position of the i-th frame image; i is an integer greater than or equal to 0; the start and / or end positions of the repositioned animation playback are adapted to the current screen refresh rate, such that the first inter-frame distance when the animation is played at the current screen refresh rate is less than a distance threshold, and the distance threshold is less than or equal to the minimum inter-frame distance that causes frame skipping or ghosting during animation playback.
[0006] In the above embodiments, the start and / or end positions of the repositioned animation playback are adapted to the current screen refresh rate, so that the first frame distance when the animation is played at the current screen refresh rate is less than a distance threshold, and the distance threshold is less than or equal to the minimum frame distance that causes frame skipping or ghosting during animation playback; thus, by determining the playback start position of multiple frame images based on the start and / or end positions of the repositioned animation playback, the frame distance can be effectively shortened, thereby reducing frame skipping and ghosting caused by low frame rates.
[0007] In some embodiments, the step of sequentially playing the frame images based on the playback start position of the frame images includes: determining the transparency parameter of the (i+1)th frame image according to the playback order of the i-th frame image in the plurality of frame images; wherein i is an integer greater than or equal to 0, and the transparency parameter is negatively correlated with the playback order; and sequentially playing the frame images based on the playback start position of the frame images and the transparency parameter.
[0008] In the above embodiments, the repositioning of the animation playback start position and / or initial position, combined with the transparency parameter, forms a progressive animation playback mode. Specifically, not only is the inter-frame distance of the animation playback shortened based on repositioning, but different transparency values are also assigned according to the playback order of each frame. This animation playback mode, formed by the combined effect of repositioning and transparency parameters, can further optimize the visual effect of the animation in low frame rate environments, further reduce the visual persistence effect during animation playback, and allow users to experience a more coherent and natural animation process.
[0009] In some embodiments, the method further includes: displaying a configuration interface; the configuration interface being used for user-defined start and end positions of animation playback; and determining the start and / or end positions of the repositioned animation playback based on the start and / or end positions received by the configuration interface.
[0010] In the above embodiments, by providing a configuration interface that allows users to customize the start and end positions of animation playback, and redetermining the playback range (i.e., start and / or end positions) of the animation based on the position information set by the user, the ghosting problem caused by the animation running at low frame rates can be effectively reduced while supporting user-defined playback range of the animation.
[0011] Furthermore, in some embodiments, determining the start and / or end position of the repositioned animation playback based on the start and end positions received by the configuration interface includes: determining a second inter-frame distance when the animation is played at the current screen refresh rate based on the animation playback duration, the current screen refresh rate, and the start and end positions received by the configuration interface; if the second inter-frame distance is less than the distance threshold, using the start position received by the configuration interface as the start position of the repositioned animation playback and the end position received by the configuration interface as the end position of the repositioned animation playback.
[0012] In the above embodiments, the start and end positions of the animation playback defined by the user through the configuration interface are not directly determined based on these two custom parameters to determine the playback start positions of multiple frame images. Instead, the second inter-frame distance of the animation at the current screen refresh rate is first determined based on these two custom parameters. Only when this inter-frame distance is less than a certain distance threshold is the playback start position of multiple frame images determined based on these two custom parameters, and then the frame images are played sequentially based on this. Thus, by calculating the second inter-frame distance of the animation at the current screen refresh rate and comparing it with the distance threshold, it is determined whether to use the start and end positions received by the configuration interface as the final start and end points of the animation playback. By calculating and comparing the second inter-frame distance, the problem of excessively large second inter-frame distances caused by user customization can be avoided in low frame rate environments, thereby avoiding the ghosting problem caused by excessively large second inter-frame distances.
[0013] In some embodiments, the method further includes prompting the user to redefine the start and end positions of the animation playback when the second inter-frame distance is greater than or equal to the distance threshold.
[0014] In the above embodiments, based on the start and end positions of the animation playback defined by the user through the configuration interface, the second frame distance is first determined. If the second frame distance is greater than or equal to the distance threshold, instead of continuing to calculate the playback start position of each frame based on the start and end positions of the animation playback configured by the user, the user is prompted to redefine the start and end positions of the animation playback, thereby avoiding frame skipping and ghosting phenomena in subsequent animation playback due to unreasonable start and end positions configured by the user.
[0015] In some embodiments, the current screen where the animation is playing is a first screen, and the method further includes: in response to the screen playing the animation switching from the first screen to a second screen, obtaining the size of the second screen and / or the refresh rate of the second screen; in response to the size of the second screen or the refresh rate of the second screen being different from that of the first screen, relocating the start position and / or end position of the animation playback.
[0016] Considering that screen switching during animation playback may cause frame skipping and ghosting due to changes in screen size and / or refresh rate, the above embodiment addresses this issue by repositioning the start and / or end positions of the animation playback in response to screen switching, especially when the screen size and / or refresh rate differs between the pre-switching and post-switching screens. This improves the frame skipping and ghosting issues caused by screen switching.
[0017] In some embodiments, the current screen where the animation is playing is a first screen, and the method further includes: in response to the screen playing the animation switching from the first screen to a second screen, repositioning the start and / or end position of the animation playback if the animation playback falls into a card window on the second screen.
[0018] Considering that frame skipping and ghosting may occur in animation playback due to screen switching and the animation falling into a card window on the switched screen, the above embodiment, in response to screen switching, repositions the start and / or end positions of the animation playback when the animation falls into a card window on the switched screen, thereby improving the animation frame skipping and ghosting phenomena caused by screen switching.
[0019] In some embodiments, the method further includes: repositioning the start and / or end position of the animation playback in response to switching between different card windows on a first screen.
[0020] Considering that frame skipping and ghosting can occur during animation playback due to card window switching within the same screen, the above embodiment repositions the start and / or end positions of the animation playback in response to card window switching, thereby improving the frame skipping and ghosting issues caused by card window switching.
[0021] In some embodiments, the method further includes: repositioning the start and / or end positions of the animation playback in response to the window receiving a scaling instruction.
[0022] Considering that frame skipping and ghosting can occur during animation playback due to window scaling, the above embodiment repositions the start and / or end positions of the animation playback in response to a scaling command received by the animation playback window. This improves the frame skipping and ghosting issues caused by window scaling.
[0023] Secondly, embodiments of this application provide an in-vehicle terminal, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement the method described in the first aspect.
[0024] Thirdly, embodiments of this application provide a computer program product, including a computer program or instructions, which, when executed by a processor or vehicle terminal, implement the method described in the first aspect of this application.
[0025] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0026] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0027] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0028] Figure 1 A schematic diagram illustrating the application scenario of the animation playback method provided in this application on an in-vehicle screen; Figure 2 Schematic diagram of the implementation flow of the animation playback method provided in the embodiments of this application Figure 1 ; Figure 3 A schematic diagram illustrating the implementation process for determining the start and / or end positions of the repositioned animation playback, as provided in an embodiment of this application. Figure 4 Example diagram of the configuration interface provided in the embodiments of this application; Figure 5 A further implementation flow diagram of step 302 provided in the embodiments of this application. Figure 1 ; Figure 6 A further implementation flow diagram of step 302 provided in the embodiments of this application. Figure 2 ; Figure 7 A further implementation flow diagram of step 302 provided in the embodiments of this application. Figure 3 ; Figure 8 This application provides an illustration of a screen switching scenario. Figure 1 ; Figure 9 This application provides an illustration of a screen switching scenario. Figure 2 ; Figure 10 This application provides an illustration of a screen switching scenario. Figure 3 ; Figure 11 A schematic diagram illustrating a scenario where the card window switches according to an embodiment of this application; Figure 12 A schematic diagram illustrating a scenario where an animated window is scaled, as provided in an embodiment of this application. Figure 13 Example of an animation playback path provided in the embodiments of this application Figure 1 ; Figure 14 Example of an animation playback path provided in the embodiments of this application Figure 2 ; Figure 15 Schematic diagram of the implementation flow of the animation playback method provided in the embodiments of this application Figure 2 ; Figure 16 This is a schematic diagram of the structure of the animation playback device provided in the embodiments of this application; Figure 17 This is a schematic diagram of the structure of the vehicle-mounted terminal provided in an embodiment of this application. Detailed Implementation
[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0031] In the following description, references to "some embodiments," "this embodiment," "this application embodiment," and examples, etc., describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subset of all possible embodiments and may be combined with each other without conflict.
[0032] The terms "first," "second," and "third" used in the embodiments of this application are for illustrative purposes and to distinguish the objects being described. They do not indicate any order and do not imply a specific limitation on the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application. The term "multiple" in the embodiments of this application refers to two or more integers.
[0033] Before providing a more detailed description of the embodiments of this application, the nouns and terms that may be involved in the embodiments of this application will be explained. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.
[0034] Frame images: These are a series of consecutive images that make up an animation, with each frame representing the content of a scene at a specific moment. During animation playback, these frame images can be rendered and displayed sequentially to create dynamic visual effects.
[0035] Frame playback start position: Indicates the screen space position where a certain frame image begins to be displayed on the screen.
[0036] Screen refresh rate: This refers to the number of times a screen can update its display per second, usually measured in Hz (Hertz). For example, a 60Hz screen refresh rate is 60 times per second. The higher the screen refresh rate, the more frames can be rendered per unit of time, resulting in smoother animations.
[0037] Inter-frame distance: The distance between two adjacent frames within a fixed animation duration. When the inter-frame distance is too large, it can easily cause visual frame skipping or ghosting, affecting the user experience.
[0038] Transparency parameter: Used to control the opacity of the image; the smaller the value, the more transparent the image.
[0039] Before introducing the specific methods of this application, we will first provide an illustrative example of the application scenarios for the animation playback method in this application. It should be understood that the following application scenarios are merely examples and are not limited to these.
[0040] Figure 1 This is a schematic diagram illustrating an application scenario of the animation playback method provided in this application on an in-vehicle screen; for example... Figure 1 As shown, on the in-vehicle screen 100, frame image 101 is the first frame of the animation, frame image 102 is the second frame of the animation, and frame image 10N is the last frame of the animation. Figure 1 As shown, the starting position of each frame is different, thus creating a visually continuous motion. The inter-frame distance between frame image 101 and frame image 102 is as follows: Figure 1 The d shown represents the distance between the playback start position of frame image 101 and the playback start position of frame image 102.
[0041] This application provides an animation playback method that can be applied to an in-vehicle system. In this application, the type of in-vehicle system is not limited; the in-vehicle system can be Android Automotive OS or other types of operating systems.
[0042] Figure 2 Schematic diagram of the implementation flow of the animation playback method provided in the embodiments of this application Figure 1 ;like Figure 2 As shown, the method may include the following steps 201 to 202:
[0043] Step 201: When the machine instruction is executed, the playback start position of multiple frame images is confirmed based on the start position and / or end position of the repositioned animation playback.
[0044] Step 202: Play the frame images sequentially based on their playback start positions.
[0045] In this embodiment of the application, when the machine instruction is executed, the playback start position of multiple frame images is determined based on the start position and / or end position of the repositioned animation playback; thus, the frame images are played sequentially based on the playback start position of the frame images; this helps to reduce frame skipping or ghosting phenomena generated during animation playback.
[0046] The following sections will describe further optional implementation methods for each of the above steps, as well as related terms.
[0047] Step 201: When the machine instruction is executed, the playback start position of multiple frame images is confirmed based on the start and / or end position of the repositioned animation playback.
[0048] The start position of an animation playback refers to the initial position of the entire animation on the screen, that is, the starting point of the animation's entire playback path (i.e., the animation path). The end position of an animation playback refers to the final position of the entire animation on the screen, that is, the ending point of the animation's entire playback path (i.e., the animation path). For example, in a "bouncing ball" animation, the starting position might be when the ball is stationary at the top of the screen, and the ending position might be when the ball bounces to the bottom of the screen and stops or disappears. The start position of a single frame of an image, on the other hand, refers to the initial display position of that single frame within the animation frame.
[0049] Repositioning the start and / or end positions of animation playback refers to adjusting the starting or ending point of the originally set animation path to optimize visual effects under low screen refresh rates. For example, if the animation playback path originally moves 646 pixels from top to bottom, and the screen refresh rate is 60Hz with a fixed animation duration of 200ms, a total of 12 frames can be rendered, with each frame needing to move approximately 54 pixels. This can easily cause ghosting during playback. Therefore, the starting point of the animation playback path can be repositioned from 646 pixels to 160 pixels, reducing the movement distance between each frame to 13 pixels, effectively alleviating frame skipping and ghosting issues.
[0050] In some embodiments, when the screen refresh rate is detected to be less than a preset refresh rate threshold, the relocation logic for the start and / or end positions of the animation playback can be automatically invoked to dynamically modify the start and / or end positions of the animation playback, thereby shortening the inter-frame distance and improving the smoothness of the animation playback.
[0051] In some embodiments, step 201 may further include: determining the playback start position of the (i+1)th frame image based on the start and / or end position of the repositioned animation playback, the playback order of the i-th frame image in the plurality of frame images, and the playback start position of the i-th frame image.
[0052] Where i is an integer greater than or equal to 0; the start and end positions of the repositioned animation playback are adapted to the current screen refresh rate, so that the first frame distance when the animation is played at the current screen refresh rate is less than the distance threshold, and the distance threshold is less than or equal to the minimum frame distance that causes frame skipping or afterimages when the animation is played.
[0053] In the embodiments of this application, it is not limited to relocating only the start position of the animation playback, relocating only the end position of the animation playback, or relocating both the start and end positions of the animation playback.
[0054] For the above method of determining the playback start position of the (i+1)th frame image, if only the start position of the animation playback is relocated, the playback start position of the (i+1)th frame image is determined based on the relocated start position of the animation playback and the original end position of the animation playback (i.e., the end position that was not relocated), as well as the playback order of the i-th frame image in the plurality of frame images and the playback start position of the i-th frame image.
[0055] Considering the diverse shapes and aspect ratios of in-vehicle screens, in the above embodiments, for screens where repositioning the end position of animation playback is limited, only the start position of animation playback can be adjusted. Combined with the original end position of the animation playback, the start position of subsequent frames can be calculated. This effectively controls the inter-frame distance, avoiding visual persistence caused by excessive displacement, thereby improving the visual smoothness of the animation and the user experience. Furthermore, even in scenarios where modifying / repositioning the end position of animation playback is not supported, high-quality animation effects can still be achieved in low frame rate scenarios.
[0056] For the above method of determining the playback start position of the (i+1)th frame image, if only the end position of the animation playback is relocated, then the playback start position of the (i+1)th frame image is determined based on the original start position of the animation playback (i.e., the start position that has not been relocated) and the end position of the animation playback after relocation, as well as the playback order of the i-th frame image in the multiple frame images and the playback start position of the i-th frame image.
[0057] Considering the diverse shapes and aspect ratios of in-vehicle screens, in the above embodiments, for screens where the repositioning of the animation playback start position is limited, only the animation playback end position can be adjusted. Combined with the original start position of the animation playback, the start position of subsequent frames can be calculated. This effectively controls the inter-frame distance, avoiding visual persistence caused by excessive displacement, thereby improving the visual smoothness of the animation and the user experience. Furthermore, even in scenarios where modifying / repositioning the animation playback start position is not supported, high-quality animation effects can still be achieved in low frame rate scenarios.
[0058] For the method described above for determining the playback start position of the (i+1)th frame image, if the start and end positions of the animation playback have been repositioned, then the playback start position of the (i+1)th frame image is determined based on the repositioned start and end positions of the animation playback, the playback order of the i-th frame image in the plurality of frame images, and the playback start position of the i-th frame image.
[0059] Considering the diverse shapes and aspect ratios of screens on in-vehicle systems, in the above embodiments, for screens where the repositioning of the start and end positions of animation playback is unrestricted, the start position of subsequent frames can be calculated by adjusting the start and end positions of animation playback. This effectively controls the inter-frame distance, avoids visual persistence caused by excessive displacement, and thus improves the visual smoothness of the animation and the user experience.
[0060] Furthermore, in some embodiments, determining the playback start position of the (i+1)th frame image based on the start and / or end positions of the repositioned animation playback, the playback order of the i-th frame image among the plurality of frame images, and the playback start position of the i-th frame image may include the following steps one to three:
[0061] Step 1: Determine the distance between the end position and the start position of the animation playback;
[0062] Step 2: Determine the second product of the playback order of the i-th frame image among the multiple frame images and the distance;
[0063] Step 3: Determine the playback start position of the (i+1)th frame image based on the sum of the second product and the playback start position of the i-th frame image.
[0064] For example, in one possible implementation, for a scenario where the playback path of the animation is along the Y-axis of the screen, the X-coordinates of the playback start positions of multiple frame images are consistent, and the playback start position of the (i+1)th frame image can be determined according to the following formula (1):
[0065] startY i+1 = startY i + (endY - startY) * fraction (1);
[0066] In formula (1), endY refers to the Y-coordinate of the end position of the animation playback, and startY refers to the Y-coordinate of the start position of the animation playback. Therefore, (endY - startY) is the distance between the end position and the start position of the animation playback; startY i This refers to the Y-coordinate of the starting position of the i-th frame of the image; startY i+1 This refers to the Y-coordinate of the playback start position of the (i+1)th frame. In this implementation, step three can be understood as determining the Y-coordinate of the playback start position of the (i+1)th frame based on the sum of the second product and the Y-coordinate of the playback start position of the i-th frame, where the X-coordinate of the playback start position of the (i+1)th frame is the same as the X-coordinate of the playback start position of the i-th frame.
[0067] Similarly, for example, in one possible implementation, for a scenario where the playback path of the animation is along the X-axis of the screen, the Y-coordinates of the starting positions of multiple frame images are consistent, and the starting position of the (i+1)th frame image can be determined according to the following formula (2):
[0068] startX i+1 = startX i + (endX - startX) * fraction (2);
[0069] In formula (2), endX refers to the X-coordinate of the end position of the animation playback, and startX refers to the X-coordinate of the start position of the animation playback. Therefore, (endX - startX) is the distance between the end position and the start position of the animation playback; startX i It refers to the X-coordinate of the starting position of the i-th frame of the image; startX i+1 This refers to the X-coordinate of the playback start position of the (i+1)th frame. In this implementation, step three can be understood as determining the X-coordinate of the playback start position of the (i+1)th frame based on the sum of the second product and the X-coordinate of the playback start position of the i-th frame, where the Y-coordinate of the playback start position of the (i+1)th frame is the same as the Y-coordinate of the playback start position of the i-th frame.
[0070] It should be noted that the ending position of the animation playback mentioned in step one above can be understood as the latest ending position of the animation playback. If the ending position of the animation playback has been repositioned, this latest ending position is the repositioned ending position; if the ending position of the animation playback has not been repositioned, this latest ending position is the original ending position of the animation playback. Similarly, the starting position of the animation playback mentioned in step one above can be understood as the latest starting position of the animation playback. If the starting position of the animation playback has been repositioned, this latest starting position is the repositioned starting position; if the starting position of the animation playback has not been repositioned, this latest starting position is the original starting position of the animation playback.
[0071] Step 202: Play the frame images sequentially based on their playback start positions.
[0072] Once the starting position for playback of each frame image is determined, each frame image can be rendered and displayed sequentially according to a preset order. This process of rendering and displaying frames in this order can be controlled by the property animation engine, which ensures that each frame image is displayed at the correct position and time, avoiding misalignment or delays. To further enhance the visual effects of the animation, the transparency parameters of each frame image can be dynamically set during playback, allowing the animation to exhibit gradual changes and reducing visual persistence.
[0073] For example, in some embodiments, step 202 may include: determining the transparency parameter of the (i+1)th frame image according to the playback order of the i-th frame image in the plurality of frame images; and playing the frame images sequentially based on the playback start position and the transparency parameter; wherein i is an integer greater than or equal to 0, and the transparency parameter is negatively correlated with the playback order.
[0074] The transparency parameter is a numerical value used to control the opacity of a frame image during display. It typically ranges from 0 to 1, where 0 represents complete transparency and 1 represents complete opacity. In the above embodiment, the transparency parameter gradually decreases as the playback sequence increases, thus achieving the effect of gradually increasing transparency of the frame images during animation playback. For example, during animation playback, the first frame image may maintain high transparency (close to 1), while the transparency of each subsequent frame image decreases sequentially to simulate a weakened effect of motion blur or visual persistence, thereby effectively mitigating frame skipping or ghosting phenomena caused by low frame rates.
[0075] Furthermore, in some embodiments, the transparency parameter is negatively correlated with the playback order, including: obtaining interface color parameters at the interface position where the frame image is located based on the start and end positions of each frame image; calculating the interface color parameters to determine a first dominant color tone at the interface position where the frame image is located and calculating a second dominant color tone of the frame image; and controlling the transparency parameter corresponding to the frame image in response to a significant color difference between the first dominant color tone and the second dominant color tone to accelerate the transparency of the frame image. For example, if the first dominant color tone (i.e., the interface position where the frame image is located) is a light color tone, and the second dominant color tone (i.e., the dominant color tone of the frame image) is a dark color tone, in order to weaken the visual persistence effect of the frame image (such as ghosting, frame skipping, etc.), the transparency parameter corresponding to the frame image can be set to a smaller value, thereby enhancing the transparency of the frame image.
[0076] In one possible implementation, there is a significant color difference between the first primary color and the second primary color, including: the color difference between the first primary color and the second primary color is greater than or equal to a preset color difference threshold.
[0077] In the above embodiments, the repositioning of the animation playback start position and / or initial position, combined with the transparency parameter, forms a progressive animation playback mode. Specifically, not only is the inter-frame distance of the animation playback shortened based on repositioning, but different transparency values are also assigned according to the playback order of each frame. This animation playback mode, formed by the combined effect of repositioning and transparency parameters, can further optimize the visual effect of the animation in low frame rate environments, further reduce the visual persistence effect during animation playback, and allow users to experience a more coherent and natural animation process.
[0078] Through the methods described above, this application improves animation quality through software optimization without changing the hardware frame rate. Especially on low frame rate devices, the solution proposed in this application effectively avoids visual persistence caused by excessive inter-frame distance, thus providing a smoother and more comfortable user experience.
[0079] To support users in customizing the start and end positions of animation playback, in some embodiments, such as... Figure 3 As shown, the method further includes the following steps 301 and 302:
[0080] Step 301: Display the configuration interface; the configuration interface is used for users to customize the start and end positions of animation playback;
[0081] Step 302: Based on the start position and / or end position received by the configuration interface, determine the start position and / or end position of the repositioned animation playback.
[0082] In the above embodiments, by providing a configuration interface that allows users to customize the start and end positions of animation playback, and redetermining the playback range (i.e., start and / or end positions) of the animation based on the position information set by the user, the ghosting problem caused by the animation running at low frame rates can be effectively reduced while supporting user-defined playback range of the animation.
[0083] In step 301, a configuration interface is displayed; the configuration interface is used by the user to customize the start and end positions of the animation playback.
[0084] The configuration interface is a graphical user interface that allows users to personalize the start and end positions of animation playback (i.e., the playback range of the animation). The configuration interface may include controls such as sliders, input boxes, and preview areas, enabling users to intuitively adjust the playback range of the animation. For example, users can drag the slider to select a position where the animation moves from the top of the screen to a certain middle position, instead of the default bottom edge. However, in this embodiment, there are no restrictions on the control elements included in the configuration interface. In short, through this configuration interface, users can customize the start and end positions of animation playback.
[0085] Figure 4 Example diagram of the configuration interface provided in the embodiments of this application; such as Figure 4 As shown, in the configuration interface 400, users can adjust the start position of the animation playback by sliding the slider 401 left and right, and / or adjust the end position of the animation playback by sliding the slider 402 left and right, and preview the adjusted animation playback effect in the animation playback preview area 403. Of course, the sliders displayed in the configuration interface 400 may include only slider 401 or only slider 402.
[0086] The introduction of the configuration interface allows users to flexibly control the playback range of animations according to actual device performance or visual needs, thereby avoiding ghosting issues caused by insufficient frame rate. The customization capabilities created by this configuration interface enhance the user experience and improve the animation's adaptability across different devices, as well as the user's control over the animation's performance.
[0087] In this application embodiment, the timing of displaying the configuration interface is not limited. In some embodiments, the configuration interface can be displayed before the start and / or end positions of the animation playback are repositioned, or when the animation starts playing. In other embodiments, the start and end positions of the animation playback (i.e., the original start and end positions), the current refresh rate of the screen, and the playback duration of the animation can be obtained before the animation starts playing or during the animation. Based on these parameters, the third frame distance when the animation is played at the current refresh rate can be determined. If the third frame distance is greater than or equal to a distance threshold, the configuration interface is displayed to prompt the user to optimize the frame skipping and ghosting problems during animation playback by adjusting the start and / or end positions of the animation playback.
[0088] The method for calculating the distance between the third frame can be determined according to the following formula:
[0089] d = (position 2 - position 1) / (refresh rate * animation duration);
[0090] Where position 2 refers to the end position of the animation playback, position 1 refers to the start position of the animation playback, and d represents the inter-frame distance.
[0091] Specifically, in step 302, the start position and / or end position of the repositioned animation playback are determined based on the start position and / or end position received by the configuration interface.
[0092] After receiving the start and / or end positions of the animation playback set by the user through the configuration interface, the system can use the position information set by the user through the configuration interface as new animation parameters, and recalculate (reposition) the start and / or end positions of the animation playback accordingly. For example, if the original animation moved from the top of the screen (646 pixels) to the bottom (0 pixels), and the user set the end point to 160 pixels in the configuration interface, the animation path can be shortened to 160 pixels to reduce the inter-frame distance during animation playback, thereby reducing the visual persistence effect during animation playback.
[0093] Dynamically adjusting the animation playback range can effectively address animation stuttering and ghosting issues in low frame rate environments. Based on the principles of human visual perception, when an object moves a distance exceeding a certain threshold in a frame, it causes viewers to experience noticeable frame skipping or ghosting. By dynamically adjusting the animation playback range, the smoothness of the animation can be significantly improved without changing its total duration.
[0094] It should be noted that in actual use, users may configure only the start position of the animation playback, only the end position, or both through the configuration interface. The relocation methods for these three scenarios are described below.
[0095] In cases where the user configures both the start and end positions for animation playback, the configuration interface obviously receives both the start and end positions. In some embodiments, such as... Figure 5 As shown, step 302 may include the following steps 501 and 502:
[0096] Step 501: Determine the second frame distance when the animation is played at the current screen refresh rate based on the animation playback duration, the current screen refresh rate, and the start and end positions received by the configuration interface.
[0097] Step 502: If the distance between the second frames is less than the distance threshold, the start position received by the configuration interface is taken as the start position of the repositioned animation playback, and the end position received by the configuration interface is taken as the end position of the repositioned animation playback.
[0098] In the above embodiments, the start and end positions of the animation playback defined by the user through the configuration interface are not directly determined based on these two custom parameters to determine the playback start positions of multiple frame images. Instead, the second inter-frame distance of the animation at the current screen refresh rate is first determined based on these two custom parameters. Only when this inter-frame distance is less than a certain distance threshold is the playback start position of multiple frame images determined based on these two custom parameters, and then the frame images are played sequentially based on this. Thus, by calculating the second inter-frame distance of the animation at the current screen refresh rate and comparing it with the distance threshold, it is determined whether to use the start and end positions received by the configuration interface as the final start and end points of the animation playback. By calculating and comparing the second inter-frame distance, the problem of excessively large second inter-frame distances caused by user customization can be avoided in low frame rate environments, thereby avoiding the ghosting problem caused by excessively large second inter-frame distances.
[0099] In some embodiments, such as Figure 5 As shown, the method further includes: step 503, prompting the user to redefine the start and end positions of the animation playback when the distance between the second frames is greater than or equal to the distance threshold.
[0100] In the above embodiments, when the inter-frame distance (i.e., the second inter-frame distance) calculated based on the user-configured start and end positions of the animation playback is detected to be greater than or equal to a set distance threshold, a prompt mechanism is triggered or the configuration interface pops up, allowing the user to readjust the start and / or end positions of the animation through the configuration interface. This prompt mechanism reminds the user to readjust the start and / or end positions of the animation, thereby ensuring a smoother and more natural visual effect during animation playback. This avoids frame skipping and ghosting phenomena in subsequent animation playback caused by unreasonable user-configured start and end positions.
[0101] The distance threshold is a preset value used to measure whether visual persistence effects may occur. According to experimental data, at a viewing distance of 50cm, if the inter-frame distance exceeds 4.4mm / frame, the human eye will easily perceive a sense of jump or ghosting. Therefore, the distance threshold can be set to 4.4mm or the pixel distance corresponding to 4.4mm, depending on the screen resolution and display device characteristics.
[0102] When the distance between the second frame is detected to be greater than or equal to the distance threshold, the user can be notified through pop-up windows, prompts, or other interactive methods that the currently set animation parameters may cause a poor visual experience. The user can be advised to adjust the start and / or end positions of the animation playback to shorten the total movement distance, thereby reducing the movement amplitude between each frame and reducing the occurrence of ghosting problems.
[0103] By employing the methods described above, potential visual problems can be addressed during the animation design phase, preventing visual issues such as frame skipping and ghosting caused by low frame rates or large displacements. Furthermore, users can flexibly adjust the animation path according to their actual needs, ensuring that the final animation not only meets functional requirements but also delivers excellent visual presentation.
[0104] In cases where the user only configures the start position of the animation playback, the configuration interface obviously only receives the start position. In some embodiments, such as... Figure 6 As shown, step 302 may further include the following steps 601 to 604:
[0105] Step 601: Use the starting position received by the configuration interface as the starting position for the repositioned animation playback;
[0106] Step 602: Determine the number of image frames that can be rendered and displayed within the animation playback duration based on the animation playback duration and the current screen refresh rate;
[0107] Step 603: Determine the first product of the number of image frames and the distance threshold;
[0108] Step 604: Determine the end position of the repositioned animation playback based on the sum of the first product and the start position of the repositioned animation playback; wherein the end position of the repositioned animation playback is less than the sum of the sums.
[0109] In the above embodiments, the end position of the animation playback is dynamically repositioned by combining the start position received by the configuration interface, the current screen refresh rate, the animation playback duration, and the distance threshold. In this way, the movement distance of each frame can be precisely controlled, thereby effectively solving the animation ghosting problem caused by low frame rate, and thus providing a smoother and more natural motion effect experience.
[0110] Specifically, in step 601, the starting position received by the configuration interface is used as the starting position for the repositioned animation playback.
[0111] This step indicates that the user inputs a starting position received through the configuration interface, which can be directly used as the starting position for the repositioned animation playback. This avoids additional calculations or offsets, ensuring that the starting position of the repositioned animation playback is completely consistent with the user's requirements. In practical scenarios, for example, if the user sets the starting position of the repositioned animation playback to move down from the top to a specific position, then that specific position is directly used as the starting position for the repositioned animation playback, thereby ensuring that the animation behavior meets expectations.
[0112] Based on this step, the animation playback method directly uses the start position received from the configuration interface as the start position of the repositioned animation playback, which can reduce unnecessary computational overhead, improve animation response speed, and enhance user experience.
[0113] Specifically, in step 602, the number of image frames that can be rendered and displayed within the animation playback duration is determined based on the animation playback duration and the current screen refresh rate.
[0114] In one possible implementation, the number of image frames that can be rendered and displayed within the animation playback duration is equal to the product of the animation playback duration and the current screen refresh rate.
[0115] This step calculates how many frames the device can render given the animation duration and the current screen refresh rate. For example, if the animation duration is 200ms and the current screen refresh rate is 60Hz (60 frames per second), the device can render approximately 12 frames in 200ms. Since the screen refreshes 60 times per second, each frame would have a display time of approximately 16.67ms (1000ms / 60). Ideally, if the total animation duration is 200ms, approximately 12 frames (200ms / 16.67ms ≈ 12 frames) could be rendered. This is a fundamental parameter for determining the subsequent animation logic, deciding whether the distance each frame moves is within a visually comfortable range.
[0116] Specifically, in step 603, the first product of the number of image frames and the distance threshold is determined.
[0117] The distance threshold in this step refers to the maximum single-frame movement distance (i.e., the maximum inter-frame distance) that the human eye can accept at a specific viewing distance. Exceeding this value can easily cause frame skipping or ghosting.
[0118] Specifically, in step 604, the end position of the repositioned animation playback is determined based on the sum of the first product and the start position of the repositioned animation playback; wherein the end position of the repositioned animation playback is less than the sum of the sums.
[0119] For example, in one possible implementation, for a scenario where the animation playback path is along the Y-axis of the screen, the X-coordinates of the starting positions of multiple frame images are consistent. Therefore, for step 604, determining the ending position of the repositioned animation playback based on the sum of the first product and the starting position of the repositioned animation playback includes: determining the Y-coordinate of the ending position of the repositioned animation playback based on the sum of the first product and the Y-coordinate of the starting position of the repositioned animation playback; wherein the X-coordinate of the ending position of the repositioned animation playback is consistent with the X-coordinate of the starting position of the repositioned animation playback.
[0120] For example, in one possible implementation, for a scenario where the animation playback path is along the X-axis of the screen, the Y-coordinates of the starting positions of multiple frame images are consistent. Therefore, for step 604, determining the ending position of the repositioned animation playback based on the sum of the first product and the starting position of the repositioned animation playback includes: determining the X-coordinate of the ending position of the repositioned animation playback based on the sum of the first product and the X-coordinate of the starting position of the repositioned animation playback; wherein the Y-coordinate of the ending position of the repositioned animation playback is consistent with the Y-coordinate of the starting position of the repositioned animation playback.
[0121] The core of step 604 lies in adding the first product to the start position of the repositioned animation playback to obtain a maximum permissible animation endpoint, and finally selecting an end position of the repositioned animation playback that is less than this value. For example, if the start position of the repositioned animation playback is 0 and the first product is 52.8mm, then the maximum permissible endpoint is 52.8mm, but an end position of the repositioned animation playback that is less than this value (such as 160 pixels) can be selected as the actual endpoint. The purpose of this is to further compress the movement distance of each frame, ensuring that the animation remains smooth even at low frame rates.
[0122] In cases where the user only configures the end position of the animation playback, the configuration interface obviously only receives the end position. In some embodiments, such as... Figure 7 As shown, step 302 may include the following steps 701 to 704:
[0123] Step 701: The end position received by the configuration interface is taken as the end position of the repositioned animation playback;
[0124] Step 702: Determine the number of image frames that can be rendered and displayed within the animation playback duration based on the animation playback duration and the current screen refresh rate;
[0125] Step 703: Determine the first product of the number of image frames and the distance threshold;
[0126] Step 704: Determine the start position of the repositioned animation playback based on the difference obtained by subtracting the first product from the end position of the repositioned animation playback; wherein the start position of the repositioned animation playback is greater than the difference.
[0127] In the above embodiments, by using the end position received by the configuration interface as the end position of the repositioned animation playback, calculating the number of image frames in combination with the screen refresh rate, and repositioning the start position of the animation playback according to the distance threshold, the movement distance of each frame can be effectively controlled, thereby avoiding visual persistence and frame skipping, and improving the smoothness of animation playback and user experience.
[0128] Specifically, in step 701, the end position received by the configuration interface is taken as the end position of the repositioned animation playback.
[0129] After receiving the end position set by the user in the configuration interface, the system directly uses this end position as the final stopping point of the animation. This simplifies the process of setting the animation end point, avoids additional calculations or adjustments, and improves animation response speed. Furthermore, since the end position received in the configuration interface is explicitly specified by the user, it ensures that the animation end point matches the user's expectations, thereby enhancing the user experience.
[0130] Specifically, in step 702, the number of image frames that can be rendered and displayed within the animation playback duration is determined based on the animation playback duration and the current screen refresh rate.
[0131] For an explanation of step 702, please refer to the explanation of step 602 above, which will not be repeated here.
[0132] Specifically, in step 703, the first product of the number of image frames and the distance threshold is determined.
[0133] For an explanation of step 703 above, please refer to the explanation of step 603 above, which will not be repeated here.
[0134] Specifically, in step 704, the start position of the repositioned animation playback is determined by subtracting the first product from the end position of the repositioned animation playback; wherein the start position of the repositioned animation playback is greater than the difference.
[0135] For step 704, the difference refers to the result of subtracting the product of the number of image frames and the distance threshold from the end position received from the configuration interface. This difference allows the starting position of the repositioned animation playback to be deduced, ensuring that the inter-frame distance during playback is less than or equal to the distance threshold.
[0136] For example, given the animation runtime, the window's Y-axis position at the start of the animation (position 1), and the window's Y-axis position at the end of the animation (position 2), the inter-frame distance d can be calculated as d = (position 2 - position 1) / (refresh rate * animation runtime). The denominator is the number of image frames the screen can render within the animation runtime. To mitigate visual issues like frame skipping and ghosting during animation playback, the inter-frame distance d must be less than a set distance threshold. Based on d = (position 2 - position 1) / (refresh rate * animation runtime), the starting position of the repositioned animation playback can be deduced, ensuring that the displacement distance of each frame during playback is always less than or equal to the distance threshold.
[0137] For example, in one possible implementation, for a scenario where the animation playback path is along the Y-axis of the screen, the X-coordinates of the starting positions of multiple frame images are consistent. Therefore, for step 704, determining the starting position of the repositioned animation playback based on the difference between the ending position of the repositioned animation playback and the first product includes: determining the Y-coordinate of the starting position of the repositioned animation playback based on the difference between the Y-coordinate of the ending position of the repositioned animation playback and the first product; wherein the X-coordinate of the ending position of the repositioned animation playback is consistent with the X-coordinate of the starting position of the repositioned animation playback.
[0138] For example, in one possible implementation, for a scenario where the animation playback path is along the X-axis of the screen, the Y-coordinates of the starting positions of multiple frame images are consistent. Therefore, for step 704, determining the starting position of the repositioned animation playback based on the difference between the ending position of the repositioned animation playback and the first product includes: determining the X-coordinate of the starting position of the repositioned animation playback based on the difference between the X-coordinate of the ending position of the repositioned animation playback and the first product; wherein the Y-coordinate of the ending position of the repositioned animation playback is consistent with the Y-coordinate of the starting position of the repositioned animation playback.
[0139] In some embodiments, the current screen where the animation is playing is a first screen, and the method further includes: in response to the screen playing the animation switching from the first screen to a second screen, obtaining the size of the second screen and / or the refresh rate of the second screen; in response to the size of the second screen or the refresh rate of the second screen being different from that of the first screen, repositioning the start position and / or end position of the animation playback.
[0140] When a user is watching an animation, the device's display interface may switch screens due to system switching, multitasking, or other reasons. Different screens may have different sizes, refresh rates, and other attributes. In such cases, continuing the animation playback from its current start and / or end position may result in discontinuous playback, image misalignment, or visual persistence. Therefore, for scenarios involving cross-screen animation playback, upon detecting a screen switching event, the system dynamically adjusts / repositions the start and / or end positions of the current animation playback to adapt to the new display environment, reducing ghosting, frame skipping, and other phenomena, ensuring smooth and consistent animation playback.
[0141] For example, such as Figure 8As shown, animation 801 switches from screen 802 to screen 803. However, the size of screen 803 is different from that of screen 802. This causes the start and end positions of the animation playback to change, resulting in different playback smoothness.
[0142] For example, such as Figure 9 As shown, animation 901 switches from screen 902 to screen 903. Even though the size of screen 903 is the same as that of screen 902, the refresh rate of screen 903 is lower than that of screen 902. This will cause the frame distance d2 of animation 901 to be greater than the frame distance d1 of animation 901 when it is played on screen 903. This may result in frame skipping and ghosting issues on screen 903.
[0143] In some embodiments, the current screen where the animation is playing is a first screen, and the method further includes: in response to the screen playing the animation switching from the first screen to a second screen, if the animation playback falls into a card window on the second screen, repositioning the start position and / or end position of the animation playback;
[0144] In most cases, the size of the card window that the animation falls onto the screen after the switch is different from the size of the screen before the switch, or the size of the playback window on the screen before the switch. This can cause changes in the start and / or end positions of the animation playback, affecting the inter-frame distance during animation playback and consequently altering the smoothness of the playback. Therefore, in the above embodiment, in response to a screen switch during animation playback, when the animation falls onto the card window on the screen after the switch, the start and / or end positions of the animation playback are repositioned. This helps to improve the ghosting or frame skipping problems caused by changes in the size of the playback window.
[0145] For example, such as Figure 10 As shown, animation 1001 switches from screen 1002 to screen 1003. Even though the size of screen 1003 is the same as that of screen 1002, the animation is displayed in card window 1004. The size and position of card window 1004 are different from the size and position of the playback window of animation 1001 on screen 1002. This causes the inter-frame distance to change, resulting in different playback smoothness.
[0146] Repositioning the start and / or end positions of an animation playback refers to recalculating the start and end positions of the animation playback based on the new display environment and adjusting the positions of the animation playback elements accordingly.
[0147] In the above embodiments, by responding to screen switching events and dynamically adjusting / repositioning the start and / or end positions of animation playback, it is possible to ensure that the animation playback maintains a good playback effect in complex and ever-changing display environments, reduce visual persistence and frame skipping, thereby improving the overall user experience and system stability.
[0148] In some embodiments, the current screen where the animation is playing is a first screen, and the method further includes: repositioning the start and / or end position of the animation playback in response to switching between different card windows on the first screen during animation playback.
[0149] Within the same screen, the card windows used to display animations may switch, causing changes in the start and / or end positions of the animation playback. This results in changes in the inter-frame distance during animation playback, potentially leading to frame skipping and ghosting issues. Therefore, in the above embodiment, repositioning the start and / or end positions of the animation playback in response to card window switching within the same screen helps optimize the inter-frame distance during animation playback, thereby mitigating frame skipping and ghosting problems caused by card window switching.
[0150] For example, such as Figure 11 As shown, animation 1101 switches from card window 1103 on screen 1102 to card window 1104 on the same screen. Since the two card windows are in different positions on screen 1102, the start and / or end positions of the animation playback will change, ultimately affecting the smoothness of the animation playback.
[0151] In some embodiments, the method further includes: repositioning the start and / or end positions of the animation playback in response to the window receiving a scaling instruction.
[0152] When a user zooms in or out of a window that is playing an animation (e.g., by using gestures to zoom in or out of the interface), the window that is playing the animation dynamically adjusts / repositions the start and / or end positions of the animation playback after receiving the zoom command. The purpose of repositioning is to ensure that the animation can still be presented smoothly and naturally under the new window size, and to reduce visual persistence and frame skipping caused by changes in window size.
[0153] For example, such as Figure 12 As shown, the playback window of animation 1201 before scaling is 1202, and the playback window of animation 1201 after scaling is 1203. It can be seen that the playback window of the animation changes the start and / or end position of the animation playback due to the different sizes before and after scaling.
[0154] The start position of an animation refers to its initial coordinates, while the end position refers to its final coordinates. When the animation window receives a scaling command, it can recalculate and set new coordinate values for the start and / or end positions based on the current window scaling. This adjusts the start and / or end positions to align with the window's geometric transformation.
[0155] Upon receiving a scaling command, the animation playback window can reposition the start and / or end positions of the animation playback by combining frame rate optimization strategies, such as dynamically adjusting the total animation time or segmenting the inter-frame distance, to adapt to the display effect under different device performance conditions. For example, in a low frame rate environment, after receiving a scaling command, the animation playback window can appropriately shorten the path length between the start and / or end positions of the animation playback by repositioning the start and / or end positions, thereby reducing the movement distance between each frame, thus mitigating the visual persistence effect and making the animation appear smoother.
[0156] By responding to window scaling commands and automatically adjusting the start and / or end positions of animation playback, the adaptation issues of animations in multi-sized screens or user-interactive scaling scenarios can be effectively resolved. This method ensures that the animation always conforms to the requirements of the current display environment, thereby improving the continuity and stability of the animation and further enhancing user immersion and satisfaction.
[0157] The following examples illustrate possible implementation schemes of the animation playback method described in one or more of the above embodiments.
[0158] If the system frame rate is low, such as a screen refresh rate of 60 frames per second, but the animation duration is fixed (within 200ms), and each frame needs to move a relatively large distance, the gap between two frames will be too large, causing visual issues such as frame skipping or ghosting during animation playback. At a viewing distance of 50cm, ghosting will occur if the object moves more than 4.4mm per frame.
[0159] If the screen refresh rate is 60 frames per second and the animation runtime is 200ms, then 12 frames will be rendered and played. If the animation is at a constant speed, such as... Figure 13 As shown, the distance from the top of the application to the bottom of the screen (1301) is 646 pixels.
[0160] Inter-frame distance = 646 / 12 = 54 pixels.
[0161] This solution works by changing the target position of the animation movement (i.e., the starting position of the animation playback), such as... Figure 14 As shown, the animation target position has been changed from 646 pixels to 160 pixels.
[0162] Inter-frame distance = 160 / 12 = 13 pixels.
[0163] 1302 is one frame of the animation. Because the distance between each frame is shorter, the visual persistence effect of the human eye is weakened.
[0164] For example, the animation runtime, the window's Y-axis position at the start of the animation (position 1), and the window's Y-axis position at the end of the animation (position 2) are known.
[0165] Based on this, the inter-frame distance d can be calculated:
[0166] d = (position 2 - position 1) / (refresh rate * animation runtime);
[0167] The denominator is the number of image frames that the screen can render and output during the animation's runtime.
[0168] Frame 1, start position (0,0), end position (0,d);
[0169] Frame 2: Start position (0, d), end position (0, 2*d);
[0170] Frame 3: Start position (0, 2*d), End position (0, 3*d);
[0171] And so on.
[0172] Each frame starts at a different position, creating continuous motion (like a ball moving smoothly).
[0173] As the animation moves downwards, the transparency of each frame is adjusted proportionally, which further reduces the visual persistence effect.
[0174] Figure 15 Schematic diagram of the implementation flow of the animation playback method provided in the embodiments of this application Figure 2 ;like Figure 15 As shown, the method includes the following steps 1501 to 1505:
[0175] Step 1501: Use a gesture to pull down or call the close interface;
[0176] Step 1502, Set the animation runtime length and set the Y-axis position of the window at the start and end of the animation;
[0177] Step 1503, animation begins;
[0178] Step 1504: Calculate the animation progress and update the window position and transparency according to the progress;
[0179] Step 1505, animation ends.
[0180] In this solution, the animation effect is improved by shortening the inter-frame distance by changing the animation movement distance and gradually increasing the transparency.
[0181] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps; or steps from different embodiments may be combined into a new technical solution.
[0182] Based on the same inventive concept as the foregoing embodiments, this application provides an animation playback device applied to an in-vehicle system.
[0183] Figure 16 This is a schematic diagram of the structure of the animation playback device provided in the embodiments of this application; as shown below. Figure 16 As shown, the animation playback device 1600 includes:
[0184] The determining unit 1601 is configured to determine the playback start position of multiple frame images based on the start and / or end positions of the repositioned animation playback when machine instructions are executed.
[0185] The playback unit 1602 is configured to play the frame images sequentially based on the playback start position of the frame images.
[0186] In some embodiments, the animation playback device 1600 further includes a display unit; wherein the display unit is configured to display a configuration interface; the configuration interface is used for users to customize the start position and end position of the animation playback; the determining unit 1601 is further configured to determine the start position and / or end position of the repositioned animation playback based on the start position and / or end position received by the configuration interface.
[0187] Furthermore, in some embodiments, determining the start and / or end position of the repositioned animation playback based on the start and end positions received by the configuration interface includes: determining a second inter-frame distance when the animation is played at the current screen refresh rate based on the animation playback duration, the current screen refresh rate, and the start and end positions received by the configuration interface; if the second inter-frame distance is less than the distance threshold, using the start position received by the configuration interface as the start position of the repositioned animation playback and the end position received by the configuration interface as the end position of the repositioned animation playback.
[0188] In some embodiments, the animation playback device 1600 further includes a prompting unit; wherein the prompting unit is configured to prompt the user to redefine the start and end positions of the animation playback when the second inter-frame distance is greater than or equal to the distance threshold.
[0189] In some embodiments, the determining unit 1601 is further configured to reposition the start and / or end positions of the animation playback in response to a screen switch during animation playback.
[0190] In some embodiments, the determining unit 1601 is further configured to reposition the start and / or end positions of the animation playback in response to a scaling instruction received by the window where the animation is playing.
[0191] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0192] It should be noted that the module division in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or have two or more units integrated into one unit. The integrated units can be implemented in hardware, as software functional units, or a combination of software and hardware.
[0193] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the vehicle terminal to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0194] This application provides a vehicle-mounted terminal.
[0195] Figure 17 This is a schematic diagram of the structure of the vehicle-mounted terminal provided in the embodiments of this application; as shown below. Figure 17As shown, the vehicle terminal 1700 includes a memory 1701 and a processor 1702. The memory 1701 stores a computer program that can run on the processor 1702. When the processor 1702 executes the program, it implements the steps in the method provided in the above embodiments.
[0196] It should be noted that the memory 1701 is configured to store instructions and applications executable by the processor 1702, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data and video communication data) in the processor 1702 and the various modules in the vehicle terminal 1700. It can be implemented by flash memory or random access memory (RAM).
[0197] This application also provides a computer-readable storage medium for storing a computer program. Optionally, this computer-readable storage medium can be applied to the vehicle-mounted terminal in this application embodiment, and the computer program causes the processor or vehicle-mounted terminal to execute the various methods of this application embodiment; for the sake of brevity, these will not be described in detail here.
[0198] This application also provides a computer program product, including computer program instructions. Optionally, this computer program product can be applied to the vehicle terminal in this application embodiment, and the computer program instructions cause the processor or vehicle terminal to execute the various methods of this application embodiment; for the sake of brevity, further details are omitted here.
[0199] This application also provides a computer program. Optionally, this computer program can be applied to the vehicle-mounted terminal in this application embodiment. When the computer program runs on the processor or the vehicle-mounted terminal, it causes the processor or the vehicle-mounted terminal to execute the various methods of this application embodiment. For the sake of brevity, these will not be described in detail here.
[0200] It should be noted that the descriptions of the vehicle-mounted terminal, storage medium, computer program product, and computer program embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the vehicle-mounted terminal, storage medium, computer program product, and computer program embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0201] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0202] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0203] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.
[0205] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0206] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0207] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0208] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the vehicle terminal to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0209] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined to obtain new method embodiments without conflict. The features disclosed in the several product embodiments provided in this application can be arbitrarily combined to obtain new product embodiments without conflict. The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined to obtain new method embodiments or device embodiments without conflict.
[0210] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An animation playback method, characterized in that, The method includes: When machine instructions are executed, the start position of playback for multiple frame images is determined based on the start and / or end positions of the repositioned animation playback. The frame images are played sequentially based on their starting positions. The step of sequentially playing the frame images based on their playback start positions includes: The transparency parameter of the (i+1)th frame is determined based on the playback order of the i-th frame image among the multiple frame images; where i is an integer greater than or equal to 0, and the transparency parameter is negatively correlated with the playback order; The frame images are played sequentially based on their playback start position and transparency parameters; The negative correlation between the transparency parameter and the playback order includes: Based on the start and end positions of each frame image, obtain the interface color parameters at the interface position where the frame image is located. Calculate the interface color parameters to determine the first primary color tone at the interface position where the frame image is located, and calculate the second primary color tone of the frame image; In response to a significant color difference between the first primary color and the second primary color, the transparency parameter corresponding to the frame image is controlled to accelerate the transparency of the frame image; It also includes: the current screen where the animation is located is the first screen, and in response to the switching between different card windows in the first screen during animation playback, the start and / or end positions of the animation playback are repositioned.
2. The method according to claim 1, characterized in that, The determination of the playback start position of multiple frame images based on the start and / or end positions of the repositioned animation playback includes: Based on the start and / or end positions of the repositioned animation playback, the playback order of the i-th frame image in the plurality of frame images, and the playback start position of the i-th frame image, the playback start position of the (i+1)-th frame image is determined. Where i is an integer greater than or equal to 0; the start position and / or end position of the repositioned animation playback are adapted to the current screen refresh rate, so that the first frame distance when the animation is played at the current screen refresh rate is less than a distance threshold, and the distance threshold is less than or equal to the minimum frame distance that causes frame skipping or afterimages when the animation is played.
3. The method according to claim 1 or 2, characterized in that, The method further includes: In response to the screen playing the animation switching from the first screen to the second screen, the size of the second screen and / or the refresh rate of the second screen are obtained; In response to the size of the second screen or the refresh rate of the second screen being different from that of the first screen, the start and / or end positions of the animation playback are repositioned; Alternatively, in response to the screen from which the animation is playing switching from the first screen to the second screen, if the animation playback falls into a card window on the second screen, the start and / or end positions of the animation playback are repositioned.
4. The method according to claim 1 or 2, characterized in that, The method further includes: The configuration interface is displayed; the configuration interface is used by the user to customize the start and end positions of the animation playback; Based on the start position and / or end position received from the configuration interface, the start position and / or end position of the repositioned animation playback are determined.
5. The method according to claim 4, characterized in that, Based on the start and end positions received from the configuration interface, the start and / or end positions of the repositioned animation playback are determined, including: Based on the animation playback duration, the current screen refresh rate, and the start and end positions received by the configuration interface, determine the second frame distance when the animation is played at the current screen refresh rate; If the second inter-frame distance is less than a distance threshold, the start position received by the configuration interface is taken as the start position of the repositioned animation playback, and the end position received by the configuration interface is taken as the end position of the repositioned animation playback; wherein, the distance threshold is less than or equal to the minimum inter-frame distance that causes frame skipping or afterimages during animation playback.
6. The method according to claim 5, characterized in that, The method further includes: If the distance between the second frames is greater than or equal to the distance threshold, the user is prompted to redefine the start and end positions of the animation playback.
7. The method according to claim 5, characterized in that, Based on the start position received from the configuration interface, the start and / or end positions of the repositioned animation playback are determined, including: The starting position received by the configuration interface is used as the starting position for the repositioned animation playback; The number of image frames that can be rendered and displayed within the animation playback duration is determined based on the animation playback duration and the current screen refresh rate. Determine the first product of the image frame number and the distance threshold; wherein the distance threshold is less than or equal to the minimum inter-frame distance that causes frame skipping or ghosting during animation playback; The end position of the repositioned animation playback is determined based on the sum of the first product and the start position of the repositioned animation playback; wherein the end position of the repositioned animation playback is less than the sum of the values.
8. The method according to claim 5, characterized in that, The step of determining the start and / or end position of the repositioned animation playback based on the end position received from the configuration interface includes: The end position received by the configuration interface is taken as the end position of the repositioned animation playback; The number of image frames that can be rendered and displayed within the animation playback duration is determined based on the animation playback duration and the current screen refresh rate. Determine the first product of the image frame number and the distance threshold; wherein the distance threshold is less than or equal to the minimum inter-frame distance that causes frame skipping or ghosting during animation playback; The start position of the repositioned animation playback is determined by subtracting the first product from the end position of the repositioned animation playback; wherein the start position of the repositioned animation playback is greater than the difference.
9. The method according to claim 1 or 2, characterized in that, The method further includes: When the window playing the animation receives a scaling command, the start and / or end positions of the animation playback are repositioned.
10. The method according to claim 1 or 2, characterized in that, The determination of the playback start position of the (i+1)th frame image based on the start and / or end positions of the repositioned animation playback, the playback order of the i-th frame image among the multiple frame images, and the playback start position of the i-th frame image includes: Determine the distance between the end position and the start position of the animation playback; Determine the second product of the playback order of the i-th frame image among the plurality of frame images and the distance; The playback start position of the (i+1)th frame is determined by summing the second product with the playback start position of the i-th frame.
11. A vehicle-mounted terminal, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the method of any one of claims 1-10.
12. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor or vehicle terminal, they implement the method of any one of claims 1-10.
Citation Information
Patent Citations
Display method, electronic equipment and storage medium
CN114518817A
After image preventing apparatus and method for image display apparatus
CN1881391A