Industrial process drawing method, device, electronic equipment and storage medium

Through the combination of Vue.js library and SVG canvas, the problems of tedious drawing of industrial process drawings and low editing efficiency are solved, real-time updates and dynamic interactivity are achieved, and drawing efficiency and user experience are improved.

CN118567648BActive Publication Date: 2024-09-27TIANJIN KEDIAN PETROCHEMICAL TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411062234.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-09-27
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

The method of drawing industrial process drawings in the existing technology is cumbersome, has low editing efficiency, and is difficult to achieve real-time updates and dynamic interactivity.

Method used

Use the Vue.js library combined with the SVG canvas to draw process steps in the order of the industrial process, use Vue.js instructions to manage data and configure interactive functions, predict the next process step or connection relationship based on historical data, provide recommended information to improve drawing speed, and Enable dynamic interactivity.

Benefits of technology

It improves drawing efficiency, realizes real-time updates and dynamic interactivity of process drawings, and enhances user interaction experience and code maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567648B
    Figure CN118567648B
Patent Text Reader

Abstract

The present application relates to a method, device, electronic device and storage medium for drawing industrial process diagrams, and belongs to the technical field of data processing. The method includes: creating an HTML file, introducing a Vue.js library into the HTML file; drawing an SVG element corresponding to the current process step on an SVG canvas, and setting corresponding attributes; using instructions in the Vue.js library to manage the basic data of the current process step, and binding the dynamic data of the current process step to the corresponding SVG element, and configuring interactive functions; determining the next predicted process step or predicted connection relationship connected to the current process step based on historical data, and generating recommendation information based on the configuration template corresponding to the next predicted process step or predicted connection relationship; if the recommended information is selected, drawing the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas. The present application improves the convenience of drawing industrial process diagrams.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data processing, and in particular to an industrial process drawing method, device, electronic device and storage medium. Background Art

[0002] Industrial process diagrams are graphical representations used to describe product manufacturing processes, process steps, equipment layouts, and the relationships between components during industrial production. They are applicable to any industrial field that needs to describe complex material flows and energy conversion processes. Process diagrams are not only an important basis for engineering and technical personnel to conduct process design, production organization, equipment selection, installation and commissioning, but also an important tool for production management, quality control, and employee training.

[0003] Currently, the following methods can be used to draw process drawings on web pages:

[0004] 1. Export as image or vector graphics and embed into web page: First, draw the process drawing in CAD software and export it into common image format (such as PNG, JPEG) or vector graphics format (such as SVG, PDF); embed the exported process drawing file into the web page, you can use HTML Tags or <object>Tags to achieve this.

[0005] 2. Use H5 and JavaScript chart libraries: You can use JavaScript chart libraries such as Highcharts, Chart.js, D3.js, etc. to dynamically draw process diagrams on web pages. These libraries support various types of charts, and can obtain data and update charts in real time through technologies such as Ajax or WebSockets. If you need to display process diagrams in real time and interact with back-end data, you can combine back-end technologies to achieve this. For example, the back-end server pushes real-time data to the front-end through WebSocket, and the front-end uses JavaScript chart libraries to dynamically update the process diagram.

[0006] 3. Use CAD plug-ins or tools: Some CAD software or third-party plug-ins provide the function of embedding CAD graphics directly into web pages and realizing dynamic display.

[0007] There are many ways to draw process drawings, but all of them require draftsmen to edit them according to the actual industrial processes. The editing process is cumbersome and the editing efficiency is low. Summary of the invention

[0008] In order to improve the convenience of drawing industrial process drawings, the present application provides an industrial process drawing method, device, electronic device and storage medium.

[0009] In a first aspect, the present application provides a method for drawing an industrial process map, which adopts the following technical solution:

[0010] Create an HTML file and import the Vue.js library into the HTML file.

[0011] According to the sequence of the industrial process, the first process step is determined as the current process step;

[0012] Draw the SVG element corresponding to the current process step on the SVG canvas and set the corresponding attributes;

[0013] Use the instructions in the Vue.js library to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function;

[0014] Determine, based on historical data, a next predicted process step or predicted connection relationship connected to the current process step, and generate recommendation information based on a configuration template corresponding to the next predicted process step or predicted connection relationship;

[0015] If the recommended information is selected, then draw the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas, insert the corresponding configuration template, modify the configuration template, complete the drawing of the current process step or connection relationship, determine the next predicted process step as the new current process step, repeatedly draw the SVG element corresponding to the current process step on the SVG canvas, and set the corresponding attributes; use the instructions in the Vue.js library to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function; determine the next predicted process step or predicted connection relationship connected to the current process step based on historical data, and generate the recommended information steps according to the configuration template corresponding to the next predicted process step or predicted connection relationship, until all process steps in the industrial process are drawn and the industrial process diagram is completed;

[0016] If the recommended information is not selected, the next process step is determined to be the new current process step, and the corresponding SVG element of the current process step is repeatedly drawn on the SVG canvas, and the corresponding attributes are set; the instructions in the Vue.js library are used to manage the basic data of the current process step, and the dynamic data of the current process step is bound to the corresponding SVG element, and the interactive function is configured; the next predicted process step or predicted connection relationship connected to the current process step is determined based on historical data, and the recommended information step is generated according to the configuration template corresponding to the next predicted process step or predicted connection relationship, until all process steps in the industrial process are drawn and the industrial process diagram is completed.

