Intelligent chart generation method and system suitable for multi-modal data and storage medium

By preprocessing and intent recognition of multimodal data, combined with adaptation models and optimization components, the shortcomings of general text-based graph models in generating professional diagrams and charts are addressed, achieving efficient and accurate intelligent graph generation and editing that adapts to multimodal input and is platform compatible.

CN121117072AActive Publication Date: 2025-12-12HANGZHOU SHUOPAN INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Existing general 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, users need to perform a lot of manual operations when modifying generated diagrams, and the ability to parse long text and incrementally edit diagrams is limited.

Method used

By receiving and preprocessing multimodal data, identifying user intent types and routing tasks, selecting an appropriate model, constructing and generating prompts, calling multiple optimization components to standardize and optimize graph code, and finally rendering the output, including the retention and adjustment of node definitions, layout constraints, and metadata information.

Benefits of technology

It enables intelligent chart generation from multimodal data, improving the accuracy and efficiency of generating professional schematic diagrams and tables, reducing manual operations by users, supporting multimodal input, and adapting to compatibility with different platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117072A_ABST
    Figure CN121117072A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent chart generation method and system suitable for multi-modal data and a storage medium, and the method comprises the steps: receiving and preprocessing the multi-modal data, and completing user intention type recognition and task routing; selecting an adaptive model according to a routing result, and constructing and generating a cue word; standardizing an initial graph code output by the model into an intermediate representation format containing a metadata field, converting the intermediate representation format into a graph code compatible with a target platform, and reserving node definition, a connection relation, layout constraint and metadata information; the method comprises the following steps: respectively completing chart type identification and layout strategy determination, node format size adjustment, overall layout alignment correction and partition adjustment, and connection line identifier optimization through four optimization components, and rendering and outputting a chart. The problem that due to the fact that an existing model lacks a special optimizing and processing mechanism for the structured chart, the effect is remarkably poor when a professional schematic chart needing an accurate logic structure and geometric constraints is generated is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of artificial intelligence and graphical modeling visualization technology, and particularly relates to an intelligent chart generation method and system suitable for multi-modal data and a storage medium. BACKGROUND

[0002] At present, the existing general text-to-diagram model mainly focuses on meeting the general text-to-diagram needs, and adopts a unified processing method, that is, in the training process, the structured chart is regarded as ordinary image data, and the same feature extraction and generation mechanism is used for processing. For example, various types of image content such as flowchart, relationship diagram, architecture diagram and other image types such as natural image, artwork and other image types are subjected to the same embedding coding processing. Due to the lack of special optimization and processing mechanism for structured charts, these general models have significantly poor effect when generating professional schematic charts such as flowchart, relationship diagram and architecture diagram which require accurate logical structure and geometric constraints. In addition, the long text analysis and chart incremental editing capability of these existing natural language generation structured charting tools is limited, and users often need to perform a large amount of manual operation when modifying the generated chart, and there are problems such as single style, simple architecture and no support for multi-modal input, thereby limiting the user's use scenarios and efficiency. SUMMARY

[0003] The present application discloses an intelligent chart generation method suitable for multi-modal data, which comprises the following steps:

[0004] After receiving and preprocessing the multi-modal data input by the user, the multi-modal data is classified to identify the user intent type, and the task routing is performed according to the intent recognition result;

[0005] According to the result of task routing, an adaptive model is selected, if the input data contains image information, a multi-modal model is called, if the input data is only text or structured information, a language model is called, and a generation prompt word is constructed;

[0006] The prompt word is input into the adaptive model to obtain a first format chart code, and after standardization processing, the first format chart code is converted into a second format chart code compatible with the target platform and the node definition, connection relationship, layout constraint and metadata information are retained;

[0007] A first optimization component is called to identify the type of the second format chart code and determine the adaptive layout strategy, a second optimization component is called to perform format size adjustment on each node of the second format chart code, a third optimization component is called to perform alignment correction and partition adjustment on the second format chart code, and a fourth optimization component is called to perform line identification optimization on the second format chart code, and the optimized second format chart code is rendered and output.

[0008] Preferably, the multi-modal data input by the user is received and preprocessed, and then classified to identify the user intent type, and the task is routed according to the intent recognition result, including:

[0009] The multi-modal data input by the user is received, including natural language text, hand-drawn sketch images, screenshot images, scanned documents or structured documents.

[0010] The received multi-modal data is preprocessed and input into the intent recognition module for identification and classification to obtain the user intent type, including screenshot import, chart generation, chart modification and document import.

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

[0012] Preferably, the construction of the prompt word specifically includes the following steps:

[0013] The prompt word is generated by combining and splicing through the formula The prompt word is generated by combining and splicing through the formula is a basic template containing information of chart type, layout and output format, 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 context information; the graph code result output by the model is converted into an intermediate representation format, which describes the core information of the chart in a structured manner, including node definition, layout rule and metadata information; the intermediate representation format supports standardized storage for internal processing, and supports 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 second format graph adjacency structure and semantic embedding vector are jointly modeled using a first optimization component, and the graph type is identified through a discriminant function The chart type is identified; 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.

[0016] The size and arrangement adjustment is performed on each node using a second optimization component, and when it is detected that the text width is greater than a preset width value, the node width is automatically expanded, and the spacing between adjacent nodes is adjusted through a preset spacing loose algorithm;

[0017] The hierarchical layout algorithm is applied to the trunk area using a third optimization component to adjust the sequential logic, the force-directed layout algorithm is used to maintain the overall visual balance if there is a mesh substructure, and the alignment correction and spacing specification are performed on the swim lane or partition structure; and the preset global coordination algorithm is used to access the graph rule knowledge base to obtain the best global layout modification algorithm corresponding to different types of graphs.

[0018] The application further discloses an intelligent graph generation system suitable for multi-modal data, which comprises:

[0019] A data preprocessing module is configured to receive multi-modal data input by a user, pre-process the data, classify the data to identify the user's intention type, and perform task routing according to the intention identification result.

[0020] A selection and calling module is configured to select an adaptive model according to the task routing result, call a multi-modal model if the input data contains image information, call a language model if the input data is only text or structured information, and construct a prompt word.

[0021] A format conversion module is configured to input the prompt word into the adaptive model to obtain a first format graph code, perform standardization processing on the first format graph code, convert the first format graph code into a second format graph code compatible with a target platform, and retain node definition, connection relationship, layout constraint and metadata information.

[0022] A component calling module is configured to call a first optimization component to identify the type of the second format graph code and determine an adaptive layout strategy, call a second optimization component to perform format size adjustment on each node of the second format graph code, call a third optimization component to perform alignment correction and partition adjustment on the second format graph code, call a fourth optimization component to perform connection line identification optimization on the second format graph code, and render and output the optimized second format graph code.

[0023] The application further discloses a server, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method according to any one of the preceding embodiments when executing the computer program.

[0024] The application further discloses a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method according to any one of the preceding embodiments when executed by a processor.

[0025] The application discloses a kind of intelligent chart generation method, system and storage medium suitable for multi-modal data, by receiving the multi-modal data of user input and pre-processing is classified to identify user intent type, according to the task routing of intention recognition result;According to the result of task routing, select adaptive model, if input data contains image information, then call multi-modal model, if input data is only text or structured information, then call language model, build generation prompt word;The prompt word is input into adaptive model to obtain first format graph code and is standardized after processing, it is converted into the second format graph code compatible with target platform and retains node definition, connection relationship, layout constraint and metadata information;Call first optimization component to identify the type of second format graph code and determine the layout strategy of adaptation, call second optimization component to execute format size adjustment to each node of second format graph code, call third optimization component to carry out alignment correction and partition adjustment to the second format graph code, call fourth optimization component to execute the line identification optimization of second format graph code, and the second format graph code after optimization is rendered and output.It solves the problem that the existing general text graph model is significantly poor in generating flowchart, relationship diagram, architecture diagram and other professional schematic charts that need accurate logical structure and geometric constraint due to lack of special optimization and processing mechanism for structured chart.

[0026] Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following description and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0027] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:

[0028] Figure 1 The specific flowchart of the intelligent chart generation method suitable for multi-modal data disclosed by an embodiment of the application.

[0029] Figure 2 The specific flowchart of step S1 disclosed by an embodiment of the application.

[0030] Figure 3 The structure diagram of the intelligent chart generation system suitable for multi-modal data disclosed by an embodiment of the application. DETAILED DESCRIPTION

[0031] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the described embodiments of the present application, all other embodiments obtained by a person of ordinary skill in the art without any inventive effort fall within the scope of protection of the present application.

[0032] Unless otherwise defined, technical terms or scientific terms used herein should be understood as having the common meaning in the field of the present application to which they pertain. The terms "first", "second", and similar terms used in the embodiments do not denote any order, quantity, or importance, but are used to distinguish different components. Similarly, the terms "one" or "a" or similar terms do not denote a quantity of one, but rather denote the existence of at least one.

