Large model-based multi-modal intelligent question and chart generation system and method

By parsing and filtering historical logs to construct a keyword mapping set, and combining natural language processing and multi-dimensional feature algorithms, compliant SQL is generated and cached. This solves the problems of low SQL generation accuracy and context consistency in intelligent data systems, and enables real-time insight and efficient querying of complex business data.

CN121501832BActive Publication Date: 2026-03-27NANJING ANCIENT NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, intelligent query systems have low accuracy in generating SQL statements in complex query scenarios, prominent data illusion problems, and cannot maintain contextual consistency, making it difficult to meet enterprises' needs for real-time insights into complex business data.

Method used

By parsing historical intelligent query service logs, extracting and filtering structured database query statements, constructing an intelligent query keyword mapping set, and combining natural language processing and multi-dimensional feature weighting algorithms, compliant SQL is generated and cached to dynamically adapt to changes in business logic.

Benefits of technology

It improves the accuracy of SQL generation, reduces redundant queries, enhances data acquisition efficiency, meets enterprises' needs for real-time insights into complex business data, and presents results intuitively through visual charts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501832B_ABST
    Figure CN121501832B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-modal intelligent question and chart generation system and method based on large model, it is related to big data analysis technical field, the application is analyzed by calling historical intelligent question service log, parse and extract complete structured database query statement, after eliminating invalid log, the corresponding relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of key word and SQL core element is analyzed by parsing correlation, and the correspondence relationship of
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, specifically to a multimodal intelligent question and chart generation system and method based on a large model. Background Technology

[0002] In complex query scenarios of intelligent data analysis, the accuracy of SQL generation is low and the problem of data illusion is prominent. Specifically, large models, due to a lack of accurate understanding of database table structure, field meaning, and business rules, are prone to fabricating non-existent table names, fields, or incorrect logical relationships, resulting in SQL statements that cannot be executed or return distorted results. Especially in scenarios with multi-table joins and nested subqueries, due to insufficient training data coverage or biased understanding of business semantics, problems such as incorrect field matching and chaotic join logic often occur.

[0003] Existing technologies lack effective context awareness and dynamic semantic adaptation mechanisms, making it difficult to maintain contextual consistency in multi-turn dialogues and hindering the progressive mining of deep data correlation needs based on real-time semantic information provided by users. For example, when users request refined dimensions or correlation analysis based on initial query results, the model cannot quickly adjust its query logic, still relying on a single-turn semantic generation of fixed SQL, resulting in rigid query dimensions and delayed response. This dual problem of inaccurate generation and insufficient demand mining forces users to repeatedly adjust their query expressions, severely reducing data acquisition efficiency and failing to meet enterprises' needs for immediate insights into complex business data. Therefore, there is an urgent need for a multimodal intelligent query and chart generation system and method based on large models. Summary of the Invention

[0004] The purpose of this invention is to provide a multimodal intelligent question and graph generation system and method based on a large model, so as to solve the problems raised in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a multimodal intelligent question and chart generation method based on a large model, the multimodal intelligent question and chart generation method comprising the following steps:

[0006] Step S1: Retrieve historical intelligent questioning service logs through the backend service API interface of intelligent questioning, extract database query statements from the historical intelligent questioning service logs, analyze the extracted database query statements to obtain corresponding keywords, and filter data based on the database query statements and keywords combined with user feedback results.

[0007] Step S1-1: Read the historical intelligent questioning service logs in the order of log generation time through the API interface of the intelligent questioning backend service. Perform structured parsing on each historical intelligent questioning service log, identify the database query statement fragments recorded in the logs, remove invalid statement fragments through syntax validation rules, and extract the complete structured database query statement.

[0008] Step S1-2: Decompose each extracted structured database query statement into fields and logic, parse the target field names, statistical operation identifiers and condition parameters in the statement, and extract keywords corresponding to the intelligent query requirements based on the decomposition results; match each structured database query statement and corresponding keywords with the user feedback results of related records in the historical intelligent query service log, and remove database query statements and keywords whose user feedback results are invalid. The invalid user feedback results are specifically indicated by the log information of Exception in the historical intelligent query service log. The remaining database query statements and keywords after removal are retained and stored to complete the data filtering.

[0009] By retrieving and parsing historical intelligent query service logs in chronological order, complete structured database query statements are extracted, fields and logic are broken down to extract keywords, and user feedback results are combined to remove invalid logs containing exceptions, filter and retain valid data, and remove invalid query statements and keywords from the data source. This provides high-quality basic data for subsequent correlation analysis, effectively improves the problem of SQL generation deviation caused by invalid data, and reduces the source defect of low SQL generation accuracy.

[0010] Step S2: Perform correlation analysis on all the filtered data, and map and store the keywords and correlation analysis results to construct an intelligent question number keyword mapping set;

[0011] Step S2-1: Perform a group-by-group matching analysis on the stored database query statements and keywords, extract the correspondence between keywords and target field names of database query statements in each group, the binding relationship between keywords and statistical operation identifiers, and the association relationship between keywords and condition parameters, and form an association table between keywords and statement elements.

[0012] Step S2-2: Select keywords as unique identifiers. In the association table of keywords and sentence elements obtained in step S2-1, the corresponding target field names, statistical operation identifiers and condition parameters are written into the structured storage unit as the association analysis results to construct the intelligent question number keyword mapping set.

