Environment report generation method based on large model and question and answer report integrated system

By using a large-model-based environmental report generation method and an integrated question-and-answer report system, the problems of difficulty in integrating multi-source data and insufficient multi-modal data processing capabilities in the field of atmospheric environmental monitoring have been solved. This has enabled efficient, accurate, and standardized report generation and question-and-answer services, improving the overall efficiency and scenario adaptability of the system.

CN122021602APending Publication Date: 2026-05-12SHANDONG EVAYINFO TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG EVAYINFO TECH CO LTD
Filing Date
2026-04-15
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the field of atmospheric environmental monitoring, existing technologies lack a systematic collaborative mechanism for report generation systems, making it impossible to efficiently integrate multi-source heterogeneous data. Furthermore, intelligent question-and-answer systems have insufficient capabilities in multimodal data processing and deep fusion, resulting in inadequate standardization in the report generation process and a lack of accuracy in question-and-answer responses, thus failing to meet the in-depth needs of professional scenarios.

Method used

An environment report generation method based on a large model is adopted. The main agent receives structured configuration information, decomposes the report generation task, and distributes it to the sub-agent cluster according to the collaborative similarity. Each sub-agent calls the MCP tool to process multi-source data and integrates and generates a report through format verification and template matching degree verification. At the same time, the question-and-answer report integration system creates tree-shaped dialogue nodes by acquiring multimodal input, and performs data standardization, feature extraction and fusion, and mechanism factor optimization to generate question-and-answer results.

Benefits of technology

It has improved the intelligence and professional relevance of report generation, enhanced the collaborative efficiency of multi-source data processing, achieved standardization of report format and reliability of content, improved the accuracy of Q&A and integrated service capabilities, solved the problems of weak multimodal data processing capabilities and insufficient dialogue interaction coherence, and provided a one-stop, efficient intelligent atmospheric environment service.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122021602A_ABST
    Figure CN122021602A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of data processing. The invention provides an environment report generation method based on a large model and a question and answer report integrated system. The method comprises the following steps: firstly, receiving user requirements including report types, monitoring time periods and other information, and packaging the user requirements into structured configuration information; the main agent verifies parameters to generate task IDs, task attributes are obtained through analysis, MCP tool resources are pre-allocated, then the tasks are decomposed into sub-tasks such as data cleaning, and the dependency and tool corresponding relation is defined; sub-tasks are allocated to the corresponding sub-agent clusters according to the collaborative similarity, and each sub-agent calls resources to process the multi-source data and generates a chart, a form and a professional conclusion; and after the matching degree with the main intelligent experience certificate is verified through the format, a complete environment report is generated through integration. According to the invention, the report generation efficiency and specialty are improved, the report normalization is guaranteed, and various environmental monitoring analysis requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, specifically to a method for generating environmental reports based on a large model and an integrated question-and-answer report system. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the continuous evolution of artificial intelligence technology, technologies such as natural language processing (NLP) big data models, multimodal data fusion, and multi-agent collaboration have demonstrated significant value in the intelligent upgrading of various industries. Particularly in the professional field of atmospheric environmental monitoring and analysis, the integrated application of these technologies has become a core driving force for the industry's efficient development. Atmospheric environmental monitoring work requires the integration of multi-dimensional information such as real-time pollutant monitoring and meteorological conditions. It must not only provide professional and standardized analytical reports for environmental supervision and scientific research decision-making, but also meet users' real-time interactive needs in scenarios such as data exploration and Q&A. The maturity of natural language processing technology has made it possible to break away from traditional manual processing models. The development of technologies such as multi-agent collaborative architecture, streaming communication, and tree-structured data management has further laid the foundation for building intelligent tools. Currently, the industry's demand for integrated systems that combine intelligent report generation and intelligent question-and-answer functions is increasingly prominent. Leveraging the semantic understanding and generation capabilities of NLP big data models, combined with professional domain knowledge, to achieve efficient processing, standardized presentation, and real-time interaction of multi-source data has become an important direction for technological upgrading in the field of atmospheric environmental monitoring, helping relevant institutions improve decision-making efficiency and analytical depth.

[0004] In the intelligent practice of atmospheric environmental monitoring, existing technologies still have significant shortcomings, failing to meet the in-depth needs of professional scenarios. On the one hand, report generation technologies lack a systematic collaborative mechanism, failing to achieve scientific task decomposition and efficient multi-agent collaboration. They also lack the ability to integrate multi-source heterogeneous data and effective template constraints and precise tool matching mechanisms, resulting in insufficient standardization of the report generation process. This makes it difficult to adapt to customized analysis needs and efficiently output professional and consistent analysis reports. On the other hand, intelligent question-answering technologies have significant limitations. They lack the ability to uniformly process and deeply integrate multimodal data such as text and images, lack a structured dialogue management model, and struggle to ensure logical coherence and traceability in complex interactions. Furthermore, their semantic understanding lacks professional depth and dynamic optimization mechanisms, failing to continuously improve the accuracy and relevance of question-answering based on user needs and feedback. These two types of problems are interconnected and jointly constrain the overall effectiveness of intelligent systems in the atmospheric environmental monitoring field, failing to provide users with integrated, high-quality intelligent services. Breakthroughs through technological innovation are urgently needed. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an environmental report generation method and an integrated question-and-answer report system based on a large model. This solves the problems of difficulty in integrating multi-source data, low efficiency in handling complex tasks, poor format consistency, and blind tool usage in traditional report generation processes. It overcomes the deficiencies of existing technologies, such as cumbersome manual operations, poor sub-task collaboration, and insufficient depth of professional analysis. This improves the intelligence and professional consistency of report generation, enhances the collaborative efficiency of multi-source data processing and the decomposition and execution efficiency of complex tasks, and strengthens the standardization of report formats and the reliability of content.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, the present invention provides a method for generating environmental reports based on a large model.

[0007] An environmental report generation method based on a large model includes the following steps: Obtain user reporting requirements, which include configuration information such as report type, monitoring period, target area, key pollutants, and analysis dimensions. Encapsulate the configuration information into structured configuration information. The main intelligent agent receives structured configuration information, verifies the integrity of parameters, generates a unique task ID, parses the report type, data scale and analysis complexity in the structured configuration information to obtain task attributes, including task priority, waiting time and required MCP tool type, and then pre-allocates MCP tool resources according to task attributes. Based on structured configuration information, task attributes, and pre-allocated MCP tool resources, the main intelligent agent decomposes the report generation task into sub-tasks: data cleaning, chart generation, table generation, professional analysis, and format calibration, clarifying the correspondence between each sub-task and the pre-allocated MCP tool resources, as well as the dependencies between sub-tasks. The main agent calculates the collaborative similarity between the sub-agents and each sub-task, as well as the pre-allocated MCP tool resources. It then assigns sub-tasks to the sub-agent cluster based on the collaborative similarity and associates them with task IDs. The sub-agent cluster includes a data governance agent, a statistical chart agent, a form agent, a professional analysis agent, and a format validation agent. Each sub-agent calls the pre-allocated MCP tool resources according to the corresponding relationship, retrieves multi-source data for processing according to the dependency relationship, and temporarily stores the processed data according to the task ID, and synchronously generates professional charts, structured forms and pollution source tracing and trend prediction conclusions. The format validation agent validates the content generated by each sub-agent according to the preset template constraints. The main agent verifies the matching degree between the validated content and the preset template. Once the standard is met, the data is integrated to generate a complete report.

[0008] In one implementation of the first aspect of the present invention, the report requirements include customized report requirements and ordinary report requirements; the configuration information of customized report requirements also includes a chapter framework, which supports users to adjust the order of the chapter framework or supplement special analysis requirements; the configuration information of ordinary report requirements also includes a result receiving method, which includes streaming real-time reception and task progress tracking.

[0009] In one implementation of the first aspect of the present invention, the required MCP tool types include data computation MCP, image processing MCP, and vectorized Milvus MCP; the main agent determines the pre-allocation order of MCP tool resources, including: ; in, The task priority determined by the main intelligent agent. , and The weight parameters are calibrated by the main intelligent agent through historical tasks; The score represents the pre-assignment order. The normalized value representing the waiting time. represent Tool type, Represents time; The normalized value representing resource demand.

[0010] In one implementation of the first aspect of the present invention, the correspondence is as follows: the data cleaning subtask corresponds to the data calculation MCP, the chart generation subtask corresponds to the image processing MCP, the professional analysis subtask corresponds to the vectorization Milvus MCP, and the table generation subtask and the format calibration subtask are not associated with MCP tool resources. The dependencies are as follows: after the data cleaning subtask is completed, the chart generation and table generation subtasks are executed synchronously; after the table generation subtask is completed, the professional analysis subtask is executed; after the professional analysis subtask is completed, the format calibration subtask is executed.

[0011] In one implementation of the first aspect of the present invention, the main intelligent agent is based on a consistency verification score. Task completion time Normalized values, user satisfaction And the efficiency of constructing reward functions using MCP tools ,include: ; In the formula, To improve the efficiency of MCP tool calls, MCP efficiency weights calibrated for the main agent; Represents the consistency score weight; Represents the time weight of the task; This represents the weight of user satisfaction.

