Graphics rendering method and system based on vector parsing, and terminal device

By using vector analysis and path mapping techniques, combined with layer separation and matrix transformation, the problems of high-definition magnification and dynamic interaction of static images in virtual experimental teaching systems have been solved, achieving efficient, high-definition, and highly interactive graphic rendering effects.

WO2026232832A1PCT designated stage Publication Date: 2026-11-12GUANGZHOU LANGO ELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/145849
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-09
Filing Date
2025-12-26
Publication Date
2026-11-12

AI Technical Summary

Technical Problem

In existing virtual experimental teaching systems, the use of static images leads to high-definition magnification, blurring and distortion during dynamic interaction, and excessive resource consumption. Furthermore, the development of custom drawing methods is highly complex, making it difficult to meet the needs of rapid iteration and functional expansion.

Method used

A vector-based graphics rendering method is adopted. By obtaining the path information and drawing information of the vector graphics file, an initial transformation matrix is ​​constructed. User operations are monitored in real time to perform layer separation and simulated actions. High-definition redrawing and animation effects are achieved by using matrix transformation.

Benefits of technology

While ensuring graphic clarity and real-time interactivity, it significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025145849_12112026_PF_FP_ABST
    Figure CN2025145849_12112026_PF_FP_ABST
Patent Text Reader

Abstract

A graphics rendering method and system based on vector parsing, and a terminal device, which relate to the technical field of vector graphics generation or processing. The method comprises: on the basis of a vector graph file, acquiring graphics path information and drawing information; constructing an initial transformation matrix, and obtaining an initial image on the basis of the initial transformation matrix, the graphics path information and the drawing information; executing interaction action monitoring to acquire real-time operation information of a user, and when the real-time operation information of the user meets a preset layer separation condition, executing a layer separation action to obtain a real-time transformed image; and on the basis of a graphics matrix state, acquiring a current transformation parameter, and when the current transformation parameter exceeds a preset transformation threshold value, executing a simulation action to obtain a redrawn image, so as to realize graphics rendering based on vector parsing and path mapping.
Need to check novelty before this filing date? Find Prior Art

Description

A vector-based graphics rendering method, system, and terminal device. Technical Field

[0001] This invention relates to the field of vector graphics generation or processing technology, and in particular to a graphics rendering method, system and terminal device based on vector analysis. Background Technology

[0002] In current virtual experimental teaching systems, using static images (such as bitmaps or textures) to display experimental instrument graphics is a common technical approach. While this method has advantages in development efficiency and resource consumption, it also has significant limitations that may affect the immersion, interactivity, and educational effectiveness of virtual experimental teaching. For example, in applications involving high-definition magnification, dynamic interaction, and complex animation simulations, traditional bitmap formats (such as JPEG and PNG), due to their pixel-based storage characteristics, inevitably face problems such as resolution-dependent blurring and distortion, severe edge jaggedness, and excessive resource consumption at high resolutions. These issues significantly impact the visual experience, especially when users frequently zoom, drag, or rotate the view.

[0003] Some systems attempt to achieve path-level rendering (such as dynamic drawing based on Bézier curves or SVG paths) through custom drawing methods like Canvas. While this can alleviate bitmap clarity issues to some extent, it typically requires developers to manually parse path data and write complex rendering logic, leading to high code maintenance costs, extended development cycles, and significant technical challenges in achieving refined animation effects (such as path deformation, particle flow, and dynamic shading). This makes it difficult to meet the demands of rapid product iteration and feature expansion. Therefore, to address these pain points, there is an urgent need to explore an innovative method that combines the high-definition rendering capabilities of vector graphics with the dynamic optimization characteristics of path mapping technology. By preprocessing vector path data, building a layered rendering engine, and implementing dynamic level of detail (LOD) adjustments, this approach can significantly reduce development complexity and resource consumption while ensuring graphic clarity and smooth interaction. This would provide an efficient, scalable, and highly interactive solution for experimental graphics rendering. Summary of the Invention

[0004] This invention aims to provide a vector-based graphics rendering method to solve the technical problems in the above-mentioned experimental teaching system where static images are difficult to use in various teaching scenarios and the development of solutions is highly complex. While ensuring graphic clarity and real-time interaction, it significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

[0005] To address the aforementioned technical problems, this invention provides a graphics rendering method based on vector analysis, comprising the following steps:

[0006] Obtain vector graphics files, and extract graphic path information and drawing information based on the vector graphics files;

[0007] Construct an initialization transformation matrix, and perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information to obtain the initial image;

