A method and system for dynamically adding primitives

By establishing and managing dynamic link library files, the method of dynamically adding graphic elements solves the problem of fixed types and quantities of graphic elements in the screen editing system, realizes efficient dynamic addition and deletion of graphic elements, and meets the diversified and customized needs of the field of automatic computer monitoring of hydropower stations.

CN116610397BActive Publication Date: 2026-02-27NANJING HEHAI NANZI HYDROPOWER AUTOMATION
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310485636.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2026-02-27
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

The existing image editing system has a fixed number and types of graphic elements, which makes it difficult to meet the ever-increasing and changing needs of users, resulting in a large workload and the potential introduction of unknown errors.

Method used

By establishing first-level and second-level dynamic link library files, a method for dynamically adding graphic elements is implemented. This includes determining whether the graphic element requested by the user is a native graphic element, selecting a real-time editing mode, and efficiently implementing the dynamic addition and deletion of graphic elements using dynamic link library files.

Benefits of technology

It achieves the independence of the graphic element program, avoids the need for re-editing or compiling the screen editing system, meets the needs of graphic element diversification and customization, and improves work efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116610397B_ABST
    Figure CN116610397B_ABST
Patent Text Reader

Abstract

The application discloses a kind of methods and systems of dynamically adding graphic element, including according to historical hydropower station computer automatic monitoring data and hydropower station field equipment parameter information, combining graphic element editing program, obtain original graphic element, and establish primary dynamic link library file;Determine whether user demand graphic element is original graphic element, and according to the mode of selecting real-time editing picture editing system graphic element editing program according to demand, and establish secondary dynamic link library file;Picture editing system according to primary dynamic link library file and secondary dynamic link library file, carry out graphic element picture loading display and add.This application method relies on the modular design of picture editing system, and efficiently realizes the dynamic addition of graphic element using dynamic link library file.Can meet the picture display in the field of hydropower station computer automatic monitoring and the demand of graphic element diversification and customization due to data diversification display and control different equipment in picture editing program.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of dynamically adding graphics elements, and particularly relates to a method and system for dynamically adding graphics elements. BACKGROUND

[0002] A picture is an important interface for computer automatic monitoring data output display and operation control of field devices of a hydropower station, and is an important component of an integrated SCADA system. In order to visually and intuitively display monitoring data and facilitate control of field devices, graphics elements of a picture editing system need to be diversified and customizable.

[0003] The types and quantities of graphics elements of a common picture editing system are fixed in a system program, and it is difficult to meet the increasing and changing needs of users. Adding graphics elements in a picture editing system program to meet the needs of few application scenarios requires modification of the system program, from editing and compiling to testing. Not only is the workload large, but also unknown errors may be introduced into the system program, causing unpredictable consequences. SUMMARY

[0004] This section aims to summarize some aspects of embodiments of the present application and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the abstract and title of the specification to avoid obscuring the purpose of this section, the abstract and the title, and such simplifications or omissions cannot be used to limit the scope of the present application.

[0005] In view of the above-mentioned existing problems, the present application is proposed.

[0006] Therefore, the present application provides a method and system for dynamically adding graphics elements, which can solve the problems mentioned in the background art.

[0007] To solve the above technical problems, the present application provides the following technical solutions. A method for dynamically adding graphics elements comprises:

[0008] According to historical computer automatic monitoring data of a hydropower station and parameter information of field devices of the hydropower station, combined with a graphics element editing program, an original graphics element is obtained, and a first dynamic link library file is established;

[0009] It is judged whether a user demand graphics element is an original graphics element, and a real-time editing graphics element editing program mode in a picture editing system is selected according to the demand, and a second dynamic link library file is established;

[0010] The picture editing system loads and displays the added graphics element picture according to the first dynamic link library file and the second dynamic link library file.

[0011] As a preferred scheme of the method for dynamically adding graphics elements, the method further comprises:

[0012] Traverse the primary dynamic link library file and the secondary dynamic link library file, and divide the files into four categories, namely, a common category, a special category, a fault category and a to-be-deleted category;

[0013] The left lower corner point of the internal picture of the picture editing system display is selected as the origin, and the horizontal and vertical edges of the picture editing system display passing through the origin are selected as the coordinate axes to establish a rectangular coordinate system, so that the four corner points of the picture editor are (0, 0), (0, A), (B, A) and (B, 0), wherein A is the vertical length of the internal picture of the picture editing system display, and B is the horizontal length of the internal picture of the picture editing system display;

