Method and system for generating flow charts in batches

Through the batch generation flowchart system, analyzing, grouping, prioritizing and matching third-party flowchart screenshots and user templates, the problems of low efficiency and error-prone flowchart generation in the existing technology are solved, and more efficient and accurate flowchart generation is achieved.

CN119919529APending Publication Date: 2025-05-02SUPCON TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411981397.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Existing industrial flow charts are difficult to export or convert directly into formats available to other systems, resulting in users needing to repaint manually, which is inefficient and error-prone.

Method used

Provides a batch generation flowchart method and system. Through the Web backend service module, the flowchart analysis service module and the flowchart generation service module, the user-side module sends the third-party flowchart screenshots and the original user template to the Web backend service module. After analysis, grouping, prioritization and matching, the target flowchart is finally generated.

Benefits of technology

The accuracy and generation efficiency of the flow chart are improved, making the generated flow chart more in line with the actual use of the user, and the standardization of flow chart drawing is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919529A_ABST
    Figure CN119919529A_ABST
Patent Text Reader

Abstract

The invention provides a method and system for generating flow charts in batches, and relates to the technical field of flow chart generation, and the method comprises the steps that a user side module sends a third-party flow chart screenshot and an original user template to a Web back-end service module; the flow chart analysis service module receives the third-party flow chart screenshot forwarded by the Web back-end service module, and analyzes the third-party flow chart screenshot to obtain an analysis result; the Web back-end service module groups the analysis primitives according to the primitive types to obtain a plurality of primitive groups, and performs priority ranking on the primitive groups through a preset rule to obtain primitive type priorities; and the flow chart generation service module obtains target user template configuration data through the original user template, and sequentially matches the primitive groups and the target user template configuration data according to primitive type priorities to obtain a target flow chart. According to the method, the flow chart accuracy and the generation efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flow chart generation, and in particular to a method and system for batch generating flow charts. Background Art

[0002] Industrial flow chart is a graphical tool used to describe the various steps in the industrial production process and their interrelationships. It helps engineers and technicians understand the entire process through equipment symbols, text and lines. However, industrial flow charts cannot usually be directly exported or converted into formats that can be used by other systems. As a result, in practical applications, users often need to manually redraw the flow chart. Figure 1 It is usually made manually based on screenshots. For some industrial flow charts with complex structures and functions, not only is the flow chart generation efficiency low but it is also prone to errors. Summary of the invention

[0003] The problem solved by the present invention is how to improve the accuracy and generation efficiency of the flow chart.

[0004] In order to solve the above problems, the present invention provides a method and system for batch generating flow charts.

[0005] In a first aspect, the present invention provides a method for batch generating flowcharts, based on a batch generating flowchart system, the batch generating flowchart system includes a Web backend service module, a flowchart parsing service module and a flowchart generating service module; the batch generating flowchart method includes:

[0006] The user-side module sends the third-party flowchart screenshot and the original user template to the Web back-end service module, wherein the original user template includes a plurality of template elements;

[0007] The flowchart parsing service module receives the third-party flowchart screenshot forwarded by the Web back-end service module, parses the third-party flowchart screenshot to obtain a parsing result, and sends the parsing result to the Web back-end service module, wherein the parsing result includes a plurality of parsing graph elements;

[0008] The Web backend service module groups the parsed primitives according to primitive types to obtain a plurality of primitive groups, prioritizes the primitive groups according to preset rules to obtain primitive type priorities, and sends the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module;

[0009] The flowchart generation service module obtains target user template configuration data through the original user template, and sequentially matches the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.

[0010] Optionally, obtaining target user template configuration data through the original user template includes:

[0011] When the original user template includes original user template configuration data, using the original user template configuration data as the target user template configuration data;

[0012] When the original user template does not include the original user template configuration data, the original user template is input into a pre-trained matching model to obtain the target user template configuration data.

[0013] Optionally, the target user template configuration data includes a template mapping relationship and a scaling type, and the step of inputting the original user template into a pre-trained matching model to obtain the target user template configuration data includes:

[0014] The original user template is input into the pre-trained matching model to obtain the template mapping relationship and the scaling type.

[0015] Optionally, the pre-trained matching model construction method includes:

[0016] Acquire a historical training data set, wherein the historical training data set includes a historical user template and a corresponding historical template mapping relationship and a historical scaling type;

[0017] An initial neural network model is trained according to the historical training data set to obtain the pre-trained matching model.

