An intelligent chart generation method, system and storage medium suitable for multi-modal data

By preprocessing and intent recognition of multimodal data, and combining multimodal models and language models, the standardization and optimization of graph codes are performed, solving the problem of poor results in generating professional schematic diagrams in existing technologies, and realizing efficient and flexible multimodal graph generation.

CN121117072BActive Publication Date: 2026-02-17HANGZHOU SHUOPAN INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511670328.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-02-17
Estimated Expiration
2045-11-14

AI Technical Summary

Technical Problem

Existing general-purpose text-based diagram models lack specialized optimization and processing mechanisms for structured diagrams, resulting in significantly poor performance when generating professional schematic diagrams such as flowcharts, relationship diagrams, and architecture diagrams that require precise logical structures and geometric constraints. Furthermore, existing natural language generation structured diagram tools have limited capabilities in long text parsing and incremental diagram editing, requiring users to perform extensive manual operations when modifying generated diagrams. These diagrams also suffer from limited styles, simple architectures, and lack of support for multimodal input.

Method used

By receiving and preprocessing multimodal data, identifying user intent types and routing tasks, selecting an appropriate model, constructing and generating prompts, calling optimization components to standardize and optimize graph code, and finally rendering the output, the process includes calling multimodal and language models, converting graph code formats, and preserving and optimizing node definitions and layout constraints.

Benefits of technology

It achieves accurate processing of multimodal data, improves the quality of generating professional diagrams and tables, reduces manual operations by users, supports multimodal input, and improves the efficiency and flexibility of chart generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117072B_ABST
    Figure CN121117072B_ABST
Patent Text Reader

Abstract

The application discloses a kind of intelligent chart generation method, system and storage medium suitable for multi-modal data, by receiving and pre-processing multi-modal data, complete user intent type identification and task routing;Again according to routing result, select adaptive model and build generation prompt word;The initial graph code output by model is standardized to intermediate representation format containing metadata field, and is converted into graph code compatible with target platform and retains node definition, connection relationship, layout constraint and metadata information;Through four optimization components, respectively complete chart type identification and layout strategy determination, node format size adjustment, overall layout alignment correction and partition adjustment, connection line identification optimization, and render output chart.It solves the problem that existing model is significantly poor in generating professional schematic chart requiring accurate logical structure and geometric constraint due to lack of special optimization and processing mechanism for structured chart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and graphical modeling and visualization technology, and in particular to an intelligent chart generation method, system and storage medium applicable to multimodal data. Background Technology

[0002] Currently, existing general-purpose text-to-graph (TTP) models primarily focus on meeting broad general-purpose TTP needs. They employ a unified processing approach, treating structured graphs as ordinary image data during training and processing them using the same feature extraction and generation mechanisms. For example, they apply the same embedding and encoding processes to various types of image content, such as flowcharts, relationship diagrams, and architecture diagrams, just like to other image types such as natural images and artworks. However, these general-purpose models lack specific optimization and processing mechanisms for structured graphs, resulting in significantly poor performance when generating professional schematic diagrams requiring precise logical structures and geometric constraints, such as flowcharts, relationship diagrams, and architecture diagrams. Furthermore, these existing natural language generation structured graph tools have limited capabilities in long text parsing and incremental graph editing. Users often need to perform extensive manual operations when modifying generated graphs, and they suffer from issues such as limited styles, simple architectures, and lack of support for multimodal input, thus restricting user scenarios and efficiency. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention discloses an intelligent chart generation method applicable to multimodal data, comprising the following steps:

[0004] The system receives multimodal data input from the user, preprocesses it, classifies it to identify the user's intent type, and routes tasks based on the intent identification results.

[0005] The appropriate model is selected based on the task routing results. If the input data contains image information, the multimodal model is called. If the input data is only text or structured information, the language model is called to construct and generate prompt words.

[0006] The prompt words are input into the adaptation model to obtain the first format graph code. After standardization, the code is converted into the second format graph code that is compatible with the target platform, while retaining the node definition, connection relationship, layout constraint and metadata information.

[0007] The first optimization component is invoked to identify the type of the second format diagram code and determine the appropriate layout strategy. The second optimization component is invoked to perform format size adjustment on each node of the second format diagram code. The third optimization component is invoked to perform alignment correction and partition adjustment on the second format diagram code. The fourth optimization component is invoked to perform connection mark optimization on the second format diagram code and render the optimized second format diagram code.

[0008] Preferably, the step of receiving multimodal data input by the user, preprocessing it, classifying it to identify the user intent type, and routing tasks based on the intent identification result includes:

[0009] Receive multimodal data input by the user, including natural language text, hand-drawn sketches, screenshots, scanned documents, or structured documents;

[0010] After preprocessing the received multimodal data, it is input into the intent recognition module for recognition and classification to obtain the user intent type, which includes screenshot import, chart generation, chart modification and document import.

[0011] If the intent is to import a screenshot, the input data is sent to the multimodal model processing link; if the intent is to generate a chart, the input data is sent to the chart generation module processing link; if the intent is to modify a chart, the input data is sent to the incremental editing module processing link; if the intent is to import a document, the input data is sent to the document parsing module processing link; if the intent recognition confidence is lower than a preset threshold, a clarification request is output to obtain supplementary information from the user.

[0012] Preferably, the process of constructing and generating prompt words specifically includes the following steps:

[0013] Through formula Combine and concatenate to generate prompt words, where This is a basic template that includes information about the graph type, layout, and output format. For artifact type patches that include swimlane and gateway information, To deploy space commands, It provides a knowledge base reference containing contextual information such as enterprise terminology and modeling rules; it converts the graph code results output by the model into an intermediate representation format, which describes the core information of the graph in a structured manner, including node definitions, layout rules, and metadata information; the intermediate representation format supports standardized storage for internal processing and performs bidirectional conversion with external platform graph formats through a conversion engine, including vsdx, draw.io XML, or Graph ML.

[0014] Preferably, the intelligent chart generation method specifically includes:

[0015] The first optimization component is used to jointly model the adjacency structure and semantic embedding vector of the second format graph, through a discriminant function. Identify the chart type; when the identified type is a flowchart and the confidence level is greater than the preset value, select a combination strategy of hierarchical layout and orthogonal layout as the main optimization path;

[0016] The second optimization component is used to adjust the size and layout of each node. When the text width is detected to be greater than the preset width value, the node width is automatically expanded, and the spacing between adjacent nodes is adjusted by a preset spacing loosening algorithm.

[0017] The third optimization component applies a hierarchical layout algorithm to the main area to adjust the order logic. If there is a mesh substructure, a force-guided layout algorithm is used to maintain the overall visual balance. Alignment correction and spacing standardization are performed on swimlanes or partition structures. The preset global coordination algorithm is used to obtain the best global layout modification algorithm for different types of graphs by accessing the graph rule knowledge base.

[0018] This invention also discloses an intelligent chart generation system applicable to multimodal data, comprising:

[0019] The data preprocessing module is used to receive multimodal data input by the user, preprocess it, classify it to identify the type of user intent, and route tasks based on the intent identification results.

[0020] The selection module is used to choose the appropriate model based on the task routing results. If the input data contains image information, the multimodal model is called; if the input data is only text or structured information, the language model is called to build and generate prompt words.

[0021] The format conversion module is used to take the prompt words input adaptation model to obtain the first format graph code, perform standardization processing, and then convert it into the second format graph code that is compatible with the target platform, while retaining the node definition, connection relationship, layout constraint and metadata information.

[0022] The component invocation module is used to call the first optimization component to identify the type of the second format diagram code and determine the appropriate layout strategy, call the second optimization component to perform format size adjustment on each node of the second format diagram code, call the third optimization component to perform alignment correction and partition adjustment on the second format diagram code, call the fourth optimization component to perform connection mark optimization on the second format diagram code, and render and output the optimized second format diagram code.

[0023] The present invention also discloses a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the methods described above.

[0024] The present invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above.

[0025] This invention discloses an intelligent chart generation method, system, and storage medium applicable to multimodal data. The method involves receiving multimodal data input from a user, preprocessing it, classifying it to identify the user's intent type, and routing tasks based on the intent recognition results. An adaptation model is selected based on the task routing results: if the input data contains image information, a multimodal model is invoked; if the input data is only text or structured information, a language model is invoked to construct and generate prompt words. The prompt words are input into the adaptation model to obtain a first-format chart code, which is then standardized and converted into a second-format chart code compatible with the target platform, retaining node definitions, connection relationships, layout constraints, and metadata information. A first optimization component is invoked to identify the type of the second-format chart code and determine the appropriate layout strategy. A second optimization component is invoked to adjust the format and size of each node in the second-format chart code. A third optimization component is invoked to perform alignment correction and partition adjustment on the second-format chart code. A fourth optimization component is invoked to optimize the connection identifiers of the second-format chart code, and the optimized second-format chart code is rendered and output. This solves the problem that existing general-purpose diagram models lack specialized optimization and processing mechanisms for structured diagrams, resulting in significantly poor performance when generating professional schematic diagrams such as flowcharts, relationship diagrams, and architecture diagrams that require precise logical structures and geometric constraints.

[0026] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0027] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0028] Figure 1 This is a schematic diagram illustrating the specific process of an intelligent chart generation method applicable to multimodal data disclosed in an embodiment of the present invention.

[0029] Figure 2 This is a schematic diagram of the specific process of step S1 disclosed in an embodiment of the present invention.

[0030] Figure 3 This is a schematic diagram of the structure of an intelligent chart generation system applicable to multimodal data disclosed in an embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the described embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0032] Unless otherwise defined, the technical or scientific terms used herein should be understood in their ordinary sense by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” and similar terms as used in this embodiment do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a,” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one.

[0033] In this embodiment, as shown in the appendix Figure 1 As shown in the figure, this embodiment discloses a smart chart generation method applicable to multimodal data, which may specifically include the following steps:

[0034] Step S1: Receive multimodal data input by the user, preprocess it, classify it to identify the user intent type, and route tasks based on the intent identification results.

[0035] This intelligent chart generation method, applicable to multimodal data, can be integrated into an enterprise intelligent management operating system. In this step, it receives various types of multimodal data, including natural language text, hand-drawn sketches, screenshots, scanned documents, and structured documents, integrating diverse information carriers such as text descriptions, visual sketches, and existing documents, thus eliminating reliance on a single data format for subsequent processing. Preprocessing the input data allows for the standardization and optimization of various raw data types, eliminating interference factors such as data format differences and redundant information, laying the foundation for accurate identification of user needs. Simultaneously, based on the preprocessed data, user intent types are categorized, clarifying whether the user needs to generate a new chart, import external data for chart creation, modify an existing chart, or parse a document to extract chart structure. Finally, task routing accurately allocates requests with different intents to the appropriate subsequent processing modules.

[0036] In the entire chain of multimodal data preprocessing-user intent recognition-task routing in step S1, the data preprocessing model is the core technical support for realizing semantic parsing and accurate decision-making, and its application is first focused on the user intent recognition stage.

[0037] In this embodiment, as shown in the appendix Figure 2 As shown, step S1 may include the following:

[0038] Step S11: Receive multimodal data input by the user, including natural language text, hand-drawn sketches, screenshots, scanned documents, or structured documents.

[0039] By constructing a multimodal data receiving interface, the system achieves the raw acquisition and aggregation of various input data types, including natural language text, hand-drawn sketches, screenshots, scanned documents, and structured documents. Breaking through the limitations of traditional single-modal input architectures in graphics modeling tools, it provides a complete and undistorted raw data source for downstream multimodal data preprocessing and user intent recognition steps by being compatible with textual, visual, and structured data carriers. This ensures that subsequent modules can perform semantic analysis and feature extraction based on comprehensive input information.

[0040] Step S12: After preprocessing the received multimodal data, input it into the intent recognition module for recognition and classification to obtain the user intent type. The intent type includes screenshot import, chart generation, chart modification, and document import.

[0041] First, preprocessing is performed on the received multimodal raw data. This involves standardizing the format differences of different data types such as text, images, and documents, eliminating redundant and interfering information, and unifying the data representation format. This solves the problem of uneven quality and chaotic format caused by different sources of multimodal data. Then, the preprocessed standardized data is input into the intent recognition module to accurately classify user needs and clarify whether the user's specific intent is to import screenshots, generate charts, modify charts, or import documents. This provides a clear task orientation for downstream functional modules of the system's multimodal model calling, graph code generation, and incremental editing modules.

[0042] Specifically, in another embodiment, step S12 specifically includes:

[0043] Step S121: Deploy the user intent recognition module, and classify the user input intent through a single inference by using a fine-tuned parametric language model.

[0044] The user intent recognition module can employ a finely tuned 7B language model to perform single-round inference classification on each round of user input, automatically determining the underlying operational intent of the user's request. During the classification process, it uses... The logic of probability distribution determines the intent type, where the prompt word used to guide the model's judgment contains key information such as platform context and task instruction template.

[0045] ;

[0046] The classification logic uses a softmax probability distribution: .

[0047] Model fine-tuning includes evaluating model suitability and calculating a comprehensive score. ,in To improve the accuracy of node type identification, To ensure the accuracy of style reproduction, To ensure the legality and correctness of the connection relationship, To ensure compliance with naming conventions, when When the value is less than 0.85, the fine-tuning process is initiated. They are respectively The corresponding weights.

[0048] Introduce a low-rank factorization matrix into the attention layer of the pre-trained language model. ,in Since r is much smaller than d and k, only about 0.1% of the parameters are trained to inject specialized capabilities, which in turn inject professional knowledge of the semantic description and logical structure of the graph, enabling the model to understand and generate the mapping from natural language to graph code. A LoRA adaptation layer is added to the visual language model to enhance the detection and recognition capabilities of graph elements such as nodes, connections, arrows, and swimlanes, realizing the conversion from image to structured graph code. Fine-tuning is performed based on a training dataset containing natural language-graph code pairing samples and sketch / screenshot-graph code pairing samples, which covers various types such as flowcharts, architecture diagrams, and relationship diagrams.

[0049] Step S122: Design a multi-level decision strategy based on the intent probability value. This multi-level decision strategy is controlled by a dynamic threshold. The multi-level decision strategy includes a decision strategy and a threshold mechanism: to accurately determine the user request type, the system sets three decision strategies based on the probability value output by the model:

[0050] Single intent: If a certain type P(type) > 0.7 exists, select that type directly;