[0017] By adopting the above technical solution, an HTML file is created, and the Vue.js library is introduced into the file. Then, the SVG elements corresponding to the process steps are drawn on the SVG canvas in the order of the industrial process, and the attributes are set. Then, the instructions in the Vue.js library are used to manage the data of the steps in the process diagram, and then the recommendation information of the next predicted process step or predicted connection relationship is generated according to the data of the current process step. The possible next process step or connection relationship is recommended to the draftsman, which improves the drawing speed. In addition, the process diagram drawn by SVG and Vue methods can change dynamically according to the actual industrial data, and has strong interactivity.

[0018] Furthermore, the instructions in the Vue.js library are used to manage the basic data of the process steps, bind the dynamic data of the process steps to the corresponding SVG elements, and configure the interactive functions, including:

[0019] Apply the step instructions in the Vue.js library to determine the order of the current process steps;

[0020] Apply the connection instruction in the Vue.js library to connect the SVG element corresponding to the current process step with the SVG element corresponding to the previous process step;

[0021] Apply the binding instructions in the Vue.js library to bind the dynamic data of the current process step to the corresponding SVG element;

[0022] Apply the event handling mechanism in the Vue.js library to configure interactive functions for the SVG elements corresponding to the current process step.

[0023] Furthermore, the determining, based on the historical data, the next predicted process step or predicted connection relationship connected to the current process step includes:

[0024] Obtain basic data and dynamic data of the current process steps;

[0025] Determine the name and industrial type of the current process step according to the basic data and the dynamic data;

[0026] Filtering the first data related to the industrial type in the historical data;

[0027] Determine whether there is second data corresponding to the name of the current process step in the first data;

[0028] If so, determining the process step in the first data connected to the second data as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship;

[0029] If not, performing similarity analysis on the name of the current process step to determine a plurality of similar process steps whose similarities are greater than a preset value;

[0030] The process step connected to the second data corresponding to the similar process step is determined as the next predicted process step, and the connection relationship connected to the second data is determined as the predicted connection relationship.

[0031] By adopting the above technical solution, the electronic device uses the name to further filter the second data based on the basic data and dynamic data of the current process steps and the first data related to the same industrial type in the historical data, and then infers the predicted process steps and predicted connection relationships, and makes recommendations based on type and name, providing convenience for draftsmen to draw.

[0032] Furthermore, the similarity analysis is performed on the name of the current process step to determine a plurality of similar process steps having a similarity greater than a preset value, including:

[0033] Determine a plurality of pending process steps having names similar to the current process step by using a similarity algorithm, and determine an initial similarity between each of the pending process steps and the current process step;

[0034] Obtaining basic information corresponding to the current process step, and determining whether the basic information is also configured in the pending process step;

[0035] If so, the initial similarity of the pending process step with the same configuration of the basic information is added with the preset growth value to obtain the similarity;

[0036] If not, the initial similarity is determined as the similarity;

[0037] Arrange the pending process steps in descending order of the similarity to obtain a first sequence;

[0038] Determine the undetermined process steps in the first sequence whose similarity is greater than a preset value as similar process steps.

[0039] Furthermore, if there are multiple next predicted process steps, generating recommendation information according to the configuration template corresponding to the next predicted process step includes:

[0040] Obtaining a similarity corresponding to a similar process step connected to the next predicted process step;

[0041] Assigning the similarity of each of the similar process steps to the corresponding next predicted process step;

[0042] determining a correlation between a current process step and each of the next predicted process steps;

[0043] Calculating the mean of the correlation and the similarity corresponding to the next prediction process step, and determining the priority corresponding to each of the next prediction process steps according to the descending order of the mean;

[0044] Arrange the configuration templates corresponding to the next predicted process step in the order of priority to generate recommendation information.

[0045] Further, the determining of the correlation between the current process step and each of the next predicted process steps includes:

[0046] Combining the name of the current process step with the name of each of the next predicted process steps to obtain multiple groups of first step combinations;

[0047] Obtain a first quantity of the first step combination in historical data;

[0048] Acquire a second quantity of a second step combination including the name of the current process step in the historical data;

[0049] A ratio of the first quantity to the second quantity of each of the first step combinations is determined as the correlation between the current process step and the next predicted process step.

[0050] Furthermore, the configuration interaction function includes:

[0051] Get the type of interactive operation and the initial landing point position on the display interface;

[0052] Get the range of the SVG element on the display interface;

[0053] Determine whether the initial landing point is within the range, and whether the type of the interaction operation is consistent with the type of the interaction operation corresponding to the SVG element;

[0054] If yes, then obtain multiple consecutive landing positions within a continuous time period;

[0055] Generate a motion trajectory according to the plurality of continuous landing point positions;

[0056] If the motion trajectory is within the operating range of the SVG element, triggering an interactive function;

[0057] Otherwise, the interaction function is not triggered.

[0058] In a second aspect, the present application provides an industrial process diagram drawing device, comprising:

[0059] Create a module for creating an HTML file, and introduce the Vue.js library in the HTML file;

[0060] A current process step determination module is used to determine the first process step as the current process step according to the sequence of the industrial process;

[0061] The first execution module is used to draw the SVG element corresponding to the current process step on the SVG canvas and set the corresponding attributes;

[0062] A management module, used to manage the basic data of the current process step using the instructions in the Vue.js library, bind the dynamic data of the current process step to the corresponding SVG element, and configure interactive functions;