[0033] In the embodiments, as shown in the accompanying drawings, Figure 1 The embodiments disclose an intelligent chart generation method applicable to multi-modal data, which can specifically include the following steps:

[0034] Step S1, receiving multi-modal data input by a user and performing preprocessing and classification to identify a user intent type, and performing task routing according to an intent recognition result.

[0035] The intelligent chart generation method applicable to multi-modal data can be integrated in an enterprise intelligent management operating system. In this step, by receiving multi-type multi-modal data such as natural language text, hand-drawn sketch images, screenshot images, scanned documents, or structured documents, and integrating diversified information carriers such as text descriptions, visual sketches, and existing documents, subsequent processing is no longer dependent on a single data form. Through preprocessing of the input data, various types of raw data can be optimized and regularized, and interference factors such as data format differences and redundant information can be eliminated, laying a foundation for subsequent accurate identification of user needs. At the same time, based on the preprocessed data, the user intent type classification can determine whether the user needs to generate a new chart, import external data for charting, modify an existing chart, or parse a document to extract a chart structure, and finally the requests with different intents can be accurately distributed to the subsequent adaptive processing modules through task routing.

[0036] In the whole link of multi-modal data preprocessing-user intent recognition-task routing in step S1, the data preprocessing model is the core technical support for semantic analysis and accurate decision-making, and its application is first concentrated in the user intent recognition link.

[0037] In the embodiments, as shown in the accompanying drawings, Figure 2 The step S1 can include the following contents.

[0038] Step S11, receiving user inputted multi-modal data, the multi-modal data including natural language text, hand-drawn sketch image, screenshot image, scanned document or structured document.

[0039] By constructing a multi-modal data receiving interface, raw collection and aggregation of multi-type input data such as natural language text, hand-drawn sketch image, screenshot image, scanned document and structured document are realized. The architecture limitation of traditional graphic modeling tools with single modal input is broken through, and by compatible text, visual and structured multi-dimensional data carriers, complete and undistorted raw data sources are provided for multi-modal data preprocessing and user intent recognition steps downstream of the system, ensuring that subsequent modules can carry out semantic analysis and feature extraction based on comprehensive input information.

[0040] Step S12, after pre-processing the received multi-modal data, inputting the intent recognition module for recognition and classification, obtaining the user intent type, the intent type including screenshot import, chart generation, chart modification and document import.

[0041] First, pre-processing operation is carried out on the received multi-modal raw data, by normalizing the format differences of different types of data such as text, image and document, eliminating redundant interference information and unifying data representation form, the quality unevenness and format confusion problems of multi-modal data due to different sources are solved, then the standardized data after pre-processing is input into the intent recognition module, the precise classification of user demand is completed, the specific intent type of the user belonging to screenshot import, chart generation, chart modification or document import is determined, and clear task orientation is provided for the downstream function modules of system multi-modal model calling, graph code generation and incremental editing module.

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

[0043] Step S121, deploying a user intent recognition module, through a fine-tuned parameter language model, completing the intent classification of user input through single inference.

[0044] Wherein the user intent recognition module can use a fine-tuned 7B language model to classify each round of user input content through single inference, and automatically judge the operation intent behind the user request. In the classification process, the logic of probability distribution is used to determine the intent type, wherein the prompt words prompt used to guide the model judgment contain key information such as platform context and task instruction template.

[0045] ;

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

[0047] ​wherein fine-tuning the model comprises performing fitness evaluation on the model, calculating a comprehensive score wherein is the node type recognition accuracy, is the style restoration accuracy, is the connection relationship validity and direction correctness, is the naming standard compliance degree, when when <0.85, the fine-tuning process is started, respectively. corresponding weights.

[0048] Introducing a low-rank decomposition matrix in the attention layer of the pre-trained language model wherein r is much smaller than d and k, only about 0.1% of the parameters are trained to realize the injection of professional ability, to inject the professional knowledge of chart semantic description and logical structure, so that the model can understand and generate natural language to graph code mapping; add LoRA adaptation layer in the visual language model to enhance the detection and recognition ability of nodes, lines, arrows, lanes and other chart elements, realize the conversion from image to structured graph code; and fine-tune based on the training data set containing natural language-graph code paired samples and sketch / screenshot-graph code paired samples, which covers flowchart, architecture diagram, relationship diagram and other types.

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

[0050] Single intent: if there is a type P(type)>0.7, directly select this type;

[0051] Mixed intent: if more than one type P(type i )>0.4, then trigger multi-task routing at the same time;

[0052] Uncertain request: if all probabilities are <0.4, the system triggers a clarification prompt to request the user to confirm the intent.

[0053] Specifically, if the probability of a certain intent type is greater than 0.7, it is determined as a single intent hit, and the type is directly selected as the core demand of the user; if the probability of multiple intent types is greater than 0.4, it is determined as a mixed intent, and a multi-task routing mechanism is triggered to respond to multiple demands; if the probability of all intent types is less than 0.4, it belongs to an uncertain request, and the system will automatically trigger a clarification prompt to confirm the specific intent of the user. This confidence-based gating mechanism can not only ensure the response efficiency of the system, but also improve the classification accuracy, effectively avoiding incorrect processing of user requests in low confidence situations.

[0054] Step S123, a multi-dimensional input preprocessing process is constructed to perform pre-processing on user input data, and input preprocessing and context enhancement are realized.

[0055] Before the user input enters the intent recognition model, it will first go through a series of standardization operations:

[0056]

[0057] Among them, through text normalization processing Normalize(text) to remove noise information in the input, standardize the use of punctuation marks, and unify the text format to ensure that the input content is neat and unified; according to the type of user uploaded attachments, image or document, inject corresponding feature information FileTypeEmbed, so that the model can adapt to different input forms; At the same time, introduce historical dialogue fragments, pre-graphics ID and other context information ContextEmbed to provide the model with more rich semantic support.

[0058] Step S124, a static mapping routing table is constructed based on the intent classification result to realize accurate binding of user requests and system function modules.

[0059] Specifically, the final classification result of intent recognition will be used for module-level processing routing of the system: when the user input is a screenshot, it will be routed to a multi-modal structure recognition model to specifically process image input; when the user intent is to generate a graph, the graph structure generation module will be called to create a corresponding graph from the text content; if the user demand is to modify an existing graph, the incremental editing module will be triggered to adjust the existing graph code; when the input is a document, the document parsing module will be enabled to extract graph structure information from the document. This routing mechanism is realized through static table driving, and if more task types need to be expanded in the future, such as graph comparison and graph summary, the overall architecture of the classifier does not need to be modified, and it has good scalability.

[0060] Step S125, for the core functions of intent recognition and task routing, performance verification and scene adaptability evaluation are completed through multi-dimensional real business scene measurement.

[0061] ​Step S13, if the input data is a screenshot import intent, input the data into the multi-modal model processing link; if it is a chart generation intent, input the data into the chart generation module processing link; if it is a chart modification intent, input the data into the incremental editing module processing link; if it is a document import intent, input the data into the document parsing module processing link; if the intent recognition confidence is lower than the preset threshold, output a clarification request to obtain user supplementary information.

[0062] According to the user intent type output by 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 be allocated to the corresponding dedicated processing link, ensuring that each demand scenario is matched with the professional module, and at the same time, an intent recognition confidence checking link is set, when the confidence of the intent recognition result does not reach the preset threshold, a clarification request is actively output to obtain user supplementary information. This routing mechanism is driven by a static table, allowing more types such as compare and summarize to be extended without changing the classifier architecture; the incremental editing module is used to receive multi-modal data of chart modification intent, and performs incremental editing processing on the existing chart, the incremental editing being the current graph code, supporting local adjustment and attribute update based on user input, and realizing precise chart modification; the document parsing module is upstream of intent recognition, mainly giving the current input type to the intent recognition, or directly judging the user intent without skipping the intent recognition module.

[0063] Step S2, according to the result of task routing, select the adaptive model, if the input data contains image information, call the multi-modal model, if the input data is only text or structured information, call the language model, and construct the generation prompt word.

[0064] Step S2 is based on the result of task routing output by step S1, according to whether the input data contains image information, call the multi-modal model or the language model, the multi-modal model focuses on image input, and the language model focuses on text or structured information; at the same time, by constructing an effective generation prompt word, a bridge between user demand and model output is built, and the user intent and key information in the input data are converted into instructions that the model can accurately understand.

[0065] The prompt word used in the graph code generation task is automatically composed of four parts of content:

[0066] ;

