Multi-device synchronous view animation method and device

By determining the maximum movement duration and starting time of the view component, and controlling the synchronous playback of the newly added view component, the problem of out-of-sync animation playback of different devices in simulated physical animation is solved, and the synchronous playback of multi-device view animation is realized, improving Improves animation synchronization and consistency.

CN118413702BActive Publication Date: 2024-10-01HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410865502.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-01
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

During the synchronous playback of simulated physical animations on different devices, due to the different refresh intervals of each frame, the animation playback is not synchronized, and there is a deviation in the movement distance of each frame of the view component, which in turn affects the synchronization of the animation.

Method used

By determining the longest movement duration of the view component in the simulated physical animation, and controlling the synchronous playback time of the newly added view component on multiple devices according to the starting time and the longest movement duration, the synchronous playback of the view animation is realized.

Benefits of technology

Without the need for communication synchronization between devices, it ensures that view components can be played synchronously on multiple devices, improves the synchronization and consistency of animations, and reduces communication overhead between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118413702B_ABST
    Figure CN118413702B_ABST
Patent Text Reader

Abstract

The present application provides a method and apparatus for synchronizing view animations on multiple devices. In one example, the method includes: for any view component that appears in a simulated physical animation to be played synchronously, determining the longest motion duration of the view component in the simulated physical animation; determining the start time of a newly added view component corresponding to the view component in the simulated physical animation based on the start time of the view component appearing in the simulated physical animation and the determined longest motion duration of the view component in the simulated physical animation; and controlling the playback of the newly added view component based on the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation. This method can ensure that the start time of the newly added view component corresponding to the view component in multiple simulated physical animations played synchronously is consistent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the fields of computer graphics and object motion and rendering technology, and in particular to a multi-device synchronous view animation method and apparatus. Background Art

[0002] Physics simulation refers to simulating the physical behavior of objects in the real world, such as gravity, collision, friction, etc., in order to produce realistic animations and effects.

[0003] Simulated physical animation is derived from view animation. By adding simulated physical parameters such as gravity and air resistance to view animation, objects in the animation can perform physically simulated movements.

[0004] Physical simulation motion is a variable speed motion that depends on the instantaneous speed at each moment. The instantaneous speed is calculated by the speed at the previous moment and the time interval. In Android devices, since each frame needs to be drawn, the time interval between each frame refresh is usually defined as the instantaneous time in physical simulation motion.

[0005] Due to the influence of factors such as programs and hardware, different devices have different frame refresh intervals, resulting in differences in the duration of each frame of variable-speed motion. Ultimately, when different devices perform synchronized playback of simulated physical animations, the distance moved by each frame deviates, leading to asynchronous animation playback. Summary of the invention

[0006] In view of this, the present application provides a method and apparatus for synchronized view animation of multiple devices.

[0007] Specifically, the present application is implemented through the following technical solutions:

[0008] According to a first aspect of an embodiment of the present application, a multi-device synchronized view animation method is provided, comprising:

[0009] For any view component currently appearing in the simulated physical animation to be played synchronously, determine the longest motion duration of the view component in the simulated physical animation; wherein the longest motion duration of the view component is determined according to the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same;

[0010] According to the start time of the view component appearing in the simulated physical animation and the longest motion duration of the view component, determine the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation;

[0011] The playback of the newly added view component is controlled according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

[0012] According to a second aspect of an embodiment of the present application, a multi-device synchronous view animation apparatus is provided, comprising:

[0013] The first determination unit is used to determine, for any view component currently appearing in the simulated physical animation to be played synchronously, the longest motion duration of the view component in the simulated physical animation; wherein the longest motion duration of the view component is determined according to the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same;

[0014] A second determining unit is used to determine the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation according to the start time of the view component appearing in the simulated physical animation and the longest motion duration of the view component;

[0015] The control unit is used to control the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

[0016] According to a third aspect of an embodiment of the present application, there is provided an electronic device, including a processor and a memory, wherein:

[0017] Memory, used to store computer programs;

[0018] The processor is used to implement the method provided in the first aspect when executing the program stored in the memory.

[0019] According to a fourth aspect of an embodiment of the present application, a computer program product is provided, wherein a computer program is stored in the computer program product, and when the computer program is executed by a processor, the method provided in the first aspect is implemented.

[0020] The multi-device synchronized view animation method of the embodiment of the present application, for any view component currently appearing in the simulated physical animation to be played synchronously, determines the longest movement duration of the view component in the simulated physical animation, and determines the start time of the newly added view component corresponding to the view component in the simulated physical animation based on the start time of the view component appearing in the simulated physical animation and the longest movement duration of the view component, and then, based on the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation, controls the playback of the newly added view component, thereby ensuring that the start time of the newly added view component corresponding to the view component in multiple simulated physical animations played synchronously is consistent without the need to perform communication synchronization between devices for each newly added view component. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic flow chart of a method for synchronizing view animation of multiple devices according to an exemplary embodiment of the present application;

[0022] Figure 2A and Figure 2B A schematic diagram of a playback screen for simulating physical animation according to an exemplary embodiment of the present application;

[0023] Figure 3 A schematic diagram of a scenario for realizing view animation synchronization;

[0024] Figure 4 A schematic diagram of a scene of view animation synchronization shown as an exemplary embodiment of the present application;

[0025] Figure 5 A schematic diagram of the structure of a multi-device synchronous view animation apparatus according to an exemplary embodiment of the present application;

[0026] Figure 6 The figure is a schematic diagram of the hardware structure of an electronic device shown as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0028] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0029] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, some terms involved in the embodiments of the present application are briefly explained below.

[0030] 1. Physics engine: A computer program or software library used to simulate and calculate the physical movement and interaction of objects in the real world;

[0031] 2. View: Android view is the basic user interface component in the Android framework. It is a visual component for building a user interface that can display text, images, buttons, and other user interaction elements.

[0032] 3. Synchronous movement of multi-device views: The process of displaying the same content on multiple devices at the same time, and moving, transforming or interacting these contents in a coordinated and consistent manner on different devices. This technology can be used in scenarios such as multi-user collaboration, display, animation or games, making the cross-device experience more coherent and immersive.