[0012] Secondly, the present invention provides an environmental report generation system based on a large model.

[0013] An environmental report generation system based on a large model includes: The requirement configuration unit is configured to: obtain the user's report requirements, which include configuration information such as report type, monitoring period, target area, key pollutants and analysis dimensions, and encapsulate the configuration information into structured configuration information; The task initialization unit is configured as follows: the main agent receives structured configuration information, verifies the integrity of the parameters, generates a unique task ID, parses the report type, data scale and analysis complexity in the structured configuration information to obtain task attributes, including task priority, waiting time and required MCP tool type, and then pre-allocates MCP tool resources according to the task attributes. The task decomposition unit is configured as follows: Based on structured configuration information, task attributes, and pre-allocated MCP tool resources, the main intelligent agent decomposes the report generation task into sub-tasks such as data cleaning, chart generation, table generation, professional analysis, and format calibration, and clarifies the correspondence between each sub-task and the pre-allocated MCP tool resources, as well as the dependencies between sub-tasks. The intelligent allocation unit is configured as follows: the main agent calculates the collaborative similarity between the sub-agents and each sub-task, and pre-allocated MCP tool resources; the main agent allocates the sub-tasks to the sub-agent cluster according to the collaborative similarity and associates them with the task ID; the sub-agent cluster includes a data governance agent, a statistical chart agent, a form agent, a professional analysis agent, and a format validation agent. The subtask execution unit is configured as follows: each sub-agent calls the pre-allocated MCP tool resources according to the corresponding relationship, retrieves multi-source data for processing according to the dependency relationship, temporarily stores the processed data according to the task ID, and synchronously generates professional charts, structured forms and pollution source tracing and trend prediction conclusions. The report integration unit is configured as follows: the format verification agent verifies the content generated by each sub-agent according to the preset template constraints, the main agent verifies the matching degree between the verified content and the preset template, and after meeting the standards, integrates and generates a complete report.

[0014] Thirdly, the present invention provides an integrated question-and-answer reporting system based on a large model.

[0015] A large-model-based integrated question-and-answer reporting system includes: an intelligent report generation module and an intelligent question-and-answer module. The intelligent report generation module is configured to execute the process of the large-model-based environment report generation method of the first aspect of the present invention; the intelligent question-and-answer module is configured to execute the following process: Obtain the user's multimodal input data and function configuration information, parse them, and create tree-structured dialogue nodes; Based on the information recorded by the tree-structured dialogue nodes, the corresponding multimodal data is extracted and standardized. The feature vectors of each modality are extracted after standardization, dynamic weights are calculated through semantic similarity matching, and global feature vectors are generated by weighted fusion through a multi-head attention mechanism. Factors are identified based on global feature vectors, and factor parameters are optimized using reinforcement learning, taking into account the error in question-and-answer results and user feedback. By combining global feature vectors, environmental parameters associated with tree-structured dialogue nodes, and optimized mechanism factor parameters, professionally optimized prompt words are generated, and question-and-answer results are generated based on these professionally optimized prompt words.

[0016] In one implementation of the third aspect of the present invention, the multimodal input data includes atmospheric environmental professional questions in text form, pollutant-related terms transcribed from speech, pollution image data, and pollutant time-series monitoring data. The functional configuration information includes calling the atmospheric professional knowledge base, enabling deep inference, and enabling network-based supplementary data.

[0017] In one implementation of the third aspect of the present invention, the creation rules for tree-shaped dialogue nodes are as follows: when a new dialogue is initiated, a root node is generated, and input data, function configuration information and creation time are recorded; when the user triggers a retry operation, the original node is located according to the session identifier associated with the tree-shaped dialogue node, and a child node is created with the original node as the parent node, and the input data and new function configuration information after the retry are recorded synchronously.

[0018] In one implementation of the third aspect of the present invention, a global feature vector is generated by weighted fusion via a multi-head attention mechanism, including: ; In the formula, , , The attention weights for text, image, and temporal modalities are respectively, satisfying... ; Represents the text feature vector; Represents the image feature vector; Represents the temporal feature vector; This represents the global feature vector.

[0019] Compared with the prior art, the beneficial effects of the present invention are: This invention innovatively proposes a method for generating environmental reports based on a large model. The method involves a master agent receiving structured configuration information, pre-allocating MCP tool resources, decomposing report generation tasks, and distributing them to a cluster of sub-agents based on collaborative similarity. Each sub-agent calls its corresponding MCP tool to process multi-source data. After format verification and template matching, the data is integrated to generate the report. This solution solves core problems in traditional report generation processes, such as difficulty in integrating multi-source data, low efficiency in processing complex tasks, poor format consistency, and blind tool invocation. It overcomes the shortcomings of existing technologies, including cumbersome manual operations, poor sub-task collaboration, and insufficient depth of professional analysis. It breaks down data silos and tool compatibility barriers, improves the intelligence and professional consistency of report generation, enhances the collaborative efficiency of multi-source data processing and the decomposition and execution efficiency of complex tasks, strengthens the standardization of report formats and the reliability of content, and avoids data errors caused by human operation, inefficient processing due to improper tool selection, process interruptions caused by sub-task dependency conflicts, and format chaos affecting the professionalism of reports. This provides an efficient, accurate, and standardized report generation solution for the field of atmospheric environmental monitoring.

[0020] This invention innovatively proposes an integrated question-and-answer report system. The report generation module enables accurate and intelligent generation of environmental reports, while the question-and-answer module creates tree-structured dialogue nodes by acquiring multimodal inputs. Through data standardization, feature extraction and fusion, mechanism factor optimization, and professional prompt word generation, it achieves accurate question-and-answer. This solves the problems of existing systems, such as the separation of report generation and question-and-answer functions, weak multimodal data processing capabilities, insufficient dialogue interaction coherence, and lack of accuracy in professional question-and-answer. It overcomes the limitations of single-function systems, such as poor adaptability, lack of multimodal information collaborative analysis, unstructured dialogue management, and insufficient semantic understanding depth. It achieves seamless integration of report generation and intelligent question-and-answer, improves the system's integrated service capabilities and scenario adaptability, enhances the parsing accuracy and integration efficiency of multimodal data, strengthens the coherence and traceability of dialogue interaction, ensures the accuracy and relevance of professional question-and-answer, avoids the cumbersome operation of users frequently switching between report generation and question-and-answer requirements, and avoids situations such as one-sided multimodal information integration, broken dialogue logic, and misunderstanding of question-and-answer. It provides users with a one-stop, professional, and efficient intelligent atmospheric environment service.

[0021] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0023] Figure 1 A flowchart illustrating an exemplary embodiment of the present invention for generating an environment report based on a large model; Figure 2 A schematic diagram of the principle of an integrated question-answering and reporting system based on a large model, provided as an exemplary embodiment of the present invention; Figure 3 This is a flowchart illustrating an exemplary embodiment of the present invention of an intelligent environmental question-answering method based on a large natural language model. Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0025] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0026] With the continuous strengthening of environmental protection supervision and the deepening of scientific research needs, atmospheric environmental monitoring and analysis has become one of the core tasks of environmental protection regulators, research institutions, and related enterprises. This field needs to focus on... , , , , , Real-time monitoring data of six major pollutants, combined with comprehensive assessment results of AQI (Air Quality Index), generates a large number of professional, timely, and decision-supportive reports. However, current mainstream report generation methods (manual writing or traditional template tools) are limited by technical architecture and functional design, making it difficult to meet the in-depth needs of professional scenarios. Moreover, the current atmospheric environmental monitoring field urgently needs intelligent reporting systems with intelligent report generation, multi-source data fusion, domestic adaptation, advanced report management, interactive visualization, and streaming generation experience. There is a pressing need to overcome the limitations of existing systems through technological innovation to provide efficient, accurate, and professional report generation tools for environmental supervision, scientific research, and other work.

[0027] In view of this, this implementation proposes an environment report generation method based on a large model, such as... Figure 1 As shown, the process includes the following: S101: Front-end interaction layer design to enable accurate input of report requirements and dynamic display of results.

[0028] The front-end focuses on adapting to two types of report generation scenarios and optimizing the user interaction experience, building a visual operation interface and a real-time feedback mechanism to clearly convey requirements to the back-end and algorithm layer: S101-1: Input for customized report requirements.

[0029] A custom report parameter configuration panel has been developed, allowing users to select report types according to scenarios (such as monthly pollution source tracing reports and quarterly AQI assessment reports) and configure core conditions (monitoring period, target area, key pollutants, and required professional chapters). A template preview function is also provided to display the chapter framework (such as pollution status - source tracing analysis - trend prediction - control recommendations). Users can manually adjust the chapter order or add special analysis requirements. All configuration information is encapsulated in a structured format to provide accurate input for the backend to call the custom template algorithm.

[0030] S101-2: Input for general report requirements.

[0031] The design features a simple and quick report generation portal; users only need to select the type of contaminant (e.g., ...). , The system automatically associates the following parameters: time range (e.g., the past 7 days, the previous month), target area (e.g., a city, a monitoring point), and default analysis dimensions (e.g., concentration change trend, compliance rate statistics). It also provides options for result reception methods (streaming real-time reception / task progress tracking) to adapt to different network environments and report generation time requirements.

