Flow chart random generation method, system and device and storage medium

By constructing and randomizing the polygonal shape and introducing 3D elements, the problem of low -quality, diversity, and professional labeling of high -quality, diversity and professional labeling of the traditional flow chart is solved.

CN119379865APending Publication Date: 2025-01-28UESTC (SHENZHEN) ADVANCED RES INST

Patent Information

Application Number
CN202411960520.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently generate flow charts of a large number of different styles and contents, and the traditional methods are inefficient and have a single style, so they cannot support complex annotations and 3D elements.

Method used

By determining a set of random points to build polygon shapes, randomly treat it, introduce 3D elements and projected it into 2D elements, and customize the element appearance. Make sure that elements will not overlap and generate pixel -level instances.

Benefits of technology

A process chart with a large number of large quantities, a variety of types, and carrying accurate pixel -level marks has improved the quality and applicability of the flowchart, and supports user custom and advanced characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379865A_ABST
    Figure CN119379865A_ABST
Patent Text Reader

Abstract

The invention discloses a flow chart random generation method, system and device and a storage medium, which can construct a polygon shape according to a group of random points and perform randomization processing on the polygon shape, and can also introduce 3D elements and project the 3D elements to a 2D space to enhance a visual effect. More importantly, the method ensures that the elements in the generated flow chart are not overlapped through a series of steps, and pixel-level instance labels related to the elements, connections and characters can be automatically generated, so that the quality and applicability of the flow chart are greatly improved. Meanwhile, the system also supports the user to import self-defined elements, connection styles and background templates, and allows personalized adjustment, so that the finally output flow chart not only meets the special requirements of the user, but also can ensure good visual presentation and professional annotation information. The method effectively solves the problems of low efficiency, single style and insufficient technical detail support in the traditional flow chart generation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a method, system, device and storage medium for randomly generating a flow chart. Background Art

[0002] In modern document and presentation production, flowcharts are widely used as an important visual expression tool to explain processes, algorithms or system structures. The traditional way of creating flowcharts usually relies on the designer's experience and creativity, and is manually drawn using graphic editing software such as Microsoft Visio or Adobe Illustrator. However, this method is inefficient and time-consuming, especially when a large number of flowcharts with different styles and contents need to be generated. The traditional method is difficult to meet the needs of rapid iteration and personalized customization.

[0003] The existing flowchart data set research work has two main sources of flowchart data: Obtaining from real data: Real data such as papers and patents usually contain flowcharts, especially in papers, where more complex and creative flowchart data can be obtained. However, the overall amount of publicly available data is limited, and due to the limited amount of data, the diversity and generalization of model training are greatly reduced. In addition, they do not carry pixel-level annotations, and even general text annotations are very vague, which is very unfavorable for training related models.

[0004] Generate using a multimodal large model: A multimodal large model can generate corresponding flowcharts based on text. Related research uses a large model to first generate a large number of flowchart text descriptions, and then generates the corresponding flowcharts to solve the corresponding quantity and labeling problems. However, this method is severely restricted by the diversity problem of large model generation, and still leads to the lack of generalization ability of the model for diversity. In addition, the labels corresponding to this method are not only general text descriptions, but also pixel-level annotations. They are also severely restricted by the generation accuracy of the large model, resulting in the text not being able to be fully aligned with the generated flowchart objectively, affecting the accuracy of the model after training.

[0005] In addition, although some existing automated flowchart generation tools can improve work efficiency, most of them use predefined templates and fixed styles to generate charts, resulting in a lack of diversity in the generated flowcharts and insufficient support for complex annotations. These tools often cannot adapt well to users' customized needs for specific application scenarios, such as precise pixel-level annotations required in the field of scientific research, and advanced features such as support for 3D elements. Therefore, how to efficiently generate flowcharts that are both highly random and diverse, while maintaining professional standards in details (such as support for 3D elements and precise pixel-level instance annotations) is an urgent problem to be solved. Summary of the invention

