Method for realizing graph dynamic display, storage medium and computer program product

By adding animated description statements to the graph components in the graph data in the mark language format of the graph, the problem that the graph cannot convey information vividly and accurately is solved, and the dynamic display of the graph is realized, which improves the ability to express information.

CN119888016APending Publication Date: 2025-04-25SHENZHEN TUWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411679588.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Figures cannot convey information vividly and accurately in many application scenarios, resulting in limited information expression.

Method used

By adding animation description statements to the graphics components in the mark language format of the figure, the graphics components in the figure can present animation effects, thereby realizing dynamic display of the figure.

Benefits of technology

This enables the picture to present more information more vividly and accurately, and improves the ability to express information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888016A_ABST
    Figure CN119888016A_ABST
Patent Text Reader

Abstract

The invention relates to a method for realizing graph dynamic display, a storage medium and a computer program product, and relates to the technical field of computer graphics. The method for realizing the dynamic display of the graph comprises the following steps: acquiring graph data in a markup language format corresponding to the graph; wherein the graph data comprises description information respectively corresponding to each graph component of the graph; adding animation description statements to description information corresponding to one or more graphic components in the graphic data to obtain updated graphic data; and displaying the graph based on the updated graph data, so that the morphology of the one or more graph components in the graph can change along with time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer graphics, and in particular to a method, storage medium and computer program product for realizing dynamic display of graphics. Background Art

[0002] Figure 1 Generally, it is composed of visual elements such as lines, shapes, colors, and textures. Compared with text, diagrams can express information more intuitively. For example, flow charts are often used to represent the steps and processes of a process or algorithm, and device or system structure diagrams can be used to represent the components of a device or system and the information flow or medium flow between components. In many application scenarios, information is often visually expressed in the form of diagrams. Summary of the invention

[0003] In some application scenarios, the information expressed by a graph is relatively limited. To this end, the present disclosure mainly solves the technical problem that a graph cannot convey information vividly and accurately, and provides a method for dynamically displaying a graph and related solutions.

[0004] According to the first aspect, one or more embodiments of the present specification provide a method for realizing dynamic display of a graph, wherein the graph corresponds to graph data of more than one format, the graph is stored through its corresponding graph data, the graph includes graphic components, and the method includes: obtaining graph data in a markup language format corresponding to the graph; wherein the graph data includes description information corresponding to each graphic component of the graph; adding animation description statements to the description information corresponding to one or more graphic components in the graph data, thereby obtaining updated graph data; and displaying the graph based on the updated graph data, so that the morphology of the one or more graphic components in the graph can change over time.

[0005] According to a second aspect, one or more embodiments of this specification provide a computer-readable storage medium storing computer codes or instructions, which, when at least part of the computer codes or instructions are executed by a processor, can implement the methods described in some embodiments of this specification.

[0006] According to a third aspect, one or more embodiments of this specification provide a computer program product, including computer codes or instructions, which can implement the methods described in some embodiments of this specification when the computer codes or instructions are executed by a processor.

[0007] According to the methods and related solutions for realizing dynamic display of graphs described in some embodiments of this specification, by adding animation description statements to the graph data in the markup language format corresponding to the graph, one or more graphic components in the graph can present animation effects, thereby enabling the graph to present more information more vividly and accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 Examples of diagrams shown in some embodiments.

[0009] Figure 2 These are examples of diagrams shown in some other embodiments.

[0010] Figure 3 This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some embodiments of this specification.

[0011] Figure 4 An exemplary flow chart of adding animation description statements to graphic components according to some embodiments of the present specification.

[0012] Figure 5 This is an exemplary flow chart of adding animation description statements to graphic components according to other embodiments of this specification.

[0013] Figure 6 The present invention is an exemplary flow chart of adding animation description statements to graphic components according to some other embodiments of the present specification.

[0014] Figure 7 This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some other embodiments of this specification.

[0015] Figure 8 This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some other embodiments of this specification.

[0016] Fig. 9 This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some other embodiments of this specification.

[0017] Fig.10 It is a schematic diagram of the dynamic display effect of the diagrams shown in some embodiments of this specification. DETAILED DESCRIPTION

[0018] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0019] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.

[0020] The serial numbers assigned to the components in this article, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.

