Professional document automatic generation method, system and platform based on A2A and MCP protocols

By integrating data query, chart generation, and layout processes through a professional document automatic generation method based on A2A and MCP protocols, the problem of generating professional reports is solved, achieving efficient and accurate automated document generation suitable for regular corporate reports.

CN121723988APending Publication Date: 2026-03-24CISDI ENGINEERING CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing AIGC technology has not yet effectively addressed the needs for generating professional and periodic reports, especially in terms of data analysis and format consistency, failing to meet the actual work needs of enterprises.

Method used

It adopts a professional document automatic generation method based on A2A and MCP protocols. By creating a super agent, it uses large model analysis chart templates to obtain data requirements, automatically queries and populates data, performs data analysis and layout, and integrates internal and external data sources with NLP2SQL and MCP protocols to generate structured and professional document content.

Benefits of technology

It enables the efficient generation of professional documents, ensures the real-time nature and accuracy of data, reduces human error, meets the personalized needs of enterprises, and supports the automated generation of regular reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723988A_ABST
    Figure CN121723988A_ABST
Patent Text Reader

Abstract

The invention discloses an A2A and MCP protocol-based professional document automatic generation method, system and platform, and the method comprises the following steps: S1, creating a document generation task, creating a super Agent by using an A2A protocol, and setting a chart template of a document; s2, analyzing the chart template by using a large model, and obtaining a data demand of the document; s3, automatically querying required data according to the data requirement by utilizing a data query Agent, and automatically filling the document with the queried data; s4, automatically analyzing the content of the document filled with the data by using a data analysis Agent, and generating an analysis conclusion; and S5, carrying out automatic typesetting on the format of the document by utilizing a typesetting Agent according to the content characteristics of the document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of AIGC technology, specifically to a method, system, and platform for automatically generating professional documents based on the A2A and MCP protocols. Background Technology

[0002] Generative AI technology is currently experiencing unprecedented growth. With the continuous maturation of the technology and the expansion of application scenarios, large-scale models have moved from the laboratory to a broader market. AIGC (Artificial Intelligence Generated Content) is one of the important forms of large-scale model application, a widely used technology system that automatically generates multimodal content through AI.

[0003] In professional fields such as film and television, design, and scientific research, the writing of documents is frequently required, including periodic reports, professional reports, and formatted documents. Periodic reports typically have specific formats, include professional data analysis, and require uniformity in form, timeliness and accuracy of data, and fixed analytical methods; this is a very labor-intensive and long-term task. Professional reports vary in depth, methodology, key points, and format depending on the specific field. Formatted documents, such as notices, announcements, and requests, have relatively similar content and formats, and there are many excellent templates available for reference, making this a popular area for AIGC (Artificial Intelligence of Content Creation).

[0004] Existing AIGC vendors primarily focus on formatted documents, producing many excellent products. However, there are still no truly feasible AIGC solutions for regular and professional reports involving specific data analysis. In essence, they remain in the laboratory stage and cannot truly meet the needs of enterprise work. Summary of the Invention

[0005] The purpose of this invention is to provide a method, system, and platform for automatically generating professional documents based on the A2A and MCP protocols, in order to solve the problem that there is currently no practical AIGC solution for professional reports.

[0006] To address the aforementioned technical problems, this invention provides a method, system, and platform for automatically generating professional documents based on A2A and MCP protocols, comprising the following steps:

[0007] S1: Create a document generation task, create a super agent using the A2A protocol, and set the chart template for the document;

[0008] S2: Analyze the chart template using a large model to obtain the data requirements of the document;

[0009] S3: Use the data query agent to automatically query the required data according to the data requirements, and automatically populate the document with the queried data;

[0010] S4: Use a data analysis agent to automatically analyze the content of the document with the populated data and generate analysis conclusions;

[0011] S5: The formatting agent automatically formats the document based on its content characteristics.

[0012] Furthermore, setting the chart template includes:

[0013] 1. Generate a document outline based on user-input prompts, determining the document's key points and the specific content of each point, including:

[0014] Input processing: The system receives prompts from the user (such as "Write a market performance analysis report for product A in the second quarter of 2024") and calls the preset content analysis model.