[0006] The purpose of the present invention is to provide a method, system, device and storage medium for randomly generating flowcharts, which can create a large number of flowcharts of various types with precise pixel-level annotations to solve the problems raised in the above-mentioned background technology.

[0007] To achieve the above object, the present invention provides a method for randomly generating a flow chart, comprising the following steps: Create polygonal shapes by determining a set of random points and connecting them in sequence, randomizing the background and edge lines of the polygons, and creating 3D elements and projecting them as 2D elements to customize the appearance of the elements; Based on the customized element appearance, the elements are placed in the flowchart without overlapping. Meanwhile, corresponding pixel-level instance annotations are generated according to the shape and position of the elements.

[0008] Preferably, it also includes: customizing the connection appearance, establishing a connection between any two placed elements, the connection mode is one or more of unidirectional, bidirectional or non-directional, and one or more of straight lines, broken lines or curves are used for connection.

[0009] Preferably, it also includes: placing connections, laying out the connections in the flow chart based on the designed connection appearance, ensuring that the connections do not overlap with the elements themselves, and randomly determining whether the connections should be staggered or merged, and recording the instance-level annotations of the connections and their relationship information with the elements.

[0010] Preferably, it also includes: text appearance customization, creating text containing various contents for the formed flowchart content, and performing a large number of random customizations on its appearance, covering everything from font selection, color matching to adding shadow effects, and text content and appearance customization are all achieved through LaTeX.

[0011] Preferably, it also includes: text placement, calculating and determining the best placement position of the text based on the determined text content and appearance, so that it can be decorated on the element, connection or the entire chart, and recording the instance-level annotation after the text is placed and its relationship with the elements and connection objects.

[0012] Preferably, it also includes: background customization, by randomly generating RGB pixels or using external source pictures to build complex and changeable backgrounds.

[0013] On the other hand, the present invention provides a flowchart random generation system, comprising: The element and connection customization module is used to customize the appearance of elements and connections; the placement module is used to place elements, connections, and text in the flowchart; the text processing module is used to customize the appearance of text; the background generation module is used to customize the background. The annotation generation module is used to generate pixel-level instance annotations related to elements, connections, and text.

[0014] On the other hand, the present invention proposes a flowchart random generation device, which includes a processor, a memory, and a flowchart random generation program stored in the memory and executable by the processor, wherein when the flowchart random generation program is executed by the processor, the steps of the flowchart random generation method as described above are implemented.

[0015] On the other hand, the present invention proposes a computer-readable storage medium, on which a flowchart random generation program is stored, wherein when the flowchart random generation program is executed by a processor, the steps of the flowchart random generation method described above are implemented.

[0016] Technical effects and advantages of the present invention: Compared with the prior art, the present invention provides a random flow chart generation method, system, device and storage medium, which have the following advantages: The present invention can construct polygonal shapes based on a set of random points and perform random processing on them. It can also introduce 3D elements and project them into 2D space to enhance the visual effect. More importantly, the method ensures that the elements in the generated flowchart do not overlap through a series of steps, and can automatically generate pixel-level instance annotations related to elements, connections and text, thereby greatly improving the quality and applicability of the flowchart. At the same time, the system also supports users to import customized elements, connection styles and background templates, allowing personalized adjustments, so that the final output flowchart not only meets the user's special requirements, but also ensures good visual presentation and professional annotation information. This method effectively solves the problems of low efficiency, single style and insufficient support for technical details in the traditional flowchart generation process. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of a method for randomly generating a flowchart of the present invention; Figure 2 A block diagram of a random flow chart generation system of the present invention; Figure 3 The figure is a schematic diagram of the structure of a terminal device of the present invention. DETAILED DESCRIPTION

[0018] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0019] The present invention provides a random generation method for a flow chart, which can construct a polygonal shape according to a group of random points and perform random processing on it, and can also introduce 3D elements and project them into a 2D space to enhance the visual effect.

[0020] More importantly, this method ensures that the elements in the generated flowchart do not overlap through a series of steps, and can automatically generate pixel-level instance annotations related to elements, connections and text, thereby greatly improving the quality and applicability of the flowchart.