[0008] The system listens for and acquires real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, it performs a layer separation action. The layer separation action includes: acquiring a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix; acquiring the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; acquiring the layer correction matrix corresponding to the separated layer based on the drawing information and the graphic matrix state; and processing the initial image based on the graphic matrix state and the layer correction matrix to obtain the acquired real-time transformed image. The system obtains the basic layer and the separated layer based on the drawing information.

[0009] The current transformation parameters are obtained based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, a simulation action is performed. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain the redrawn image.

[0010] The method provided by this invention is based on vector analysis and path mapping. First, it uses vector analysis to extract relevant information of the graphics and construct initial information. Then, during user operation, it uses simple path information mapping and matrix transformation to redraw the graphics during transformation, maintaining the consistency of the graphics state and ensuring that the path is high-definition and undistorted. Furthermore, it performs layer correction and layer transformation under specific conditions based on condition judgment to achieve animation simulation effects. While ensuring the clarity of the graphics and real-time interaction, it significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

[0011] Furthermore, the process of listening to interactive actions to obtain real-time user operation information, and triggering a layer separation action when the real-time user operation information meets the preset layer separation conditions, also includes: listening to interactive actions to obtain real-time user operation information; when the real-time user operation information does not meet the preset layer separation conditions, obtaining a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix; then obtaining the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; and obtaining a real-time transformed image based on the graphic matrix state and the initial image.

[0012] In the above scheme, by executing listening interaction actions to obtain user operation information in real time and responding promptly, it is possible to realize operations such as translation, transformation, and rotation of the actual image screen, and obtain and maintain the corresponding graphic matrix state to achieve continuous interactive processing, maintaining the consistency of graphic state and high-definition path without distortion. Moreover, when the user's real-time operation information meets the preset layer separation conditions, the corresponding correction changes are achieved through layer correction matrix and layer separation, realizing the fine processing of actual animation or graphic transformation. When the preset layer separation conditions are not met, the overall graphic transformation is directly executed to ensure efficient graphic rendering. Through simple vector parsing, path mapping, and matrix transformation, efficient, high-definition, and highly interactive experimental graphic rendering is achieved.

[0013] Furthermore, the method of obtaining the current transformation parameters based on the state of the graphical matrix and executing simulation actions when the current transformation parameters exceed the preset transformation threshold also includes: obtaining the current transformation parameters based on the state of the graphical matrix and returning to listen for interactive actions when the current transformation parameters do not exceed the preset transformation threshold.

[0014] In the above scheme, when the current transformation parameters exceed the preset transformation threshold, a simulation action is executed to achieve the corresponding transformation of the image through matrix transformation in the simulation process, thereby realizing the animation effect of the actual image; while when the current transformation parameters do not exceed the preset transformation threshold, a return execution listening interaction action is performed to ensure the continuous progress of the user interaction process.

[0015] Furthermore, the layer correction matrix corresponding to the separated layer is obtained based on the drawing information and the state of the graphics matrix, including: the drawing information contains layer identifiers and layer separation information; the basic layer and the separated layer are obtained based on the layer identifiers and the layer separation information; the basic layer transformation matrix is ​​obtained based on the basic layer and the state of the graphics matrix; the inverse transformation matrix of the separated layer is obtained based on the state of the graphics matrix; and the layer correction matrix corresponding to the separated layer is obtained based on the inverse transformation matrix of the separated layer, the transformation matrix of the basic layer, and the preset inverse transformation method.

[0016] Furthermore, based on the inverse transformation matrix of the separated layer, the basic layer transformation matrix, and the preset inverse transformation method, the layer correction matrix corresponding to the separated layer is obtained. The calculation process satisfies the following formula: M_liquid=M_container×M_rotate(-α)

[0017] In the formula, M_liquid represents the layer correction matrix, M_container represents the base layer transformation matrix, and M_rotate(-α) represents the split layer inverse transformation matrix.

[0018] In the above scheme, layers are decomposed according to layer identifiers and layer separation information, and the corresponding required reverse transformation matrix of the separated layer is obtained according to the state of the graphics matrix. Then, the layer correction matrix of the separated layer is calculated based on it, so as to determine the relevant drawing information of the separated layer through the matrix, thereby realizing the fine processing of actual animation or graphics transformation.

[0019] Furthermore, based on the state of the graphics matrix, the current transformation parameters are obtained. When the current transformation parameters exceed the preset transformation threshold, after the simulation action is executed, the method further includes: returning to the interactive action listening to obtain the current user's real-time operation information, and then obtaining the current real-time transformed image and the current redrawn image based on the current user's real-time operation information, until the current user's real-time operation information can no longer be received, thus completing the interactive process of graphics rendering based on vector parsing and path mapping.