[0063] A recommendation module, used to determine the next predicted process step or predicted connection relationship connected to the current process step according to historical data, and generate recommendation information according to a configuration template corresponding to the next predicted process step or predicted connection relationship;

[0064] A second execution module is used for, if the recommended information is selected, drawing the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas, inserting the corresponding configuration template, modifying the configuration template, completing the drawing of the current process step or connection relationship, and executing the current process step update module until all process steps in the industrial process are drawn and the industrial process diagram is completed;

[0065] A third execution module is used for executing the current process step update module if the recommended information is not selected, and repeating the steps of the first execution module, the management module and the recommendation module until all process steps in the industrial process are drawn and the industrial process diagram is completed;

[0066] The current process step updating module is used to determine the next predicted process step as a new current process step.

[0067] In a third aspect, the present application provides an electronic device, including:

[0068] at least one processor;

[0069] Memory;

[0070] At least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program being configured to: execute the method as described in any one of the first aspects.

[0071] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute the method as described in any one of the first aspects.

[0072] In summary, the present application includes at least one of the following beneficial technical effects:

[0073] 1. Create an HTML file and introduce the Vue.js library into the file. Then, draw the SVG elements corresponding to the process steps on the SVG canvas in the order of the industrial process and set the attributes. Then, use the instructions in the Vue.js library to manage the data of the steps in the process diagram. Then, generate the recommended information of the next predicted process step or predicted connection relationship based on the data of the current process step, recommend the possible next process step or connection relationship to the draftsman, improve the drawing speed, and the process diagram drawn by SVG and Vue method can change dynamically according to the actual industrial data, with strong interactivity;

[0074] 2. Based on the basic data and dynamic data of the current process steps, and based on the first data related to the same industrial type in the historical data, the second data is further screened by name, and then the predicted process steps and predicted connection relationships are inferred, and recommendations are made based on the type and name, providing convenience for draftsmen to draw;

[0075] 3. Dynamic interactivity: Process diagrams usually need to be updated in real time according to data changes, such as displaying the status or parameters of different process steps. Vue provides data-driven capabilities, which can easily bind data with SVG graphics to achieve dynamic interactivity of process diagrams;

[0076] 4. Scalability and maintainability: Vue can separate the logic and interface of the process diagram and develop it in a componentized way. This can improve the maintainability and scalability of the code and facilitate subsequent modification and optimization of the process diagram;

[0077] 5. Real-time update: Combining Vue's responsiveness and SVG's dynamic rendering capabilities, the process diagram can be updated in real time, and even if the data changes, it can be immediately reflected in the diagram. This is conducive to timely monitoring of process status or adjusting parameters;

[0078] 6. Optimized interactive experience: Vue can easily handle user interactions, such as clicks, drags, and other operations. Combined with the interactive features of SVG, it can provide a richer interactive experience for process drawings, making it easier for users to understand and operate process drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a flow chart of the method for drawing an industrial process diagram in an embodiment of the present application.

[0080] Figure 2 It is a structural block diagram of the industrial process diagram drawing device in an embodiment of the present application.

[0081] Figure 3 It is a structural block diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0082] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0083] In addition, the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article, unless otherwise specified, generally means that the associated objects before and after are in an "or" relationship.

[0084] The present application embodiment discloses a method for drawing an industrial process map. Figure 1 , which is executed by an electronic device, which can be a server or a terminal device, wherein the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a desktop computer, etc., but is not limited thereto. It includes (steps S101 to S107):

[0085] Step S101: Create an HTML file and introduce the Vue.js library into the HTML file.

[0086] Specifically, Vue is a modern JavaScript framework for building user interfaces that provides data-driven views. The electronic device responds to the user's operation, creates an HTML file as a web page carrier, and introduces the Vue.js library in the file. The electronic device can install the Vue.js library in advance through CDN (Content Delivery Network) or npm (node ​​package manager).

[0087] Step S102: According to the sequence of the industrial process, the first process step is determined as the current process step.

[0088] Step S103: Draw the SVG element corresponding to the current process step on the SVG canvas, and set the corresponding attributes.

[0089] Specifically, according to the order of the industrial process, the SVG elements corresponding to each process step are established in sequence. SVG (Scalable Vector Graphics) is an XML markup language used to describe two-dimensional vector graphics. SVG allows the creation of interactive graphics, including animation and transformation of graphics.

[0090] In the SVG canvas, various shapes (such as rectangles, circles, lines, etc.) can be used to represent different elements in the process flow diagram, such as process steps, connection relationships, etc. The electronic device responds to the user's operation, places different elements on the SVG canvas as needed according to the structural design of the process steps, and sets the corresponding attributes, such as position, size, color, etc.

[0091] Therefore, in response to the user's operation, the electronic device first creates an SVG element corresponding to the first process step, ie, the current process step.

[0092] Step S104: Use the instructions in the Vue.js library to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function.

[0093] Specifically, the Vue.js library includes a variety of instructions.

[0094] The electronic device can apply the step instruction in the Vue.js library to determine the order of the current process steps. The step instruction is steps, which manages the step order of the SVG elements corresponding to the current process steps.

[0095] The electronic device can also apply the connection instruction in the Vue.js library to connect the SVG element corresponding to the current process step with the SVG element corresponding to the previous process step. The connection instruction is links.

[0096] The electronic device can also apply the binding instructions in the Vue.js library to bind the dynamic data of the current process step to the corresponding SVG element, and the binding instructions are v-for, v-bind, etc. Among them, the dynamic data of the process step comes from the actual industrial site and is collected by data acquisition equipment.