[0021] At the same time, the system also supports users to import customized elements, connection styles and background templates, allowing personalized adjustments, so that the final output flowchart not only meets the user's special requirements, but also ensures good visual presentation and professional annotation information. This method effectively solves the problems of low efficiency, single style and insufficient support for technical details in the traditional flowchart generation process. The details are as follows: like Figure 1 As shown, a flowchart random generation method in this embodiment includes the following steps: Create polygonal shapes by determining a set of random points and connecting them in sequence, randomizing the background and edge lines of the polygons, and creating 3D elements and projecting them as 2D elements to customize the appearance of the elements; Specifically, elements constitute the core components of flowcharts and are the key factor that gives flowcharts their diversity. These elements include various polygons, 3D objects (such as point clouds, meshes, etc.), 2D or 3D charts, and any non-line or non-text entities that can be embedded in flowcharts. In order to maximize the diversity and complexity of the generated data, and thus enhance the generalization ability of the model after training, the elements undergo extensive randomized custom appearance design before being embedded in the flowchart.

[0022] The present invention relates to a process of generating polygons, specifically, it determines a set of random points and connects these points in sequence to construct infinite and diverse polygonal shapes. In order to prevent the polygon from self-intersecting, a center point of the polygon can be randomly determined first, and then multiple random points are determined by random radius and angle.

[0023] At the same time, the present invention also randomizes the background and edge lines of the polygon, which includes using multiple colors, random patterns, and even importing pictures and patterns from external sources (such as the Internet) to fill the polygon.

[0024] In the process of introducing 3D elements, random point clouds and meshes can be created by randomly generating 3D coordinates. In addition, the present invention also has the function of directly importing external 3D models. Before the 3D elements are placed, they are projected as 2D elements. The construction, rendering and post-processing (such as projection) of these 3D elements can be implemented in matplotlib and 3D engines such as Unity and Unreal.

[0025] Based on the customized element appearance, the elements are placed in the flowchart without overlapping. Meanwhile, corresponding pixel-level instance annotations are generated according to the shape and position of the elements.