[0032] S101-3: Optimization of results display and interaction.

[0033] The system integrates a dynamic rendering component, supporting chapter-level content loading and format preview for customized reports (such as automatically recognizing and rendering red title headers). Users can edit chapter content or add annotations online. For regular reports, if streaming reception is selected, the system displays the text conclusions and charts output by the algorithm in real time via SSE connection. If task tracking is selected, a task progress bar is displayed (such as data processing 30% - chart generation 60% - report integration 90%), and users can click to view real-time generated intermediate results (such as completed concentration statistics tables), solving the user waiting experience problem for long-running tasks.

[0034] S102: Backend logic layer design, realizing report generation task scheduling and algorithm collaboration.

[0035] The backend, acting as the core hub for requirements analysis, task distribution, and result optimization, designs differentiated processing flows for the two types of reporting scenarios, while coordinating multi-agent collaboration to ensure both efficiency and professionalism in report generation. S102-1: Customized report processing workflow.

[0036] S102-1.1: Requirements Analysis and Template Calling.

[0037] After receiving the front-end customized report configuration, the system first verifies the completeness of the parameters (e.g., whether key pollutants are specified, and whether the chapter framework is reasonable). Then, it calls the customized template algorithm to generate a professional prompt template based on the user-selected chapter framework. The template pre-defines the professional expression logic for each chapter (e.g., the pollution status chapter should include the average concentration of the six major pollutants, year-on-year / month-on-month changes, and statistics on the number of days meeting standards), and reserves data placeholders (e.g., { Monthly average concentration value}, { Distribution of periods exceeding the standard.

[0038] S102-1.2: Data Query and Template Filling.

[0039] Based on the data placeholders in the template, an SQL query statement is automatically generated to retrieve monitoring data and meteorological data (such as the impact of wind speed and humidity on pollution diffusion) for the corresponding time period and region from the data layer; the query results are then filled into the template according to a professional format (e.g., ...). The monthly average concentration was 35 μg / m³, a year-on-year decrease of 12%. At the same time, the professional logic of atmospheric environment was supplemented (such as the 5% increase in the proportion of calm and stable weather with wind speed less than 2 m / s, judging that the local cumulative contribution is the main influencing factor).

[0040] S102-1.3: Report improvement and format optimization.

[0041] The initial report generated by the algorithm undergoes post-processing in three ways: first, the format is adjusted according to professional standards (e.g., adding red headings to the core conclusions and control recommendations sections to conform to the formatting habits of environmental protection reports); second, the consistency between the data and the conclusions is verified (e.g., ensuring that the time range of the data in the trend prediction section matches that of the pollution status section); and third, professional attachments are added (e.g., monitoring point distribution maps and raw data statistical tables). Finally, a complete customized report is generated and pushed to the front end.

[0042] S102-2: Standard Report Processing Procedure.

[0043] S102-2.1: Streaming output processing (SSE mode).

[0044] After receiving a standard report request from the front end, the system encapsulates pollutant type-time-region parameters and sends them to the algorithm layer, while simultaneously establishing an SSE connection; it also receives the algorithm's streaming text conclusions in real time (e.g., the conclusions of a certain location in May 2024). The average concentration is The system pushes data along with charts (such as line graph coordinates) to the front end simultaneously. To address network fluctuations, a breakpoint resume mechanism is designed to record the identifiers of the pushed content. Once the network is restored, the push resumes from the breakpoint to avoid duplication or loss.

[0045] S102-2.2: Task-oriented processing (database write mode).

[0046] If the user selects task-based reception, the backend generates a unique task ID and sends the task parameters (including the task ID and report requirements) to the algorithm layer. The algorithm layer establishes a connection with the database through the task ID and writes intermediate results during the generation process (such as data processing results and chart generation progress) into the database in real time. The backend provides task progress query and result retrieval interfaces, and the frontend periodically calls the interfaces to retrieve progress (based on the task status field in the database) and loads the generated content (such as reading completed statistical table data from the database), thus solving the timeout problem of long-running tasks.

[0047] S102-3: Multi-agent scheduling and coordination.

[0048] The backend launches the main intelligent agent, which then assigns sub-intelligent agents based on report type and task requirements.

[0049] S102-3.1: Data Governance Intelligent Agent.

[0050] Receive instructions from the overall intelligent agent, retrieve raw monitoring data from the data layer, and perform cleaning (such as removing outliers caused by sensor malfunctions) and standardization (such as unifying concentration units). The data is processed through correlation analysis (such as matching meteorological data from the same period), and the processed data is temporarily stored in the database by task ID for other intelligent agents to access.

[0051] S102-3.2: Statistical Chart Intelligent Agent.

[0052] Based on the report requirements (e.g., customized reports require a "pollution trend chart", and regular reports require a "concentration compliance rate bar chart"), the processed data is read from the database, and professional charts such as line charts, bar charts, and heat maps are generated. The chart data (e.g., coordinates, legends, and unit labels) is output and associated with the task ID and written to the database.

[0053] S102-3.3: Form Intelligent Agent.

[0054] For sections such as raw data statistics and summary of exceedance records in customized reports, or monitoring data details in ordinary reports, the structured data processed by the data governance intelligent agent is read, and forms are generated according to atmospheric environment professional standards (such as including monitoring point location, date, etc.). concentration, Include fields such as concentration and whether it meets the standard, and ensure that the form format is consistent with industry standards.

[0055] S102-3.4: Professional Analysis of Intelligent Agents.

[0056] Responsible for conducting pollution source tracing (such as determining the contribution ratio of industry / transportation / dust by combining pollution source inventory data) and trend forecasting (building short-term forecasting models based on historical data and weather forecasts), providing professional conclusions for the source tracing analysis and trend forecasting sections of customized reports, and enhancing the depth of the reports.

[0057] S102-3.5: Format validation smart agent.

[0058] After the report is generated, verify the text format (such as whether the red title header is used correctly and whether the professional terminology is consistent) and data logic (such as whether the AQI index calculation is consistent with the preset standard), correct format deviations and logical contradictions, and ensure the professionalism of the report.

[0059] S103: Data layer design to provide data support for report generation and result storage.

[0060] The data layer serves as the foundation for raw data supply, intermediate result storage, and final report storage, providing stable data services for front-end interaction, back-end scheduling, and algorithm execution.

[0061] S103-1: Multi-source data integration and storage.

[0062] The system employs a hybrid architecture combining relational and time-series databases. The relational database stores structured data (such as basic information on monitoring sites, environmental documents, and report templates); the time-series database stores high-frequency monitoring data (such as…). , It provides minute-level concentration data and meteorological data (such as hourly wind speed and humidity data) to ensure efficient data reading and writing; at the same time, it connects to third-party platform interfaces (such as provincial monitoring platforms and meteorological service platforms) to achieve real-time data synchronization and provide the latest data source for report generation.

[0063] S103-2: Temporary storage of task-related data.

[0064] Establish a "task-data" association table to record the mapping relationship between task ID and corresponding data (such as the time range of monitoring data associated with task ID, region ID, and file path after processing by the data governance agent); the intermediate results generated by each agent in the algorithm layer (data governance agent, statistical chart agent, etc.) are all stored in the corresponding data table (such as task-chart data table, task-form data table) according to task ID, which facilitates fast backend query and real-time loading by the frontend.

[0065] S103-3: Final Report and Version Management.

[0066] The system employs a MinIO distributed storage architecture to store the generated final reports (including complete documents for customized reports and text and chart files for regular reports). Each report is assigned a unique identifier, associated with the task ID, generation time, and user information. A version management mechanism is also established to record the report's revision history (e.g., V1.0 - initial generation, V1.1 - supplementary annotations), supporting version backtracking and comparison to meet the needs of multiple revisions and archiving. Access control is implemented for sensitive data (such as detailed data on pollution sources in specific areas) to ensure data security.

[0067] S104: Asynchronous scheduling and status management of intelligent reporting tasks.

[0068] With the main intelligent agent as the core scheduling hub, after receiving the front-end report request, it first initiates the asynchronous task management process, synchronously associates MCP tool resources, and lays the foundation for the division of labor among sub-intelligent agents and tool invocation.

[0069] S104-1: Priority task queue scheduling driven by the main agent (MCP resource pre-allocation).

[0070] After receiving a customized / normal report request from the front end, the main agent parses the task attributes (priority). Waiting time Resource requirements Simultaneously identify the type of MCP tool required for the task (such as data computation MCP, vectorized Milvus MCP), quantify the overall priority of the task through the scheduling weight formula, and determine the calling order of the sub-agent and the MCP tool: (1) In the formula, The task priority determined by the main intelligent agent (customized report P=2, ordinary report P=1). The number of sub-agents required for the task and the associated MCP tool resources (such as data governance agent + data computing MCP, professional analysis agent + vectorized Milvus MCP). , , The weight parameters are calibrated by the main intelligent agent through historical tasks; This represents the score indicating the pre-assignment order. The main agent outputs this score using this formula. High-priority / long-waiting / low-resource tasks are prioritized for inclusion in the execution queue. At the same time, a unique ID is assigned to each task, and a task-sub-agent-MCP tool mapping table is associated to ensure accurate matching between tools and agents in subsequent scheduling.

[0071] S104-2: Task state transition monitored by the main agent (MCP call triggered).

[0072] The main intelligent agent uses formula (1) Based on this, initialize the task state. (Pending scheduling), the task status is updated in real time through the state transition function, dynamically controlling the execution rhythm of sub-agents and the timing of MCP tool invocation: (2) In the formula, The current task status is as follows: pending scheduling / sub-agent is executing (MCP call in progress) / result pending verification. This represents the task status at the next moment; The main intelligent agent according to Triggered actions (such as starting the data governance agent + calling the data calculation MCP, notifying the statistical chart agent to prepare + preloading the image processing MCP). for The task progress at any given time is calculated by the main agent by summarizing the execution feedback from the sub-agents and the MCP tool. If the MCP tool call times out (e.g., due to delays in vectorized MilvusMCP retrieval), the main agent automatically switches to a backup MCP instance to ensure the task is not interrupted, and simultaneously feeds back the status and MCP call progress to the front end.

[0073] S104-3: Asynchronous processing architecture triggered by the main agent (MCP result callback).

[0074] The main agent responds to the state events of formula (2). If the data governance agent completes the data computation MCP and returns the result, an asynchronous processing flow is initiated, and the MCP result is linked to the subsequent execution of the sub-agent through a callback function: (3); In the formula, Output for MCP tools (such as statistical results of MCP for data calculation and chart rendering data of MCP for image processing). Pre-set logic for the main agent (e.g., calculate the MCP result based on the data, triggering the statistical chart agent to call the image processing MCP); Represents asynchronous processing functions; Represents a state event; This represents the result of asynchronous processing.

[0075] This architecture addresses the network fluctuation issue in ordinary report streaming output while enabling parallel collaboration between sub-agent execution and MCP calls, thus improving task efficiency.

[0076] S105: Intelligent task decomposition and multi-agent specialized scheduling.

[0077] The main intelligent agent inherits the asynchronous environment and MCP resources of S104, and achieves precise collaboration between the sub-intelligent agents (data governance / statistical charts / tables / professional analysis / format validation agents) and MCP tools through task decomposition and capability matching.

[0078] S105-1: Structural decomposition of reporting tasks led by the main agent.

[0079] The main agent uses the task results of S104 As input, combined with constraints (If included) Concentration statistics table + trend chart + source analysis) and formula (1) matching MCP resources The task is broken down by decomposition function: (4); In the formula, , Multi-source data cleaning (binding data governance intelligent agent + data computing MCP) Generate concentration trend charts (binding statistical chart agent + image processing MCP). To monitor the generation of data tables (binding table smart agents), For pollution source tracing analysis (binding professional analytical agents + vectorized MilvusMCP), For report format calibration (binding format verification agent); Represents constraints; It represents the MCP resource matching function; the main intelligent agent synchronously identifies the subtask dependencies. The innovation lies in dynamically adjusting the decomposition granularity based on the capabilities of the MCP tool to ensure that the subtasks and tool functions are accurately matched.

[0080] S105-2: Sub-agent capability matching and MCP driven by the main agent.

[0081] The collaborative main agent uses the subtasks of formula (4) As input, the sub-agent cluster is invoked, and the matching degree between sub-tasks, agents, and MCP tools is calculated using agent capability vectors to achieve optimal division of labor: (5); In the formula, For sub-intelligent agents Subtasks Collaborative similarity with MCP tools (e.g., data governance agents and) Data calculation MCP =0.95; Statistical chart agent and Image processing MCP =0.91, calculated by the main agent based on sub-task attributes, agent expertise dimensions, and MCP functionality; Represents the agent's capability vector; Representative ability calculation function; Represents the MCP tool type; Represents coordination similarity; Calculate MCP using representative data; This represents the image processing MCP.

[0082] The core roles and scheduling logic of the main intelligent agent, sub-intelligent agents, and MCP tools include: The main intelligent agent (decision center): through the capability vector of formula (5), Assigned to the data governance intelligent agent (synchronously triggering the data computation MCP call to handle monitoring data cleaning and statistics). Assigned to the statistical chart agent (calls the image processing MCP to render a pollution trend chart). Assign to the table agent (generate structured monitoring data tables). Assigned to a specialized analytical agent (which calls vectorized MilvusMCP to retrieve historical pollution data and complete source tracing analysis). Assign to the format verification agent (calibration report section format); synchronize the global context in real time (such as the data calculation MCP output). The average value is sent to the associated sub-agent to ensure data consistency; if the sub-agent or MCP tool is abnormal (such as the statistical chart agent malfunctions), the main agent immediately re-matches the backup agent and MCP according to formula (5) to ensure the continuity of the process.

[0083] Data governance intelligent agent (data preprocessing unit): After receiving instructions from the main intelligent agent, it calls the data calculation MCP to complete the multi-source monitoring data ( , The process involves cleaning, standardizing, and integrating data (such as data from MCP) to output structured data for use by other intelligent agents. The core reliance is on MCP tools to improve data processing efficiency.

[0084] Statistical Chart Intelligent Agent (Visualization Execution Unit): Based on the output of the data governance intelligent agent, it calls the image processing MCP to generate professional charts such as line charts (pollutant concentration trends) and heat maps (regional pollution distribution), ensuring that the visualization results comply with the atmospheric environmental reporting standards.

[0085] Table-based intelligent agent (structured output unit): Generates tables (e.g., monthly tables) from the monitoring data processed by the data governance intelligent agent, according to industry standards. Concentration details table), no additional MCP tools required, focusing on format and data accuracy.

[0086] Professional analytical agent (deep inference unit): It calls the vectorized MilvusMCP to retrieve historical monitoring data and pollution source lists, and combines real-time data to complete in-depth analysis such as pollution source tracing and trend prediction, and output professional conclusions. The MCP tool provides data retrieval support for inference.

[0087] Format validation agent (quality control unit): Validates the consistency of the format of the output content of each sub-agent (such as red chapter titles and uniformity of professional terminology), without the need for MCP tools, focusing on the professionalism and readability of the report.

[0088] S106: Report Consistency Verification and Agent Policy Optimization.

[0089] The main agent takes over the collaboration results between the sub-agent and MCP from step S105, and optimizes the sub-agent strategy and MCP tool invocation logic through consistency verification and reinforcement learning.

[0090] S106-1: Consistency verification of report content led by the main intelligent agent (MCP results included in the verification).

[0091] The main agent takes the report content output by S105 (generated collaboratively by sub-agents and MCP) as input, combined with the report template. The matching degree of content, format, and MCP output results is verified using a semantic similarity formula: (6); In the formula, This involves combining the content fragments output by the sub-agent with the MCP (such as trend charts generated by a statistical chart agent + image processing MCP, or source tracing conclusions output by a professional analysis agent + Milvus MCP). Elements in the template that match the capabilities of the sub-agent. Semantic and format similarity are calculated for the main agent; Consistency represents the consistency score. Represents the number of content segments; Representative report content; This represents the report template. If the score is below a threshold (e.g., 0.85), the main agent determines the source of the deviation (e.g., MCP data calculation error, sub-agent formatting oversight), triggering a retry of the sub-agent and adjusting the MCP parameters (e.g., optimizing the statistical dimensions of the MCP data calculation). The innovation lies in incorporating the MCP tool output into consistency verification, ensuring that the tool's performance is linked to the report quality.

[0092] S106-2: Sub-agents driven by the main agent and gradient optimization of the MCP policy.

[0093] The main agent scores a consistency score based on formula (6). As the core indicator, combined with the task completion time in formula (2) Normalized values, user feedback and the efficiency of calling MCP tools Construct a reward function : (7); In the formula, To improve the efficiency of MCP tool calls (such as the response speed of data calculation MCP and the retrieval accuracy of MilvusMCP). MCP efficiency weights calibrated for the main agent; Represents user satisfaction; Represents the consistency score weight; Represents the time weight of the task; This represents the weight of user satisfaction. Based on this reward function... The main agent uses the policy gradient method to optimize the execution policy and MCP calling logic of the sub-agents: (8); In the formula, Execute policies and MCP invocation logic for sub-agents (i.e., policy functions, such as data governance agents prioritizing the invocation of data computation MCP instances with faster responses). For the advantage function (reward from formula (7)) calculate); Represents the policy gradient; Represents strategy parameters; Represents the objective function; Represents expectations; Representative action; Represents the system state; Represents the MCP call identifier; This represents the advantage function.

