Data research and judgment method for realizing natural statement content based on large model

By designing a large-scale traffic management model, the query language input by users is converted into SQL statements, which solves the problem of cumbersome and time-consuming traffic management data queries, enables traffic management personnel to obtain data efficiently and accurately, and reduces the burden on data governance engineers.

CN121833743APending Publication Date: 2026-04-10BEIJING E HUALU INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING E HUALU INFORMATION TECH
Filing Date
2025-12-30
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Traditional traffic management data query methods are cumbersome and time-consuming, unable to respond to emergencies in a timely manner, and the publicly available large language models lack sufficient expertise in the field of traffic management, making them unsuitable for direct application in traffic management.

Method used

The design of a large-scale traffic management model converts user-input query language into executable SQL statements. Through steps such as reordering, structured processing, vectorized retrieval, and table retrieval, it achieves data analysis of natural language content. The large-scale model is trained using traffic management expertise to improve query accuracy.

Benefits of technology

Traffic management personnel can directly use natural language to query data, improving the timeliness and convenience of data acquisition, reducing the burden on data governance engineers, optimizing human resource allocation, and improving query accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121833743A_ABST
    Figure CN121833743A_ABST
Patent Text Reader

Abstract

The invention provides a data study and judgment method for realizing natural statement content based on a large model, which comprises the following steps of: S1, splitting an original database through a reordering large model to obtain table knowledge; s2, converting the voice with the dialect of the user into mandarin text content; s3, performing structured processing on problems existing in mandarin text content by using a general large model to standardize the problems; s4, general knowledge and business knowledge are retrieved through a vectorized large model, and similarity matching is carried out on standardized questions to realize knowledge enhancement; s5, combining the obtained contents through table retrieval, and realizing knowledge enhancement on the standardized questions; and S6, for the normalized problem after knowledge enhancement, generating a large model through sql to realize query statement generation, and obtaining an executable SQL statement. According to the data research and judgment method for realizing the natural statement content based on the large model, traffic management personnel can autonomously and efficiently acquire data, the timeliness and convenience of data acquisition are improved, the workload of data management engineers can be greatly reduced, and human resource configuration is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a large model processing method, and more particularly to a data analysis method for natural language content based on a large model. Background Technology

[0002] With the acceleration of urbanization and the continuous growth of motor vehicle ownership in my country, the traffic management bureau, as the core department for maintaining road traffic order and ensuring road safety, has traffic management personnel whose daily work involves massive data processing and analysis. Demands for things like violation record inquiries and accident statistics are constantly emerging, and the data related to these demands are scattered in complex data tables.

[0003] However, traditional data query methods have many drawbacks. Currently, if traffic management personnel need to query various types of traffic management data, they must first clearly explain their needs to a data governance engineer. The engineer then processes and integrates this data, writes SQL statements, queries the database, and finally returns the results to the traffic management personnel. This entire process is cumbersome and time-consuming, significantly impacting work efficiency, and it cannot respond promptly to unexpected situations. Furthermore, existing solutions require data governance engineers to be familiar with traffic management operations and understand traffic management terminology, which necessitates significant training time. During this process, if engineers misunderstand traffic management documents, it will severely affect the accuracy of subsequent work.

[0004] While large language models possess powerful natural language processing and learning capabilities, publicly available large language models lack sufficient mastery of specialized knowledge in the traffic management field. The numerous specialized terms and complex business rules involved in traffic management are difficult for publicly available large language models to fully cover. Furthermore, confidential internal documents and data contain important traffic management information and citizens' privacy data, which traffic management personnel cannot extract for training publicly available models. This further limits the direct application of publicly available large language models in the traffic management field. Summary of the Invention

[0005] This invention provides a data analysis method for natural language content based on a large model. It solves the problem of converting user-input queries into executable SQL statements by designing a large traffic management model. This method transforms user-input queries into SQL that is more easily understood by the large model. The technical solution is as follows: A data analysis method for natural language content based on a large model includes the following steps: S1: Split the original database by reordering the large model to obtain table knowledge; S2: Convert the user's speech with dialect into Mandarin text content; S3: Use a general large model to structurally process the problems existing in the content of Mandarin text and standardize it; S4: Retrieve general and business knowledge through a vectorized large model, and perform similarity matching on standardized questions to achieve knowledge enhancement; S5: By retrieving data from a table, the retrieved content is merged to enhance knowledge for standardized problems; S6: For the standardization problem after knowledge enhancement, query statements are generated by generating a large model using SQL, resulting in executable SQL statements.