[0014] Before the newly added graphic picture is loaded and displayed, different category identification frames are established in different positions in the picture editing system according to the file categories;

[0015] If the file is of the common category, the picture in the picture editing system is taken as a common category graphic identification frame in a rectangular area formed by (0, 3A / 4), (0, A), (B / 2, A) and (B / 2, 3A / 4), and the common category graphic includes any graphic of the field device in the old scene;

[0016] If the file is of the special category, the picture in the picture editing system is taken as a special category graphic identification frame in a rectangular area formed by (0, 0), (0, A / 4), (B / 2, 0) and (B / 2, A / 4), and the special category graphic includes any graphic in the new scene;

[0017] If the file is of the fault category, the picture in the picture editing system is taken as a fault category graphic identification frame in a rectangular area formed by (B, A), (B, 3A / 4), (B / 2, A) and (B / 2, 3A / 4), and the fault category graphic includes all fault graphics in the new and old scenes;

[0018] If the file is of the to-be-deleted category, the picture in the picture editing system is taken as a to-be-deleted category graphic identification frame in a rectangular area formed by (B, A / 4), (B, 0), (B / 2, A / 4) and (B / 2, 0), and / or corresponding deletion graphics are established below different category graphics, and the to-be-deleted category graphic includes all deleted and to-be-deleted graphics in the new and old scenes and the combined graphics of the corresponding deletion graphics established below different category graphics.

[0019] As a preferred scheme of the method for dynamically adding graphics according to the application, the method further comprises the following steps:

[0020] When it is judged that the user demand is a native graphic, it is determined that the graphic already exists, and the user demand graphic is called from the server, and no graphic adding operation is performed;

[0021] When judging that the user demand is not a native graph element, it is determined that the graph element does not exist, and a graph element editing program is called to the server to perform a graph element adding operation;

[0022] When the graph element adding operation is performed, if the graph element editing program mode in the background real-time editing picture editing system is selected, the background compiling instruction is issued through the server;

[0023] When the picture editing system obtains the background compiling instruction, the normal working state of the picture editing system is closed, the user demand information is transmitted into the graph element program, the added graph element program is generated, the added graph element program is compiled and built into a secondary dynamic link library file, and is placed in a specified folder, and the user demand added graph element type is judged, and the graph element is placed in the corresponding graph element identification frame;

[0024] If the added graph element needs to be displayed or / and used, the picture editing system is restarted;

[0025] If the added graph element does not need to be displayed or / and used, and further added graph elements are needed, it is judged again whether the added graph element belongs to a native graph element, and the server instruction is waited.

[0026] As a preferred scheme of the method for dynamically adding a graph element, the method further comprises the following steps:

[0027] When the graph element adding operation is performed, if the graph element editing program mode in the foreground real-time editing picture editing system is selected, the foreground compiling instruction is issued through the server;

[0028] When the picture editing system obtains the foreground compiling instruction, the normal working state of the picture editing system is suspended, the user demand added graph element type is judged, the corresponding graph element identification frame position where the graph element is placed is determined, the calling interface function is created on the position on the suspended page to create the added graph element and perform data configuration on the added graph element, the added graph element configuration data is encapsulated, the encapsulated configuration data is associated with the added graph element, and the associated data is saved in the secondary dynamic link library file;

[0029] If the added graph element needs to be displayed or / and used, the suspended picture editing system is directly stopped, the automatic refresh is performed, and the new graph element is displayed;

[0030] If the added graph element does not need to be displayed or / and used, the automatic refresh is closed, and the server instruction is waited.

[0031] As a preferred scheme of the method for dynamically adding a graph element, the picture editing system comprises that one picture in the picture editing system is composed of a native graph element or / and a self-defined graph element, and the completed picture is saved in the form of an SVG file;

[0032] When opening a picture in a real-time picture display system, in addition to displaying a graphic element according to configuration data, real-time related value acquisition of a measuring point and real-time control and adjustment operation of the measuring point can be performed according to configured measuring point information.

[0033] When the picture type in which the graphic element is located is an operation pop-up picture of a certain measuring point, the custom graphic element can automatically acquire the ObjectId of the measuring point of the bound picture, so as to subsequently acquire real-time related values of the measuring point or perform real-time control and adjustment operation on the measuring point.

[0034] As a preferred scheme of the method for dynamically adding a graphic element, the method comprises the following steps:

[0035] The added graphic element comprises a first-level graphic element, a second-level graphic element and a third-level graphic element, a picture in the picture editing system only displays the first-level graphic element, the second-level graphic element is set as an embedded graphic element corresponding to the first-level graphic element of a category, the third-level graphic element is set as an embedded graphic element corresponding to the second-level graphic element of a category, the native graphic element is the first-level graphic element, the horizontal length and the vertical length of the first-level graphic element are B / 10 and A / 10 respectively, the horizontal length and the vertical length of the second-level graphic element are B / 12 and A / 12 respectively, and the horizontal length and the vertical length of the third-level graphic element are B / 14 and A / 14 respectively.

[0036] The first-level graphic element establishment sequence and the added graphic element picture loading and display sequence are as follows:

[0037]

[0038] The first-level graphic element is established according to a matrix value increase sequence, and the added graphic element is loaded and displayed according to the sequence establishment sequence, if the number of the native graphic element and the added first-level graphic element is greater than 25, the native graphic element is integrated and re-established according to a category, and the second-level graphic element and the third-level graphic element are established according to a time sequence on the basis of the first-level graphic element establishment.

[0039] As a preferred scheme of the method for dynamically adding a graphic element, the method comprises the following steps:

[0040] When the picture editing system normally runs, an error occurs after the second-level dynamic link library file of the added graphic element is added, or the graphic element is not responded when the graphic element is controlled, whether the fault graphic element is a native graphic element is judged;

[0041] If the graphic element is a native graphic element, the picture editing system is closed, the file corresponding to the graphic element in the first-level dynamic link library file is deleted, the corresponding native graphic element is newly established, the picture editing system program is restarted, and only the first-level dynamic link library file is connected, if the error no longer exists, the second-level dynamic link library file is connected.

[0042] If not the original primitive, directly click the delete primitive under the corresponding primitive, after the server obtains the delete primitive instruction, delete the file at the corresponding primitive in the secondary dynamic link library file, and the picture editing system does not stop working in this process.

[0043] A system for dynamically adding primitives, comprising a first file library establishing module, a second file library establishing module, and a display module,

[0044] The first file library establishing module is configured to obtain original primitives according to historical hydropower station computer automatic monitoring data and hydropower station field device parameter information, in combination with a primitive editing program, and establish a first dynamic link library file.

[0045] The second file library establishing module is configured to determine whether a user demand primitive is an original primitive, select a real-time editing picture editing system primitive editing program mode according to the demand, and establish a second dynamic link library file.

[0046] The display module is configured to load and display the added primitives by the picture editing system according to the first dynamic link library file and the second dynamic link library file.

[0047] A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method when executing the computer program.

[0048] A computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method.

[0049] The present application provides a method and system for dynamically adding primitives, which only need to place the dynamic link library file obtained by compiling and constructing the primitive program into a specified folder when adding primitives, and only need to delete the dynamic link library file related to the primitive in the specified folder when deleting primitives. The picture editing system program scans and links all dynamic link library files in the specified folder, and the addition or deletion of primitives does not cause the picture editing system to be re-edited or compiled. The method of the present application relies on the modular design of the picture editing system and efficiently realizes the dynamic addition of primitives by using dynamic link library files. Due to the characteristics of dynamic link libraries, the primitive program can be developed, debugged, compiled and constructed independently of the picture editing system program. This method of dynamically adding, modifying and deleting custom primitives at a very small cost can meet the needs of data diversification display and control of different devices in the field of hydropower station computer automatic monitoring and picture editing program, as well as the diversification and customization of primitives. BRIEF DESCRIPTION OF DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description only represent some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort. Among them:

[0051] Figure 1 A method flow chart of a method for dynamically adding a graphic element and a system provided by an embodiment of the present application;

[0052] Figure 2 A program connection overview diagram of a method for dynamically adding a graphic element and a system provided by an embodiment of the present application;

[0053] Figure 3 An internal structure diagram of a computer device of a method for dynamically adding a graphic element and a system provided by an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the above objectives, features and advantages of the present application more apparent, the specific embodiments of the present application will be described in detail below with reference to the drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort should fall within the protection scope of the present application.

[0055] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, which are not described herein. In other instances, well-known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the present application.

[0056] Secondly, the "one embodiment" or "embodiment" referred to herein can include specific features, structures or characteristics in at least one implementation of the present application. The "in one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments.

[0057] The present application is described in detail in conjunction with the schematic diagram. In the detailed description of the embodiments of the present application, the cross-sectional view of the device structure is locally enlarged without the general proportion for the convenience of description, and the schematic diagram is only an example, which should not limit the protection scope of the present application herein. In addition, the three-dimensional spatial dimensions of length, width and depth should be included in the actual manufacture.

