Data updating method and system for associated primitives in graphical interface
By configuring the association relationship and update mechanism between elements in the transmission line flat section diagram software, the problem of untimely update of complex image data is solved, the synchronous update of image data and the accuracy of graphical interface display is achieved, and the accuracy of graphical interface display is improved. Update efficiency and integrity.
Patent Information
- Application Number
- CN202411224472.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-27
AI Technical Summary
In the transmission line flat section diagram software, when complex primitives are composed of simple primitives, data updates cannot be synchronized in time, resulting in errors in the graphical interface. Simple primitives with poor correlation in the existing technology cannot effectively update complex primitives. data.
By configuring the association relationship between elements, establishing direct relationships and master-slave relationships, triggering an update mechanism to synchronously update the affected elements, and using update identifiers and update functions to ensure data integrity and timeliness.
It realizes complete update of complex metadata, reduces user operations, improves the timeliness and efficiency of updates, reduces the amount of calculations, and avoids unnecessary updates of graphic drawing content.
Smart Images

Figure CN119203282A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of data visualization, and in particular to a method and system for updating data of associated graphic elements in a graphic interface of power transmission line plan and section diagram software. Background Art
[0002] In the graphical interface of the power transmission line cross-section software, complex graphics (also known as combined graphics) are often represented by combining simple graphics, which brings about the problem of data update of combined graphics. When the data of the simple graphics associated with the combined graphics change, how to efficiently and stably update the data and graphical interface display of the associated graphics is a problem that must be solved in the graphical interface of the power transmission line cross-section software.
[0003] The current technical solutions to this type of problem are the processing methods for complex graphics in two software programs, namely "Daoheng SLCAD Overhead Transmission Line Plan and Section Drawing Processing System" and "Lily Overhead Transmission Line Design Software".
[0004] The complex primitives in the above two software are also composed of simple primitives, but the correlation between the simple primitives is not strong or does not exist. For example, in the above two software, the representation method of the composite primitive "road" is composed of two lines, text notes indicating the road name and the place names of the coming and going directions, and there is no correlation between the components (i.e., simple primitives). In this case, when the data of each component changes, only its own data / attributes can be changed, and the data of the "road" cannot be updated. If you want to update the data of the complex primitive, you can only update the data / attributes of each component in the "road" one by one to achieve the data update of the associated primitives.
[0005] In the above software, the data update of the associated graphics elements cannot generate associations between the combined graphics elements. The data update and the refresh of the content displayed on the graphical interface need to be performed separately, which is very likely to cause errors due to untimely data updates. Summary of the invention
[0006] The object of the present invention is to provide a method and system for updating data of associated graphics elements in a graphical interface to address all or part of the above-mentioned problems, so as to synchronously update other graphics elements affected when data of a graphics element is updated.
[0007] The technical solution adopted by the present invention is as follows:
[0008] A method for updating data of associated graphic elements in a graphical interface, for power transmission line plan and section drawing software, comprises:
[0009] Configure the association relationship between all the elements in the associated element;
[0010] According to the association relationship, after each primitive updates its own data, if it affects other primitives in the associated primitives, it triggers the update of the data of the directly affected primitives.
[0011] Furthermore, the association relationship includes:
[0012] Direct relationship: in response to the change of other primitives directly caused by the change of the primitive, the relationship between the primitive and each other primitive that is caused to change;
[0013] The master-slave relationship describes the subordinate relationship between a composite element and other single elements that constitute the composite element.
[0014] Furthermore, the master-slave relationship of the combined graphic element including the text annotation is configured by associating the text annotation code of the text annotation; the attribute value of the text annotation is stored in the text annotation table, and the text annotation code and the attribute value of the text annotation are stored in an associative manner in the text annotation table.
[0015] Furthermore, the graphic element updates data by calling its own update function, and triggers directly related graphic elements to update data by starting an update mechanism, and the update mechanism is configured according to the association relationship.
[0016] Furthermore, the primitive updates data by calling its own update function, and directly updates the data of the directly related primitive by passing the updated data to the update function of the directly related primitive.
[0017] Furthermore, the update mechanism includes an update identifier configured for a specific data update item;
[0018] The update mechanism initiated by each primitive includes setting the update flag of the directly related primitive and calling the update function of the directly related primitive.
[0019] Furthermore, the update mechanism calls the update function of the directly related primitive at the location where the data update occurs.
[0020] Furthermore, the association relationship between all the graphic elements in the configuration association graphic element includes:
[0021] According to the relationship between the graphics elements, the graphics elements are classified into bottom-level graphics elements, middle-level graphics elements or top-level graphics elements;
[0022] The bottom primitive is a simple primitive;
[0023] Middle-level primitives include simple primitives and are also components of other primitives;
[0024] The top-level primitive is composed of other primitives and no longer composes other primitives.
[0025] Furthermore, after the bottom-level or middle-level primitives update their own data, they issue update commands to the primitives with direct superior relationships in sequence according to the association relationships; each primitive updates its own data after receiving the update command.
[0026] The present invention also provides a data updating system for associated graphic elements in a graphical interface. Aiming at the power transmission line plan and section drawing software, the system executes the data updating method for associated graphic elements in the graphical interface mentioned above through a configured processor.
[0027] In summary, due to the adoption of the above technical solution, compared with the prior art, the beneficial effects of the present invention are:
[0028] 1. The present invention adopts a method of establishing an associative relationship to associate the various components of a complex graphic element, so as to clarify the response content and scope of the data update that needs to be performed. When a certain graphic element changes, the affected graphic element can be determined based on the established associative relationship. Accordingly, the affected graphic element will be synchronously triggered to update, thereby ensuring the complete update of all associated graphic elements, reducing the user operation amount, and improving the timeliness, completeness and update efficiency of the associated graphic element update.
[0029] 2. The present invention establishes an update mechanism for associated graphics elements to timely update data of associated graphics elements without affecting irrelevant graphics elements, thus reducing the amount of calculation and the content of graphic drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The present invention will now be described by way of example with reference to the accompanying drawings, in which:
[0031] Figure 1 It is an embodiment of the association relationship of associated graphics elements. DETAILED DESCRIPTION
[0032] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.
[0033] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other equivalent or alternative features having similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
[0034] Example 1
[0035] A data updating method for associated graphics in a software graphical interface of a power transmission line cross-section diagram, wherein the method sets the association of each simple graphics element that constitutes a complex graphics element, and when the data of each simple graphics element changes, timely feedback is given to the combined graphics element with the association relationship, and the attributes of the associated graphics element are updated, and the graphical interface display is updated at the same time to achieve a complete update of the data. This embodiment focuses on the synchronous update method of the graphics element attributes in the associated graphics element, and the update of the graphical interface display setting can be automatically performed after all the graphics element attributes are updated.
[0036] Data update methods include:
[0037] S1. Configure the relationship between all the elements in the associated element
[0038] S2. According to the association relationship, after each primitive updates its own data, when it affects other primitives in the associated primitives, it triggers the update of the data of the primitives that are directly affected. The influence referred to in the present invention refers to the influence on the drawing of the graphical interface, that is, the effect presented by the primitive is affected / changed. The so-called update also refers to the update in the drawing of the graphical interface.
[0039] The associative relationship of associated graphic elements is a key point that distinguishes the present invention from the prior art, and is also a basic condition for synchronous updating of graphic element data of the present invention. Therefore, the associative relationship is designed with emphasis in this embodiment.
[0040] In this embodiment, the association relationship between the graphic elements in the associated graphic element includes a direct relationship and a master-slave relationship:
[0041] 1) Direct relationship refers to the relationship between the cause element and each other element that is changed in response to the change of the cause element that directly causes the change of other elements. Only the elements that directly cause the change are in direct relationship. In simple terms, if the change of element A directly causes the change of element B, then there is a direct relationship between elements A and B; and if the change of element B causes the change of element C, then there is also a direct relationship between elements B and C, but there is no direct relationship between elements A and C because of the existence of element B. For example, the change of the coordinates of the point (element A) that is the endpoint of the line (element B) directly causes the position of the line to change, so there is a direct relationship between the point and the line.
[0042] 2) Master-slave relationship, which describes the subordinate relationship between a composite graphic element and other single graphic elements that constitute the composite graphic element. Active relationship is used to describe associated objects. Taking "road" as an example, "road name", "place name of the direction", "place name of the destination", etc. are all simple graphic elements in the composite graphic element "road", so "road" belongs to the master object, and "road name", "place name of the direction", and "place name of the destination" are all subordinate objects of "road". At the same time, "road name", "place name of the direction", and "place name of the destination" are all in the form of text annotations. Since text operations are relatively independent and the operations are relatively troublesome, in this embodiment, a special design is made for the association relationship of text annotations:
[0043] The master-slave relationship of a composite graphic element containing text annotations is configured by associating the text annotation symbols of the text annotations; the attribute values of the text annotations are stored in the text annotation table, and the text annotation symbols and the attribute values of the text annotations are stored in an associative manner in the text annotation table.
[0044] Continuing with the above example of "road", suppose the association between the combined graphic elements "road" and "road" and the "road name", "coming place name" and "destination place name" are described in tabular form. In the association table of "road", only the text annotation marks of "road name", "coming place name" and "destination place name" are stored, while the content, font, color and other attributes of "road name", "coming place name" and "destination place name" are stored in the text annotation table respectively. The text annotation table associates and stores the text annotation marks and the attribute values of the text annotations. In this way, all operations of multiple text annotations occur in the text annotation table, and the text annotation marks will not change.
[0045] The master-slave relationship follows the following principles: when the master object is created, deleted, or modified, the slave object also performs the corresponding operation, but the editing and modification of the slave object does not affect the master object. Taking the description of the master-slave relationship between primitives by association number as an example, when the master object is created, deleted, or modified, the slave object also performs the corresponding operation according to the association number; the editing and modification of the slave object in its own dialog box does not affect the master object, but the deletion of the slave object requires deleting the association number of the slave object in the master object.
[0046] The synchronous trigger update of the graphic element data is based on the association relationship of the above configuration. On this basis, when editing the graphical interface, when changing the graphic elements such as points, lines, and text annotations, it is very likely to affect the attribute changes of the combined graphic elements. In order to timely update the attribute changes of other graphic elements caused by the graphic element changes, a complete set of data update mechanism for associated graphic elements is established in this embodiment.
[0047] It should be noted that it is not necessary to update the data of other primitives once a primitive changes, but only when the change of the primitive may cause changes in other primitives, the corresponding update is performed. For example, the newly added point itself has no effect on the line, but when the new point is added, there will be a basis to consider whether there is a connecting line to start the update mechanism, so the update mechanism is not started when the new point is added, and the update mechanism is started when the line is connected. The same is true for deleting points, and the update mechanism is triggered by deleting lines. For this reason, this embodiment configures an update mechanism according to the association relationship to update the data of the associated primitive. In addition, the principle of the update mechanism of the associated primitive is that the update mechanism is not started in a deterministic situation, and the direct update method is directly adopted, and the update mechanism is only started in a possible situation. In other words, when it is determined that the directly related primitive needs to be updated for drawing, the primitive updates the data by calling its own update function, and the data of the directly related primitive is directly updated by passing the updated data to the update function of the directly related primitive. When a directly related primitive may need to perform a drawing update, the primitive updates its data by calling its own update function, and the update mechanism is started to trigger the directly related primitive to perform a data update.
[0048] The control factors of the update mechanism include:
[0049] 1) The association relationship diagram of the associated graphics. The association relationship diagram identifies the association relationships between all graphics, and clearly describes the direct relationship and the master-slave relationship. Figure 1 The figure shows an example of an association diagram, in which adjacent elements represent direct relationships.
[0050] 2) Update flags for various graphics elements. The update flags indicate what kind of data update needs to be performed, such as deletion of various graphics elements, coordinate changes, or text annotation offsets. Each of them has a custom corresponding update flag. When the update mechanism is started, the corresponding response processing is performed according to the instructions of the update flag.
[0051] 3) Update functions of various graphics elements. The update function is responsible for executing data update.
[0052] Based on the above factors, the update mechanism includes the update identifier configured for the specific data update items, and the update mechanism initiated by each primitive includes the setting of the update identifier of the directly related primitive and the calling of the update function of the directly related primitive. Setting the update identifier indicates which data update items need to be executed for the directly related primitive, and calling the update function of the directly related primitive can trigger the directly related primitive to execute the specific data update items according to the instructions of the set update identifier.
[0053] It should be understood that after the current "direct relationship" primitive is updated, if there are subsequent directly related primitives, the data update of the directly related primitives will be triggered in the same way. For example, after the A primitive itself is updated, the update of its directly related primitive B is triggered, and after the B primitive is updated, the update of its directly related primitive C will be triggered. According to the description in the association relationship, the process is repeated until all affected primitives are updated.
[0054] For the convenience of management and proofreading, when configuring the association relationship, various types of graphics are classified by level, divided into bottom-level graphics, middle-level graphics and top-level graphics. It should be understood that the middle-level graphics do not have only one layer, but may have multiple layers.
[0055] 1) Bottom-level primitives are simple primitives. Bottom-level primitives are not composed of other members, such as point primitives. Bottom-level primitives are primitives that are not affected by the properties of other primitives and do not affect the drawing of the drawing. There are no lower-level primitives.
[0056] 2) Middle-level primitives include simple primitives and are also components of other primitives. For example, line primitives, which include point primitives, can also form complex primitives. Middle-level primitives are affected by changes in the properties of the bottom-level primitives or their own properties, and their own property changes affect the drawing of the upper-level primitives (which may be the top-level primitives or other middle-level primitives).
[0057] 3) Top-level primitives are composed of other primitives and do not constitute other primitives. The top-level primitives are affected by the property changes of the next-level primitives (middle-level primitives or bottom-level primitives) and the drawing of the graphics interface is affected, and there are no higher-level primitives.
[0058] The update mechanism is to solve the impact and change of the change of the bottom-level primitives on the upper-level primitives, but it will not change the bottom-level primitives during the impact and change of the upper-level primitives. After the attributes of the bottom-level primitives or middle-level primitives are changed, their own update functions are called to start the update mechanism. The update mechanism is started by calling the update function of the directly related primitives at the location where the data update occurs. That is, only the attributes of the directly related primitives that have data updates are updated, rather than a comprehensive update of all the attributes in the directly related primitives, which can reduce the amount of calculation for data updates.
[0059] During single element editing, the bottom-level or middle-level elements issue update commands to the directly superior elements in sequence according to the association relationships based on the types of other elements they affect. After receiving the update commands, each upper-level element updates its own data.
[0060] Example 2
[0061] This embodiment proposes a data updating system for associated graphic elements in a graphical interface of a power transmission line plan and section diagram software, and the system is used to execute the data updating method in Embodiment 1.
[0062] Specifically, the system includes a processor, and the specific execution of the data update method is completed by the processor. The system is configured with a computer-readable storage medium, and the medium stores a computer program. The processor runs the computer program in the medium to execute the data update method of the associated graphic element in the graphical interface in Example 1.
[0063] The present invention is not limited to the above-mentioned specific embodiments, but extends to any new features or any new combination disclosed in this specification, as well as any new method or process steps or any new combination disclosed.
Claims
1. A method for updating data of associated graphic elements in a graphical interface, for power transmission line plan and section drawing software, characterized in that the method include: Configure the association relationship between all the elements in the associated element; According to the association relationship, after each primitive updates its own data, if it affects other primitives in the associated primitives, it triggers the update of the data of the directly affected primitives.
2. The method for updating data of associated graphic elements in a graphical interface according to claim 1, characterized in that: The association relationship includes: Direct relationship: in response to the change of other primitives directly caused by the change of the primitive, the relationship between the primitive and each other primitive that is caused to change; The master-slave relationship describes the subordinate relationship between a composite element and other single elements that constitute the composite element.
3. The method for updating data of associated graphic elements in a graphical interface according to claim 2, characterized in that: The master-slave relationship of a composite graphic element containing text annotations is configured by associating the text annotation symbols of the text annotations; the attribute values of the text annotations are stored in the text annotation table, and the text annotation symbols and the attribute values of the text annotations are stored in an associative manner in the text annotation table.
4. The method for updating data of associated graphic elements in a graphical interface according to claim 2, characterized in that: The primitive performs data update by calling its own update function, and triggers data update of directly related primitives by starting an update mechanism, wherein the update mechanism is configured according to the association relationship.
5. The method for updating data of associated graphic elements in a graphical interface according to claim 2, characterized in that: The primitive updates its data by calling its own update function, and directly updates the data of the directly related primitive by passing the updated data to the update function of the directly related primitive.
6. The method for updating data of associated graphic elements in a graphical interface according to claim 4, characterized in that: The update mechanism includes an update identifier configured for a specific data update item; The update mechanism initiated by each primitive includes setting the update flag of the directly related primitive and calling the update function of the directly related primitive.
7. The method for updating data of associated graphic elements in a graphical interface according to claim 6, characterized in that: The update mechanism calls the update function of the directly related primitive at the location where the data update occurs.
8. The method for updating data of associated graphic elements in a graphical interface according to any one of claims 2 to 7, characterized in that: The association relationship between all the graphic elements in the configuration association graphic element includes: According to the relationship between the graphics elements, the graphics elements are classified into bottom-level graphics elements, middle-level graphics elements or top-level graphics elements; The bottom primitive is a simple primitive; Middle-level primitives include simple primitives and are also components of other primitives; The top-level primitive is composed of other primitives and no longer composes other primitives.
9. The method for updating data of associated graphic elements in a graphical interface according to claim 8, characterized in that: After updating its own data, the bottom-level or middle-level graphic element sends an update command to the graphic elements of the upper level in sequence according to the association relationship; each graphic element updates its own data after receiving the update command.
10. A data updating system for associated graphic elements in a graphical interface, targeting at power transmission line plan and section drawing software, characterized in that: The system executes the data updating method of associated graphic elements in a graphical interface as described in any one of claims 1-9 through a configured processor.
Citation Information
Cited By
Interactive component assembly module design method, simulation software construction method and device
CN120162998A
Modeling method and device based on relationship and relationship labeling, electronic equipment and storage medium
CN120179248A