[0026] Specifically, after carefully customizing the appearance of the elements, the next step is to embed them appropriately into the flowchart. In this process, the present invention will fully consider the position and angle of the elements. When faced with the placement of multiple elements, it is necessary to ensure that there is no overlap between them. This requires that the complex appearance that the elements may produce should be considered in advance during the appearance customization stage. Specifically, after placing an element, the present invention uses a Boolean matrix (initialized to 0) that is consistent with the size of the flowchart to record it. When the next element needs to be placed, it will be compared with it (that is, the position occupied by the element is 1). If no overlap is detected (that is, logical AND operation, the two do not have the same 1 position; or the position added position by position does not exceed 1), it will be placed directly (after placement, the matrix is ​​updated using the previous detection results; otherwise, the position will be readjusted. In addition, the corresponding pixel-level instance annotation will be generated according to the shape and position of the element. The annotation is also composed of a matrix, and numbers are filled in the corresponding positions according to the placement order of the elements.

[0027] The connection appearance is customized, and a connection is established between any two placed elements. The connection method can be one or more of unidirectional, bidirectional or non-directional, and one or more of straight lines, broken lines or curves can be used for connection.

[0028] Specifically, in a flow chart, the lines between elements are an indispensable part of its core. According to the present invention, a connection can be established between any two elements, or it can be selected not to establish a connection. These connections may be unidirectional, bidirectional, or even directionless, which are closely related to the diversity of the flow chart. In addition, the arrow style indicating the direction is also an important element constituting this diversity. The present invention can utilize the built-in arrows of software or libraries such as matplotlib or visio to implement diversified implementations.

[0029] At the same time, in order to further enhance diversity and maximize the generalization brought by the training model, in the present invention, the connection line itself can adopt a variety of styles such as straight lines, broken lines, curves, and their mixtures. These lines are connected by generating multiple random points and randomly generating arcs to create curves.

[0030] Place connections. Based on the designed connection appearance, layout the connections in the flowchart, ensure that the connections do not overlap with the elements themselves, randomly decide whether the connections should be staggered or merged, and record the instance-level annotations of the connections and their relationship information with the elements.

[0031] Specifically, when designing a flowchart, not only the appearance of the lines should be taken into consideration, but also their precise layout must be carefully considered. In the process of making a flowchart, the present invention first ensures that the lines do not overlap with the elements themselves, which is the same as the method of avoiding overlap between elements, that is, it is achieved through a Boolean matrix (continue to use the previously updated Boolean matrix, and then detect the line positions with an occupancy of 1).

[0032] In addition, the present invention can also randomly determine whether the lines should be staggered or merged. Consistent with the previous practice of annotating element instances, the instance-level annotations of the lines will also be recorded in detail. At the same time, the relationship between the lines and the elements will also be recorded, including information such as whether they are connected and the direction of the connection. This information can be recorded through a two-dimensional matrix. For example, unconnected is represented as 0, connected is represented as 1, directed and starting from the element is represented as 2, and directed and pointing to the element is represented as 3.

[0033] Customize the text appearance. For the flowchart content, create text containing various contents and make a lot of random customization on its appearance, covering everything from font selection, color matching to adding shadow effects. The text content and appearance customization are all realized through LaTeX.

[0034] Specifically, in a flowchart, in addition to the elements and the lines used to represent the connection relationship, text also plays a vital role, which describes the elements, lines and more abstract concepts in detail. In practical applications, flowcharts are often used in papers, patents and technical documents, so their text content and appearance design enjoy great flexibility.

[0035] In the process of generating a flowchart, the present invention can create text containing various contents, covering a wide range from complex mathematical symbols to formulas. Once the text content is determined, the present invention can also perform a large number of random customizations on their appearance, including but not limited to font selection, color matching, and adding shadow effects. Specifically, both text content and appearance customization can be achieved through LaTeX. The present invention can randomly generate all text, mathematical symbols and operations, fonts and styles that can be rendered in LaTeX.

[0036] Text placement, based on the determined text content and appearance, calculates and determines the best placement of text so that it can be decorated on elements, connections or the entire diagram, and records the instance-level annotations after the text is placed and its relationship with elements and connected objects.

[0037] Specifically, in the present invention, once the text content is determined, it will be applied to decorative elements, wiring, entire diagrams, or more abstract display content.

[0038] The present invention will accurately calculate and determine the best placement of text according to the purpose of text modification. For example, if the text is to modify an element, it will be placed anywhere inside the element or around the element. As before, the corresponding instance-level annotations will be recorded after the text is placed. In addition, similar to step 4, the relationship between the text and objects such as elements and connections will also be recorded.

[0039] Background customization: build complex and changeable backgrounds by randomly generating RGB pixels or using images from external sources; Specifically, this is achieved by randomly generating RGB pixels, which includes not only randomly adjusting the range of RGB values, but also the size (which is then randomly adjusted to fit the size of the flow chart by some commonly used interpolation algorithm). In addition, the present invention can also obtain images from external sources (such as the Internet).

[0040] In summary, the present invention solves the problem of lack of diverse and accurately labeled flowchart data through a simple and efficient method. The flowchart data generated by the invention can greatly fill the gap in the field of flowchart recognition, help the model to obtain a strong ability to cope with real-world flowcharts, and thus promote the development of general artificial intelligence and image recognition.

[0041] On the other hand, this embodiment also proposes a flow chart random generation system, such as Figure 2 As shown, it includes: element and connection customization module, placement module, text processing module, background generation module and annotation generation module.

[0042] Exemplarily, the element and connection customization modules are used to customize element appearance and connection appearance; Exemplarily, the placement module is used to place elements in a flow chart, place connections, and place text; Exemplarily, the text processing module is used to customize the text appearance; Exemplarily, the background generation module is used for background customization.

[0043] Exemplarily, the annotation generation module is used to generate pixel-level instance annotations related to elements, connections and text.

[0044] In addition, the element and connection customization module, placement module, text processing module, background generation module and annotation generation module are also used to implement other steps of the above-mentioned flowchart random generation method when executed, which will not be repeated here one by one.

[0045] In addition, the present invention also provides a terminal device, such as Figure 3 As shown, the flowchart random generation method involved in this embodiment is mainly applied to terminal equipment, which can be a PC, a portable computer, a mobile terminal, or other equipment with display and processing functions.

[0046] Specifically, the terminal device may include a processor (such as a CPU), a communication bus, a user interface, a network interface, and a memory. The communication bus is used to realize the connection and communication between these components; the user interface may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface); the memory may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory, and the memory may optionally be a storage device independent of the aforementioned processor.