[0018] Optionally, the step of sequentially matching the graphic element groups and the target user template configuration data according to the graphic element type priorities to obtain a target flow chart includes:

[0019] Get a personalized configuration template;

[0020] Based on a subsequent offset automatic configuration algorithm and a template orientation automatic configuration algorithm, the adjusted target user template configuration data is obtained through the graphic element grouping and the target user template configuration data;

[0021] sequentially matching the graphic element grouping and the adjusted target user template configuration data according to the graphic element type priority to obtain matching data;

[0022] The target flow chart is obtained through the matching data and the personalized configuration template.

[0023] Optionally, the step of obtaining the adjusted target user template configuration data through the graphic element grouping and the target user template configuration data includes:

[0024] Obtaining primitive connection information according to all the primitive groups, wherein the primitive connection information includes line connection information and line connection intersection information of each primitive group;

[0025] Obtaining template line connection intersection information according to the target user template configuration data;

[0026] Obtaining the offset and direction of the graphic element by matching the graphic element connection information with the template line connection intersection information;

[0027] The target user template configuration data is adjusted according to the graphic element offset and the graphic element direction to obtain the adjusted target user template configuration data.

[0028] Optionally, obtaining a personalized configuration template includes:

[0029] Get the default template of the flowchart;

[0030] Applying the user flowchart personalized configuration to the flowchart default template obtains the personalized configuration template.

[0031] Optionally, parsing the third-party flowchart screenshot to obtain a parsing result includes:

[0032] The third-party flowchart screenshot is parsed through Yolo target detection, PaddleOCR text detection, and LSD line segment detection to obtain multiple parsed graphics elements.

[0033] Optionally, it also includes: the user-side module obtains a user identity authentication result through a user name and password, determines the user identity information based on the user identity authentication result to obtain a personal creation project, and receives an input file through the personal creation project to obtain the third-party flowchart screenshot and the original user template.

[0034] In a second aspect, the present invention provides a batch generation flowchart system, which implements the batch generation flowchart method as described in the first aspect, wherein the batch generation flowchart system includes a user-side module, a Web backend service module, a flowchart parsing service module, and a flowchart generation service module;

[0035] The user-side module is used to send the third-party flowchart screenshot and the original user template to the Web back-end service module, wherein the original user template includes a plurality of template elements;

[0036] The flowchart parsing service module is used to receive the third-party flowchart screenshot forwarded by the Web back-end service module, parse the third-party flowchart screenshot to obtain a parsing result, and send the parsing result to the Web back-end service module, wherein the parsing result includes a plurality of parsing primitives;

[0037] The Web backend service module is used to group the parsed primitives according to primitive types to obtain multiple primitive groups, prioritize the primitive groups according to preset rules to obtain primitive type priorities, and send the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module;

[0038] The flowchart generation service module is used to obtain target user template configuration data through the original user template, and to sequentially match the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.

[0039] The beneficial effect of batch generation of flowcharts of the present invention is that the user-side module sends the third-party flowchart screenshots and the original user template to the Web back-end service module, so that the generated flowchart is more in line with the actual user usage. The flowchart parsing service module parses the third-party flowchart screenshots to obtain parsing results. Through parsing and image parsing, information can be quickly extracted from the third-party flowchart screenshots. The Web back-end service module groups the parsed graphics according to the graphics type and sorts them according to priority, processes the obtained parsing results, facilitates subsequent flowchart generation, and realizes the standardization of flowchart drawing. The flowchart generation service module obtains the target user template configuration data through the original user template, selects the graphics that are more in line with the user's habits, and matches the graphics grouping and the target user template configuration data in sequence according to the graphics type priority to obtain the target flowchart, thereby improving the accuracy and generation efficiency of the flowchart. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a process flow of a method for batch generating process flow charts according to an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of a personalized configuration of a user flow chart according to an embodiment of the present invention;

[0042] Figure 3 The present invention is a schematic diagram of a system for batch generating flowcharts according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.

[0044] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0045] The term "including" and its variations used in this document are open inclusions, that is, "including but not limited to"; the term "based on" means "based at least in part on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". The relevant definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc. mentioned in the present invention are only used to distinguish different systems, modules or units, and are not used to limit the order or interdependence of the functions performed by these systems, modules or units.

[0046] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0047] The names of the messages or information exchanged between multiple systems in the embodiments of the present invention are only used for illustrative purposes, and are not used to limit the scope of these messages or information.