[0020] In the above scheme, after the simulation action is completed, the return execution listening interaction action is still performed to achieve real-time continuous interaction, so as to meet different application scenarios and ensure the efficiency and high interactivity of the image rendering process.

[0021] This invention provides a vector-based graphics rendering method. The core of the invention lies in extracting graphic information through vector analysis and path mapping, and constructing initialization data based on this information. On this basis, matrix transformation technology is used to achieve high-definition redrawing of graphics while ensuring visual consistency across various states. During interactive processing, user operation commands, such as translation and rotation, are monitored in real time, and layer correction and separation techniques are used to achieve more refined animation effects, making the dynamic performance of graphics smoother and more natural. Under specific operating conditions, such as when transformation parameters exceed a preset threshold, simulation is executed to ensure the accuracy of graphic transformations. When transformation parameters do not exceed the threshold or after the action is completed, the system returns to the monitoring state, ensuring the sustainability and responsiveness of user interaction. During layer decomposition, the inverse transformation matrix is ​​calculated using identification and separation information to obtain a correction matrix, achieving refined drawing processing and ensuring the accuracy and quality of graphics rendering. In summary, the overall solution of this invention significantly reduces the complexity and resource consumption of graphics development, while achieving efficient, high-definition, and highly interactive graphics rendering effects.

[0022] This invention provides a vector-based graphics rendering system for implementing the vector-based graphics rendering method described above, including:

[0023] The vector parsing module is used to obtain vector graphics files and extract graphic path information and drawing information based on the vector graphics files.

[0024] The initialization module is used to construct the initialization transformation matrix, perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information, and obtain the initial image.

[0025] The interaction monitoring module is used to listen for and obtain real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, a layer separation action is performed. The layer separation action includes: obtaining a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix; obtaining the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; obtaining the layer correction matrix corresponding to the separated layer based on the drawing information and the graphic matrix state; and processing the initial image based on the graphic matrix state and the layer correction matrix to obtain a real-time transformed image. The basic layer and the separated layer are obtained based on the drawing information.

[0026] The layer transformation module is used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, a simulation action is executed. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain the redrawn image.

[0027] The system provided by this invention first uses a vector analysis module to extract relevant information from the graphics based on vector analysis and path mapping. This information is then used to build initialization information through an initialization module. Next, an interaction monitoring module uses simple path information mapping and matrix transformation to redraw the graphics during user operations, maintaining the consistency of the graphics state and ensuring high-definition, distortion-free paths. Furthermore, a layer transformation module performs layer correction and transformation under specific conditions based on conditional judgments, achieving animation simulation effects. While ensuring graphic clarity and real-time interaction, this system significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

[0028] Furthermore, the listening and interaction module is also used to listen for and obtain real-time user operation information when the real-time user operation information does not meet the preset layer separation conditions. Based on the real-time user operation information and the initial transformation matrix, the module obtains the real-time interactive transformation matrix. Then, based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information, the module obtains the graphic matrix state. Finally, based on the graphic matrix state and the initial image, the module obtains the real-time transformed image.

[0029] In the above scheme, the listening and interaction module obtains user operation information in real time and responds promptly by executing listening and interaction actions. It can realize operations such as translation, transformation, and rotation of the actual image screen, and obtain and maintain the corresponding graphic matrix state to achieve continuous interactive processing, maintaining the consistency of graphic state and high-definition path without distortion. When the user's real-time operation information meets the preset layer separation conditions, the corresponding correction changes are achieved through layer correction matrix and layer separation, realizing fine processing of actual animation or graphic transformation. When the preset layer separation conditions are not met, the overall graphic transformation is directly executed to ensure efficient graphic rendering. Through simple vector analysis, path mapping, and matrix transformation, efficient, high-definition, and highly interactive experimental graphic rendering is achieved.

[0030] Furthermore, the layer transformation module is also used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters do not exceed the preset transformation threshold, a feedback signal is issued to enable the listening and interaction module to perform a listening and interaction action based on the feedback signal.

[0031] In the above scheme, when the current transformation parameters exceed the preset transformation threshold, the layer transformation module performs a simulation action to achieve the corresponding transformation of the image through the matrix transformation of the simulation process, thereby realizing the animation effect of the actual image; while when the current transformation parameters do not exceed the preset transformation threshold, the module returns to listen for interactive actions, ensuring the continuous progress of the user interaction process.