[0013] By performing correlation analysis on the filtered data, the correspondence between keywords and target field names, statistical operation identifiers, and condition parameters in database query statements is extracted. An intelligent query keyword mapping set is constructed, and a precise binding between keywords and core SQL elements is established. This solves the problem of fabricated table names and fields during SQL generation caused by a lack of understanding of database table structure and field meaning in large models. It provides a clear element mapping basis for the subsequent generation of compliant SQL and reduces the risk of data illusion.

[0014] Step S3: The user's access request for intelligent data inquiry is parsed using the scenario optimization big model, and the parsed data is cleaned and then processed by natural language processing technology to obtain the user's request keywords for intelligent data inquiry.

[0015] Step S3-1: Receive the intelligent data access request initiated by the user. The access request is represented as multimodal data, including structured data, semi-structured data and unstructured data submitted by the front-end access request. Input the access request into the scenario optimization model. Use the semantic parsing module built into the model to perform contextual semantic recognition, ambiguity elimination and core information extraction on the access request to obtain the parsed original data.

[0016] Step S3-2: Perform data cleaning operations on the parsed raw data, specifically including removing redundant characters, correcting format errors, and filling in missing key information fragments; input the cleaned data into the natural language processing module to perform word segmentation, part-of-speech tagging, and entity recognition, and extract words directly related to the intelligent questioning needs as keywords for users to initiate intelligent questioning.

[0017] By leveraging scenario-optimized large-scale models to analyze users' multimodal intelligent query access requests, and after data cleaning to remove redundancy, correct formatting, and fill in missing information, natural language processing is used to extract demand keywords. This enables accurate identification and ambiguity elimination of the semantic context of user requests, solving the problems of semantic comprehension bias and inability to accurately capture user needs. It provides accurate demand guidance for subsequent query logic matching, avoiding irrelevant answers.

[0018] Step S4: Create a demand keyword query cache area, and perform data query on the database based on the demand keywords of the intelligent question data and the intelligent question data keyword mapping set, and store the query results in the demand keyword query cache area;

[0019] Step S4-1: Create a query cache for demand keywords. Set the storage structure of the cache to key-value pairs, where the key is the combination of demand keywords obtained in step S3 for the user-initiated intelligent query, and the value is the corresponding database query result.

[0020] Step S4-2: Based on the user's requested keywords for intelligent data queries, call the intelligent data query keyword mapping set constructed in step S2, match the target field name, statistical operation identifier and condition parameters corresponding to the requested keywords, and generate a structured database query statement that conforms to the target business database syntax specification.

[0021] Step S4-3: Send the generated structured database query statement to the target business database through the backend data interaction interface of the intelligent query system, execute the data query operation to obtain the query result set returned by the database, and write the query result set into the requirement keyword query cache according to the correspondence between the combination of requirement keywords as keys and the query result set as values, thus completing the storage of the query results in the requirement keyword query cache.

[0022] By creating a query cache for demand keywords, structured SQL that conforms to the business database syntax is generated based on the intelligent question keyword mapping set matched with demand keywords. The query is executed and the results are stored in the cache. This not only ensures the compatibility of SQL with the database structure and business rules and solves the problem of SQL not being able to be executed, but also reduces the time spent on repeated queries through caching, improves the performance bottleneck of response lag, and improves the efficiency of data acquisition.

[0023] Step S5: Based on the analysis of historical intelligent question data service logs obtained in Step S1, set multi-dimensional feature weights for query results using a time decay weighting algorithm; extract multi-dimensional features from the demand keyword query cache and calculate the matching degree of demand keyword combinations using multi-dimensional feature weights, denoted as keyword association matching degree; extract related keywords using keyword association matching degree; filter query data for related keywords using cross-validation based on related keywords and the intelligent question data keyword mapping set; update the query data filtered by cross-validation to the demand keyword query cache; access the demand keyword query cache according to the database query statement; and render the query results to the front end to generate a visual chart.

[0024] The timeliness feature represents the timeliness of the query results associated with the interval between the generation time of the historical intelligent query service log and the current time; the shorter the interval, the higher the timeliness of the query results corresponding to this feature. The keyword matching feature represents the degree of matching between the user's current intelligent query needs keywords and the keywords corresponding to the database query statements in the historical intelligent query service logs; the more matches and the closer the semantics, the higher the feature value. The user feedback feature represents the validity of user feedback to the database query results recorded in the historical intelligent query service logs, i.e., the proportion of valid feedback, excluding log information containing exceptions, to the total feedback. The data attribute feature represents the consistency and compliance of the attributes of data elements such as target field names, statistical operation identifiers, and condition parameters involved in the database query statements in the historical intelligent query service logs; the higher the feature value, the more it conforms to the business database syntax specifications and field definitions.

[0025] Step S5-1: Retrieve the historical intelligent query service logs obtained in Step S1 and extract multi-dimensional features. The multi-dimensional features include time-sensitivity features, keyword matching degree features, user feedback features, and data attribute features. Calculate the percentage of valid feedback for each of the time-sensitivity features, keyword matching degree features, user feedback features, and data attribute features in the historical intelligent query service logs. Using a time decay weighting algorithm, adjust the percentage of valid feedback for each feature according to the historical log generation time to determine the weight value corresponding to each multi-dimensional feature.

[0026] The weight calculation formulas for multi-dimensional features are as follows:

[0027] ;