[0015] Structured mapping: Based on pre-configured document type templates (such as "Market Analysis Report Template" and "Project Summary Template"), prompts are automatically deconstructed into core chapters. For example, fixed modules such as "Market Overview," "Sales Data," "Competitor Analysis," and "Problems and Suggestions" are mapped, and the weight and order of each module are determined.

[0016] Key Point Filling and Refinement: After generating the outline, the system will automatically generate 2-4 specific sub-points and their descriptive content for each primary key point based on the built-in knowledge base or associated external data sources. For example, under "Sales Data", the system will automatically suggest sub-items such as "Month-on-Month / Year-on-Year Sales Revenue", "Sales Distribution by Channel", and "Top 3 Growing Regional Markets".

[0017] The key to the above steps is the application of content understanding and structured generation technologies, specifically including a large language model as the core engine to understand user needs and generate high-quality text content. Retrieval Enhancement Generation (RAG) is responsible for retrieving relevant information from a pre-defined knowledge base (such as past reports, product manuals, and industry data) and providing it to the LLM for reference. The prompting engineering and template engine guide the LLM to strictly follow the steps of "analyzing prompts -> generating outlines -> refining key points," ensuring a highly structured and consistent output format.

[0018] 2. Insert a table into the document based on the specific content of the above points, and set table headers to clearly define the meaning of each cell, including:

[0019] Content recognition and table triggering: The system scans the "content points and their specific content" and identifies paragraphs that involve classification, parameter comparison, step description, and data list (for example, it identifies "sales distribution of each channel: online mall accounts for 45%, retail stores account for 30%, and agents account for 25%").

[0020] Table template matching and instantiation: Based on the identified content type, the system automatically matches and calls a preset table template library (such as "percentage distribution table", "parameter comparison table", "timeline table"). The system will extract key data from the text and fill it into the corresponding cells of the table.

[0021] Automatic formatting and labeling: Automatically sets table headers (such as "Sales Channels", "Sales Revenue Percentage", "Year-on-Year Growth") and applies predefined formatting rules (such as color highlighting, data bars) to key cells (such as maximum value, minimum value) or specific columns (such as percentages) to ensure that the meaning is clear at a glance.

[0022] The key steps described above are data extraction, identification, and content insertion. Specifically, this includes a large language model, which serves as the core engine, understanding the table to extract key entities and identifying relationships between them; a rules engine, used to define a series of rules to determine when to trigger table insertion and which table template to select; and reverse engineering of Office parsing techniques to obtain the document structure and locate the coordinates of the table to be inserted.

[0023] 3. Insert charts into the document based on the specific content points, and set the chart type, axis meanings, and legend meanings. Specify the dataset required for the chart, including:

[0024] Intelligent chart type suggestions: Based on the key points of the content and the inserted tabular data, the system will recommend the most suitable chart type. For example, for "Comparison of Growth in Different Regional Markets", a "Bar Chart" is recommended; for "Quarterly Sales Trends", a "Line Chart" is recommended; and for "Cost Structure", a "Pie Chart" is recommended. Users can choose from the recommended list.

[0025] Automatic configuration of axes and legends: After selecting the chart type, the system automatically sets the axis labels (e.g., "Quarterly" for the X-axis and "Sales (Ten Thousand Yuan)" for the Y-axis) based on the dataset, generates legends (e.g., "Product A" and "Product B"), and applies the preset color scheme and font style of the template.

[0026] Data source linking and dynamic updates: The system explicitly identifies the dataset source on which the chart relies (e.g., "Related to: Chapter 3 - Table 2 Quarterly Sales Details"). More importantly, the template supports setting dynamic data links. When the source table data is updated, the chart can be configured to update automatically or with a single click, ensuring data consistency.

[0027] The key to the above steps is intelligent chart generation and data binding technology, which specifically includes: visualization library and API design to build a robust backend service to handle LLM calls, business logic and data management; and designing a clear frontend interface or API to receive user input and return the generated editable documents and interactive charts.

[0028] Further, step S3 includes:

[0029] 1. Employing NLP2SQL technology, the internal database is queried to form the first dataset. Its core technology is building a natural language to SQL translation and execution engine. Specifically, this includes:

[0030] a. Requirement Analysis and Intent Recognition: The system receives a data requirement description (natural language) from a chart template or key content points. First, it uses NLP techniques (such as entity recognition and dependency parsing) to extract key elements: query subject (e.g., "sales amount"), filtering conditions (e.g., "time = Q2 2024", "product = product A", "dimension = region"), aggregation method (e.g., "sum", "average"), and sorting requirements (e.g., "sorted by sales amount in descending order").

[0031] b. Schema Mapping and SQL Generation: Mapping the parsed elements to the metadata (data dictionary) of the internal database. The system needs to have prior knowledge of the database's table structure, field names, and business meanings. For example, mapping "sales revenue" to the revenue field of the sales_fact table, and mapping "region" to the name field of the region dimension table. Subsequently, using an NLP2SQL model (which can be based on a fine-tuned Transformer model or rule + semantic parsing), correctly structured SQL query statements that conform to business logic are generated.

[0032] c. Secure Execution and Data Acquisition: The generated SQL statements are executed in a secure sandbox or read-only copy. Permission checks and query complexity checks can be added before execution. The query results (the first dataset) are converted into a standardized structured data format (such as JSON or DataFrame) and accompanied by metadata (such as the data source table and query time).

[0033] 2. Employing the MCP protocol to access external APIs and create a second dataset. Its core technology is building a scalable intelligent scheduler for external services based on the Model Context Protocol. Specifically, this includes:

[0034] a. Service Registration and Capability Description: The system integrates various external data sources through the MCP server. Each data source (such as Google Analytics API, Weather API, Financial Data API) must provide a standard tool description file that clearly defines its function (e.g., get_weather_by_city), required parameters (e.g., city_name, date), and the format of the returned data.

[0035] b. Requirement matching and tool selection: When data requirements involve external information (such as "get the average temperature in Beijing during the same period" or "query industry market size data"), the system will semantically match the requirement description with the capability descriptions of various tools registered on the MCP server and automatically select the most suitable API tool.

[0036] c. Parameter Assembly and API Call: The system extracts necessary parameters from the data requirement description, assembles the request according to the specifications of the selected tool, and attaches secure authentication credentials (such as API Key, OAuth Token). Subsequently, a standardized call is initiated through the MCP protocol.

[0037] d. Data standardization: Heterogeneous response data from different APIs (second dataset) are parsed, cleaned, and converted into an internally unified data format compatible with the "first dataset" for subsequent correlation analysis and fusion.

[0038] 3. Dataset Fusion and Supply. This mainly includes associating, connecting, or merging the "first dataset" (internal data) and the "second dataset" (external data) based on common keys (such as time, region, product ID) to form a more comprehensive "master dataset." This processed "master dataset" is then officially provided to the "intelligent chart generation" module as the accurate data source for its charts. It may also be used to enrich specific content points in the main body of documents, achieving strict consistency among data, charts, and text.

[0039] Further, step S4 includes:

[0040] 1. A table analysis agent automatically identifies and analyzes table structures and data relationships, forming initial analytical conclusions. Its core technology involves constructing a multimodal intelligent agent specifically designed to parse table structures, understand data semantics, and perform basic analysis. Specifically, this includes:

[0041] a. Table structure parsing and semantic understanding:

[0042] - Structure recognition: The agent parses the tables in the document into structured data (such as Pandas DataFrame), and at the same time recognizes the physical structure of the table (merged cells, multi-level headers, cross-page tables) and logical structure (primary key columns, data columns, summary rows).

[0043] Semantic annotation: Combining the context of the table (title, chapter title, preceding and following text) and cell content, NLP technology is used to annotate each data column with business semantics (such as "time dimension", "geographical location", "KPI indicator", "category label").

[0044] b. Data Relationship Mining and Analysis:

[0045] Basic statistical analysis: Automatically calculates key statistics (sum, mean, median, standard deviation, quantiles) and identifies data distribution characteristics.

[0046] Outlier detection: Statistical methods (such as IQR, Z-score) or algorithms such as Isolation Forest are used to detect outlier data points.

[0047] Correlation analysis: Pearson / Spearman correlation coefficients are calculated for numerical columns to identify strongly or negatively correlated indicator pairs.

[0048] Trend and Pattern Recognition: For time series data, calculate month-on-month, year-on-year, and moving averages to identify upward, downward, or cyclical trends.