[0006] Furthermore, in step S3, extraction templates and rules are specified for the general large model. The rules include some field annotations in the business database, enabling it to learn the specified structured rules and extract various hidden conditions in the problem, including time range, data attributes, and association rules. These conditions are then standardized according to the structured rules. The field annotations in this part need to have their field names explicitly specified in the query and are selected manually.

[0007] Furthermore, in step S4, the general knowledge is used to strengthen the knowledge reserve of the large model by collecting and organizing knowledge content that frequently appears in daily use.

[0008] Furthermore, in step S4, the business knowledge refers to the field query rules and judgment logic formulated by local traffic management bureaus for different business categories.

[0009] In step S4, the vectorized large model uses a key-value type to retrieve general knowledge and business knowledge. The key contains only the terminology of the knowledge, and the value stores the specific query logic. During knowledge retrieval, only the key is used for similarity matching to improve the accuracy of the retrieval.

[0010] In step S4, a key is used for similarity matching. The number of keys can be used to determine the relevance between the question and the knowledge through a general large model, and then proceed with the iterative process.

[0011] Furthermore, in step S1, the reordering model uses clustering algorithms and table retrieval methods. The clustering algorithm is used to split the fields in the data tables of the original database according to the splitting rules, and then the table retrieval is used to calculate the tables and fields related to the problem to obtain table knowledge.

[0012] Clustering algorithms are used to split the fields of a data table according to the following splitting rules: (1) If the number of non-foreign key fields is less than 15, no splitting is required; (2) Each sub-table after splitting has no more than 10 non-foreign key fields; (3) Aggregate and split tables according to the meaning of the fields, and the meaning of the fields in each sub-table is similar.

[0013] Furthermore, in step S6, the SQL generation large model involves inputting the vector representations of general knowledge and business knowledge, table knowledge content, and standardized questions into the large language model to obtain the SQL query statement output by the large language model.

[0014] The data analysis method based on a large model for natural language content is based on traffic management expertise. It trains a large traffic management model that generates SQL suitable for the traffic management field. It optimizes the knowledge retrieval process by designing a key-value type RAG to improve retrieval accuracy. It also specifies splitting rules for complex table structures to simplify the number of characters input into the large model. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating the data analysis method for natural language content based on a large model. Figure 2 This is a flowchart of the query language processing of the data analysis method for natural language content based on the large model. Detailed Implementation

[0016] like Figure 1 and Figure 2 As shown, the data analysis method for natural language content based on a large model includes the following steps: S1: Split the original database by reordering the large model to obtain table knowledge; Because the original database contains a large number of fields, if all fields are input into the SQL generation model, the SQL generation model will be affected by fields unrelated to the problem when generating SQL statements, which will greatly reduce the accuracy of SQL generation.

[0017] Therefore, this invention proposes a method for simplifying table structures. By reordering the large model, the original database is split, and a clustering algorithm is used to split the fields in a data table according to the splitting rules. The subsequent steps can use table retrieval to calculate the tables and fields related to the problem from the table knowledge and then perform merging processing.

[0018] The aforementioned large-scale re-ranking model refers to a large-scale language model (LLM) specifically designed for refining and re-ranking initial search results in information retrieval or retrieval augmentation (RAG) systems. Its core objective is to improve the relevance of search results by deeply understanding the semantic relationship between queries and documents, placing the most relevant documents at the top, thereby optimizing the quality of downstream tasks such as question answering or summarizing. The core function of the large-scale re-ranking model is to address the limitations of the initial retrieval process. The initial retrieval stage (such as vector search) may retrieve inaccurate results due to vector space bias or lexical mismatch; the re-ranking model acts as a "quality control layer," performing secondary filtering and precise ranking of the candidate document set.

[0019] The reordering model uses a clustering algorithm to split the fields of a data table according to a splitting rule, which is as follows: (1) If the number of non-foreign key fields is less than 15, no splitting is required; (2) Each sub-table after splitting has no more than 10 non-foreign key fields; (3) Aggregate and split tables according to the meaning of the fields, such as business usage scenarios, regions, and different categories of fields, and the meaning of the fields in each sub-table is similar.

[0020] S2: Convert the user's speech with dialect into Mandarin text content; Many regions have distinctive dialects with unique vocabulary and grammar, making it difficult for general models to accurately capture their inherent meaning. To eliminate semantic bias and ensure smooth execution of subsequent semantically dependent nodes, the dialects are first converted into Mandarin. When a user asks a question in dialect, it is first converted into Mandarin text.