[0032] This invention provides a vector-based graphics rendering system, comprising a vector analysis module, an initialization module, a listening and interaction module, and a layer transformation module, responsible for acquiring graphic information, constructing an initial image, responding to user operations, and executing simulations, respectively. The system uses the listening and interaction module to perform translation and rotation operations, ensuring consistent graphic state and preventing path deformation, while triggering layer separation and correction under specific conditions. The layer transformation module determines whether to execute simulation actions based on transformation parameters to achieve animation effects or maintain high interactivity and resource optimization. The system combines vector analysis and path mapping, significantly reducing development complexity and achieving efficient, high-definition, and highly interactive graphics rendering effects. The modules dynamically adjust processing methods based on user operation information, performing fine-grained corrections when separation conditions are met, otherwise directly performing overall transformations, thereby improving rendering efficiency and flexibility.

[0033] The present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a vector-based graphics rendering method described above. Attached Figure Description

[0034] Figure 1 is a schematic diagram of a graphics rendering method based on vector analysis provided in an embodiment of the present invention;

[0035] Figure 2 is a schematic diagram of the processing flow of a graphics rendering system based on vector analysis according to an embodiment of the present invention. Detailed Implementation

[0036] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0037] Example 1:

[0038] Referring to Figure 1, this embodiment provides a graphics rendering method based on vector analysis, including the following steps:

[0039] S1. Obtain vector graphics files, and retrieve graphic path information and drawing information based on the vector graphics files;

[0040] S2. Construct the initialization transformation matrix, and perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information to obtain the initial image;

[0041] S3. Execute interactive action listening to obtain real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, execute the layer separation action. The layer separation action includes: obtaining a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix, and obtaining the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; obtaining the layer correction matrix corresponding to the separated layer based on the drawing information and the graphic matrix state; processing the initial image based on the graphic matrix state and the layer correction matrix to obtain a real-time transformed image; wherein, the basic layer and the separated layer are obtained according to the drawing information.

[0042] S4. Obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, execute the simulation action. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain the redrawn image.

[0043] The method provided in this embodiment is based on vector analysis and path mapping. First, the vector analysis method is used to extract relevant information of the graphics and construct the initial information. Then, during user operation, simple path information mapping and matrix transformation are used to redraw the graphics during transformation, maintaining the consistency of the graphics state and the high-definition and distortion-free path. Furthermore, based on condition judgment, layer correction and layer transformation are performed under specific circumstances to achieve animation simulation effects. While ensuring the clarity of graphics and real-time interaction, the method significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

[0044] In the specific implementation process, obtaining vector graphics files and extracting graphic path and drawing information based on them involves: reading graphic files (vector graphics files) from vector graphics resources such as SVG (Scalable Vector Graphics), and using an SVG parser to recognize them. <path>The `d` attribute in the tag extracts the graphic path command and constructs the corresponding drawing structure. It also extracts the coordinates of each path record point, layer identifier, color, stroke, and other style information to form a graphic data model. Specifically, the coordinates of each path record point and the graphic path command serve as the graphic path information, while the layer identifier, color, stroke, and other style information serve as the drawing information.

[0045] In the specific implementation process, when constructing the initial transformation matrix, each graphic path needs to be initialized. The initial transformation matrix M can usually be expressed as follows:

[0046] This is used to control path rotation, scaling, and translation transformations based on subsequent real-time user actions. When drawing the initial image, the coordinates of the path points are calculated using the current transformation matrix and then drawn onto the canvas. The coordinate transformation calculation formula is as follows:

[0047] The transformed coordinates are used to display the initial image via the drawing interface.

[0048] Optionally, the process of listening to and obtaining real-time user operation information and performing layer separation actions when the real-time user operation information meets the preset layer separation conditions also includes: listening to and obtaining real-time user operation information; when the real-time user operation information does not meet the preset layer separation conditions, obtaining a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix; obtaining the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; and obtaining a real-time transformed image based on the graphic matrix state and the initial image.

[0049] In practice, real-time user interaction information is obtained by monitoring user actions within the system. User actions (such as rotation, scaling, and dragging) change the transformation matrix in real time. The system updates matrix M (the real-time interactive transformation matrix) and recalculates the path coordinates to obtain the graphic matrix state for redrawing. After each transformation, the path state is synchronously updated, recording the current graphic matrix state in the path object for continuous interactive processing and subsequent animation operations, maintaining state consistency and ensuring the path remains high-definition and undistorted. When the user zooms in or out, the system adjusts the scaling term in the path transformation matrix, achieving an infinite zoom effect through retransformation and redrawing without distortion or jagged edges, maintaining the high-definition characteristics of vector graphics. For example, when zoomed in by a factor of two, the scaling matrix M_scale is constructed as follows:

[0050] When the rotation operation is an angle θ, the rotation matrix M_rotate(θ) is constructed as follows:

[0051] In the formula, M_rotate(θ) represents the rotation matrix.

[0052] In detail, for example, when applied in a virtual experimental teaching system, if a user interacts with any experimental device, such as rotating a container filled with liquid, according to the principles of fluid statics, the liquid in the container must remain horizontal during rotation. This triggers and executes a layer separation action to separate the container layer and the liquid layer from the liquid layer in the container graphic. The liquid layer becomes the separated graphic at this point, thus enabling separate processing of two layers that follow different laws. Therefore, the preset layer separation condition can be set for situations where any graphic of the experimental device involved in the user's real-time operation information must satisfy a physical or experimental law different from that of the experimental device itself.

[0053] Optionally, the current transformation parameters are obtained based on the state of the graphical matrix. When the current transformation parameters exceed the preset transformation threshold, a simulation action is executed. The method also includes: obtaining the current transformation parameters based on the state of the graphical matrix, and returning to listen for interactive actions when the current transformation parameters do not exceed the preset transformation threshold.

[0054] In practical implementation, such as in a virtual experimental teaching system, when the current transformation parameters exceed a preset transformation threshold, a simulation action is executed. When the user controls the container to rotate to a specific angle, the system determines the rotation threshold and triggers the liquid pouring simulation logic: the liquid level in container B rises; the liquid level in container A falls. In the actual simulation process, the degree of rise and fall of the liquid levels in the two containers is determined by a preset liquid height change formula (a linear relationship between volume and height). If the container is cylindrical, the liquid volume and liquid level have a linear relationship: h = V / A, where V is the volume (ml); A is the cross-sectional area of ​​the container (cm²). 2 h is the liquid level height (cm).

[0055] Optionally, the layer correction matrix corresponding to the separated layer is obtained based on the drawing information and the state of the graphics matrix, including: the drawing information contains layer identifiers and layer separation information; the basic layer and the separated layer are obtained based on the layer identifiers and the layer separation information; the basic layer transformation matrix is ​​obtained based on the basic layer and the state of the graphics matrix; the separated layer inverse transformation matrix is ​​obtained based on the state of the graphics matrix; and the layer correction matrix corresponding to the separated layer is obtained based on the separated layer inverse transformation matrix, the basic layer transformation matrix, and a preset inverse transformation method.

[0056] Optionally, the layer correction matrix corresponding to the separated layer is obtained based on the inverse transformation matrix of the separated layer, the basic layer transformation matrix, and the preset inverse transformation method. The calculation process satisfies the following formula: M_liquid=M_container×M_rotate(-α)

[0057] In the formula, M_liquid represents the layer correction matrix, M_container represents the base layer transformation matrix, and M_rotate(-α) represents the split layer inverse transformation matrix.

[0058] In practical implementation, such as in virtual experimental teaching systems, when performing layer separation, the graphic is first split into multiple layers (e.g., instrument outline, liquid, label, etc.), each with its own independent path and transformation matrix, allowing for separate control. For example, if the liquid layer remains horizontal while the container rotates, the liquid layer, as the separated graphic at this time, needs to be corrected using a reverse rotation matrix. For instance, in the simulation of a virtual chemical instrument, container A (e.g., a beaker) can be rotated interactively, such as clockwise by 30°. In reality, during rotation, the surface of the liquid in a physical container will always remain horizontal (i.e., parallel to the ground), rather than tilting with the container. Therefore, at the graphic level, a reverse rotation correction needs to be applied to the liquid graphic path. Assuming the container's rotation angle is α, and the user interacts to rotate the container clockwise by α degrees (e.g., 30°), i.e., α = +30°, this is the relevant transformation parameter of the liquid layer's correction matrix M_liquid. Since the liquid should visually remain stationary, a rotation matrix needs to be applied to the liquid layer to counteract the rotation on the container layer. When the liquid layer's reverse rotation angle exactly counteracts the container's rotation, the liquid graphic does not visually rotate and remains horizontal. For example, setting the container's center as the origin (0, 0), and the container's counterclockwise rotation angle α = 30° (i.e., π / 6 radians), the liquid layer needs to be applied with a reverse rotation angle -α = -30°. The container rotation matrix (i.e., the basic layer transformation matrix) should be:

[0059] The calculation of the liquid inverse rotation matrix, i.e., the inverse transformation matrix of the separated layers, should satisfy the following formula:

[0060] Multiplying the liquid's reverse rotation matrix and the container's rotation matrix yields the final transformation matrix of the liquid, which is also the layer correction matrix M. liquid As shown in the following formula: M liquid =M container ×M rotate (-α)=I

[0061] In the formula, M liquid M represents the layer correction matrix. container M represents the basic layer transformation matrix. rotate (-α) represents the reverse transformation matrix of the separated layers.

[0062] Optionally, the current transformation parameters are obtained based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, after the simulation action is executed, the process further includes: returning to listen for the interactive action to obtain the current real-time operation information of the user, and then obtaining the current real-time transformed image and the current redrawn image based on the current real-time operation information of the user, until the user interaction action stops and the current real-time operation information of the user can no longer be received, thus completing the interactive process of graphics rendering based on vector analysis and path mapping.

[0063] In the specific implementation process, after the simulation action is completed, the return to the interactive action listener is still executed to achieve real-time continuous interaction, so as to meet different application scenarios and ensure the efficiency and high interactivity of the image rendering process.

[0064] This embodiment provides a vector-based graphics rendering method. The core of the invention lies in extracting graphic information through vector analysis and path mapping, and constructing initialization data based on this information. On this basis, matrix transformation technology is used to achieve high-definition redrawing of graphics while ensuring visual consistency across various states. During interactive processing, user operation commands, such as translation and rotation, are monitored in real time, and layer correction and separation techniques are used to achieve more refined animation effects, making the dynamic performance of graphics smoother and more natural. Under specific operating conditions, such as when transformation parameters exceed a preset threshold, simulation is executed to ensure the accuracy of graphic transformations. When transformation parameters do not exceed the threshold or after the action is completed, the system returns to the monitoring state, ensuring the sustainability and responsiveness of user interaction. During layer decomposition, the inverse transformation matrix is ​​calculated using identification and separation information to obtain a correction matrix, achieving refined drawing processing and ensuring the accuracy and quality of graphics rendering. In summary, the overall solution of this invention significantly reduces the complexity and resource consumption of graphics development, while achieving efficient, high-definition, and highly interactive graphics rendering effects.

[0065] Example 2:

[0066] This embodiment provides a vector-based graphics rendering system for implementing the vector-based graphics rendering method described above, including:

[0067] The vector parsing module is used to obtain vector graphics files and extract graphic path information and drawing information based on the vector graphics files.

[0068] The initialization module is used to construct the initialization transformation matrix, perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information, and obtain the initial image.

[0069] The interaction monitoring module is used to listen for and obtain real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, a layer separation action is performed. The layer separation action includes: obtaining a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix; obtaining the graphic matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information; obtaining the layer correction matrix corresponding to the separated layer based on the drawing information and the graphic matrix state; and processing the initial image based on the graphic matrix state and the layer correction matrix to obtain the real-time transformed image. The basic layer and the separated layer are obtained based on the drawing information.

[0070] The layer transformation module is used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, a simulation action is executed. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain the redrawn image.

[0071] The system provided in this embodiment first uses a vector analysis module to extract relevant information from the graphics based on vector analysis and path mapping. This information is then used by an initialization module to build the initialization module. Next, the interaction monitoring module uses simple path information mapping and matrix transformation to redraw the graphics during user operations, maintaining the consistency of the graphics state and ensuring that the paths are high-definition and undistorted. Furthermore, the layer transformation module performs layer correction and transformation under specific conditions based on conditional judgments to achieve animation simulation effects. While ensuring graphic clarity and real-time interaction, this system significantly reduces development complexity and resource consumption, achieving efficient, high-definition, and highly interactive experimental graphics rendering.

[0072] Optionally, the listening and interaction module is also used to perform listening and interaction actions to obtain real-time user operation information. When the real-time user operation information does not meet the preset layer separation conditions, the module obtains the real-time interaction transformation matrix based on the real-time user operation information and the initial transformation matrix, and then obtains the graphic matrix state based on the real-time interaction transformation matrix and the path point coordinates, and obtains the real-time transformed image based on the graphic matrix state and the initial image.