[0097] Electronic devices can also apply the event handling mechanism in the Vue.js library to configure interactive functions for the SVG elements corresponding to the current process step. The event handling mechanism is the v-on instruction, and the interactive function can be clicking or dragging the SVG element corresponding to the process step to display detailed information.

[0098] Step S105: Determine the next predicted process step or predicted connection relationship connected to the current process step according to the historical data, and generate recommendation information according to the configuration template corresponding to the next predicted process step or predicted connection relationship.

[0099] Specifically, the electronic device presets a history database, which may come from the Internet and may also include the user's historical editing data.

[0100] Step S106: If the recommended information is selected, the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information is drawn on the SVG canvas, and the corresponding configuration template is inserted, the configuration template is modified, and the drawing of the current process step or connection relationship is completed, and then step S107 is executed: the next predicted process step is determined as the new current process step; steps S103 to S105 are repeated until all process steps in the industrial process are drawn and the industrial process diagram is completed.

[0101] Specifically, if the recommended information is selected by the drawing personnel, the electronic device responds to the operation, draws the content in the recommended information on the canvas, inserts the SVG element corresponding to the next process step or connection relationship, and then inserts the configuration template corresponding to the corresponding step or connection relationship, so that the drawing personnel can configure according to the template and continue to update the current process step.

[0102] Step S106: If the recommended information is not selected, execute step S107: determine the next predicted process step as the new current process step; repeat steps S103 to S105 until all process steps in the industrial process are drawn and the industrial process diagram is completed.

[0103] Specifically, if the recommended information is not selected, the drawing can be continued in the order of the industrial process.

[0104] Therefore, this application uses Vue combined with SVG drawing method to achieve the following effects:

[0105] 1. Dynamic interactivity: Process diagrams usually need to be updated in real time according to data changes, such as displaying the status or parameters of different process steps. Vue provides data-driven capabilities, which can easily bind data with SVG graphics to achieve dynamic interactivity of process diagrams.

[0106] 2. Scalability and maintainability: Vue can separate the logic and interface of the process diagram and develop it in a componentized way. This can improve the maintainability and scalability of the code and facilitate subsequent modification and optimization of the process diagram.

[0107] 3. Real-time update: Combining Vue's responsiveness and SVG's dynamic rendering capabilities, the process diagram can be updated in real time, and even if the data changes, it can be immediately reflected in the diagram. This is conducive to timely monitoring of process status or adjusting parameters.

[0108] 4. Optimized interactive experience: Vue can easily handle user interactions, such as clicks, drags, and other operations. Combined with the interactive features of SVG, it can provide a richer interactive experience for process drawings, making it easier for users to understand and operate process drawings.

[0109] Wherein, when determining the next predicted process step or predicted connection relationship connected to the current process step according to the historical data, step S105 includes (steps S11 to S17):

[0110] Step S11: Obtain basic data and dynamic data of the current process step.

[0111] Specifically, the electronic device obtains basic data of the current process step, and obtains dynamic data after the electronic device binds the dynamic data to the SVG element corresponding to the current process step.

[0112] Dynamic data can include flow rate, temperature, thermal cycle process, opening and closing of equipment corresponding to the current process step, etc.

[0113] Step S12: Determine the name and industrial type of the current process step according to the basic data and dynamic data.

[0114] Specifically, when editing the current process step, the basic data includes the name of the current process step, and the industrial type is determined by comparing the content of the basic data and dynamic data with the data corresponding to each industrial type. The industrial type can be the type of equipment corresponding to the current process step. For example, in the industrial process diagram for chemical production, the current process step is raw material feeding, that is, the prepared raw materials are fed into the reactor in a certain proportion and order. The electronic device can determine that the corresponding industrial type is the chemical industry based on the name of the process step and the device.

[0115] Step S13: Filter the first data related to the industrial type in the historical data.

[0116] Specifically, the electronic device selects data of the chemical industry in the historical data as the first data.

[0117] Step S14: Determine whether there is second data corresponding to the name of the current process step in the first data.

[0118] If so, step S15 is executed: determining the process step in the first data connected to the second data as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship.

[0119] Specifically, the electronic device determines the process step connected to the second data in the data of the chemical industry as the next predicted process step, and determines the connection relationship connected to the second data as the predicted connection relationship.

[0120] Among them, the connection relationships in industrial process diagrams include sequential connections, calculation connections, physical connections, logical connections, and special connections.

[0121] Sequential connection indicates the causal relationship between process steps, that is, only after the current process step is completed can the next process step connected with it be entered.

[0122] Calculation connection means that the result of the current process step is calculated through a formula to obtain the structure of the next process step.

[0123] Physical connection means the connection relationship between equipment, devices or components is represented by physical media such as pipes, lines, conveyor belts, etc.

[0124] Logical connection does not rely on physical media, but instead achieves collaborative work between devices, devices or components through logical judgment, conditional triggering or signal transmission.

[0125] Special connections are used in certain specific industries or process, such as threaded connections, welding connections, gear connections, etc., to achieve functions such as fastening and transmission between equipment or components.

[0126] If it does not exist, execute steps S16 to S17.

[0127] Step S16: performing similarity analysis on the name of the current process step, and determining a plurality of similar process steps whose similarities are greater than a preset value.