[0067] Among them, the first part is a general system template , including chart types such as BPMN chart, layout style, style theme, and metadata information; the second part is according to the product type , the product type is the type of the chart in the specific business, such as the flow architecture chart, the activity flow chart, the business architecture chart, etc., used to guide the organization way of the chart elements; the third part is the knowledge base content according to the deployment environment , such as the related parameters of the edge GPU and the public cloud setting, used to control the token quantity, the inference precision, and the batch processing strategy; the fourth part is the knowledge base content automatically matched or manually selected , which will embed the related terms, field definitions, and modeling rules, etc. context information. Specifically, the prompt word contains four parts: the basic template, the molding patch, the deployment space instruction, and the knowledge base reference, which ensures that the fine-tuned model accurately understands the user's demand.

[0068] Step S3, input the prompt word into the adaptation model to obtain the first format chart code and perform standardization processing, then convert it into the second format chart 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 adaptation model according to the input modal type I∈{0,1} :

[0070] ;

[0071] In this embodiment, the multi-modal model MM-LoRA can be selected to adapt to the screenshot import scene. In the multi-modal feature fusion stage, the fusion weight α=0.6 is used to regulate the fusion proportion of text and visual features, and the rank rv=16 of visual LoRA is set to optimize the parameter scale and representation ability; with the help of the cross-attention mechanism cross-attention between text description and image information, the interaction and fusion of cross-modal features are completed, and finally the structured chart code containing nodes, lines and position constraints is generated, realizing the conversion from image to graph structure.

[0072] The language model LLM-LoRA can be selected to adapt to pure text or form input scenarios. The model configuration LoRA rank is 32, balancing between lightweight fine-tuning and semantic expressiveness; by setting the sampling strategy of generation temperature T=0.3, top-p=0.9, the generated graph structure and graph code have semantic accuracy and are consistent with the enterprise style specification, meeting the generation requirements of text to compliant graph structure. The graph code required by the prompt word generated in step S2 is converted into a unified intermediate representation format, which uses a JSON-like structured way to describe the core information of the chart, including the nodes array (node definition), edges array (connection relationship), metadata field (product type, version hash, and other metadata information), and xml_raw field (complete original XML). It not only supports standardized storage for internal processing, but also through the XML conversion engine and various external platform graph formats (draw.io XML, Graph ML, etc.) for bidirectional conversion, maintaining the integrity of nodes, connections, layout constraints, and style parameters during the conversion process, realizing cross-platform lossless compatibility and enterprise customized style extension, ensuring that the generated chart not only conforms to industry standards but also meets the specific organization's visual and business rules.

[0073] In step S4, a first optimization component is called to identify the type of the second format graph code and determine the adaptive layout strategy, a second optimization component is called to perform format size adjustment on each node of the second format graph code, a third optimization component is called to perform alignment correction and partition adjustment on the second format graph code, and a fourth optimization component is called to perform connection identification optimization on the second format graph code, and the optimized second format graph code is rendered and output.

[0074] Specifically, the first optimization component matches the layout strategy that conforms to the logical characteristics and visual specifications of the specific chart type corresponding to the second format graph code by identifying the specific chart type corresponding to the second format graph code; the second optimization component focuses on fine-tuning adjustment at the node level, and performs format size adjustment, label position calibration, and optimization of node spacing to ensure the clarity of node presentation; the third optimization component performs overall alignment correction and partition adjustment on the chart; the fourth optimization component performs connection identification optimization, including planning a reasonable connection path, adjusting the connection to a regular orthogonal style, and smoothing the connection; finally, through rendering output, the optimized second format graph code is converted into a directly usable visual chart, completing the conversion from code to intuitive graph.

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

[0076] In step S41, a first optimization component is used to jointly model the second format graph adjacency structure and semantic embedding vectors, and a discriminant function is used to determine the adaptive layout strategy. , Identify the chart type, and when the type is identified as a flowchart and the confidence is greater than a preset value, select the combination strategy of hierarchical layout and orthogonal layout as the optimization main path.

[0077] The discriminant function: is used to calculate the probability that the chart belongs to the type . Wherein, represents the probability that the input chart belongs to a certain candidate type , wherein ∈{flowchart, organization chart, topology chart}, the value range is [0, 1]; is an activation function, which maps the linear operation result to the interval [0, 1] to output in the form of probability; is a trainable weight matrix, which is used to weight the vectorized features of the adjacency matrix, reflecting the influence weight of the connection relationship of the chart nodes in type identification; is the vectorization operation of the adjacency matrix A, such as expanding by column or by row into a one-dimensional vector, wherein the adjacency matrix A is used to describe the connection relationship between the nodes in the chart, such as the flowchart, judgment box and other elements, and the matrix elements reflect the existence or weight of the connection between nodes; is a trainable weight matrix, which is used to weight the semantic embedding vector, reflecting the influence weight of the overall semantics of the chart in type identification; is a semantic embedding vector, which is the result of vectorizing the overall semantic information of the chart, integrating multi-dimensional semantics such as text and vision.

[0078] The formula is used to determine the final identified chart type; wherein represents the most likely chart type identified from all candidate types; represents the type selected from each type of candidate type , which makes the probability the largest as the result.

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

[0080] In the embodiment, the first optimization component synchronously collects the adjacency structure and the semantic embedding vector of the input second format graph for joint modeling. The adjacency structure is in the form of an adjacency matrix A, which accurately depicts the topological connection relationship between various nodes in the second format graph, such as flowchart flow blocks, judgment blocks, start and end blocks, and other elements, including predecessor-successor association, parallel branch association, and other node properties, to provide a bottom-topological basis for identifying the structure characteristics of the graph. 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 multi-modal pre-training model, which is used to supplement the semantic properties that cannot be covered by structure alone, making the graph type identification more in line with actual business expression. The multi-modal pre-training model includes the fusion of text description, visual element features, and other multi-dimensional information.

[0081] The first optimization component performs graph type reasoning on the joint modeled information through a preset discriminant function: in the discriminant function, is a vectorization operation on the adjacency matrix A by column or row, which converts the two-dimensional topological structure into a one-dimensional feature sequence; the linearly fused features are mapped to the [0, 1] interval, outputting the probability of each candidate graph type ; finally, the graph type with the highest probability is selected as the recognition result through .

[0082] When the recognition type output by the discriminant function is a flowchart, and the probability corresponding to this type, i.e., the confidence, is greater than the system preset threshold, the first optimization component will select the combination strategy of hierarchical layout and orthogonal layout as the main path for subsequent layout optimization. Hierarchical layout can arrange the nodes of different stages of the process in order to ensure that the process order is intuitive and discernible. Orthogonal layout can constrain the connection lines between nodes to extend along the horizontal or vertical direction as much as possible, greatly reducing the visual intersection and confusion caused by diagonal lines. If the recognition confidence is lower than the preset threshold, the system will trigger the clarification or supplementary information flow to avoid mismatching the layout strategy 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, first, perform the conversion operation from XML format to JSON format. During the conversion process, the coordinate data describing the position of the graph element in XML needs to be quantized. Through a preset coordinate mapping rule, the original floating-point coordinate values are converted to integer coordinates that meet the enterprise's specifications, ensuring the consistency of the position of the graph element in different devices or environments. At the same time, a style mapping function is called, which takes the original color value of the graph element in XML as input and replaces the original color with the corresponding standard enterprise color according to the color matching standard of the enterprise color library, achieving the uniformity of the visual style of the graph element.

[0084] Step S42, using the second optimization component to perform size and arrangement adjustment on each node, when detecting that the text width is greater than the preset width value, automatically expanding the node width, and adjusting the distance between adjacent nodes by the preset interval loosening algorithm.

[0085] The preset interval loosening algorithm is: When the actual distance between nodes is small, the adjustment amount is large, thereby effectively avoiding node overlap; after adjustment, the minimum distance between adjacent nodes is ensured to be ≥40px, realizing node size adaptive adjustment, automatic line breaking and alignment of text labels, and interval optimization of adjacent nodes.

[0086] Wherein, represents the interval adjustment amount between the i-th node and the j-th node; represents a coefficient for controlling the strength of interval adjustment, and takes a value of , i.e. 200 square pixels; is the target reference distance between the i-th node and the j-th node, wherein, ; represents the unit directional vector between the i-th node and the j-th node, used to determine the adjustment direction.

[0087] Step S43, using the third optimization component to apply a hierarchical layout algorithm to the main trunk area to adjust the sequential logic, using a force-directed layout algorithm to maintain overall visual balance if there is a mesh substructure, and performing alignment correction and interval specification for swim lane or partition structure; using a preset global coordination algorithm, by accessing a graph rule knowledge base to obtain the best global layout modification algorithm corresponding to different types of graphs.

[0088] Specifically, step S43 completes the professional adjustment of complex graph layout through the double-layer logic of local structure differentiation optimization + global coordination integration, and the specific technical implementation is as follows:

[0089] Step S431, focusing on the precise layout optimization of the local structure of the graph, based on the logical characteristics and visual needs of different structure types, using a differentiated algorithm strategy to realize the coordinated improvement of layout quality and logical readability.