[0028] In the formula, W i R represents the weight value of the i-th dimension feature in the multi-dimensional feature set, where i includes timeliness feature, keyword matching feature, user feedback feature, and data attribute feature; i Δt represents the percentage of valid responses to historical queries in the historical intelligent query service log for the i-th dimension feature among the multi-dimensional features, i.e., the ratio of the number of valid query records corresponding to this feature to the total number of records; α represents the time decay coefficient, with a value range of 0 < α < 1; Δt i It represents the time interval between the historical log generation time corresponding to the i-th dimension feature in the multi-dimensional features and the current time;

[0029] Step S5-2: Extract multi-dimensional features from the created demand keyword query cache area, and convert each feature into a quantified value through normalization. Then, perform a weighted calculation with the multi-dimensional feature weights to obtain the keyword association matching degree in the demand keyword query cache area.

[0030] The formula for calculating keyword relevance matching degree is as follows:

[0031] ;

[0032] In the formula, M represents the keyword association matching degree in the keyword query cache; n represents the total number of multi-dimensional features, and its value is equal to the number of features in the multi-dimensional features; V i It represents the quantized value of the i-th dimension feature in the multi-dimensional feature after normalization, and its value range is [0, 1].

[0033] Step S5-3: Retrieve historical access request data recorded in the historical intelligent question service log of step S1, extract the historical demand keyword combination and historical keyword association matching degree corresponding to the historical access request, and construct a historical matching degree dataset; calculate the absolute value of the difference between the current keyword association matching degree obtained in step S5-2 and each historical matching degree in the historical matching degree dataset, filter out the historical record with the smallest absolute value of the difference, and extract the historical demand keyword combination corresponding to the historical record as the associated keyword;

[0034] Step S5-4: Based on the historical demand keyword combinations extracted in Step S5-3, determine the associated keywords; call the intelligent question-and-answer keyword mapping set constructed in Step S2, match the target field names, statistical operation identifiers, and condition parameters corresponding to the associated keywords, and generate a structured database query statement that conforms to the target business database syntax specifications; send the statement to the target business database through the intelligent question-and-answer backend data interaction interface to obtain the query data of the associated keywords; call the valid feedback records in the historical intelligent question-and-answer service log in Step S1 to cross-validate the query data of the associated keywords, remove the invalid data, and then fill in the valid query data into the cache according to the key-value pair structure of the demand keyword query cache, thus completing the update of the demand keyword query cache;

[0035] Step S5-5: Through the backend data access interface of the intelligent query, access the updated demand keyword query cache area according to the structured database query statement generated in step S4, and obtain the final query result set; according to the data attributes of the final query result set, call the front-end visualization rendering API interface to render the data, and output the rendered visualization chart to the front-end display interface.

[0036] By combining historical logs and a time decay weighting algorithm to set multi-dimensional feature weights, keyword association matching degree is calculated to extract related keywords. After cross-validation, related query data is filtered, the cache is updated, and a visual chart is rendered. This enables progressive mining of users' deep data association needs, solving the problems of not being able to dynamically adapt to changes in business logic and supporting in-depth insights. At the same time, the results are presented intuitively through visual charts, meeting the needs of enterprises for real-time insights into complex business data and avoiding users having to repeatedly adjust their query expressions.

[0037] Furthermore, a multimodal intelligent query and chart generation system based on a large model is provided, which includes a log parsing and filtering module, a keyword mapping construction module, a requirement keyword parsing module, a query cache management module, and a chart optimization and generation module.

[0038] The log parsing and filtering module includes a log query statement extraction unit and a feedback data filtering unit. The log query statement extraction unit is used to read historical logs through the intelligent query backend service API interface, parse them in a structured manner, and extract complete structured database query statements. The feedback data filtering unit is used to match structured database query statements, keywords, and user feedback results, and remove invalid database query statements and keywords from user feedback.

[0039] The keyword mapping construction module includes a data association analysis unit and a mapping set storage unit. The data association analysis unit is used to match the retained database query statements with keywords one by one, and extract the association relationship between keywords and statement elements to form an association table. The mapping set storage unit is used to write the statement elements in the association table into the structured storage unit with keywords as unique identifiers to construct an intelligent question number keyword mapping set.

[0040] The requirement keyword parsing module includes a user request parsing unit and a requirement keyword extraction unit. The user request parsing unit is used to receive multimodal access requests from users and obtain the raw data of the access requests through scenario optimization large model parsing. The requirement keyword extraction unit is used to clean the parsed raw data and extract requirement keywords directly related to the intelligent query requirements through the natural language processing module.

[0041] The query cache management module includes a cache area creation unit and a query result storage unit; the cache area creation unit is used to create a key-value pair query cache area for demand keywords, setting the key as a combination of demand keywords and the value as the corresponding database query result; the query result storage unit is used to match the intelligent query keyword mapping set to generate a query statement, execute the query, and write the result into the demand keyword query cache area;

[0042] The chart optimization and generation module includes an association matching optimization unit and a chart rendering and generation unit. The association matching optimization unit is used to extract multi-dimensional features and set weights, calculate keyword association matching degree to filter related keywords, and update the demand keyword query cache. The chart rendering and generation unit is used to access the updated demand keyword query cache to obtain results and call the front-end visualization rendering API interface to output a visualization chart.

[0043] The log parsing and filtering module retrieves historical intelligent query service logs, extracts database query statements, and filters data based on user feedback. The keyword mapping construction module performs association analysis between the filtered database query statements and keywords, and constructs an intelligent query keyword mapping set through mapping storage. The demand keyword parsing module parses user-initiated intelligent query access requests, and extracts demand keywords through natural language processing after data cleaning. The query cache management module creates a demand keyword query cache area, queries the database based on demand keywords, and stores the results in the cache area. The chart optimization and generation module sets multi-dimensional feature weights to calculate keyword association matching degree, updates the cache area, and renders the query results to generate visual charts.