[0128] Specifically, if the second data corresponding to the name of the current process step does not exist in the first data, it may be caused by the non-standard name of the current process step. Therefore, the electronic device uses a similarity algorithm to perform a similarity analysis on the name of the current process step and the names of each process step in the first data, determines the similarity, and then selects the process steps whose similarity is greater than a preset value as similar process steps.

[0129] Similarity algorithms can be selected from a variety of methods such as edit distance algorithm, Jaccard similarity, cosine similarity, fuzzy matching algorithm, deep learning model, etc.

[0130] Step S17: determining the process step connected to the second data corresponding to the similar process step as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship.

[0131] Specifically, the electronic device determines a plurality of next predicted process steps and a plurality of predicted connection relationships.

[0132] In another possible implementation, in order to more accurately screen similar process steps whose similarity is greater than a preset value, step S16 may further include (steps S161 to S166):

[0133] Step S161: determining a plurality of pending process steps having names similar to the current process step by a similarity algorithm, and determining an initial similarity between each pending process step and the current process step.

[0134] Specifically, the electronic device determines a plurality of pending process steps having names similar to the current process step through a similarity algorithm, and initial similarities of the pending process steps calculated through the similarity algorithm.

[0135] Step S162: Obtain basic information corresponding to the current process step, and determine whether the basic information is also configured in the pending process step.

[0136] Specifically, if the same process step is drawn, although the names are different, the basic information may be the same. Therefore, the electronic device can further determine whether the basic information is also configured in the pending process step.

[0137] If yes, then execute step S163: add the preset growth value to the initial similarity of the pending process steps with the same configuration basic information to obtain the similarity.

[0138] Specifically, the electronic device presets a growth value, and the initial similarity of the pending process steps that are also configured with basic information is superimposed on the preset growth value to obtain the final similarity. Therefore, the pending process steps that are also configured with the same basic information are further distinguished, and when the pending process steps with a similarity greater than the preset value are selected, the ones with higher similarity are screened out from both the name and the configuration information.

[0139] If not, executing step S164: determining the initial similarity as the similarity.

[0140] Specifically, if the pending processes are not configured with the same basic information, there is no need to continue to change the initial similarity, and the initial similarity can be used as the similarity.

[0141] Step S165: Arrange the pending process steps in descending order of similarity to obtain a first sequence.

[0142] Step S166: Determine the pending process steps in the first sequence whose similarity is greater than a preset value as similar process steps.

[0143] Furthermore, the electronic device sorts each driving process step in descending order of similarity to obtain a first sequence, and then selects similar process steps from the first sequence in order.

[0144] In another possible implementation, if there are multiple next predicted process steps, step S105 generates recommendation information according to the configuration template corresponding to the next predicted process step, including

[0145] (Step S21 to Step S25):

[0146] Step S21: obtaining the similarity corresponding to the similar process step connected to the next predicted process step.

[0147] Specifically, in step S17, the process step connected to the second data corresponding to the similar process step is determined as the next predicted process step. Therefore, the electronic device can obtain the similarity corresponding to the similar process step connected to the next predicted process step.

[0148] Step S22: assigning the similarity of each similar process step to the corresponding next predicted process step.

[0149] Step S23: Determine the correlation between the current process step and each next predicted process step, including (steps S231 to S234):

[0150] Step S231: Combine the name of the current process step with the name of each next predicted process step to obtain multiple groups of first step combinations.

[0151] Specifically, the electronic device obtains multiple groups of first step combinations, and if the current process step is highly correlated with the next predicted process step, the first step combination appears more frequently.

[0152] Step S232: Obtain the first quantity of the first step combination in the historical data.

[0153] Step S233: Obtain the second quantity of the second step combination including the name of the current process step in the historical data.

[0154] Step S234: Determine the ratio of the first quantity to the second quantity of each first step combination as the correlation between the current process step and the next predicted process step.

[0155] Specifically, the more the first numbers of first step combinations in the historical data are, the more frequently the current process step is used together with the next predicted process step, that is, the higher the correlation is.

[0156] Step S24: Calculate the mean of the correlation and similarity corresponding to the next prediction process step, and determine the priority corresponding to each next prediction process step according to the descending order of the mean.

[0157] Specifically, the electronic device calculates the mean of the correlation and the similarity, and the mean considers the possibility of the next predicted process step being connected to the current process step from two aspects. The larger the mean, the higher the priority.

[0158] Step S25: Arrange the configuration templates corresponding to the next predicted process step in order of priority and generate recommendation information.

[0159] Specifically, the electronic devices are recommended in descending order of priority.

[0160] In another possible implementation, configuring the interactive function in step S104 includes (steps S31 to S37):

[0161] Step S31: Obtain the type of interactive operation and the initial landing point position on the display interface.

[0162] Specifically, the types of interactive operations include clicking or dragging, and the electronic device then obtains the initial landing point position of the interactive operation on the display interface.

[0163] Step S32: Obtain the range occupied by the SVG element in the display interface.

[0164] Specifically, if the layout of the SVG elements is completed and a coordinate system is established on the display interface, the coordinate range occupied by the SVG elements can be determined in the coordinate system.

[0165] Step S33: Determine whether the initial landing point is within the range, and whether the type of the interactive operation is consistent with the type of the interactive operation corresponding to the SVG element.

[0166] If yes, execute step S34: obtain multiple continuous landing positions within a continuous time period.

[0167] Step S35: generating a motion trajectory according to a plurality of continuous landing point positions.

[0168] Step S36: If the motion trajectory is within the operating range of the SVG element, the interactive function is triggered.