[0049] Composition analysis: For categorized data, calculate the proportion and concentration indicators (such as CR3 and Herfindahl index).

[0050] c. Natural language conclusion generation:

[0051] Transforming patterns into language: Utilizing AIGC to convert analysis results into concise, professional natural language descriptions. For example: "The table data shows that product A's sales increased by 15% quarter-on-quarter in the second quarter, but North China saw an unusually low value, contributing only 10% of the total, significantly lower than the average level of other regions (approximately 30%)."

[0052] Highlighting key points: Automatically highlighting the most significant data features (such as maximum value, minimum value, and maximum rate of change) as the key points of the conclusion.

[0053] 2. A chart analysis agent automatically identifies and analyzes chart types and data relationships, generating secondary analytical conclusions. Its core technology involves building an intelligent agent that combines computer vision and data analysis to specifically interpret information from visualized charts. Specifically, this includes:

[0054] a. Chart analysis and data extraction:

[0055] Type recognition and structure parsing: Directly read the chart configuration (type, axes, legend, labels) and the underlying data. For image-formatted charts, a deep learning-based chart recognition model (such as ChartOCR) is used to parse the chart type and extract the data.

[0056] Visual element understanding: Identifying the mapping relationship between the visual codes (color, shape, size, position) of a chart and the data dimensions.

[0057] b. In-depth analysis of visualization patterns:

[0058] Trend analysis: For line charts and area charts, identify long-term trends, seasonal fluctuations, and turning points.

[0059] Comparative analysis: For bar charts and radar charts, analyze the differences in key indicators among different categories.

[0060] Distribution analysis: For histograms and box plots, analyze the central tendency and dispersion, skewness, and kurtosis of the data.

[0061] Association and cluster analysis: For scatter plots and bubble charts, identify the distribution patterns, clustering phenomena, or correlations of data points.

[0062] Proportion and Composition Analysis: For pie charts, donut charts, and stacked bar charts, analyze the main components and their relative importance.

[0063] c. Natural language conclusion generation:

[0064] Key Insight Extraction: Utilizing AIGC (AI-Generated Content) to translate visualizations into business language. For example: "The sales trend chart shows that product A's sales accelerated in Q2, especially breaking historical peaks in June. Meanwhile, product B and product C show a significant negative correlation."

[0065] Multi-chart correlation analysis: If there are multiple related charts in a document, the agent can perform cross-analysis to point out the consistency or inconsistency between the charts.

[0066] 3. Utilize external professional analysis tools to perform professional analysis and generate third-party analytical conclusions through large-scale AIGC models; its core technology is building an analysis coordinator capable of scheduling external professional analysis services, integrating multi-source results, and generating in-depth reports. Specifically, this includes:

[0067] a. Professional analysis task definition and scheduling:

[0068] Requirements Analysis and Tool Matching: Based on data characteristics, user historical preferences, or preset rules, determine the required type of in-depth analysis (e.g., predictive modeling, attribution analysis, user segmentation, etc.). Through the tool invocation mechanism, match and invoke the most suitable external professional tools or services (e.g., Python's Statsmodels and Prophet for prediction; SHAP for feature importance analysis; Tableau Hyper API for advanced data blending).

[0069] Automatic parameter configuration: Based on data characteristics and analysis objectives, it automatically configures appropriate parameters for the selected analysis tools.

[0070] b. Perform advanced analysis and results integration:

[0071] Distributed / Asynchronous Execution: For time-consuming analysis tasks, use asynchronous task queues (such as Celery) or distributed computing frameworks.

[0072] Multi-tool result fusion: Multiple tools may be called in series or in parallel (e.g., clustering is performed first, and then regression analysis is performed on each cluster), and the output results of each tool are integrated into a unified mediation analysis result.

[0073] 4. Insert the first, second, and third analytical conclusions into the predetermined positions within the document. This completes the compilation of the entire article.

[0074] Furthermore, the method also includes the following steps:

[0075] S6: If the document is a single report scenario, then set the recipient information, and then automatically send the document formatted in step S5 to the designated recipient.

[0076] Furthermore, the method also includes the following steps:

[0077] S6: If the document is a periodic report, then set the recipient information, and then automatically send the document formatted in step S5 to the designated recipient, and automatically save the document as a template. At the same time, create a scheduled task so that the system can automatically repeat steps S2-S5 to generate a new document at a predetermined time.

[0078] The key technology lies in the dynamic binding of conclusions to data sources. Specifically, this involves establishing a metadata link between each analytical conclusion and the source data (tables, charts, external queries). When the source data is updated, the system can prompt or automatically trigger the recalculation of related analyses and the updating of conclusions.

[0079] Secondly, the present invention also provides a professional document automatic generation system based on A2A and MCP protocols, comprising:

[0080] The task creation module is used to create document generation tasks, create a super agent using the A2A protocol, and set the chart template for the document;

[0081] The data requirement acquisition module is used to analyze the chart template using a large model to obtain the data requirements of the document;

[0082] The data query module is used to automatically query the required data based on the data requirements using a data query agent, and automatically populate the document with the queried data;

[0083] The data analysis module is used to automatically analyze the content of the document with populated data using a data analysis agent and generate analysis conclusions.

[0084] The automatic formatting module is used to automatically format the document based on its content characteristics using a formatting agent.

[0085] Thirdly, the present invention provides a platform based on the A2A and MCP protocols, comprising:

[0086] A SaaS-based service platform for managing MCP services and A2A services;

[0087] The MCP service management includes building the skills and tools ecosystem needed for Agent development, and placing the API into the platform after supporting the MCP protocol to support developers in developing different Agents;

[0088] The A2A service management includes building a super agent, managing the agent's capabilities, communication and collaboration modes, and forming different AI applications.

[0089] The beneficial effects of this invention are as follows: By integrating the previously fragmented steps of document outline creation, data query, chart generation, content analysis, and formatting into a seamless automated process, the efficiency of professional document generation is greatly improved; through automated data querying and filling, it ensures that the tables, charts, and analysis conclusions in the document are based on the latest and most accurate data, avoiding errors and delays that may be caused by manual operation; by using the A2A protocol to construct a super agent, organizing multi-agent collaboration, and using the MCP protocol to connect external data and external tools, supported by a professional document generation system, it can meet the needs of enterprises to use real-time data and automatically generate professional-level report documents using large models according to their own personalized needs. Attached Figure Description

[0090] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, use the same reference numerals to denote the same or similar parts. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0091] Figure 1 This is a flowchart of one embodiment of the present invention. Detailed Implementation

[0092] like Figure 1 The method for automatically generating professional documents based on the A2A and MCP protocols, as shown, includes the following steps:

[0093] S1: Create a document generation task, create a super agent using the A2A protocol, and set the chart template for the document; the super agent is created using the Agent-2-Agent (A2A) protocol, and coordinates and schedules dedicated agents with different functions to achieve communication and collaboration between different agents;

[0094] S2: Analyze the chart template using a large model to obtain the data requirements of the document;

[0095] S3: Use the data query agent to automatically query the required data according to the data requirements, and automatically populate the document with the queried data;

[0096] S4: Use a data analysis agent to automatically analyze the content of the document with the populated data and generate analysis conclusions;

[0097] S5: The formatting agent automatically formats the document based on its content characteristics.

[0098] This invention integrates the previously fragmented processes of document outline creation, data querying, chart generation, content analysis, and formatting into a seamless automated workflow, greatly improving the efficiency of professional document generation. Through automated data querying and filling, it ensures that tables, charts, and analytical conclusions in the document are based on the latest and most accurate data, avoiding errors and delays that may occur with manual operations. By utilizing the A2A protocol to construct a super agent, organizing multi-agent collaboration, and using the MCP protocol to connect external data and tools, supported by a professional document generation system, it can meet the needs of enterprises to automatically generate professional-quality reports using real-time data and large models according to their own personalized requirements.

[0099] According to one embodiment of this application, setting the chart template includes:

[0100] The document outline is generated based on the prompts entered by the user, which determines the key points of the document and the specific content of each key point. The document outline can be generated with the help of a large model, which means that prompts are entered into the large model to clarify the requirements, and the model is used to generate the document outline and main content. After the user confirms, the outline setting is completed.

[0101] Insert a table into the document based on the specific content of the key points, set the table header, and clarify the meaning of each cell so that the large model can read and obtain instance data;