[0044] Compared with the prior art, the beneficial effects of the present invention are:

[0045] 1. This invention retrieves historical intelligent query service logs, parses and extracts complete structured database query statements in chronological order, breaks down fields and logic to extract keywords, and combines user feedback to remove invalid logs containing exceptions and filter valid data; then, through correlation analysis of the correspondence between keywords and core SQL elements, it constructs an intelligent query keyword mapping set, ensuring data quality from the source and establishing a precise binding between keywords and SQL elements, solving the problem of large models lacking database knowledge and being prone to generating invalid SQL.

[0046] 2. This invention utilizes a scenario-optimized large model to parse user multimodal query requests, extracts demand keywords through data cleaning and natural language processing, and accurately captures user needs; it creates a cached area to match the keyword mapping set to generate compliant structured SQL, executes the query and stores the results, solving the problem of misjudgment of demand caused by semantic understanding bias, avoiding SQL non-compliance issues, and also improves response speed through caching, improving the defects of irrelevant answers and delayed response.

[0047] 3. This invention combines historical logs with a time decay weighting algorithm to set multi-dimensional feature weights, calculates keyword association matching degree to extract related keywords, filters data through cross-validation to update the cache, and finally retrieves the results to render a visual chart, realizing progressive mining of users' deep data needs. It solves the problems of the background technology being unable to dynamically adapt to business logic and support deep insights, presents results intuitively, meets the needs of enterprises for real-time insights into complex business data, and reduces the trouble of users repeatedly adjusting queries. Attached Figure Description

[0048] Figure 1 This is a flowchart illustrating a multimodal intelligent question and graph generation method based on a large model according to the present invention.

[0049] Figure 2 This is a schematic diagram of the structure of a multimodal intelligent question and graph generation system based on a large model according to the present invention. Detailed Implementation

[0050] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] Example 1: As Figure 1 As shown, this invention provides a technical solution: a multimodal intelligent question and chart generation method based on a large model. The multimodal intelligent question and chart generation method includes the following steps:

[0052] Step S1: Retrieve historical intelligent questioning service logs through the backend service API interface of intelligent questioning, extract database query statements from the historical intelligent questioning service logs, analyze the extracted database query statements to obtain corresponding keywords, and filter data based on the database query statements and keywords combined with user feedback results.

[0053] Step S1-1: Read the historical intelligent questioning service logs in the order of log generation time through the API interface of the intelligent questioning backend service. Perform structured parsing on each historical intelligent questioning service log, identify the database query statement fragments recorded in the logs, remove invalid statement fragments through syntax validation rules, and extract the complete structured database query statement.

[0054] Step S1-2: Decompose each extracted structured database query statement into fields and logic, parse the target field names, statistical operation identifiers and condition parameters in the statement, and extract keywords corresponding to the intelligent query requirements based on the decomposition results; match each structured database query statement and corresponding keywords with the user feedback results of related records in the historical intelligent query service log, and remove database query statements and keywords whose user feedback results are invalid. The invalid user feedback results are specifically indicated by the log information of Exception in the historical intelligent query service log. The remaining database query statements and keywords after removal are retained and stored to complete the data filtering.

[0055] In practical implementation, taking the intelligent analysis scenario of enterprise sales data as an example, step S1 retrieves the historical intelligent query service logs for this scenario through the intelligent query backend service API interface. Reading the logs in the order of their generation time ensures data timeliness and ensures that frequently occurring sales data query records are included first, providing basic data that fits the current business needs for subsequent analysis. When performing structured parsing on each log, invalid statement fragments with missing fields or logical conflicts are identified and removed based on SQL syntax validation rules. This ensures that the extracted structured database query statements have actual execution capabilities and avoids deviations in subsequent correlation analysis due to invalid statements. When filtering based on user feedback results, statements and keywords corresponding to logs containing exceptions are removed. The core principle is to exclude invalid information from the data source and reduce interference factors in subsequent processes. The entire process requires a stable connection with the backend service to ensure the integrity of log transmission and prevent the omission of key sales query records due to transmission interruptions.

[0056] Step S2: Perform correlation analysis on all the filtered data, and map and store the keywords and correlation analysis results to construct an intelligent question number keyword mapping set;

[0057] Step S2-1: Perform a group-by-group matching analysis on the stored database query statements and keywords, extract the correspondence between keywords and target field names of database query statements in each group, the binding relationship between keywords and statistical operation identifiers, and the association relationship between keywords and condition parameters, and form an association table between keywords and statement elements.

[0058] Step S2-2: Select keywords as unique identifiers. In the association table of keywords and sentence elements obtained in step S2-1, the corresponding target field names, statistical operation identifiers and condition parameters are written into the structured storage unit as the association analysis results to construct the intelligent question number keyword mapping set.

[0059] In practice, the database query statements and keywords related to the filtered sales data are matched and analyzed group by group. The core purpose of forming the association table is to establish a fixed mapping logic between keywords and core SQL elements, providing a clear basis for generating compliant SQL in the future. Selecting keywords as unique identifiers and writing them into structured storage units to build an intelligent query keyword mapping set can ensure that when users initiate related requests, the corresponding SQL elements can be quickly matched, avoiding the problem of fictitious fields or logical errors. If the same keyword corresponds to different business scenarios, it is necessary to add distinguishing identifiers based on the subdivided dimensions of sales data, such as "monthly sales - region A", to ensure the uniqueness and accuracy of the mapping relationship.