[0021] S3: Use a general large model to structurally process the problems existing in the content of Mandarin text and standardize it; For the converted Mandarin text content, due to the diverse forms of user input, direct processing does not meet the relevant input requirements. For example, the table knowledge retrieval in subsequent processes relies heavily on data table field comments, while unstructured statements generally only contain detailed field data, which affects the accuracy of table knowledge retrieval. Furthermore, the large SQL generation model cannot accurately understand the fields to be queried and some constraints in the problem, and may even lose key information in the problem.

[0022] Therefore, it is necessary to structurally process the problems existing in the Mandarin text content. This is done by using a general model, which is given extraction templates and rules. These rules include field annotations from the business database, and some transformation examples are provided to fine-tune the general model, enabling it to learn the predefined structured rules. This allows the extraction of various hidden conditions in the problem, such as time range, data attributes, and association rules, and their standardization based on the structured rules.

[0023] The general-purpose large-scale model is an AI technology with broad knowledge coverage and diverse task processing capabilities. Trained on massive amounts of data, these models can understand natural language, generate text, answer questions, and perform various complex tasks. The core advantage of the general-purpose large-scale model lies in its powerful generalization ability, adapting to the needs of different domains without requiring specialized training for each task. General-purpose large-scale models can be used in multiple fields such as content creation, customer service dialogue, data analysis, and educational tutoring. For example, in customer service scenarios, it can quickly respond to user inquiries and provide accurate information; in the education field, it can assist students in answering questions or generating learning materials. These models are typically based on deep learning architectures (such as Transformer) and achieve high performance through two stages: pre-training and fine-tuning. The pre-training stage allows the model to learn language rules and world knowledge, while the fine-tuning stage optimizes the model's performance for specific tasks.

[0024] Therefore, when fine-tuning the general model, select field annotations that cover a portion of the business database. To obtain annotations for specific fields in a given table, the field names must be explicitly specified in the query. Manually select some common fields to train the general model, thus achieving fine-tuning. This step allows the subsequent SQL generation model to clearly understand all the conditions covered by the problem, effectively avoiding incomplete SQL statements caused by missing conditions and improving the accuracy of SQL generation.

[0025] S4: Retrieve general and business knowledge through a vectorized large model, and perform similarity matching on standardized questions to achieve knowledge enhancement; The vectorized large model refers to the process of converting data (such as text, images, etc.) from large language models (LLM) or generative AI systems into high-dimensional vector representations. These vectors are numerical codes that capture the semantic information of the data. The core principle of vectorization is encoding semantics into mathematical coordinates. It uses AI models (such as neural networks) to transform unstructured data into points in a high-dimensional space, making semantically similar content closer together in the vector space, thus transforming the abstract semantic matching problem into vector similarity calculation. For example, the vectors of the texts "coffee shop" and "Starbucks" will be close to each other because they share semantic features such as "drink" and "place." The aforementioned general knowledge is used to strengthen the knowledge base of the large model. It involves collecting and organizing key knowledge that frequently appears in daily applications, such as the term "this quarter" reflecting time periods and the term "year-on-year" used in data analysis. This knowledge explains the correct SQL statements for these terms. Injecting this knowledge into the SQL generation model improves the accuracy of SQL generation.

[0026] The aforementioned business knowledge refers to the field query rules and judgment logic formulated by local traffic management bureaus for different business categories, such as violation investigation and accident management, in order to achieve refined management. To adapt the SQL generation model to the rules of various regions, this professional and targeted knowledge is provided to it, enabling it to clearly understand which rules should be selected for statement generation in each specific business scenario, thereby improving the accuracy of SQL generation.

[0027] For retrieving general and business knowledge, since the knowledge may contain SQL statements and query rules (such as the query codes for drunk driving set up by traffic management bureaus in various regions), performing similarity matching between the entire knowledge and structured questions can actually negatively impact retrieval results. To address this issue, this invention designs a key-value type vectorized large model to implement this process. This vectorized large model can achieve Retrieval-augmented Generation (RAG), where the key contains only the terminology of the knowledge, and the value stores the specific query logic. During knowledge retrieval, only the key is used for similarity matching to improve retrieval accuracy.

[0028] Furthermore, due to the diverse nature of business knowledge, in order to ensure the accuracy of knowledge retrieval while reducing the amount of knowledge provided to the SQL-generated large model, this invention appropriately increases the number of keys output during knowledge retrieval. However, an iterative process is added after this process to re-evaluate the relevance between the question and the knowledge using a general large model. Of course, considering the time consumption of the general large model, only knowledge with a similarity score greater than 0.5 between the question and the knowledge is selected for this iterative process.