[0033] 4. View reuse: "View reuse" refers to the technology of reusing already created view components or controls in software development to reduce resource consumption and improve performance.

[0034] 5. Particle: refers to the term used in the field of computer graphics and animation. In the embodiment of the present application, "particle" means a tiny element that can participate in physical simulation and animation effects, that is, a view component, such as a leaf, a snowflake, etc.

[0035] 6. Physics simulation: simulate the physical behavior of objects in the real world, such as gravity, collision, friction, etc., in order to produce realistic animations and effects.

[0036] 7. Animation synchronization: Ensure that the animation effects on multiple devices are consistent in time, so that they play at the same speed and time point to achieve consistent visual effects.

[0037] 8. Inter-device communication: The process of data transmission and communication between different devices to achieve information sharing and real-time synchronization.

[0038] 9. Instantaneous speed: The speed of an object at a certain moment, usually calculated by the speed at the previous moment and the time interval.

[0039] 10. Frame refresh interval: The time interval for displaying a frame of an image on a multimedia device. A shorter interval can produce a smoother dynamic effect, while a longer interval may cause animation jamming.

[0040] 11. Variable speed motion: The situation where the speed of an object changes continuously during the motion process, rather than maintaining a constant speed.

[0041] 12. Predictive computing: A method of calculating future events or results based on known data or patterns.

[0042] 13. Leaf falling simulation: simulate the process of leaves falling from trees, including the movement trajectory, speed change and falling time of leaves.

[0043] 14. Air resistance: The speed-dependent force exerted on an object when it moves in the air. Its magnitude is proportional to the square of the speed.

[0044] 15. Nonlinear differential equations: equations that describe physical phenomena and motion, including equations of unknown functions and their derivatives. Nonlinearity means that the terms are not simple linear relationships. By solving these equations, we can get a mathematical model of the motion of an object.

[0045] The following is a brief description of the simulated physical animation involved in the embodiments of the present application.

[0046] In an embodiment of the present application, there may be a certain number (which may be set according to actual needs) of view components (such as leaves or snowflakes, etc.) in the simulated physical animation, and these view components may perform physical simulation movements in the picture of the simulated physical animation.

[0047] For example, the times at which these view components appear in the simulated physical animation may be completely the same, completely different, or partially the same.

[0048] For example, taking the animation simulating falling leaves as an example, assuming that there are three leaves (assuming they are leaves 1 to 3) in the simulated physical animation, leaf 1 can enter the screen first, and leaves 2 to 3 can enter the screen at the same time after leaf 1.

[0049] Among them, for any view component in the simulated physical animation, when it enters the screen and moves to a specified position (such as the bottom of the screen), it will disappear from the screen. Correspondingly, the newly added view component corresponding to the view component can be controlled to appear in the screen, that is, when a view component disappears from the screen, a new view component can be controlled to appear in the screen.

[0050] It should be noted that, in actual applications, the time when a newly added view component corresponding to a view component appears in the simulated physical animation and the time when the view component disappears from the simulated physical animation may be the same, or there may be a preset time difference.

[0051] For example, 1 second before a view component disappears from the screen, a newly added view component corresponding to the view component is controlled to appear on the screen; or, 1 second after a view component disappears from the screen, a newly added view component corresponding to the view component is controlled to appear on the screen.

[0052] In the scenario of synchronous playback of multi-device view animations, it is necessary to ensure that the same view components appear at the same time on the screens of different devices.

[0053] It should be noted that the above-mentioned time consistency includes the same time or a tolerable error.

[0054] In order to make the above-mentioned purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application are further described in detail below with reference to the accompanying drawings.

[0055] See also Figure 1 , is a flow chart of a multi-device synchronous view animation method provided in an embodiment of the present application, wherein the multi-device synchronous view animation method can be applied to any device (such as a display screen) that participates in synchronous playback of video animations, such as Figure 1 As shown, the multi-device synchronous view animation method may include the following steps:

[0056] Step S100: for any view component currently appearing in the simulated physical animation to be played synchronously, determine the longest movement duration of the view component in the simulated physical animation; wherein the longest movement duration of the view component is determined based on the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component are the same in multiple simulated physical animations played synchronously.

[0057] In the embodiment of the present application, in order to achieve synchronization of multi-device view animations, it is necessary to ensure that the same view component appears at the same time in multiple simulated physical animations that are played synchronously.

[0058] In order to make the time when the same view component appears in multiple synchronized simulated physical animations consistent, for any device participating in the synchronized playback of video animations, it can determine the longest movement duration of each view component appearing in the simulated physical animation, so as to control the appearance of new view components in the simulated physical animation based on the longest movement duration of each view component in the simulated physical animation, thereby ensuring that the time when the same view component appears in multiple synchronized simulated physical animations is consistent.

[0059] Exemplarily, for any view component in the simulated physics animation, when it appears in the simulated physics animation and its movement duration reaches the maximum movement duration, it can be controlled to disappear from the simulated physics animation.

[0060] When a view component disappears from the simulated physical animation, a new view component may be controlled to appear in the simulated physical animation (the new view component may be referred to as a newly added view component or a newly appeared view component corresponding to the view component).

[0061] Exemplarily, the newly added view component corresponding to the view component can be the same view component (that is, the same view component appears cyclically), or, the newly added view component corresponding to the view component can be a new view component that appears after the pre-configured view component disappears, or, the newly added view component corresponding to the view component can be a newly created view component after the view component disappears.

[0062] It should be noted that after the new view component appears in the simulated physical animation, it also becomes a view component that appears in the simulated physical animation. Figure 1The method flow shown determines the longest motion duration in the simulated physical animation and controls the start time of the appearance of the newly added view component corresponding to the view component.

[0063] Accordingly, in an embodiment of the present application, for any view component currently appearing in the simulated physics animation to be played synchronously, the longest movement duration of the view component in the simulated physics animation can be determined.

[0064] Exemplarily, the longest motion duration of the view component is determined based on the physical simulation motion parameters of the view component.