[0021] Figure 1 Generally, pictures are composed of visual elements such as lines, shapes, colors, and textures. Compared with text, pictures can express information more intuitively. Figure 1 Examples of diagrams shown in some embodiments. Figure 1 The diagram shown is a device structure diagram or a system structure diagram, which can show the components of the device or system, and the information flow or medium flow between the components. Specifically, the components can be one or more of pipelines, valves, and power devices, where the power device can be a device that provides power to the device, such as a pump, generator, fan, etc. As an example, Figure 1 The device structure diagram in the figure includes components such as a first valve 101, a flow sensor 102, a shunt pump 103, a second valve 104, and a liquid storage tank 105. The aforementioned components are connected by pipelines, and the liquid flowing in the pipeline may be a liquid medium, such as water, oil, etc. Specifically, the liquid medium may flow in from the first valve 101, pass through the flow sensor 102 to the shunt pump 103, and the shunt pump 103 shunts the inflowing liquid medium into two branches, wherein the liquid medium of one branch flows into the liquid storage tank 105 for storage, and the liquid medium of the other branch flows into the subsequent branch through the second valve 104. Figure 2 These are examples of diagrams shown in some other embodiments. Figure 2 The diagram shown is a flow chart, which can represent the steps and flow of a process or algorithm. As an example, Figure 2 The parallelograms, rectangles, diamonds and other shapes in the diagram represent sequential nodes or links, and the connecting lines with arrows represent the sequential flow between links or steps.

[0022] Compared with text, diagrams can express information more intuitively, but the information that diagrams can express is limited. For example, engineers use special drawing software (such as AutoCAD, etc.) to draw equipment structure diagrams or flow charts. These diagrams are mainly displayed in the form of static two-dimensional diagrams, which cannot intuitively present information such as the flow direction of the medium in the equipment pipeline and the state change of the components. To this end, some embodiments of this specification provide a method for realizing dynamic display of diagrams, so that the diagrams can vividly display more information.

[0023] Figure 3 This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some embodiments of this specification. Figure 3 The process 300 shown may be executed by a processing device. Figure 3 As shown, process 300 may include the following steps.

[0024] Step 310, obtaining graph data in a markup language format corresponding to the graph.

[0025] Figure 1 Generally refers to a kind of visual content, such as Figure 1 or Figure 2 As shown, the graph may further include more than one graphic component, and the graphic component may be understood as a constituent unit of the graph. In some embodiments, the graphic component may be understood as the smallest unit with a specific function. For example, Figure 1 The equipment structure diagram shown may include graphic components such as valves, diverter pumps, and pipelines. Figure 2 The graphic components in the flowchart shown can be used to illustrate components such as timing nodes, connecting lines, etc. In some embodiments, the graphic components can be further composed of basic graphic elements, which can be understood as basic geometric shapes, such as straight lines, circles, diamonds, etc. Figure 1 Taking the first valve 101 in the figure as an example, the graphic component of the first valve 101 may include two triangular geometric shapes. In other words, one or more geometric shapes may be combined together according to a certain structure to obtain a graphic component with a certain function or relatively independent semantics.

[0026] For a computer device or a processing device, a graph is stored and processed as graph data in a certain format. Exemplarily, a graph can be stored or processed as graph data in a format such as BMP, JPEG, FGX, SVG, etc. Some dedicated drawing software also provides a dedicated graph data format, such as AutoCAD software provides a DWG format, etc. In some embodiments, the same or similar visualization content can be stored or processed as graph data in different formats, and it can be considered that a graph can correspond to more than one format of graph data.

[0027] Markup language is a computer text code that can show the details about document structure and data processing. Accordingly, the graphic data in the markup language format can be understood as a descriptive language in text form that describes the content of the graphic. Specifically, the markup language format can record the content of the graphic by describing the constituent elements of the graphic component, the properties of each graphic element, the overall properties of the graphic component and other information. Computer devices can render the graphic elements or graphic components in the graphic based on the graphic data in the markup language format, and then present the graphic. Since the graphic data in the markup language format uses text to describe the content of the graphic, it has good compatibility. It can be understood that most graphics can be stored or processed by computer devices using the markup language format, or some graphic data in other formats can be converted into the markup language format for processing.

[0028] The markup language format can be understood as a classification of the image data format. Exemplary markup language formats may include SVG, XML, HTML and other formats. XML and HTML are markup languages ​​that describe a wider range of object types. The objects they describe may include images, so they can also be regarded as specific image data formats under the markup language format. SVG (Scalable Vector Graphics) is a language that describes two-dimensional graphics, which has the characteristics of being readable as an image file and easy to modify and edit. In some embodiments, the image data of the image in SVG format can be obtained to conveniently add animation effects to the image and realize dynamic display of the image.

[0029] In some embodiments, graph data in other formats corresponding to the graph may be obtained and then converted into a markup language format. For the sake of distinction, the aforementioned other formats may be referred to as the first format. As an example, a Figure 1 The image data is initially represented in the form of DWG format, and the DWG format image data can be converted into the SVG format image data. The image data format conversion can be performed by setting conversion rules based on the format characteristics of the image data before and after the conversion, or by directly calling dedicated image data format conversion software or code to achieve the image data format conversion.

[0030] Step 320: Add animation descriptions to description information corresponding to one or more graphic components in the graph data to obtain updated graph data.