[0060] Step S3: The user's access request for intelligent data inquiry is parsed using the scenario optimization big model, and the parsed data is cleaned and then processed by natural language processing technology to obtain the user's request keywords for intelligent data inquiry.

[0061] Step S3-1: Receive the intelligent data access request initiated by the user. The access request is represented as multimodal data, including structured data, semi-structured data and unstructured data submitted by the front-end access request. Input the access request into the scenario optimization model. Use the semantic parsing module built into the model to perform contextual semantic recognition, ambiguity elimination and core information extraction on the access request to obtain the parsed original data.

[0062] Step S3-2: Perform data cleaning operations on the parsed raw data, specifically including removing redundant characters, correcting format errors, and filling in missing key information fragments; input the cleaned data into the natural language processing module to perform word segmentation, part-of-speech tagging, and entity recognition, and extract words directly related to the intelligent questioning needs as keywords for users to initiate intelligent questioning.

[0063] In practical implementation, the focus is on the actual user operations in the intelligent analysis scenario of enterprise sales data. The user access requests received in step S3 often contain multimodal data, such as structured sales report tables, semi-structured Excel format sales data, and unstructured text descriptions such as "query the product sales ranking of each region last month". After optimizing the large model of the request input scenario, its built-in semantic parsing module first eliminates the ambiguity of the specific time range corresponding to "last month" and identifies core information such as "region" and "product sales ranking". Then, through data cleaning, redundant spaces in the text description are removed, table format errors are corrected, and missing regional codes in the report are filled in, which can ensure that the parsed data is neat and complete. Subsequently, the natural language processing module performs word segmentation, part-of-speech tagging, and entity recognition to extract "last month", "region", and "product sales ranking" as demand keywords. The entire process requires comprehensive parsing of the three types of multimodal data. No demand details in unstructured text should be missed. Otherwise, it is easy to miss the extraction of core demand keywords, which will affect the accuracy of subsequent queries.

[0064] Step S4: Create a demand keyword query cache area, and perform data query on the database based on the demand keywords of the intelligent question data and the intelligent question data keyword mapping set, and store the query results in the demand keyword query cache area;

[0065] Step S4-1: Create a query cache for demand keywords. Set the storage structure of the cache to key-value pairs, where the key is the combination of demand keywords obtained in step S3 for the user-initiated intelligent query, and the value is the corresponding database query result.

[0066] Step S4-2: Based on the user's requested keywords for intelligent data queries, call the intelligent data query keyword mapping set constructed in step S2, match the target field name, statistical operation identifier and condition parameters corresponding to the requested keywords, and generate a structured database query statement that conforms to the target business database syntax specification.

[0067] Step S4-3: Send the generated structured database query statement to the target business database through the backend data interaction interface of the intelligent query system, execute the data query operation to obtain the query result set returned by the database, and write the query result set into the requirement keyword query cache according to the correspondence between the combination of requirement keywords as keys and the query result set as values, thus completing the storage of the query results in the requirement keyword query cache.

[0068] In practical implementation, focusing on the query efficiency requirements of intelligent analysis of enterprise sales data, a keyword query cache is created. The key is set as a combination of keyword requests ("last month + regions + product sales ranking"), and the value is a key-value pair structure corresponding to the query results. This structure enables rapid association and location of query results with keyword requests, reducing database interaction time during repeated queries. Based on the keyword requests, an intelligent query keyword mapping set is invoked to accurately match the target field name "product_sales", the statistical operation identifier "RANK", and the condition parameter "last_month", generating structured SQL that conforms to the enterprise sales database syntax specifications. This ensures that the SQL statement can be executed directly and obtains accurate results. After the SQL query is executed through the backend data interaction interface, the results are written to the cache, effectively reducing the access pressure on the sales database from high-frequency repeated queries. Simultaneously, the cache data must be refreshed synchronously with the real-time updates of the enterprise sales database to ensure that the sales query results stored in the cache are consistent with the actual data in the database, avoiding data lag from affecting user decisions.

[0069] Step S5: Based on the analysis of historical intelligent question data service logs obtained in Step S1, set multi-dimensional feature weights for query results using a time decay weighting algorithm; extract multi-dimensional features from the demand keyword query cache and calculate the matching degree of demand keyword combinations using multi-dimensional feature weights, denoted as keyword association matching degree; extract related keywords using keyword association matching degree; filter query data for related keywords using cross-validation based on related keywords and the intelligent question data keyword mapping set; update the query data filtered by cross-validation to the demand keyword query cache; access the demand keyword query cache according to the database query statement; and render the query results to the front end to generate a visual chart.

[0070] Step S5-1: Retrieve the historical intelligent query service logs obtained in Step S1 and extract multi-dimensional features. The multi-dimensional features include time-sensitivity features, keyword matching degree features, user feedback features, and data attribute features. Calculate the percentage of valid feedback for each of the time-sensitivity features, keyword matching degree features, user feedback features, and data attribute features in the historical intelligent query service logs. Using a time decay weighting algorithm, adjust the percentage of valid feedback for each feature according to the historical log generation time to determine the weight value corresponding to each multi-dimensional feature.

[0071] Step S5-2: Extract multi-dimensional features from the created demand keyword query cache area, and convert each feature into a quantified value through normalization. Then, perform a weighted calculation with the multi-dimensional feature weights to obtain the keyword association matching degree in the demand keyword query cache area.