[0065] Exemplarily, the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same.

[0066] Different devices participating in view animation synchronization use the same algorithm to determine the longest motion duration of a view component in simulated physical animation based on the physical simulation motion parameters of the view component. Therefore, different devices participating in view animation synchronization determine the same motion duration based on the same physical simulation motion parameters.

[0067] Exemplarily, the physical simulation motion parameters may include parameters that may affect the movement speed of the view component performing physical simulation motion, which may include but are not limited to one or more parameters such as air resistance coefficient, air density, and the force area relative to the air during the movement of the view component (which may be called the frontal area).

[0068] Step S110: Determine the start time of the newly added view component corresponding to the view component in the simulated physical animation based on the start time of the view component in the simulated physical animation and the longest movement duration of the view component.

[0069] In an embodiment of the present application, for any view component that appears in the simulated physical animation to be played synchronously, when the longest movement duration of the view component in the simulated physical animation is determined in the above manner, the start time of the newly added view component corresponding to the view component in the simulated physical animation can be determined based on the start time of the view component appearing in the simulated physical animation and the longest movement duration of the view component.

[0070] Exemplarily, for the same view component, the start time of the newly added view component corresponding to the view component determined by different devices participating in the view animation synchronization to appear in the simulated physical animation is consistent.

[0071] Step S120: Control the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

[0072] In an embodiment of the present application, when the start time of the newly added view component corresponding to the view component in the simulated physical animation is determined in the above manner, the playback of the newly added view component can be controlled based on the start time of the newly added view component corresponding to the view component in the simulated physical animation.

[0073] For example, when the start time for the newly added view component to appear in the simulated physical animation is reached, the newly added view component is controlled to appear in the simulated physical animation.

[0074] It should be noted that in the embodiment of the present application, for any view component in the first view components that appear in the simulated physical animation, different devices participating in the view animation synchronization determine the start time of the view component appearing in the simulated physical animation through communication synchronization.

[0075] Among them, the first view components that appear in the simulated physical animation may include one or more, and the one or more view components are not newly added view components corresponding to the view components that have appeared in the simulated physical animation, but all belong to the view components initially added to the simulated physical animation.

[0076] For example, still taking the animation simulating falling leaves as an example, assuming that there are three leaves performing physical simulation movement in the picture, when the simulated physical animation is initially played, the starting time when these three leaves appear in the picture can be determined by the devices participating in the synchronization through communication.

[0077] After any of the three leaves appears in the screen, the longest movement duration of the leaf in the screen can be calculated and determined, and the start time of the newly added leaf corresponding to the leaf can be determined based on the start time of the leaf's appearance and the longest movement duration. Furthermore, the appearance of the newly added leaf in the screen can be controlled based on the start time of the newly added leaf's appearance in the screen.

[0078] It can be seen that in Figure 1 In the method flow shown, for any view component currently appearing in the simulated physical animation to be played synchronously, the longest movement duration of the view component in the simulated physical animation is determined, and based on the start time of the view component appearing in the simulated physical animation and the longest movement duration of the view component, the start time of the newly added view component corresponding to the view component in the simulated physical animation is determined. Then, based on the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation, the playback of the newly added view component is controlled. In this way, the start time of the newly added view component corresponding to the view component in multiple simulated physical animations that are played synchronously is ensured to be consistent without the need to perform communication synchronization between devices for each newly added view component.

[0079] In some embodiments, the longest motion duration of the view component in the simulated physical animation is determined according to the physical simulation motion parameters of the view component in the following manner:

[0080] Determine the longest motion duration of the view component in the simulated physical animation according to the physical simulation motion parameters of the view component, the objective function relationship, and the maximum motion distance of the view component in the target direction;

[0081] Among them, the objective function relationship is the functional relationship between the movement distance of the view component in the target direction and the movement duration of the view component in the simulated physical animation; when the movement distance of the view component in the target direction reaches the maximum movement distance, it disappears from the screen of the simulated physical animation.

[0082] Exemplarily, in order to determine the longest movement duration of a view component in a simulated physical animation, a functional relationship (which may be called a target function relationship) may be constructed between the movement distance of the view component in a target direction and the movement duration of the view component in the simulated physical animation.

[0083] Exemplarily, when the movement distance in the target direction reaches the maximum movement distance, the view component disappears from the screen simulating the physical animation.

[0084] For example, for an animation simulating falling leaves, the target direction may be a vertical direction, and the maximum movement distance in the target direction may be the height of the screen in the vertical direction.

[0085] Exemplarily, the objective function relationship can be constructed with the physical simulation motion parameters of the view component as known parameters, and the motion distance of the view component in the target direction and the motion duration of the view component as variables.

[0086] For any view component that appears in the simulated physical animation to be played synchronously, the longest movement duration of the view component in the simulated physical animation can be determined based on the physical simulation motion parameters of the view component, the objective function relationship, and the maximum movement distance of the view component in the target direction.

[0087] In one example, the physical simulation motion parameters of the view component include: air resistance coefficient, air density, and windward area;

[0088] Objective function relationships can include:

[0089]

[0090] k=1 / 2*cρS

[0091] in, is the movement distance (pixel distance) of the view component in the target direction, t is the movement duration of the view component in the simulated physical animation, g is the acceleration of gravity, m is the mass of the view component, c is the air resistance coefficient, ρ is the air density, S is the windward area of ​​the view component, cosh() is the hyperbolic cosine function, and ln() is the natural logarithm.

[0092] In some embodiments, the above-mentioned controlling the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation may include:

[0093] A new view component is created, and the playback of the new view component is controlled according to the start time at which the new view component appears in the simulated physical animation.

[0094] For example, in order to enrich the elements in the simulated physical animation and enhance the visual effect of the simulated physical animation, for any view component, its corresponding newly added view component can be generated by a new creation method.

[0095] Accordingly, for any view component, a newly added view component corresponding to the view component can be generated by creating a new view component, and the playback of the newly added view component can be controlled according to the start time when the newly added view component appears in the simulated physical animation.