[0048] like Figure 1 As shown, a method for batch generating flowcharts provided by an embodiment of the present invention is characterized in that it is based on a batch generating flowchart system, the batch generating flowchart system includes a user end module, a Web backend service module, a flowchart parsing service module and a flowchart generating service module; the batch generating flowchart method includes:

[0049] Step 110: the user-side module sends the third-party flowchart screenshot and the original user template to the Web backend service module, wherein the original user template includes a plurality of template elements.

[0050] Specifically, the user end verifies the user name and password to ensure that the user has passed the identity authentication. After logging in, the user can create a new project, and each newly created project will be automatically assigned a unique project ID. In the template warehouse, users can upload their own original user templates and user template configuration files (multiple groups can be uploaded, and user template configuration files may not be uploaded). To enter each project, users need to upload files (third-party flowchart screenshots).

[0051] In some more specific embodiments, according to project requirements, users can personalize the flowchart on the web page (if no configuration is made, the default configuration will be used), and the user personalized configuration information includes flowchart width, height, font size, line width, line color, and font color.

[0052] Step 120, the flowchart parsing service module receives the third-party flowchart screenshot forwarded by the Web back-end service module, parses the third-party flowchart screenshot to obtain a parsing result, and sends the parsing result to the Web back-end service module, wherein the parsing result includes multiple parsing graphics.

[0053] Specifically, obtaining a screenshot of a third-party industrial flowchart (i.e., a screenshot of a third-party flowchart) is aimed at a control system in the field of industrial automation, which is used to realize the automation of various industrial production processes, including multiple engineering components. Recognize the user's uploaded image to obtain a parsing result, which includes multiple parsing primitives, which include corresponding position data and image data. The primitive types of the image data include electric valves, regulating valves, machine pumps, switch valves, text data, line data, circles, rectangles, etc.

[0054] Step 130, the Web backend service module groups the parsed primitives according to primitive types to obtain multiple primitive groups, prioritizes the primitive groups according to preset rules to obtain primitive type priorities, and sends the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module.

[0055] Specifically, multiple primitive groups are obtained by grouping, and the primitive groups are prioritized according to preset rules. Lines are generated first, and then bar graphs, data connections, and texts are generated in sequence. The reason for generating lines first is that the lines need to be at the bottom layer, and the automatic configuration of offsets and template orientations requires the data of lines. Finally, bar graphs, data connections, and texts are generated in sequence to ensure that they are not blocked by other types of primitives.

[0056] Step 140: the flowchart generation service module obtains target user template configuration data through the original user template, and sequentially matches the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.

[0057] Specifically, the Web backend service module sends a flowchart generation instruction to the flowchart generation service module via an HTTP request, which is a protocol used for communication between a client (such as a browser) and a server. The main purpose of an HTTP (Hypertext Transfer Protocol) request is to request resources or information on a server.

[0058] In this embodiment, the user-side module sends the third-party flowchart screenshot and the original user template to the Web back-end service module, so that the generated flowchart is more in line with the actual user usage. The flowchart parsing service module parses the third-party flowchart screenshot to obtain the parsing result. Through image parsing, information can be quickly extracted from the third-party flowchart screenshot. The Web back-end service module groups the parsed graphics according to the graphics type and sorts them according to priority, and processes the obtained parsing results to facilitate subsequent flowchart generation and realize the standardization of flowchart drawing. The flowchart generation service module obtains the target user template configuration data through the original user template, selects the graphics that are more in line with the user's habits, and matches the graphics grouping and the target user template configuration data in sequence according to the graphics type priority to obtain the target flowchart, thereby improving the accuracy and generation efficiency of the flowchart.

[0059] Optionally, obtaining target user template configuration data through the original user template includes:

[0060] When the original user template includes original user template configuration data, using the original user template configuration data as the target user template configuration data;

[0061] When the original user template does not include the original user template configuration data, the original user template is input into a pre-trained matching model to obtain the target user template configuration data.