[0051] Mixed intent: If there is more than one type P(type i If the value is greater than 0.4, then multi-task routing will be triggered simultaneously;

[0052] Uncertain Request: If all probabilities are less than 0.4, the system will trigger a clarification prompt, requesting the user to confirm their intent.

[0053] Specifically, if the probability of a certain intent type is greater than 0.7, it is determined to be a single intent hit, and that type is directly selected as the user's core need. If the probability of multiple intent types is greater than 0.4, it is determined to be a mixed intent, and a multi-task routing mechanism will be triggered simultaneously to respond to multiple needs. If the probability of all intent types is less than 0.4, it is considered an uncertain request, and the system will automatically trigger a clarification prompt to confirm the specific intent with the user. This confidence-based gating mechanism can ensure the system's response efficiency and improve classification accuracy, effectively avoiding incorrect handling of user requests under low confidence conditions.

[0054] Step S123: Construct a multi-dimensional input preprocessing process to perform preprocessing on user input data, thereby achieving input preprocessing and context enhancement.

[0055] Before user input enters the intent recognition model, it undergoes a series of standardized operations:

[0056] ;

[0057] Specifically, Normalize(text) removes noise from the input, standardizes punctuation, and unifies text formatting to ensure clean and consistent input content. Based on the type of user-uploaded attachment (image or document), FileTypeEmbed is injected to allow the model to adapt to different input formats. At the same time, ContextEmbed, such as historical dialogue fragments and previous image IDs, is introduced to provide richer semantic support for the model.

[0058] Step S124: Construct a static mapping routing table based on the intent classification results to achieve precise binding between user requests and system functional modules.

[0059] Specifically, the final classification result of intent recognition is used for module-level processing routing within the system: when the user input is a screenshot, it is routed to the multimodal structure recognition model, which specializes in handling image input; when the user intent is to generate a chart, the graph structure generation module is invoked to create the corresponding chart from the text content; if the user's requirement is to modify an existing chart, the incremental editing module is triggered to adjust the existing graph code; when the input is a document, the document parsing module is activated to extract graph structure information from the document. This routing mechanism is implemented through static table-driven processing, and if more task types need to be added later, such as chart comparison and chart summary, the overall architecture of the classifier does not need to be modified, demonstrating good scalability.

[0060] Step S125: For the core functions of intent recognition and task routing, performance verification and scenario adaptability assessment are completed through multi-dimensional real business scenario testing.

[0061] Step S13: If the intent is to import a screenshot, the input data is input to the multimodal model processing link; if the intent is to generate a chart, the input data is input to the chart generation module processing link; if the intent is to modify a chart, the input data is input to the incremental editing module processing link; if the intent is to import a document, the input data is input to the document parsing module processing link; if the intent recognition confidence is lower than a preset threshold, a clarification request is output to obtain supplementary information from the user.

[0062] Based on the user intent type output in the preceding step S12, a precise task routing mechanism is constructed: according to different intent types such as screenshot import, chart generation, chart modification, and document import, the preprocessed input data is directed to the corresponding dedicated processing link, ensuring that each demand scenario matches the appropriate professional module. Simultaneously, an intent recognition confidence verification step is set up; when the confidence of the intent recognition result does not reach a preset threshold, a clarification request is proactively output to obtain supplementary information from the user. This routing mechanism is driven by a static table, allowing for subsequent expansion to more types, such as compare and summarize, without changing the classifier architecture. The incremental editing module receives multimodal data of chart modification intents and performs incremental editing processing on existing charts. The increment is the current chart code, supporting local adjustments and attribute updates based on user input, achieving precise chart modification. The document parsing module is upstream of intent recognition, mainly providing the current input type for intent recognition, or it can skip the intent recognition module and directly determine the user intent.

[0063] Step S2: Select the appropriate model based on the task routing result. If the input data contains image information, call the multimodal model. If the input data is only text or structured information, call the language model to construct and generate prompt words.

[0064] Step S2, based on the task routing results output in step S1, calls a multimodal model or a language model depending on whether the input data contains image information. The multimodal model focuses on image-type inputs, while the language model focuses on text or structured information. At the same time, by constructing effective generation prompts, a bridge is built between user needs and model output, transforming user intent and key information in the input data into instructions that the model can accurately understand.

[0065] The prompts used in the image code generation task are automatically composed of four parts:

[0066] ;

[0067] The first part is the general system template. The first part includes metadata information such as chart type (e.g., BPMN chart), layout style, and style theme; the second part is based on product type. The product type refers to the type of chart used in specific business operations, such as process architecture diagrams, activity flowcharts, business architecture diagrams, etc., which guide the organization of chart elements; the third part is based on the deployment environment. The fourth part consists of knowledge base content that can be automatically matched or manually selected, such as parameters related to edge GPUs and public cloud settings, used to control the number of tokens, inference accuracy, and batch processing strategies; It embeds relevant terminology, field definitions, and modeling rules, among other contextual information. Specifically, the prompts include four parts: basic templates, pattern patches, deployment space instructions, and knowledge base references, ensuring that the fine-tuned model accurately understands user needs.

[0068] Step S3: Input the prompt words into the adaptation model to obtain the first format graph code, perform standardization processing, convert it into the second format graph code compatible with the target platform, and retain the node definition, connection relationship, layout constraint and metadata information.

[0069] In another embodiment, the system automatically selects the appropriate model based on the input modality type I∈{0,1}. :

[0070] ;

[0071] In this embodiment, the multimodal model MM-LoRA can be used to adapt the screenshot import scene. In the multimodal feature fusion stage, a fusion weight α=0.6 is used to adjust the fusion ratio of text and visual features, and the rank rv=16 of visual LoRA is set to optimize the parameter scale and representation ability. By leveraging the cross-attention mechanism between text description and image information, the interaction and fusion of cross-modal features are completed, and finally, a structured graph code containing nodes, connections and positional constraints is generated, realizing the transformation from image to graph structure.

[0072] The LLM-LoRA language model can be selected to adapt to plain text or form input scenarios. The model is configured with a LoRA rank of 32, achieving a balance between lightweight fine-tuning and semantic expressiveness. By setting a generation temperature T=0.3 and a top-p=0.9 sampling strategy, the generated graph structure and graph code are ensured to have semantic accuracy and be consistent with enterprise style specifications, meeting the requirements for generating compliant graph structures from text. The required graph code is generated using the prompt words constructed in step S2. The generated graph code is then converted into a unified intermediate representation format. This format uses a JSON-like structured approach to describe the core information of the graph, including a nodes array (node ​​definitions), an edges array (connection relationships), a metadata field (product type, version hash, and other metadata information), and an xml_raw field (complete raw XML). It not only supports standardized storage for internal processing but also performs bidirectional conversion with various external platform graph formats (draw.io XML, Graph ML, etc.) through an XML conversion engine. During the conversion process, the integrity of nodes, connections, layout constraints, and style parameters is maintained, achieving lossless cross-platform compatibility and enterprise-customized style extensions. This ensures that the generated graphs conform to both industry standards and the visual and business rules of specific organizations.

[0073] Step S4: Call the first optimization component to identify the type of the second format diagram code and determine the appropriate layout strategy; call the second optimization component to perform format size adjustment on each node of the second format diagram code; call the third optimization component to perform alignment correction and partition adjustment on the second format diagram code; call the fourth optimization component to perform connection mark optimization on the second format diagram code; and render and output the optimized second format diagram code.

[0074] Specifically, the first optimization component identifies the specific chart type corresponding to the second format chart code and matches a layout strategy that conforms to the logical characteristics and visual specifications of that type; the second optimization component focuses on fine-tuning at the node level, adjusting the format and size of each node, calibrating the label position, and optimizing the spacing between nodes to ensure the clarity of the node presentation; the third optimization component performs overall alignment correction and partitioning adjustment on the chart; the fourth optimization component optimizes the connection labels, including planning reasonable connection paths, adjusting the connections to a regular orthogonal style, and smoothing the connections; finally, through rendering output, the optimized second format chart code is transformed into a directly usable visual chart, completing the transformation from code to intuitive graphics.

[0075] In this embodiment, step S4 specifically includes:

[0076] Step S41: Use the first optimization component to jointly model the adjacency structure of the second format graph and the semantic embedding vector, and use the discriminant function. , Identify the chart type. When the identified type is a flowchart and the confidence level is greater than the preset value, select a combination strategy of hierarchical layout and orthogonal layout as the main optimization path.

[0077] The discriminant function: Used to calculate the type of chart. The probability of . Among them, This indicates that the input chart belongs to a certain candidate type. The probability of, where ∈{flowchart, organization diagram, topology diagram}, with a value range of [0,1]; This is an activation function that maps the result of a linear operation to the interval [0,1] and outputs it in probabilistic form. It is a trainable weight matrix used to weight the vectorized features of the adjacency matrix, reflecting the influence weight of the connection relationship between graph nodes in type recognition; It is a vectorization operation on the adjacency matrix A, such as expanding it into a one-dimensional vector by column or row. The adjacency matrix A is used to describe the connection relationship between each node in the diagram, such as the flow box, decision box and other elements in the flowchart. The matrix elements reflect the presence or weight of the connection between the nodes. It is a trainable weight matrix used to weight the semantic embedding vectors, reflecting the influence weight of the overall semantics of the chart in type recognition; Semantic embedding vectors are the result of vectorizing the overall semantic information of a chart, integrating textual, visual, and other multi-dimensional semantics.

[0078] formula Used to determine the final chart type identified; where This indicates the most likely chart type identified from all candidate types; Indicates from various candidate types In the middle, select the one that makes the probability The largest type is taken as the result.

[0079] For example, when the recognition result is a flowchart and the confidence level is... When the value is ≥0.9, the combination strategy of hierarchical layout and orthogonal layout is automatically selected as the main optimization path to provide a basis for subsequent layout selection.

[0080] In this embodiment, for the input second-format graph, the first optimization component simultaneously collects its adjacency structure and semantic embedding vector for joint modeling. The adjacency structure is presented as an adjacency matrix A, accurately depicting the topological connections between nodes in the second-format graph, such as flowchart frames, decision boxes, and start / end boxes, including predecessor-successor relationships and parallel branch relationships, providing an underlying topological basis for identifying the graph's structural characteristics. The semantic embedding vector e is the result of vectorizing the overall semantics of the second-format graph, such as the business process logic and functional module interaction intent carried by the flowchart, through a multimodal pre-trained model. This supplements semantic attributes that cannot be covered by structure alone, making graph type recognition more closely aligned with actual business expressions. The multimodal pre-trained model integrates multi-dimensional information such as text descriptions and visual element features.

[0081] The first optimization component performs chart-type reasoning on the jointly modeled information using a preset discriminant function: In the discriminant function, It is a vectorization operation that expands the adjacency matrix A by column or row, transforming the two-dimensional topological structure into a one-dimensional feature sequence; the linearly fused features are mapped to the [0,1] interval, and each candidate graph type is output. probability Finally passed The chart type with the highest probability is selected as the recognition result.

[0082] When the discrimination function outputs a flowchart as the recognition type, and the probability (confidence) corresponding to this type is greater than the system's preset threshold, the first optimization component will select a combination of hierarchical and orthogonal layout strategies as the main path for subsequent layout optimization. Hierarchical layout arranges the nodes of different stages of the process sequentially, ensuring that the order of the process is intuitively discernible; orthogonal layout constrains the connections between nodes to extend as horizontally or vertically as possible, significantly reducing visual intersections and confusion caused by diagonal connections. If the recognition confidence is lower than the preset threshold, the system will trigger a preceding clarification or supplementary information process to avoid mismatch in layout strategies due to type misjudgment.

[0083] Before using the first optimization component to jointly model the adjacency structure and semantic embedding vector of the second-format graph, the graph code is standardized. Specifically, an XML to JSON conversion operation is first performed. During the conversion, the coordinate data describing the position of the primitives in the XML needs to be quantized. The original floating-point coordinate values ​​are converted into integer coordinates that conform to the enterprise specifications through preset coordinate mapping rules to ensure the consistency of primitive positions across different devices or environments. At the same time, a style mapping function is called. This function takes the original primitive color values ​​in the XML as input and replaces the original colors with the corresponding standard enterprise colors according to the color matching standards of the enterprise color swatch library, thereby unifying the visual style of the primitives.

[0084] Step S42: Use the second optimization component to adjust the size and layout of each node. When the text width is detected to be greater than the preset width value, automatically expand the node width and adjust the spacing between adjacent nodes through the preset spacing loosening algorithm.

[0085] The preset spacing loosening algorithm is as follows: When the actual distance between nodes When the value is small, the adjustment amount The size is relatively large, thus effectively avoiding node overlap; after adjustment, the minimum spacing between adjacent nodes is guaranteed to be ≥40px, realizing adaptive adjustment of node size, automatic line wrapping and alignment of text labels, and optimization of the spacing between adjacent nodes.

[0086] in, This represents the amount of spacing adjustment between the i-th node and the j-th node; This represents a coefficient used to control the intensity of spacing adjustment, with a value of [value missing]. That is, 200 square pixels; Let be the target reference distance between the i-th node and the j-th node, where ; This represents the unit direction vector between the i-th node and the j-th node, used to determine the adjustment direction.

[0087] Step S43: Use the third optimization component to apply a layered layout algorithm to the main area to adjust the order logic. If there is a mesh substructure, use a force-guided layout algorithm to maintain the overall visual balance and perform alignment correction and spacing standardization on swimlanes or partition structures. Utilize the preset global coordination algorithm and obtain the best global layout modification algorithm for different types of graphs by accessing the graph rule knowledge base.

[0088] Specifically, step S43 uses a two-layer logic of local structural differentiation optimization and global coordination and integration to complete the professional adjustment of complex chart layouts. The specific technical implementation is as follows:

[0089] Step S431 focuses on the precise layout optimization of the local structure of the chart. Based on the logical characteristics and visual requirements of different structure types, a differentiated algorithm strategy is adopted to achieve a synergistic improvement in layout quality and logical readability.

[0090] The differentiated algorithm strategy includes the application of a hierarchical layout algorithm for the backbone region, the adaptation of a force-guided layout algorithm for the mesh substructure, and the alignment correction and spacing specification for the swimlane / partition structure.

[0091] For the confirmed core area of ​​the chart, which is the sequence of key nodes and the set of connections that carry the core logic, the third optimization component first calls the hierarchical layout algorithm to parse the sequential logical relationships of the nodes within the core area. Based on the predecessor-successor attributes in the node connection relationships, the core nodes are divided into multiple logical levels. The algorithm determines the arrangement order of nodes at each level by calculating the in-degree / out-degree and association weight of the nodes: nodes at the same level are arranged according to business priority, such as nodes marked as core processing are prioritized for centering or data flow direction; nodes across levels are aligned through vertical projection to ensure that the connections between related nodes at different levels are as perpendicular as possible, reducing diagonal line intersections and optimizing the connection direction. The in-degree / out-degree of a node reflects the importance of its position in the core logic, and the association weight reflects the coreness of the connection between nodes.

[0092] When the module detects the presence of a mesh substructure in the graph, it automatically switches to the force-guided layout algorithm. This algorithm applies basic repulsive forces to nodes within the mesh substructure to prevent excessive node clustering and visual crowding; for nodes with connections, it constrains the node spacing through line attraction to ensure clear relationships; simultaneously, the algorithm sets boundary repulsive force parameters based on the relative position of the mesh substructure and the main trunk area to prevent the mesh substructure from encroaching on the space of the main trunk area.

[0093] For charts containing swimlanes or sections, the module performs two core operations: First, alignment correction: Based on the preset swimlane / section alignment standards in the graph rule knowledge base, the module uses a coordinate verification algorithm to detect the current positional deviation of swimlanes / sections, automatically correcting the swimlane boundaries to the horizontal / vertical direction to ensure that the boundary lines of all swimlanes / sections are parallel and aligned; simultaneously, for nodes within a section, the module adjusts their positions according to preset rules for the chart type, such as left alignment, center alignment, or right alignment, eliminating the problem of messy node arrangement within the section. Second, spacing standardization: The module calls the swimlane spacing threshold and section spacing threshold stored in the graph rule knowledge base to calculate the current swimlane / section spacing deviation and automatically adjusts the spacing to the standard threshold: for swimlanes, it ensures that the spacing between adjacent swimlanes is uniform; for sections, it ensures that the section spacing meets the visual distinction requirements without wasting chart space, while also forming a coordinated and unified standard with the spacing of the main area and network substructure.

[0094] Step S432: Relying on the global coordination algorithm, the coordination and unity of local structure and overall layout are achieved through knowledge base-driven algorithm matching and conflict reconciliation and visual balance control.

[0095] Specifically, the process begins by parametrically reading the core information of the chart, obtaining the chart type and key structural parameters. Then, it accesses the graph rule knowledge base, which contains a global layout optimization rule system and algorithm mapping relationship for different chart types to ensure the clarity of the main hierarchy. The architecture diagram's corresponding partition alignment and main hierarchy coordination algorithm enhances the regularity of partition boundaries. The global coordination algorithm, through a triple collaborative matching mechanism of chart type, structural parameters, and optimization rules, accurately retrieves a global layout algorithm from the knowledge base that is suitable for the current chart characteristics, avoiding the adaptability defects of general algorithms in specific scenarios and ensuring the targeted and effective selection of algorithms.

[0096] In another embodiment, the intelligent chart generation method further includes optimizing the connection route using a fourth optimization component based on path obstacle avoidance priority, using the A* search algorithm with the following cost function: Orthogonal inflection point path smoothed by cubic curves: Reduce edge intersections and visually abrupt features.

[0097] The cost function is used to measure the quality of a path; the lower the cost, the better the path. The total cost of the path is the core indicator for judging whether a path is better, and the algorithm selects the optimal path based on this value. and This indicates an indicator function, where, This indicates an edge intersection indicator function. If the path has edge intersections, meaning the connecting line intersects with other connecting lines, nodes, etc., then... If there is no intersection, then . This represents a lane switching indicator function. If a lane switch occurs in the path, i.e., the connecting line crosses a lane boundary, then... If there is no lane change, C represents the total cost of the path; the smaller the value, the higher the quality of the path. The coefficient 10 represents the penalty weight for edge crossing, which reflects the greater degree to which edge crossing destroys readability. The coefficient 5 represents the penalty weight for swimlane switching, which reflects the less severe impact of swimlane switching on logical convergence. The constant term 1 represents the inherent basic cost of the path. Through this cost function, the A* algorithm can prioritize paths with no intersections and fewer swimlane crossings.

[0098] The algorithm for smoothing cubic curves is as follows: ;

[0099] The parametric representation of a cubic B-spline curve is used to smooth the connection path; among which, Indicates parameters The corresponding points on the curve; This represents a parameter variable with a value range of [0,1]. (i=0,1,2,3) denotes cubic B-spline basis functions; (i=0,1,2,3) represent control points, a total of 4.

[0100] Specifically, in this embodiment, the fourth optimization component focuses on the precise optimization of connection routes. Through intelligent path search and smooth curve generation, it solves the problems of messy intersections and abrupt corners in traditional connections. The specific steps are as follows:

[0101] Step S441, Path Avoidance and Priority Guidance Based on A* Search: The fourth optimization component first calls the A* search algorithm to plan connection routes. A customized cost function quantifies the merits of each path, guiding the algorithm to select a better connection route. Specifically, this includes: abstracting the two-dimensional space of the graph into a grid or graph structure search space; abstracting each position that can be a connection path as a search node; and defining edges between adjacent nodes based on feasible movement directions, combined with graph layout rules to determine feasibility. Multi-factor guidance of the cost function: The cost function comprehensively considers multiple factors affecting the readability of connections, setting differentiated penalty weights for edge intersections, swimlane switching, etc.: If a path intersects with other connections / nodes, a high-weight penalty is triggered; if... The path involves swimlane switching, which also triggers penalties. Swimlane switching weakens the logical cohesion within a swimlane, with a weaker impact than edge crossings but still requiring control. Simultaneously, the basic cost factor considers the path's basic length and its alignment with the ideal direction, such as the hierarchical direction of the main area and the longitudinal / lateral direction of the swimlane, ensuring the path avoids obstacles while adhering to the overall layout logic. Implementation of path obstacle avoidance priority: Based on the initial layout results in the chart, obstacle avoidance priorities are set for different areas / elements. Nodes and core connections in the main area are the highest priority obstacle avoidance targets, which must be completely avoided to ensure the clarity of the core logic. Swimlane / partition boundaries are secondary priority, minimizing crossings to maintain partition regularity. Non-core connections within the mesh substructure have general priority and can be avoided to a certain extent while ensuring overall visual appeal. When expanding paths, the A* algorithm prioritizes paths outside areas with high obstacle avoidance priority or imposes extremely high costs on paths intruding into high-priority areas, guiding connections to bypass key obstacles.

[0102] Step S442, Cubic Curve Smoothing and Orthogonal Inflection Optimization: After the A* algorithm generates an orthogonal inflection path with no intersections and few switching, the orthogonal inflection refers to the connection line that connects the nodes in the form of a vertical / horizontal polyline. The module smooths the path with a cubic curve to eliminate visual abruptness.

[0103] The optimization components are multi-level optimization components, specifically including a first optimization component that undertakes the functions of chart type determination and layout algorithm matching, a second optimization component that undertakes the functions of node-level local fine adjustment, a third optimization component that undertakes the functions of global layout coordination and multi-algorithm fusion, and a fourth optimization component that undertakes the functions of connection path and visual effect final optimization.

[0104] The first optimization component primarily receives graph structure data from the intermediate representation conversion layer, graph primitive semantic data from the multimodal input processing layer, enterprise metamodel constraints from the compliance verification layer, and historical layout type records from the system database. It determines the graph type through multi-dimensional feature analysis and matches suitable layout algorithms for subsequent optimization components. First, it parses the topology from the graph code, extracting core indicators such as node type distribution and edge directionality to construct structural features. Then, it semantically encodes node labels, extracts keywords, and matches them with a pre-defined graph type-term mapping library to obtain semantic-related scores. Subsequently, it fuses structural and semantic features, adjusts feature weights based on enterprise metamodel constraints, inputs them into a classification model to obtain the probability distribution of graph types, and finally determines the judgment result and calculates the confidence level. Differential processing is applied based on the confidence level: high confidence directly outputs the result and recommendation algorithm, medium confidence adds alternative types, and low confidence triggers manual confirmation. It also collaborates with the intermediate representation conversion layer and the compliance verification layer to read graph code metadata to assist in the judgment, ensuring accurate layout algorithm basis for subsequent optimization components. The compliance verification layer integrates a compliance verification mechanism, which includes a specification knowledge base, a verification engine, and a conflict resolution module. During prompt word construction, it extracts enterprise specifications and industry standards from the specification knowledge base as references. The system adds prompts to preventatively guide compliant generation; during intermediate representation transformations, it verifies whether node types and connection relationships conform to the enterprise metamodel specifications; after optimization, it checks the standardization of style, structure, and semantics, generates a compliance score, and triggers manual review if the score is below the threshold. This compliance verification mechanism ensures that generated charts comply with enterprise specifications and industry standards.

[0105] Specifically, in another embodiment, the first optimization component constructs an adaptive processing mechanism for multiple special scenarios during its runtime phase.

[0106] When a conflict is detected between the chart topology and the chart type pointed to by the node labels, the module triggers a dynamic constraint weight adjustment strategy: temporarily increasing the priority of the enterprise metamodel constraints, and simultaneously calling the graph code metadata of the intermediate representation conversion layer for auxiliary judgment; if the conflict cannot be resolved even after strengthening the metamodel constraints and assisting with metadata, the module will add a high-probability chart type identifier to the medium-confidence judgment result to provide priority reference for subsequent processing links. When the input chart is identified as a new type of chart not in the preset chart type library, the module initiates a feature capture and library iteration mechanism: first, the core features of the new chart are parameterized and extracted and stored in the system database; second, through a feature similarity matching algorithm, the known chart type closest to the new chart is recommended from the preset library to ensure the continuity of basic processing; at the same time, a manual annotation push process is triggered to synchronize the new chart features and recommended types to the annotation link, and after manual confirmation, the chart type-processing strategy mapping library is updated to realize the system's dynamic adaptation capability to new charts. If the chart type determination result is low confidence and there is a response delay in manual confirmation, the module automatically starts a conservative processing mode: it calls the general layout algorithm to complete the basic layout optimization, avoiding process blockage due to the unresolved type determination; at the same time, it adds a chart type pending confirmation mark to the third optimization component, clearly informing the subsequent optimization link of the current type determination status, providing decision reference for the third optimization component to carry out global layout coordination, and ensuring the continuity and fault tolerance of the overall optimization process.

[0107] The second optimization component is a local optimization component used for fine-tuning at the node level. Its inputs include the initial node data passed from the first optimization component, the chart type and font specifications, node spacing constraints from the enterprise style library, and the global layout algorithm type provided by the third optimization component. It addresses micro-level issues such as mismatched node sizes and text, inconsistent label wrapping, and overlapping adjacent nodes. First, it calculates the actual rendering size of node labels based on the enterprise font specifications, determines the text-node size adaptation rules based on the chart type, updates the node size, and verifies to prevent nodes from exceeding the canvas boundaries. Then, for cases where the text width exceeds the node width by a significant proportion, it automatically wraps text according to the word boundary priority principle, while determining the text alignment based on the chart type. Finally, it iterates through all node pairs, detects node overlap or insufficient spacing, calculates node displacement using a specific model to adjust the position, and marks overlapping nodes that remain unresolved after multiple iterations as unresolved and passes them to the third optimization component. Finally, it outputs the adjusted node data and a local optimization report to subsequent optimization components, laying a well-organized node foundation for the global layout.

[0108] The second optimization component performs format size adjustment and collision avoidance for each node: the rules for the format size adjustment are as follows:

[0109] ; ; That is, if the text width Greater than the original width of the node 0.9 times, new node width Pick and The smaller value in the range, the new height of the node. To increase text height Divide by 20, round up, and then multiply by 20; spacing optimization uses a spring model to adjust the overlapping area, through... Calculate the adjustment amount to ensure that the minimum spacing between adjacent nodes is ≥40px, effectively avoiding local stacking and misalignment.

[0110] The second optimization component is used for node-level adjustments. When the node label is extremely long text, causing size abnormalities, the core keywords are extracted and the text is compressed with ellipses, while the complete text is retained for hovering and viewing. If it still does not meet the standard, a size over-limit warning is sent to the third optimization component. When faced with a densely overlapping group of more than 20 nodes, after three local iterations without resolution, clustering and labeling are performed and the data is passed to the third optimization component to request a global algorithm replanning. At the same time, feedback is given to the first optimization component that there may be a type misjudgment. If there is a conflict between the node spacing and alignment constraints in the enterprise style library, it is handled according to the preset priority. If the priorities are the same, a compromise solution is requested from the compliance verification layer.

[0111] The second optimization component first extracts the core spatial information of the nodes from the current layout data, including the center coordinates and boundary range of each node, as well as the functional module or associated group information to which the node belongs. Simultaneously, the component performs a preliminary scan of the spatial distribution of all nodes, marking local spatial regions where nodes are concentrated. These local spatial regions are typically characterized by a significant difference in the horizontal and vertical spacing between the center coordinates of multiple nodes compared to the standard node spacing, and a preliminary overlap or proximity trend in the node boundaries. The second optimization component calculates node density using local spatial units as the unit. First, based on the overall size of the chart and the average size of the nodes, suitable local spatial units are defined. Then, the total number of nodes contained in each local spatial unit is counted, and combined with the spatial area of ​​the unit, the number of nodes per unit area, i.e., the node density, is calculated. Next, the calculated local node density is compared with a preset density judgment threshold. This threshold is set based on the requirements for reasonable node distribution density in the enterprise layout specifications. If the node density of a local unit exceeds the threshold, and the boundary overlap ratio of the nodes within that unit reaches the basic overlap standard, it is initially determined that the area has a dense clustering feature of nodes. After initially identifying the dense clustering area, the second optimization component further focuses on the node overlap within the area: through spatial intersection analysis, the set of nodes with overlapping relationships is determined, and the complete overlapping area range is marked, that is, the spatial area jointly covered by the boundaries of all overlapping nodes. The total number of nodes contained in the overlapping area is counted. If the number of nodes exceeds the upper limit of ordinary overlap judgment and more than half of the nodes have an intersection with the overlapping area, then the core quantitative characteristics of dense node overlap are met. Ordinary overlap is usually two to three nodes, while dense overlap is manifested as more nodes being involved in the overlap at the same time. At the same time, the second optimization component calculates the ratio of the area of ​​the overlapping area to the total boundary area of ​​all nodes in the area. If the ratio exceeds the preset ratio, it is further confirmed that the scenario is not a slight overlap of a few nodes, but a dense overlap of a large number of nodes.

[0112] Specifically, in scenarios involving dense node overlap, when encountering overlapping areas formed by a large number of clustered nodes, the second optimization component will first perform iterative adjustments within a local area. If the overlap problem remains unresolved after multiple local adjustments, the densely overlapping node group will be clustered and labeled, and the relevant information will be passed to the third optimization component, requesting it to call the global planning algorithm to re-optimize the node layout. At the same time, feedback will be sent to the first optimization component, indicating that there may be a judgment bias in the current chart type, providing a reference for subsequent type identification and correction. Regarding the adaptation of enterprise style constraints, when there is a conflict between the specification requirements for node spacing in the enterprise style library and the constraint rules for node alignment, the second optimization component will adapt and execute the rules according to a pre-set priority system. If the priorities of the conflicting parties are at the same level and a solution cannot be determined by priority judgment, the constraint conflict will be submitted to the compliance verification layer, requesting it to combine enterprise specifications and chart generation requirements to output a compromise solution that takes into account the constraints of all parties.

[0113] The third optimization component, acting as the global command unit for layout optimization, receives adjusted node data and a list of unresolved overlapping nodes from the second optimization component, a list of chart types and recommended algorithms from the first optimization component, and global layout constraints from the enterprise style library and compliance verification layer. Its core task is to balance the multi-objective optimization needs of the layout through multi-algorithm fusion. First, it initializes relevant parameters according to the priority of the recommended algorithms, employing a temporary dispersion strategy for unresolved overlapping nodes to avoid excessive node clustering in the initial stage. Then, taking a specific chart type as an example, it prioritizes the execution of the recommended main layout algorithm, adjusting node coordinates based on the chart's special structures to ensure the integrity of these structures, while supplementing other layout algorithms to ensure the connection patterns meet regularity requirements. Subsequently, it constructs a layout quality scoring model, quantifying layout quality from dimensions such as node distribution, edge intersection, special structure integrity, and canvas utilization, and uses iterative optimization algorithms to adjust the layout with the goal of improving the layout quality score.

[0114] Specifically, the core function of the third optimization component is to select an appropriate main layout strategy based on the chart type: for flowcharts, a hierarchical layout algorithm based on the Sugiyama framework is used, while precisely controlling the spacing between levels and the alignment of swimlanes; for organization charts or tree diagrams, a top-down recursive hierarchical approach is used for layout; for network subgraphs, the Fruchterman-Reingold force-directed algorithm is used to perform multiple rounds of iterative calculations to maintain the overall symmetry of the chart and the uniformity of node distribution. The layout specification targets of this third optimization component are used to measure the node overlap rate and edge crossover rate in the chart to ensure that the layout effect meets the requirements of readability and standardization.

[0115] The goal of the layout specification is: Among them, node overlap rate Edge cross rate Such constraints ensure the layout of the graph, preventing excessive overlap of nodes and controlling the frequency of line intersections, thus making the overall structure of the graph clearer and easier to read.

[0116] In another embodiment, the third optimization component, as the core control unit of the global layout in the graphical modeling system, achieves accurate resolution of layout anomalies and output of normalized results in complex chart layout scenarios.

[0117] Specifically, for cases of excessively high edge crossover rate or residual node overlap, node reordering and additional adjustment forces are triggered respectively. Finally, the node coordinates after global layout are output to the fourth optimization component and intermediate representation conversion layer, and the layout quality score and edge crossover statistics are output simultaneously to achieve the regularity of the global structure of complex charts.

[0118] To identify residual node overlap, the third optimization component collects spatial attribute information of all nodes, including the center coordinates of each node, the boundary range determined by the node's width and height, its level or functional module, and the node's priority attribute, providing a complete spatial and attribute basis for overlap determination. Secondly, the third optimization component performs node overlap determination by mapping the boundary range of each node to a unified spatial coordinate system and analyzing whether there is spatial intersection between the boundaries of any two nodes: if the boundary ranges of two nodes overlap in both the horizontal and vertical dimensions, and the area of ​​the overlapping area accounts for the proportion of the boundary area of ​​any node to a preset judgment standard, then it is preliminarily determined that node overlap exists. During this process, the component filters out temporary overlapping scenarios, such as transitional overlaps that have not yet been adjusted during the layout iteration, and only retains stable overlaps, that is, node combinations whose overlapping state has not been eliminated after at least two rounds of local optimization. Finally, the third optimization component confirms the overlap residue, and checks whether the currently overlapping nodes have been included in the historical processing queue in combination with the previous optimization records: if the node combination was marked as an overlap to be processed in the previous optimization steps, and the overlap problem has not been resolved after targeted adjustment, or the newly emerging overlapping node combination cannot be eliminated by regular local optimization, then the existence of node overlap residue is confirmed, triggering the processing mechanism to apply additional adjustment force.

[0119] When the edge crossover rate is too high, a node reordering algorithm is triggered. This algorithm adjusts the arrangement order of nodes within the same level or related modules, changes the path of the connections, and reduces the number of crossovers. If there are residual node overlaps, additional adjustment forces are applied to the overlapping nodes to simulate a physical repulsive force effect and push the nodes apart. After anomaly resolution, the third optimization component outputs the node coordinates after global layout to the fourth optimization component and the intermediate representation conversion layer, simultaneously outputting the layout quality score and edge crossover statistics.

[0120] The fourth optimization component, as the final optimization unit for layout optimization, takes as input the global layout node data and edge intersection statistics provided by the third optimization component, the connection style rules determined by the enterprise style library and compliance verification layer, and the canvas boundary information of the intermediate representation conversion layer. Its core function is to optimize the path, style, and visual effect of the connections, improving the readability and aesthetics of the chart. First, it generates initial connection paths based on node coordinates and assigns corresponding style attributes to the connections according to the connection type-style mapping library. Then, it constructs a canvas grid map and marks obstacle areas. For connections that intersect or pass through obstacles, a specific algorithm is used to replan the path to achieve obstacle avoidance. Next, it traverses all connection pairs to detect intersections, adopting different intersection correction strategies based on whether the connections belong to the same special structure. It adjusts the shape of long, irregular connections and uses a curve smoothing algorithm to optimize the visual effect of multi-fold connections. Finally, for connections with labels, it positions the labels in appropriate segments of the connection; if labels overlap, it adjusts the offset. The final output of the beautified connection data is sent to the intermediate representation conversion layer and rendering module, generating a connection beautification report and a final layout quality score.

[0121] In another embodiment, the fourth optimization component constructs a dual-response logic of local visual optimization and cross-unit collaborative adjustment to handle the edge intersection problem in dense areas. If more than 10 pairs of edges still intersect after 3 iterations of the obstacle avoidance algorithm and are located in dense areas, the intersecting lines will be distinguished by line width and color saturation, and the third optimization component t will be requested to fine-tune the position of the corresponding node. When the line label overlaps with the node or other labels, the label will be dynamically offset along the line. If they still overlap, the label level will be adjusted, and the second optimization component will be fed back to compress the blank area of ​​the node. If the node is at the edge of the canvas and causes the line to be truncated, the line will be extended to the boundary and an arrow exit mark will be added. A boundary overflow report will be sent to the third optimization component to request the translation of the node group.

[0122] Specifically, the fourth optimization component retrieves the global layout data passed by the third optimization component, extracts the spatial attribute information of all nodes and the correlation between the connections, and simultaneously obtains the previously marked potential dense areas. These potential dense areas are initially marked by the second and third optimization components based on node density to clarify the identification range. Then, the potential dense areas are precisely defined by dividing the grid cells based on the average node size, counting the number of nodes in each grid, and grouping the grid cells whose number of nodes exceeds the dense judgment standard and whose node boundary overlap ratio reaches the basic threshold as complete dense area boundaries, ensuring that only highly clustered nodes are focused on. Local space; edge intersection statistics are performed within a defined dense area: all lines within the area are traversed, and valid intersections at non-endpoint positions are identified through line segment intersection judgment logic. The number of pairs of intersecting lines and the associated nodes of each pair of intersecting lines are recorded. At the same time, the intersection density, i.e., the number of edge intersections per unit area, is calculated. The number of pairs of intersecting lines and the intersection density obtained by statistics are compared with a preset threshold. The threshold is set based on the acceptable intersection level of dense areas in the enterprise layout specifications. If both indicators exceed the threshold, and the proportion of the number of lines in this area to the total number of lines in the chart reaches a certain standard, then the current scenario is confirmed as a dense area edge intersection. When the fourth optimization component confirms the existence of densely intersecting edges, and after multiple rounds of obstacle avoidance algorithm iterations, there are still many intersecting edges in this area and the number of intersecting lines exceeds the acceptable range, local visual optimization is initiated: by adjusting the line width and color saturation of the intersecting lines, the visual distinction of the intersecting lines is enhanced, temporarily alleviating reading difficulties; at the same time, the fourth optimization component sends a collaboration request to the third optimization component, transmitting the boundary coordinates of the dense area, the associated node information of the intersecting lines, and the current intersection statistics, requesting it to make minor adjustments to the positions of the associated nodes; when it detects that the connection label overlaps with the node boundary or other connection labels, the fourth optimization component first performs local adjustments: dynamically offsetting the overlapping labels along the extension direction of the connection, attempting to eliminate the overlap by fine-tuning the attachment position of the labels on the connection; if the overlap problem is still not resolved after dynamic offsetting, the display layer of the labels is adjusted to reduce visual interference.Meanwhile, the fourth optimization component feeds back the label overlap situation to the second optimization component, explaining the node distribution, blank space occupancy ratio, and label size requirements in the overlapping area, and requests that it compress the blank area of ​​the corresponding node. If the fourth optimization component detects that some nodes are located at the canvas edge, causing the connection lines to the nodes to be truncated by the canvas boundary and unable to display the complete start-to-end path of the connection, the fourth optimization component performs local remedial optimization: extending the truncated connection lines to the canvas boundary to ensure that the complete path of the connection line extending from the node to the edge is visible; at the same time, adding an arrow exit mark at the canvas exit position of the connection line to clarify the extension direction of the connection line and avoid users misunderstanding that the connection line is in an interrupted state; at the same time, the fourth optimization component sends a boundary overflow report to the third optimization component, which includes the coordinates of the edge nodes, the number of truncated connections, and the distribution of the associated node groups, requesting the third optimization component to perform a global translation of the edge node groups to avoid the recurrence of connection truncation problems.

[0123] Each optimization component in the multi-level optimization components undertakes optimization functions at different levels during the graphic layout process, and realizes data interaction and functional collaboration through preset interfaces; the collaborative invocation methods include: forward advancement mechanism, reverse verification mechanism, and cross-module abnormal collaboration mechanism.

[0124] Specifically, the forward propagation mechanism includes passing processed intermediate data and optimization constraint parameters from the preceding optimization component to the subsequent optimization component along the optimization link. The subsequent optimization component performs optimization operations at the corresponding level based on the intermediate data, forming a forward flow link from graphic feature parsing to layout result output.

[0125] The reverse verification mechanism includes the following: when any first-level optimization component detects that the current optimization result does not meet the preset standard, such as substandard layout quality, conflict between features and constraints, or unresolved local anomalies, it feeds back the abnormal feature data and correction suggestions to its front-end optimization component through the interface, triggering the front-end module to re-execute the corresponding optimization step, thereby realizing reverse verification and parameter correction of the optimization process.

[0126] The cross-module anomaly collaboration mechanism includes initiating a collaborative adaptation process when any optimization component is detected to be running abnormally or external constraints are updated: for module running abnormally, its predecessor module calls a preset emergency optimization strategy to initiate degradation processing and records an anomaly snapshot to support subsequent breakpoint recovery; for external constraint updates, update instructions are pushed to all optimization components through the constraint synchronization interface, and each module dynamically adjusts optimization parameters based on its own functions to ensure the adaptability of global optimization logic to the new constraints.

[0127] Through the aforementioned forward-progression, reverse-verification, and anomaly collaboration mechanisms, multi-level optimization components form a closed-loop collaborative architecture. While maintaining the functional independence of each module, this architecture enables dynamic adjustment and global consistency in the graphic layout optimization process, thereby enhancing the system's adaptability to complex layout scenarios and the robustness of optimization results.

[0128] In this embodiment, the backbone region is obtained through the following steps:

[0129] The first optimization component uses the node structure features in the second format diagram code and the diagram type information in the metadata to determine the core logic presentation rules of the target diagram. The node structure features include node type, number of nodes or connection density. The diagram type information includes flowchart, architecture diagram or relationship diagram. The core logic presentation rules include, but are not limited to, the linear main flow rules of the corresponding flowchart and the hierarchical main link rules of the corresponding architecture diagram.

[0130] The third optimization component uses the core logic presentation rules output from the first optimization component to extract node connection relationship data from the standardized graph code. This node connection relationship data includes the association between source and target nodes, priority identifiers of connections, and business / technical attribute tags of nodes. Combined with the preset core element definitions in the enterprise meta-model library, the extracted node connection relationship data is analyzed to select key node sequences and key connections that constitute the core logic of the graph. Based on the spatial distribution range of the selected key node sequences and key connections, a continuous set of logic and space is defined as the main trunk area of ​​the graph, and the priority of nodes and connections within the main trunk area is marked. This priority is configured for subsequent priority execution of layout optimization.

[0131] Specifically, the first optimization component first performs targeted collection and standardized parsing of the input data. Its processing objects are the second-format graph code and associated metadata transformed in step S3: the second-format graph code serves as a structured input carrier, fully preserving node definitions, connection relationships, and layout constraints. The module extracts the node structural features through a preset code parsing interface; the metadata parses the chart type information from the fields, clarifies the category of the current processing object, and simultaneously obtains the corresponding basic feature descriptions of this type of chart in the enterprise meta-model library, providing type anchors for subsequent feature analysis. The extraction of node structural features adopts a parametric processing method: node types are labeled and mapped according to the classification system defined in the enterprise meta-model; the number of nodes is counted using a classification statistical model; the connection density is calculated based on the adjacency matrix, with the formula: Connection density = Number of effective connections between core nodes / Total number of connections. Core nodes are determined by labels or node type priority in the metadata, ensuring that the density calculation focuses on key relationships.

[0132] The first optimization component, based on graph type information, constructs a correlation analysis model between node structure features and core logic to achieve precise matching of feature dimensions and type requirements: For flowchart types, the module focuses its analysis on the linear coherence of predecessor-successor relationships and connection relationships among nodes. By traversing the node connection sequence in the second-format graph code, it identifies nodes with a single predecessor and a single successor feature, excludes parallel gateway branch nodes, and calculates the connection density of such nodes to determine the basic skeleton of the linear main flow. Simultaneously, it ignores parallel secondary branch nodes with a connection density <30%, ensuring that feature analysis aligns with the core requirements of linear flow in flowcharts. For architecture graph types, the module... The module shifts its focus to the hierarchical distribution of nodes and the integrity of cross-level connections. It uses the `layerTag` field in node attributes to classify and count the number of nodes hierarchically, calculates the proportion of cross-level connections to the total number of connections, and prioritizes high-priority cross-level connections to strengthen the core logic of hierarchical transmission in the architecture. For relationship graph types, the module focuses on the strength of node associations and the radiation range of core entities. It distinguishes between core and non-core entities using the `entityLevel` tag in node types, counts the proportion of connections to core entities to the total number of connections, and calculates the proportion of high-frequency interaction connections to ensure that the feature analysis aligns with the logical essence of the core associations in the relationship graph.

[0133] Based on the above correlation analysis results, the first optimization component derives and outputs the core logic presentation rules of the target graph. The rules are generated in a structured data format to ensure that the subsequent third optimization component can directly call them: For flowcharts, linear main flow rules are output, specifying the core processing nodes to which the rules apply. Constraint parameters include that the main flow link must include a start node and an end node, the connection density of nodes within the link must be ≥80%, and the connection priority of parallel branch nodes must be lower than that of the main flow link, ensuring the linear continuity and logical uniqueness of the main flow link; For architecture graphs, hierarchical main link rules are output, specifying that the rules apply to core nodes divided by hierarchy. Constraint parameters include that the main link must cover all levels, the cross-level connection ratio must be ≥60%, and the connection of non-core nodes within the same level must not interfere with the cross-level main link, ensuring the integrity of the architecture hierarchy and the clarity of the main link; For relationship graphs, core entity association rules are output, specifying the objects to which the rules apply. Constraint parameters include that the number of connections of core entities accounts for ≥50% of the total number of connections, and high-frequency interaction connections must be retained first, ensuring the prominent presentation of the core association logic of the relationship graph. After all rules are output, the module will also attach a rule validity check flag. If the check passes, it will be synchronized to the rule call interface of the third optimization component. If there is a deviation, the metadata secondary parsing process will be triggered to correct the feature analysis weights and re-derive the rules.

[0134] The main area refers to the key area in the diagram that carries the core logic or main process. It is the set of nodes and connections that determine the overall logical framework of the diagram and reflect the core business / technical relationships. It is different from the non-core areas where secondary branches and auxiliary explanatory elements are located, such as the main process link area of ​​the flowchart from start to core processing step to end, and the related area of ​​core level and core component in the architecture diagram.

[0135] The main area is identified through multi-level optimization components and multi-dimensional data analysis. First, the first optimization component is called, taking the node structure features in the standardized diagram code and the chart type information in the metadata as input. The node structure features include node type, number of nodes, and connection density. The chart type information includes flowchart, architecture diagram, and relationship diagram. The core logic presentation rules corresponding to the target chart are parsed and output, such as the rule for adapting a flowchart to a linear main process and the rule for adapting an architecture diagram to a hierarchical main link. Then, the third optimization component is called, and based on the above core logic presentation rules, node connection relationship data is extracted from the standardized diagram code, covering the association between source nodes and target nodes, connection priority identifiers, and business / technical attribute tags of nodes. Furthermore, the third optimization component defines the core elements pre-defined in the enterprise meta-model library, such as the node types of the main processing and the main level. It performs feature matching and logical filtering on the extracted node connection relationship data to locate the key node sequences and key connections that constitute the core logic of the diagram, such as the continuous node links without redundant branches from the start node to the end node in the flowchart, and the key component connections across the core level in the architecture diagram. Finally, based on the spatial distribution range of the key node sequences and key connections obtained by filtering, the third optimization component delineates a set with continuous logical association and spatial aggregation. This set is the main region. At the same time, it marks the priority of nodes and connections in the main region to provide data basis for subsequent priority execution of layout optimization.

[0136] In this embodiment, the key node sequence and key connection that constitute the core logic of the diagram include, but are not limited to, continuous node links without redundant branches from the start node to the end node in the flowchart, and key component connections across core levels in the architecture diagram.

[0137] In this embodiment, based on the user's input of the target chart requirements, the system extracts the target chart type, layout type, and output format requirements to construct a basic prompt word template. Specifically, the construction of the basic prompt word template first initiates structured parsing based on the user's input of the target chart requirements. Using entity recognition and keyword matching technologies from Natural Language Processing (NLP), combined with the enterprise's pre-set chart type enumeration library (which includes over 20 types of standardized charts such as BPMN diagrams, system architecture diagrams, and data lineage diagrams, along with corresponding feature words), the system accurately extracts the target chart type. For example, when a user requests a diagram of a supply chain procurement process, the system associates the procurement process with business process scenarios, matches feature words from the BPMN business process diagram enumeration library (such as process, stage, and task), eliminates ambiguous options like simple flowcharts, and ultimately determines a unique chart type and labels the application scenario, such as a BPMN business process. The diagram depicts a supply chain procurement scenario. For layout types, if user requirements are clearly defined, such as hierarchical arrangement with vertical and horizontal connections, the layout is directly converted to a hierarchical + orthogonal layout with added details, such as top-to-bottom hierarchical direction and horizontal alignment of nodes within the same layer. If requirements are ambiguous, such as a clear layout, a layout type recommendation model is used, automatically matching based on chart type characteristics. For example, flowcharts default to hierarchical + orthogonal layouts, and network diagrams default to force-guided layouts. Output format extraction must consider both user needs and enterprise compatibility. For example, inserting PPT-compatible vector graphics (SVG), online previewing must be compatible with the enterprise document management system (EDMS) preview interface, resolution ≥72dpi, and printing must support A4 landscape printing with CMYK color mode. These extracted core constraints, including chart type, layout type, and output format, are integrated with enterprise-wide design specifications, such as node fonts and color standards, to construct a structured prompt word template, ensuring clear template logic and coverage of key constraints.

[0138] Based on the specific product type of the target chart, the structured keywords corresponding to that product type are extracted from the enterprise metamodel library and used as product type patches to supplement the basic template, ensuring that the prompts contain product-specific elements and logical relationships.

[0139] Specifically, artifact type patch supplementation requires the injection of exclusive elements and logical reinforcement for scenario adaptation. Based on the determined target chart artifact type, the metadata dictionary of the corresponding artifact is called through the enterprise metamodel library API interface. Structured keywords are extracted from two dimensions: exclusive elements and logical relationships. For the BPMN business process diagram - supply chain procurement scenario, exclusive elements are selected from the element definition table of the metamodel library, including swimlanes divided by organizational structure, gateways with routing rules, service tasks labeled with interface information, and boundary events bound to task nodes. At the same time, exclusive logical relationships defined in the metamodel are extracted to ensure that the model can understand the requirements layer by layer. Field conflicts need to be handled during the splicing process. For example, when both knowledge base references and artifact type patches involve process links, the domain specifications of the knowledge base shall prevail, and the element definitions of artifact type patches shall be used as a supplement for fusion. At the same time, the format is unified, adopting a structured form of module name + content description. Finally, the constraint conflict is checked through the prompt word legality verification submodule. After the verification is passed, the final prompt word is generated to ensure that it can accurately guide the chart generation model to output standardized charts that conform to the enterprise's business specifications and technical environment.

[0140] The system obtains the resource parameters of the model deployment environment, generates deployment space instructions with resource constraints, and adds them to the prompt words. Based on the target chart type, it matches domain knowledge from the enterprise knowledge base, extracts key information as knowledge base references, and adds them to the prompt words. If the user inputs a data query requirement, it calls the Text-to-SQL submodule, generates and executes SQL statements based on the enterprise database metadata, performs summary processing on the obtained dataset, and embeds the dataset summary into the preset fields of the prompt words.

[0141] In another embodiment, the system monitors user input requests in real time through a keyword matching algorithm. When the system detects that the request contains data-related keywords such as query, field, table, statistics, etc., it automatically triggers the Text-to-SQL subprocess. This triggering mechanism is implemented through a preset keyword dictionary and string matching model to ensure that the database interaction link is started only when the user clearly has a data acquisition need, thus avoiding unnecessary resource consumption.

[0142] The Text-to-SQL subprocess calls a domain-tuned T2SQL-LoRA model to perform the SQL statement generation task. The model input includes the user's natural language query intent and enterprise database metadata. A bundle search strategy is adopted, with a bundle width of 4 to balance generation efficiency and candidate diversity. After generating the SQL statement, the model synchronously outputs the statement confidence β. Only when β ≥ 0.85 is the SQL statement considered grammatically compliant and intent-matched, allowing it to proceed to the subsequent execution stage. If β < 0.85, the system will generate a list of candidate SQL statements and trigger a manual confirmation process to avoid database query anomalies due to statement errors.

[0143] The final prompt word is formed by concatenating the aforementioned basic template, artifact type patch, deployment space instructions, knowledge base references, and dataset summaries in a preset order. Specifically, in the image-generated prompt word construction process, the concatenation of the final prompt word must follow the preset technical order of basic template → artifact type patch → deployment space instructions → knowledge base references → dataset summary. The specific technical implementation is as follows: First, the basic template is used as the concatenation base. This template has integrated the target chart type, layout type, output format, and enterprise general design specifications. Before concatenation, consistency verification must be completed through the prompt word legality verification submodule to eliminate conflicts caused by incompatibility between chart type and layout type. Next, the artifact type patch is embedded. This patch is extracted from the enterprise meta-model library based on the target chart artifact type and supplemented to the artifact-specific constraint field of the basic template according to the exclusive element-logical relationship structured format. At the same time, the element association verification ensures that the patch elements are consistent with the target chart artifact type. The basic template chart type is matched; then a deployment space instruction is inserted, which is generated by the model deployment environment monitoring subsystem. This instruction converts parameters such as GPU resources, CPU resources, and memory limits into a constraint format that the model can recognize, and adds environment compatibility constraints, embedding them into the environment constraint field of the basic template; next, a knowledge base reference is added, retrieving relevant domain knowledge from the enterprise knowledge base based on the chart type and domain keywords, extracting key information and labeling the knowledge base source, and ensuring that the referenced content is ≥90% relevant to the chart requirements through a text similarity algorithm, embedding it into the "domain knowledge support" field of the basic template; finally, the dataset summary is encapsulated, integrating the first 5 samples and statistical information of the dataset obtained by the Text-to-SQL submodule into a structured format and encapsulating it into the database. CONTEXT The label block embeds basic template data support fields; during the splicing process, cross-component information contradictions need to be handled through a field conflict reconciliation mechanism, and the format standardization is checked by the Prompt syntax validation submodule. Finally, prompt words that meet the model parsing requirements, are complete in information and have precise constraints are generated to ensure that the model outputs standardized charts that conform to enterprise specifications.

[0144] In this embodiment, as Figure 3As shown, an intelligent chart generation system applicable to multimodal data is also disclosed, including a data preprocessing module 1, a selection and invocation module 2, a format conversion module 3, and a component invocation module 4. The data preprocessing module 1 receives multimodal data input by the user, preprocesses it, and then classifies it to identify the user's intent type, and routes tasks based on the intent recognition results. The selection and invocation module 2 selects an adaptation model based on the task routing results; if the input data contains image information, it invokes a multimodal model; if the input data is only text or structured information, it invokes a language model to construct and generate prompt words. The format conversion module 3 inputs the prompt words into the adaptation model to obtain a first format chart code, performs standardization processing, and converts it into a second format chart code compatible with the target platform, while retaining node definitions, connection relationships, layout constraints, and metadata information. Component calling module 4 is used to call the first optimization component to identify the type of the second format diagram code and determine the appropriate layout strategy, call the second optimization component to perform format size adjustment on each node of the second format diagram code, call the third optimization component to perform alignment correction and partition adjustment on the second format diagram code, call the fourth optimization component to perform connection mark optimization on the second format diagram code, and render and output the optimized second format diagram code.

[0145] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. As for the intelligent chart generation system disclosed in the embodiments, since it corresponds to the intelligent chart generation method applicable to multimodal data disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to the method section.

[0146] In other embodiments, a server is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the intelligent chart generation method for multimodal data as described in the above embodiments.

[0147] If the aforementioned intelligent chart generation system applicable to multimodal data is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various embodiments of the intelligent chart generation method applicable to multimodal data described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

[0149] In summary, the above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made within the scope of the claims of the present invention should be covered by the present invention.

Claims

1. A method for generating intelligent charts applicable to multimodal data, characterized in that, The method comprises the following steps: Receiving and preprocessing multi-modal data input by a user, and then classifying to identify the user intent type, and routing the task according to the intent recognition result; Selecting an adaptive model according to the task routing result, calling a multi-modal model if the input data contains image information, calling a language model if the input data is only text or structured information, and constructing a prompt word; Inputting the prompt word into the adaptive model to obtain a first format graph code, performing standardization processing, converting into a second format graph code compatible with a target platform, and retaining node definition, connection relationship, layout constraint and metadata information; Calling a first optimization component to identify the type of the second format graph code and determine the adaptive layout strategy, calling a second optimization component to perform format size adjustment on each node of the second format graph code, calling a third optimization component to perform alignment correction and partition adjustment on the second format graph code, calling a fourth optimization component to perform connection line identification optimization on the second format graph code, and rendering and outputting the optimized second format graph code; Using the third optimization component to apply a hierarchical layout algorithm to the trunk area to adjust the sequential logic, wherein the trunk area is obtained by the following steps: Using the first optimization component to determine the core logic presentation rule of the target chart based on the node structure characteristics in the second format graph code and the chart type information in the metadata; Using the third optimization component to extract the node connection relationship data in the standardized graph code based on the core logic presentation rule output by the first optimization component; Analyzing the extracted node connection relationship data in combination with the preset core element definition in the enterprise meta-model library, screening out the key node sequence and key connection line constituting the core logic of the chart, and marking the priority of the nodes and connection lines in the trunk area according to the spatial distribution range of the screened key node sequence and key connection line, wherein the priority is configured to be used for subsequent priority execution of layout optimization.

2. The method for intelligent graph generation with multi-modal data as claimed in claim 1, wherein, The method of receiving and preprocessing multi-modal data input by a user, and then classifying to identify the user intent type, and routing the task according to the intent recognition result comprises: Receiving multi-modal data input by a user, wherein the multi-modal data comprises natural language text, hand-drawn sketch images, screenshot images, scanned documents or structured documents; After preprocessing the received multi-modal data, inputting the data into an intent recognition module for identification and classification to obtain the user intent type, wherein the intent type comprises screenshot import, chart generation, chart modification and document import; If the intent is screenshot import, inputting the input data into a multi-modal model processing link; if the intent is chart generation, inputting the input data into a chart generation module processing link; if the intent is chart modification, inputting the input data into an incremental editing module processing link; if the intent is document import, inputting the input data into a document parsing module processing link; and if the intent recognition confidence is lower than a preset threshold, outputting a clarification request to obtain user supplementary information.

3. The method for intelligent graph generation with multi-modal data as claimed in claim 1, wherein, The method of constructing a prompt word specifically comprises the following steps: by the formula combinatorial stitching to generate prompt words, wherein is a base template containing graph type, layout, output format information, is a product type patch containing lane and gateway information, is a deployment space instruction, is a knowledge base reference containing enterprise terminology and modeling rule class context information; converting the graph code result output by the model into an intermediate representation format, which describes the core information of the graph in a structured manner, including node definition, layout rule, and metadata information; the intermediate representation format supports standardized storage for internal processing and bidirectional conversion with external platform graph formats, including vsdx, draw.io XML, or Graph ML.

4. The method for intelligent graph generation with multi-modal data as claimed in claim 3, wherein, The intelligent chart generation method specifically comprises: The first optimization component is used for jointly modeling the second format graph adjacency structure and the semantic embedding vector, and a discriminant function is used for calculating the probability that the graph belongs to a type The discriminant function is used for calculating the probability that the graph belongs to a type The discriminant function is used for calculating the probability that the graph belongs to a type The discriminant function is used for calculating the probability that the graph belongs to a type The discriminant function is used for calculating the probability that the graph belongs to a type , and the value range is [0, 1]; is an activation function, which is used for mapping the linear operation result to the interval [0, 1] and outputting in the form of probability; is a weight matrix, which is used for weighting the vectorized features of the adjacency matrix and reflecting the influence weight of the connection relationship between the graph nodes in the type identification; is a vectorization operation on the adjacency matrix A, and the adjacency matrix A is used for describing the connection relationship between the nodes in the graph; is a weight matrix, which is used for weighting the semantic embedding vector; is a semantic embedding vector, which is the result of vectorization coding of the overall semantic information of the graph; is used for determining the finally identified graph type, wherein represents that, from each type of candidate type , the type with the maximum probability is selected as the result; when the identified type is a flowchart and the confidence is greater than a preset value, a combination strategy of hierarchical layout and orthogonal layout is selected as the optimization main path; The size and arrangement adjustment is performed on each node using the second optimization component, and when it is detected that the text width is greater than the preset width value, the node width is automatically expanded, and the spacing of adjacent nodes is adjusted through a preset spacing loosening algorithm.

5. The intelligent chart generation method for multi-modal data according to claim 4, characterized in that: The key node sequence and the key connection line constituting the core logic of the chart include the continuous node link of the non-redundant branch from the starting node to the terminating node in the flowchart, and the key component connection across the core level in the architecture diagram.

6. The method for intelligent graph generation with multi-modal data as claimed in claim 5, wherein, According to the task routing result, an adaptive model is selected, a multi-modal model is called if the input data contains image information, and a language model is called if the input data is only text or structured information, and the generation of the prompt word specifically includes: According to the target chart demand determined by the user input, the target chart type, layout type and output format requirement are extracted, and a prompt word basic template is constructed; Based on the specific product type of the target chart, the structured keywords corresponding to the product type are extracted from the enterprise meta-model library and supplemented to the basic template as a product type patch to ensure that the prompt word contains product-specific elements and logical relationships; The resource parameters of the model deployment environment are obtained, the deployment space instruction containing resource constraints is generated and supplemented to the prompt word, the domain knowledge is matched from the enterprise knowledge base based on the target chart type, the key information is extracted as a knowledge base reference and supplemented to the prompt word, if the user input contains data query requirement, the Text-to-SQL sub-module is called, the SQL statement is generated according to the enterprise database metadata and executed, and the data set is abstracted after the data set is abstracted, and the data set abstract is embedded in the prompt word preset field; The above basic template, product type patch, deployment space instruction, knowledge base reference and data set abstract are spliced in a preset order to form a final prompt word.

7. An intelligent chart generation system for multi-modal data, characterized in that, It includes: A data preprocessing module for receiving and preprocessing multi-modal data input by a user and classifying to identify user intent types, and routing tasks according to the intent recognition result; A selection and calling module for selecting an adaptive model according to the task routing result, calling a multi-modal model if the input data contains image information, and calling a language model if the input data is only text or structured information, and constructing and generating a prompt word; A format conversion module for inputting the prompt word into an adaptive model to obtain a first format chart code and performing standardization processing, and then converting it into a second format chart code compatible with a target platform while retaining node definition, connection relationship, layout constraint and metadata information; The component calling module is configured to call the first optimization component to identify the type of the second format graph code and determine an adaptive layout strategy, call the second optimization component to perform format size adjustment on each node of the second format graph code, call the third optimization component to perform alignment correction and partition adjustment on the second format graph code, call the fourth optimization component to perform connection line identification optimization on the second format graph code, and perform rendering output on the optimized second format graph code, wherein the third optimization component is configured to apply a hierarchical layout algorithm to adjust sequential logic in a trunk area, and the trunk area is obtained by: using the first optimization component to determine a core logic presentation rule of a target graph based on node structure features in the second format graph code and graph type information in the metadata; using the third optimization component to extract node connection relationship data in the standardized graph code based on the core logic presentation rule output by the first optimization component, analyze the extracted node connection relationship data in combination with preset core element definitions in the enterprise meta-model library, and filter out key node sequences and key connection lines that constitute core logic of the graph; and according to the spatial distribution range of the filtered key node sequences and key connection lines, delimiting a continuous logical and spatial set as the trunk area of the graph, and marking the priority of nodes and connection lines in the trunk area, wherein the priority is configured to be used for subsequent priority execution of layout optimization.

8. A server comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.

9. A computer readable storage medium, the computer readable storage medium storing a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the method of any one of claims 1-6.

Citation Information

Patent Citations

  • Intelligent chart dynamic generation method based on voice recognition and multi-modal interaction

    CN120670583A

  • Method and device for generating data analysis large screen and data analysis system

    CN120892512A