[0058] Meanwhile, in the description of the present application, it should be noted that the terms "upper, lower, inner and outer" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0059] Unless otherwise explicitly specified and limited, the terms "mounting, connecting, connecting" in the present application should be understood broadly, for example: it can be fixed connection, detachable connection or integral connection; it can also be mechanical connection, electrical connection or direct connection, it can also be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.

[0060] Embodiment 1

[0061] Reference Figures 1-3 As a first embodiment of the present application, the embodiment provides a method and system for dynamically adding graphic elements, comprising:

[0062] According to the historical computer automatic monitoring data of hydropower stations and the on-site device parameter information of hydropower stations, combined with the graphic element editing program, the original graphic elements are obtained, and a first dynamic link library file is established;

[0063] Further, it is judged whether the user demand graphic element is an original graphic element, and the graphic element editing program mode in the real-time editing picture editing system is selected according to the demand, and a second dynamic link library file is established;

[0064] Further, the picture editing system loads and displays the newly added graphic elements according to the first dynamic link library file and the second dynamic link library file.

[0065] Further, the first dynamic link library file and the second dynamic link library file are traversed, and the files are divided into four categories, namely, a common category, a special category, a fault category and a to-be-deleted category;

[0066] Further, the lower left corner point of the picture editing system display is selected as the origin, the horizontal and vertical edges of the picture editing system display passing through the origin are selected as the coordinate axes, a rectangular coordinate system is established, and the four corner points of the picture editor are (0, 0), (0, A), (B, A) and (B, 0), wherein A is the vertical length of the picture editing system display, and B is the horizontal length of the picture editing system display.

[0067] It should be noted that before the new picture element picture loading display is carried out, different category identification frames are established in different positions in the picture editing system according to the file category;

[0068] Further, if the file is a common category, the picture in the picture editing system is in the rectangular region formed by (0, 3A / 4), (0, A), (B / 2, A) and (B / 2, 3A / 4) as a common category picture element identification frame, and the common category picture element includes any picture element of the field device in the old scene;

[0069] Further, if the file is a special category, the picture in the picture editing system is in the rectangular region formed by (0, 0), (0, A / 4), (B / 2, 0) and (B / 2, A / 4) as a special category picture element identification frame, and the special category picture element includes any picture element in the new scene;

[0070] Further, if the file is a fault category, the picture in the picture editing system is in the rectangular region formed by (B, A), (B, 3A / 4), (B / 2, A) and (B / 2, 3A / 4) as a fault category picture element identification frame, and the fault category picture element includes all fault picture elements in the new and old scenes;

[0071] Further, if the file is a to-be-deleted category, the picture in the picture editing system is in the rectangular region formed by (B, A / 4), (B, 0), (B / 2, A / 4) and (B / 2, 0) as a to-be-deleted category picture element identification frame or / and corresponding deletion picture elements are established below different category picture elements, and the to-be-deleted category picture element includes all deleted, to-be-deleted picture elements in the new and old scenes and the combined picture elements of the corresponding deletion picture elements established below different category picture elements.

[0072] It should be noted that when it is judged that the user demand is a native picture element, it is determined that the picture element already exists, and the server is called to retrieve the picture element, and no picture element addition operation is performed;

[0073] It should be noted that when it is judged that the user demand is not a native picture element, it is determined that the picture element does not exist, and the server is called to retrieve the picture element editing program, and the picture element addition operation is performed;

[0074] It should be noted that when the picture element addition operation is performed, if the picture element editing program mode in the background real-time editing picture editing system is selected, the server is called to issue a background compiling instruction;

[0075] It should be noted that after the picture editing system obtains the background compiling instruction, the normal working state of the picture editing system is closed, the user demand information is transmitted into the picture element program, the new picture element program is generated, the new picture element program is compiled and built into a two-level dynamic link library file, and is placed in a specified folder, and the category of the new picture element is judged, and the picture element is placed in the corresponding picture element identification frame.

[0076] Further, if the new graphic element needs to be displayed or / and used, the picture editing system is restarted;

[0077] Further, if the new graphic element does not need to be displayed or / and used, and further new graphic elements need to be added, it is determined whether the new graphic element belongs to the native graphic element, and the server instruction is waited.

[0078] It should be noted that when the graphic element addition operation is performed, if the graphic element editing program mode in the foreground real-time editing picture editing system is selected, the server issues a foreground compilation instruction;