[0072] Step S5-3: Retrieve historical access request data recorded in the historical intelligent question service log of step S1, extract the historical demand keyword combination and historical keyword association matching degree corresponding to the historical access request, and construct a historical matching degree dataset; calculate the absolute value of the difference between the current keyword association matching degree obtained in step S5-2 and each historical matching degree in the historical matching degree dataset, filter out the historical record with the smallest absolute value of the difference, and extract the historical demand keyword combination corresponding to the historical record as the associated keyword;

[0073] Step S5-4: Based on the historical demand keyword combinations extracted in Step S5-3, determine the associated keywords; call the intelligent question-and-answer keyword mapping set constructed in Step S2, match the target field names, statistical operation identifiers, and condition parameters corresponding to the associated keywords, and generate a structured database query statement that conforms to the target business database syntax specifications; send the statement to the target business database through the intelligent question-and-answer backend data interaction interface to obtain the query data of the associated keywords; call the valid feedback records in the historical intelligent question-and-answer service log in Step S1 to cross-validate the query data of the associated keywords, remove the invalid data, and then fill in the valid query data into the cache according to the key-value pair structure of the demand keyword query cache, thus completing the update of the demand keyword query cache;

[0074] Step S5-5: Through the backend data access interface of the intelligent query, access the updated demand keyword query cache area according to the structured database query statement generated in step S4, and obtain the final query result set; according to the data attributes of the final query result set, call the front-end visualization rendering API interface to render the data, and output the rendered visualization chart to the front-end display interface.

[0075] Numerical results are rendered as bar charts or line charts, textual results are rendered as information lists, and mixed results are rendered as charts combining text and graphics.

[0076] In practical implementation, historical intelligent inquiry service logs are retrieved to extract four types of multimodal features: timeliness, keyword matching degree, user feedback, and data attributes. After statistically analyzing the effective feedback ratio of each feature in sales data queries, the feature weights corresponding to recent logs are appropriately increased using a time decay weighting algorithm, allowing the weight settings to better align with the current business priorities of enterprise sales analysis. When calculating keyword association matching degree, cached features are first converted into quantified values ​​through normalization, and then weighted with multi-dimensional feature weights. Based on the calculation results, "last month's regional sales year-on-year comparison" is extracted from historical data as associated keywords, enabling progressive mining of users' deeper needs. After generating SQL query data corresponding to associated keywords, historical effective feedback records are called to cross-validate the data, eliminating invalid information such as discrepancies between sales data and actual outbound data. After updating the cache, the front-end visualization rendering API interface is called to generate a bar chart, which can intuitively present the sales comparison of each region. The calculation of multi-dimensional feature weights relies entirely on the effective feedback data of historical sales inquiry logs, and the weight allocation is automatically adjusted through algorithms to ensure the objectivity and accuracy of the matching degree calculation results.

[0077] Example 2, as Figure 2 As shown, the present invention provides a multimodal intelligent question and chart generation system based on a large model. The multimodal intelligent question and chart generation system includes a log parsing and filtering module, a keyword mapping construction module, a requirement keyword parsing module, a query cache management module, and a chart optimization and generation module.

[0078] The log parsing and filtering module includes a log query statement extraction unit and a feedback data filtering unit. The log query statement extraction unit is used to read historical logs through the intelligent query backend service API interface, parse them in a structured manner, and extract complete structured database query statements. The feedback data filtering unit is used to match structured database query statements, keywords, and user feedback results, and remove invalid database query statements and keywords from user feedback.

[0079] The keyword mapping construction module includes a data association analysis unit and a mapping set storage unit. The data association analysis unit is used to match the retained database query statements with keywords one by one, and extract the association relationship between keywords and statement elements to form an association table. The mapping set storage unit is used to write the statement elements in the association table into the structured storage unit with keywords as unique identifiers to construct an intelligent question number keyword mapping set.

[0080] The requirement keyword parsing module includes a user request parsing unit and a requirement keyword extraction unit. The user request parsing unit is used to receive multimodal access requests from users and obtain the raw data of the access requests through scenario optimization large model parsing. The requirement keyword extraction unit is used to clean the parsed raw data and extract requirement keywords directly related to the intelligent query requirements through the natural language processing module.

[0081] The query cache management module includes a cache area creation unit and a query result storage unit; the cache area creation unit is used to create a key-value pair query cache area for demand keywords, setting the key as a combination of demand keywords and the value as the corresponding database query result; the query result storage unit is used to match the intelligent query keyword mapping set to generate a query statement, execute the query, and write the result into the demand keyword query cache area;

[0082] The chart optimization and generation module includes an association matching optimization unit and a chart rendering and generation unit. The association matching optimization unit is used to extract multi-dimensional features and set weights, calculate keyword association matching degree to filter related keywords, and update the demand keyword query cache. The chart rendering and generation unit is used to access the updated demand keyword query cache to obtain results and call the front-end visualization rendering API interface to output a visualization chart.

[0083] The log parsing and filtering module retrieves historical intelligent query service logs, extracts database query statements, and filters data based on user feedback. The keyword mapping construction module performs association analysis between the filtered database query statements and keywords, and constructs an intelligent query keyword mapping set through mapping storage. The demand keyword parsing module parses user-initiated intelligent query access requests, and extracts demand keywords through natural language processing after data cleaning. The query cache management module creates a demand keyword query cache area, queries the database based on demand keywords, and stores the results in the cache area. The chart optimization and generation module sets multi-dimensional feature weights to calculate keyword association matching degree, updates the cache area, and renders the query results to generate visual charts.