[0102] Insert a chart into the document based on the specific content of the key points, and set the chart type, the meaning of the axes and the meaning of the legend, and specify the dataset required for the chart;

[0103] In this embodiment, by involving large models in generating document outlines and parsing chart templates, vague and abstract user needs are transformed into specific and structured data requirements, laying a precise foundation for subsequent automatic data queries. Users only need to define the document framework by setting structured elements such as table headers and axes, and the system can automatically fill in the content, lowering the user's barrier to entry and eliminating the need for database query or programming skills.

[0104] According to one embodiment of this application, step S3 includes:

[0105] Using NLP2SQL technology, the system queries and retrieves the required data from the internal database based on the data requirements, forming the first dataset. Utilizing NLP2SQL technology, the system can understand and automatically generate and execute SQL queries based on data requirements (essentially natural language descriptions), enabling non-technical personnel to easily access professional data from the database.

[0106] Using the MCP protocol, the available API interfaces are accessed according to the data requirements to query external data and form a second dataset.

[0107] The large model automatically populates tables and draws charts in the documents based on the first dataset, the second dataset, and the data requirements.

[0108] This embodiment automatically drives chart drawing based on the queried data and preset chart templates, automating the data visualization process and further reducing manual intervention.

[0109] This embodiment combines NLP2SQL (for processing internal structured data) and the MCP protocol (for processing external API data) to achieve comprehensive coverage and unified access to internal and external data sources of an enterprise, solving the problem of diverse sources of professional document data.

[0110] According to one embodiment of this application, step S4 includes:

[0111] The agent uses table analysis to automatically identify and analyze table structure and data relationships, and forms initial analytical conclusions.

[0112] The chart analysis agent automatically identifies and analyzes chart types and data relationships, and forms a second analytical conclusion.

[0113] The system uses the MCP protocol to call external professional analysis tools to perform professional analysis and generates third-party analysis conclusions through the large model AIGC.

[0114] Insert the first, second, and third analytical conclusions into the predetermined positions in the document.

[0115] This embodiment enables the system to perform domain-specific in-depth analysis beyond general large models by pre-setting a dedicated analysis agent for tables and charts, ensuring the professionalism and accuracy of the analysis conclusions. By calling external professional analysis tools through the MCP protocol, it cleverly integrates proven and highly reliable professional analysis capabilities into the AIGC process, making up for the shortcomings of large models in complex calculations and professional modeling. Finally, through the AIGC capabilities of the large model, the potentially non-humanized results (such as numerical values ​​and charts) output by professional tools are summarized and categorized into easily understandable descriptive text, improving the readability of the report.

[0116] According to one embodiment of this application, the method further includes the step of:

[0117] S6: If the document is a single report, then set the recipient information, and then automatically send the document formatted in step S5 to the designated recipient. The report will not be reused.

[0118] According to one embodiment of this application, the method further includes the step of:

[0119] S6: If the document is a periodic report, then the recipient information is set, and the document formatted in step S5 is automatically sent to the designated recipient. The document is also automatically saved as a template, and a scheduled task is created so that the system automatically repeats steps S2-S5 to generate a new document at a predetermined time. This embodiment, by saving templates and creating scheduled tasks, enables the system to automatically and periodically generate new reports, greatly reducing manpower. It is particularly suitable for highly periodic scenarios such as weekly and monthly reports, achieving true "unattended" automation. Furthermore, reports generated periodically using the same template maintain a high degree of consistency in format and structure, facilitating comparative analysis across time periods.

[0120] Secondly, the present invention also provides a professional document automatic generation system based on A2A and MCP protocols, comprising:

[0121] The task creation module is used to create document generation tasks, create a super agent using the A2A protocol, and set the chart template for the document;

[0122] The data requirement acquisition module is used to analyze the chart template using a large model to obtain the data requirements of the document;

[0123] The data query module is used to automatically query the required data based on the data requirements using a data query agent, and automatically populate the document with the queried data;

[0124] The data analysis module is used to automatically analyze the content of the document with populated data using a data analysis agent and generate analysis conclusions.

[0125] The automatic formatting module is used to automatically format the document based on its content characteristics using a formatting agent.

[0126] Thirdly, the present invention provides a platform based on the A2A and MCP protocols, comprising:

[0127] A SaaS-based service platform for managing MCP services and A2A services;

[0128] The MCP service management includes building the skills and tools ecosystem needed for Agent development, and placing the API into the platform after supporting the MCP protocol to support developers in developing different Agents;

[0129] The A2A service management includes building a super agent, managing the agent's capabilities, communication and collaboration modes, and forming different AI applications.

[0130] This embodiment combines the MCP and A2A protocols. The A2A protocol solves the collaboration problem of multiple agents, while the MCP protocol solves the access problem of external data and tools. This builds an intelligent system that can automatically complete the entire process from data to professional and formatted documents, thus truly advancing the application of large models from simple text generation to complex enterprise production fields.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for automatically generating professional documents based on A2A and MCP protocols, characterized in that, Includes the following steps: S1: Create a document generation task, create a super agent using the A2A protocol, and set the chart template for the document; S2: Analyze the chart template using a large model to obtain the data requirements of the document; S3: Use the data query agent to automatically query the required data according to the data requirements, and automatically populate the document with the queried data; S4: Use a data analysis agent to automatically analyze the content of the document with the populated data and generate analysis conclusions; S5: The formatting agent automatically formats the document based on its content characteristics.

2. The method for automatically generating professional documents based on A2A and MCP protocols according to claim 1, characterized in that, Setting the chart template includes: Generate a document outline based on the prompts entered by the user, and determine the key points of the document and the specific content of each key point; Insert a table into the document based on the specific content of the key points, set the table header, and clarify the meaning of each cell; Insert a chart into the document based on the specific content of the key points, and set the chart type, the meaning of the axes and the meaning of the legend, and specify the dataset required for the chart.

3. The method for automatically generating professional documents based on A2A and MCP protocols according to claim 1, characterized in that, Step S3 includes: Using NLP2SQL technology, the required data is queried from the system's internal database according to the data requirements, forming the first dataset; Using the MCP protocol, the available API interfaces are accessed according to the data requirements to query external data and form a second dataset. The large model automatically populates the document with table data and draws charts based on the first dataset, the second dataset, and the data requirements.

4. The method for automatically generating professional documents based on A2A and MCP protocols according to claim 1, characterized in that, Step S4 includes: The agent uses table analysis to automatically identify and analyze table structure and data relationships, and forms initial analytical conclusions. The chart analysis agent automatically identifies and analyzes chart types and data relationships, and forms a second analytical conclusion. Utilize external professional analysis tools to perform professional analysis, and generate third-party analysis conclusions through large-scale AIGC models; Insert the first, second, and third analytical conclusions into the predetermined positions in the document.

5. The method for automatically generating professional documents based on A2A and MCP protocols according to claim 1, characterized in that, The method also includes the following steps: S6: If the document is a single report scenario, then set the recipient information, and then automatically send the document formatted in step S5 to the designated recipient.

6. The method for automatically generating professional documents based on A2A and MCP protocols according to claim 1, characterized in that, The method also includes the following steps: S6: If the document is a periodic report, then set the recipient information, and then automatically send the document formatted in step S5 to the designated recipient, and automatically save the document as a template. At the same time, create a scheduled task so that the system can automatically repeat steps S2-S5 to generate a new document at a predetermined time.

7. A professional document automatic generation system based on A2A and MCP protocols, characterized in that, include: The task creation module is used to create document generation tasks, create a super agent using the A2A protocol, and set the chart template for the document; The data requirement acquisition module is used to analyze the chart template using a large model to obtain the data requirements of the document; The data query module is used to automatically query the required data based on the data requirements using the data query agent, and automatically populate the document with the queried data; The data analysis module is used to automatically analyze the content of the document with populated data using a data analysis agent and generate analysis conclusions. The automatic formatting module is used to automatically format the document based on its content characteristics using a formatting agent.

8. A platform based on A2A and MCP protocols, characterized in that, include: A SaaS-based service platform for managing MCP services and A2A services; The MCP service management includes building the skills and tools ecosystem needed for Agent development, and placing the API into the platform after supporting the MCP protocol to support developers in developing different Agents; The A2A service management includes building a super agent, managing the agent's capabilities, communication and collaboration modes, and forming different AI applications.