[0079] It should be noted that after the picture editing system obtains the foreground compilation instruction, the normal working state of the picture editing system is suspended, the user demand for adding graphic elements is determined, the corresponding graphic element identification frame position where the graphic element is placed is determined, and the interface function is called to create the new graphic element and configure the data of the new graphic element at the position on the suspended page. The new graphic element configuration data is encapsulated, and the encapsulated configuration data is associated with the new graphic element. The associated data is saved in the secondary dynamic link library file.

[0080] Further, if the new graphic element needs to be displayed or / and used, the suspended picture editing system is directly stopped, refreshed by the automatic refresh, and the new graphic element is displayed.

[0081] Further, if the new graphic element does not need to be displayed or / and used, the automatic refresh is closed, and the server instruction is waited.

[0082] It should be noted that the picture editing system includes that a picture in the picture editing system is composed of native graphic elements or / and custom graphic elements. The completed picture is saved in the form of an SVG file.

[0083] Further, when the picture is opened in the real-time picture display system, in addition to displaying the graphic element according to the configuration data, the real-time related measurement value of the measurement point can be obtained and the real-time control and adjustment operation of the measurement point can be performed according to the configured measurement point information.

[0084] Further, when the picture type of the graphic element is the operation pop-up picture of a certain measurement point, the custom graphic element can automatically obtain the ObjectId of the measurement point of the bound picture, so as to obtain the real-time related measurement value of the measurement point or perform the real-time control and adjustment operation of the measurement point in the future.

[0085] Further, the new added graphic elements include first-level graphic elements, second-level graphic elements and third-level graphic elements, the picture editing system displays only the first-level graphic elements, the second-level graphic elements are set as the embedded graphic elements corresponding to the first-level graphic elements of the corresponding categories, the third-level graphic elements are set as the embedded graphic elements corresponding to the second-level graphic elements of the corresponding categories, the original graphic elements are all first-level graphic elements, the horizontal length and the vertical length of the first-level graphic elements are B / 10 and A / 10 respectively, the horizontal length and the vertical length of the second-level graphic elements are B / 12 and A / 12 respectively, and the horizontal length and the vertical length of the third-level graphic elements are B / 14 and A / 14 respectively;

[0086] Further, the first-level graphic element establishment sequence and the new added graphic element picture loading and display sequence are as follows:

[0087]

[0088] It should be noted that the first-level graphic elements are established according to the matrix value increasing sequence, and the new added graphic elements are loaded and displayed according to the sequence establishment sequence, if the number of the original graphic elements and the new added first-level graphic elements is greater than 25, the original graphic elements are integrated and re-established according to the categories, and the second-level graphic elements and the third-level graphic elements are established according to the time sequence based on the establishment of the first-level graphic elements.

[0089] Further, the first-level dynamic link library file and the second-level dynamic link library file include, when the normally running picture editing system does not respond after the second-level dynamic link library file of the new added graphic element is added, or when the graphic element control is performed, it is judged whether the fault graphic element is an original graphic element;

[0090] It should be noted that if it is an original graphic element, the picture editing system is closed, the file corresponding to the graphic element in the first-level dynamic link library file is deleted, the corresponding original graphic element is newly established, the picture editing system program is restarted, and only the first-level dynamic link library file is connected, if the error no longer exists, the second-level dynamic link library file is connected;

[0091] It should be noted that if it is not an original graphic element, the corresponding graphic element below is directly clicked to delete the graphic element, after the server obtains the delete graphic element instruction, the file corresponding to the graphic element in the second-level dynamic link library file is deleted, and the picture editing system does not stop working in this process.

[0092] Further, the configuration interface can also complete the configuration work of the properties such as the color and font of the graphic elements.

[0093] It should be noted that since the graphic element program and the picture editing system program are two independent modules of calling and being called, the update of the graphic element program will not affect the picture editing system program, and at the same time, the update of the picture editing system program will also try to avoid the update of the graphic element program.

[0094] It should be noted that the picture editing system program is formed into a relatively stable executable file schemaker.exe through a series of repeated iterative processes such as editing, compiling, debugging, linking, etc. The program contains all the functions required for the editing of the computer monitoring picture of the hydropower station and embeds commonly used graphics.

[0095] It should be noted that the development of the custom graphics is independent of the picture editing system program, which can be developed by the same person at different times or by different persons at the same time or at different times. The graphics program also needs to go through a series of iterative processes such as editing, compiling, debugging, and linking.

[0096] Further, the dynamic linking process occurs during the running of the schemaker.exe, i.e. each time the picture editing system is opened and run, the system program needs to load the dynamic link library file of the custom graphics during runtime for the user to edit the picture using the graphics.

