Uml animation system and method supporting multithreaded variable display frequency
The multi-threaded variable display frequency UML simulation animation system solves the problems of animation data recovery and performance in existing technologies, and achieves smooth operation and intuitive simulation effects on low-performance devices.
Patent Information
- Application Number
- CN202311247650.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-09-26
AI Technical Summary
Existing UML simulation animation systems are unable to recover animation data, have incorrect operating logic, and suffer from performance issues, causing the software to freeze.
A UML simulation animation system with variable display frequency that supports multi-threading is adopted, including a drawing instruction generator, an animation drawing instruction interceptor, and an animation underlying module. The drawing instruction generator converts input instructions, the animation drawing instruction interceptor triggers the drawing operation of the underlying module at regular intervals, and the animation data cache stores and merges instructions to optimize system performance.
It achieves the avoidance of data conflicts in a multi-threaded environment, ensures smooth software operation, supports the recovery of animation data, and optimizes the user simulation experience.
Smart Images

Figure CN117270964B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation animation technology, and in particular to a UML simulation animation system and method that supports multi-threading and variable display frequency. Background Technology
[0002] For the UML simulation animation part, the open-source software Papyrus provides a partial animation system implementation, but this system has many problems. First, the system cannot restore animation data when the diagram is reopened. Second, the system runs synchronously, and its execution logic is incorrect. Finally, the system suffers from serious performance issues; even a slight increase in execution speed easily causes the software to freeze. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a UML simulation animation system and method that supports multi-threading and variable display frequency, which can solve the problems in the prior art.
[0004] The technical solution of this invention: A UML simulation animation system supporting multi-threading and variable display frequency, wherein the system includes a drawing instruction generator, an animation drawing instruction interceptor, and an animation underlying module.
[0005] The drawing instruction generator is used to receive external animation input instructions, convert the animation input instructions into data required for underlying drawing, and generate animation drawing instructions;
[0006] The animation drawing instruction interceptor is used to intercept the animation drawing instructions and periodically trigger the underlying animation module to perform drawing operations;
[0007] The underlying animation module is used to draw animation data for the model view.
[0008] Preferably, the system further includes an animation data cache, which includes a model-animation data cache area for storing the animation input instructions.
[0009] Preferably, the animation data cache further includes an animation-drawing graphics data cache area for storing the drawn animation data.
[0010] Preferably, when multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the animation drawing instruction interceptor is further used to merge the multiple drawing instructions for the same model view.
[0011] Preferably, when a model view is opened, the animation underlying module automatically creates a corresponding painter. The painter is used to draw animation data, and a painter is created for each model view opened.
[0012] When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache.
[0013] When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module;
[0014] When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
[0015] This invention also provides a UML simulation animation method supporting multi-threading and variable display frequency, wherein the method includes:
[0016] The system generates animation input instructions from external sources using drawing instructions, converts these instructions into data required for underlying drawing, and generates animation drawing instructions.
[0017] The animation drawing command is intercepted using an animation drawing command interceptor, and the underlying animation module is periodically triggered to perform drawing operations.
[0018] Use the underlying animation module to draw animation data for the model view.
[0019] Preferably, the method further includes storing the animation input instructions using a model-animation data cache in the animation data cache.
[0020] Preferably, the method further includes storing the drawn animation data using an animation-drawing graphics data cache in the animation data cache.
[0021] Preferably, when multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the method further includes using the animation drawing instruction interceptor to merge the multiple drawing instructions for the same model view.
[0022] Preferably, when a model view is opened, the animation underlying module automatically creates a corresponding painter. The painter is used to draw animation data, and a painter is created for each model view opened.
[0023] When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache.
[0024] When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module;
[0025] When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
[0026] Through the above technical solution, the drawing instruction generator can convert animation input instructions into data required for underlying drawing and generate animation drawing instructions. The animation drawing instruction interceptor can intercept these instructions and periodically trigger the underlying animation module to perform drawing operations. Therefore, the simulation effect can be displayed in the model view, providing users with a more intuitive simulation experience. Attached Figure Description
[0027] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0028] Figure 1 This is a block diagram of a UML simulation animation system with variable display frequency that supports multi-threading, provided as an embodiment of the present invention. Detailed Implementation
[0029] Specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings. In the following description, specific details are set forth for purposes of explanation and not limitation, in order to aid in a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced in other embodiments departing from these specific details.
[0030] It should be noted that, in order to avoid obscuring the invention with unnecessary details, only the device structure and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0031] Figure 1 This is a block diagram of a UML simulation animation system with variable display frequency that supports multi-threading, provided as an embodiment of the present invention.
[0032] like Figure 1 As shown, this embodiment of the invention provides a UML simulation animation system with variable display frequency that supports multi-threading. The system includes a drawing instruction generator, an animation drawing instruction interceptor, and an animation underlying module.
[0033] The drawing instruction generator is used to receive external animation input instructions, convert the animation input instructions into data required for underlying drawing, and generate animation drawing instructions;
[0034] The animation drawing instruction interceptor is used to intercept the animation drawing instructions and periodically trigger the underlying animation module to perform drawing operations;
[0035] The underlying animation module is used to draw animation data for the model view.
[0036] In other words, the underlying animation module is used to actually draw the animation data on each graph.
[0037] Through the above technical solution, the drawing instruction generator can convert animation input instructions into data required for underlying drawing and generate animation drawing instructions. The animation drawing instruction interceptor can intercept these instructions and periodically trigger the underlying animation module to perform drawing operations. Therefore, the simulation effect can be displayed in the model view, providing users with a more intuitive simulation experience.
[0038] The entire system accepts external animation input and outputs the animation display effect on the screen. During simulation, the simulation execution part sends the running data of the nodes as external animation input commands.
[0039] According to one embodiment of the present invention, the system further includes an animation data cache, which includes a model-animation data cache area for storing the animation input instructions.
[0040] For example, animation input commands can be synchronized to the model-animation data buffer.
[0041] According to one embodiment of the present invention, the animation data buffer further includes an animation-drawing graphics data buffer for storing drawn animation data.
[0042] According to one embodiment of the present invention, when multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the animation drawing instruction interceptor is further configured to merge the multiple drawing instructions for the same model view.
[0043] In other words, the animation drawing instruction interceptor can merge intercepted drawing instructions for the same graphic, thereby reducing the number of drawing instructions, optimizing system performance, and resolving data conflicts that occur during multi-threaded operation.
[0044] According to one embodiment of the present invention, the animation drawing instruction interceptor can be configured to trigger a frequency after interception.
[0045] For example, the trigger frequency can be set within an appropriate range to avoid overloading the system due to excessive frequency or underperforming the system due to excessive frequency. This range can be set according to the actual situation, and this invention does not limit it.
[0046] By adjusting the trigger frequency, the system lag caused by frequent calls to the underlying animation system can be alleviated. For machines with lower performance, this frequency can be reduced to make the software run more smoothly (that is, to ensure the smoothness of software operation).
[0047] According to one embodiment of the present invention, when a model view is opened, the animation underlying module automatically creates a corresponding painter, which is used to draw animation data. A painter is created for each model view opened.
[0048] When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache.
[0049] When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module;
[0050] When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
[0051] In other words, each open model view has an independent drawer, and the corresponding drawer is automatically deleted when the model view is closed. When drawing animation effects, the drawer can store the drawn animation data in the animation-drawing graphics data buffer within the animation data buffer. When a model view is reopened, a new drawer can be synchronously created. This drawer can restore the animation data based on the data in the model-animation data buffer within the animation data buffer, allowing the reopened view to display the previous animation.
[0052] Therefore, even if the model view is closed and then reopened, the animation data can be restored.
[0053] This invention also provides a UML simulation animation method supporting multi-threading and variable display frequency, wherein the method includes:
[0054] The system generates animation input instructions from external sources using drawing instructions, converts these instructions into data required for underlying drawing, and generates animation drawing instructions.
[0055] The animation drawing command is intercepted using an animation drawing command interceptor, and the underlying animation module is periodically triggered to perform drawing operations.
[0056] Use the underlying animation module to draw animation data for the model view.
[0057] Through the above technical solution, the drawing instruction generator can convert animation input instructions into data required for underlying drawing and generate animation drawing instructions. The animation drawing instruction interceptor can intercept these instructions and periodically trigger the underlying animation module to perform drawing operations. Therefore, the simulation effect can be displayed in the model view, providing users with a more intuitive simulation experience.
[0058] According to one embodiment of the present invention, the method further includes storing the animation input instructions using a model-animation data buffer in an animation data buffer.
[0059] According to one embodiment of the present invention, the method further includes storing the drawn animation data using an animation-drawing graphics data cache in the animation data cache.
[0060] According to one embodiment of the present invention, when multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the method further includes using the animation drawing instruction interceptor to merge the multiple drawing instructions for the same model view.
[0061] According to one embodiment of the present invention, when a model view is opened, the animation underlying module automatically creates a corresponding painter, which is used to draw animation data. A painter is created for each model view opened.
[0062] When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache.
[0063] When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module;
[0064] When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
[0065] The method described above is the same as the one mentioned above. Figure 1 The system described corresponds to this; for specific examples, please refer to the aforementioned section. Figure 1 The methods described will not be elaborated upon here.
[0066] As can be seen from the above embodiments, the UML simulation animation method and system with variable display frequency supporting multi-threading described in this invention has at least the following advantages: 1) It avoids the problem of data conflict during multi-threaded operation; 2) It ensures that the software can run smoothly on computers with low performance; 3) When the model view is closed and reopened, the animation data can be restored in time.
[0067] The features described and / or illustrated above with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, and / or in combination with or in lieu of features in other embodiments.
[0068] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, components, or combinations thereof.
[0069] The apparatus and methods described above can be implemented in hardware or in combination with software. This invention relates to computer-readable programs that, when executed by a logic component, enable that logic component to implement the apparatus or constituent parts described above, or to implement the various methods or steps described above. This invention also relates to storage media for storing the above programs, such as hard disks, magnetic disks, optical disks, DVDs, flash memory, etc.
[0070] Many features and advantages of these embodiments are apparent from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. Furthermore, since many modifications and alterations will readily occur to those skilled in the art, the embodiments of the invention are not intended to be limited to the precise structures and operations illustrated and described, but rather to encompass all suitable modifications and equivalents falling within their scope.
[0071] The parts of this invention not described in detail are techniques known to those skilled in the art.
Claims
1. A UML simulation animation system supporting multi-threading and variable display frequency, characterized in that, The system includes a drawing instruction generator, an animation drawing instruction interceptor, and an animation underlying module. The drawing instruction generator is used to receive external animation input instructions, convert the animation input instructions into data required for underlying drawing, and generate animation drawing instructions; The animation drawing instruction interceptor is used to intercept the animation drawing instructions and periodically trigger the underlying animation module to perform drawing operations; The underlying animation module is used to draw animation data for the model view; In the case where multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the animation drawing instruction interceptor is also used to merge the multiple drawing instructions for the same model view.
2. The system according to claim 1, characterized in that, The system also includes an animation data cache, which comprises a model-animation data cache for storing the animation input instructions.
3. The system according to claim 2, characterized in that, The animation data cache also includes an animation-drawing graphics data cache area for storing the drawn animation data.
4. The system according to claim 3, characterized in that, When a model view is opened, the underlying animation module automatically creates a corresponding drawer. The drawer is used to draw animation data, and a drawer is created for each model view opened. When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache. When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module; When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
5. A UML simulation animation method supporting multi-threading and variable display frequency, characterized in that, The method includes: The system generates animation input instructions from external sources using drawing instructions, converts these instructions into data required for underlying drawing, and generates animation drawing instructions. The animation drawing command is intercepted using an animation drawing command interceptor, and the underlying animation module is periodically triggered to perform drawing operations. Use the underlying animation module to draw animation data for the model view; In the case where multiple animation drawing instructions are intercepted, and the multiple animation drawing instructions include multiple drawing instructions for the same model view, the method further includes using the animation drawing instruction interceptor to merge the multiple drawing instructions for the same model view.
6. The method according to claim 5, characterized in that, The method also includes storing the animation input instructions using a model-animation data cache in the animation data cache.
7. The method according to claim 6, characterized in that, The method also includes storing the drawn animation data in the animation-drawing graphics data cache in the animation data cache.
8. The method according to claim 5, characterized in that, When a model view is opened, the underlying animation module automatically creates a corresponding drawer. The drawer is used to draw animation data, and a drawer is created for each model view opened. When drawing animation data for the model view, the corresponding drawer simultaneously stores the drawn animation data in the animation-drawing graphics data cache. When the model view is closed, the corresponding drawer is automatically deleted from the underlying animation module; When the model view is reopened, the underlying animation module automatically recreates the corresponding drawer and loads the animation data stored in the animation-drawing graphics data cache.
Citation Information
Patent Citations
Method and system for automatically adjusting rendered fidelity of elements of composition
CN102446361A
Animation drawing method and device
CN108364335A