Text-to-chart dynamic generation method and system based on DeepSeek and API operator
Through the DeepSeek big model and API operator dynamic generation method, the problem of intent parsing deviation and insufficient adaptation of multi-source data is solved, and efficient and flexible chart generation is achieved, suitable for intelligent data analysis and low-code visualization platforms.
Patent Information
- Application Number
- CN202510429708.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-29
AI Technical Summary
The existing natural language processing technology has problems such as intent parsing deviation, insufficient dynamic adaptation capabilities of multi-source data, and inflexible graph generation, and cannot achieve deep semantic understanding and dynamic API scheduling.
DeepSeek big model is used for deep error correction and intent analysis, API operators are retrieved through Milvus vector database, standardized API operator database is built, API request parameters are dynamically generated, and converted data is cleaned through the data service bus, and the web responsive component technology is used to visualize the on-demand loading and real-time interaction of components.
It improves the accuracy of intention analysis, enhances the dynamic adaptability of multi-source data, improves the efficiency and flexibility of chart generation, realizes full-link automation processing, and reduces development costs.
Smart Images

Figure CN120387433A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the cross - technical field of artificial intelligence natural language processing and data visualization, and specifically to a method and system for dynamically generating text - to - chart based on DeepSeek and API operators. Background Art
[0002] Existing natural language processing technologies rely on rule templates or shallow semantic analysis, and there are three core problems: First, traditional NLP models lack the ability to deeply correct grammar errors and fuzzy expressions in user input, resulting in deviation in intent parsing; Second, the coupling degree between data interfaces and chart rendering rules is high, making it difficult to dynamically adapt to multi - source heterogeneous data interfaces; In addition, the rendering form of chart components is fixed, and it is impossible to automatically select the optimal visualization solution according to data characteristics. For example, although the current NL2SQL proposes a method for generating based on database SQL, it does not achieve deep semantic understanding and dynamic scheduling of APIs, and cannot match complex scenarios and provide a full - link solution.
[0003] Therefore, how to improve the accuracy of intent parsing, enhance the dynamic adaptation ability of multi - source data, and improve the efficiency and flexibility of chart generation, and overcome the technical bottlenecks in semantic understanding, data adaptation, and dynamic rendering of traditional tools are the technical problems that need to be solved urgently at present. Summary of the Invention
[0004] The technical task of the present invention is to provide a method and system for dynamically generating text - to - chart based on DeepSeek and API operators to solve the problems of how to improve the accuracy of intent parsing, enhance the dynamic adaptation ability of multi - source data, and improve the efficiency and flexibility of chart generation, and overcome the technical bottlenecks in semantic understanding, data adaptation, and dynamic rendering of traditional tools.
[0005] The technical task of the present invention is implemented in the following way. A method for dynamically generating text - to - chart based on DeepSeek and API operators is as follows:
[0006] Semantic parsing: Use the DeepSeek large - model to deeply correct and parse the input text, convert the parsing result into a high - dimensional vector, and retrieve the API operator with the highest similarity through the Milvus vector database;
[0007] API operator matching and scheduling: Build a standardized API operator library to uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, select the optimal operator according to the vector matching result, dynamically generate API request parameters, and call the data interface;
[0008] Dynamic data acquisition and formatting: Connect to multi-source heterogeneous interfaces (such as databases, third-party APIs) through the data service bus, clean and transform data according to the API operator definition rules, including operator screening conditions, and generate datasets in the standard formats compliant with ECharts and D3;
[0009] Dynamic rendering of visualization components: Based on the on-demand loading mechanism of Web responsive component technologies (Vue / React), load the corresponding chart components according to the API operator configuration rendering rules, and perform real-time data updates and user interactions through the operator screening conditions.
[0010] Preferably, the content of deep error correction includes completing missing entities and correcting incorrect units.
[0011] Preferably, the API operator matching and scheduling are as follows:
[0012] Configure data retrieval conditions: Define data dimensions, time ranges, and aggregation methods (aggregation functions);
[0013] Configure chart rendering rules: Set chart types, style templates (color schemes), and interaction logics (interaction events); among them, chart types include line charts, bar charts, and heatmaps;
[0014] Configure interface call protocols: Manage authentication methods, request parameter templates, and exception handling mechanisms.
[0015] More preferably, the method further includes multi-round Q&A history memory, which is as follows:
[0016] Dynamically render Q&A charts;
[0017] Remember historical sessions.
[0018] A text-to-chart dynamic generation system based on DeepSeek and API operators, the system includes:
[0019] The underlying large model layer is used to perform deep error correction and intent parsing on the input text through the DeepSeek large model;
[0020] The database layer is used to convert the parsing results into high-dimensional vectors and retrieve the API operator with the highest similarity through the Milvus vector database;
[0021] The data processing layer is used to build a standardized API operator library, uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, select the optimal operator according to the vector matching results, dynamically generate API request parameters, and call data interfaces;
[0022] The information key processing layer is used to dock with multi-source heterogeneous interfaces (such as databases, third-party APIs) through the data service bus, clean and transform data according to the API operator definition rules, including operator screening conditions, and generate data sets that conform to the standard formats of ECharts and D3;
[0023] The UI and user experience layer is used to load the corresponding chart components according to the API operator configuration rendering rules based on the on-demand loading mechanism of Web responsive component technology (Vue / React), and perform real-time data update and user interaction through the operator screening conditions.
[0024] Preferably, the underlying large model layer includes:
[0025] The deep error correction sub-module is used to complete the missing entities in the input text and correct the error units in the input text;
[0026] The intention parsing sub-module is used to parse the intention of the input text.
[0027] More preferably, the database layer includes:
[0028] The data retrieval condition configuration sub-module is used to define data dimensions, time ranges, and aggregation methods (aggregation functions);
[0029] The chart rendering rule configuration sub-module is used to set chart types, style templates (color schemes), and interaction logics (interaction events); among them, the chart types include line charts, bar charts, and heat maps;
[0030] The interface call protocol configuration sub-module is used to manage authentication methods, request parameter templates, and exception handling mechanisms.
[0031] An electronic device includes: a memory and at least one processor;
[0032] Wherein, a computer program is stored on the memory;
[0033] The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the text-to-chart dynamic generation method based on DeepSeek and API operators as described above.
[0034] A computer-readable storage medium stores a computer program, and the computer program can be executed by a processor to implement the text-to-chart dynamic generation method based on DeepSeek and API operators as described above.
[0035] The text-to-chart dynamic generation method and system based on DeepSeek and API operators of the present invention have the following advantages:
[0036] (1) The present invention has achieved a significant leap in the accuracy of intent parsing: Based on the deep semantic error correction and context reasoning capabilities of the DeepSeek large model, it can automatically complete and eliminate ambiguities in grammar errors (such as missing units) and ambiguous expressions in the user input. Experiments show that the accuracy of intent parsing has been significantly improved;
[0037] (2) The present invention has enhanced the dynamic adaptation ability of multi-source data: By decoupling the data interface and rendering logic through a standardized API operator library, it supports dynamic matching of heterogeneous data sources, and the adaptation success rate has been significantly improved compared with traditional hard-coded solutions. The system automatically calls the operator API (without paying attention to the underlying SQL) and uniformly converts it into a standardized data object, avoiding the cost of manual mapping;
[0038] (3) The present invention has significantly improved the efficiency and flexibility of chart generation: The dynamic visualization engine automatically selects the optimal chart type (line chart, stacked bar chart, scatter matrix, etc.) based on data characteristics (such as the dimensions of time series data and the number of categorical variables), and supports real-time interaction;
[0039] (4) The present invention has achieved end-to-end automation to reduce development costs: Enterprises do not need to customize and develop NLP parsing modules and chart rendering codes for each data dashboard. By configuring API operators, they can quickly access business scenarios;
[0040] (5) Through the natural language questions input by users, after semantic error correction and intent parsing by the large model, the present invention combines local vectorized retrieval to match the best operator in the API operator library, automatically calls the corresponding data interface to obtain real statistical data, and renders it to the front-end visualization chart through dynamic component encapsulation technology, improving the accuracy of intent parsing, enhancing the dynamic adaptation ability of multi-source data, and improving the efficiency and flexibility of chart generation;
[0041] (6) The present invention standardizes data retrieval conditions, chart rendering rules, and interface call logic through the API operator management module, realizing end-to-end automated processing from text input to visualization output, and solving the technical bottlenecks in semantic understanding, data adaptation, and dynamic rendering of traditional tools;
[0042] (7) The present invention relates to deep learning models, API service scheduling, and dynamic component rendering technologies, and is applicable to scenarios such as intelligent data analysis, low-code visualization platforms, and enterprise-level report automated generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The present invention will be further described below with reference to the accompanying drawings.
[0044] APPENDIX Figure 1 It is a schematic structural diagram of a text-to-chart dynamic generation system based on DeepSeek and API operators. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The following provides a detailed description of the method and system for dynamically generating text-to-graph based on DeepSeek and API operators of the present invention with reference to the accompanying drawings of the specification and specific embodiments.
[0046] Embodiment 1:
[0047] This embodiment provides a method for dynamically generating text-to-graph based on DeepSeek and API operators, and the method is as follows:
[0048] S1. Semantic parsing: Perform in-depth error correction and intent parsing on the input text through the DeepSeek large model, convert the parsing result into a high-dimensional vector, and retrieve the API operator with the highest similarity through the Milvus vector database;
[0049] S2. API operator matching and scheduling: Build a standardized API operator library to uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, select the optimal operator according to the vector matching result, dynamically generate API request parameters, and call the data interface;
[0050] S3. Dynamic data acquisition and formatting: Connect to multi-source heterogeneous interfaces (such as databases, third-party APIs) through the data service bus, clean and transform the data according to the API operator definition rules, including operator screening conditions, and generate a dataset that conforms to the standard formats of ECharts and D3;
[0051] S4. Dynamic rendering of visualization components: Based on the on-demand loading mechanism of Web responsive component technology (Vue / React), load the corresponding chart components according to the API operator configuration rendering rules, and perform real-time data update and user interaction through the operator screening conditions.
[0052] The content of the in-depth error correction in step S1 of this embodiment includes completing missing entities and correcting incorrect units.
[0053] The API operator matching and scheduling in step S2 of this embodiment is specifically as follows:
[0054] S201. Configure data retrieval conditions: Define data dimensions, time range, and aggregation method (aggregation function);
[0055] S202. Configure chart rendering rules: Set chart types, style templates (color schemes), and interaction logics (interaction events); among them, the chart types include line charts, bar charts, and heat maps;
[0056] S203. Configure interface call protocols: Manage authentication methods, request parameter templates, and exception handling mechanisms.
[0057] This embodiment also includes multi-round Q&A historical memory, specifically as follows:
[0058] ① Dynamically render Q&A charts;
[0059] ② Remember historical conversations.
[0060] Embodiment 2:
[0061] As shown in the appendix Figure 1 This embodiment provides a text-to-chart dynamic generation system based on DeepSeek and API operators. The system includes:
[0062] The underlying large model layer is used to deeply correct and parse the intent of the input text through the DeepSeek large model;
[0063] The database layer is used to convert the parsing results into high-dimensional vectors and retrieve the API operator with the highest similarity through the Milvus vector database;
[0064] The data processing layer is used to build a standardized API operator library, uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, and select the optimal operator according to the vector matching results, dynamically generate API request parameters, and call data interfaces;
[0065] The information key processing layer is used to dock multi-source heterogeneous interfaces (such as databases, third-party APIs) through the data service bus, clean and transform data according to the API operator definition rules, including operator screening conditions, and generate a dataset that conforms to the ECharts and D3 standard formats;
[0066] The UI and user experience layer is used to load the corresponding chart components according to the API operator configuration rendering rules based on the on-demand loading mechanism of Web responsive component technology (Vue / React), and perform real-time data update and user interaction through the operator screening conditions.
[0067] The underlying large model layer in this embodiment includes:
[0068] The deep error correction sub-module is used to complete the missing entities in the input text and correct the error units in the input text;
[0069] The intent parsing sub-module is used to parse the intent of the input text.
[0070] The database layer in this embodiment includes:
[0071] The data retrieval condition configuration sub-module is used to define data dimensions, time ranges, and aggregation methods (aggregation functions);
[0072] The chart rendering rule configuration sub-module is used to set the chart type, style template (color scheme), and interaction logic (interaction events); among them, the chart types include line charts, bar charts, and heat maps.
[0073] The interface call protocol configuration sub-module is used to manage the authentication method, request parameter template, and exception handling mechanism.
[0074] This system realizes semantic error correction and accurate intent parsing of natural language questions through the DeepSeek large model, constructs a standardized API operator library, uniformly manages data retrieval conditions, chart rendering rules, and interface call protocols, develops a visualization engine based on dynamic component encapsulation, supports on-demand rendering and interaction optimization of multiple types of charts, and provides a full-link automation solution from natural language input to real-time data chart output, improving the intent parsing accuracy rate, enhancing the dynamic adaptation ability of multi-source data, and improving the chart generation efficiency and flexibility.
[0075] Embodiment 3:
[0076] This embodiment also provides an electronic device, including: a memory and at least one processor;
[0077] Among them, the memory stores computer execution instructions;
[0078] The at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the text-to-chart dynamic generation method based on DeepSeek and API operators in any embodiment of the present invention.
[0079] The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0080] The memory can be used to store computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and invoking the data stored in the memory, the processor realizes various functions of the electronic device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function, etc.; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory can also include high-speed random access memory, and can also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMC), secure digital (SD) cards, flash memory cards, at least one magnetic disk storage period, flash memory devices, or other volatile solid-state storage devices.
[0081] Embodiment 4:
[0082] This embodiment also provides a computer-readable storage medium, which stores multiple instructions. The instructions are loaded by the processor to make the processor execute the text-to-graph dynamic generation method based on DeepSeek and API operators in any embodiment of the present invention. Specifically, a system or device equipped with a storage medium can be provided. On this storage medium, software program codes for implementing the functions in any one of the above embodiments are stored, and the computer (or CPU or MPU) of the system or device reads and executes the program codes stored in the storage medium.
[0083] In this case, the program code read from the storage medium itself can implement the functions in any one of the above embodiments. Therefore, the program code and the storage medium storing the program code constitute a part of the present invention.
[0084] Embodiments of the storage medium for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Optionally, the program code can be downloaded from a server computer via a communication network.
[0085] In addition, it should be clear that not only can the functions in any one of the above embodiments be realized by executing the program code read by the computer, but also by making the operating system operating on the computer, etc. based on the instructions of the program code to complete part or all of the actual operations.
[0086] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU or the like installed on the expansion board or the expansion unit is made to execute part or all of the actual operations, thereby implementing the functions of any one of the above embodiments.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for dynamically generating text-to-chart based on DeepSeek and API operators, characterized in that The method is as follows: Semantic parsing: Use the DeepSeek large model to perform in-depth error correction and intent parsing on the input text, convert the parsing results into high-dimensional vectors, and retrieve the API operator with the highest similarity through the Milvus vector database; API operator matching and scheduling: Build a standardized API operator library to uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, select the optimal operator according to the vector matching results, dynamically generate API request parameters, and call the data interface; Dynamic data acquisition and formatting: Connect to multi-source heterogeneous interfaces through the data service bus, clean and transform the data according to the API operator definition rules, including operator screening conditions, and generate a dataset that conforms to the ECharts and D3 standard formats; Dynamic rendering of visualization components: Based on the on-demand loading mechanism of Web responsive component technology, load the corresponding chart components according to the API operator configuration rendering rules, and perform real-time data update and user interaction through the operator screening conditions.
2. The method for dynamically generating text-to-chart based on DeepSeek and API operators according to claim 1, wherein The content of in-depth error correction includes filling in missing entities and correcting incorrect units.
3. The method for dynamically generating text to chart based on DeepSeek and API operators according to claim 1, characterized in that, The API operator matching and scheduling is as follows: Configure data retrieval conditions: Define data dimensions, time range, and aggregation method; Configure chart rendering rules: Set chart types, style templates, and interaction logics; among them, chart types include line charts, bar charts, and heat maps; Configure interface call protocols: Manage authentication methods, request parameter templates, and exception handling mechanisms.
4. The method for dynamically generating text-to-chart based on DeepSeek and API operators according to any one of claims 1 to 3, characterized in that, The method also includes multi-round Q&A historical memory, which is as follows: Dynamically render Q&A charts; Remember historical sessions.
5. A text-to-chart dynamic generation system based on DeepSeek and API operators, characterized in that, The system includes: The underlying large model layer, which is used to perform in-depth error correction and intent parsing on the input text through the DeepSeek large model; The database layer, which is used to convert the parsing results into high-dimensional vectors and retrieve the API operator with the highest similarity through the Milvus vector database; The data processing layer, which is used to build a standardized API operator library to uniformly manage data retrieval conditions, chart rendering rules, and interface call protocols, select the optimal operator according to the vector matching results, dynamically generate API request parameters, and call the data interface; The information key processing layer, which is used to connect to multi-source heterogeneous interfaces through the data service bus, clean and transform the data according to the API operator definition rules, including operator screening conditions, and generate a dataset that conforms to the ECharts and D3 standard formats; The UI and user experience layer, which is used to load the corresponding chart components according to the API operator configuration rendering rules based on the on-demand loading mechanism of Web responsive component technology, and perform real-time data update and user interaction through the operator screening conditions.
6. The text-to-chart dynamic generation system based on DeepSeek and API operators according to claim 5, characterized in that, The underlying large model layer includes: The in-depth error correction sub-module, which is used to fill in the missing entities of the input text and correct the incorrect units of the input text; The intent parsing sub-module, which is used to parse the intent of the input text.
7. The text-to-chart dynamic generation system based on DeepSeek and API operators according to claim 5 or 6, characterized in that The database layer includes: The data retrieval condition configuration sub-module, which is used to define data dimensions, time range, and aggregation method; The chart rendering rule configuration sub-module, which is used to set chart types, style templates, and interaction logics; among them, chart types include line charts, bar charts, and heat maps; The interface call protocol configuration sub-module is used to manage the authentication method, request parameter template, and exception handling mechanism.
8. An electronic device, characterized in that, Including: A memory and at least one processor; Wherein, a computer program is stored on the memory; The at least one processor executes the computer program stored in the memory, so that the at least one processor executes the text-to-graph dynamic generation method based on DeepSeek and API operators according to any one of claims 1 to 4.
9. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and the computer program can be executed by a processor to implement the text-to-graph dynamic generation method based on DeepSeek and API operators according to any one of claims 1 to 4.