[0062] Specifically, the original user template is a reusable component drawn in the monitoring software, which generally contains multiple template elements, and each template element has a corresponding element type. The element type is for example: Valve: A valve is a device used to control the flow of fluid in a pipeline, which can adjust the flow rate, open or close the fluid channel. Depending on the application, there are many types of valves, such as ball valves, butterfly valves, stop valves, etc. Pump: A pump is a mechanical device used to lift, transport liquids or pressurize gases through mechanical action. Pumps play a vital role in industries such as water treatment, chemical industry, and oil and gas. Exchanger: A heat exchanger is a device for heat exchange between two or more fluids. Common types include plate heat exchangers, shell and tube heat exchangers, etc., which are widely used in HVAC, refrigeration, chemical industry and other fields. Tank: A tank is a container used to store liquids, gases or other materials. It can be a simple storage facility or equipped with functional components such as agitators and heating elements. Vessel: Such as reactors, separators, etc., used in chemical reactions, material separation and other processes. Storage: Storage tanks are where materials are stored, which may involve materials in the form of solids, liquids, gases, etc. This is not limited to physical tanks or warehouses, but also includes logistics management and inventory control systems.

[0063] In some more specific embodiments, first, based on the file server address and the original user template, the original user template is a URL format file. URL (Uniform Resource Locator) is an address used to identify a resource on the Internet. It is a standardized way to access web pages, files or other resources on the Internet. URL is the address of a web resource on the Web, which provides a way to access a specified web page. Determine whether the original user template contains the corresponding original user template configuration file. If so, use the original user template configuration file. If not, match the recognition template name with the user template file in the user template one by one according to the pre-trained matching model, wherein some recognition categories are fixed by the system and are not matched, such as text, lines, rectangles, ellipses and other basic graphics.

[0064] In this optional embodiment, by judging whether the original user template includes the original user template configuration data, if the original user template already includes complete configuration data, then these data are directly used, if not, then the configuration data is automatically generated through the pre-trained matching model. This makes the system more flexible and intelligent, and can automatically adjust the processing method according to the actual situation.

[0065] Optionally, the target user template configuration data includes a template mapping relationship and a scaling type, and the step of inputting the original user template into a pre-trained matching model to obtain the target user template configuration data includes:

[0066] The original user template is input into the pre-trained matching model to obtain the template mapping relationship and the scaling type.

[0067] Specifically, before generating the flowchart, the user needs to select a set of user templates (optionally, a set of user templates must include the original user template file, but the corresponding user template configuration file may not be included). The target user template configuration data can be an Excel file, which includes the template mapping relationship and the scaling type, wherein the template mapping relationship is the identification template name and the project template name in the table, and most user templates do not need to be scaled. The template mapping relationship is used to represent the corresponding relationship between the identification template name and the project template name, and also includes a plurality of corresponding template primitives.

[0068] In some more specific embodiments, the primitive type matched with the user template will obtain its corresponding scaling type in the matching model according to its primitive type. For example, data links, valves (including solenoid valves, butterfly valves, stop valves, etc.), and pumps do not need to be scaled and their sizes remain consistent with the user template. Other user templates (such as towers, heat exchangers, storage tanks, reactors, etc.) need to be scaled proportionally.

[0069] In this optional embodiment, the template mapping relationship and scaling type are obtained according to the pre-trained matching model, and the graphic element offset and graphic element direction are further obtained based on the subsequent offset automatic configuration algorithm and template orientation automatic configuration algorithm. This can accurately layout and configure application scenarios, ensuring that all outputs follow the same rules and standards, thereby improving the consistency and professionalism of the final product.

[0070] Optionally, the pre-trained matching model construction method includes:

[0071] Acquire a historical training data set, wherein the historical training data set includes a historical user template and a corresponding historical template mapping relationship and a historical scaling type;

[0072] An initial neural network model is trained according to the historical training data set to obtain the pre-trained matching model.

[0073] Specifically, neural networks can effectively process large amounts of data and improve data processing efficiency. The sources of historical training data sets include but are not limited to flowchart input and output templates, valve templates, machine pump templates, etc. in the petrochemical industry, chemical industry, and papermaking industry. The personalized configuration of flowchart templates includes but is not limited to template name, offset position, scaling type, template orientation, border width, border color, fill color, gradient color, line width, line color, line style, arrow type, bit number, etc.

[0074] Optionally, the step of sequentially matching the graphic element groups and the target user template configuration data according to the graphic element type priorities to obtain a target flow chart includes:

[0075] Get a personalized configuration template;

[0076] Based on a subsequent offset automatic configuration algorithm and a template orientation automatic configuration algorithm, the adjusted target user template configuration data is obtained through the graphic element grouping and the target user template configuration data;

[0077] sequentially matching the graphic element grouping and the adjusted target user template configuration data according to the graphic element type priority to obtain matching data;