[0096] In some other embodiments, the above-mentioned controlling the newly added view component to appear in the simulated physical animation may include:

[0097] By means of view reuse, the playback of the newly added view component is controlled according to the start time at which the newly added view component appears in the simulated physical animation.

[0098] For example, in order to reduce the resource overhead of playing simulated physical animation, for any view component, its corresponding newly added view component can be generated by view reuse.

[0099] Accordingly, for any view component, the view component can be used as a newly added view component corresponding to the view component through view reuse, and the playback of the newly added view component can be controlled according to the start time of the newly added view component appearing in the simulated physical animation.

[0100] It should be noted that, in the case of view reuse, for any view component, each appearance corresponds to a new motion statistic. The time from the appearance of the view component in the simulated physical animation to the disappearance of the view component from the simulated physical animation is a physical simulation motion of the view component in the simulated physical animation. The longest motion duration is the longest motion duration determined in the above manner, and the maximum motion distance in the target direction is the maximum motion distance determined in the above manner.

[0101] In some embodiments, the above-mentioned determination of the longest movement duration of the view component in the simulated physical animation may include:

[0102] According to the physical simulation parameters of the view component, the longest movement duration of the view component in the simulated physical animation is determined.

[0103] Exemplarily, for any view component currently appearing in the simulated physical animation to be played synchronously, the longest movement duration of the view component in the simulated physical animation can be determined through real-time calculation based on the physical simulation parameters of the view component, thereby improving the flexibility of the view components appearing in the simulated physical animation.

[0104] Among them, the implementation method of determining the longest movement duration of the view component in the simulated physical animation by real-time calculation based on the physical simulation parameters of the view component can refer to the relevant description in the above method embodiment.

[0105] In some embodiments, the above-mentioned determination of the longest movement duration of the view component in the simulated physical animation may include:

[0106] Read the longest motion duration of the stored view component; wherein, the view component appearing in the simulated physical animation is a preset view component, and the longest motion duration of the preset view component in the simulated physical animation is determined and stored according to the physical simulation motion parameters of the preset view component during the device system initialization process.

[0107] For example, in order to improve the efficiency of determining the longest movement duration of view components during the playback of simulated physical animation and reduce the amount of calculation, the view components that will appear in the screen during the playback of simulated physical animation (which may be called preset view components) can be pre-set.

[0108] During the device system initialization process, the longest motion duration of the preset view component in the simulated physical animation can be determined according to the physical simulation parameters of the preset view component, and the longest motion duration of the preset view component can be stored.

[0109] Correspondingly, for any view component currently appearing in the simulated physical animation to be played synchronously, the stored longest movement duration of the view component can be read, and based on the start time of the view component appearing in the simulated physical animation and the longest movement duration of the view component, the start time of the newly added view component corresponding to the view component in the simulated physical animation can be determined.

[0110] Exemplarily, for a preset view component, identification information may be set therefor, and there is a corresponding relationship between the identification information of the view component and the maximum movement duration of the view component.

[0111] For any view component currently appearing in the simulated physical animation to be played synchronously, the stored longest motion duration of the view component can be read according to the identification information of the view component.

[0112] In some embodiments, the above-mentioned determination of the longest movement duration of the view component in the simulated physical animation may include:

[0113] Check whether the longest motion duration of the view component is stored;

[0114] In the case where the longest motion duration of the view component is stored, obtaining the stored longest motion duration of the view component;

[0115] When the longest motion duration of the view component is not stored, the longest motion duration of the view component in the simulated physical animation is determined according to the physical simulation motion parameters of the view component, and the determined longest motion duration of the view component is stored.

[0116] Exemplarily, for any view component currently appearing in the simulated physical animation to be played synchronously, it can be queried whether the longest motion duration of the view component is stored.

[0117] In the case where the longest motion duration of the view component is stored, the stored longest motion duration of the view component may be obtained;

[0118] When the longest motion duration of the view component is not stored, the longest motion duration of the view component in the simulated physical animation is determined according to the physical simulation motion parameters of the view component, and the determined longest motion duration of the view component is stored.

[0119] Exemplarily, in this embodiment, the view components that will appear in the partially simulated physical animation may be preset, and the maximum motion duration may be determined during system initialization in the manner described above.

[0120] During the process of simulating physical animation, the view component that appears in the simulated physical animation may be a preset view component or a newly created view component.

[0121] Exemplarily, for any view component currently appearing in the simulated physical animation to be played synchronously, when the view component is a view component selected from preset view components, the identification information of the view component is the identification information of the selected preset view component.

[0122] In the case that the view component is not a view component selected from preset view components, identification information may be set for the view component.

[0123] Exemplarily, in a case where the longest motion duration of the view component is stored, obtaining the stored longest motion duration of the view component;

[0124] In the case that the longest motion duration of the view component is not stored, the longest motion duration of the view component in the simulated physical animation can be determined based on the physical simulation motion parameters of the view component.

[0125] Exemplarily, when the longest motion duration of the view component is determined, the correspondence between the identification information of the view component and the longest motion duration may also be stored.

[0126] Accordingly, when the view component appears again in the simulated physical animation, the stored longest motion duration of the view component can be obtained without recalculating it.

[0127] Therefore, the amount of calculation of the longest motion duration can be reduced while improving the flexibility of the view components appearing in the simulated physical animation, thereby improving the efficiency of determining the longest motion duration of the view components during the playback of the simulated physical animation.

[0128] In some embodiments, for any simulated physics animation among the multiple simulated physics animations played synchronously, the playing screen of the simulated physics animation includes a complete screen of a single display screen, a partial screen of a single display screen, or a spliced ​​screen of multiple display screens;

[0129] For multiple simulated physics animations played synchronously, the resolutions of the playing screens of the multiple simulated physics animations are the same.

[0130] Exemplarily, for any simulated physics animation among the multiple simulated physics animations played synchronously, the playing screen of the simulated physics animation includes a complete screen of a single display screen, a partial screen of a single display screen, or a spliced ​​screen of multiple display screens.