[0090] The differentiated algorithm strategy includes hierarchical layout algorithm application of the main trunk area, force-directed layout algorithm adaptation of the mesh substructure, and alignment correction and interval specification of the swim lane / partition structure.

[0091] For the confirmed chart trunk area, that is, the key node sequence and the connection set bearing the core logic, the third optimization component first calls the hierarchical layout algorithm to analyze the sequential logical association of the nodes in the trunk area. Based on the predecessor-successor attribute in the node connection relationship, the trunk nodes are divided into multiple logical levels. The algorithm determines the arrangement order of the nodes in each level by calculating the in-degree / out-degree and the association weight of the nodes: the nodes in the same level are arranged according to the business priority, such as the nodes marked for core processing are preferentially arranged in the center or the data flow direction, the cross-level nodes are aligned through vertical projection, the connection between the nodes in the upper and lower levels is as vertical as possible to reduce the cross of diagonal lines and optimize the connection direction. The in-degree / out-degree of the nodes reflects the importance of the position of the nodes in the core logic, and the association weight reflects the core degree of the connection between the nodes.

[0092] When the module detects that there is a mesh substructure in the chart, it automatically switches to the force-directed layout algorithm. The algorithm gives the nodes in the mesh substructure a basic repulsive force to avoid excessive aggregation of the nodes and prevent visual congestion; for the nodes with connection relationship, the algorithm constrains the distance between the nodes through the attraction of the connection to ensure the clarity of the association relationship; at the same time, the algorithm sets the boundary repulsive force parameter according to the relative position of the mesh substructure and the trunk area to avoid the mesh substructure from occupying the space of the trunk area.

[0093] For the chart containing lanes or partitions, the module performs two core operations: one is alignment correction: based on the preset lane / partition alignment standard in the graph rule knowledge base, the current position deviation of the lane / partition is detected through the coordinate verification algorithm, and the lane boundary is automatically corrected to the horizontal / vertical direction to ensure that the boundary lines of all lanes / partitions are parallel and aligned; at the same time, the nodes in the partition are adjusted according to the left alignment, center alignment or right alignment according to the preset rules of the chart type to eliminate the problem of chaotic arrangement of the nodes in the partition. The second is spacing specification: the module calls the lane spacing threshold and partition spacing threshold stored in the graph rule knowledge base to calculate the spacing deviation of the current lane / partition, and automatically adjusts the spacing to the standard threshold: for the lane, ensure the uniform spacing between adjacent lanes; for the partition, ensure that the partition spacing meets the visual differentiation requirement and does not waste the chart space, and at the same time, the spacing is coordinated and unified with the spacing of the trunk area and the mesh substructure.

[0094] Step S432, relying on the global coordination algorithm, the algorithm matching and conflict mediation driven by the knowledge base, and the two-dimensional visual balance control, the local structure and the overall layout are coordinated and unified.

[0095] Specifically, firstly, the parameterized reading of chart core information is completed to obtain chart type and key structural parameters; then, a graph rule knowledge base is accessed, which internally stores global layout optimization rule systems and algorithm mapping relationships of different chart types to guarantee main level clarity, and a partition alignment-main level collaborative algorithm corresponding to the architecture chart is used to strengthen the regularity of partition boundaries. The global coordination algorithm accurately retrieves the global layout algorithm adapted to the current chart characteristics from the knowledge base through a triple collaborative matching mechanism of chart type-structural parameter-optimization rule, avoids the adaptability defects of general algorithms in specific scenarios, and ensures the pertinence and effectiveness of algorithm selection.

[0096] In another embodiment, the intelligent chart generation method further comprises optimizing the connection line routing according to the path obstacle avoidance priority using a fourth optimization component, using an A* search algorithm, and a cost function being: ; an orthogonal fold point path smoothed by a cubic curve: ; reducing edge crossings and visually jarring features.

[0097] The cost function is used to measure the pros and cons of the path, and the lower the cost, the better the path; wherein, represents the total cost of the path, which is the core index for judging whether the path is better, and the algorithm selects the optimal path according to this value; and represent the indicator function, wherein, represents the edge crossing indicator function, if the path has edge crossings, i.e., the connection line crosses other connection lines, nodes, etc., then ; if there is no crossing, . represents the lane switching indicator function, if the path has lane switching, i.e., the connection line crosses the lane boundary, then ; if there is no lane switching, ; C represents the total cost of the path, and the smaller the value, the higher the quality of the path; the coefficient 10 represents the penalty weight of edge crossing, which reflects that edge crossing has a greater destructive effect on readability; the coefficient 5 represents the penalty weight of lane switching, which reflects that lane switching affects logical aggregation but to a lesser extent; the constant term 1 represents the inherent basic cost of the path. Through this cost function, the A* algorithm can preferentially select paths with no crossings and fewer lane crossings.

[0098] The cubic curve smoothing algorithm is: ;

[0099] The parameterized form of the cubic B-spline curve is used to smooth the connection line path; wherein, represents the parameter corresponding to the point on the curve; represents the parameter variable, and the value range is [0, 1]; (i = 0, 1, 2, 3) represents a cubic B-spline basis function; (i = 0, 1, 2, 3) represents a control point, a total of 4.

[0100] Specifically, in the present embodiment, the fourth optimization component focuses on the accurate optimization of the connection line routing, solves the problems of traditional connection line crossing chaos and abrupt corner through intelligent path search and smooth curve generation, and the specific steps are as follows:

[0101] Step S441, path obstacle avoidance and priority guidance based on A* search: the fourth optimization component first calls the A* search algorithm to carry out connection line routing planning, quantifies the advantages and disadvantages of the path through a customized cost function, and guides the algorithm to select a better connection line direction, which specifically includes: abstracting the two-dimensional space of the graph into a grid or graph structure search space, each position that can be used as a connection line path is abstracted into a search node, and the feasible movement direction between adjacent nodes constitutes an edge, and the graph layout rule is combined to determine whether it is feasible; multi-factor guidance of the cost function: the cost function adopted comprehensively considers multiple factors affecting the readability of the connection line, and sets different penalty weights for edge crossing, lane switching and other behaviors: if the path has a crossing with other connection lines / nodes, a high-weight penalty will be triggered, and if the path involves lane switching, a penalty will also be triggered, lane switching weakens the logic aggregation within the lane, and the impact is weaker than edge crossing but still needs to be controlled, at the same time, the basic cost item considers the path length and the degree of fit with the ideal direction, such as the level direction of the trunk area and the longitudinal / lateral direction of the lane, to ensure that the path avoids obstacles and fits the overall layout logic; path obstacle avoidance priority landing: combined with the early layout result of the graph, set the obstacle avoidance priority for different areas / elements, the nodes and core connection lines of the trunk area are the highest priority obstacle avoidance objects and need to be completely avoided to ensure the clarity of the core logic, the lane / zone boundary is the second priority and tries to reduce crossing to maintain the regularity of the partition, and the non-core connection lines within the mesh substructure are the general priority and can be moderately avoided on the premise of ensuring the overall vision. When expanding the path, the A* algorithm preferentially selects the path outside the area with high obstacle avoidance priority, or applies a very high cost to the path that invades the high-priority area, guiding the connection line to bypass the key obstacles.

[0102] Step S442, cubic curve smoothing and orthogonal fold point optimization: after the A* algorithm generates a non-crossing, less-switching orthogonal fold point path, the orthogonal fold point refers to the connection line connecting the nodes in the form of vertical / horizontal fold lines, and the module smoothes the path through a cubic curve to eliminate the visual abruptness.

[0103] The optimization component is a multi-level optimization component, specifically including a first optimization component that undertakes graph type judgment and layout algorithm matching function, a second optimization component that undertakes node-level local fine adjustment function, a third optimization component that undertakes global layout coordination and multi-algorithm fusion function, and a fourth optimization component that undertakes connection line path and visual effect final optimization function.