[0078] The target flow chart is obtained through the matching data and the personalized configuration template.

[0079] Optionally, the step of obtaining the adjusted target user template configuration data through the graphic element grouping and the target user template configuration data includes:

[0080] Obtaining primitive connection information according to all the primitive groups, wherein the primitive connection information includes line connection information and line connection intersection information of each primitive group;

[0081] Obtaining template line connection intersection information according to the target user template configuration data;

[0082] Obtaining the offset and direction of the graphic element by matching the graphic element connection information with the template line connection intersection information;

[0083] The target user template configuration data is adjusted according to the graphic element offset and the graphic element direction to obtain the adjusted target user template configuration data.

[0084] Specifically, the offset and direction are automatically calculated by matching the primitive connection information with the template line connection intersection information, wherein the primitive offset is used to indicate the position of the fine-tuning generation, and the primitive direction is used to indicate the direction of adjusting the primitive. The line connection intersection information and the template line connection intersection information are made to coincide, and the direction of the user template is adjusted so that it is correctly connected to the lines connected thereto.

[0085] Optionally, obtaining a personalized configuration template includes:

[0086] Get the default template of the flowchart;

[0087] Applying the user flowchart personalized configuration to the flowchart default template obtains the personalized configuration template.

[0088] Specifically, the primitive grouping and the target user template configuration data are matched in sequence according to the primitive type priority, and the corresponding XML data is generated in sequence. For the categories configured in the user template configuration file, its personalized configuration is applied to obtain a personalized configuration template. Among them, the default template of the flowchart is a URL format file, and the personalized configuration template is an XML format file. The PIC format file is downloaded through the URL format file, and the PIC format file is converted into an XML file through the SDFF tool. SDFF (Spatial Data File Format) is a file format for describing geographic spatial data and three-dimensional geometric data, which contains definable spatial features and attribute data and supports the description of geometric shapes such as points, lines, and surfaces. According to the specific format of SDFF, the SDFF format of the primitive data is read through the parsing function; a mapping rule for how to convert the parsed data into the XML format is created; and the XML files are generated and output in sequence according to the classification recognition results. The generated flowchart meets the industry standards and project personalized configuration, and can correctly display and execute a series of operations such as moving, deleting, combining, rotating, flipping, scaling, uncombining, pinning to the top, and pinning to the bottom.

[0089] Specifically, if there is no matching category, the Web backend service module will be fed back to the Web backend service module, and the Web backend service module will forward the user to configure. The Web backend service module will update the user template selected by the current user (update the user template configuration inside), and click the Generate button again to re-execute the task of generating a flowchart. Through the location information corresponding to the matching data, the matching data is filled into the corresponding position in the personalized configuration template to obtain the target flowchart.

[0090] In some more specific embodiments, in combination Figure 2 As shown, according to project requirements, users can personalize the user flow chart on the web page (if no changes are made, the default template configuration of the flow chart will be used). The user flow chart personalization configuration includes the width, height, font size, line width, line color, and font color of the flow chart. Personalization configuration includes: Template name: template name in the project; Offset position: offset in four directions: up, down, left, and right; Scaling type: no scaling, proportional scaling, etc.; Template orientation: up, down, left, and right; Border width: pixel value, and whether to use the identification value; Border color: RGBA value, and whether to use the identification value; Fill color: RGBA value, and whether to use the identification value; Gradient color: RGBA value, and whether to use the identification value; Line width: pixel value, and whether to use the identification value; Line color: RGBA value, and whether to use the identification value; Line style: dotted line, solid line, etc., and whether to use the identification value; Arrow type: arrow type, and whether to use the identification value; Position number: the identified position number.

[0091] In some more specific embodiments, the border width, border color, fill color, gradient color, line width, line color, line style, and arrow color are not used by the recognition result by default but are consistent with the user template.

[0092] Optionally, parsing the third-party flowchart screenshot to obtain a parsing result includes:

[0093] The third-party flowchart screenshot is parsed through Yolo target detection, PaddleOCR text detection, and LSD line segment detection to obtain multiple parsed graphics elements.

[0094] Specifically, the screenshot of the third-party flowchart is preprocessed to generate a first processed image after preliminary processing, and the image contrast is increased through histogram equalization or adaptive histogram equalization (CLAHE) to make the dark and bright details more clearly visible. A filter (such as Gaussian filtering, bilateral filtering, etc.) is used to reduce random noise in the image, thereby improving the image quality.