[0031] As mentioned above, the graphic data in the markup language format (in this specification, the graphic data in the markup language format may be referred to as the graphic data for short unless it causes confusion) includes description information for each graphic component in the graphic. Specifically, the description information of the graphic component may further include a description of the attribute information such as the type, position, color, linearity, etc. of the graphic elements that make up the graphic component. In some embodiments, the description information of the graphic component may also include attribute information such as the type of the graphic component, that is, the graphic component as a whole may have its attribute information.

[0032] by Figure 1 The device structure diagram shown, the corresponding graphic data in the markup language format may include description information of the first valve 101, description information of the flow sensor 102, description information of the shunt pump 103, description information of the second valve 104 and description information of the liquid storage tank 105. Taking the first valve 101 as an example, its description information may include the type of graphic component (valve), the attribute description of the left triangle and the attribute description of the right triangle. Further, the attribute description of the left triangle may include information such as type: triangle, color: black, linear: solid line, coordinates: (x1, y1), rotation: 90°, etc.

[0033] In some embodiments, the dynamic display of a graph may be realized by dynamically displaying one or more graphic components in the graph. Adding dynamic effects to a graphic component may be to enable a part of the graphic component to move relative to another part, or to add additional graphic elements capable of movement to the graphic component. Figure 1 For example, the first valve 101 can be changed from open to closed, or a movable graphic component (such as an arrow) indicating the flow direction of the fluid can be added to the pipeline, or a rotatable fan blade can be added to the diverter pump 103. Figure 2 For example, the arrow between "Step 3" and "Step 4" can be moved from a position close to "Step 3" to "Step 4".

[0034] In some embodiments, an animation description statement can be added to the description information of one or more graphic components of the graph data to add dynamic effects to the corresponding graphic components. The animation description statement can be a description statement describing the animation attributes of the graphic component or the graphic elements it contains. Exemplary, the animation attributes can include information such as motion trajectory (such as straight line, arc) or motion speed. In some embodiments, the coordinate value of more than one point on the motion trajectory can be used to describe the motion trajectory. In some embodiments, dynamic effects can be added to each graphic component of the figure, or dynamic effects can be added to some graphic components in the figure, for example, dynamic effects can be added to one or more types of graphic components.

[0035] Figure 4This is an exemplary flow chart of adding animation description statements to graphic components as shown in some embodiments of this specification. Figure 4 As shown, process 400 may include the following steps.

[0036] Step 410: determine at least part of the graphic elements in the graphic component based on the description information corresponding to the graphic component.

[0037] In the graphic data in the markup language format, the description information of the graphic component includes the information of the graphic elements constituting the graphic component. Therefore, the basic graphic elements contained in the graphic component can be determined based on the description information corresponding to the graphic component, and some of the graphic elements can be selected for subsequent processing, or all of the graphic elements can be processed for subsequent processing. Taking the first valve 101 as an example, the graphic elements included in it can be determined as the first triangle (left side) and the second triangle (right side) based on the description information of the graphic component, and the second triangle can be selected for subsequent processing.

[0038] Step 420: Add animation description statements to at least some of the graphic elements.

[0039] An animation description statement may be added to the graphic element determined in step 410. The animation description statement may be a statement describing the animation attribute of the graphic element. Taking the graphic data in SVG format as an example, the animation description statement may be a tag statement such as animate (basic animation), animateTransform (deformation animation), animateMotion (path animation), etc. Furthermore, the motion trajectory or motion direction may be described by from / to, and the motion duration or speed may be described by dur. Fig.10 Schematic diagram of the dynamic display effect of some embodiments of this specification. Fig.10 As shown, an animation description statement can be added to the second triangle of the first valve 101' to make it move vertically upward by a certain distance relative to its original position, thereby presenting an animation effect in which the left and right triangles of the first valve change from being aligned to being relatively displaced. This animation effect can be used to indicate the state change of the first valve from being on to being off, thereby increasing the amount of information displayed in the device structure diagram.

[0040] Step 430: Change the appearance attributes of at least some of the graphic elements.

[0041] In some embodiments, appearance attributes are used to describe the visualization effect of a graphic element, such as shape, color, linearity, and other attributes. Sometimes, changes in the appearance attributes of a graphic element can also produce certain animation effects. As an example, the color attributes of the first triangle and the second triangle in the description information corresponding to the first valve 101 can be modified from blue to black, thereby adding a color change animation effect to the first valve 101. This effect can indicate that the first valve 101 changes from an on state to a closed state, thereby increasing the amount of information displayed in the device structure diagram. In some optional embodiments, step 430 may be optional, that is, in some embodiments, dynamic effects are mainly added by adding animation description statements to graphic elements.

[0042] Figure 5 This is an exemplary flow chart of adding animation description statements to graphic components as shown in other embodiments of this specification. Figure 5 As shown, process 500 may include the following steps.

[0043] Step 510, construct additional graphic elements for the graphic component.