[0097] It should be noted that the linker program only records the names of the called functions in the graphics program and a small amount of registration information in the picture editing system program during linking, while the complete content of the dynamic link library is actually mapped to the virtual address space of the corresponding process during the execution of the picture editing system program (runtime). The linker program finds the corresponding function code according to the function information recorded in the picture editing system program beforehand.

[0098] Further, the picture editing system program automatically loads all dynamic link library files in the specified folder during runtime, so that the addition, modification, and deletion of graphics only need to add, update, and delete library files in the folder, without involving changes to the picture editing system program itself.

[0099] Further, the picture editing system program follows a modular design and designs specific interfaces for the development of the graphics program to facilitate graphics customization. When the system program runs, it dynamically loads the dynamic library under the specified directory and calls the interface functions in the dynamic library to implement the functions required by the graphics.

[0100] It should be noted that all graphics programs need to comply with the agreement and implement the specified function. To meet the needs of graphics, the main functions are as follows:

[0101] The function returns the icon, which is called when the picture editing system interface is initialized. After initialization, the graphics icon is displayed in the system interface.

[0102] The function returns the prompt information, which contains a brief introduction of the graphics. The prompt information is triggered when the function is called.

[0103] Returning the name of the function, the name and icon of the graph element are displayed together in the system interface, and the system interface is also called at initialization.

[0104] The function of creating a graph element, obviously the function is used to create a graph element, the parameters of the function include database instances, graph element configuration data, and graph element running environment, etc., and is called when the graph element is drawn and the screen is opened.

[0105] The function of popping up the configuration interface, the graph element is used as a medium for displaying measurement point data and operating and controlling the measurement point, and the work of binding the measurement point needs to be completed in the configuration interface. In addition, the attribute configuration of the graph element itself also needs to be completed in the configuration interface. The function is called when the operation of triggering the configuration pop-up window is triggered.

[0106] The function of returning configuration data, configuration data carries all the configuration information of the graph element, and will be used in multiple places, and the function will also be called in multiple places.

[0107] The function of adjusting the size of the graph element, the size of the graph element often needs to be adjusted according to the needs of the screen, and the function will be called every time the size of the graph element is adjusted, and adjusting the size of the graph source is invalid for the first-level graph element.

[0108] In one embodiment, a system for dynamically adding graph elements, characterized by comprising a first file library establishing module, a second file library establishing module, and a display module,

[0109] The first file library establishing module is used to obtain original graph elements by combining graph element editing programs according to historical hydropower station computer automatic monitoring data and hydropower station field device parameter information, and establish a first dynamic link library file;

[0110] The second file library establishing module is used to determine whether the user demand graph element is an original graph element, and to select a real-time editing screen editing system graph element editing program mode according to the demand, and to establish a second dynamic link library file;

[0111] The display module is used to load and display the newly added graph element screen according to the first dynamic link library file and the second dynamic link library file.

[0112] The above-mentioned each unit module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operations corresponding to the above-mentioned each module by the processor.

[0113] In one embodiment, a computer device is provided, which can be a terminal, and its internal structure diagram can be as shown in Figure 3As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used for wired or wireless communication with external terminals. Wireless mode can be achieved through WIFI, operator network, NFC (near field communication) or other technologies. The computer program is executed by the processor to implement a method for dynamically adding a graph element. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad provided on the shell of the computer device. It can also be an external keyboard, touchpad or mouse, etc.

[0114] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0115] According to the historical computer automatic monitoring data of the hydropower station and the on-site equipment parameter information of the hydropower station, the original graph element is obtained by combining the graph element editing program, and a first dynamic link library file is established;

[0116] Determine whether the user demand graph element is an original graph element, and select a real-time editing picture editing system according to the demand graph element editing program mode, and establish a second dynamic link library file;

[0117] The picture editing system loads and displays the newly added graph element picture according to the first dynamic link library file and the second dynamic link library file.

[0118] Embodiment 2

[0119] Reference Figures 1-3 For an embodiment of the present application, a method and system for dynamically adding a graph element are provided. In order to verify the beneficial effects of the present application, scientific demonstration is carried out through comparative experiments.

[0120] Table 1: Operation graph element data of a hydropower station in a week

[0121]

[0122] The application provides a method and system for dynamically adding a graphic element, wherein when the graphic element is added, only the dynamic link library file obtained by compiling and constructing the graphic element program is placed in a specified folder; when the graphic element is deleted, only the dynamic link library file related to the graphic element in the specified folder is deleted. When the picture editing system program is edited, all the dynamic link library files in the specified folder are scanned and linked, and the addition or deletion of the graphic element does not cause the picture editing system to be re-edited or re-compiled.