[0104] Among them, the first optimization component mainly receives the graph structure data from the intermediate representation conversion layer, the graph element semantic data from the multi-modal input processing layer, the enterprise meta-model constraints from the compliance verification layer, and the historical layout type records from the system database, determines the chart type through multi-dimensional feature analysis, and matches the adaptive layout algorithm for the subsequent optimization component; first, the topological structure is parsed from the graph code, the node type distribution, edge directionality and other core indicators are extracted to construct the structure features; then the node label is semantically encoded, the keywords are extracted and matched with the preset chart type-terminology mapping library to obtain the semantic correlation score; then the structure features and semantic features are fused, the feature weights are adjusted combined with the enterprise meta-model constraints, the classification model is input to obtain the probability distribution of the chart type, the final determination result is determined and the confidence is calculated; according to the confidence, different processing is taken, high confidence directly outputs the result and recommends the algorithm, medium confidence adds alternative types, low confidence triggers manual confirmation, and at the same time, it is linked with the intermediate representation conversion layer and the compliance verification layer to read the graph code metadata to assist in determination, and to ensure that the accurate layout algorithm basis is provided for the subsequent optimization component. The compliance verification layer integrates the compliance verification mechanism, which includes the specification knowledge base, the verification engine and the conflict mediation module. When the prompt word is constructed, the enterprise specifications and industry standards are extracted from the specification knowledge base as the knowledge base reference to supplement the prompt word, and to preventively guide the compliance generation; the node type and connection relationship are verified during the intermediate representation conversion to see whether they conform to the enterprise meta-model specification; after the optimization is completed, the style, structure and semantic are checked for the specification, the compliance score is generated, and if it is lower than the threshold, manual review is triggered. The compliance verification mechanism ensures that the generated chart conforms to the enterprise specifications and industry standards.

[0105] Specifically, in another embodiment, the first optimization component running stage constructs an adaptive processing mechanism for multiple special scenarios.

[0106] When a conflict between the chart topology and the chart type indicated by the node label semantics is detected, the module triggers a constraint weight dynamic adjustment strategy: temporarily raises the weight priority of the enterprise meta-model constraint, and simultaneously calls the graph code metadata of the intermediate representation conversion layer to assist in judgment; if the conflict cannot be eliminated by the meta-model constraint enhancement and metadata assistance, the module will, on the basis of the confidence judgment result, append a high-probability chart type identifier to provide a priority reference for the subsequent processing link. When a new chart that is not in the preset chart type library is identified, the module starts the 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, the closest known chart type to the new chart is recommended from the preset library through a feature similarity matching algorithm, ensuring the continuity of basic processing; at the same time, the feature of the new chart and the recommended type are pushed to the labeling link, and after human confirmation, the chart type-processing strategy mapping library is updated, realizing the dynamic adaptation capability of the system 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 the conservative processing mode: calls the general layout algorithm to complete the basic layout optimization, avoiding process blocking due to pending type determination; at the same time, the chart type pending confirmation mark is appended to the third optimization component, clearly informing the current type determination state of the subsequent optimization link, providing a decision reference for the third optimization component when carrying out global layout coordination, ensuring the coherence and fault tolerance of the overall optimization process.

[0107] The second optimization component is a local optimization component for fine adjustment at the node level, which inputs the initial node data, chart type, and font specification passed by the first optimization component, the node spacing constraint in the enterprise style library, and the global layout algorithm type informed by the third optimization component, and solves microscopic problems such as node size and text mismatch, label line break chaos, and adjacent node overlap. First, the actual rendering size of the node label is calculated according to the enterprise font specification, the text-node size adaptation rule is determined in combination with the chart type, the node size is updated and checked to avoid exceeding the canvas boundary; then, for the case where the text width exceeds the node width by a high proportion, automatic line breaking is performed according to the word boundary priority principle, and the text alignment method is determined according to the chart type; finally, all node pairs are traversed to detect node overlap or insufficient spacing, and a specific model is used to calculate node displacement to adjust the position. The overlapping nodes that still cannot be solved after multiple iterations are marked as unsolved and passed to the third optimization component, and the adjusted node data and local optimization report are finally output to the subsequent optimization component, laying a regular node foundation for global layout.

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

[0109] ; ; ; i.e. if the text width is greater than 0.9 times the original width of the node, the new width of the node is set to the smaller of the two, and the new height of the node is the text height divided by 20, rounded up, and multiplied by 20; the spacing optimization uses a spring model to adjust overlapping areas by calculating an adjustment amount to ensure that the minimum spacing between adjacent nodes is ≥ 40px, effectively avoiding local stacking and misplacement. The second optimization component is used for node-level adjustment. When the node label is an extremely long text that causes size abnormalities, the core keywords are extracted to compress the text with ellipses, and the complete text is retained for hovering review. If it still does not meet the requirements, a size overrun warning is sent to the third optimization component. In the face of a dense overlapping group of more than 20 nodes, if local iteration is not resolved after three times, clustering is marked and passed to the third optimization component to request a global algorithm to re-plan, while feedback is given to the first optimization component that there may be a type misjudgment. If the node spacing and alignment constraints in the enterprise style library conflict, they are processed according to the preset priority. If the priority is the same, a compromise solution is requested from the compliance verification layer.

[0110] The second optimization component is used for node-level adjustment. When the node label is an extremely long text that causes size abnormalities, the core keywords are extracted to compress the text with ellipses, and the complete text is retained for hovering review. If it still does not meet the requirements, a size overrun warning is sent to the third optimization component. In the face of a dense overlapping group of more than 20 nodes, if local iteration is not resolved after three times, clustering is marked and passed to the third optimization component to request a global algorithm to re-plan, while feedback is given to the first optimization component that there may be a type misjudgment. If the node spacing and alignment constraints in the enterprise style library conflict, they are processed according to the preset priority. If the priority is 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, boundary ranges of each node, and the functional module or associated group information to which the node belongs. At the same time, the component performs a preliminary scan on the spatial distribution of all nodes to mark out local spatial areas where nodes are densely distributed. The local spatial areas are usually characterized by the fact that the center coordinates of multiple nodes have a spacing in the horizontal and vertical dimensions that is significantly smaller than the normal node spacing, and the node boundary ranges have a preliminary overlap or proximity trend. The second optimization component carries out node density calculation in local spatial units. First, according to the overall size of the chart and the average size of the nodes, the adaptive local spatial unit is determined. 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 the preset dense judgment threshold value. The threshold value is set based on the requirements for reasonable distribution density of nodes in the enterprise layout specification. If the node density of a local unit exceeds the threshold value, and the boundary overlap ratio of the nodes in the unit reaches the basic overlap standard, it is preliminarily determined that the area has the feature of dense node aggregation. After the dense aggregation area is preliminarily identified, the second optimization component further focuses on the node overlap in the area. Through spatial intersection analysis, the node set with overlapping relationship is determined, and the complete overlap area range, i.e., the spatial area covered by the boundary of all overlapping nodes, is marked. The total number of nodes contained in the overlap area is counted. If the number of nodes exceeds the upper limit of the ordinary overlap judgment and more than half of the nodes have an intersection with the overlap area, it meets the core quantity characteristics of dense node overlap. The ordinary overlap is usually two to three nodes, and the dense overlap is characterized by more nodes involved in the overlap. At the same time, the second optimization component calculates the ratio of the area of the overlap area to the total boundary area of all nodes in the area. If the ratio exceeds the preset proportion, it is further confirmed that the scenario is not a few nodes with slight overlap, but a large number of nodes with dense overlap.

[0112] Specifically, in the dense node overlap processing scenario, when encountering an overlap area formed by a large number of node clusters, the second optimization component first performs an iterative adjustment operation in a local range; if the overlap problem is still not solved after multiple local adjustments, the dense overlap node group is marked for clustering, and relevant information is transmitted to the third optimization component to request it to call a global planning algorithm to re-optimize the node layout, and feedback information is fed back to the first optimization component to prompt that the current chart type may have a judgment deviation, providing a reference for subsequent type identification correction; in terms of enterprise style constraint adaptation, when the specification requirements for node spacing and the constraint rules for node alignment in the enterprise style library conflict, the second optimization component will perform rule adaptation and execution according to the pre-set priority system; if the priority levels of the conflicting parties are at the same level and the processing scheme cannot be determined through priority judgment, the constraint conflict is submitted to the compliance verification layer to request it to output a compromise solution that takes into account the constraints of all parties in combination with enterprise specifications and chart generation requirements.

[0113] The third optimization component, as a global command unit for layout optimization, receives the adjusted node data and the list of unresolved overlapping nodes output by the second optimization component, the chart type and the list of recommended algorithms provided by the first optimization component, and the global layout constraints from the enterprise style library and the compliance verification layer. The core task is to balance the multi-objective optimization requirements of the layout through multi-algorithm fusion. First, initialize the relevant parameters according to the priority of the recommended algorithm, and use a temporary dispersion strategy for the unresolved overlapping nodes to avoid excessive node aggregation in the initial stage; then, taking a specific type of chart as an example, preferentially execute the recommended main layout algorithm, adjust the node coordinates in combination with the special structure in the chart to ensure the integrity of the special structure, and supplement other layout algorithms to make the line shape meet the regularity requirements; subsequently, construct a layout quality score model to quantify the layout quality from the dimensions of node distribution, edge crossing, special structure integrity, and canvas utilization rate, and use an iterative optimization algorithm to adjust the layout quality score as the target.