[0131] Take the synchronous playback of two simulated physical animations as an example. Figure 2AAs shown, one of the playback screens for simulating physical animation can be a spliced ​​screen of four display screens (assuming they are display screens 1 to 4 respectively), and another playback screen for simulating physical animation can be a complete screen of a single display screen (which can be called display screen 5).

[0132] Take the synchronous playback of three simulated physical animations as an example. Figure 2B As shown, one of the playback screens for simulating physical animation can be a spliced ​​screen of two display screens (assuming they are display screens 6 to 7), and the other two playback screens for simulating physical animation can be half of a display screen (which can be called display screen 8) (which can be called display screen 8-1 and display screen 8-2 respectively).

[0133] Exemplarily, for a plurality of simulated physics animations played synchronously, the resolutions of the playing screens of the plurality of simulated physics animations are the same.

[0134] For example, Figure 2A In the figure, the resolution of the spliced ​​screen obtained by splicing display screens 1 to 4 is the same as the resolution of display screen 5.

[0135] Figure 2B In the figure, the resolution of the spliced ​​screen obtained by splicing display screens 6 to 7, the resolution of display screen 8-1, and the resolution of display screen 8-2 are all the same.

[0136] It should be noted that in the embodiment of the present application, for multiple simulated physical animations played synchronously, the physical sizes of the playback screens of the multiple simulated physical animations may be different, but the resolution needs to be the same. When calculating the movement distance of the view component in the picture based on the physical simulation motion parameters of the view component, it refers to the pixel distance (such as the number of pixels), that is, for multiple simulated physical animations played synchronously, the pixel distance moved by the same view component at the same time and in the same direction is the same.

[0137] In addition, the physical simulation motion parameters of different view components in different playback screens are determined by resolution information (pixel information). For example, assuming that the physical sizes of two playback screens are different (with the same resolution), the physical sizes of the same view component in the two playback screens may be different, but the pixel sizes are the same. The physical simulation motion parameters of the view component, such as the frontal area, are determined based on the pixel size, ensuring that different view components can maintain the same physical simulation motion parameters in two playback screens with different physical sizes, thereby achieving view animation synchronization.

[0138] In one example, for any display screen that plays the simulated physics animation, a positional relationship between the screen image of the display screen and the image of the simulated physics animation is configured.

[0139] For any view component currently appearing in the simulated physical animation to be played synchronously, the multi-device synchronized view animation method provided in the embodiment of the present application may further include:

[0140] When the motion duration of the view component in the simulated physical animation does not reach the maximum motion duration, according to the motion duration of the view component in the simulated physical animation and the physical simulation motion parameters of the view component, determine the position of the view component in the picture of the simulated physical animation;

[0141] When it is determined that the view component appears on the screen of the device based on the positional relationship between the screen of the device and the screen simulating the physical animation, and the position of the view component in the screen simulating the physical animation, the view component is rendered on the screen of the device based on the position of the view component in the screen of the device.

[0142] For example, during the process of playing the simulated physical animation, for any display screen that plays the simulated physical animation, on the one hand, it can be Figure 1 The method flow shown determines the longest motion duration of the view component currently appearing in the simulated physical animation; on the other hand, when the motion duration of the view component in the simulated physical animation does not reach the maximum motion duration, the position of the view component in the screen of the simulated physical animation can be determined based on the motion duration of the view component in the simulated physical animation and the physical simulation motion parameters of the view component. For example, based on the motion duration and physical simulation motion parameters of the view component in the simulated physical animation, according to the objective function relationship, the motion distance (pixel distance) of the view component in the target direction is determined, thereby determining the position of the view component in the screen of the simulated physical animation.

[0143] The movement duration of the view component in the simulated physical animation may be the duration corresponding to the difference between the current time and the start time when the view component appears in the simulated physical animation.

[0144] Exemplarily, the position of the view component in the picture of the simulated physical animation can be characterized according to the pixel distance (including the horizontal pixel distance and the vertical pixel distance) of the video component moving in the horizontal direction and the vertical direction relative to the initial position.

[0145] The initial position of the view component is the initial position of the view component when it enters the screen simulating physical animation.

[0146] For a same view component, the initial position in multiple simulated physics animations played synchronously is the same, and the physical simulation motion parameters in multiple simulated physics animations played synchronously are the same.

[0147] It should be noted that, for a newly added view component corresponding to any view component, when the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation is reached, the playback control can also be performed in the above-mentioned manner, that is, when the movement duration of the newly added view component in the simulated physical animation has not reached the maximum movement duration, the position of the newly added view component in the picture of the simulated physical animation is determined according to the movement duration of the newly added view component in the simulated physical animation and the physical simulation motion parameters of the newly added view component; when it is determined that the newly added view component appears in the screen of the present device based on the positional relationship between the screen of the present device and the screen of the simulated physical animation and the position of the newly added view component in the screen of the simulated physical animation, the newly added view component is rendered on the screen of the present device based on the position of the newly added view component in the screen of the present device.

[0148] In one example, for any view component and for any display screen that plays a simulated physical animation, the initial position of the view component in the simulated physical animation is determined based on the same first pseudo-random seed and using the same first pseudo-random algorithm, and the physical simulation motion parameters of the view component in the simulated physical animation are determined based on the same second pseudo-random seed and using the same second pseudo-random algorithm.

[0149] In which, when the pseudo-random seeds and pseudo-random algorithms are the same, different display screens will obtain the same results by performing the same number of calculations.

[0150] Exemplarily, the first pseudo-random seed, the second pseudo-random seed, the first pseudo-random algorithm and the second pseudo-random algorithm are all configured in each display screen.

[0151] For example, the result of the first calculation performed by display screen 1 based on pseudo-random seed 1 using pseudo-random algorithm 1 is the same as the result of the first calculation performed by display screen 2 based on pseudo-random seed 1 using pseudo-random algorithm 1.

[0152] The result of the second calculation performed by display screen 1 based on pseudo-random seed 1 using pseudo-random algorithm 1 is the same as the result of the second calculation performed by display screen 2 based on pseudo-random seed 1 using pseudo-random algorithm 1.