[0123] The method of the application is based on the modular design of the picture editing system, and the dynamic addition of the graphic element is realized efficiently by using the dynamic link library file. Due to the characteristics of the dynamic link library, the graphic element program can be developed, debugged, compiled and constructed independently of the picture editing system program. The method for dynamically adding, modifying and deleting the self-defined graphic element at a very low cost can meet the needs of the diversification of the graphic element and customization in the picture display and picture editing program of the computer automatic monitoring field of the hydropower station.

[0124] It should be noted that the above embodiments are only used to illustrate the technical solutions of the application but not limit the application. Although the application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the application can be modified or replaced equivalently without departing from the spirit and scope of the application, and all of them should be covered in the scope of the claims of the application.

[0125] Those skilled in the art should understand that the embodiments of the application can be provided as a method, a system or a computer program product. Therefore, the application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes. The solutions in the embodiments of the application can be implemented in various computer languages, such as object-oriented programming language Java and interpreted scripting language JavaScript.

[0126] The application is described with reference to the flowcharts and / or block diagrams according to the methods, devices (systems) and computer program products of the embodiments of the application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams and the combination of the flows and / or blocks can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a machine that implements the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0127] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart or multiple flows and / or blocks. Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the flowchart or multiple flows and / or blocks.

[0129] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those of skill in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the application. Accordingly, the appended claims are intended to encompass within their scope all such variations and modifications as being within the scope of the application.

[0130] It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.

Claims

1. A method for dynamically adding new graphic elements, characterized in that: include, Based on historical computer-automated monitoring data of hydropower stations and on-site equipment parameter information, and combined with the graphic element editing program, the original graphic elements are obtained and a first-level dynamic link library file is established. Determine whether the user's required graphic element is a native graphic element, select the graphic element editing program method in the real-time editing screen editing system according to the requirements, and create a secondary dynamic link library file; When it is determined that the user's request is a native graphic element, it is assumed that the graphic element already exists, and the graphic element requested by the user is retrieved from the server without performing any graphic element addition operation. If it is determined that the user's requirement is not a native graphic element, then the graphic element is deemed not to exist, and the graphic element editing program is retrieved from the server to perform the graphic element addition operation; When adding graphic elements, if the graphic element editing program mode in the background real-time editing screen editing system is selected, the background compilation command is sent through the server. After the screen editing system receives the background compilation instruction, it shuts down the normal working state of the screen editing system, passes in the user requirement information to write the graphic element program, generates the new graphic element program, compiles and builds the new graphic element program into a second-level dynamic link library file, puts it into the specified folder, and determines the type of graphic element required by the user and places the graphic element in the corresponding graphic element identification frame. If you need to display and / or use the newly added graphic elements, restart the screen editing system; If the newly added graphic element does not need to be displayed or / and used, but further additions of graphic elements are required, then re-determine whether the newly added graphic element belongs to the native graphic element and wait for server instructions; When adding graphic elements, if the graphic element editing program mode in the front-end real-time editing screen editing system is selected, the server issues a front-end compilation command; When the screen editing system receives the front-end compilation instruction, it pauses the normal operation of the screen editing system, determines the type of new graphic element required by the user, determines the position of the corresponding graphic element identifier frame, and calls the interface function at that position on the paused page to create the new graphic element and configure the data of the new graphic element. The configuration data of the new graphic element is encapsulated and associated with the new graphic element. The associated data is saved in the second-level dynamic link library file. If you need to display or / and use the newly added graphic elements, simply stop the paused screen editing system operation and refresh it through the automatic refresher to display the new graphic elements; If you do not need to display or / and use the newly added elements, turn off the auto-refresher and wait for server instructions; The screen editing system loads and displays newly added graphic elements based on the first-level dynamic link library files and the second-level dynamic link library files.