[0114] Specifically, the core function of the third optimization component is to select and adapt the main layout strategy according to the chart type: for flowcharts, use the hierarchical layout algorithm based on the Sugiyama framework, and accurately control the spacing between levels and the alignment state of the swim lanes; for organization charts or tree charts, use a top-down recursive hierarchical layout method; for mesh subgraphs, use the Fruchterman-Reingold force-directed algorithm to perform multiple rounds of iterative calculations to maintain the symmetry of the overall chart and the uniformity of node distribution. The layout specification targets of the third optimization component are used to measure the node overlap rate and edge crossing rate in the chart to ensure that the layout effect meets the readability and specification requirements.

[0115] The layout specification targets are: ; wherein the node overlap rate , edge crossing rate The constraint ensures the layout effect of the graph, so that the nodes in the graph do not appear excessive overlap, and the frequency of crossing of the lines is controlled, so that the overall structure of the graph is clearer and easier to read.

[0116] In another embodiment, the third optimization component is a core control unit of global layout in a graph modeling system, and in a complex graph layout scenario, the third optimization component realizes accurate elimination of layout abnormalities and regularized output.

[0117] Specifically, for the case of excessive edge crossing rate or node overlap residue, node reordering, additional adjustment force, etc. are triggered respectively, and finally the node coordinates after global layout are output to the fourth optimization component and the intermediate representation conversion layer, and the layout quality score and edge crossing statistical results are output synchronously, so as to realize the regularity of the overall structure of the complex graph.

[0118] For the identification of node overlap residue, the third optimization component collects the spatial attribute information of all nodes, including the center position coordinates of each node, the boundary range determined by the width and height of the node, the level or functional module to which the node belongs, and the priority attribute of the node, to provide complete spatial and attribute basis for overlap determination; secondly, the third optimization component carries out node overlap determination, by mapping the boundary range of each node to a unified spatial coordinate system, analyzing whether the boundary of any two nodes has a spatial intersection: if the boundary range of the two nodes has overlapping areas in the horizontal and vertical dimensions, and the area of the overlapping area accounts for a proportion of the boundary area of any node reaching a preset determination standard, it is preliminarily determined that there is node overlap. In this process, the component filters out temporary overlap scenarios, such as transitional overlap that has not been completed during the layout iteration process, and only keeps stable overlap, i.e. node combinations whose overlap state has not been eliminated after at least two rounds of local optimization; finally, the third optimization component confirms the overlap residue, checks whether the current overlapping nodes have been included in the historical processing queue in combination with the previous optimization records: if the node combination has been marked as overlapping to be processed in the previous optimization step, and the overlap problem has not been solved after targeted adjustment, or the newly appeared overlapping node combination cannot be eliminated through regular local optimization, it is confirmed that there is node overlap residue, and the processing mechanism of applying additional adjustment force is triggered.

[0119] When the edge crossing rate is too high, the node reordering algorithm is triggered, the arrangement order of the nodes in the same level or associated module is adjusted, the path of the lines is changed, and the number of crossings is reduced; if there is node overlap residue, additional adjustment force is applied to the overlapping nodes to simulate the physical repulsive effect to push the nodes apart. After the elimination of abnormalities is completed, the third optimization component outputs the node coordinates after global layout to the fourth optimization component and the intermediate representation conversion layer, and synchronously outputs the layout quality score and edge crossing statistical results.

[0120] The fourth optimization component is the last optimization unit of the layout optimization. The fourth optimization component inputs the global layout node data and edge intersection statistical results 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. The core function is to optimize the path, style and visual effect of the connection line, and to improve the readability and aesthetics of the chart. First, the initial connection line path is generated based on the node coordinates, and the corresponding style attributes are assigned to the connection line according to the connection line type-style mapping library. Then, the canvas grid map is constructed and the obstacle area is marked. For the connection line that exists intersection or crosses the obstacle, a specific algorithm is used to re-plan the path to achieve obstacle avoidance. Then, all connection lines are traversed to detect intersection, and different intersection correction strategies are adopted according to whether the connection line belongs to the same special structure. The shape of the long connection line is adjusted, and the visual effect of the multi-fold point connection line is optimized by using the curve smoothing algorithm. Finally, for the connection line with labels, the labels are positioned at the appropriate paragraph of the connection line. If there is label overlap, the offset adjustment is performed. The beautified connection line data is finally output to the intermediate representation conversion layer and the rendering module, and the connection line beautification report and the final layout quality score are generated.

[0121] In another embodiment, the fourth optimization component constructs a dual response logic of local visual optimization-cross-cell collaborative adjustment in the processing of dense area edge intersection problems. If the obstacle avoidance algorithm is iterated for 3 times and there are more than 10 pairs of edge intersections in the dense area, the line width, color saturation of the intersection connection line is distinguished, and the third optimization component is requested to fine-tune the corresponding node position. When the connection line label overlaps with the node or other labels, the label is dynamically offset along the connection line. If the label still overlaps, the label level is adjusted, and the second optimization component is fed back to compress the node blank area. If the node is at the edge of the canvas, causing the connection line to be truncated, the connection line is extended to the boundary and an arrow exit mark is added. The boundary overflow report is sent to the third optimization component to request to move 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 association relationship of the lines, and obtains the potential dense area marked in the early stage. The potential dense area is preliminarily marked by the second and third optimization components based on node density, and the scope is clearly identified. Then, the potential dense area is accurately defined. The grid unit is divided based on the average size of the nodes, the number of nodes in each grid is counted, the grid combination whose node number exceeds the dense determination standard and the node boundary overlap ratio reaches the basic threshold is combined, and the complete dense area boundary is drawn to ensure focusing on the local space with high node aggregation. In the defined dense area, edge intersection statistics are carried out: all lines in the area are traversed, the effective intersection of non-endpoint position is identified through line segment intersection judgment logic, the number of intersection lines and the associated nodes of each pair of intersection lines are recorded, and the intersection density, i.e. the number of edge intersections per unit area, is calculated. The number of intersection lines and the intersection density obtained by statistics are compared with the preset threshold, which is set based on the acceptable intersection level of the dense area in the enterprise layout specification. If both indicators exceed the threshold, and the proportion of the number of lines in the area to the total number of lines in the chart reaches a certain standard, it is confirmed that the current scene is a dense area edge intersection. When the fourth optimization component confirms the existence of dense area edge intersection, and after multiple rounds of obstacle avoidance algorithm iteration, there are still many edge intersections in the area and the number of intersection lines exceeds the normal acceptable range, local visual optimization is started: by adjusting the line width and color saturation of the intersection lines, the differentiation of the intersection lines is strengthened in the visual level, and the reading difficulty is temporarily relieved. At the same time, the fourth optimization component sends a cooperative request to the third optimization component, passes the boundary coordinates of the dense area, the associated node information of the intersection lines and the current intersection statistical result, and requests it to adjust the position of the associated nodes slightly; when it is detected that the line label overlaps with the node boundary or other line labels, the fourth optimization component performs local adjustment first: dynamically offset the overlapping label along the extension direction of the line, try to eliminate the overlap by fine-tuning the attachment position of the label on the line; if the overlapping problem is still not solved after dynamic offset, adjust the display level of the label to reduce visual interference.Meanwhile, the fourth optimization component feeds back the label overlapping situation to the second optimization component, indicating the node distribution of the overlapping area, the blank space occupation ratio and the label size requirement, and requests it to compress the blank area of the corresponding node; if the fourth optimization component detects that part of the nodes are located at the edge of the canvas, causing the connection line connected to the node to be truncated by the canvas boundary and the starting to terminal path of the connection line to be unable to be completely displayed, the fourth optimization component performs local remedial optimization: extends the truncated connection line to the canvas boundary to ensure that the complete path of the connection line extending from the node to the edge is visible; meanwhile, an arrow exit mark is added at the canvas exit position of the connection line to clearly indicate the extension direction of the connection line, avoiding the user misunderstanding that the connection line is in an interrupted state; meanwhile, the fourth optimization component sends a boundary overflow report to the third optimization component, which contains the coordinates of the edge node, the number of truncated connection lines and the associated node group distribution, and requests the third optimization component to perform overall translation on the edge node group to avoid repeated occurrence of connection line truncation problems.

[0123] Each optimization component in the multi-level optimization component respectively undertakes the optimization function of different levels in the graph layout process, and realizes data interaction and function cooperation through a preset interface; the cooperative calling method includes a forward pushing mechanism, a reverse checking mechanism and a cross-module abnormal cooperation mechanism.

[0124] Specifically, the forward pushing mechanism includes that a previous optimization component transmits processed intermediate data and optimization constraint parameters to a subsequent optimization component along an optimization link, and the subsequent optimization component performs optimization operation of the corresponding level based on the intermediate data, forming a forward flow link from graph feature analysis to layout result output.

