Traffic influence evaluation report automatic generation system and method based on local large language model
By using a local large language model for end-to-end processing, the problems of low efficiency and data security in traffic impact assessment are solved, and the generation of traffic impact assessment reports is automated and standardized, with the generated reports meeting industry standards and the latest policy requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-03
AI Technical Summary
Current traffic impact assessments rely on manual completion, resulting in low efficiency and inconsistent standards in the assessment and report preparation process. Furthermore, cloud-based large language models lack traffic engineering expertise, raising concerns about data privacy and security.
By employing a local large language model, and through report data collection, data annotation, model training, knowledge base construction, vectorized database, and data calculation modules, the entire process of traffic impact assessment reports is localized. Combined with low-rank adaptation and retrieval enhancement technologies, reports that meet the standards are generated.
It significantly reduces manual compilation time, improves the consistency of report format and content, avoids the risk of data leakage, ensures system stability and controllability, and generates accurate and professional traffic impact assessment reports.
Smart Images

Figure CN121786196A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent transportation and artificial intelligence technology, and in particular to an automatic traffic impact assessment report generation system and method based on a local large language model. Background Technology
[0002] To scientifically assess the impact of new, renovated, or expanded projects on the surrounding road traffic system, traffic impact assessment (HIA) has become a crucial component of urban planning and traffic management. HIA primarily predicts and analyzes changes in the capacity, operational status, and traffic safety levels of the surrounding road network before and after project implementation, providing a basis for planning decisions by relevant departments. Manual analysis and report writing not only require professionals with strong traffic engineering knowledge and experience but also demand a significant investment of time in data collection, model calculations, and report writing. Given the current reality of massive traffic system data, diverse analytical dimensions, and complex scenarios, traditional manual methods often suffer from drawbacks such as cumbersome and lengthy evaluation processes, low efficiency, susceptibility to subjective human factors, lack of standardized criteria, separation of data processing and report writing leading to low information utilization, and difficulty in meeting the needs of parallel evaluation and dynamic updates for multiple projects.
[0003] Therefore, utilizing advanced technologies, such as artificial intelligence, especially the introduction of Large Language Models (LLMs) into the traffic impact assessment process to automate and intelligently generate traffic impact assessments, not only improves the efficiency and standardization of traffic impact assessment work but also represents an important trend in the informatization of traffic engineering. Large language models possess powerful natural language understanding and generation capabilities, enabling them to learn semantic relationships and logical structures from massive amounts of text data, thus automating the writing of report-type texts. However, existing general-purpose large language models are typically deployed on cloud servers, exhibiting issues such as knowledge generalization, lack of expertise in the field of traffic engineering, and data privacy and security concerns, making them difficult to directly apply to traffic impact assessment scenarios. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, the purpose of this invention is to provide an automatic traffic impact assessment report generation system and method based on a local large language model. This invention solves the problem that traffic impact assessment still mainly relies on manual completion in existing technologies, resulting in low efficiency and inconsistent standards in the assessment and report preparation process.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] An automatic traffic impact assessment report generation system based on a local large language model includes:
[0007] The report data acquisition module is used to collect high-quality report data in the field of transportation planning and design.
[0008] The data annotation module is used to annotate the high-quality report data using a command-input-output triplet method to obtain an annotated dataset;
[0009] The model training module is used to fine-tune the pre-trained language model using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters.
[0010] The knowledge base construction module is used to collect and organize policies, regulations, technical standards, and professional knowledge summarized by humans related to traffic impact assessment, in order to establish classification indexes and semantic associations to obtain a traffic impact assessment knowledge base;
[0011] The vectorized database module is used to perform vectorized encoding processing on the text in the traffic impact assessment knowledge base to obtain a vectorized knowledge database.
[0012] The data retrieval module is used to call the vectorized knowledge database to perform semantic relevance retrieval and obtain a set of enhanced retrieval knowledge results.
[0013] The data calculation module is used to perform traffic impact assessment related calculations based on the retrieved enhanced knowledge result set and external input data to obtain a traffic calculation result dataset.
[0014] The local large model module is used to perform reasoning and text generation on the input information based on the finely tuned large language model parameters, the retrieval enhanced knowledge result set, and the traffic calculation result dataset, so as to obtain the traffic impact assessment report generation result;
[0015] The local hardware module is used to deploy and run the acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data calculation module, and local large model module in a dual RTX 3090 GPU server to complete the entire process of data input and report output.
[0016] Preferably, the data annotation module includes:
[0017] The instruction generation submodule is used to obtain the task instruction set based on the requirements for compiling the traffic impact assessment report and the model training requirements;
[0018] The input construction submodule is used to extract raw information related to traffic impact assessment from the high-quality report data and to format the raw information to obtain the input dataset.
[0019] The output organization submodule is used to select the main text of the manually compiled traffic impact assessment report as the output sample content, and organize it according to the chapter structure of the traffic impact assessment report specification to obtain the output sample text set.
[0020] The table structuring submodule is used to convert the table data in the output sample text set into a structured text form in Markdown format to obtain a structured table corpus.
[0021] The semantic weight modeling submodule is used to perform weight modeling on the semantic relevance of different fields in the table based on the structured table corpus, and obtain column field semantic weight data.
[0022] The annotation combination submodule is used to integrate the task instruction set, input dataset, output sample text set, and column field semantic weight data according to the instruction-input-output triplet structure to obtain the labeled dataset.
[0023] Preferably, the original information includes:
[0024] Project name, project location, land use, construction scale, current road traffic flow, intersection service level, and entrance / exit parameters.
[0025] Preferably, the expression for calculating the semantic weight data of the column fields is:
[0026] ;
[0027] in, For the first Semantic scores for each field, This indicates the weight of the field within the overall table structure. This represents the total number of fields.
[0028] Preferably, the model training module includes:
[0029] The layer selection submodule is used to determine the network layers that need to be trained with low-rank adaptation, and to obtain the set of selected adaptation layers.
[0030] The parameter initialization submodule is used to initialize the low-rank matrix parameters in the selected adaptation layer set to obtain the initial parameter set of the low-rank matrix.
[0031] The weight freeze submodule is used to freeze all weight parameters of the original pre-trained model during training to obtain the frozen model structure;
[0032] The weight update calculation submodule is used to perform backpropagation and weight update on the parameters of the low-rank matrix using an optimizer to obtain incrementally updated weights.
[0033] The parameter overlay submodule is used to overlay the incrementally updated weights with the frozen original weights to obtain the parameters of the large language model trained by low-rank adaptation.
[0034] Preferably, the network layer comprises:
[0035] The attention mechanism includes the Query, Key, Value layers and the feedforward network layer.
[0036] Preferably, the calculation expression for the weight update is:
[0037] ;
[0038] in, These are the original pre-trained weights. It is a scaling factor. For rank, This is the weight increment matrix.
[0039] A method for automatically generating traffic impact assessment reports based on a local large language model, comprising:
[0040] Collect high-quality report data in the field of transportation planning and design;
[0041] The high-quality report data is annotated using a command-input-output triplet method to obtain an annotated dataset;
[0042] The pre-trained language model is fine-tuned using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters;
[0043] Collect and organize policies, regulations, technical standards, and professional knowledge summarized by humans related to traffic impact assessment, in order to establish a classification index and semantic association, and obtain a traffic impact assessment knowledge base;
[0044] The text in the traffic impact assessment knowledge base is vectorized and encoded to obtain a vectorized knowledge database;
[0045] The vectorized knowledge database is invoked to perform semantic relevance retrieval, resulting in a set of enhanced retrieval knowledge results.
[0046] Based on the retrieved enhanced knowledge result set and external input data, traffic impact assessment related calculations are performed to obtain a traffic calculation result dataset.
[0047] Based on the finely tuned large language model parameters, the retrieval enhanced knowledge result set, and the traffic calculation result dataset, the input information is inferred and text is generated to obtain the traffic impact assessment report generation result.
[0048] The acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data computation module, and local large model module are deployed and run on a dual RTX 3090 GPU server to complete the entire process of data input and report output.
[0049] The present invention discloses the following technical effects:
[0050] This invention provides an automatic traffic impact assessment report generation system and method based on a local large language model. The system includes: a report data acquisition module for collecting high-quality report data in the field of traffic planning and design; a data annotation module for annotating the high-quality report data using a command-input-output triplet method to obtain an annotated dataset; a model training module for fine-tuning a pre-trained language model using the annotated dataset and a low-rank adaptation method to obtain fine-tuned large language model parameters; a knowledge base construction module for collecting and organizing policies, regulations, technical standards, and manually summarized professional knowledge related to traffic impact assessment to establish a classification index and semantic association to obtain a traffic impact assessment knowledge base; and a vectorized database module for... The text in the traffic impact assessment knowledge base is vectorized to obtain a vectorized knowledge database. A data retrieval module calls the vectorized knowledge database to perform semantic relevance retrieval, obtaining a retrieval-enhanced knowledge result set. A data calculation module performs traffic impact assessment-related calculations based on the retrieval-enhanced knowledge result set and external input data, obtaining a traffic calculation result dataset. A local large model module, based on the finely tuned large language model parameters, the retrieval-enhanced knowledge result set, and the traffic calculation result dataset, guides and constrains the model generation behavior based on prompt words to optimize the expression of input information, performs reasoning and text generation on the input information, and obtains the traffic impact assessment report generation result. A local hardware module deploys and runs the acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data calculation module, and local large model module on a dual RTX 3090 GPU server to complete the entire process from data input to report output. This invention fine-tunes a locally deployed large language model using a low-rank adaptation method, enabling the model to automatically generate report text that meets traffic impact assessment standards based on input project information. This significantly reduces manual compilation time and improves the consistency and standardization of report format and content. The invention deploys both the large language model and its knowledge base on a local GPU server, achieving end-to-end localized data processing. Compared to traditional cloud-based large models, this method effectively avoids the risk of leakage of sensitive data such as project basic information, traffic data, and geographic information during upload and transmission. Furthermore, local deployment allows the system to run independently even offline, offering higher stability and controllability. By introducing retrieval-enhanced generation technology, this invention can construct a local knowledge base containing traffic impact assessment standards and local policies, updating it in real time and deeply integrating it with the large language model. When the model generates report content, it can dynamically retrieve relevant regulations and standards, thereby generating more accurate, professional, and up-to-date traffic impact assessment reports based on authoritative information.This technology effectively avoids the "illusion" problem of general large models, making the generated report not only fluent in language but also in line with industry standards and professional requirements. This invention integrates local data calculation scripts, which transmit project data read from the large model to the calculation scripts through API interfaces to calculate key indicators such as road capacity, intersection service level, and peak traffic flow. These calculation results are then input into the large language model to generate a traffic impact assessment report with high accuracy and consistency, significantly improving the scientific nature and objectivity of traffic impact assessment. Attached Figure Description
[0051] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a schematic diagram of the structure of an automatic traffic impact assessment report generation system based on a local large language model, provided in an embodiment of the present invention.
[0053] Figure 2 This is a schematic diagram of the technical process of the automatic traffic impact assessment report generation system and method based on local large language model and retrieval enhancement generation technology in the embodiment.
[0054] Figure 3 This is a schematic diagram of the retrieval enhancement generation technology in the automatic traffic impact assessment report generation system and method based on local large language model and retrieval enhancement generation technology in the embodiment.
[0055] Figure 4 This is a schematic diagram of the model fine-tuning based on the low-rank adaptation method in the automatic traffic impact assessment report generation system and method based on local large language model and retrieval enhancement generation technology in the embodiment.
[0056] Figure 5 This is a schematic diagram illustrating the process of a traffic impact assessment report automatic generation system and method based on a local large language model and retrieval enhancement generation technology in the embodiment, where the large model calls the local data calculation script.
[0057] Figure label:
[0058] 1-Report data acquisition module, 2-Data annotation module, 3-Model training module, 4-Knowledge base construction module, 5-Vectorized database module, 6-Data retrieval module, 7-Data calculation module, 8-Local large model module, 9-Local hardware module. Detailed Implementation
[0059] 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.
[0060] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0061] like Figure 1 As shown, this invention provides an automatic traffic impact assessment report generation system based on a local large language model, comprising:
[0062] Report data acquisition module 1 is used to collect high-quality report data in the field of transportation planning and design;
[0063] Data annotation module 2 is used to annotate the high-quality report data using a command-input-output triplet method to obtain an annotated dataset;
[0064] Model training module 3 is used to fine-tune the pre-trained language model using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters.
[0065] Module 4, the knowledge base construction module, is used to collect and organize policies, regulations, technical standards and professional knowledge summarized by humans related to traffic impact assessment, in order to establish a classification index and semantic association to obtain a traffic impact assessment knowledge base.
[0066] Vectorized database module 5 is used to perform vectorized encoding processing on the text in the traffic impact assessment knowledge base to obtain a vectorized knowledge database;
[0067] Data retrieval module 6 is used to call the vectorized knowledge database to perform semantic relevance retrieval and obtain a set of enhanced retrieval knowledge results;
[0068] Data calculation module 7 is used to perform traffic impact assessment related calculations based on the retrieved enhanced knowledge result set and external input data to obtain a traffic calculation result dataset;
[0069] The local large model module 8 is used to guide and constrain the model's generation process based on the fine-tuned large language model parameters, the retrieval enhancement knowledge result set, and the traffic calculation result dataset, and based on prompt word engineering, to optimize the expression form and semantic control of the input information, perform reasoning and text generation on the input information, and obtain the traffic impact assessment report generation result; this module also includes a prompt engineering sub-function, which is used to design, optimize, and adjust prompt words according to the traffic impact assessment report preparation specifications and generation requirements, such as "You are a traffic planning expert, please evaluate the project based on the following content and generate a traffic impact assessment report", to guide the large language model to generate text content that meets the format, logic, and professional requirements;
[0070] Local hardware module 9 is used to deploy and run the acquisition module, data annotation module 2, model training module 3, knowledge base construction module 4, vectorized database module 5, data retrieval module 6, data calculation module 7 and local large model module 8 in a dual RTX 3090 GPU server to complete the entire process of data input and report output.
[0071] Specifically, the report data acquisition module 1 is responsible for collecting high-quality report data in the field of traffic planning and design; the data annotation module 2 is responsible for standardizing the annotation of the collected raw report data by dividing it into chapters and processing it into table structures; the model training module 3 performs instruction fine-tuning and low-rank adaptation training on the local large language model based on the annotated data to improve the model's professional generation capability in traffic impact assessment tasks; the knowledge base construction module 4 is responsible for establishing a local knowledge base by continuously updating traffic evaluation standards, local policies, and industry norms to enhance the real-time and authoritative nature of the generated content; the vectorized database module 5 is responsible for converting the knowledge base content into high-dimensional vectors and performing retrieval through cosine similarity to achieve enhanced retrieval generation; the data calculation module 7 is responsible for designing a calculation script for indicators such as road capacity, intersection service level, and peak traffic flow based on the traffic analysis and evaluation guidelines, and interacting with the large language model through the API interface; the local large model module 8, as the core of the system, is responsible for loading and running the local DeepSeek-R1-Distill-Qwen-8B model to achieve automatic report generation; and the local hardware module 9 provides computing power support, using dual RTX 3090s. GPU servers ensure inference performance and data security. Through the collaborative work of various modules, the entire process of generating traffic impact assessment reports is automated, standardized, and intelligent.
[0072] Furthermore, the data annotation module 2 includes:
[0073] The instruction generation submodule is used to obtain the task instruction set based on the requirements for compiling the traffic impact assessment report and the model training requirements;
[0074] The input construction submodule is used to extract raw information related to traffic impact assessment from the high-quality report data and to format the raw information to obtain the input dataset.
[0075] The output organization submodule is used to select the main text of the manually compiled traffic impact assessment report as the output sample content, and organize it according to the chapter structure of the traffic impact assessment report specification to obtain the output sample text set.
[0076] The table structuring submodule is used to convert the table data in the output sample text set into a structured text form in Markdown format to obtain a structured table corpus.
[0077] The semantic weight modeling submodule is used to perform weight modeling on the semantic relevance of different fields in the table based on the structured table corpus, and obtain column field semantic weight data.
[0078] The annotation combination submodule is used to integrate the task instruction set, input dataset, output sample text set, and column field semantic weight data according to the instruction-input-output triplet structure to obtain the labeled dataset.
[0079] Specifically, the data collected by the report data acquisition module 1 comes from high-quality traffic impact assessment reports manually compiled by review experts. These reports cover various scenarios including residential, commercial, and industrial parks, demonstrating strong representativeness and professional standardization. More than 20 typical reports were collected, totaling over 600,000 words. The data annotation module 2 employs a "command-input-output" triplet annotation method. The "command" clarifies the goal and intent of the model generation task. The "input" consists of original project information and traffic survey data related to the generation task, including key parameters such as project name, project location, land use, construction scale, current road traffic flow, intersection service level, and entrance / exit settings. The "output" mainly consists of the main text of the manually compiled traffic impact assessment report, organized according to a standardized chapter structure. Tables in the manual reports are converted to Markdown structured format before data format annotation. For the semantic relevance of each field in the table data, a model is built based on the feature weights of different columns, calculated using the following formula:
[0080] ;
[0081] in, For the first Semantic scores for each field, This indicates the weight of the field within the overall table structure. This represents the total number of fields. After processing, the model can accurately understand the hierarchical relationships, field meanings, and data correspondences within the table during training, thereby improving its ability to parse and generate complex table content. The model training module 3 and the retrieval enhancement generation technology are the core components of the system's intelligence, responsible for the instruction-based training of the large model and the implementation of high-dimensional vector storage and retrieval of text and knowledge content, providing semantic support for subsequent report generation.
[0082] The data annotation module 2 is further divided into two parts: text segmentation and table structuring. Specifically, the text content of the traffic impact assessment report is first segmented according to chapters, dividing the report content into multiple data items such as "Project Overview", "Current Situation Analysis", and "Traffic Demand Analysis and Forecast" to ensure that the corpus content of the annotated data has a clear structure and maximize the efficiency of model training.
[0083] Furthermore, the model training module 3 includes:
[0084] The layer selection submodule is used to determine the network layers that need to be trained with low-rank adaptation, and to obtain the set of selected adaptation layers.
[0085] The parameter initialization submodule is used to initialize the low-rank matrix parameters in the selected adaptation layer set to obtain the initial parameter set of the low-rank matrix.
[0086] The weight freeze submodule is used to freeze all weight parameters of the original pre-trained model during training to obtain the frozen model structure;
[0087] The weight update calculation submodule is used to perform backpropagation and weight update on the parameters of the low-rank matrix using an optimizer to obtain incrementally updated weights.
[0088] The parameter overlay submodule is used to overlay the incrementally updated weights with the frozen original weights to obtain the parameters of the large language model trained by low-rank adaptation.
[0089] Specifically, the model training module 3 trains the local large language model using instruction-based training, enabling it to generate a complete traffic impact assessment report. The details are as follows:
[0090] Model training module 3 employs the Low-Rank Adaptive Training (Lora) method to fine-tune the large model. It freezes the original model parameters and incrementally updates the model weights by inserting trainable low-rank matrices into the attention layers (Query, Key, Value) and some feedforward network layers. During training, the network layers to be used for Lora adaptation training are first determined, and the low-rank matrix parameters are initialized using a random matrix A and a zero matrix B to ensure initial model output stability. Subsequently, the original weights are frozen, and only the low-rank matrix parameters are updated. Backpropagation and weight updates are performed through the optimizer. The weight update formula used in Lora adaptation training is:
[0091] ;
[0092] in, These are the original pre-trained weights. It is a scaling factor. For rank, The weight increment matrix is derived from the formula:
[0093] ;
[0094] The calculations yielded the results. By iteratively updating the trained weights and superimposing them onto the original frozen weights, the large model gradually learns the professional knowledge and report generation logic of the traffic impact assessment field while maintaining its ability to understand general language, thereby achieving efficient transfer and refined adaptation to specific tasks.
[0095] Furthermore, the aforementioned retrieval enhancement generation technology enables the large model to retrieve relevant laws, policies, and technical standards from the local knowledge base in real time during the report generation process, thereby improving the accuracy, professionalism, and timeliness of the traffic impact assessment report. Specific details are as follows:
[0096] 1) Module 4, the knowledge base construction module, is used to establish and update the local traffic impact assessment knowledge base. This includes local traffic planning policies, road design specifications, and other materials. Through a combination of structured and unstructured data, a searchable and scalable local knowledge system is formed. The knowledge base content can also be updated regularly, promptly updating local regulations, policies, and road design standards based on the project location, ensuring the applicability and timeliness of traffic impact assessments generated by the system for different regions.
[0097] 2) The vectorized database module 5 uses embedding technology based on a large language model to vectorize content from the local knowledge base for subsequent retrieval and generation. Embedding technology is a process of converting text, images, and other data into computable vector sets, enabling the large model to understand different semantics. The retrieval and generation module, when the model needs to generate a report, searches the local vector database for relevant knowledge, matches the retrieval results based on cosine similarity, and dynamically supplements the information with the latest regulations, technical standards, and report frameworks, combined with the model's fine-tuned capabilities. The formula for cosine similarity is:
[0098] ;
[0099] Where q is the query vector and d is the text vector in the local database.
[0100] The data calculation module 7 can design a local calculation script based on the calculation formula of relevant traffic analysis standards, so as to automatically complete the calculation of key indicators such as road capacity and service level. At the same time, the local large language model can call the calculation script through the API interface, extract data and input it into the calculation script during the report generation process to obtain accurate results, thereby improving the accuracy, professionalism and scientific nature of the traffic impact assessment report.
[0101] Furthermore, the model training is implemented based on the open-source LLaMA-Factory framework, with the following configuration: the optimizer uses AdamW, and the initial learning rate is 2×10⁻⁶. -5 The batch size is 2, the number of training epochs is 100, and the weight decay coefficient is 0.01. During the model fine-tuning phase, the cross-entropy loss function is used, which is defined as:
[0102] ;
[0103] in The training dataset is for real traffic impact assessment reports. Traffic impact assessment report generated for large models.
[0104] The knowledge base construction module 4 is continuously updated manually, with targeted additions of local policies for the evaluated projects. This ensures that the model can reference the latest industry standards and the most appropriate policy requirements when generating reports, thereby guaranteeing the real-time nature and professionalism of the generated results. The local knowledge base includes the latest construction specifications such as the "Technical Indicators for Traffic Impact Assessment of Construction Projects," local policies, and surrounding information for specific projects in various regions.
[0105] The knowledge base construction module 4 collects, organizes, and updates policy documents, technical standards, and local regulations related to traffic impact assessment through manual screening and classification, forming a structured and localized knowledge base. This ensures the authority and timeliness of the knowledge content and continuously supplements local policies and assessment requirements for traffic assessment projects in different regions, providing reliable data support and knowledge sources for the subsequent retrieval and enhancement generation process.
[0106] The data calculation module 7 automatically calculates road capacity and service level locally using Python scripts, covering types such as highways (main roads), expressways (main roads), and urbanized area roads (auxiliary roads). The formulas included are for calculating the design capacity of motor vehicle lanes and the design capacity of highway main road sections. The formula for calculating the design capacity of motor vehicle lanes is as follows:
[0107] ;
[0108] Where: Nm is the design capacity of a single motor vehicle lane (pcu / h); fc is the road classification coefficient for motor vehicle lane capacity; fn is the correction coefficient for the number of motor vehicle lanes; fw is the correction coefficient for the width of motor vehicle lanes; f p This is the driver correction factor; Np is the potential capacity of a road segment with one motor vehicle lane (pcu / h).
[0109] The formula for calculating the design traffic capacity of the main road section is:
[0110] ;
[0111] In the formula: The design capacity of one lane on the main line of the expressway (veh / h·m); The maximum service traffic volume {pcu / (h)} under the design service level for a single lane of the main line section of the expressway In)};f f f is the roadside interference correction factor; p For driver correction factors; The vehicle structure correction coefficient is connected to the local large language model via an API interface, enabling the model to automatically call the calculation script when generating traffic impact assessment reports, and obtain data results such as traffic capacity and traffic flow in real time, thereby ensuring the accuracy and professionalism of the report content.
[0112] The local hardware module 9 is fundamental to this invention, providing the necessary computing resources and storage capacity for the deployment, inference, and training of the local large language model. This module utilizes a local GPU server equipped with two NVIDIA RTX 3090 GPUs, one Intel Core i9-10980XE processor, and eight 32GB DDR4 memory modules, sufficient to meet the computational demands of model loading, batch inference, and long context generation. In terms of software, the server system runs on Ubuntu 22.04 LTS, and includes the CUDA 12.8 runtime library and the PyTorch 2.7.1 deep learning framework to ensure real-time performance during inference.
[0113] Specifically, the local large model module 8 is the foundation of the entire system implementation. This study selects the open-source DeepSeek-R1-Distill-Qwen-8B as the base model and uses the Hugging Face Transformers library to load the model on the local server, realizing local model invocation and inference, ensuring the security and privacy of input data, and providing a foundation for subsequent fine-tuning and data retrieval module 6.
[0114] This embodiment also provides a method for automatically generating traffic impact assessment reports based on a local large language model, including:
[0115] Collect high-quality report data in the field of transportation planning and design;
[0116] The high-quality report data is annotated using a command-input-output triplet method to obtain an annotated dataset;
[0117] The pre-trained language model is fine-tuned using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters;
[0118] Collect and organize policies, regulations, technical standards, and professional knowledge summarized by humans related to traffic impact assessment, in order to establish a classification index and semantic association, and obtain a traffic impact assessment knowledge base;
[0119] The text in the traffic impact assessment knowledge base is vectorized and encoded to obtain a vectorized knowledge database;
[0120] The vectorized knowledge database is invoked to perform semantic relevance retrieval, resulting in a set of enhanced retrieval knowledge results.
[0121] Based on the retrieved enhanced knowledge result set and external input data, traffic impact assessment related calculations are performed to obtain a traffic calculation result dataset.
[0122] Based on the finely tuned large language model parameters, the retrieval enhanced knowledge result set, and the traffic calculation result dataset, the input information is inferred and text is generated to obtain the traffic impact assessment report generation result.
[0123] The acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data computation module, and local large model module are deployed and run on a dual RTX 3090 GPU server to complete the entire process of data input and report output.
[0124] Furthermore, such as Figure 2-5 As shown, Figure 2 This is a schematic diagram of the technical process of the automatic traffic impact assessment report generation system and method based on a local large language model and retrieval enhancement generation technology, as illustrated in this embodiment. The process begins with the user inputting relevant instructions and basic data into a large language model deployed on local hardware resources and trained on a specific traffic assessment corpus. Upon receiving the input, the model initiates the automatic report generation process. During generation, the local large language model indexes a local knowledge base to retrieve relevant standards, policies, and other content. The text in the knowledge base undergoes vectorization and semantic association modeling, allowing the model to construct content and generate reference context based on the retrieved knowledge, thereby improving the accuracy and professionalism of the generated report. Simultaneously, the system calls a preset data calculation script to perform calculations based on the input data, automatically embedding the output into the corresponding tables in the report.
[0125] Figure 3 This diagram illustrates the retrieval enhancement generation technology used in the automatic traffic impact assessment report generation system and method based on a local large language model and retrieval enhancement generation technology, as described in this embodiment. The technology first allows the user to query a vectorized knowledge base using a question or command through an interactive interface, finding content with high semantic similarity. The vectorized knowledge base primarily originates from a local database, covering data such as local policies, technical standards, surrounding environment, and development plans for the project to be evaluated. This data undergoes semantic retrieval through segmentation, vector encoding, and indexing. Subsequently, the local large language model retrieves relevant contextual information based on the index results following the user's query. Finally, the retrieved database information and the user's input are combined and input into the local large language model to generate the report.
[0126] Figure 4 This diagram illustrates the low-rank adaptation method-based model fine-tuning in the automatic traffic impact assessment report generation system and method based on a local large language model and retrieval enhancement generation technology, as shown in the embodiment. This method first loads training data for model fine-tuning and then... Based on this, a low-rank structure is introduced for parameter adjustment. In the local large-scale model, random matrices A are initialized respectively.(M×r) and low-rank adapter B (r×N) The low-rank matrix is calculated by multiplying the two, and is used to represent the weight increment in a specific task. A scaling factor α is introduced during the calculation to control the update magnitude and ensure the stability of model fine-tuning. Subsequently, the system updates and merges the calculated low-rank matrix with the original pre-trained weights, enabling the model to gradually learn the relevant knowledge of traffic impact assessment and report generation logic.
[0127] Figure 5 This diagram illustrates how the large model calls local data calculation scripts in the traffic impact assessment report automatic generation system and method based on a local large language model and retrieval enhancement generation technology, as described in this embodiment. The process begins by inputting the input data into the trained large model, which then automatically generates a structured table framework based on the input. Subsequently, the large model uses an API interface to call local capacity and service level calculation scripts to calculate the original data. After the calculations are complete, the system automatically fills the generated structured table framework with the obtained key indicators such as road capacity and service level, achieving dynamic updates and improvements to the table content.
[0128] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0129] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A system for automatically generating traffic impact assessment reports based on a local large language model, characterized in that, include: The report data acquisition module is used to collect high-quality report data in the field of transportation planning and design. The data annotation module is used to annotate the high-quality report data using a command-input-output triplet method to obtain an annotated dataset; The model training module is used to fine-tune the pre-trained language model using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters. The knowledge base construction module is used to collect and organize policies, regulations, technical standards, and professional knowledge summarized by humans related to traffic impact assessment, in order to establish classification indexes and semantic associations to obtain a traffic impact assessment knowledge base; The vectorized database module is used to perform vectorized encoding processing on the text in the traffic impact assessment knowledge base to obtain a vectorized knowledge database. The data retrieval module is used to call the vectorized knowledge database to perform semantic relevance retrieval and obtain a set of enhanced retrieval knowledge results. The data calculation module is used to perform traffic impact assessment related calculations based on the retrieved enhanced knowledge result set and external input data to obtain a traffic calculation result dataset. The local large model module is used to perform reasoning and text generation on the input information based on the finely tuned large language model parameters, the retrieval enhanced knowledge result set, and the traffic calculation result dataset, so as to obtain the traffic impact assessment report generation result; The local hardware module is used to deploy and run the acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data calculation module, and local large model module in a dual RTX 3090 GPU server to complete the entire process of data input and report output.
2. The automatic traffic impact assessment report generation system based on a local large language model according to claim 1, characterized in that, The data annotation module includes: The instruction generation submodule is used to obtain the task instruction set based on the requirements for compiling the traffic impact assessment report and the model training requirements; The input construction submodule is used to extract raw information related to traffic impact assessment from the high-quality report data and to format the raw information to obtain the input dataset. The output organization submodule is used to select the main text of the manually compiled traffic impact assessment report as the output sample content, and organize it according to the chapter structure of the traffic impact assessment report specification to obtain the output sample text set. The table structuring submodule is used to convert the table data in the output sample text set into a structured text form in Markdown format to obtain a structured table corpus. The semantic weight modeling submodule is used to perform weight modeling on the semantic relevance of different fields in the table based on the structured table corpus, and obtain column field semantic weight data. The annotation combination submodule is used to integrate the task instruction set, input dataset, output sample text set, and column field semantic weight data according to the instruction-input-output triplet structure to obtain the labeled dataset.
3. The automatic traffic impact assessment report generation system based on a local large language model according to claim 2, characterized in that, The original information includes: Project name, project location, land use, construction scale, current road traffic flow, intersection service level, and entrance / exit parameters.
4. The automatic traffic impact assessment report generation system based on a local large language model according to claim 2, characterized in that, The expression for calculating the semantic weight data of the column fields is: ; in, For the first Semantic scores for each field, This indicates the weight of the field within the overall table structure. This represents the total number of fields.
5. The automatic traffic impact assessment report generation system based on a local large language model according to claim 2, characterized in that, The model training module includes: The layer selection submodule is used to determine the network layers that need to be trained with low-rank adaptation, and to obtain the set of selected adaptation layers. The parameter initialization submodule is used to initialize the low-rank matrix parameters in the selected adaptation layer set to obtain the initial parameter set of the low-rank matrix. The weight freeze submodule is used to freeze all weight parameters of the original pre-trained model during training to obtain the frozen model structure; The weight update calculation submodule is used to perform backpropagation and weight update on the parameters of the low-rank matrix using an optimizer to obtain incrementally updated weights. The parameter overlay submodule is used to overlay the incrementally updated weights with the frozen original weights to obtain the parameters of the large language model trained by low-rank adaptation.
6. The automatic traffic impact assessment report generation system based on a local large language model according to claim 5, characterized in that, The network layer includes: The attention mechanism includes the Query, Key, Value layers and the feedforward network layer.
7. The automatic traffic impact assessment report generation system based on a local large language model according to claim 5, characterized in that, The calculation expression for the weight update is: ; in, These are the original pre-trained weights. It is a scaling factor. For rank, This is the weight increment matrix.
8. A method for automatically generating traffic impact assessment reports based on a local large language model, characterized in that, include: Collect high-quality report data in the field of transportation planning and design; The high-quality report data is annotated using a command-input-output triplet method to obtain an annotated dataset; The pre-trained language model is fine-tuned using the labeled dataset and low-rank adaptation method to obtain the fine-tuned large language model parameters; Collect and organize policies, regulations, technical standards, and professional knowledge summarized by humans related to traffic impact assessment, in order to establish a classification index and semantic association, and obtain a traffic impact assessment knowledge base; The text in the traffic impact assessment knowledge base is vectorized and encoded to obtain a vectorized knowledge database; The vectorized knowledge database is invoked to perform semantic relevance retrieval, resulting in a set of enhanced retrieval knowledge results. Based on the retrieved enhanced knowledge result set and external input data, traffic impact assessment related calculations are performed to obtain a traffic calculation result dataset. Based on the finely tuned large language model parameters, the retrieval enhanced knowledge result set, and the traffic calculation result dataset, the input information is inferred and text is generated to obtain the traffic impact assessment report generation result. The acquisition module, data annotation module, model training module, knowledge base construction module, vectorized database module, data retrieval module, data computation module, and local large model module are deployed and run on a dual RTX 3090 GPU server to complete the entire process of data input and report output.