[0094] The main agent updates the collaboration parameters between the sub-agents and the MCP through this formula, enabling the system to continuously optimize the agent-MCP matching efficiency as the task is executed, and gradually adapt to the professional needs of atmospheric environment reports.

[0095] This invention, based on a multi-agent collaboration and reinforcement learning-based report generation system, innovatively constructs a specialized agent collaboration mechanism. Through intelligent task decomposition, capability matching, and collaborative execution, the complex atmospheric environment analysis task is broken down into sub-tasks that can be processed in parallel, such as monitoring data analysis, pollution source tracing, and trend prediction. Combined with a reinforcement learning-driven adaptive optimization strategy, dynamic optimization of task allocation and execution paths is achieved, significantly improving the comprehensive analysis efficiency and decision-making intelligence level for complex atmospheric pollution problems.

[0096] This invention employs template-constrained generation and multimodal fusion technologies to establish a structured report generation system. By standardizing the content architecture through a domain-adaptive template library and combining temperature parameter adjustment and consistency verification mechanisms, the randomness of content generated by large models is effectively controlled. Simultaneously integrating multimodal elements such as text, monitoring data, pollution maps, and trend charts, it achieves an integrated presentation of the spatiotemporal distribution of air pollutant concentrations, source analysis, and emission reduction assessments, ensuring the accuracy and completeness of professional reports.

