Industrial flow chart generation method, device, electronic device and storage medium
By obtaining and updating the industrial instance object information of the flowchart page, the problem of unreal-time update of the flowchart template in the prior art is solved, and the rapid generation and modification of the flowchart is realized, and the efficiency and applicability of the industrial control software are improved.
Patent Information
- Application Number
- CN202210921352.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-08-02
AI Technical Summary
In industrial control software configuration, the flowchart configuration data is huge, and adding existing template objects to the editing flowchart will create copies, resulting in the modification template being unable to update all flowcharts using the template in real time, which is inefficient, especially It takes huge manpower and material resources to draw together multi-person collaborative mapping and complex scenarios.
By responding to the update operation of the flowchart page, we obtain information about industrial instance objects, obtain application attribute items of the graphic template, and update the flowchart page according to the identification of the target attribute items, and realize quick generation and modification of the flowchart, and support personalized settings such as The difference between background color and bit number values.
It realizes rapid updates and personalized settings of flow charts, improves flow chart drawing efficiency, reduces manpower and material consumption, supports batch updates, and is suitable for complex industrial scenarios.
Smart Images

Figure CN115147514B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer graphics, and in particular to an industrial flow chart generation method, device, electronic equipment and storage medium. Background Art
[0002] In industrial control software configuration, the amount of flowchart configuration data is extremely large. Each flowchart is composed of a combination of multiple basic graphic elements (such as rectangles, triangles, and circles). There may be a large number of repeated combinations of graphic elements in multiple flowcharts.
[0003] At present, in order to avoid repeatedly drawing the same graphic combination, the commonly used graphic combinations are made into user templates, and the template objects are directly added to the edited flowchart when they are used. However, in this way, adding the template object to the edited flowchart is equivalent to creating a copy of the template object in the edited flowchart. This copy has no associated effect with the template itself, so modifying a template copy cannot achieve the modification of the corresponding template of all edited flowcharts that use this template. Summary of the invention
[0004] The purpose of the present invention is to provide an industrial flow chart generation method, device, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, so as to realize the quick generation and modification of the flow chart.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for generating an industrial process flow chart, the method further comprising:
[0007] In response to an update operation on a flowchart page, information of each industrial instance object displayed in the flowchart page is obtained, wherein the information of each industrial instance object includes: an identifier of a target attribute item of each industrial instance object, and a file path of a graphic template corresponding to each industrial instance object;
[0008] Acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object;
[0009] Determining the information of the target attribute item from the information of all the application attribute items according to the identifier of the target attribute item;
[0010] According to the information of the target attribute item, the display of the industrial instance object in the flowchart page is updated.
[0011] Optionally, the method further includes:
[0012] Acquire the graphic attribute information of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object;
[0013] The updating of the display of the industrial instance object in the flow chart page according to the information of the target attribute item includes:
[0014] The display of the industrial instance object in the flow chart page is updated according to the graphic attribute information and the information of the target attribute item.
[0015] Optionally, the acquiring information of each industrial instance object displayed in the flowchart page includes:
[0016] The information of each industrial instance object is obtained from the configuration file of the flowchart page.
[0017] Optionally, before acquiring the information of each industrial instance object from the configuration file of the flowchart page, the method further includes:
[0018] In response to a selection operation on a target graphic template, determining a file path of the target graphic template;
[0019] Acquire information of all application attribute items of the target graphic template from the file path of the target graphic template;
[0020] In response to an attribute item selection operation, determining information of an attribute item selected by the attribute item selection operation from information of all application attribute items of the target graphic template;
[0021] Instantiating the target graphic template according to information of the attribute item selected in the attribute item selection operation to generate an industrial instance object;
[0022] The identifier of the attribute item selected by the attribute item selection operation and the file path of the target graphic template are stored in the configuration file of the flowchart page.
[0023] Optionally, if the target attribute item is a monitoring attribute item, determining the information of the target attribute item from the information of all application attribute items according to the identifier of the target attribute item includes:
[0024] According to the identifier of the target attribute item, determine the information of the target monitoring attribute item and the industrial equipment corresponding to the target monitoring attribute item from the information of all the application attribute items;
[0025] Determine monitoring information of the target monitoring attribute item of the industrial equipment.
[0026] Optionally, the method further includes:
[0027] The display of the industrial instance object in the flow chart page is updated according to the monitoring information of the target monitoring attribute item.
[0028] Optionally, the method further includes:
[0029] Acquire a graphic control of an industrial instance object and application property items for the graphic control;
[0030] A graphic template of the industrial instance object is generated according to the graphic control and the application attribute item.
[0031] In a second aspect, an embodiment of the present application further provides an industrial flow chart generating device, the industrial flow chart generating device comprising: a page information acquiring module, a template information acquiring module, a determining module, and an updating module;
[0032] The page information acquisition module is used to respond to the update operation on the flowchart page and acquire the information of each industrial instance object displayed in the flowchart page, wherein the information of each industrial instance object includes: the identifier of the target attribute item of each industrial instance object and the file path of the graphic template corresponding to each industrial instance object;
[0033] The template information acquisition module is used to acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object;
[0034] The determining module is used to determine the information of the target attribute item from the information of all the application attribute items according to the identifier of the target attribute item;
[0035] The updating module is used to update the display of the industrial instance object in the flow chart page according to the information of the target attribute item.
[0036] In the third aspect, an embodiment of the present application also provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the industrial flowchart generation method as described in any one of the first aspects.
[0037] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the industrial flow chart generation method as described in any one of the first aspects are executed.
[0038] The beneficial effects of the present application are as follows: the embodiment of the present application provides an industrial flowchart generation method, first responding to the update operation for the flowchart page, obtaining the information of each industrial instance object displayed in the flowchart page, and then obtaining the information of all application attribute items of the industrial instance object corresponding to the graphic template from the file path of the graphic template corresponding to the industrial instance object; according to the identification of the target attribute item, determining the information of the target attribute item from the information of all application attribute items; finally, according to the information of the target attribute item, updating the display of the industrial instance object in the flowchart page. Thus, after updating the graphic template, the industrial instance object in the flowchart page using the graphic template can be updated. Secondly, for the same graphic template, the user can personalize the graphic template by setting the identification of the target attribute item (for example, the same graphic display, but the graphic background color can be different, and different bit number values can also be displayed, etc.). BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 A flowchart of an industrial process flow chart generation method provided in one embodiment of the present application;
[0041] Figure 2 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application;
[0042] Figure 3 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application;
[0043] Figure 4 A flowchart of a method for generating an industrial flow chart provided in yet another embodiment of the present application;
[0044] Figure 5 A flowchart of a method for generating an industrial flow chart provided in yet another embodiment of the present application;
[0045] Figure 6 A schematic diagram of an industrial flow chart generating device provided in one embodiment of the present application;
[0046] Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0048] In this application, unless otherwise clearly specified and limited, the terms "first" and "second" are used only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one feature. In the description of the present invention, the meaning of "multiple" is at least two, such as two or three, unless otherwise clearly and specifically limited. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
[0049] In industrial control software configuration, the amount of industrial flowchart configuration data is extremely large. Each industrial flowchart is composed of a variety of basic graphic elements (such as rectangles, triangles, and circles). There may be a large number of repeated graphic element combinations in multiple flowcharts. If each flowchart is drawn using the most basic graphic elements, there will be a lot of repetitive work and low efficiency. Although using copy and paste can improve efficiency to a certain extent, it is limited to the case of one person drawing. If multiple people collaborate on drawing, it is difficult to reuse the results of others in a timely manner.
[0050] At present, in order to avoid repeatedly drawing the same graphic combination, the concept of template is proposed in the development process. Commonly used graphic combinations can be made into user templates. When using them, the template objects can be directly added to the edited flowchart. Since template files can be shared by multiple people, the efficiency of flowchart drawing can be effectively improved.
[0051] However, as far as the templates currently used are concerned, the process of adding a template to a specific flowchart page by the user is a process of copying the template. The copied template copy has no associated effect with the template itself. If there are 500 flowchart pages that want to use a certain template, there will be 500 copies of the user template. If a user makes a modification based on the template and wants the modification to take effect on the 500 flowchart pages that have used the copy, the flowchart needs to be opened one by one for modification, which is a huge and extremely cumbersome workload. Especially in complex industrial scenarios, there are hundreds of templates in the entire configuration, and modification requires huge manpower and material resources.
[0052] In view of the existing problems, the embodiments of the present application provide multiple possible implementation methods to realize the quick generation and modification of the flow chart. The following is an explanation through multiple examples in conjunction with the accompanying drawings. Figure 1 This is a flowchart of an industrial flow chart generation method provided in one embodiment of the present application. The method can be implemented by an electronic device running the above industrial flow chart generation method. The electronic device can be, for example, a terminal device or a server. Figure 1 As shown, the method includes:
[0053] Step 101: In response to an update operation on a flowchart page, information of each industrial instance object displayed in the flowchart page is obtained, wherein the information of each industrial instance object includes: an identifier of a target attribute item of each industrial instance object, and a file path of a graphic template corresponding to each industrial instance object.
[0054] It should be noted that the flowchart page is a presentation page of the flowchart, and the flowchart page includes at least one industrial flowchart. The so-called industrial flowchart refers to a system diagram that uses graphic symbols to represent various activities, actions, mechanical equipment used and their mutual connections in actual production. For example, an industrial flowchart may include: the category of work done and the equipment used, the number of equipment, the moving distance, working hours and other information. Specifically, the industrial flowchart includes at least one of the following industrial instance objects: equipment, valves, pipes and pipes, instruments, etc. This application does not limit the specific type, meaning, etc. of the industrial instance objects.
[0055] It should be noted that the update operation for the flowchart page can be implemented automatically or manually by the user, and this application does not limit this. For example, the update operation can be an operation automatically initiated by the flowchart page according to a preset time interval, or an operation initiated by a special scenario (such as opening a flowchart page, etc.); for another example, the update operation can also be: the user can initiate an update operation for updating all or part of the industrial instance objects on the flowchart page through update buttons, instructions, etc. in the flowchart page; or after updating the graphic template, a batch update operation for updating all flowchart pages using the updated graphic template can be initiated in the form of a global operation. The above is only an example. In actual implementation, the update operation for the flowchart page can also have other forms, which is not limited in this application. Among them, a graphic template is a complex graphic and related configuration composed of multiple simple graphic objects that can be easily reused in the drawing of an industrial flowchart.
[0056] By responding to the update operation on the flowchart page, the information of each industrial instance object displayed in the flowchart page is obtained, wherein the information of each industrial instance object includes: the identifier of the target attribute item of each industrial instance object, and the file path of the graphic template corresponding to each industrial instance object.
[0057] The identification of the target attribute item is the identification of the target attribute item determined by the industrial instance object based on the graphic template. In this application, each industrial instance object includes multiple attribute items, but in the process of instantiating the template, it is necessary to screen among the multiple attribute items to determine that the attribute item corresponding to each industrial instance object is the target attribute item.
[0058] The file path of the graphic template corresponding to each industrial instance object is a reference path of the graphic template file, through which the graphic attribute information, application attribute item information, etc. of the graphic template file can be obtained.
[0059] In a possible implementation, the graphic template file includes an application attribute item that defines a macro format, and the identifier of the target attribute item can be, for example, a macro name. The macro can be defined to use an abstract symbol, and then specify a specific meaning when instantiated, so that the template instance has multiple forms of expression. For example: @tag@, when used specifically, @tag@=tag1 (the assignment or object of @tag@ is clarified).
[0060] In a possible implementation, a pipeline graph template file includes the following application attribute items in a macro format:
[0061] @backcolor@=white
[0062] @water@=light green
[0063] @oi1@=Light yellow
[0064] The identifier of the target attribute item included in the information of an industrial instance object generated based on the pipeline graphic template displayed in the flowchart page may be, for example:
[0065] Background color=@water@
[0066] Or, background color = @oil@, etc.
[0067] The above is only an example. In actual implementation, there may be other forms, which are not limited in this application.
[0068] Step 102: Acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object.
[0069] Since the graphic template includes information on all application attribute items corresponding to the graphic template, and the graphic template can be obtained through the file path of the graphic template, information on all application attribute items of the graphic template corresponding to the industrial instance object can be obtained from the file path of the graphic template corresponding to the industrial instance object.
[0070] Step 103: According to the identifier of the target attribute item, determine the information of the target attribute item from the information of all application attribute items.
[0071] Step 104: Update the display of the industrial instance object in the flow chart page according to the information of the target attribute item.
[0072] After determining the information of the target attribute item according to the identifier of the target attribute item, the display of the industrial instance object in the flow chart page is updated according to the target attribute item information.
[0073] For example, the @water@ in the above specific implementation is changed from @water@=light green to @water@=light blue. After executing steps 101 to 104, the background of all industrial instance objects in the flowchart page that reference the pipeline graphic template and whose target attribute item is identified as @water@ will be changed from light green to light yellow.
[0074] In summary, the embodiment of the present application provides an industrial flow chart generation method, which first responds to the update operation on the flow chart page, obtains the information of each industrial instance object displayed in the flow chart page, and then obtains the information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object; according to the identifier of the target attribute item, determines the information of the target attribute item from the information of all application attribute items; finally, according to the information of the target attribute item, updates the display of the industrial instance object in the flow chart page. Thus, after updating the graphic template, the industrial instance objects in the flow chart page using the graphic template can be updated. Secondly, for the same graphic template, the user can personalize the graphic template by setting the identifier of the target attribute item (for example, the same graphic display, but the graphic background color can be different, and different bit number values can also be displayed, etc.).
[0075] Optional, in the above Figure 1 Based on this, the present application also provides a possible implementation of an industrial flow chart generation method. Figure 2 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application; Figure 2 As shown, the method also includes:
[0076] Step 201: obtaining graphic attribute information of a graphic template corresponding to an industrial instance object from a file path of the graphic template corresponding to the industrial instance object.
[0077] In addition to updating the flowchart page by modifying the information of the application attribute items in the above embodiment, the graphic attribute information in the graphic template may also change. However, it should be noted that since the flowchart includes not only multiple industrial instance objects but also the connection relationship between industrial instance objects, the adjustment of the graphic attribute information is limited and needs to be performed without affecting the connection relationship. For example, the improvement of the internal structure or shape without changing the outline, etc., is not limited in this application.
[0078] If the graphic attribute information of the graphic template is updated, the graphic attribute information of the graphic template corresponding to the industrial instance object can be obtained from the file path of the graphic template corresponding to the industrial instance object after step 101. The graphic attribute information is the specific graphic of the graphic template, for example, the graphic attribute information of the pipeline graphic template is a graphic composed of a rectangle and two ellipses.
[0079] Update the display of industrial instance objects in the flowchart page according to the information of the target attribute item, including:
[0080] Step 202: Update the display of the industrial instance object in the flow chart page according to the graphic attribute information and the information of the target attribute item.
[0081] According to the graphic attribute information and the information of the target attribute item, the display of the industrial instance object in the flowchart page is updated.
[0082] For example, the @water@ in the above specific implementation is changed from @water@=light green to @water@=light blue. After executing steps 101 to 104, the background of all industrial instance objects in the flowchart page that reference the pipeline graphic template and whose target attribute item is identified as @water@ will be changed from light green to light yellow.
[0083] Through the above method, the modification of the graphic attribute information of the graphic template is synchronously updated in the flowchart page.
[0084] Optional, in the above Figure 2 Based on this, the present application also provides a possible implementation of an industrial flow chart generation method, which obtains information of each industrial instance object displayed in the flow chart page, including:
[0085] Get the information of each industrial instance object from the configuration file on the flowchart page.
[0086] In a possible implementation, each flowchart page has a configuration file of the flowchart page, and the configuration file stores the graphics, connection relationships, identifiers of target attribute items, file paths of corresponding graphic templates, etc. of each industrial instance object in the flowchart page. Therefore, when obtaining information of each industrial instance object displayed in the flowchart page, the information of each industrial instance object can be obtained from the configuration file of the flowchart page.
[0087] The above is only an example. There may be other ways to obtain the object information of each industrial instance in the flowchart page, and this application does not limit this.
[0088] Optionally, based on the above embodiments, the present application also provides a possible implementation of an industrial flow chart generation method. Figure 3 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application; Figure 3 As shown, before obtaining information of each industrial instance object from the configuration file of the flowchart page, the method further includes:
[0089] Step 301: In response to a selection operation on a target graphic template, determine the file path of the target graphic template.
[0090] When drawing a flow chart, first respond to the user's selection operation on the target graphic template and determine the target graphic template. In the above embodiment, it is explained that each graphic template has a file path, so after determining the target graphic template, the file path of the target graphic template can be determined.
[0091] Step 302: Acquire information of all application attribute items of the target graphic template from the file path of the target graphic template.
[0092] According to the file path of the target graphic template, information of all attribute items of the target graphic template can be obtained in the file of the target graphic template.
[0093] Step 303: In response to the attribute item selection operation, determine the information of the attribute item selected by the attribute item selection operation from the information of all application attribute items of the target graphic template.
[0094] For all the information of the attribute items, the user can select and configure them and perform an attribute item selection operation. In response to the attribute item selection operation, the information of the attribute item selected by the attribute item selection operation is determined.
[0095] Step 304: Instantiate the target graphic template according to the information of the attribute item selected by the attribute item selection operation to generate an industrial instance object.
[0096] According to the selected attribute item information, the target graphic template is instantiated on the flowchart page to generate an industrial instance object.
[0097] Step 305: Store the identifier of the attribute item selected by the attribute item selection operation and the file path of the target graphic template in the configuration file of the flowchart page.
[0098] The identifier of the property item selected by the selection operation and the file path of the target graphic template are stored in the configuration file of the flowchart page.
[0099] In a specific implementation, for example, a pipeline graphic template is instantiated to create a water pipe and monitor the water temperature. First, the pipeline graphic template is selected as the target graphic template, and the file path of the pipeline graphic template is determined. Then, all application attribute item information of the pipeline graphic template is obtained from the file path, for example:
[0100] @backcolor@=white
[0101] @water@=light green
[0102] @oil@=light yellow
[0103] @tag@=@medium temperature@
[0104] Next, input an attribute item selection operation for the above attribute items, and determine the selected attribute item information from the information of all attribute items, for example, select the following information:
[0105] Background color = @water@ = light green
[0106] Temperature = @tag@ = tag1
[0107] According to the information of the attribute item selected in the attribute item selection operation, the target graphic template is instantiated. According to the above selected attribute item information, the background color @water@ is defined as light green in the macro definition. When the pipeline graphic template is instantiated, the background color macro is replaced (macro replacement refers to replacing abstract macro symbols with actual meaningful values) with @water@. Since the color of @water@ is defined as light green, the background color of the pipeline is light green, indicating that the flowing liquid is water.
[0108] Or select the following information:
[0109] Background color = @oil@ = light yellow
[0110] According to the information of the attribute item selected in the attribute item selection operation, the target graphic template is instantiated. According to the above selected attribute item information, the background color @oil@ is defined as light yellow in the macro definition. When the pipeline graphic template is instantiated, the background color macro is replaced with @oil@. Since the color of @oil@ is defined as light yellow, the background color of the pipeline is light yellow, indicating that the flowing liquid is oil.
[0111] In another specific implementation, the graphic template may include an initial macro definition. For example, based on the above embodiment, all application attribute item information of the pipeline graphic template is:
[0112] @backcolor@=white
[0113] @water@=light green
[0114] @oil@=light yellow
[0115] @tag@=@medium temperature@
[0116] The pipeline graphic template includes:
[0117] Background color = @backcolor@
[0118] That is to say, for the macro definition related to the background color @backcolor@ of the pipeline graphic template, you can first make an initial macro definition, for example, replace the macro: background color = @backcolor@, set the background color to white, and also provide a secondary modification interface. According to the information of the attribute item selected in the attribute item selection operation, when the target graphic template is instantiated, perform a macro replacement on @backcolor@ and replace it with @water@ or @oil@.
[0119] The above is only an example. In actual implementation, there may be other implementation methods, which are not limited in this application.
[0120] By saving the file path of the graphic template in the flowchart page file (configuration file), the industrial instance object in the flowchart page and the graphic template are defined as a reference relationship, so that when the graphic template sends a change, the industrial instance object in the flowchart page also changes.
[0121] Optional, in the above Figure 1 Based on this, the present application also provides a possible implementation of an industrial flow chart generation method. Figure 4 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application; Figure 4 As shown, if the target attribute item is a monitoring attribute item, according to the identifier of the target attribute item, the information of the target attribute item is determined from the information of all application attribute items, including:
[0122] Step 401: According to the identifier of the target attribute item, determine the information of the target monitoring attribute item and the industrial equipment corresponding to the target monitoring attribute item from the information of all application attribute items.
[0123] In a possible implementation, if the target attribute item is a monitoring attribute item, in addition to determining the information of the target monitoring attribute item, it is also necessary to further clarify the detection target corresponding to the detection attribute item, that is, determine the industrial equipment corresponding to the target detection attribute item. According to the identification of the target attribute item, the information of the target monitoring attribute item and the industrial equipment corresponding to the target monitoring attribute item are determined from the information of all application attribute items.
[0124] Step 402: Determine monitoring information of target monitoring attribute items of industrial equipment.
[0125] The monitoring information of the target monitoring attribute items of the industrial equipment is obtained. Depending on the different industrial equipment, the monitoring information may be, for example, temperature, pressure, humidity, etc., which is not limited in this application.
[0126] In a specific implementation, all application attribute item information of the pipeline graphic template includes:
[0127] @tag@=@medium temperature@;
[0128] For the application attribute item macro @tag@, the specific meaning is not specified. The interface of the application attribute item can be specified during the instantiation process. For example, it can be set to tag1 or tag2, and tag1 and tag2 correspond to the monitoring data points on site respectively. The application attribute item information after macro replacement is saved in the configuration file of the flowchart page. Since the file path of the target graphic template is saved in the configuration file of the flowchart page, the industrial instance object can be updated accordingly for any changes to the target graphic template.
[0129] For example, in the above pipeline graphic template, if the water temperature needs to be monitored, set @tag@=tag1. In an industrial scenario, tag1 represents the real-time value of the water temperature measuring instrument.
[0130] For another example, in the above pipeline graphic template, the oil temperature needs to be monitored, and @tag@=tag2 is set. In an industrial scenario, tag2 represents the real-time value of the instrument measuring the oil temperature.
[0131] The above is only an example. In actual implementation, there may be other implementation methods, which are not limited in this application.
[0132] Optional, in the above Figure 4 On the basis of, the present application also provides a possible implementation of an industrial flow chart generation method, the method also includes:
[0133] According to the monitoring information of the target monitoring attribute item, the display of the industrial instance object in the flowchart page is updated.
[0134] In a possible implementation, in the above embodiment, the temperature of water is monitored and @tag@=tag1 is set. Then, after actual use, the value of tag1 is displayed, for example, 95°C.
[0135] In another possible implementation, in the above embodiment, the temperature of the oil is monitored and @tag@=tag2 is set. Then, after actual use, the value of tag2, such as 400°C, is displayed.
[0136] The above is only an example, and this application does not limit the specific display method.
[0137] Optional, in the above Figure 4 Based on this, the present application also provides a possible implementation of an industrial flow chart generation method. Figure 5 A flowchart of a method for generating an industrial flow chart provided in another embodiment of the present application; Figure 5 As shown, the method includes:
[0138] Step 501: Acquire a graphic control of an industrial instance object and application property items for the graphic control.
[0139] Step 502: Generate a graphic template of the industrial instance object according to the graphic control and application attribute items.
[0140] In one possible implementation, a user may first use basic graphics to create a graphic control, such as using rectangles and ellipses to create a graphic control for a pipe, and define application attribute items of the graphic control, such as color, monitored industrial equipment, font, etc. For example, the application attribute items may include color macros and string macros to obtain a graphic template for an industrial instance object.
[0141] In a specific implementation manner, the graphic template of the industrial instance object may be saved as a user template file with a suffix of .tmp, which mainly includes graphic attribute information and / or application attribute item information.
[0142] In another specific implementation method, a rectangle and two ellipses are used and combined to make a template for a pipeline graphic, and then the relevant properties are set. For example, the color macro @backcolor@ is used to set the background color, and the predefined background color is white. The temperature of the medium in the pipeline is defined using the string macro @tag@, and the specific value (specific monitored industrial equipment) is not specified. The value is specified when it is instantiated.
[0143] The graphic template produced by the above method can be provided to others for use by importing, and the differentiated use of the graphic template can be achieved by setting the identification of the target attribute item during use.
[0144] The following is a description of the industrial flow chart generation device, electronic device, storage medium, etc. used to execute the present application. The specific implementation process and technical effects are described above and will not be repeated below.
[0145] An embodiment of the present application provides a possible implementation example of an industrial flow chart generation device, which can execute the industrial flow chart generation method provided in the above embodiment. Figure 6 This is a schematic diagram of an industrial flow chart generation device provided in one embodiment of the present application. Figure 6 As shown, the industrial flow chart generating device 100 comprises: a page information obtaining module 61, a template information obtaining module 63, a determining module 65, and an updating module 67;
[0146] The page information acquisition module 61 is used to respond to the update operation on the flowchart page and acquire the information of each industrial instance object displayed in the flowchart page, wherein the information of each industrial instance object includes: the identifier of the target attribute item of each industrial instance object and the file path of the graphic template corresponding to each industrial instance object;
[0147] The template information acquisition module 63 is used to acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object;
[0148] A determination module 65, configured to determine information of a target attribute item from information of all application attribute items according to an identifier of the target attribute item;
[0149] The updating module 67 is used to update the display of the industrial instance object in the flow chart page according to the information of the target attribute item.
[0150] Optionally, a template information acquisition module 63 is used to acquire graphic attribute information of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object;
[0151] The updating module 67 is used to update the display of the industrial instance object in the flow chart page according to the graphic attribute information and the information of the target attribute item.
[0152] Optionally, the page information acquisition module 61 is used to acquire information of each industrial instance object from a configuration file of the flowchart page.
[0153] Optionally, the industrial process flow diagram generating device 100 further includes: a response module and an instantiation module;
[0154] A response module, used for responding to a selection operation on a target graphic template and determining a file path of the target graphic template;
[0155] The template information acquisition module 63 is used to acquire information of all application attribute items of the target graphic template from the file path of the target graphic template;
[0156] A response module, used for responding to the attribute item selection operation, and determining information of the attribute item selected by the attribute item selection operation from information of all application attribute items of the target graphic template;
[0157] An instantiation module, used for instantiating a target graphic template according to information of the attribute item selected in the attribute item selection operation to generate an industrial instance object;
[0158] The saving module is used to store the identifier of the attribute item selected by the attribute item selection operation and the file path of the target graphic template in the configuration file of the flowchart page.
[0159] Optionally, if the target attribute item is a monitoring attribute item, the determination module 65 is used to determine the information of the target monitoring attribute item and the industrial equipment corresponding to the target monitoring attribute item from the information of all application attribute items according to the identification of the target attribute item; and determine the monitoring information of the target monitoring attribute item of the industrial equipment.
[0160] Optionally, the updating module 67 is used to update the display of the industrial instance object in the flow chart page according to the monitoring information of the target monitoring attribute item.
[0161] Optionally, the industrial process flow chart generating device 100 further includes: an acquisition module and a generation module;
[0162] An acquisition module, used for acquiring a graphic control of an industrial instance object and application property items for the graphic control;
[0163] The generation module is used to generate a graphic template of an industrial instance object according to graphic controls and application attribute items.
[0164] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0165] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0166] An embodiment of the present application provides a possible implementation example of an electronic device, which can execute the industrial flow chart generation method provided in the above embodiment. Figure 7 A schematic diagram of an electronic device provided in an embodiment of the present application, the device can be integrated into a terminal device or a chip of a terminal device, and the terminal can be a computing device with data processing capabilities.
[0167] The electronic device includes: a processor 701, a storage medium 702 and a bus, the storage medium stores program instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the program instructions, and the steps of the above industrial flow chart generation method are executed. The specific implementation method and technical effect are similar and will not be repeated here.
[0168] An embodiment of the present application provides a possible implementation example of a computer-readable storage medium, which can execute the industrial flowchart generation method provided in the above embodiment. A computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the above industrial flowchart generation method are executed.
[0169] A computer program stored in a storage medium may include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0170] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0171] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0172] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0173] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0174] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for generating an industrial flow chart, characterized in that: The method further comprises: In response to an update operation on a flowchart page, information of each industrial instance object displayed in the flowchart page is obtained, wherein the information of each industrial instance object includes: an identifier of a target attribute item of each industrial instance object, and a file path of a graphic template corresponding to each industrial instance object; Acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object; Determining the information of the target attribute item from the information of all the application attribute items according to the identifier of the target attribute item; According to the information of the target attribute item, the display of the industrial instance object in the flowchart page is updated; wherein, The obtaining of information of each industrial instance object displayed in the flowchart page includes: obtaining information of each industrial instance object from a configuration file of the flowchart page; Before obtaining the information of each industrial instance object from the configuration file of the flowchart page, the method also includes: in response to a selection operation on a target graphic template, determining the file path of the target graphic template; obtaining information of all application attribute items of the target graphic template from the file path of the target graphic template; in response to an attribute item selection operation, determining information of the attribute item selected in the attribute item selection operation from the information of all application attribute items of the target graphic template; instantiating the target graphic template according to the information of the attribute item selected in the attribute item selection operation to generate an industrial instance object; and storing the identifier of the attribute item selected in the attribute item selection operation and the file path of the target graphic template in the configuration file of the flowchart page.
2. The method according to claim 1, characterized in that The method further comprises: Acquire the graphic attribute information of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object; The updating of the display of the industrial instance object in the flow chart page according to the information of the target attribute item includes: The display of the industrial instance object in the flow chart page is updated according to the graphic attribute information and the information of the target attribute item.
3. The method according to claim 1, characterized in that If the target attribute item is a monitoring attribute item, determining the information of the target attribute item from the information of all application attribute items according to the identifier of the target attribute item includes: According to the identifier of the target attribute item, determine the information of the target monitoring attribute item and the industrial equipment corresponding to the target monitoring attribute item from the information of all the application attribute items; Determine monitoring information of the target monitoring attribute item of the industrial equipment.
4. The method according to claim 3, characterized in that The method further comprises: The display of the industrial instance object in the flow chart page is updated according to the monitoring information of the target monitoring attribute item.
5. The method according to claim 1, characterized in that The method further comprises: Acquire a graphic control of an industrial instance object and application property items for the graphic control; A graphic template of the industrial instance object is generated according to the graphic control and the application attribute item.
6. An industrial flow chart generating device, characterized in that: The industrial flow chart generating device comprises: a page information acquiring module, a template information acquiring module, a determining module, and an updating module; The page information acquisition module is used to respond to the update operation on the flowchart page and acquire the information of each industrial instance object displayed in the flowchart page, wherein the information of each industrial instance object includes: the identifier of the target attribute item of each industrial instance object and the file path of the graphic template corresponding to each industrial instance object; The template information acquisition module is used to acquire information of all application attribute items of the graphic template corresponding to the industrial instance object from the file path of the graphic template corresponding to the industrial instance object; The determining module is used to determine the information of the target attribute item from the information of all the application attribute items according to the identifier of the target attribute item; The updating module is used to update the display of the industrial instance object in the flowchart page according to the information of the target attribute item; The page information acquisition module is used to acquire the information of each industrial instance object from the configuration file of the flowchart page; A response module, used for responding to a selection operation on a target graphic template and determining a file path of the target graphic template; The template information acquisition module is used to acquire information of all application attribute items of the target graphic template from the file path of the target graphic template; The response module is used to respond to the attribute item selection operation and determine the information of the attribute item selected by the attribute item selection operation from the information of all application attribute items of the target graphic template; An instantiation module, used to instantiate the target graphic template according to the information of the attribute item selected by the attribute item selection operation to generate an industrial instance object; The saving module is used to store the identifier of the attribute item selected by the attribute item selection operation and the file path of the target graphic template in the configuration file of the flowchart page.
7. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the industrial flow chart generation method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the industrial flow chart generation method according to any one of claims 1 to 5 are executed.