[0044] In some embodiments, additional graphic elements may be added. For the purpose of distinction, the additional graphic elements may be referred to as additional graphic elements. The additional graphic elements may be any geometric shape, and may be set by setting the shape, color, line type and other properties of the additional graphic elements. For example, the additional graphic elements may be arrows, polygons, circles, etc. The additional graphic elements may also refer to composite graphics composed of two or more basic geometric shapes, such as a cross formed by orthogonal superposition of two rectangles.

[0045] In some embodiments, the position data of the graphic component can be determined based on the description information corresponding to the graphic component, and an additional graphic element can be constructed for the graphic component based on the position data of the graphic component, so that at least part of the additional graphic element can overlap with at least part of the graphic component when the figure is displayed. As mentioned above, the coordinate data of the graphic component can be determined from the description information corresponding to the graphic component. In some embodiments, the coordinate data of the graphic component can be the coordinate data of a certain graphic element originally existing in the graphic component. Specifically, the coordinate data of the graphic element that serves as the main body in the graphic component can be used as the graphic element of the graphic component. Taking the diverter valve 103 as an example, the coordinate data of the graphic element that serves as the main body in its graphic elements, such as a circle, can be used as the coordinate data of the diverter valve 103. Further, an additional graphic element 111 in the form of a fan blade can be added to the description information corresponding to the diverter valve 103, and the position attribute of the additional graphic element 111 can be set to the aforementioned coordinate data, or to a value whose distance difference from the aforementioned coordinate data is not greater than a set threshold. In this way, the additional graphic element and the original graphic element of the graphic component can be overlapped at least partially, and when the figure is displayed, the effect that the additional graphic element belongs to the corresponding graphic component can be presented. Fig.10 The visual effect of the portion valve 103' is shown. Figure 1 Taking the first pipeline from the left as an example, the coordinate data of the line segment representing the pipeline can be used as the coordinate data of the pipeline. Furthermore, one or more additional graphic elements 112 in the form of arrows can be added to the description information corresponding to the pipeline (the arrows point to the terminal position of the pipeline), and the position attribute of the additional graphic element 112 is set to a value whose distance difference from the coordinate data of the pipeline is not greater than a set threshold. In this way, the additional graphic element can be placed close to the original graphic element of the graphic component, and when the figure is displayed, it can present the effect that the additional graphic element belongs to the corresponding graphic component. Fig.10 The visual effect of arrow 112' is shown.

[0046] Step 520, adding an animation description statement for the additional graphic element.

[0047] More methods for adding animation description statements to additional graphic elements are similar to the process of adding animation description statements to existing graphic elements of the graphic component. Please refer to the relevant description of step 420, which will not be repeated here. In some embodiments, animation description statements can be added to the additional graphic elements in the description information corresponding to the graphic component. Fig.10 Taking the shunt pump 103' in the figure as an example, an animation description statement for controlling the rotation of the additional graphic element 111 can be added to make the fan-shaped additional graphic element 111 present a rotating animation effect, thereby indicating that the shunt pump 103' is in a working state, thereby increasing the amount of information that can be displayed in the figure.

[0048] Step 530: Add the additional graphic elements and the animation description statement to the description information corresponding to the graphic component.

[0049] The additional graphic elements should be understood as being part of the corresponding graphic component, and therefore the additional graphic elements and their animation description statements need to be added to the description information corresponding to the corresponding graphic component. In some embodiments, step 530 has no obvious sequential relationship with step 510 and / or step 520. For example, in step 510, the attribute information of the additional graphic elements can be directly added to the description information corresponding to the corresponding graphic component. For another example, in step 520, the animation description statement of the additional graphic elements can be directly added to the description information corresponding to the corresponding graphic component. In other words, the embodiment in which step 530 is a separate step and the embodiment in which step 530 is split and dispersed in steps 510 and 520 can be regarded as equivalent or substantially the same.

[0050] Figure 4 and Figure 5 The flowchart shown gives two different implementation methods for adding animation description statements to graphic components. In actual application, an appropriate method can be used to add animation description statements to the graphic components according to their types. In some embodiments, in order to improve work efficiency, one or more graphic components in the diagram can be divided into more than one category; and animation description statements can be added to the description information corresponding to one or more graphic components in the same category in the same manner. Specifically, the type of the corresponding graphic component can be determined based on the graphic component type attribute in the description information corresponding to the graphic component, and the graphic components in the diagram can be further classified. As an example, Figure 1 The graphic components in the equipment structure diagram shown are divided into valve type and power device type, which can be used Figure 4 The method shown in the figure is to add animation description statements to the valve type graphic component, using Figure 5 The method shown is to add animation description statements to the graphic components of a power device such as a diverter pump.