[0097] This invention constructs an asynchronous task scheduling architecture based on semantic routing, enabling intelligent tool invocation and stable service assurance. Through the MCP tool routing mechanism, it accurately matches the needs of atmospheric professional analysis, supporting the automatic invocation of professional tools such as pollution diffusion simulation and source apportionment algorithms. Combined with task queue management and status monitoring, it provides reliable asynchronous processing capabilities for complex computational tasks such as long-duration air quality prediction and source tracing analysis, ensuring high availability of system services.

[0098] This invention innovates the data acquisition and storage mechanism, streamlining the entire customized data analysis process. Based on natural language queries, it automatically generates dynamic SQL, enabling precise retrieval of professional data such as historical atmospheric monitoring data and pollution source inventories. Combined with MinIO distributed storage and version management, it supports efficient access and traceability of terabyte-level monitoring data, providing a solid data foundation for multi-dimensional atmospheric environment analysis.

[0099] This invention enhances the system's domain expertise and security through specialized prompting word engineering and domestic deployment. A prompting word optimization mechanism is designed for specialized fields such as atmospheric chemistry and pollution meteorology, embedding domain knowledge constraints and example guidance to significantly improve the model's accurate understanding of technical terminology and analytical logic. The system is fully compatible with domestic software and hardware environments, supports completely offline deployment, and ensures the security and controllability of sensitive monitoring data and analysis results.

[0100] In summary, this invention is superior to existing technologies in terms of intelligence, specialization, collaboration, and efficiency. It is particularly suitable for generating atmospheric environmental reports for environmental protection departments, monitoring agencies, and research institutions, and has significant practical value and promising prospects for promotion.

[0101] This implementation also proposes an environment report generation system based on a large model, including: The requirement configuration unit is configured to: obtain the user's report requirements, which include configuration information such as report type, monitoring period, target area, key pollutants and analysis dimensions, and encapsulate the configuration information into structured configuration information; The task initialization unit is configured as follows: the main agent receives structured configuration information, verifies the integrity of the parameters, generates a unique task ID, parses the report type, data scale and analysis complexity in the structured configuration information to obtain task attributes, including task priority, waiting time and required MCP tool type, and then pre-allocates MCP tool resources according to the task attributes. The task decomposition unit is configured as follows: Based on structured configuration information, task attributes, and pre-allocated MCP tool resources, the main intelligent agent decomposes the report generation task into sub-tasks such as data cleaning, chart generation, table generation, professional analysis, and format calibration, and clarifies the correspondence between each sub-task and the pre-allocated MCP tool resources, as well as the dependencies between sub-tasks. The intelligent allocation unit is configured as follows: the main agent calculates the collaborative similarity between the sub-agents and each sub-task, and pre-allocated MCP tool resources; the main agent allocates the sub-tasks to the sub-agent cluster according to the collaborative similarity and associates them with the task ID; the sub-agent cluster includes a data governance agent, a statistical chart agent, a form agent, a professional analysis agent, and a format validation agent. The subtask execution unit is configured as follows: each sub-agent calls the pre-allocated MCP tool resources according to the corresponding relationship, retrieves multi-source data for processing according to the dependency relationship, temporarily stores the processed data according to the task ID, and synchronously generates professional charts, structured forms and pollution source tracing and trend prediction conclusions. The report integration unit is configured as follows: the format verification agent verifies the content generated by each sub-agent according to the preset template constraints, the main agent verifies the matching degree between the verified content and the preset template, and after meeting the standards, integrates and generates a complete report.

[0102] With the rapid evolution of artificial intelligence technology, intelligent question-answering systems based on large natural language models (such as DEEPSEEK) have achieved breakthroughs in general fields, providing efficient information retrieval and decision support for various industries. However, in highly specialized sub-scenarios such as atmospheric environmental monitoring and analysis, existing systems, limited by their technical architecture and functional design, struggle to meet the precision requirements of fields such as environmental supervision, scientific research analysis, and public health management. Their core technological limitations are mainly reflected in the following three aspects: (1) Atmospheric environment monitoring scenarios need to be deeply integrated , , , , , The system provides real-time monitoring data for six major pollutants, along with a comprehensive AQI (Air Quality Index) assessment model, and integrates multi-dimensional information such as meteorological data, pollution source emission inventories, and regional pollution diffusion simulations. However, existing general-purpose question-and-answer systems lack pre-trained knowledge accumulation and specialized optimization in the field of atmospheric environmental science. They can only output generalized environmental protection suggestions and cannot achieve collaborative analysis and reasoning of multi-source professional data. At the interactive response level, traditional systems generally use HTTP polling or short polling mechanisms to obtain large model outputs, resulting in significant response delays and making it difficult to support real-time streaming interaction requirements. In terms of data visualization, the system does not integrate specialized components such as dynamic pollution trend curves, regional pollution heat maps, and AQI spatiotemporal distribution dashboards, failing to intuitively present the inherent patterns of complex monitoring data. Furthermore, it lacks unified processing capabilities for multi-modal data such as text, images, data charts, audio, and video, making it difficult to meet the needs of professional users for multi-dimensional information integration and analysis.

[0103] (2) The historical dialogue management mechanism is lacking, and the interaction continuity and traceability are insufficient.

[0104] Atmospheric environmental monitoring and analysis tasks often require iterative exploration based on historical dialogue logic (such as gradually optimizing pollution source tracing model parameters and comparing monitoring data from different time periods). However, existing systems only provide basic dialogue record list viewing functions and lack a structured mechanism that supports multi-round dialogue retrieval, content editing, branch management, and result deletion. This prevents expert users from reusing historical analysis processes or correcting reasoning paths. Furthermore, the system fails to visualize the AI ​​decision-making logic, failing to demonstrate the intermediate reasoning link from question input to result output, making it difficult for users to verify the scientific validity and reliability of the answers. In addition, traditional systems lack the ability to organize dialogue based on contextual relationships and cannot maintain the hierarchical relationship of dialogue through data models such as tree structures. In complex interactive scenarios such as retrying historical questions, saving key conclusions, and viewing details of derivative questions, dialogue logic breaks are prone to occur, severely impacting the continuity of professional analysis tasks.

[0105] (3) Insufficient semantic understanding and lack of professional knowledge service capabilities.

[0106] The question-and-answer requirements in the field of atmospheric environmental monitoring involve a large number of professional terms, formulas, models, and industry standards, requiring the system to have accurate semantic matching and knowledge retrieval capabilities. However, existing systems do not fully utilize embedded models and vectorization techniques to construct a semantic space for the professional domain, relying solely on keyword matching to achieve knowledge association, resulting in significantly insufficient accuracy and relevance of the answers. At the prompt word design level, there is a lack of a specific optimization mechanism for atmospheric environmental monitoring tasks, failing to improve the understanding of complex requirements by using clear task descriptions, supplementing domain context, and guiding with professional examples, which easily leads to misunderstandings or irrelevant answers. In addition, the system has not established a mechanism for integrating domain expert experience with deep learning models, failing to transform implicit knowledge such as pollution analysis methods and data interpretation standards in the industry into decision rules that the model can call upon, making it difficult to provide question-and-answer services with professional depth and failing to meet the needs of high-end scenarios such as environmental protection research and regulatory decision-making.

[0107] In view of this, such as Figure 2 As shown, this implementation proposes an integrated question-and-answer report system based on a large model, including: an intelligent report generation module and an intelligent question-and-answer module. The intelligent report generation module is configured to execute the process of the environmental report generation method based on the large model described above in this invention. The intelligent question-answering module is configured to execute the following process: Obtain the user's multimodal input data and function configuration information, parse them, and create tree-structured dialogue nodes; Based on the information recorded by the tree-structured dialogue nodes, the corresponding multimodal data is extracted and standardized. The feature vectors of each modality are extracted after standardization, dynamic weights are calculated through semantic similarity matching, and global feature vectors are generated by weighted fusion through a multi-head attention mechanism. Factors are identified based on global feature vectors, and factor parameters are optimized using reinforcement learning, taking into account the error in question-and-answer results and user feedback. By combining global feature vectors, environmental parameters associated with tree-structured dialogue nodes, and optimized mechanism factor parameters, professionally optimized prompt words are generated, and question-and-answer results are generated based on these professionally optimized prompt words.

[0108] More specifically, such as Figure 3 As shown, it includes: B101: Front-end interaction layer construction, realizing multimodal input and tree-shaped dialogue operation.

