Method and system for generating traffic report based on large model
Through the traffic report generation method based on the big model, accurate identification of report types and multi-dimensional in-depth data mining are achieved, which solves the problems of insufficient personalized demand response and insufficient data mining in the traditional traffic report generation method, and improves generation efficiency and system adaptability.
Patent Information
- Application Number
- CN202510481201.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-08-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional traffic report generation method has solidified report types and formats, resulting in insufficient response to personalized demands, lack of systematic data collection, difficult to match the actual concerns of users, basic statistical means limit the in-depth data mining, manual writing process is time-consuming and error-prone, and it is difficult to cope with dynamic and complex traffic scenario needs.
The traffic report generation method based on large models is used to identify the report type through multimodal parameter fusion technology, and the large model is used for semantic vector search and data analysis, and a syntax tree is generated by combining the end-to-end model to conduct data query and report content generation, which is integrated into a complete report.
It realizes accurate matching of report types and multi-dimensional in-depth data mining, reduces artificial errors, improves generation efficiency, optimizes system resource allocation, and adapts to the needs of dynamic traffic scenarios.
Smart Images

Figure CN120409490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a method and system for generating a traffic report based on a large model. Background Art
[0002] Traditional traffic report generation methods rely on fixed templates and manual operations, and have multi-dimensional limitations: the rigidity of report types and formats leads to insufficient response to personalized needs, the lack of systematic data collection can easily lead to parameter omissions or errors, the preset analysis topics are difficult to fit the actual concerns of users, basic statistical methods limit the depth of data mining, the manual writing process is time-consuming and error-prone, and traditional technical tools are difficult to cope with the dynamic and complex needs of traffic scenarios. Summary of the Invention
[0003] The embodiments of the present invention provide a method and system for generating a traffic report based on a large model, which are used to solve the technical problems existing in the prior art.
[0004] In order to achieve the above-mentioned purpose, the present invention adopts the following technical solutions.
[0005] A method for generating a traffic report based on a large model, comprising:
[0006] S1 identifies the report type according to the user prompt word, selects the report type that meets the user's requirements from the report type library, and extracts the parameter information required for the report type based on the user's needs and using multimodal parameter fusion technology;
[0007] S2 pre-breaks the original report into sub-chapters and converts the title and text into quickly searchable semantic vectors, and sets the data source to use. It then uses a large model to perform vectorized retrieval of analysis topics based on requirements and explicit and implicit contexts, and selects relevant topic entries that meet the requirements from the library based on the cosine similarity of the vectors.
[0008] Based on the data requirements in the topic, S3 extracts entities from the database table through few-shot context learning using a large model. It then uses an end-to-end model to directly generate a syntax tree, which is then verified by the rule engine before data query. Alternatively, it directly matches the parameters extracted in the previous step to supplement the request message and then calls the interface to query the data.
[0009] S4 generates the report content of the corresponding sub-item by the large language model based on the data extracted in step S3 and the context description of the report subject content requirements;
[0010] S5 integrates the analysis topic content generated in step S4 into chapters to obtain a final complete report.
[0011] Preferably, step S1 includes:
[0012] S11 encodes the user's requirements based on pre-trained large language model technology and outputs intent labels through a classification head.
[0013] If it is a report generation intent, it jumps to the next report generation unit.
[0014] S12 aligns the requirements with a pre-defined report type tag library based on semantic similarity matching and selects the report type that meets the user's expectations.
[0015] S13 adopts multi-modal parameter fusion according to the user's requirements and identifies other dimension information such as time, entity, and numerical value from the user's requirements through named entity recognition technology; if the provided parameters are incomplete, it starts an interactive feedback with the user to prompt the user to supplement the corresponding parameter information.
[0016] Preferably, step S2 includes:
[0017] S21 pre-disassembles the report into sub-chapters, converts the title and text into semantic vectors that can be quickly retrieved, and sets the data source, data analysis requirements, and presentation form items for them.
[0018] S22 performs vectorized retrieval of the analysis topic through the large model for the requirements and explicit and implicit contexts, and screens out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors.
[0019] Preferably, step S3 includes:
[0020] S31 iteratively screens the selected topic entries.
[0021] S32 is based on the data setting requirements in the topic entries to convert natural language to SQL language or application programming interface method. When using NL2SQL, entity extraction of database tables is performed through few-shot context learning of the large model, and then an end-to-end model is used to directly generate a syntax tree, which is supplemented and verified by a rule engine. Finally, it is handed over to the SQL execution unit for data query. When using the application programming interface method, it directly matches the topic entries extracted in sub-step S31 to supplement the request message and then calls the interface for data query.
[0022] S33 obtains the topic data required for the analysis topic through the SQL data generated by executing sub-step S32, or by calling the API interface corresponding to sub-step S32.
[0023] S34 performs standardization processing on the topic data obtained by executing sub-step S33, including data precision processing and data format processing.
[0024] Preferably, step S4 includes:
[0025] S41 Obtain the format requirements for generating the content of the analysis topic;
[0026] S42 Call different content generation components according to the format requirements for generation, including large model summary analysis, chart generation, and table data generation.
[0027] Preferably, step S5 includes:
[0028] S51 Integrate the content generated for each analysis topic as a whole to form the final complete traffic report content;
[0029] S52 Persistently save the complete report content to avoid unnecessary repeated generation of the report and improve the query efficiency of the report.
[0030] In a second aspect, the present invention provides a traffic report generation system based on a large model, including:
[0031] A data acquisition module for:
[0032] Identify the report type according to the user's prompt words, select the report type that meets the user's requirements from the report type library, and extract the parameter information required for this report type according to the user's needs and using the multi-modal parameter fusion technology;
[0033] Pre-disassemble the obtained original report into sub-chapters, convert the title and text into semantic vectors that can be quickly retrieved, and set the data source for it; perform vectorized retrieval of the analysis topic through the large model for the requirements and explicit and implicit contexts, and screen out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors;
[0034] An analysis and processing module for:
[0035] According to the data setting requirements in the topic, perform entity extraction of the database table through the few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, and supplement and verify it by a rule engine, and hand it over to the SQL execution module for data query; alternatively, directly match the parameters extracted in the previous step to supplement the request message and then call the interface for data query;
[0036] Based on the above-extracted data and the context description of the report topic content requirements, then hand it over to the large language model to generate the report content corresponding to the sub-entries;
[0037] An output module for: integrating the above-generated analysis topic content in chapter form to form the final complete report; and outputting the complete report.
[0038] Preferably, the analysis and processing module includes an iterative processing unit, a sorting and processing unit, an SQL execution unit, a theme data acquisition unit, and a data standardization processing unit;
[0039] The iterative processing unit is used to iteratively screen the selected theme entries;
[0040] The sorting and processing unit is used for: based on the data setting requirements in the theme entries, which are to convert natural language to SQL language or in the form of an application programming interface. If NL2SQL is adopted, entity extraction of database tables is performed through few-shot context learning of a large model, and then an end-to-end model is used to directly generate a syntax tree, which is supplemented and verified by a rule engine, and finally handed over to the SQL execution unit for data query. If the application programming interface method is adopted, the extracted theme entries are directly matched to supplement the request message and then the interface is called for data query;
[0041] The theme data acquisition unit is used for: obtaining the theme data required for analyzing the theme through the SQL data generated by executing sub-step S32, or by calling the API interface corresponding to the executed sub-step S32;
[0042] The data standardization processing unit is used for: performing standardization processing on the theme data obtained by executing sub-step S33, including data precision processing and data format processing.
[0043] It can be seen from the technical solutions provided by the embodiments of the present invention described above that the present invention relates to the technical field of intelligent report generation, and provides a method and system for generating a traffic report based on a large model. The method includes: identifying the report type according to the user's prompt words and selecting the report that the user needs to generate; extracting the key parameters of the report, such as date, shift, shift type, etc., for subsequent data extraction; screening the analysis themes of the report content, and screening out the analysis themes of the report sub-content based on the user's intention; extracting the analysis data of the report theme content based on the report analysis theme and parameters; analyzing, summarizing, and generalizing the data based on the report analysis theme data and requirements; and finally summarizing the report, and merging the generated content of each report analysis theme to complete the generation of the entire report. The present invention accurately matches the report type through intelligent requirement recognition technology, constructs a structured parameter extraction mechanism to ensure the orderliness of data processing; dynamically screens analysis themes based on the user's intention, and combines a large model to achieve in-depth mining of multi-dimensional data; the full-process automatic generation mechanism significantly improves efficiency and reduces human errors, innovatively introduces large model technology to break through the application limitations of traditional tools, effectively solves the core pain points of traditional methods in demand adaptation, data quality, analysis depth, generation efficiency, and technical adaptability, and can also optimize the system processing configuration and save system resources.
[0044] Additional aspects and advantages of the present invention will be given in part in the following description, will become apparent from the following description, or will be learned through the practice of the present invention. Brief Description of the Drawings
[0045] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0046] Figure 1 It is a flowchart of a method for generating a traffic report based on a large model provided by the present invention.
[0047] Figure 2 It is a process diagram for report type recognition of a method for generating a traffic report based on a large model provided by the present invention;
[0048] Figure 3 It is a process diagram for theme content screening of a method for generating a traffic report based on a large model provided by the present invention;
[0049] Figure 4 It is a process diagram for theme data extraction of a method for generating a traffic report based on a large model provided by the present invention;
[0050] Figure 5 It is a process diagram for theme content generation of a method for generating a traffic report based on a large model provided by the present invention;
[0051] Figure 6 It is a process diagram for report summarization of a method for generating a traffic report based on a large model provided by the present invention;
[0052] Figure 7 It is a logical block diagram of a system for generating a traffic report based on a large model provided by the present invention;
[0053] Figure 8 It is a logical block diagram of an analysis and processing module of a system for generating a traffic report based on a large model provided by the present invention;
[0054] Figure 9 It is a schematic diagram of the startup interface of a system for generating a traffic report based on a large model provided by the present invention;
[0055] Figure 10 It is a schematic diagram of one page of a traffic report generated by using a system for generating a traffic report based on a large model provided by the present invention;
[0056] Figure 11It is a schematic diagram of another page of the traffic report generated by the traffic report generation system based on the large model provided by the present invention. Detailed implementation manners
[0057] The following details the implementation manners of the present invention. Examples of the implementation manners are shown in the drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The implementation manners described below by referring to the drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation to the present invention.
[0058] Those skilled in the art of the present technology can understand that unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the description of the present invention means the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or coupling. The phrase "and / or" used herein includes any and all combinations of one or more of the associated listed items.
[0059] Those skilled in the art of the present technology can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present invention belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless defined as such herein.
[0060] For the convenience of understanding the embodiments of the present invention, the following will further explain with several specific embodiments as examples in conjunction with the drawings, and each embodiment does not constitute a limitation to the embodiments of the present invention.
[0061] See Figure 1 , the present invention provides a method for generating a traffic report based on a large model, including the following steps:
[0062] Step S100: Identify the report type according to the user's prompt words, and select the report type that meets the user's requirements from the report type library. The process is as follows: First, perform semantic parsing on the user's prompt words, calculate the similarity using a text classification model from a predefined report type library, and select the type with the highest confidence; and extract the parameter information required for this report type, such as parameters like the time and space of the report, using multi-modal parameter fusion (semantic model + rule engine + knowledge graph) technology based on the user's query.
[0063] In the preferred embodiment provided by the present invention, step S100 includes:
[0064] Step S101: Encode the user's query based on pre-trained large language model technology, and output an intent label through a classification head. If it is a report generation intent, jump to the next report generation unit;
[0065] Step S102: Align the query with a predefined report type label library based on semantic similarity matching, and select the report type that meets the user's expectations;
[0066] Step S103: Use multi-modal parameter fusion (semantic model + rule engine + knowledge graph) to identify other dimension information such as time, entity, and numerical value from the user's query through named entity recognition (NER) technology based on the user's query; if the provided parameters are incomplete, start an interactive feedback with the user to let the user supplement the corresponding parameter information.
[0067] Step S200: Screen the report analysis theme content (sub-chapters). First, pre-disassemble the report provided by professionals into sub-chapters, convert the title and text into semantic vectors that can be quickly retrieved, and set the data source for it. Then, use a large model to perform vectorized retrieval of the analysis theme for the query and explicit and implicit contexts, and screen out relevant theme entries that meet the requirements from the library according to the cosine similarity of the vectors.
[0068] In the preferred embodiment provided by the present invention, step S200 includes:
[0069] Step S201: Pre-disassemble the report provided by professionals into sub-chapters, convert the title and text into semantic vectors that can be quickly retrieved, and set the data source, data analysis requirements, and presentation form items for it.
[0070] Step S202: Use a large model to perform vectorized retrieval of the analysis theme for the query and explicit and implicit contexts, and screen out relevant theme entries that meet the requirements from the library according to the cosine similarity of the vectors.
[0071] Step S300: Extracting report analysis topic data. First, determine whether the data setting requirement in the topic is in the NL2SQL mode or the API interface mode. When using NL2SQL, perform entity extraction of database tables through few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, and supplement the verification with a rule engine. Finally, hand it over to the SQL execution module for data query. In the case of the API form, directly match the parameters extracted in the previous step to supplement the request message and then call the interface for data query.
[0072] In the preferred embodiment provided by the present invention, step S300 includes:
[0073] Step S301: Iteratively screen the selected analysis topics;
[0074] Step S302: According to whether the data setting requirement in the topic is in the NL2SQL mode or the API interface mode, when using NL2SQL, perform entity extraction of database tables through few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, and supplement the verification with a rule engine. Finally, hand it over to the SQL execution module for data query. In the case of the API form, directly match the parameters extracted in the previous step to supplement the request message and then call the interface for data query;
[0075] Step S303: Enter the data extraction unit, execute the SQL generated in the previous step or call the corresponding API interface in the previous step to obtain the data required for the analysis topic.
[0076] Step S304: Data standardization processing, perform standardization processing on the topic data obtained in the previous step, such as precision, format, etc.
[0077] Step S400: Generate report analysis topic content. Based on the data extracted in the previous step and the context description required by the report topic content, then hand it over to the large language model to generate the report content of the corresponding sub-items. The content formats include: tables, charts, summary, comparative analysis, etc.
[0078] In the preferred embodiment provided by the present invention, step S400 includes:
[0079] Step S401: Obtain the format requirements for generating the report analysis topic content;
[0080] Step S402: Generate according to the format requirements by calling different content generation components, such as large model summary analysis, chart generation, table data generation, etc.
[0081] Step S500: Summarize the overall report content, integrate the analysis topic content generated in the previous step in the form of chapters to form the final complete report.
[0082] Among them, step S500 includes:
[0083] Step S501: Aggregate the content generated for each analysis topic as a whole to form the final complete traffic report content.
[0084] Step S502: Persistently save the complete report content to avoid unnecessary repeated generation of the report and improve the query efficiency of the report.
[0085] In a second aspect, the present invention provides a traffic report generation system based on a large model, including:
[0086] A data acquisition module 601, configured to:
[0087] Identify the report type according to the user's prompt words, select the report type that meets the user's requirements from the report type library, and extract the parameter information required for the report type according to the user's query and using the multi-modal parameter fusion technology;
[0088] Pre-disassemble the report provided by the professional into sub-chapters, convert the title and text into semantically vectorized forms that can be quickly retrieved, and set the data source for it; perform vectorized retrieval of the analysis topic through the large model for the query and explicit and implicit contexts, and screen out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors;
[0089] An analysis and processing module 602, configured to:
[0090] According to the data setting requirements in the topic, perform entity extraction of database tables through few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, supplement and verify it by a rule engine, and hand it over to the SQL execution module for data query; alternatively, directly match the parameters extracted in the previous step to supplement the request message and then call the interface for data query;
[0091] Based on the above-extracted data and the context description of the report topic content requirements, hand it over to the large language model to generate the report content for the corresponding sub-entries;
[0092] An output module 603, configured to: Integrate the above-generated analysis topic content in the form of chapters to form the final complete report; and output the complete report.
[0093] In a preferred embodiment provided by the present invention, the analysis and processing module 602 includes an iterative processing unit 801, a sorting and processing unit 802, an SQL execution unit 803, a topic data acquisition unit 804, and a data standardization processing unit 805;
[0094] The iterative processing unit 801 is used to iteratively screen the selected topic entries;
[0095] The sorting and processing unit 802 is used for: based on the data setting requirements in the topic entry, which is to convert natural language into SQL language or in the form of an application programming interface. If NL2SQL is adopted, entity extraction of database tables is performed through few-shot context learning of a large model, and then an end-to-end model is used to directly generate a syntax tree, which is supplemented and verified by a rule engine. Finally, it is handed over to the SQL execution unit 803 for data query. If the application programming interface method is adopted, the extracted topic entry is directly matched to supplement the request message, and then the interface is called for data query;
[0096] The theme data acquisition unit 804 is used for: obtaining the theme data required for analyzing the theme through the SQL data generated by executing sub-step S32, or by calling the API interface corresponding to the executed sub-step S32;
[0097] The data standardization processing unit 805 is used for: performing standardization processing on the theme data obtained by executing sub-step S33, including data precision processing and data format processing.
[0098] The present invention also provides an embodiment for exemplarily showing the preferred process and effect of implementing the method of the present invention.
[0099] In this embodiment, for user input and intention recognition, the user inputs a query: "Generate a traffic flow analysis report on the Beijing-Xiongan Expressway last month". The system decodes the query input by the user based on a pre-trained large language model, outputs the user intention classification label, determines it as "report generation", and jumps to the next step. The process is as Figure 2 shown. Figure 9 What is shown is the interface diagram of the system.
[0100] In this embodiment, for report type matching, the query input by the user is matched with a pre-defined report type label library to determine that the "monthly report" type is to be generated.
[0101] In this embodiment, for multi-modal parameter fusion and interaction supplementation, multi-modal parameter fusion is adopted according to the user's query, and "last month" and "Beijing-Xiongan Expressway" are extracted from the user's query through named entity recognition technology to clarify the theme as "operation situation report". At the same time, parameter verification is performed, and it is detected that the parameters are complete (time, location, and theme are covered), and no user supplementation is required. The process is as Figure 3 shown
[0102] In this embodiment, for topic vectorized retrieval and chapter decomposition, the system decomposes the historical monthly report into sub-chapters, such as "Road Basic Information", "Traffic Data", "Event Data", "Congestion Data", "Operation Summary", converts them into semantic vectors, and sets up data association rules. Combining the user query with implicit context, high-similar topic entries are filtered from the library through vectorized retrieval. The process is as Figure 4 shown.
[0103] In this embodiment, for data query and standardization processing, by inputting the natural language "Query the daily traffic data of the Hebei section of the Beijing-Xiongan Expressway in February 2025", the large model generates an SQL syntax tree through Few-shot learning. The large rule engine verifies the legality of the SQL, and after execution, the daily traffic data is returned. When using the API form, the parameters extracted in the previous step are directly matched to supplement the request message, and then the interface is called to return the event data. At the same time, the generated data is standardized.
[0104] In this embodiment, for the generation of report content, based on the obtained traffic data and event data, the large model is called to generate the corresponding text summary and draw the corresponding charts. The process is as Figure 5 shown.
[0105] In this embodiment, for report integration and persistence, a complete report is generated according to the pre-set chapter structure, as Figure 10 、 Figure 11 shown, and the generated report is stored in the library. At the same time, an index is established. If the user requests the same report again (such as "Monthly Report of the Beijing-Xiongan Expressway in February 2025"), the stored content is directly returned to avoid repeated generation.
[0106] In summary, the present invention relates to the field of intelligent report generation technology, and provides a method and system for generating traffic reports based on large models. The method includes: identifying the report type according to the user's prompt words and selecting the report that the user needs to generate; extracting the key parameters of the report, such as date, shift, shift type, etc., for subsequent data extraction; screening the analysis topics of the report content, and screening out the analysis topics of the sub-content of the report based on the user's intention; extracting the data for the analysis of the report theme content based on the report analysis theme and parameters; summarizing the data analysis based on the report analysis theme data and requirements; and finally, summarizing the report, merging the generated content of each report analysis theme to complete the generation of the entire report. The present invention accurately matches the report type through intelligent requirement identification technology, constructs a structured parameter extraction mechanism to ensure the orderliness of data processing; dynamically screens the analysis topics based on the user's intention, and combines large models to achieve in-depth mining of multi-dimensional data; the full-process automated generation mechanism significantly improves efficiency and reduces human errors, innovatively introduces large model technology to break through the application limitations of traditional tools, effectively solves the core pain points of traditional methods in demand adaptation, data quality, analysis depth, generation efficiency and technical adaptability, and can also optimize the system processing configuration and save system resources.
[0107] Those of ordinary skill in the art can understand that the drawings are only schematic diagrams of one embodiment, and the modules or processes in the drawings are not necessarily essential for implementing the present invention.
[0108] From the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0109] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiments, since they are basically similar to the method embodiments, they are described relatively simply. For the relevant parts, reference can be made to the description of the method embodiments. The device and system embodiments described above are only illustrative, where the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0110] As mentioned above, the above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A method for generating a traffic report based on a large model, characterized in that Including: S1 Identify the report type according to the user's prompt, select the report type that meets the user's requirements from the report type library, and extract the parameter information required for this report type according to the user's needs and using the multi-modal parameter fusion technology; S2 Pre-disassemble the obtained original report into sub-chapters, convert the title and text into semantic vectors that can be quickly retrieved, and set the data source for it; Perform vectorized retrieval of the analysis topic on the requirements and explicit and implicit contexts through a large model, and screen out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors; S3 According to the data setting requirements in the topic, perform entity extraction of the database table through the few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, and supplement and verify it with a rule engine, and then perform data query; Or, directly match the parameters extracted in the previous step to supplement the request message and then call the interface to perform data query; S4 Based on the context description of the data extracted in step S3 and the requirements of the report theme content, generate the report content of the corresponding sub-item by the large language model; S5 Integrate the analysis theme content generated in step S4 in the form of chapters to obtain the final complete report.
2. The method according to claim 1, wherein Step S1 includes: S11 Encode the user's requirements based on the pre-trained large language model technology, output the intent label through the classification head, and if it is a report generation intent, jump to the next report generation unit; S12 Align the requirements with the predefined report type label library based on semantic similarity matching, and select the report type that meets the user's expectations; S13 Identify other dimensional information such as time, entity, and numerical value from the user's requirements by using multi-modal parameter fusion and through named entity recognition technology according to the user's needs; If the provided parameters are incomplete, start an interactive feedback with the user to prompt the user to supplement the corresponding parameter information.
3. The method according to claim 2, wherein Step S2 includes: S21 Pre-disassemble the report into sub-chapters, convert the title and text into semantic vectors that can be quickly retrieved, and set the data source, data analysis requirements, and presentation form items for it; S22 Perform vectorized retrieval of the analysis topic on the requirements and explicit and implicit contexts through a large model, and screen out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors.
4. The method according to claim 3, wherein Step S3 includes: S31 Iteratively screen the selected topic entries; S32 Based on whether the data setting requirements in the topic entry are to convert natural language to SQL language or in the form of an application programming interface, if NL2SQL is used, perform entity extraction of the database table through the few-shot context learning of the large model, then directly generate a syntax tree using an end-to-end model, and supplement and verify it with a rule engine, and finally hand it over to the SQL execution unit for data query. If the application programming interface method is used, directly match the topic entries extracted in sub-step S31 to supplement the request message and then call the interface to perform data query; S33 obtains the topic data required for the analysis topic through the SQL data generated by executing sub-step S32, or by calling the API interface corresponding to the executed sub-step S32. S34 performs normalization processing on the topic data obtained by executing sub-step S33, including data precision processing and data format processing.
5. The method according to claim 4, characterized in that, Step S4 includes: S41 obtains the format requirements for generating the analysis topic content. S42 calls different content generation components according to the format requirements for generation, including large model summary analysis, chart generation, and table data generation.
6. The method according to claim 5, wherein Step S5 includes: S51 overall summarizes the content generated for each analysis topic to form the final complete traffic report content. S52 persistently saves the complete report content to avoid unnecessary repeated generation of the report and improve the query efficiency of the report.
7. A traffic report generation system based on a large model, characterized in that, including: A data acquisition module for: Identifying the report type according to the user prompt, selecting the report type that meets the user requirements from the report type library, and extracting the parameter information required for the report type according to the user's needs and using the multi-modal parameter fusion technology. Pre-disassembling the obtained original report into sub-chapters, converting the title and text into semantic vectors that can be quickly retrieved, and setting the data source for it; performing vectorized retrieval on the analysis topic through the large model for the requirements and explicit and implicit contexts, and screening out relevant topic entries that meet the requirements from the library according to the cosine similarity of the vectors. An analysis and processing module for: According to the data setting requirements in the topic, performing entity extraction of database tables through the few-shot context learning of the large model, then directly generating a syntax tree using an end-to-end model, and supplementing and verifying by a rule engine, and handing it over to the SQL execution module for data query; or, directly matching the parameters extracted in the previous step to supplement the request message and then calling the interface for data query. Based on the above-extracted data and the context description of the report topic content requirements, then handing it over to the large language model to generate the report content of the corresponding sub-items. An output module for: integrating the above-generated analysis topic content in the form of chapters to form the final complete report; And outputting the complete report.
8. The system according to claim 7, wherein The analysis and processing module includes an iterative processing unit, a sorting processing unit, an SQL execution unit, a topic data acquisition unit, and a data normalization processing unit; The iterative processing unit is used to iteratively screen out the topic entries. The sorting processing unit is used for: based on whether the data setting requirements in the topic entries are natural language conversion to SQL language or application development interface method, if NL2SQL is adopted, performing entity extraction of database tables through the few-shot context learning of the large model, then directly generating a syntax tree using an end-to-end model, and supplementing and verifying by a rule engine, and finally handing it over to the SQL execution unit for data query, if the application development interface method is adopted, directly matching the extracted topic entries to supplement the request message and then calling the interface for data query; The subject data acquisition unit is used to: obtain the subject data required for analyzing the subject through the SQL data generated by executing sub-step S32, or by calling the API interface corresponding to the execution of sub-step S32; The data standardization processing unit is used to: perform standardization processing on the subject data obtained by executing sub-step S33, including data precision processing and data format processing.
Citation Information
Patent Citations
Method and system for converting complex problem into SQL (Structured Query Language) statement based on large model
CN118796880A
An on-device AI NAS system equipped with a multimodal LLM, and a method for providing search and dialogue functions in the system
KR102763677B1