[0169] Specifically, if the initial landing point is within the range, it can be preliminarily determined that the interactive operation corresponds to the SVG element, and the interactive operation is consistent with the interactive operation type of the SVG element, then it can be further determined that the interactive operation is related to the current SVG element. In order to verify whether the interactive function is triggered, the electronic device obtains the motion trajectory based on multiple landing points in a continuous time period. If the motion trajectory is still within the operating range of the SVG element, the interactive function is triggered.

[0170] Otherwise, execute step S37: do not trigger the interactive function.

[0171] In order to better implement the above method, the present application embodiment also provides an industrial process map drawing device, referring to Figure 2 , the industrial process diagram drawing device 200 comprises:

[0172] Create module 201, used to create an HTML file and introduce the Vue.js library into the HTML file;

[0173] The current process step determination module 202 is used to determine the first process step as the current process step according to the sequence of the industrial process;

[0174] The first execution module 203 is used to draw the SVG element corresponding to the current process step on the SVG canvas and set the corresponding attributes;

[0175] Management module 204, used to manage the basic data of the current process step using instructions in the Vue.js library, bind the dynamic data of the current process step to the corresponding SVG element, and configure interactive functions;

[0176] A recommendation module 205, configured to determine the next predicted process step or predicted connection relationship connected to the current process step according to the historical data, and generate recommendation information according to the configuration template corresponding to the next predicted process step or predicted connection relationship;

[0177] The second execution module 206 is used to draw the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas if the recommended information is selected, and insert the corresponding configuration template, modify the configuration template, complete the drawing of the current process step or connection relationship, and execute the current process step update module 207 until all process steps in the industrial process are drawn and the industrial process diagram is completed;

[0178] The third execution module 208 is used to execute the current process step update module 207 if the recommended information is not selected, and repeat the steps of the first execution module 203, the management module 204 and the recommendation module 205 until all process steps in the industrial process are drawn and the industrial process diagram is completed;

[0179] The current process step updating module 207 is used to determine the next predicted process step as a new current process step.

[0180] Furthermore, the management module 204 is specifically used for:

[0181] Apply the step instructions in the Vue.js library to determine the order of the current process steps;

[0182] Apply the connection instruction in the Vue.js library to connect the SVG element corresponding to the current process step with the SVG element corresponding to the previous process step;

[0183] Apply the binding instructions in the Vue.js library to bind the dynamic data of the current process step to the corresponding SVG element;

[0184] Apply the event handling mechanism in the Vue.js library to configure interactive functions for the SVG elements corresponding to the current process step.

[0185] Furthermore, the recommendation module 205 is specifically used for:

[0186] Obtain basic data and dynamic data of the current process steps;

[0187] Determine the name and industrial type of the current process step based on basic data and dynamic data;

[0188] Filter the first data related to the industrial type in the historical data;

[0189] Determine whether there is second data corresponding to the name of the current process step in the first data;

[0190] If it exists, determining the process step in the first data connected to the second data as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship;

[0191] If it does not exist, a similarity analysis is performed on the name of the current process step to determine a plurality of similar process steps whose similarity is greater than a preset value;

[0192] The process step connected to the second data corresponding to the similar process step is determined as the next predicted process step, and the connection relationship connected to the second data is determined as the predicted connection relationship.

[0193] Furthermore, the recommendation module 205 performs similarity analysis on the name of the current process step, and when determining a plurality of similar process steps with similarities greater than a preset value, is specifically used to:

[0194] Determine multiple pending process steps with names similar to the current process step by using a similarity algorithm, and determine the initial similarity between each pending process step and the current process step;

[0195] Obtain the basic information corresponding to the current process step, and determine whether the basic information is also configured in the pending process step;

[0196] If so, the initial similarity of the pending process steps with the same configuration basic information is added with the preset growth value to obtain the similarity;

[0197] If it does not exist, the initial similarity is determined as the similarity;

[0198] Arrange the pending process steps in descending order of similarity to obtain a first sequence;

[0199] The pending process steps in the first sequence whose similarity is greater than a preset value are determined as similar process steps.

[0200] Furthermore, if there are multiple next predicted process steps, when the recommendation module 205 generates recommendation information according to the configuration template corresponding to the next predicted process step, it is specifically used to:

[0201] Obtaining similarities corresponding to similar process steps connected to the next predicted process step;

[0202] Assigning the similarity of each similar process step to the corresponding next predicted process step;

[0203] determining the relevance of the current process step to each of the next predicted process steps;

[0204] Calculate the mean of the correlation and similarity corresponding to the next prediction process step, and determine the priority corresponding to each next prediction process step according to the descending order of the mean;

[0205] Arrange the configuration templates corresponding to the next predicted process step in order of priority and generate recommendation information.

[0206] Determine the relevance of the current process step to each of the next predicted process steps, including:

[0207] Combining the name of the current process step with the name of each next predicted process step to obtain multiple groups of first step combinations;

[0208] Get the first quantity of the first step combination in the historical data;

[0209] Acquire a second quantity of a second step combination including the name of the current process step in the historical data;

[0210] The ratio of the first quantity to the second quantity of each first step combination is determined as the correlation between the current process step and the next predicted process step.

[0211] Furthermore, the management module 204 configures the interactive functions, including:

[0212] Get the type of interactive operation and the initial landing point position on the display interface;

[0213] Get the range of the SVG element on the display interface;

[0214] Determine whether the initial landing point is within the range and whether the type of interaction operation is consistent with the type of interaction operation corresponding to the SVG element;