[0095] Optionally, it also includes: the user-side module obtains the user identity authentication result through the user name and password to determine the user identity information to obtain a personal creation project, and receives the input file through the personal creation project to obtain the third-party flowchart screenshot and the original user template.

[0096] Specifically, the user end verifies the username and password to ensure that the user has passed the identity authentication. After logging in, the user can create a new project, and each newly created project will be automatically assigned a unique project ID. In the template warehouse, users can upload their own packaged user templates and user template configuration files (multiple groups can be uploaded, and user template configuration files may not be uploaded). To enter each project, the user needs to upload a file (third-party flowchart screenshot). According to project requirements, the user can personalize the flowchart on the web page (if not configured, the default configuration will be used). The user's personalized configuration information includes flowchart width, height, font size, line width, line color, and font color.

[0097] In some more specific embodiments, the user selects the image and clicks the parse flowchart button. After receiving the request to parse the flowchart, the Web backend service module will forward the request to the flowchart parsing service module. The flowchart parsing service will identify the devices (including valves, pumps, datalinks (data connections), heat exchangers, towers, etc.), graphics (including rectangles, ellipses, lines, etc.), text, etc. in the screenshot through algorithms such as Yolo target detection (identifying devices, graphics, and pre-labeling training samples for training parsing models), PaddleOCR text detection (recognizing text), and LSD (Line Segment Detector) line segment detection (recognizing line segments), and feedback the results to the Web backend service module. The Web backend service module forwards the parsing results to the user-end module for display. For third-party flowchart screenshots that failed to parse, the user can choose to re-parse, and the parsing process is the same as above. For third-party flowchart screenshots that successfully parse, the user clicks the Generate button to generate the flowchart. After receiving the flowchart generation request, the Web backend service module forwards the request to the flowchart generation service module. The flowchart generation service will perform subsequent flowchart generation tasks after receiving the flowchart generation instruction.

[0098] In this optional embodiment, the third-party flowchart screenshot is parsed through Yolo target detection, PaddleOCR text detection, and LSD line segment detection to achieve high-precision recognition. Yolo can quickly and accurately identify and locate different objects in the image, and is very effective for detecting various shapes (such as rectangles, circles, etc.) in flowcharts. PaddleOCR focuses on text recognition and can accurately extract text information in flowcharts, which is crucial for understanding the content of flowcharts. LSD is good at detecting straight line segments, which helps to capture connecting lines and boundaries in flowcharts and ensure that the graphic structure is correctly parsed. For screenshots of different formats and complexities, this method can maintain a high recognition rate and accuracy.

[0099] like Figure 3 As shown, a batch generation flowchart system provided by an embodiment of the present invention includes a user-side module, a Web back-end service module, a flowchart parsing service module and a flowchart generation service module;

[0100] The user-side module is used to send the third-party flowchart screenshot and the original user template to the Web back-end service module, wherein the original user template includes a plurality of template elements;

[0101] The flowchart parsing service module is used to receive the third-party flowchart screenshot forwarded by the Web back-end service module, parse the third-party flowchart screenshot to obtain a parsing result, and send the parsing result to the Web back-end service module, wherein the parsing result includes a plurality of parsing primitives;

[0102] The Web backend service module is used to group the parsed primitives according to primitive types to obtain multiple primitive groups, prioritize the primitive groups according to preset rules to obtain primitive type priorities, and send the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module;

[0103] The flowchart generation service module is used to obtain target user template configuration data through the original user template, and to sequentially match the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.

[0104] The batch generation flowchart system of this embodiment is used to implement the batch generation flowchart method as described above. Its advantages over the prior art are the same as the advantages of the batch generation flowchart method as described above over the prior art, and will not be repeated here.

[0105] Although the present invention is disclosed as above, the protection scope of the present invention is not limited thereto. Those skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention, and these changes and modifications will fall within the protection scope of the present invention.

Claims

1. A method for batch generating flow charts, characterized in that: Based on a batch generation flowchart system, the batch generation flowchart system includes a user end module, a Web backend service module, a flowchart parsing service module and a flowchart generation service module; the batch generation flowchart method includes: The user-side module sends the third-party flowchart screenshot and the original user template to the Web back-end service module, wherein the original user template includes a plurality of template elements; The flowchart parsing service module receives the third-party flowchart screenshot forwarded by the Web back-end service module, parses the third-party flowchart screenshot to obtain a parsing result, and sends the parsing result to the Web back-end service module, wherein the parsing result includes a plurality of parsing graph elements; The Web backend service module groups the parsed primitives according to primitive types to obtain a plurality of primitive groups, prioritizes the primitive groups according to preset rules to obtain primitive type priorities, and sends the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module; The flowchart generation service module obtains target user template configuration data through the original user template, and sequentially matches the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.