[0084] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, it is intended that all variations falling within the meaning and scope of equivalents of the claims be included within the present invention.

Claims

1. A large model-based multi-modal intelligent question and chart generation method, characterized in that: The multi-modal intelligent question and chart generation method comprises the following steps: Step S1, the history intelligent question service log is called through the back-end service API interface of the intelligent question, and a database query statement is extracted from the history intelligent question service log, corresponding keywords are analyzed based on the extracted database query statement, and data filtering is performed according to the database query statement and the keywords combined with user feedback results; Step S2, according to the all data obtained by filtering, correlation analysis is carried out, and mapping storage is carried out according to the keywords and the correlation analysis results, and an intelligent question keyword mapping set is constructed; Step S3, the access request of the user initiating the intelligent question is parsed through the scene optimization large model, and the data obtained by parsing is processed by the natural language processing technology after data cleaning, and the demand keywords of the user initiating the intelligent question are obtained; Step S3-1, receiving the intelligent question access request initiated by the user, the access request is represented as multi-modal data, including structured data, semi-structured data and unstructured data submitted by the front-end access request; the access request is input into the scene optimization large model, and the context semantic recognition, ambiguity elimination and core information extraction of the access request are carried out through the semantic analysis module built in the large model, to obtain the parsed original data; Step S3-2, the original data obtained by parsing is executed data cleaning operation, specifically including removing redundant characters, correcting format errors and completing missing key information segments; the cleaned data is input into the natural language processing module, and word segmentation, part-of-speech tagging and entity recognition are executed, and the words directly related to the intelligent question demand are extracted as the demand keywords of the user initiating the intelligent question; Step S4, a demand keyword query cache area is created, and data query is performed on the database based on the demand keywords of the intelligent question combined with the intelligent question keyword mapping set, and the query result is stored to the demand keyword query cache area; Step S5, based on the history intelligent question service log analysis obtained in step S1, the multi-dimensional feature weight of the query result is set by combining the time decay weighting algorithm; the demand keyword query cache area is extracted and the multi-dimensional feature weight is calculated, and the matching degree of the demand keyword combination is recorded as the keyword correlation matching degree; the associated keywords are extracted by using the keyword correlation matching degree, and the associated keywords are screened by cross-validation based on the associated keywords combined with the intelligent question keyword mapping set, the query data of the cross-validation screened is updated to the demand keyword query cache area, the database query statement accesses the demand keyword query cache area, and the query result is rendered to the front end to generate a visual chart.

2. The large model-based multi-modal intelligent question and chart generation method according to claim 1, characterized in that: The specific steps of step S1 are as follows: Step S1-1, the history intelligent question service log is read according to the log generation time sequence through the API interface of the back-end service of the intelligent question, each history intelligent question service log is structured and parsed, the database query statement fragment recorded in the log is identified, the invalid statement fragment is removed through the syntax verification rule, and the complete structured database query statement is extracted; Step S1-2, field and logic disassembly is performed on each extracted structured database query statement, target field name, statistical operation identifier and condition parameter in the statement are parsed, and keywords corresponding to the intelligent query requirement are refined based on the disassembly result; Each structured database query statement, corresponding keywords, and user feedback results associated with the record in the historical intelligent query service log are matched, database query statements and keywords with invalid user feedback results are removed, the invalid user feedback results specifically mean that the log information containing Exception in the historical intelligent query service log, the remaining database query statements and keywords after the removal are retained and stored, and data filtering is completed.

3. The large model-based multi-modal intelligent question and chart generation method of claim 2, wherein: The specific steps of the step S2 are as follows: Step S2-1, the retained database query statements and keywords are matched and analyzed in groups, the corresponding relationship between the keywords and the target field name in each group, the binding relationship between the keywords and the statistical operation identifier, and the association relationship between the keywords and the condition parameter are extracted, and an association table of the keywords and the statement elements is formed; Step S2-2, the keywords are selected as unique identifiers, the corresponding target field name, statistical operation identifier and condition parameter in the association table of the keywords and the statement elements obtained in step S2-1 are taken as the association analysis result, and are written into a structured storage unit to construct an intelligent query keyword mapping set.

4. The large model-based multi-modal intelligent question and chart generation method of claim 3, wherein: The specific steps of the step S4 are as follows: Step S4-1, a demand keyword query cache area is created, the storage structure of the cache area is set in the form of key-value pair, the key is the demand keyword combination of the user initiating the intelligent query obtained in step S3, and the value is the corresponding database query result; Step S4-2, based on the demand keyword of the user initiating the intelligent query, the intelligent query keyword mapping set constructed in step S2 is called, the target field name, statistical operation identifier and condition parameter corresponding to the demand keyword are matched, and a structured database query statement conforming to the target business database syntax specification is generated; Step S4-3, the generated structured database query statement is sent to the target business database through the back-end data interaction interface of the intelligent query, a data query operation is performed to obtain a query result set returned by the database, and the query result set is written into the demand keyword query cache area according to the corresponding relationship that the demand keyword combination is taken as the key and the query result set is taken as the value, and the storage of the query result to the demand keyword query cache area is completed.