[0047] Among them, the memory stores a readable storage medium, and the readable storage medium stores a flowchart random generation program. The processor can call the flowchart random generation program stored in the memory and execute the flowchart random generation method provided by an embodiment of the present invention.

[0048] It is understood that a readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer-readable storage media can be, for example, but 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 suitable combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), static random access memories (SRAM), portable compact disk read-only memories (CD-ROM), digital versatile disks (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or raised structures in grooves on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used here is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0049] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, 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 network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0050] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0051] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for randomly generating a flowchart, characterized in that: The following steps are involved: Create polygonal shapes by determining a set of random points and connecting them in sequence, randomizing the background and edge lines of the polygons, and creating 3D elements and projecting them as 2D elements to customize the appearance of the elements; Based on the customized element appearance, the elements are placed in the flowchart without overlapping. Meanwhile, corresponding pixel-level instance annotations are generated according to the shape and position of the elements.

2. A method for randomly generating a flowchart according to claim 1, characterized in that: Also includes: The connection appearance is customized, and a connection is established between any two placed elements. The connection method can be one or more of unidirectional, bidirectional or non-directional, and one or more of straight lines, broken lines or curves can be used for connection.

3. A method for randomly generating a flowchart according to claim 2, characterized in that: Also includes: Place connections. Based on the designed connection appearance, layout the connections in the flowchart, ensure that the connections do not overlap with the elements themselves, randomly decide whether the connections should be staggered or merged, and record the instance-level annotations of the connections and their relationship information with the elements.

4. A method for randomly generating a flowchart according to claim 3, characterized in that: Also includes: Customize the text appearance. For the flowchart content, create text containing various contents and make a lot of random customization on its appearance, covering everything from font selection, color matching to adding shadow effects. The text content and appearance customization are all realized through LaTeX.

5. A method for randomly generating a flowchart according to claim 4, characterized in that: Also includes: Text placement, based on the determined text content and appearance, calculates and determines the best placement of text so that it can be decorated on elements, connections or the entire diagram, and records the instance-level annotations after the text is placed and its relationship with elements and connected objects.

6. A method for randomly generating a flowchart according to claim 5, characterized in that: Also includes: Background customization: build complex and changeable backgrounds by randomly generating RGB pixels or using images from external sources.

7. A flowchart random generation system for executing the method according to any one of claims 1 to 6, characterized in that: include: Element and connection customization modules, used to customize element appearance and connection appearance; The placement module is used to place elements in the flow chart, place connections and place text; Text processing module, used to customize the text appearance; Background generation module, used for background customization.

8. A flowchart random generation system according to claim 7, characterized in that: Also includes: The annotation generation module is used to generate pixel-level instance annotations related to elements, connections and text.

9. A flow chart random generation device, characterized in that: The flowchart random generation device includes a processor, a memory, and a flowchart random generation program stored in the memory and executable by the processor, wherein when the flowchart random generation program is executed by the processor, the steps of the flowchart random generation method as described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a flowchart random generation program, wherein when the flowchart random generation program is executed by a processor, the steps of the flowchart random generation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Training data generation method and system

    CN112200158A

  • Natural scene text image character pixel weak supervision automatic labeling method and system and medium

    CN113673338A

  • Pixel-level target labeling method and device, electronic equipment and storage medium

    CN117975099A

  • Synthetic data set generation of chemical illustrations

    US20240321412A1

Cited By

  • Training data generation method based on flow chart, training data generation equipment and medium

    CN120745582A