[0125] The reverse checking mechanism includes that when any optimization component detects that the current optimization result does not meet the preset standard, such as substandard layout quality, feature and constraint conflict, and local abnormality cannot be eliminated, the abnormal feature data and correction suggestions are fed back to the previous optimization component through the interface, triggering the previous module to re-execute the corresponding optimization link, realizing reverse checking and parameter correction of the optimization process.

[0126] The cross-module abnormal cooperation mechanism includes that when any optimization component detects abnormal operation or external constraint update, a cooperative adaptation process is started: for module operation abnormality, a preset emergency optimization strategy is started for degradation processing by the previous module, and an abnormal snapshot is recorded to support subsequent breakpoint recovery; for external constraint update, an update instruction is pushed to all optimization components through a constraint synchronization interface, and each module dynamically adjusts the optimization parameter based on its function to ensure the adaptability of the global optimization logic to the new constraint;

[0127] Through the above forward propulsion, reverse verification and exception coordination mechanism, the multi-level optimization component forms a closed-loop coordination architecture, while maintaining the independence of each module function, achieving dynamic adjustment and global consistency of the graph layout optimization process, and improving the system's adaptation ability to complex layout scenarios and the robustness of the optimization results.

[0128] In the embodiment, the backbone area is obtained by the following steps:

[0129] Using the first optimization component, the core logic presentation rules of the target graph are determined based on the node structure features in the second format graph code and the graph type information in the metadata; the node structure features include node type, node quantity or connection relationship density, the graph type information includes flowchart, architecture diagram or relationship diagram, and the core logic presentation rules include but are not limited to linear main flow rules corresponding to flowchart, hierarchical main link rules corresponding to architecture diagram;

[0130] Using the third optimization component, the node connection relationship data in the standardized graph code is extracted based on the core logic presentation rules output in the first optimization component; the node connection relationship data includes the association relationship between the source node and the target node, the priority identifier of the connection line, and the business / technical attribute label of the node; in combination with the preset core element definition in the enterprise meta-model library, the extracted node connection relationship data is analyzed, and the key node sequence and the key connection line constituting the core logic of the graph are selected; according to the spatial distribution range of the selected key node sequence and key connection line, a continuous logic and spatial set is delimited as the backbone area of the graph, and the priority of the nodes and connection lines in the backbone area is marked, which is configured for subsequent priority execution of layout optimization.

[0131] Specifically, the first optimization component first performs directional collection and standardized analysis of input data, and the processing object is the second format graph code and associated metadata converted by step S3: the second format graph code is used as a structured input carrier, which completely retains node definition, connection relationship and layout constraint information, and the module extracts the node structure features through a preset code parsing interface; the metadata parses the graph type information from the field, determines the category to which the current processing object belongs, and synchronously obtains the basic feature description of the corresponding type graph in the enterprise meta-model library, providing a type anchor point for subsequent feature analysis. Among them, the extraction of node structure features adopts a parameterized processing method: the node type is labeled and mapped according to the classification system defined by the enterprise meta-model; the node quantity is counted in detail through a classification statistical model; the connection relationship density is calculated based on the adjacency matrix, and the formula is connection relationship density = effective connection line number between core nodes / total connection line number, wherein the core nodes are determined by the label or node type priority in the metadata, to ensure that the density calculation focuses on the key association relationship.

[0132] The first optimization component constructs an association analysis model of node structure features and core logic based on the chart type information, to realize accurate matching of feature dimensions and type requirements: for flowchart type, the module focuses on the linear continuity of the predecessor-successor relationship and connection relationship of the node, identifies nodes with single predecessor and single successor characteristics by traversing the node connection sequence in the second format chart code, excludes parallel gateway branch nodes, calculates the connection relationship density of such nodes, and determines the basic skeleton of the linear main process, while ignoring parallel secondary branch nodes with connection relationship density < 30%, to ensure that the feature analysis meets the core needs of linear flow of the flowchart; for architecture diagram type, the module shifts the focus to the hierarchical distribution of the node and the integrity of the cross-level connection, classifies and counts the number of nodes by layer through the layerTag field in the node attribute, calculates the proportion of cross-level connections in the total connections, and prioritizes high-priority cross-level connections, to strengthen the core logic of hierarchical transmission of the architecture diagram; for relationship diagram type, the module focuses on the association strength of the node and the radiation range of the core entity, distinguishes core entities from non-core entities through the entityLevel tag in the node type, calculates the proportion of the connection number of the core entity in the total connection number, and calculates the proportion of high-frequency interaction connections, to ensure that the feature analysis meets the logical essence of the core association of the relationship diagram.

[0133] Based on the above association analysis results, the first optimization component derives and outputs the core logic presentation rules of the target chart, and the rules are generated in a structured data format to ensure that the third optimization component can be directly called: for flowchart, output linear main process rules, clearly define the core processing nodes in the rule application scope, and the constraint parameters include that the main process link needs to include the start node and the end node, the connection relationship density of the nodes in the link is ≥80%, and the connection priority of the parallel branch node needs to be lower than that of the main process connection, to ensure the linear continuity and logical uniqueness of the main process link; for architecture diagram, output hierarchical main link rules, specify that the rule applies to core nodes divided by level, and the constraint parameters include that the main link needs to cover all levels, the proportion of cross-level connections is ≥60%, and the connections of non-core nodes in the same level cannot interfere with the cross-level main link, to ensure the integrity of the architecture hierarchical transmission and the clarity of the main link; for relationship diagram, output core entity association rules, clearly define the rule object, and the constraint parameters include that the connection number of the core entity is ≥50% of the total connection number, and high-frequency interaction connections need to be prioritized, to ensure the prominent presentation of the core association logic of the relationship diagram. After all the rules are output, the module will also attach a rule validity verification identifier, if the verification is passed, it will be synchronized to the rule calling interface of the third optimization component, if there is a deviation, it will trigger the secondary metadata analysis process, and modify the feature analysis weight to rederive the rules.

[0134] The main trunk region refers to a key region in a diagram that carries core logic or main processes, i.e., a set of nodes and lines that determine the overall logical framework of the diagram and reflect the core business / technology relationship, which is distinguished from non-core regions where secondary branches and auxiliary explanatory elements are located, such as the main process link region of the start-core processing step-end in a flowchart, and the association region of the core level and core components in an architecture diagram.

[0135] The main trunk region is confirmed by a multi-level optimization component and multi-dimensional data analysis. First, a first optimization component is called to standardize node structure features in the graph code and diagram type information in the metadata as input, the node structure features include node type, node quantity, connection relationship density, and the diagram type information includes flowchart, architecture diagram, and relationship diagram. The target diagram corresponding core logic presentation rules are parsed and output, such as the linear main process rule for flowcharts and the hierarchical main link rule for architecture diagrams. Then, a third optimization component is called to extract node connection relationship data from the standardized graph code according to the above core logic presentation rules, which covers the association relationship between source nodes and target nodes, connection priority identification, and node business / technology attribute labels. Further, the third optimization component associates with the preset core element definition in the enterprise meta-model library, such as the node type of the core processing and main level, performs feature matching and logic filtering on the extracted node connection relationship data, and locates the key node sequence and key line that constitute the core logic of the diagram, such as the continuous node link from the start node to the end node without redundant branches in the flowchart, and the key component connection across the core level in the architecture diagram. Finally, the third optimization component determines the set with continuous logical association and spatial aggregation based on the spatial distribution range of the filtered key node sequence and key line, which is the main trunk region. The nodes and lines in the main trunk region are labeled with priority to provide data basis for subsequent priority execution of layout optimization.

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

[0137] In the embodiment, the target chart type, layout type and output format requirement can be extracted according to the target chart requirement determined by the user input, and a prompt word basic template is constructed. Specifically, the prompt word basic template construction first starts structured analysis around the target chart requirement input by the user, and through entity recognition and keyword matching technology of NLP natural language processing, in combination with the enterprise preset chart type enumeration library, the chart type enumeration library includes more than 20 types of standardized charts such as BPMN chart, system architecture chart, data blood relationship chart and corresponding characteristic words, and the target chart type is accurately extracted, for example, when the user expresses the generation of a supply chain procurement process chart, the system will match the characteristic words of the BPMN business process chart in the enumeration library, such as process, link, task, and exclude ambiguous options such as simple flowchart, and finally determine the unique chart type and mark the application scene, such as BPMN business process chart-supply chain procurement scene; for the layout type, if the user requirement contains explicit description, such as hierarchical arrangement, vertical and horizontal connection, it is directly converted into hierarchical layout + orthogonal layout and supplemented with details, such as hierarchical direction from top to bottom, horizontal alignment of nodes in the same layer, if the requirement is ambiguous, such as clear layout, then call the layout type recommendation model, and automatically match based on the characteristics of the chart type, such as hierarchical + orthogonal for flowchart, force-directed layout for mesh relationship chart; the output format extraction needs to consider both user requirements and enterprise compatibility, for example, inserting the corresponding vector graphics SVG in PPT, supplementing the EDMS preview interface compatible with enterprise document management system for online preview, resolution ≥72dpi, and supporting A4 horizontal printing for printing, color mode CMYK. These extracted core constraints, including chart type, layout type, output format, are integrated with enterprise general design specifications, such as node font, color standard, to construct a structured prompt word basic template, ensuring that the template logic is clear and covers key constraints.