[0215] If yes, then obtain multiple consecutive landing positions within a continuous time period;

[0216] Generate a motion trajectory according to multiple consecutive landing point positions;

[0217] If the motion track is within the operating range of the SVG element, the interactive function is triggered;

[0218] Otherwise, the interaction function is not triggered.

[0219] The various variations and specific examples of the methods in the aforementioned embodiments are also applicable to the industrial process map drawing device in this embodiment. Through the aforementioned detailed description of the industrial process map drawing method, those skilled in the art can clearly know the implementation method of the industrial process map drawing device in this embodiment. Therefore, for the sake of brevity of the specification, it will not be described in detail here.

[0220] In order to better implement the above method, the present application embodiment provides an electronic device, referring to Figure 3 , the electronic device 300 includes: a processor 301, a memory 303 and a display screen 305. Among them, the memory 303 and the display screen 305 are connected to the processor 301, such as through a bus 302. Optionally, the electronic device 300 may also include a transceiver 304. It should be noted that in actual applications, the transceiver 304 is not limited to one, and the structure of the electronic device 300 does not constitute a limitation on the embodiments of the present application.

[0221] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0222] The bus 302 may include a path to transmit information between the above components. The bus 302 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 302 may be divided into an address bus, a data bus, a control bus, etc.

[0223] The memory 303 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0224] The memory 303 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 303 to implement the contents shown in the above method embodiment.

[0225] Figure 3 The electronic device 300 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0226] An embodiment of the present application also provides a computer-readable storage medium, storing a computer program, which, when executed by a processor, implements the industrial process diagram drawing method provided in the above embodiment, creates an HTML file, introduces the Vue.js library into the file, and then draws SVG elements corresponding to the process steps on the SVG canvas in the order of the industrial process, sets the attributes, and then uses the instructions in the Vue.js library to manage the data of the steps in the process diagram, and then generates recommendation information for the next predicted process step or predicted connection relationship based on the data of the current process step, recommends the possible next process step or connection relationship to the draftsman, improves the drawing speed, and the process diagram drawn by the SVG and Vue method can dynamically change according to the actual industrial data, with strong interactivity.

[0227] In this embodiment, the computer-readable storage medium may be a tangible device that holds and stores instructions used by the instruction execution device. The computer-readable storage medium may be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, the computer-readable storage medium may be a portable computer disk, a hard disk, a USB flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a podium random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, an optical disk, a magnetic disk, a mechanical encoding device, and any combination thereof.

[0228] The computer program in this embodiment includes program codes for executing all the aforementioned methods, and the program codes may include instructions corresponding to the steps of the methods provided in the above embodiments. The computer program can be downloaded from a computer-readable storage medium to various computing / processing devices, or downloaded to an external computer or external storage device via a network (such as the Internet, a local area network, a wide area network, and / or a wireless network). The computer program can be executed completely on the user's computer or as an independent software package.

[0229] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

[0230] In addition, it should be understood that relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device 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 device.< / object>

Claims

1. A method for drawing an industrial process diagram, characterized in that: include: Create an HTML file and import the Vue.js library into the HTML file. According to the sequence of the industrial process, the first process step is determined as the current process step; Draw the SVG element corresponding to the current process step on the SVG canvas and set the corresponding attributes; Use the instructions in the Vue.js library to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function; Determine, according to the historical data, a next predicted process step or a predicted connection relationship connected to the current process step, and generate recommendation information according to a configuration template corresponding to the next predicted process step or the predicted connection relationship; If the recommended information is selected, then draw the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas, insert the corresponding configuration template, modify the configuration template, complete the drawing of the current process step or connection relationship, determine the next predicted process step as the new current process step, repeatedly draw the SVG element corresponding to the current process step on the SVG canvas, and set the corresponding attributes; use the instructions in the Vue.js library to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function; determine the next predicted process step or predicted connection relationship connected to the current process step based on historical data, and generate the recommended information steps according to the configuration template corresponding to the next predicted process step or predicted connection relationship, until all process steps in the industrial process are drawn and the industrial process diagram is completed; If the recommended information is not selected, the next process step is determined to be the new current process step, and the SVG element corresponding to the current process step is repeatedly drawn on the SVG canvas, and the corresponding attributes are set; the instructions in the Vue.js library are used to manage the basic data of the current process step, and the dynamic data of the current process step is bound to the corresponding SVG element, and the interactive function is configured; the next predicted process step or predicted connection relationship connected to the current process step is determined according to the historical data, and the steps of generating recommended information according to the configuration template corresponding to the next predicted process step or predicted connection relationship are generated until all process steps in the industrial process are drawn and the industrial process diagram is completed; The instructions in the Vue.js library are used to manage the basic data of the current process step, bind the dynamic data of the current process step to the corresponding SVG element, and configure the interactive function, including: Apply the step instructions in the Vue.js library to determine the order of the current process steps; Apply the connection instruction in the Vue.js library to connect the SVG element corresponding to the current process step with the SVG element corresponding to the previous process step; Apply the binding instructions in the Vue.js library to bind the dynamic data of the current process step to the corresponding SVG element; Apply the event handling mechanism in the Vue.js library to configure interactive functions for the SVG elements corresponding to the current process step; The step of determining the next predicted process step or predicted connection relationship connected to the current process step according to the historical data includes: Obtain basic data and dynamic data of the current process steps; Determine the name and industrial type of the current process step according to the basic data and the dynamic data; Filtering the first data related to the industrial type in the historical data; Determine whether there is second data corresponding to the name of the current process step in the first data; If so, determining the process step in the first data connected to the second data as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship; If not, performing similarity analysis on the name of the current process step to determine a plurality of similar process steps whose similarities are greater than a preset value; The process step connected to the second data corresponding to the similar process step is determined as the next predicted process step, and the connection relationship connected to the second data is determined as the predicted connection relationship.