[0109] The front-end focuses on conveying professional needs and visualizing dialogue interactions, developing functional modules that adapt to multi-turn branching scenarios, and providing operation instructions for the back-end tree structure management, which is divided into three sub-steps.

[0110] B101-1: Development of Multimodal Input and Function Configuration Entry Point.

[0111] Develop a multimodal input component that allows users to input professional questions (such as analyzing March 2024) via text boxes. Correlation with humidity), speech input transcription of technical terms (such as...) The system includes input methods such as concentration change trends and image uploads (e.g., real-time photos of pollution sites and screenshots of monitoring equipment data). It also allows for the configuration of function switches on the input interface, including options to access the atmospheric science knowledge base, enable deep inference, and enable online data search. Once selected by the user, the front-end integrates the input content and function configurations into a unified request data, providing a clear direction for subsequent back-end processing.

[0112] B101-2: Development of tree-shaped dialogue interaction function.

[0113] A history dialogue management panel was developed, supporting user-triggered dialogue retries, history viewing, and favorites operations: When a user clicks on the history, the panel displays past dialogue logic in a hierarchical indentation format (such as multiple branch dialogues under the root dialogue); when the retry button for a historical dialogue is clicked, the front end automatically marks the dialogue's association identifier, generates a retry request carrying the original dialogue's association information; when the favorite button is clicked, the front end records the key information of the current dialogue and synchronously sends the favorite command to the back end; through this process, refined dialogue operations are achieved, providing triggering conditions for the creation of backend tree branches and node maintenance.

[0114] B101-3: Development of Visualization of Dialogue Status and Results.

[0115] The system integrates streaming communication components to receive real-time Q&A results pushed from the backend and simultaneously renders text conclusions and professional charts (such as pollutant time series trend charts and AQI dynamic dashboards). When a user triggers a retry and generates a new branch dialogue, the frontend adds a branch entry under the corresponding original dialogue node in the history panel, intuitively displaying the dialogue tree relationship. If a user views historical details, the frontend sends a details query request, receives the dialogue-related data returned by the backend (such as the content of the knowledge base called and the monitoring data used for analysis), and displays it in a pop-up window to ensure that the entire dialogue process is traceable.

[0116] B102: Backend logic layer development, building a tree-structured dialogue management and scheduling mechanism.

[0117] The backend, as the core hub, focuses on implementing tree-structured dialogue management through data association and logical processing. It also handles request parsing and algorithm scheduling, ensuring that frontend operations are accurately translated into data layer storage and algorithm invocation instructions. This process is divided into four sub-steps: B102-1: User Request Parsing and Task Transformation.

[0118] After receiving the request data pushed by the front end, first verify the integrity of the data (such as whether the image format in the multimodal input is compliant and whether there are conflicts in the function configuration); then extract the core information, including user input content, function configuration options, operation type (new conversation / retry / favorite / history query), and associated history conversation identifier (carried when retrying or querying history); finally, convert this information into task instructions that the backend can recognize, and clarify the direction of subsequent tree node operations and data / algorithm call requirements.

[0119] B102-2: Creating and maintaining tree-structured dialogue nodes.

[0120] Based on task instructions, a tree-like relationship is constructed between dialogue nodes: when a new dialogue is initiated, a root node is created, recording the input content, function configuration, and creation time of the dialogue; when a user triggers a retry operation, the original node is located according to the associated historical dialogue identifier, a new child node is created with the original node as the parent node, the input content after the retry and the new function configuration are recorded, forming a dialogue branch; when a user performs a favorite operation, the favorite status of the corresponding node is marked, and the node attributes are updated; through this step, the parent-child node relationship of the dialogue is established at the backend level, realizing the dynamic maintenance of the tree structure.

[0121] B102-3: Context association and algorithm scheduling.

[0122] Based on the current dialogue node, all its parent node information is traced and integrated to form a complete dialogue context (such as all input and output content and function configurations from the root node to the current child node). If the task instruction includes configurations such as calling a professional knowledge base or enabling deep inference, the backend generates algorithm call parameters based on the context information. For example, when analyzing the correlation of pollutants, the parameters include the time range, regional information, and related historical analysis conclusions from the dialogue. The parameters are then pushed to the corresponding algorithm module (such as a multimodal fusion algorithm or a professional analysis algorithm) to trigger algorithm calculation, while simultaneously recording the algorithm call status and related node information.

[0123] B102-4: Results Feedback and Node Updates.

[0124] After receiving the analysis results (such as text conclusions, chart data, and knowledge base references) returned by the algorithm module, the results are associated with the current dialogue node, and the node's output information fields are updated. The results are then packaged in a format that can be parsed by the front end and pushed to the front end via streaming communication to ensure that users receive answers in real time. If the results contain chart data or knowledge base content, the association identifiers of these data are recorded synchronously to provide a basis for users to call data when viewing historical details later.

[0125] B103: Data layer construction, realizing persistent storage of the dialogue tree structure.

[0126] The data layer uses two core tables (session table and dialogue table) to store and associate the dialogue tree structure, providing data support for backend tree management. This is specifically divided into three sub-steps: B103-1: Session table design and session information storage.

[0127] Create a session table to record overall information about a user session, including a unique session identifier, user identifier, session creation time, and session status (active / closed). When a user initiates a new conversation, a new record is generated in the session table to establish the session foundation. All subsequent conversation nodes (root node, child nodes) under this session are associated with this session identifier, ensuring that the conversation logic of the same user is aggregated under the same session, which facilitates session-level historical query and management.

[0128] B103-2: Dialog Table Design and Tree Node Storage.

[0129] A `dialogue` table is created as the core table for storing dialogue nodes and their tree-like relationships. Key fields include a unique node identifier, an associated session identifier (associated with the `session` table), a parent node identifier (recording the current node's parent node ID; the root node's parent identifier is set to a default value), user input, function configuration, algorithm call records, output results, favorite status, and creation time. When storing the root node, the parent node identifier is set to a default value; when storing child nodes, the parent node identifier is set to the unique identifier of the corresponding original node. Through the parent node identifier field, parent-child relationships between nodes are established in the `dialogue` table, forming a tree-like data structure. At the same time, information such as algorithm call records and output results are bound to the node identifier for storage, ensuring the integrity of node information.

[0130] B103-3: Support for data association query and retrieval.

[0131] Develop a data query interface to meet the data call needs of both the backend and frontend: When the backend maintains the tree-like nodes, it queries all child nodes of a parent node under a certain session using "association session identifier + parent node identifier" to confirm the number and structure of branches; when the frontend requests historical records, the backend queries all nodes under that session using the association session identifier, and then returns the results after sorting out the tree relationship based on the parent node identifier; when a user views historical details, the backend queries all fields of that node in the dialogue table using the node's unique identifier, including algorithm call records and related data of output results, ensuring that the detailed information is presented completely; through this process, the data layer achieves efficient support for tree-like dialogue management.

[0132] B104: Front-end-back-data layer collaborative interaction process.

[0133] Taking the example of a user retrying a historical conversation and generating a branch, the complete collaboration process is implemented in three sub-steps: B104-1: Frontend initiates retry request and instruction transmission.

[0134] In the front-end history chat panel, users can click the retry button for a specific history chat, enter new analysis requirements (such as adjusting the time range to April 2024 and re-analyzing). (correlation with humidity), and check the box to call the latest monitoring data; the front end encapsulates the request data (including operation type = retry, associated historical dialogue node identifier, new input content, function configuration) and pushes it to the back end via HTTP protocol.

[0135] B104-2: Backend processing and data / algorithm scheduling.

[0136] After parsing the request, the backend queries the parent node identifier and associated session identifier of the original node in the dialogue table of the data layer based on the associated historical dialogue node identifier. Using the original node as the parent node, a new child node is created, generating a new record in the dialogue table (parent node identifier = original node ID, associated session identifier = original session ID, input content = new requirement, function configuration = call the latest monitoring data). Then, the context of this child node (historical information of the original node and root node) is integrated to generate algorithm call parameters (including time range = April 2024, region = location A, data type = latest monitoring data), which are pushed to the multimodal fusion algorithm module. Simultaneously, the data layer queries the corresponding time period based on the "time range + region" in the algorithm parameters. The humidity monitoring data is then returned to the algorithm module.

[0137] B104-3: Algorithm result feedback and front-end display.

[0138] Based on the monitoring data provided by the data layer, the algorithm module performs correlation analysis and returns textual conclusions (April 2024, Location A). The data is positively correlated with humidity (correlation coefficient 0.58) and trend chart data. After receiving the results, the backend updates the output result field of the new child node in the dialogue table, encapsulates the results, and pushes them to the frontend via streaming communication. After receiving the results, the frontend adds a branch entry under the original node in the history dialogue panel, displays the new text conclusion and trend chart, and completes the entire retry branch process.

[0139] Core algorithm layer design: Multimodal fusion - feedback optimization - professional adaptation end-to-end implementation Based on a front-end-back-data layer infrastructure, the core algorithm layer achieves accurate question answering in atmospheric environment monitoring scenarios through three major modules: multimodal data fusion, mechanism factor feedback optimization, and professional prompt word adaptation. The specific implementation steps are as follows: B105: Multimodal data fusion to build professional data deep analysis models.