[0029] S5: Perform table retrieval on the table knowledge, merge the obtained content, and enhance knowledge for standardized problems; Table knowledge is a decentralized way of representing content. By searching through tables, at least one piece of content related to the search results can be obtained. Multiple pieces of content are then merged, and knowledge enhancement is achieved on the standardized problem.

[0030] In this embodiment, a table retrieval method is used, which is highly dependent on the field annotations of the data table. Furthermore, considering that business knowledge includes field information from the data table, merging it with the standardized questions can improve the accuracy of table retrieval.

[0031] S6: For the standardization problem after knowledge enhancement, query statements are generated by generating a large model using SQL, resulting in executable SQL statements.

[0032] The standardized problem is enhanced with knowledge through steps S3 and S4, thereby providing additional knowledge for generating a large SQL model. Generating a large model using SQL (Structured Query Language) involves inputting vector representations of general and business knowledge, table knowledge content, and the standardized problem into the large language model, resulting in the SQL query statement output by the large language model.

[0033] This invention allows traffic management personnel to directly query data using natural language, eliminating intermediate communication steps and providing strong support for handling emergency traffic incidents due to the timeliness of data acquisition. Data governance engineers are also relieved of the need to handle various query requests, allowing them to focus on more valuable in-depth data analysis and optimization. This solution not only enables traffic management personnel to acquire data autonomously and efficiently, improving the timeliness and convenience of data acquisition, but also significantly reduces the workload of data governance engineers, optimizing human resource allocation. Furthermore, this solution utilizes a large-scale model trained on the traffic management bureau's internal professional knowledge; targeted training can improve the accuracy of the model's responses.

Claims

1. A data analysis method for natural language content based on a large model, comprising the following steps: S1: Split the original database by reordering the large model to obtain table knowledge; S2: Convert the user's speech with dialect into Mandarin text content; S3: Use a general large model to structurally process the problems existing in the content of Mandarin text and standardize it; S4: Retrieve general and business knowledge through a vectorized large model, and perform similarity matching on standardized questions to achieve knowledge enhancement; S5: By retrieving data from a table, the retrieved content is merged to enhance knowledge for standardized problems; S6: For the standardization problem after knowledge enhancement, query statements are generated by generating a large model using SQL, resulting in executable SQL statements.

2. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S3, extraction templates and rules are specified for the general large model. The rules include some field annotations in the business database, enabling it to learn the specified structured rules and extract various hidden conditions in the problem, including time range, data attributes, and association rules. These conditions are then standardized according to the structured rules. The field annotations in this part need to have their field names explicitly specified in the query and are selected manually.

3. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S4, the general knowledge is used to strengthen the knowledge reserve of the large model by collecting and organizing knowledge content that frequently appears in daily use.

4. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S4, the business knowledge refers to the field query rules and judgment logic formulated by local traffic management bureaus for different business categories.

5. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S4, the vectorized large model uses a key-value type to retrieve general knowledge and business knowledge. The key contains only the terminology of the knowledge, and the value stores the specific query logic. During knowledge retrieval, only the key is used for similarity matching to improve the accuracy of the retrieval.

6. The data analysis method for natural language content based on a large model according to claim 5, characterized in that: In step S4, a key is used for similarity matching. The number of keys can be used to determine the relevance between the question and the knowledge through a general large model, and then proceed with the iterative process.

7. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S1, the reordering model uses clustering algorithms and table retrieval methods. The clustering algorithm is used to split the fields in the data tables of the original database according to the splitting rules, and then the table retrieval is used to calculate the tables and fields related to the problem to obtain table knowledge.

8. The data analysis method for natural language content based on a large model according to claim 7, characterized in that: Clustering algorithms are used to split the fields of a data table according to the following splitting rules: (1) If the number of non-foreign key fields is less than 15, no splitting is required; (2) Each sub-table after splitting has no more than 10 non-foreign key fields; (3) Aggregate and split tables according to the meaning of the fields, and the meaning of the fields in each sub-table is similar.

9. The data analysis method for natural language content based on a large model according to claim 1, characterized in that: In step S6, the SQL generation large model involves inputting the vector representations of general knowledge and business knowledge, table knowledge content, and standardized questions into the large language model to obtain the SQL query statement output by the large language model.