[0051] For the same type of graphic components, the same method is used to add animation description statements. On the one hand, batch processing can be achieved to improve work efficiency. On the other hand, the dynamic effects of the same type of graphic components can be kept consistent, increasing the orderliness and standardization of the diagram.

[0052] In some embodiments, animation components can also be pre-set for different types of graphic components. The animation components can include additional graphic elements constructed for the graphic components and animation description statements added for the additional graphic elements. The relevant descriptions of the additional graphic elements and animation description statements can be found in the previous text and will not be repeated here. It should be understood that unified additional graphic elements and animation description statements can be pre-set for the same type of graphic components. As an example, for the graphic components of the power device type, the additional graphic elements in the animation component can be centrally symmetrical graphic elements, such as hexagons, pentagons, crosses, etc., and the corresponding animation description statements can set the additional graphic elements to have an animation effect of rotating around its center point. For the graphic components of the pipeline type, the additional graphic elements in the animation component can be linear graphic elements, such as line segments with arrows, or line segments without arrows, etc., and the corresponding animation description statements can set the additional graphic elements to have an animation effect of cyclically moving from one point to another. Pre-setting animation components for the graphic components that may appear in the figure can quickly configure the corresponding animation effects for the graphic components and improve work efficiency.

[0053] Figure 6 This is an exemplary flow chart of adding animation description statements to graphic components as shown in some other embodiments of this specification. Figure 6 As shown, process 600 may include the following steps.

[0054] Step 610: Determine the category of the graphic component based on the description information corresponding to the graphic component.

[0055] In some embodiments, when graph data in a markup language format corresponding to a graph is obtained, description information of each graphic component therein may be obtained, thereby determining the type of each graphic component in the graph.

[0056] Step 620 , determining a target animation component corresponding to the graphic component from one or more pre-configured animation components based on the category.

[0057] In some embodiments, the pre-set animation component may record the type of graphic component it is adapted to, therefore, the animation component adapted to the corresponding graphic component may be queried from the pre-set animation components based on the type of the graphic component determined in step 610, and when an adapted animation component is queried, the animation component is used as the target animation component of the corresponding graphic component. In some embodiments, if an animation component adapted to the type of a certain graphic component is not queried from the pre-set animation components, no dynamic effect is added to the graphic component.

[0058] Step 630: Add the target animation component to the description information of the graphic component.

[0059] When an adapted animation component is found for a certain graphic component, the animation component can be added to the description information corresponding to the graphic component, and then the dynamic effect is configured for the graphic component. In some embodiments, the animation component can also have parameters to be configured, and exemplary parameters to be configured can include position data of additional graphic elements, which can be coordinate data, or the parameters to be configured can include motion start position data and motion end position data of additional graphic elements. When adding the target animation component to the description information of the corresponding graphic component, the specific values ​​of these parameters to be configured can be obtained from the description information of the corresponding graphic component first, so as to fill in or supplement the parameters to be configured in the target animation component. Taking the example of adding an animation component in the form of an arrow to a pipeline, the coordinate data of the starting point and end point of the pipeline can be obtained from the description information of the pipeline, and the coordinate data of the starting point and end point of the pipeline can be used as the motion start position data and motion end position data of the arrow graphic element in the animation component in the form of an arrow. In this way, by adding the target animation component, the adaptive dynamic effects set for different graphic components can be adaptively set.

[0060] Step 330, displaying a graph based on the updated graph data.

[0061] In some embodiments, the updated graph data may be graph data in a markup language format that adds animation description statements to the description information of the graphic component. The processing device or computer device may render the graph based on the updated graph data, and then display the graph. For example, the processing device or computer device may display the graph through a display screen, and the form of one or more graphic components in the graph may change over time. Figure 1 It is a device structure diagram rendered based on the graph data without adding animation description statements. Fig.10 It is a device structure diagram rendered based on the updated graph data. Figure 1 and Fig.10 As shown, the configurations of the first valve 101 ′ and the diverter pump 103 ′ can change over time.

[0062] In some embodiments, graph data in a markup language format corresponding to the graph may be obtained, and dynamic effects may be added to the graphic components based on the graph data, thereby conveniently realizing the conversion from static graphs to dynamic graphs, so that the graphs may vividly display more information.

[0063] With the rapid development of computer technology, digital twin technology has emerged. Digital twin is a technology that combines the physical world with the digital world. By creating an accurate digital model of a physical object or system in a virtual environment, real-time monitoring, analysis and optimization of the physical object can be achieved. Digital twin technology has been widely used in many fields, including manufacturing, health care, urban management, etc. Through the methods provided in some embodiments of this specification, the static structure diagram of a physical device or system can be efficiently converted into a dynamic diagram, and the graphic components corresponding to the corresponding components can be dynamically presented in response to the state changes of the physical components, which improves the efficiency of creating digital models in the field of digital twin technology to a certain extent.