[0138] 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, ensuring that the prompt words contain product-specific elements and logical relationships.

[0139] Specifically, the product type patch supplements the injection of specialized elements and logic to strengthen the scene adaptation. Based on the determined target chart product type, the metadata dictionary of the corresponding product is called through the enterprise meta-model library API interface, the structured keywords are extracted in two dimensions of specialized elements + logical relationship, and for the BPMN business process chart-supply chain procurement scene, the specialized elements are selected from the element definition table of the meta-model library, including the lanes divided according to the organizational structure, the gateways with shunt rules, the service tasks with interface information, and the boundary events bound to the task nodes; At the same time, the specialized logical relationship defined in the meta-model is extracted to ensure that the model can understand the requirements layer by layer; Field conflicts need to be handled during splicing, for example, when both the knowledge base reference and the product type patch involve process links, the field specification of the knowledge base is used as the standard, and the element definition of the product type patch is used as the auxiliary to fuse; At the same time, the format is unified, and the structured form of module name + content description is adopted, and finally the constraint conflict is checked by the prompt word legality verification submodule, and the final prompt word is generated after the verification is passed, which ensures that it can accurately guide the chart generation model to output the standardized chart conforming to the enterprise business specification and technical environment.

[0140] 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; Based on the target chart type, the domain knowledge is matched from the enterprise knowledge base, the key information is extracted as the knowledge base reference and supplemented to the prompt word, and if the user input contains data query requirements, the Text-to-SQL submodule is called, the SQL statement is generated according to the enterprise database metadata and executed, and after the data set is abstracted, the data set abstract is embedded in the prompt word preset field.

[0141] In another embodiment, the system monitors user input requests in real time through a keyword matching algorithm, and when it detects that the request contains data-related keywords such as query, field, table, statistics, etc., it automatically triggers the Text-to-SQL sub-process. This triggering mechanism is realized through a pre-set keyword dictionary and a string matching model, ensuring that the database interaction link is started only when the user has an explicit data acquisition demand, avoiding unnecessary resource consumption.

[0142] The Text-to-SQL sub-process calls the T2SQL-LoRA model fine-tuned in the field to perform the SQL statement generation task: the model input contains user natural language query intent and enterprise database metadata, adopts a beam search strategy, and sets the beam width to 4 to balance the generation efficiency and candidate diversity; After generating the SQL statement, the model synchronously outputs the statement confidence β, only when β≥0.85, the SQL statement is determined to be syntax compliant and intent matching, allowing it to enter the subsequent execution link; If β<0.85, the system will generate a list of candidate SQL statements and trigger the manual confirmation process to avoid database query abnormalities caused by incorrect statements.

[0143] The above base template, product type patch, deployment space instruction, knowledge base reference and dataset summary are spliced in a preset order to form a final prompt word. Specifically, in the prompt word construction process of image generation, the splicing of the final prompt word needs to follow the preset technical order of base template → product type patch → deployment space instruction → knowledge base reference → dataset summary, and the specific technical implementation is as follows: first, the base template is taken as the splicing base, the template has integrated the target chart type, layout type, output format and enterprise general design specification, and consistency check needs to be completed through the prompt word legality verification submodule before splicing to exclude conflicts between incompatible chart type and layout type; then the product type patch is embedded, the patch is extracted from the enterprise meta-model library based on the target chart product type, and is supplemented to the product-specific constraint field of the base template in the form of a structured format of exclusive elements-logical relationship, while the element association check is used to ensure that the patch elements match the chart type of the base template; then the deployment space instruction is inserted, the instruction is generated by the model deployment environment monitoring subsystem, converts parameters such as GPU resources, CPU resources and memory limits into constraint formats recognizable by the model, and adds environmental compatibility constraints to embed the environmental constraint field of the base template; then the knowledge base reference is added, the associated domain knowledge is retrieved from the enterprise knowledge base based on the chart type + domain keyword, the key information is extracted, the knowledge base source is labeled, the relevance of the reference content and the chart demand is ensured to be ≥90% through the text similarity algorithm, and the “domain knowledge support” field of the base template is embedded; finally, the dataset summary is encapsulated, the first 5 samples and statistical information of the dataset obtained by the Text-to-SQL submodule are integrated into a structured format, and are encapsulated into the DB CONTEXT The base template data support field is embedded in the label block; during the splicing process, the cross-component information contradiction needs to be handled through the field conflict mediation mechanism, and the format specification needs to be checked through the Prompt syntax verification submodule, so that the final prompt word meets the model parsing requirements, the information is complete and the constraints are accurate, and the model output guided by the prompt word meets the enterprise standardization chart.

[0144] In the present embodiment, as Figure 3As shown, an intelligent chart generation system suitable for multi-modal data is also disclosed, comprising a data preprocessing module 1, a selection calling module 2, a format conversion module 3 and a component calling module 4. The data preprocessing module 1 is used to receive and preprocess the multi-modal data input by the user, and then classify to identify the user intent type, and perform task routing according to the intent recognition result. The selection calling module 2 is used to select the adaptive model according to the task routing result, call the multi-modal model if the input data contains image information, call the language model if the input data is only text or structured information, and construct a generation prompt word. The format conversion module 3 is used to input the prompt word into the adaptive model to obtain a first format graph code and perform standardization processing, and then convert it into a second format graph code compatible with the target platform and retain node definition, connection relationship, layout constraint and metadata information. The component calling module 4 is used to call the first optimization component to identify the type of the second format graph code and determine the 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 render and output the optimized second format graph code.

[0145] It should be noted that each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between each embodiment can be referred to each other. For the intelligent chart generation system disclosed in the embodiments, since it corresponds to the intelligent chart generation method suitable for multi-modal data disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part.

[0146] In some other embodiments, a server is also provided, comprising 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 realize each step of the intelligent chart generation method suitable for multi-modal data described in the above embodiments.

[0147] If the intelligent chart generation system suitable for multi-modal data is realized in the form of a software function 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-mentioned embodiment methods can also be completed by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium. When the processor executes the computer program, the steps of the above-mentioned various intelligent chart generation methods suitable for multi-modal data can be implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium can include any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and 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 application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

[0149] In summary, the above only describes the preferred embodiments of the present application, and any equivalent changes and modifications made within the scope of the patent application of the present application shall be included in the scope of the present application.

Claims

1. A method for generating intelligent charts applicable to multimodal data, characterized in that, Includes the following steps: 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. 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. 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. 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.

2. The intelligent chart generation method applicable to multimodal data according to claim 1, characterized in that, The process of receiving multimodal data input from the user, preprocessing it, classifying it to identify the user's intent type, and routing tasks based on the intent identification results includes: Receive multimodal data input by the user, including natural language text, hand-drawn sketches, screenshots, scanned documents, or structured documents; 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. 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.

3. The intelligent chart generation method for multimodal data according to claim 1, characterized in that, The specific steps for constructing and generating prompt words are as follows: 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.

4. The intelligent chart generation method for multimodal data according to claim 3, characterized in that, The intelligent chart generation method specifically includes: 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; 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. 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.

5. The intelligent chart generation method for multimodal data according to claim 4, characterized in that, The backbone region is obtained through the following steps: 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. 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.

6. The intelligent chart generation method applicable to multimodal data according to claim 5, characterized in that: The key node sequences and key connections 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.

7. The intelligent chart generation method for multimodal data according to claim 6, characterized in that, The appropriate model is selected based on the task routing results. If the input data contains image information, a multimodal model is used; if the input data is only text or structured information, a language model is used. The specific steps for constructing and generating prompt words include: Based on the user's input of the target chart requirements, extract the target chart type, layout type, and output format requirements, and build a basic template for prompt words; 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. 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; it matches domain knowledge from the enterprise knowledge base based on the target chart type, 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. The basic template, artifact type patch, deployment space instruction, knowledge base reference, and dataset summary are assembled in a preset order to form the final prompt word.

8. An intelligent chart generation system applicable to multimodal data, characterized in that, include: 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. 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. 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. 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.

9. A server, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • UI effect picture recognition method and system based on multi-modal large model and medium

    CN119206376A

  • Chart generation method, multi-modal data platform, computing equipment and computer readable storage medium

    CN119903215A

  • 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

  • Multi-modal visual arrangement recommendation method and system

    CN120929066A

Cited By

  • Generative visual code-oriented security audit and resource scheduling method and system

    CN121615151A

  • Security auditing and resource scheduling method and system for generative visualization code

    CN121615151B