2. The method according to claim 1, characterized in that The performing similarity analysis on the name of the current process step to determine a plurality of similar process steps with similarities greater than a preset value includes: Determine a plurality of pending process steps having names similar to the current process step by using a similarity algorithm, and determine an initial similarity between each of the pending process steps and the current process step; Obtaining basic information corresponding to the current process step, and determining whether the basic information is also configured in the pending process step; If so, the initial similarity of the pending process step with the same configuration of the basic information is added with the preset growth value to obtain the similarity; If not, the initial similarity is determined as the similarity; Arrange the pending process steps in descending order of the similarity to obtain a first sequence; Determine the undetermined process steps in the first sequence whose similarity is greater than a preset value as similar process steps.

3. The method according to claim 1 or 2, characterized in that: If there are multiple next predicted process steps, generating recommendation information according to the configuration template corresponding to the next predicted process step includes: Obtaining a similarity corresponding to a similar process step connected to the next predicted process step; Assigning the similarity of each of the similar process steps to the corresponding next predicted process step; determining a correlation between a current process step and each of the next predicted process steps; Calculating the mean of the correlation and the similarity corresponding to the next prediction process step, and determining the priority corresponding to each of the next prediction process steps according to the descending order of the mean; Arrange the configuration templates corresponding to the next predicted process step in the order of priority to generate recommendation information.

4. The method according to claim 3, characterized in that The determining of the correlation between the current process step and each of the next predicted process steps comprises: Combining the name of the current process step with the name of each of the next predicted process steps to obtain multiple groups of first step combinations; Obtain a first quantity of the first step combination in historical data; Acquire a second quantity of a second step combination including the name of the current process step in the historical data; A ratio of the first quantity to the second quantity of each of the first step combinations is determined as the correlation between the current process step and the next predicted process step.

5. The method according to claim 1, characterized in that The configuration interaction function includes: Get the type of interactive operation and the initial landing point position on the display interface; Get the range of the SVG element on the display interface; Determine whether the initial landing point is within the range, and whether the type of the interaction operation is consistent with the type of the interaction operation corresponding to the SVG element; If yes, then obtain multiple consecutive landing positions within a continuous time period; Generate a motion trajectory according to the plurality of continuous landing point positions; If the motion trajectory is within the operating range of the SVG element, triggering an interactive function; Otherwise, the interaction function is not triggered.

6. An industrial process drawing device, applied to the industrial process drawing method according to any one of claims 1 to 5, characterized in that: include: Create a module for creating an HTML file, and introduce the Vue.js library in the HTML file; A current process step determination module is used to determine the first process step as the current process step according to the sequence of the industrial process; The first execution module is used to draw the SVG element corresponding to the current process step on the SVG canvas and set the corresponding attributes; A management module, used to manage the basic data of the current process step using the instructions in the Vue.js library, bind the dynamic data of the current process step to the corresponding SVG element, and configure interactive functions; A recommendation module, used to determine the next predicted process step or predicted connection relationship connected to the current process step according to historical data, and generate recommendation information according to a configuration template corresponding to the next predicted process step or predicted connection relationship; A second execution module is used for, if the recommended information is selected, drawing the SVG element corresponding to the next predicted process step or predicted connection relationship contained in the recommended information on the SVG canvas, inserting the corresponding configuration template, modifying the configuration template, completing the drawing of the current process step or connection relationship, and executing the current process step update module until all process steps in the industrial process are drawn and the industrial process diagram is completed; A third execution module is used for executing the current process step update module if the recommended information is not selected, and repeating the steps of the first execution module, the management module and the recommendation module until all process steps in the industrial process are drawn and the industrial process diagram is completed; A current process step updating module, used for determining the next predicted process step as a new current process step; The management module is specifically used for: Apply the step instructions in the Vue.js library to determine the order of the current process steps; Apply the connection instruction in the Vue.js library to connect the SVG element corresponding to the current process step with the SVG element corresponding to the previous process step; Apply the binding instructions in the Vue.js library to bind the dynamic data of the current process step to the corresponding SVG element; Apply the event handling mechanism in the Vue.js library to configure interactive functions for the SVG elements corresponding to the current process step; The recommendation module is specifically used for: Obtain basic data and dynamic data of the current process steps; Determine the name and industrial type of the current process step according to the basic data and the dynamic data; Filtering the first data related to the industrial type in the historical data; Determine whether there is second data corresponding to the name of the current process step in the first data; If so, determining the process step in the first data connected to the second data as the next predicted process step, and determining the connection relationship connected to the second data as the predicted connection relationship; If not, performing similarity analysis on the name of the current process step to determine a plurality of similar process steps whose similarities are greater than a preset value; The process step connected to the second data corresponding to the similar process step is determined as the next predicted process step, and the connection relationship connected to the second data is determined as the predicted connection relationship.

7. An electronic device, characterized in that: include: at least one processor; Memory; At least one computer program, wherein the at least one computer program is stored in the memory and configured to be executed by the at least one processor, the at least one computer program being configured to: execute the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 5.