2. The method for dynamically adding new primitives as described in claim 1, characterized in that: It also includes, Traverse the first-level and second-level dynamic link library files, and divide the files into four categories: common files, special files, fault files, and files to be deleted. Select the lower left corner of the screen inside the screen editing system monitor as the origin, and establish a rectangular coordinate system with the horizontal and vertical sides of the screen editing system monitor passing through the origin as the coordinate axes. Then the coordinates of the four corner points of the screen editor are (0,0), (0,A), (B,A) and (B,0), where A is the vertical length of the screen inside the screen editing system monitor and B is the horizontal length of the screen inside the screen editing system monitor. Before loading and displaying newly added graphic elements, establish different category identification frames in different locations in the screen editing system according to the file category; If the file is a common category, in the screen editing system, the rectangular area formed by (0,3A / 4), (0,A), (B / 2,A) and (B / 2,3A / 4) is used as the common category graphic element identification frame. The common category graphic elements include any graphic elements of the field equipment in the old scene. If the file is of a special category, in the screen editing system, the rectangular area formed by (0,0), (0,A / 4), (B / 2,0) and (B / 2,A / 4) is used as the special category graphic element identification frame. The special category graphic elements include any graphic elements in the new scene. If the file is a fault type, in the screen editing system, the rectangular area formed by (B,A), (B,3A / 4), (B / 2,A) and (B / 2,3A / 4) is used as the fault type graphic element identification frame. The fault type graphic elements include all fault graphic elements in both the old and new scenes. If the file is of the category to be deleted, in the screen editing system, the rectangular area formed by (B,A / 4), (B,0), (B / 2,A / 4) and (B / 2,0) is used as the identification frame for the graphic elements of the category to be deleted, or / and corresponding deletion graphic elements are created below the graphic elements of different categories. The graphic elements of the category to be deleted include all deleted graphic elements and graphic elements to be deleted in the old and new scenes, as well as the combined graphic elements of the categories below which corresponding deletion graphic elements are created.

3. The method for dynamically adding new primitives as described in claim 2, characterized in that: The screen editing system includes a screen composed of native primitives and / or custom primitives, and the finished screen is saved as an SVG file. When the screen is opened in the real-time screen display system, in addition to displaying graphic elements according to the configuration data, it can also acquire the real-time relevant measurement values ​​of the measurement points and perform real-time control and adjustment operations on the measurement points according to the configured measurement point information. When a pop-up window for a measurement point appears on the screen containing a graphic element, the custom graphic element can automatically obtain the ObjectId of the measurement point bound to the screen, so as to obtain the real-time relevant measurement values ​​of the measurement point or perform real-time control and adjustment operations on the measurement point.

4. The method for dynamically adding new primitives as described in claim 3, characterized in that: The process of loading and displaying newly added graphic elements includes... The newly added graphic elements include primary graphic elements, secondary graphic elements, and tertiary graphic elements. The screen editing system only displays primary graphic elements. The secondary graphic elements are set as embedded graphic elements of the primary graphic elements of the corresponding category. The tertiary graphic elements are set as embedded graphic elements of the secondary graphic elements of the corresponding category. All native graphic elements are primary graphic elements. The horizontal and vertical lengths of the primary graphic elements are B / 10 and A / 10, respectively. The horizontal and vertical lengths of the secondary graphic elements are B / 12 and A / 12, respectively. The horizontal and vertical lengths of the tertiary graphic elements are B / 14 and A / 14, respectively.

5. The method for dynamically adding new primitives as described in claim 4, characterized in that: The first-level dynamic link library files and the second-level dynamic link library files include, When a normally functioning screen editing system encounters an error or becomes unresponsive when manipulating a new graphic element after adding a secondary dynamic link library file, determine whether the faulty graphic element is a native graphic element. If it is a native graphic element, close the screen editing system, delete the file corresponding to the graphic element in the first-level dynamic link library file, create the corresponding native graphic element, restart the screen editing system program, and only access the first-level dynamic link library file. If the error no longer exists, then access the second-level dynamic link library file. If it is not a native graphic element, simply click "Delete Graphic Element" below the corresponding graphic element. After receiving the delete graphic element instruction from the server, the file at the corresponding graphic element in the secondary dynamic link library file will be deleted. During this process, the screen editing system will not stop working.

6. A system for dynamically adding primitives using the method described in claim 1, characterized in that: It includes a primary file library creation module, a secondary file library creation module, and a display module. The first-level file library creation module is used to obtain native graphic elements and create first-level dynamic link library files based on historical automatic monitoring data of hydropower stations and on-site equipment parameter information of hydropower stations, combined with graphic element editing programs. The secondary file library creation module is used to determine whether the user-required graphic element is a native graphic element, select the graphic element editing program mode in the real-time editing screen editing system according to the requirements, and create a secondary dynamic link library file. The display module is used by the screen editing system to load and display newly added graphic elements based on the first-level dynamic link library file and the second-level dynamic link library file.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Implementation system and method for power system interface integration

    CN103034491A

  • Visualized display method adaptive to transformer station dynamic areas

    CN105260945A