[0073] In the specific implementation process, the monitoring and interaction module obtains user operation information in real time and responds promptly by executing monitoring and interaction actions. It can realize operations such as translation, transformation, and rotation of the actual image screen, and obtain and maintain the corresponding graphic matrix state to achieve continuous interactive processing, maintaining the consistency of graphic state and high-definition path without distortion. When the user's real-time operation information meets the preset layer separation conditions, it performs corresponding correction changes through layer correction matrix and layer separation, realizing fine processing of actual animation or graphic transformation. When the preset layer separation conditions are not met, it directly executes the overall graphic transformation to ensure efficient graphic rendering. Through simple vector parsing, path mapping, and matrix transformation, it achieves efficient, high-definition, and highly interactive experimental graphic rendering.

[0074] Optionally, the layer transformation module is also used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters do not exceed the preset transformation threshold, a feedback signal is issued to enable the listening and interaction module to perform a listening and interaction action based on the feedback signal.

[0075] In the specific implementation process, when the current transformation parameters exceed the preset transformation threshold, the layer transformation module executes a simulation action to realize the corresponding transformation of the image through the matrix transformation of the simulation process, thereby achieving the animation effect of the actual image; while when the current transformation parameters do not exceed the preset transformation threshold, the return execution listener interaction action is executed to ensure the continuous progress of the user interaction process.

[0076] In another implementation example, the above-described vector-based graphics rendering system includes a processor, wherein the processor is configured to execute the above-described program modules stored in memory, including a vector parsing module, an initialization module, a listening interaction module, and a layer transformation module.

[0077] This embodiment provides a vector-based graphics rendering system, including a vector analysis module, an initialization module, a listening and interaction module, and a layer transformation module. These modules are responsible for acquiring graphics information, constructing an initial image, responding to user operations, and executing simulations, respectively. The system uses the listening and interaction module to perform translation and rotation operations, ensuring consistent graphics state and preventing path deformation. It also triggers layer separation and correction under specific conditions. The layer transformation module determines whether to execute simulation actions based on transformation parameters to achieve animation effects or maintain high interactivity and resource optimization. By combining vector analysis and path mapping, the system significantly reduces development complexity and achieves efficient, high-definition, and highly interactive graphics rendering effects. The modules dynamically adjust their processing methods based on user operation information, performing fine-grained corrections when separation conditions are met, and directly performing overall transformations otherwise, thereby improving rendering efficiency and flexibility.

[0078] Example 3:

[0079] Please refer to Figure 2. This embodiment provides a processing flow for a graphics rendering system based on vector analysis, including the following steps:

[0080] S31. Obtain the SVG vector graphic;

[0081] S32. Obtain path data and graphic information by parsing Path based on SVG vector graphics and SVG parser;

[0082] S33. Construct a graphical data model based on path data and graphical information;

[0083] S34. Initialize the transformation matrix;

[0084] S35. Perform initial drawing based on the initialization transformation matrix and graphics data model to obtain the initial graphics;

[0085] S36. Listen for user interaction information;

[0086] S37. Update the transformation matrix based on user interaction information;

[0087] S38. Obtain real-time transformed image based on transformation matrix and graphical data model;

[0088] S39. Obtain the current transformation parameters and determine whether they exceed the preset transformation threshold: if yes, proceed to step S310; if no, return to step S36.

[0089] S310. Execute the simulation action, obtain the redrawn image, and return to step S36.

[0090] Example 4:

[0091] This embodiment provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a vector-based graphics rendering method described above.

[0092] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.

[0093] The terminal device can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. The terminal device may include, but is not limited to, a processor and a memory.

[0094] The processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), or application-specific integrated circuits (ASICs).

[0095] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.< / path>

Claims

1. A graphics rendering method based on vector analysis, characterized in that, Includes the following steps: Obtain a vector graphic file, and based on the vector graphic file, obtain graphic path information and drawing information; Construct an initialization transformation matrix, and perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information to obtain an initial image; The system listens for and acquires real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, the system performs a layer separation action. The layer separation action includes: obtaining a real-time interactive transformation matrix based on the user's real-time operation information and the initial transformation matrix, and obtaining a graphics matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphics path information; obtaining a layer correction matrix corresponding to the separated layer based on the drawing information and the graphics matrix state; processing the initial image based on the graphics matrix state and the layer correction matrix to obtain a real-time transformed image; wherein, the basic layer and the separated layer are obtained according to the drawing information. The current transformation parameters are obtained based on the state of the graphics matrix. When the current transformation parameters exceed the preset transformation threshold, a simulation action is performed. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and a preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain a redrawn image.

2. The graphics rendering method based on vector analysis according to claim 1, characterized in that, The step of listening for and acquiring real-time user operation information, and executing a layer separation action when the real-time user operation information meets the preset layer separation conditions, further includes: The system listens for and acquires real-time user operation information. When the real-time user operation information does not meet the preset layer separation conditions, it acquires a real-time interactive transformation matrix based on the real-time user operation information and the initial transformation matrix. Then, it acquires the state of the graphic matrix based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information, and acquires the real-time transformed image based on the state of the graphic matrix and the initial image.