[0064] As an example, engineers used AutoCAD to draw the following Figure 1 The chemical equipment structure diagram of a chemical plant is shown and stored in DWG format. The graphic components in the equipment structure diagram are all static two-dimensional diagrams, which mainly show the components included in the equipment and the connection relationship between the components. It is now necessary to build a digital model for this chemical equipment to achieve real-time monitoring, management or optimization of the chemical equipment. Based on the methods provided in some embodiments of this specification, the graphic data in DWG format can be converted into graphic data in SVG format. Based on the status information of the components in the equipment, dynamic effects are added to the aforementioned equipment structure diagram. Therefore, in some alternative embodiments, step 320 may include obtaining status information of components in the equipment corresponding to one or more graphic components respectively; based on the status information of the components, adding animation description statements to the description information corresponding to the corresponding graphic components. Specifically, a communication connection can be established between a processing device or a computer device and a sensor in the device, and the processing device or the computer device can obtain the status information of the components in the device. As Figure 1 The flow sensor 102 shown can detect whether there is a fluid medium passing through the pipeline. When the data output by the flow sensor 102 indicates that there is fluid passing through the pipeline, the processing device or computer device can Figure 4 The method shown in FIG. 1 adds an animation effect to the first valve 101, and based on the Figure 5 The illustrated method adds an animation effect to the diverter pump 103, thereby converting a static device structure diagram into a digital model associated with a physical entity object to a certain extent, greatly improving the modeling efficiency.

[0065] In some embodiments, after obtaining updated graph data, further updated graph data may be obtained based on status information of corresponding components in the physical device, so that the form of the graphic component corresponding to the component whose status information has changed changes accordingly.

[0066] Figure 7This is an exemplary flow chart of a method for implementing dynamic display of a graph as shown in some other embodiments of this specification. Figure 7 As shown, process 700 may include the following steps.

[0067] Step 710, obtaining graph data in a markup language format corresponding to the graph.

[0068] Step 720: Add animation descriptions to description information corresponding to one or more graphic components in the graph data to obtain updated graph data.

[0069] Step 730, displaying a graph based on the updated graph data.

[0070] For details of steps 710 to 730, please refer to Figure 3 The relevant description will not be repeated here.

[0071] Step 740, in response to changes in status information of components corresponding to one or more graphic components in the graph, in the updated graph data, respectively, add or update animation description statements for description information corresponding to graphic components corresponding to components whose status information has changed, thereby obtaining updated graph data again.

[0072] A communication connection may be established between the processing device or computer device and the sensor in the device, and the processing device or computer device may obtain the status information of the components in the device. When it is detected that the status information of a component has changed, an animation description statement may be added to the description information of the graphic component corresponding to the component in the manner shown in step 320, thereby obtaining the updated graphic data again. Fig.10 As an example, when the processing device receives the status information of the second valve 104 indicating that the valve changes from on to off, the processing device may Figure 4 The illustrated method adds an animation description statement to the description information corresponding to the second valve 104 in the updated graph data to obtain the graph data that is updated again.

[0073] In some embodiments, the processing device may also update the animation description statement in the description information corresponding to a certain graphic component when receiving a change in the status information of the device component corresponding to the graphic component in the figure. The aforementioned update may include but is not limited to deletion, modification, and other processing. Fig.10 As an example, when the processing device receives the status information of the first valve 101 ′ indicating that the valve changes from being closed to being open, the animation description statement in the description information corresponding to the first valve 101 ′ in the updated image data may be deleted.

[0074] Step 750, updating the displayed graph based on the updated graph data.

[0075] In some embodiments, when the graph data is updated again, the computer device or processing device may render and draw the graph based on the updated graph data, so that the shape of the graphic component corresponding to the component whose state information has changed changes. Fig.10 On the basis of the second valve 104, the second triangle above the second valve 104 is horizontally moved a certain distance relative to the first triangle below. Fig.10 On this basis, the second triangle on the right side of the first valve 101 ′ is reset.

[0076] Some embodiments of the present specification associate the dynamic display of a graph with the state of a physical entity object corresponding to the graph, and use digital technology to efficiently monitor and maintain the physical entity object.

[0077] In some embodiments, a graphical user interface may be used to display a graph rendered based on the updated graph data obtained in process 300. A user may interact with the graph displayed in the graphical user interface. For example, when a user clicks on a mouse or touch screen, Fig.10 When the second valve 104 is formed by the graphic component shown in the figure, the second valve 104 can be switched from the on state to the off state in response to the user's trigger. Fig.10 When the graphic member shown in the figure is used to shunt the pump 103', the shunt pump 103' can be switched from the running state to the stopped state in response to a trigger from the user.

[0078] Figure 8 FIG. 1 is an exemplary flow chart of a method for realizing dynamic display of a graph as shown in some embodiments of this specification. Figure 8 As shown, process 800 may include the following steps.