[0153] Therefore, it can be ensured that the initial position of the same view component in multiple simulated physical animations played synchronously is the same, and the physical simulation motion parameters in multiple simulated physical animations played synchronously are the same.

[0154] In one example, the first pseudo-random seed and the second pseudo-random seed are the same, and the first pseudo-random algorithm and the second pseudo-random algorithm are the same.

[0155] That is, the display screen can calculate the initial position and physical simulation motion parameters respectively based on the same pseudo-random seed and using the same pseudo-random algorithm; wherein each display screen calculates the initial position and the physical simulation motion parameters in the same order, for example, the initial position is calculated first and then the physical simulation motion parameters; or, the physical simulation motion parameters are calculated first and then the initial position.

[0156] Exemplarily, for any display screen, when the position of the view component in the screen simulating the physical animation is determined in the above manner, it can be determined that the view component appears on the screen of the device based on the positional relationship between the screen of the device (i.e., the display screen) and the screen simulating the physical animation, as well as the position of the view component in the screen simulating the physical animation, and the view component can be rendered on the screen of the device based on the position of the view component in the screen of the device.

[0157] by Figure 2A Taking display screen 3 in the figure as an example, assuming that the vertical position of the view component determined in the above manner in the screen simulating the physical animation is 3 / 4 of the entire screen (relative to the upper edge of the animation screen), and the horizontal position does not exceed 1 / 2 of the entire screen (relative to the left edge of the animation screen), then according to the positional relationship between the screen of this device and the screen simulating the physical animation, it can be determined that the vertical position of the view component in the screen of this device is 1 / 2 of the display screen (relative to the upper edge of the screen).

[0158] Then Figure 2B Taking display screen 8 in the figure as an example, assuming that the horizontal position of the view component determined in the above manner in the picture of simulated physical animation is 1 / 2 of the picture (relative to the left edge of the animation picture), then display screen 8 can determine that the position of the view component in the screen of 8-1 is 1 / 4 of the entire screen (relative to the 1 / 4 of the left edge of the screen) and the position in the screen of 8-2 is 3 / 4 of the entire screen (relative to the 3 / 4 of the left edge of the screen) based on the positional relationship between the screen of the device and the picture of simulated physical animation.

[0159] It should be noted that when the movement duration of the view component in the simulated physical animation reaches the maximum movement duration, the view component will disappear from the simulated physical animation, and each display screen does not need to render the view component.

[0160] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below with reference to specific examples.

[0161] In this embodiment, taking an animation simulating falling leaves, and the playback screen for simulating physical animation is a complete screen of a single display screen as an example, assuming that device 1 and device 2 are devices participating in view animation synchronization, and device 1 and device 2 have the same resolution, it is necessary to ensure that the start time of the same leaf appearing in the screen of device 1 is consistent with the start time of the same leaf appearing in the screen of device 2.

[0162] To achieve the above goals, the optional implementation solutions may include:

[0163] Solution 1

[0164] like Figure 3 As shown, each time device 1 and device 2 determine that a leaf has fallen to the bottom, they can communicate once to determine the new leaf start time corresponding to the leaf.

[0165] However, this solution requires the devices to be able to communicate over the network, which requires the devices to be connected to each other for a long time. If the network conditions are not ideal, communication interruption or packet loss may occur, resulting in synchronization failure and affecting the synchronization effect of the animation.

[0166] In addition, implementing this solution requires additional network programming and algorithm design. Communication and data exchange will also increase the computing and communication overhead of the device. If there are multiple particles that need to be synchronized, the number of communications required will also increase, which will have a certain impact on the performance and battery life of the device.

[0167] Solution 2

[0168] By observing the longest time a leaf takes to fall from the top to the bottom, an empirical value is set based on the longest time, and the starting time of the corresponding new leaf falling is determined based on the empirical value. Because the first leaf starts synchronously through communication, and the empirical value is a fixed duration, these two values ​​will not change with device performance issues, so that each leaf of multiple devices can start falling synchronously.

[0169] However, since the leaves simulate physical movement, the mass and volume of different leaves may be different, and the resistance they encounter is different. If the experience value is too large, it will cause the leaves that fall faster to fall to the lowest end, and you will have to wait a long time before seeing another leaf fall. If the experience value is too small, a new leaf will fall before a leaf has finished falling. If the device performance only supports rendering a certain number of leaves, this solution will result in the simultaneous rendering of more than the specified number of leaves, causing the device performance bottleneck to be exceeded and resulting in a freeze.

[0170] Furthermore, if the distance between the top and the bottom is changed, the experience value needs to be modified manually, which has a high maintenance cost.

[0171] In response to the problems existing in the above-mentioned solutions, an embodiment of the present application provides a solution for predicting the start time of the falling of new leaves by calculation.

[0172] Since the animation simulating physical phenomena is a variable speed motion, it is necessary to consider various forces and calculate the longest falling time based on longitudinal displacement. To calculate the longest duration of a leaf falling, it is necessary to consider the effects of gravity, resistance, initial velocity, air density and the windward area of ​​the leaf.

[0173] In the solution provided in the embodiment of the present application, the calculation process of the longest duration of the leaf falling (i.e. the longest movement duration mentioned above) is as follows:

[0174] First, consider the air resistance that the leaf encounters during its fall. The air resistance (longitudinal) can be calculated using the following formula:

[0175] f=1 / 2*cρSv 2

[0176] Among them, c represents the air resistance coefficient, ρ represents the air density, S represents the windward area of ​​the leaf, and v represents the speed of the leaf relative to the air (instantaneous speed).

[0177] According to this formula, air resistance is proportional to the square of speed. This proportionality coefficient can be expressed as k, that is, k=1 / 2*cρS, and the magnitude of air resistance can be expressed as kv 2 .

[0178] When considering the downward movement of the leaf, it is not necessary to consider its horizontal movement. During the falling process, the leaf is affected by gravity and air resistance. Assuming that downward is the positive direction, the gravity is positive and the air resistance is negative. According to Newton's second law, the equation can be obtained:

[0179] mg–kv^2 = ma

[0180] Then, we can get the following nonlinear differential equation:

[0181]

[0182] Assuming that the initial falling distance of the leaf is 0 and the initial velocity is 0, based on this condition and the above formula, the functional relationship between the falling distance of the leaf and the falling time can be obtained:

[0183]

[0184] Based on this formula, for any leaf, the maximum falling time of the leaf can be determined according to the maximum falling distance of the leaf in the longitudinal direction (i.e., the target direction mentioned above). Thus, the falling start time of the next new leaf corresponding to the leaf can be calculated by using the time when the leaf starts falling + the longest falling time. The schematic diagram can be shown as follows: Figure 4 shown.

[0185] Exemplarily, assuming that there are at most three leaves in the picture at the same time, the falling start time of the three leaves in the initial picture can be determined through the inter-device communication between device 1 and device 2.

[0186] For any leaf, when the falling start time is determined through communication between devices, the maximum falling duration can be calculated in the above manner, and the falling start time of the corresponding new leaf can be determined.

[0187] The method provided by the present application is described above. The device provided by the present application is described below:

[0188] See also Figure 5 , is a schematic diagram of the structure of an Android multi-device synchronous view animation device for simulating a physical engine provided in an embodiment of the present application, wherein the device can be deployed on any device participating in the synchronous playback of video animation in the above embodiments, such as Figure 5 As shown, the Android multi-device synchronous view animation device simulating the physical engine may include:

[0189] The first determining unit 510 is used to determine the longest motion duration of any view component currently appearing in the simulated physical animation to be played synchronously, wherein the longest motion duration of the view component is determined according to the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same;

[0190] The second determining unit 520 is used to determine the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation according to the start time of the view component appearing in the simulated physical animation and the longest motion duration of the view component;

[0191] The control unit 530 is used to control the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

[0192] In some embodiments, the first determining unit 510 determines the longest motion duration of the view component in the simulated physical animation according to the physical simulation motion parameters of the view component, including:

[0193] Determine the longest motion duration of the view component in the simulated physical animation according to the physical simulation motion parameters of the view component, the objective function relationship, and the maximum motion distance of the view component in the target direction;

[0194] Among them, the objective function relationship is the functional relationship between the movement distance of the view component in the target direction and the movement duration of the view component in the simulated physical animation; when the movement distance of the view component in the target direction reaches the maximum movement distance, it disappears from the screen of the simulated physical animation.

[0195] In some embodiments, the physical simulation motion parameters of the view component include: air resistance coefficient, air density, and windward area;

[0196] The objective function relationship includes:

[0197]

[0198] k=1 / 2*cρS

[0199] in, is the movement distance of the view component in the target direction, t is the movement duration of the view component in the simulated physical animation, g is the acceleration of gravity, m is the mass of the view component, c is the air resistance coefficient, ρ is the air density, S is the frontal area of ​​the view component, cosh() is the hyperbolic cosine function, and ln() is the natural logarithm.

[0200] In some embodiments, the control unit 530 controls the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation, including:

[0201] Creating a new view component, and controlling the playback of the new view component according to the start time of the new view component appearing in the simulated physical animation; or,

[0202] By means of view reuse, the view component is used as a newly added view component corresponding to the view component, and the playback of the newly added view component is controlled according to the start time when the newly added view component appears in the simulated physical animation.

[0203] In some embodiments, the first determining unit 510 determines the longest motion duration of the view component in the simulated physical animation, including:

[0204] Determine the longest motion duration of the view component in the simulated physical animation according to the physical simulation parameters of the view component;

[0205] or,

[0206] Reading the stored longest motion duration of the view component; wherein the view component appearing in the simulated physical animation is a preset view component, and the longest motion duration of the preset view component in the simulated physical animation is determined and stored according to the physical simulation motion parameters of the preset view component during the device system initialization process;

[0207] or,

[0208] Check whether the longest motion duration of the view component is stored;

[0209] In the case where the longest motion duration of the view component is stored, obtaining the stored longest motion duration of the view component;

[0210] When the longest motion duration of the view component is not stored, the longest motion duration of the view component in the simulated physical animation is determined according to the physical simulation motion parameters of the view component, and the determined longest motion duration of the view component is stored.

[0211] In some embodiments, for any simulated physics animation among the multiple simulated physics animations played synchronously, the playing screen of the simulated physics animation includes a complete screen of a single display screen, a partial screen of a single display screen, or a spliced ​​screen of multiple display screens;

[0212] For multiple simulated physics animations played synchronously, the resolutions of the playing screens of the multiple simulated physics animations are the same;

[0213] For any view component among the first view components that appear in the simulated physical animation, the playback screens of the multiple simulated physical animations that are played synchronously determine the start time of the view component appearing in the simulated physical animation by means of communication synchronization.

[0214] In some embodiments, for any display screen playing the simulated physics animation, a positional relationship between the screen image of the display screen and the image of the simulated physics animation is configured;

[0215] The control unit 530 is further configured to determine, for any view component currently appearing in the simulated physics animation to be synchronously played, a position of the view component in the picture of the simulated physics animation according to the movement duration of the view component in the simulated physics animation and the physical simulation movement parameters of the view component, when the movement duration of the view component in the simulated physics animation has not reached the maximum movement duration;

[0216] When it is determined that the view component appears on the screen of the device based on the positional relationship between the screen of the device and the screen simulating the physical animation, and the position of the view component in the screen simulating the physical animation, the view component is rendered on the screen of the device based on the position of the view component in the screen of the device.

[0217] In some embodiments, for any view component and any display screen that plays a simulated physical animation, the initial position of the view component in the simulated physical animation is determined based on the same first pseudo-random seed and using the same first pseudo-random algorithm, and the physical simulation motion parameters of the view component in the simulated physical animation are determined based on the same second pseudo-random seed and using the same second pseudo-random algorithm.

[0218] An embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory is used to store computer programs; the processor is used to implement the multi-device synchronous view animation method described above when executing the program stored in the memory.