3. The graphics rendering method based on vector analysis according to claim 1, characterized in that, The step of obtaining the current transformation parameters based on the state of the graphical matrix and executing a simulation action when the current transformation parameters exceed a preset transformation threshold also includes: obtaining the current transformation parameters based on the state of the graphical matrix and returning to the interactive action listening when the current transformation parameters do not exceed the preset transformation threshold.

4. The graphics rendering method based on vector analysis according to claim 1, characterized in that, In the layer separation action, obtaining the layer correction matrix corresponding to the separated layer based on the drawing information and the graphics matrix state includes: The drawing information includes layer identifiers and layer separation information; Based on the layer identifier and layer separation information, obtain the basic layer and the separated layer; The transformation matrix of the basic layer is obtained based on the state of the basic layer and the graphics matrix. Obtain the inverse transformation matrix of the separated layers based on the state of the graphics matrix; The layer correction matrix corresponding to the separated layer is obtained based on the separated layer inverse transformation matrix, the basic layer transformation matrix, and the preset inverse transformation method.

5. The graphics rendering method based on vector analysis according to claim 4, characterized in that, The layer correction matrix corresponding to the separated layer is obtained based on the inverse transformation matrix of the separated layer, the basic layer transformation matrix, and the preset inverse transformation method. The calculation process satisfies the following formula: M_liquid=M_container×M_rotate(-α) In the formula, M_liquid represents the layer correction matrix, M_container represents the base layer transformation matrix, and M_rotate(-α) represents the split layer inverse transformation matrix.

6. The graphics rendering method based on vector analysis according to claim 1, characterized in that, After obtaining the current transformation parameters based on the state of the graphics matrix, and performing a simulation action when the current transformation parameters exceed a preset transformation threshold, the method further includes: returning to listen for the current user's real-time operation information, and then obtaining the current real-time transformed image and the current redrawn image based on the current user's real-time operation information, until the current user's real-time operation information can no longer be received, thus completing the interactive process of graphics rendering based on vector parsing and path mapping.

7. A graphics rendering system based on vector analysis, characterized in that, To implement the vector-based graphics rendering method as described in any one of claims 1 to 6, the system comprises: The vector parsing module is used to obtain vector graphics files and, based on the vector graphics files, obtain graphic path information and drawing information. The initialization module is used to construct an initialization transformation matrix, and perform initial drawing based on the initialization transformation matrix, graphic path information, and drawing information to obtain an initial image. The interaction monitoring module is used to listen for and acquire real-time user operation information. When the real-time user operation information meets the preset layer separation conditions, a layer separation action is performed. The layer separation action includes: acquiring a real-time interactive transformation matrix based on the real-time user operation information and an initialization transformation matrix; acquiring a graphics matrix state based on the real-time interactive transformation matrix and the path point coordinates in the graphics path information; acquiring a layer correction matrix corresponding to the separated layer based on the drawing information and the graphics matrix state; and processing the initial image based on the graphics matrix state and the layer correction matrix to obtain a real-time transformed image. The basic layer and the separated layer are obtained based on the drawing information. The layer transformation module is used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters exceed a preset transformation threshold, a simulation action is executed. The simulation action includes: obtaining layer transformation information based on the current transformation parameters, drawing information and a preset simulation algorithm, and performing graphics rendering on the real-time transformed image based on the layer transformation information to obtain a redrawn image.

8. A graphics rendering system based on vector analysis according to claim 7, characterized in that, The monitoring and interaction module is also used to perform interactive actions to monitor and obtain real-time user operation information. When the real-time user operation information does not meet the preset layer separation conditions, a real-time interactive transformation matrix is ​​obtained based on the real-time user operation information and the initial transformation matrix. Then, the state of the graphic matrix is ​​obtained based on the real-time interactive transformation matrix and the path point coordinates in the graphic path information, and the real-time transformed image is obtained based on the state of the graphic matrix and the initial image.

9. A graphics rendering system based on vector analysis according to claim 7, characterized in that, The layer transformation module is also used to obtain the current transformation parameters based on the state of the graphics matrix. When the current transformation parameters do not exceed the preset transformation threshold, a feedback signal is issued to enable the listening and interaction module to perform the interactive action listening based on the feedback signal.

10. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a vector-based graphics rendering method as described in any one of claims 1-7.