[0140] For text (such as monitoring reports), images (such as pollution heat maps), and time-series data (such as pollutant concentration curves) in atmospheric environmental monitoring, a unified feature vector is generated through a process of "preprocessing-feature extraction-weighted fusion" to support question-answering reasoning.

[0141] B105-1: Standardized preprocessing of multimodal data.

[0142] First, eliminate the dimensional differences between different modalities to ensure consistency in subsequent feature extraction. Let the multimodal raw data set output by the data layer be... ,in, This is text data (such as user questions, test reports). Image data (such as pollution heatmaps). For time series data (such as (Hourly concentration sequence). Z-score normalization was applied to each data type, using the following formula: (9); in, This represents the mean of the corresponding modal data. Standard deviation The result represents standardization, and D represents the original data. Formula (9) is used to... , and Convert them into standardized data respectively and This eliminates the interference of different units such as the number of text characters, image pixel values, and concentration values ​​on feature extraction, laying the foundation for the subsequent construction of a unified feature space.

[0143] B105-2: Cross-modal feature extraction and semantic embedding.

[0144] Based on standardized data, specialized features for each modality are extracted and mapped to a unified semantic space: Text modality: BERT embedding model is used for... Perform semantic encoding to generate text feature vectors ( (for feature dimensions), the vector contains , Semantic information of technical terms; image modalities: through CNNs (such as ResNet) Convolutional operations are performed to extract visual features such as the distribution of contaminated areas and concentration gradients in the image, which are then mapped to image feature vectors through a fully connected layer. Timing Mode: Using LSTM to... Time series modeling is performed to capture the hourly variation trend and peak periods of pollutant concentrations, and the time series feature vector is output. Finally, the feature vector sets of the three modes are obtained. All vector dimensions are unified as This provides a prerequisite for subsequent fusion computing.

[0145] B105-3: Attention-weighted fusion generates global features.

[0146] To highlight the contribution of key modalities to the question-answering task (e.g., when analyzing the correlation between pollution images and concentration, the image and temporal modalities have higher weights), a multi-head attention mechanism is used to calculate the dynamic weights of each modality. The fusion formula is as follows: (10); In the formula, , , The attention weights for text, image, and temporal modalities are respectively, satisfying... The weights are dynamically calculated using standardized data generated by formula (9), with text modality weights. For example, ,in, For text feature query vectors, Given a set of key vectors for all modal features, the importance of each modality is determined by semantic similarity matching; Represents the text feature vector; Represents the image feature vector; Represents the temporal feature vector; Represents the global feature vector; The dimension of the feature vector is represented by formula (10). The global feature vector generated by formula (10) is... It integrates multimodal professional information, which serves as the core input for subsequent question-answering reasoning and feedback optimization.

[0147] B106: Mechanism factor feedback optimization to achieve dynamic iteration of system performance.

[0148] Based on multimodal fusion generation By combining user feedback with the error in question-and-answer results, key mechanism factors affecting system performance (such as modal weights and embedded model parameters) are identified, and dynamic optimization is achieved through reinforcement learning.

[0149] B106-1: Mechanism Factor Identification and Weight Calculation.

[0150] First, define the set of mechanism factors. ( For multimodal fusion weights { , , }, The learning rate for the BERT embedding model. (where is the time window size of the LSTM), the contribution of each factor to the question-answering accuracy is calculated through causal inference, and the factor weight formula is: (11); In the formula, For question and answer accuracy Mechanistic factors The partial derivatives (the larger the derivative, the more significant the effect of the factor). This is a regularization term (to prevent factor overfitting); The weights represent the mechanism factors. These need to be substituted into formula (10) during calculation. For example, analysis When considering the impact of (fusion weights), through The error is backpropagated from the question-and-answer results to solve for the partial derivatives. This ultimately yields the weight set for each factor. Factors with higher weight values ​​have higher priority for subsequent optimization.

[0151] B106-2: Reinforcement Learning Strategy Updates and Parameter Tuning.

[0152] Using improved question-answering accuracy as the reward objective, a reinforcement learning strategy update mechanism is constructed, and the optimized formula is as follows: (12); In the formula, For the mechanism factor parameters to be optimized (e.g.) In , , ), The current parameter value. The updated parameter value; The learning rate; Let the policy objective function be... ( The reward value is calculated based on a combination of question-and-answer accuracy and user feedback ratings. For the objective function with respect to parameters The gradient needs to be substituted into the factor weights generated by formula (11) during calculation. Weight The higher the factor, the greater the gradient update magnitude. Through formula (12), the system can dynamically adjust key factors such as multimodal fusion weights and model parameters to achieve continuous performance iteration.

[0153] B107: Optimized professional prompts to improve the accuracy of professional question answering in large models.

[0154] Based on multimodal global features With the optimized mechanism factor parameters, dynamic prompts are designed for atmospheric environment monitoring scenarios to ensure that the large model accurately understands professional needs.

[0155] Combining user questions, environmental parameters, and professional examples, optimize suggestion words are generated using the following formula: (13); In the formula, Q represents the user's original question; Define the module for the task, and convert Q into explicit instructions such as calculating the AQI index of a certain region; For the context supplement module, E provides environmental parameters (such as monitoring time and region) for the data layer. The global features generated by formula (10) are supplemented with information such as pollutant type and concentration range in the features. concentration Contextual and professional context; This example-guided module provides professional case studies such as AQI calculation examples to help large models align with domain standards. This represents optimized suggestion keywords; Represents environmental parameters; Representative professional case library.

[0156] The effectiveness of prompt words is evaluated using a loss function: (14); in, For large models based on The output result; Standard answers marked by experts; Represents the loss value; This represents the L2 norm.

[0157] If the loss value is too high, the mechanism factor optimized by formula (12) (such as adjusting the text modality weight) can be used. (Enhanced semantic understanding), regeneration and Continue until the accuracy requirements are met.

[0158] B108: The algorithm layer interacts collaboratively with the infrastructure.

[0159] Data transmission: The data layer inputs standardized monitoring data into the algorithm layer, which generates data through formula (9). The output of the algorithm layer and The data is transmitted to the backend and associated with the dialogue node storage; the result is fed back: the large model is based on... The generated question and answer results are pushed to the front end for display via the back end; user feedback (such as accurate results or need for further analysis) is transmitted to the algorithm layer as the input of the reward value of formula (12); parameter synchronization: the optimized mechanism factor parameters of formula (12) are synchronously updated to the multimodal fusion and prompt word generation module to ensure that the optimal parameters are used in subsequent question and answer tasks.

[0160] In summary, this invention innovatively establishes a tree-structure-based dialogue management mechanism. Through dialogue tree structure design, context maintenance, state transition, and traversal algorithms, it achieves intelligent organization and management of multi-turn dialogues, supporting complex interaction scenarios such as retries, favorites, and details. It establishes an asynchronous streaming data processing architecture, achieving real-time question-and-answer experience and dynamic result display through generative models and dynamic optimization strategies, supporting multiple output formats such as voice and images. It realizes intelligent fusion of multimodal data such as text, images, audio, and video, providing comprehensive and accurate data analysis services through multi-head attention mechanisms and feature weighting. It innovatively employs pre-trained embedding models and vectorization technology, achieving precise tool selection and execution through cosine similarity calculation and dynamic weight adjustment, supporting multi-model selection and intelligent routing, significantly improving the system's intelligence level. It innovatively integrates multiple data sources such as database queries, manual input, automatic robot data collection, remote sensing data collection, and atmospheric monitoring equipment data collection, establishing a comprehensive knowledge base system through unified data standardization and vectorization processing. It can interface with meteorological data and pollution source management systems to achieve intelligent analysis of multi-source data and improve decision support capabilities. A mechanism-driven feedback optimization framework is proposed, constructing an interpretable factor weight system based on causal reasoning theory. Combined with reinforcement learning, it achieves dynamic optimization of system strategies. This mechanism endows the system with continuous self-evolution capabilities, enabling it to autonomously optimize decision paths based on interactive feedback and possessing near-expert-level adaptive and reasoning abilities. An efficient training paradigm based on small models and transfer learning is designed, employing regularization and hierarchical fine-tuning strategies to achieve high-performance, lightweight deployment in professional domains. Combining dynamic prompt generation and domain adaptation technologies significantly improves task comprehension accuracy while maintaining low resource consumption, effectively enhancing the model's generalization ability in professional scenarios. A multi-level illusion suppression mechanism is designed, integrating data constraints, structured output, and contextual consistency verification to reduce the uncertainty of generated content. Through task clarity enhancement, example guidance, and real-time evaluation strategies, the reliability and professional relevance of generated results are significantly improved, providing a reliable guarantee for high-precision professional question answering.

[0161] This invention supports the display of complex tables in Markdown format, providing more than six types of statistical charts (line charts, bar charts, pie charts, scatter plots, radar charts, and heatmaps), and features interactive chart functionality. Compared to existing systems, the richness of data display is increased by 200%, and the user experience is significantly improved, making it particularly suitable for multi-dimensional analysis and visualization of environmental monitoring data. Through streaming processing mechanisms and real-time generation models, response time is reduced by 65%, supporting real-time processing of complex data analysis tasks and supporting multiple interaction methods such as voice and images, significantly enhancing the user experience. Through natural language interaction, speech recognition, and intelligent tool selection, the barrier to entry for professional data analysis is lowered, enabling non-professional users to obtain professional-grade data analysis services, increasing user satisfaction by more than 40%. Processing efficiency is significantly improved; through mechanism-driven feedback optimization, small model training, and RAG mechanisms, data processing efficiency is improved by more than 55%, supporting real-time analysis of large-scale data, and increasing system throughput by more than 3 times. Through deep learning-driven multimodal fusion and intelligent tool routing based on embedded models, question-answering accuracy is improved by more than 35%, achieving an accuracy rate of over 95% in data analysis in professional fields such as environmental monitoring. For atmospheric environmental monitoring ( , Optimized training using technologies such as AIQI improves question-answering accuracy by over 40%, outperforming general question-answering systems. It also excels in areas such as specialized terminology recognition and data analysis reasoning. Through unified data standardization and vectorization, it seamlessly integrates multiple data sources, including databases, manual input, robotic data collection, remote sensing devices, and atmospheric monitoring equipment, achieving a data coverage rate of over 99%. Dynamic knowledge graph updates, GNN learning, and reinforcement learning algorithms support continuous accumulation and optimization of domain knowledge, continuously enhancing the system's intelligence and allowing the knowledge base to scale to millions of entries. Multi-model support and intelligent routing mechanisms automatically select the optimal model based on question type, achieving a model matching accuracy rate of over 90% and significantly enhancing system adaptability.

[0162] In summary, this invention surpasses existing technologies in terms of localization, specialization, offline operation, multi-platform integration, interactive experience, and data display. It is particularly suitable for high-end application scenarios such as atmospheric environmental monitoring, environmental decision support, and scientific research analysis, and has significant practical value and promising prospects for promotion.

[0163] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for generating environmental reports based on a large model, characterized in that, The process includes the following: Obtain user reporting requirements, which include configuration information such as report type, monitoring period, target area, key pollutants, and analysis dimensions. Encapsulate the configuration information into structured configuration information. The main intelligent agent receives structured configuration information, verifies the integrity of parameters, generates a unique task ID, parses the report type, data scale and analysis complexity in the structured configuration information to obtain task attributes, including task priority, waiting time and required MCP tool type, and then pre-allocates MCP tool resources according to task attributes. Based on structured configuration information, task attributes, and pre-allocated MCP tool resources, the main intelligent agent decomposes the report generation task into sub-tasks: data cleaning, chart generation, table generation, professional analysis, and format calibration, clarifying the correspondence between each sub-task and the pre-allocated MCP tool resources, as well as the dependencies between sub-tasks. The main agent calculates the collaborative similarity between the sub-agents and each sub-task, as well as the pre-allocated MCP tool resources. It then assigns sub-tasks to the sub-agent cluster based on the collaborative similarity and associates them with task IDs. The sub-agent cluster includes a data governance agent, a statistical chart agent, a form agent, a professional analysis agent, and a format validation agent. Each sub-agent calls the pre-allocated MCP tool resources according to the corresponding relationship, retrieves multi-source data for processing according to the dependency relationship, and temporarily stores the processed data according to the task ID, and synchronously generates professional charts, structured forms and pollution source tracing and trend prediction conclusions. The format validation agent validates the content generated by each sub-agent according to the preset template constraints. The main agent verifies the matching degree between the validated content and the preset template. Once the standard is met, the data is integrated to generate a complete report.

2. The environmental report generation method based on a large model as described in claim 1, characterized in that, Report requirements include customized report requirements and general report requirements; the configuration information for customized report requirements also includes the chapter framework, allowing users to adjust the order of the chapter framework or add special analysis requirements; the configuration information for general report requirements also includes the result receiving method, which includes streaming real-time reception and task progress tracking.

3. The environmental report generation method based on a large model as described in claim 1, characterized in that, The required MCP tools include data computation MCP, image processing MCP, and vectorization Milvus MCP; The main agent determines the pre-allocation order of MCP tool resources, including: ; in, The task priority determined by the main intelligent agent. , and The weight parameters are calibrated by the main intelligent agent through historical tasks; The score represents the pre-assignment order. The normalized value representing the waiting time. represent Tool type, Represents time; The normalized value representing resource demand.

4. The environmental report generation method based on a large model as described in claim 1, characterized in that, The correspondence is as follows: the data cleaning subtask corresponds to the data calculation MCP, the chart generation subtask corresponds to the image processing MCP, the professional analysis subtask corresponds to the vectorization Milvus MCP, and the table generation subtask and the format calibration subtask are not associated with MCP tool resources. The dependency relationship is as follows: after the data cleaning subtask is completed, the chart generation and table generation subtasks are executed synchronously. After the table generation subtask is completed, the professional analysis subtask is executed; after the professional analysis subtask is completed, the format calibration subtask is executed.

5. The environmental report generation method based on a large model as described in claim 1, characterized in that, The main agent is based on the consistency verification score. Task completion time Normalized values, user satisfaction And the efficiency of constructing reward functions using MCP tools ,include: ; In the formula, To improve the efficiency of MCP tool calls, MCP efficiency weights calibrated for the main agent; Represents the consistency score weight; Represents the time weight of the task; This represents the weight of user satisfaction.

6. An environmental report generation system based on a large model, characterized in that, include: The requirement configuration unit is configured to: obtain the user's report requirements, which include configuration information such as report type, monitoring period, target area, key pollutants and analysis dimensions, and encapsulate the configuration information into structured configuration information; The task initialization unit is configured as follows: the main agent receives structured configuration information, verifies the integrity of the parameters, generates a unique task ID, parses the report type, data scale and analysis complexity in the structured configuration information to obtain task attributes, including task priority, waiting time and required MCP tool type, and then pre-allocates MCP tool resources according to the task attributes. The task decomposition unit is configured as follows: Based on structured configuration information, task attributes, and pre-allocated MCP tool resources, the main intelligent agent decomposes the report generation task into sub-tasks such as data cleaning, chart generation, table generation, professional analysis, and format calibration, and clarifies the correspondence between each sub-task and the pre-allocated MCP tool resources, as well as the dependencies between sub-tasks. The intelligent allocation unit is configured as follows: the main agent calculates the collaborative similarity between the sub-agents and each sub-task, and pre-allocated MCP tool resources; the main agent allocates the sub-tasks to the sub-agent cluster according to the collaborative similarity and associates them with the task ID; the sub-agent cluster includes a data governance agent, a statistical chart agent, a form agent, a professional analysis agent, and a format validation agent. The subtask execution unit is configured as follows: each sub-agent calls the pre-allocated MCP tool resources according to the corresponding relationship, retrieves multi-source data for processing according to the dependency relationship, temporarily stores the processed data according to the task ID, and synchronously generates professional charts, structured forms and pollution source tracing and trend prediction conclusions. The report integration unit is configured as follows: the format verification agent verifies the content generated by each sub-agent according to the preset template constraints, the main agent verifies the matching degree between the verified content and the preset template, and after meeting the standards, integrates and generates a complete report.

7. A question-answering and reporting integrated system based on a large model, characterized in that, include: The intelligent report generation module and the intelligent question answering module are configured to perform the process of the environmental report generation method based on a large model as described in any one of claims 1-5. The intelligent question-answering module is configured to execute the following process: Obtain the user's multimodal input data and function configuration information, parse them, and create tree-structured dialogue nodes; Based on the information recorded by the tree-structured dialogue nodes, the corresponding multimodal data is extracted and standardized. The feature vectors of each modality are extracted after standardization, dynamic weights are calculated through semantic similarity matching, and global feature vectors are generated by weighted fusion through a multi-head attention mechanism. Based on the global feature vector identification mechanism, the factor parameters are optimized by reinforcement learning, taking into account the error of the question-and-answer results and user feedback. By combining global feature vectors, environmental parameters associated with tree-structured dialogue nodes, and optimized mechanism factor parameters, professionally optimized prompt words are generated, and question-and-answer results are generated based on these professionally optimized prompt words.

8. The integrated question-answering and reporting system based on a large model as described in claim 7, characterized in that, Multimodal input data includes text-based atmospheric environmental questions, speech-transcribed pollutant-related terms, pollution image data, and pollutant time-series monitoring data. Functional configuration information includes accessing the atmospheric professional knowledge base, enabling deep inference, and enabling online supplementary data.

9. The integrated question-answering and reporting system based on a large model as described in claim 7, characterized in that, The creation rules for tree-structured dialogue nodes are as follows: when a new dialogue is initiated, a root node is generated, which records the input data, function configuration information, and creation time; When a user triggers a retry operation, the original node is located based on the session identifier associated with the tree-structured dialogue node. Child nodes are created with the original node as the parent node, and the input data and new feature configuration information after the retry are recorded synchronously.

10. The integrated question-answering and reporting system based on a large model as described in claim 7, characterized in that, Global feature vectors are generated through weighted fusion using a multi-head attention mechanism. ,include: ; In the formula, , , The attention weights for text, image, and temporal modalities are respectively, satisfying... ; Represents the text feature vector; Represents the image feature vector; Represents the temporal feature vector; This represents the global feature vector.