[0079] Step 810, obtaining graph data in a markup language format corresponding to the graph.

[0080] Step 820: Add animation descriptions to description information corresponding to one or more graphic components in the graph data to obtain updated graph data.

[0081] Step 830, displaying a graph based on the updated graph data.

[0082] For details of steps 810 to 830, please refer to Figure 3 The relevant description will not be repeated here.

[0083] Step 840, in response to one or more graphic components in the displayed graph being triggered, add or update animation description statements for description information corresponding to the triggered one or more graphic components in the updated graph data, thereby obtaining updated graph data again.

[0084] In some embodiments, a user may trigger a graphic component in a diagram through an input device such as a mouse or a touch screen, wherein the triggering operation may be a single click, a double click, or the like. When a processing device or a computer device receives a signal that a certain graphic component in a diagram is triggered, an animation description statement may be added or updated for the description information corresponding to the graphic component in the updated diagram data. As an example, when a processing device receives a signal that a certain graphic component in a diagram is triggered, an animation description statement may be added or updated for the description information corresponding to the graphic component in the updated diagram data. Fig.10 After the second valve 104 is triggered, the description information corresponding to the second valve 104 in the updated image data can be updated according to Figure 4 For example, when the processing device receives Fig.10 After the diverter pump 103' is triggered by the signal shown, the additional graphic elements and the animation description statements thereof may be deleted from the description information corresponding to the diverter valve 103' in the updated graphic data.

[0085] Step 840, updating the displayed graph based on the updated graph data.

[0086] In some embodiments, when the graph data is updated again, the computer device or processing device may render and draw the graph based on the updated graph data, so that the shape of the triggered one or more graphic components changes with the trigger. Fig.10 On the basis of the second valve 104, the second triangle above the second valve 104 is horizontally moved a certain distance relative to the first triangle below. Fig.10 On the basis of FIG. 1 , the additional graphic element fan blade of the diverter pump 103 ′ is removed to indicate that the diverter pump 103 ′ stops running.

[0087] Some embodiments of the present specification associate the dynamic display of a graph with the user's interactive operations, thereby displaying different states of the graphic components in the graph, so that the graph can vividly display more information.

[0088] In some embodiments, the user can also directly edit the dynamically displayed graph, for example, Fig.10 Based on the figure shown, edit by adding graphic components, deleting graphic components or replacing graphic components. Fig. 9 FIG. 1 is an exemplary flow chart of a method for realizing dynamic display of a graph as shown in some embodiments of this specification. Fig. 9 As shown, process 900 may include the following steps.

[0089] Step 910, obtaining graph data in a markup language format corresponding to the graph.

[0090] Step 920: Add animation descriptions to description information corresponding to one or more graphic components in the graph data to obtain updated graph data.

[0091] Step 930, displaying a graph based on the updated graph data.

[0092] For details of steps 910 to 930, please refer to Figure 3 The relevant description will not be repeated here.

[0093] In some embodiments, a graph can be displayed based on the updated graph data in an editing interface of a graphing software or a graphing tool. A user can edit the graph in the interface.

[0094] Step 940, obtaining the diagram editing instruction.

[0095] In some embodiments, the user can delete or replace existing graphic components in the diagram, or add new graphic components to the diagram through the editing interface. The drawing software or tool can provide preset graphic components and corresponding diagram editing instructions, and the user can call these graphic components and diagram editing instructions to edit the diagram. Accordingly, the processing device can obtain the graphic components or diagram editing instructions called by the user. As an example, the user can Fig.10 On the basis of the diagram shown, a pressure sensor (newly added graphic component) is added to the branch where the second valve 104 is located by calling the instruction for adding a new graphic component.

[0096] Step 950: Edit the updated graph data based on the graph editing instruction.

[0097] The processing device may add description information of the newly added graphic component to the updated graphic data, or delete description information of the graphic component based on the graphic editing instruction, to obtain the edited graphic data.

[0098] Step 960, displaying a graph based on the edited graph data.

[0099] The processing device can update the displayed graph based on the edited graph data, so that the shape of the one or more graphic components in the graph can change over time, and the editing result of the graph by the user can be displayed in real time. Fig.10 As an example, the edited graph could be Fig.10 On the basis of the shown figure, a graphic component in the form of a pressure sensor is newly added to the branch of the second valve 104 .

[0100] Some embodiments of the present specification support users to directly edit on dynamically displayed graphs, thereby improving work efficiency.

[0101] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.

[0102] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) adding animation description statements based on the graphic data corresponding to the original static two-dimensional graphic, and realizing the efficient and convenient conversion display from static graphics to dynamic graphics; (2) using different animation description statement adding methods for different types of graphic controls to make the dynamic effects more suitable for specific graphic components; (3) automatically adding preset animation components based on the type of graphic components, and being able to add dynamic effects to the graphic components in the graphics in batches, greatly saving labor costs and improving work efficiency; (4) associating the dynamic effects of the graphics with the physical objects corresponding to the graphics or the user's triggering operations, and realizing the dynamic interactive display of the graphics; (5) supporting users to edit dynamically displayed graphics, improving work efficiency, etc.