5. The large model-based multi-modal intelligent question and chart generation method according to claim 4, characterized in that: The specific steps of the step S5 are as follows: Step S5-1, the historical intelligent query service log obtained in step S1 is called and multi-dimensional feature extraction is performed, the multi-dimensional features include time timeliness feature, keyword matching degree feature, user feedback feature and data attribute feature; The historical query result effective feedback proportion corresponding to the time timeliness feature, the keyword matching degree feature, the user feedback feature and the data attribute feature in the historical intelligent query service log is counted, the effective feedback proportion of each feature in the multi-dimensional features is adjusted according to the historical log generation time by combining the time decay weighting algorithm, and the weight value corresponding to each multi-dimensional feature is determined; Step S5-2, multi-dimensional feature extraction is performed on the created demand keyword query cache area, and after each feature is converted into a quantitative value through normalization processing, weighted operation is performed on the multi-dimensional feature weight to obtain a keyword association matching degree in the demand keyword query cache area; Step S5-3, the historical access request data recorded in the historical intelligent question service log of step S1 is called, the historical demand keyword combination corresponding to the historical access request and the historical keyword association matching degree are extracted, and a historical matching degree data set is constructed; The absolute value of the difference between the current keyword association matching degree obtained in step S5-2 and each historical matching degree in the historical matching degree data set is calculated, the historical record with the smallest absolute value of the difference is filtered out, and the historical demand keyword combination corresponding to the historical record is extracted as the associated keyword.

6. The large model-based multi-modal intelligent question and chart generation method of claim 5, wherein: In step S5, it also includes: Step S5-4, taking the historical demand keyword combination extracted in step S5-3 as a reference, the associated keyword is determined; the intelligent question keyword mapping set constructed in step S2 is called, the target field name, statistical operation identifier and condition parameter corresponding to the associated keyword are matched, and a structured database query statement conforming to the target business database syntax specification is generated; the statement is sent to the target business database through the back-end data interaction interface of the intelligent question, and the query data of the associated keyword is obtained; the effective feedback record in the historical intelligent question service log of step S1 is called, the query data of the associated keyword is cross-verified, the data verified as invalid is removed, and then the effective query data is supplemented and written into the cache area in the key-value pair structure of the demand keyword query cache area, and the update of the demand keyword query cache area is completed; Step S5-5, the demand keyword query cache area is accessed through the back-end data access interface of the intelligent question according to the structured database query statement generated in step S4, and the final query result set is obtained; according to the data attribute of the final query result set, the front-end visual rendering API interface is called for data rendering, and the rendered visual chart is output to the front-end display interface.

7. A large model-based multi-modal intelligent question and chart generation system applied to the large model-based multi-modal intelligent question and chart generation method of any one of claims 1-6, characterized in that: The multi-modal intelligent question and chart generation system includes a log analysis and screening module, a keyword mapping construction module, a demand keyword analysis module, a query cache management module and a chart optimization generation module; The log analysis and screening module is used to call the historical intelligent question service log, extract the database query statement and perform data screening in combination with the user feedback result; the keyword mapping construction module is used to associate the screened database query statement with the keyword, and an intelligent question keyword mapping set is constructed through mapping storage; the demand keyword analysis module is used to analyze the intelligent question access request initiated by the user, and the demand keyword is extracted through natural language processing technology after data cleaning; the query cache management module is used to create a demand keyword query cache area, query a database based on the demand keyword, and store the result in the cache area; The chart optimization generation module is used to set multi-dimensional feature weight to calculate keyword association matching degree, update the cache area and render the query result to generate a visual chart.

8. The large model-based multi-modal intelligent question and chart generation system of claim 7, characterized in that: the log analysis and screening module includes a log query statement extraction unit and a feedback data screening unit; the log query statement extraction unit is configured to read historical logs through an intelligent question backend service API interface, structurally analyze and extract complete structured database query statements; the feedback data screening unit is configured to match structured database query statements, keywords, and user feedback results, and eliminate invalid database query statements and keywords in user feedback; the keyword mapping construction module includes a data correlation analysis unit and a mapping set storage unit; the data correlation analysis unit is configured to match the retained database query statements and keywords in groups, extract the correlation between keywords and statement elements to form a correlation table; the mapping set storage unit is configured to write the statement elements in the correlation table into a structured storage unit with keywords as the unique identifier, and construct an intelligent question keyword mapping set; the demand keyword analysis module includes a user request analysis unit and a demand word extraction unit; the user request analysis unit is configured to receive user multi-modal access requests and obtain the original data of the access requests through a scene optimization large model; the demand word extraction unit is configured to clean and analyze the original data, and extract demand keywords directly related to intelligent questions through a natural language processing module.

9. The large model-based multi-modal intelligent question and chart generation system of claim 7, characterized in that: the query cache management module includes a cache area creation unit and a query result storage unit; the cache area creation unit is configured to create a demand keyword query cache area in the form of key-value pairs, with the key being the demand keyword combination and the value being the corresponding database query result; the query result storage unit is configured to match the intelligent question keyword mapping set to generate a query statement, execute the query, and write the result into the demand keyword query cache area; the chart optimization generation module includes an association matching optimization unit and a chart rendering generation unit; the association matching optimization unit is configured to extract multi-dimensional features and set weights, calculate keyword association matching degrees to screen associated keywords, and update the demand keyword query cache area; the chart rendering generation unit is configured to access the updated demand keyword query cache area to obtain the result, call a front-end visualization rendering API interface to output a visual chart.

Citation Information

Patent Citations

  • Data attribution analysis task processing method, system and device based on large language model and storage medium

    CN120524150A

  • Enterprise number asking system and method based on combination of large language model and NL2SQL

    CN121166718A