2. The method for batch generating flowcharts according to claim 1, characterized in that: The step of obtaining target user template configuration data through the original user template includes: When the original user template includes original user template configuration data, using the original user template configuration data as the target user template configuration data; When the original user template does not include the original user template configuration data, the original user template is input into a pre-trained matching model to obtain the target user template configuration data.

3. The method for batch generating flowcharts according to claim 2, characterized in that: The target user template configuration data includes a template mapping relationship and a scaling type, and the inputting the original user template into a pre-trained matching model to obtain the target user template configuration data includes: The original user template is input into the pre-trained matching model to obtain the template mapping relationship and the scaling type.

4. The method for batch generating flowcharts according to claim 3, characterized in that: The pre-training matching model construction method comprises: Acquire a historical training data set, wherein the historical training data set includes a historical user template and a corresponding historical template mapping relationship and a historical scaling type; An initial neural network model is trained according to the historical training data set to obtain the pre-trained matching model.

5. The method for batch generating flowcharts according to claim 1, characterized in that: The step of sequentially matching the graphic element groups and the target user template configuration data according to the graphic element type priorities to obtain a target flow chart includes: Get a personalized configuration template; Based on a subsequent offset automatic configuration algorithm and a template orientation automatic configuration algorithm, the adjusted target user template configuration data is obtained through the graphic element grouping and the target user template configuration data; sequentially matching the graphic element grouping and the adjusted target user template configuration data according to the graphic element type priority to obtain matching data; The target flow chart is obtained through the matching data and the personalized configuration template.

6. The method for batch generating flowcharts according to claim 5, characterized in that: The adjusted target user template configuration data is obtained through the graphic element grouping and the target user template configuration data, including: Obtaining primitive connection information according to all the primitive groups, wherein the primitive connection information includes line connection information and line connection intersection information of each primitive group; Obtaining template line connection intersection information according to the target user template configuration data; Obtaining the offset and direction of the graphic element by matching the graphic element connection information with the template line connection intersection information; The target user template configuration data is adjusted according to the graphic element offset and the graphic element direction to obtain the adjusted target user template configuration data.

7. The method for batch generating flowcharts according to claim 6, characterized in that: The step of obtaining a personalized configuration template includes: Get the default template of the flowchart; Applying the user flowchart personalized configuration to the flowchart default template obtains the personalized configuration template.

8. The method for batch generating flowcharts according to claim 1, characterized in that: The analyzing the third-party flowchart screenshot to obtain the analysis result includes: The third-party flowchart screenshot is parsed through Yolo target detection, PaddleOCR text detection, and LSD line segment detection to obtain multiple parsed graphics elements.

9. The method for batch generating flowcharts according to claim 1, characterized in that: Also includes: The user-side module obtains a user identity authentication result through a user name and password, determines user identity information based on the user identity authentication result to obtain a personal creation project, and receives an input file through the personal creation project to obtain the third-party flowchart screenshot and the original user template.

10. A system for batch generating flowcharts, characterized in that: Implementing the method for batch generating flowcharts as described in any one of claims 1 to 7, the batch generating flowchart system comprises a user end module, a Web backend service module, a flowchart parsing service module and a flowchart generating service module; The user-side module is used to send the third-party flowchart screenshot and the original user template to the Web back-end service module, wherein the original user template includes a plurality of template elements; The flowchart parsing service module is used to receive the third-party flowchart screenshot forwarded by the Web back-end service module, parse the third-party flowchart screenshot to obtain a parsing result, and send the parsing result to the Web back-end service module, wherein the parsing result includes a plurality of parsing primitives; The Web backend service module is used to group the parsed primitives according to primitive types to obtain multiple primitive groups, prioritize the primitive groups according to preset rules to obtain primitive type priorities, and send the original user template, all the primitive groups and the primitive type priorities to the flowchart generation service module; The flowchart generation service module is used to obtain target user template configuration data through the original user template, and to sequentially match the primitive grouping and the target user template configuration data according to the primitive type priority to obtain a target flowchart.