[0103] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.

Claims

1. A method for realizing dynamic display of a graph, characterized in that: The graph corresponds to graph data in one or more formats, the graph is stored by its corresponding graph data, the graph includes a graphic component, and the method includes: Acquire graph data in a markup language format corresponding to the graph; wherein the graph data includes description information corresponding to each graphic component of the graph; Adding animation description statements to description information corresponding to one or more graphic components in the graph data, thereby obtaining updated graph data; The graph is displayed based on the updated graph data so that the morphology of the one or more graphical components in the graph can change over time.

2. The method according to claim 1, characterized in that The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data comprises: Determining at least part of the graphic elements in the graphic component based on the description information corresponding to the graphic component; An animation description statement is added to the at least part of the graphic elements, where the animation description statement is used to describe one or more of the following animation properties of the at least part of the graphic elements: motion trajectory, motion speed.

3. The method according to claim 2, characterized in that The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data also includes: Change the appearance attributes of at least part of the graphic elements; wherein the appearance attributes include one or more of the following: color, line type, shape.

4. The method according to claim 1, characterized in that: The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data comprises: constructing additional graphic elements for the graphic component; Adding an animation description statement to the additional graphic element, wherein the animation description statement is used to describe one or more of the following animation attributes of the additional graphic element: motion trajectory, motion speed; The additional graphic element and the animation description statement are added to the description information corresponding to the graphic component.

5. The method according to claim 4, characterized in that The step of constructing additional graphic elements for the graphic component comprises: Determine the position data of the graphic component based on the description information corresponding to the graphic component; The additional graphical element is configured for the graphical component based on the position data of the graphical component so that at least a portion of the additional graphical element can overlap at least a portion of the graphical component when the diagram is displayed.

6. The method according to claim 1, characterized in that The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data comprises: categorizing the one or more graphical components into one or more categories; In the same way, add animation description statements to the description information corresponding to one or more graphic components under the same category.

7. The method according to claim 1, characterized in that The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data comprises: Determining the category of the graphic component based on the description information corresponding to the graphic component; Determine a target animation component corresponding to the graphic component from one or more pre-configured animation components based on the category; Adding the target animation component to the description information of the graphic component; The animation component includes additional graphic elements constructed for the graphic component and animation description statements added for the additional graphic elements, wherein the animation description statements are used to describe one or more of the following animation properties of the additional graphic elements: motion trajectory, motion speed.

8. The method according to claim 1, characterized in that The diagram includes a diagram of an equipment structure, and the graphic component is used to illustrate one or more of the following components: pipelines, valves, and power devices; Alternatively, the diagram includes a flow chart, and the graphic component is used to illustrate one or more of the following components: a timing node, a connection line.

9. The method according to claim 8, characterized in that The diagrams include equipment structure diagrams; The step of adding animation description statements to the description information corresponding to one or more graphic components in the graph data comprises: Acquire status information of components in the device corresponding to the one or more graphic components respectively; Based on the status information of the component, an animation description statement is added to the description information corresponding to the corresponding graphic component.

10. The method according to claim 8, characterized in that The diagrams include equipment structure diagrams; The method further comprises: In response to a change in the state information of components corresponding to one or more graphic components in the graph, in the updated graph data, respectively, adding or updating animation description statements to description information corresponding to the graphic components corresponding to the components whose state information has changed, thereby obtaining the updated graph data again; The graph is updated and displayed based on the graph data that has been updated again, so that the shape of the graphic component corresponding to the component whose state information has changed changes.

11. The method according to claim 1, characterized in that: The graph is displayed via a graphical user interface; The method further comprises: In response to one or more graphic components in the displayed graph being triggered, adding or updating animation description statements for description information corresponding to the one or more triggered graphic components in the updated graph data, thereby obtaining the updated graph data again; The graph is updated and displayed based on the re-updated graph data, so that the form of the triggered one or more graphic components changes with the triggering.

12. The method according to claim 1, characterized in that Also includes: Get the image editing instructions; Editing the updated graph data based on the graph editing instruction; The graph is displayed based on the edited graph data, so that the shapes of the one or more graphic components in the graph can change over time while displaying the editing results of the graph.

13. The method according to claim 1, characterized in that Also includes: Obtaining graph data in a first format of the graph; Converting the graph data in the first format into graph data in the markup language format; The first format includes the DWG format, and the markup language format includes the SVG format.

14. A computer-readable storage medium storing computer codes or instructions, which can implement the method according to any one of claims 1 to 13 when at least part of the computer codes or instructions are executed by a processor.