[0219] See also Figure 6 , is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. The electronic device may include a processor 601 and a memory 602 storing machine executable instructions. The processor 601 and the memory 602 may communicate via a system bus 603. In addition, by reading and executing the machine executable instructions corresponding to the multi-device synchronous view animation logic in the memory 602, the processor 601 may execute the multi-device synchronous view animation method described above.

[0220] The memory 602 mentioned herein may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory, random access memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.

[0221] In some embodiments, a machine-readable storage medium is also provided. Figure 6 The memory 602 in the machine-readable storage medium stores machine executable instructions, and when the machine executable instructions are executed by the processor, the multi-device synchronized view animation method described above is implemented. For example, the machine-readable storage medium can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

[0222] An embodiment of the present application also provides a computer program product, which stores a computer program, and when a processor executes the computer program, it prompts the processor to execute the multi-device synchronous view animation method described above.

Claims

1. A method for synchronizing view animation of multiple devices, characterized in that: include: For any view component currently appearing in the simulated physical animation to be played synchronously, determine the longest motion duration of the view component in the simulated physical animation; wherein the longest motion duration of the view component is determined according to the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same; the view component represents a tiny element that participates in physical simulation and animation effects; According to the start time of the view component appearing in the simulated physical animation and the longest motion duration of the view component, determine the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation; The playback of the newly added view component is controlled according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

2. The method according to claim 1, characterized in that The maximum motion duration of a view component in a simulated physical animation is determined by the physical simulation motion parameters of the view component in the following way: Determine the longest motion duration of the view component in the simulated physical animation according to the physical simulation motion parameters of the view component, the objective function relationship, and the maximum motion distance of the view component in the target direction; Among them, the objective function relationship is the functional relationship between the movement distance of the view component in the target direction and the movement duration of the view component in the simulated physical animation; when the movement distance of the view component in the target direction reaches the maximum movement distance, it disappears from the screen of the simulated physical animation.

3. The method according to claim 2, characterized in that The physical simulation motion parameters of the view component include: air resistance coefficient, air density and windward area; The objective function relationship includes: k=1 / 2*cρS in, is the movement distance of the view component in the target direction, t is the movement duration of the view component in the simulated physical animation, g is the acceleration of gravity, m is the mass of the view component, c is the air resistance coefficient, ρ is the air density, S is the frontal area of ​​the view component, cosh() is the hyperbolic cosine function, and ln() is the natural logarithm.

4. The method according to claim 1, characterized in that: The playing control of the newly added view component according to the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation includes: Creating a new view component, and controlling the playback of the new view component according to the start time of the new view component appearing in the simulated physical animation; or, By means of view reuse, the view component is used as a newly added view component corresponding to the view component, and the playback of the newly added view component is controlled according to the start time when the newly added view component appears in the simulated physical animation.

5. The method according to claim 1, characterized in that The determining of the longest motion duration of the view component in the simulated physical animation comprises: Determine the longest motion duration of the view component in the simulated physical animation according to the physical simulation parameters of the view component; or, Reading the stored longest motion duration of the view component; wherein the view component appearing in the simulated physical animation is a preset view component, and the longest motion duration of the preset view component in the simulated physical animation is determined and stored according to the physical simulation motion parameters of the preset view component during the device system initialization process; or, Check whether the longest motion duration of the view component is stored; In the case where the longest motion duration of the view component is stored, obtaining the stored longest motion duration of the view component; When the longest motion duration of the view component is not stored, the longest motion duration of the view component in the simulated physical animation is determined according to the physical simulation motion parameters of the view component, and the determined longest motion duration of the view component is stored.

6. The method according to claim 1, characterized in that For any simulated physics animation among the multiple simulated physics animations played synchronously, the playing screen of the simulated physics animation includes a complete screen of a single display screen, a partial screen of a single display screen, or a spliced ​​screen of multiple display screens; For multiple simulated physics animations played synchronously, the resolutions of the playing screens of the multiple simulated physics animations are the same; For any view component among the first view components that appear in the simulated physical animation, the playback screens of the multiple simulated physical animations that are played synchronously determine the start time of the view component appearing in the simulated physical animation by means of communication synchronization.

7. The method according to claim 6, characterized in that For any display screen playing the simulated physical animation, the positional relationship between the screen image of the display screen and the image of the simulated physical animation is configured; For any view component currently appearing in the simulated physical animation to be played synchronously, the method further includes: When the motion duration of the view component in the simulated physical animation does not reach the maximum motion duration, according to the motion duration of the view component in the simulated physical animation and the physical simulation motion parameters of the view component, determine the position of the view component in the picture of the simulated physical animation; When it is determined that the view component appears on the screen of the device based on the positional relationship between the screen of the device and the screen simulating the physical animation, and the position of the view component in the screen simulating the physical animation, the view component is rendered on the screen of the device based on the position of the view component in the screen of the device.

8. The method according to claim 1, characterized in that For any view component and any display screen that plays a simulated physical animation, it determines the initial position of the view component in the simulated physical animation based on the same first pseudo-random seed and using the same first pseudo-random algorithm, and determines the physical simulation motion parameters of the view component in the simulated physical animation based on the same second pseudo-random seed and using the same second pseudo-random algorithm.

9. A multi-device synchronous view animation device, characterized in that: include: The first determination unit is used to determine the longest motion duration of any view component currently appearing in the simulated physical animation to be played synchronously, wherein the longest motion duration of the view component is determined according to the physical simulation motion parameters of the view component; the physical simulation motion parameters of the same view component in multiple simulated physical animations played synchronously are the same; the view component represents a tiny element participating in physical simulation and animation effects; A second determining unit is used to determine the start time of the newly added view component corresponding to the view component appearing in the simulated physical animation according to the start time of the view component appearing in the simulated physical animation and the longest motion duration of the view component; The control unit is used to control the playback of the newly added view component according to the start time at which the newly added view component corresponding to the view component appears in the simulated physical animation.

10. An electronic device, characterized in that: comprising a processor and a memory, wherein: Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 8 when executing a program stored in a memory.

11. A computer program product, characterized in that The computer program product stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.