Business opportunity report automatic generation method and system based on large language model and storage medium

By breaking down business requirements, building report templates, automatically collecting and analyzing internal and external data, and using a large language model to generate business opportunity reports, the problems of low efficiency and strong subjectivity in existing technologies have been solved, achieving fast and accurate business opportunity report generation.

CN121835633APending Publication Date: 2026-04-10SHANGHAI HAIZHUO YUNZHI TECHNOLOGY SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI HAIZHUO YUNZHI TECHNOLOGY SERVICE CO LTD
Filing Date
2025-12-08
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing technologies, the generation of business opportunity reports relies on manual data collection, organization, and analysis, which is inefficient, prone to omissions, highly subjective, difficult to respond quickly to market dynamics, and has inconsistent report formats.

Method used

By breaking down business requirements, building report templates, automatically collecting internal and external data, using large language models for multi-scenario analysis, generating business opportunity reports, and employing Prompt engineering technology and Dify's modular instruction decomposition, automated data integration and intelligent analysis are achieved.

Benefits of technology

It improves the efficiency of business opportunity report generation, ensures accuracy, reduces the difficulty of analysis, and enables reports to respond quickly to market dynamics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835633A_ABST
    Figure CN121835633A_ABST
Patent Text Reader

Abstract

The invention discloses a business opportunity report automatic generation method and system based on a large language model and a storage medium, and the method comprises the steps: obtaining a plurality of hierarchical business scenes after splitting a business demand, constructing a report template, automatically collecting internal and external data according to the business scenes representing the business demand, and carrying out the preprocessing, thereby achieving the automatic generation of a business opportunity report. The business opportunity report generation method comprises the following steps: preprocessing data, splitting the preprocessed data by adopting a Prompt engineering technology and a Dify-based modular instruction, analyzing a scenarized instruction through a large language model according to a plurality of sub-processes obtained by splitting the instruction to obtain a multi-scene analysis result, and finally, automatically generating a business opportunity report according to a report template and the multi-scene analysis result. The multi-source data is automatically collected for accurate analysis, the business opportunity report is generated, the generation efficiency of the business opportunity report is improved, the accuracy is ensured, the analysis difficulty is reduced, and the business opportunity report can quickly respond to market dynamics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of data processing and natural language processing technology, and in particular to a method, system and storage medium for automatically generating business opportunity reports based on a large language model. Background Technology

[0002] A business opportunity report is a professional analytical document that focuses on the discovery and implementation of business opportunities. It is obtained through systematic analysis of multi-dimensional data such as market, industry, customer base, and competition, in order to accurately identify unmet needs, potential cooperation scenarios, or new profit growth points.

[0003] In existing technologies, the generation of business opportunity reports relies on manual data collection, organization, and analysis. With the development of information technology, the amount of data corresponding to multiple dimensions such as market, industry, customer groups, and competition has surged. The data sources are numerous and scattered, and it is necessary to integrate internal sales systems (such as visit records and contract data) with external public information (such as company profiles and bidding data). Manual collection and organization is inefficient and prone to omissions.

[0004] Meanwhile, manually analyzing data to extract key information such as customer needs and purchasing preferences relies heavily on the analyst's experience and is prone to subjectivity, making it difficult to uncover underlying patterns in the data. In addition, the report structures and formats produced by different business personnel vary greatly, which is not conducive to standardized management and horizontal comparison. Moreover, the entire process of manually collecting, organizing and analyzing data takes several days or even weeks, making it difficult to respond quickly to market dynamics.

[0005] Therefore, there is an urgent need for a business opportunity report generation solution based on automated data integration and intelligent analysis to solve the above problems.

[0006] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0007] The main objective of this application is to provide a method, system, and storage medium for automatically generating business opportunity reports based on a large language model. The method involves breaking down business requirements to obtain multiple hierarchical business scenarios, constructing report templates, automatically collecting and preprocessing internal and external data based on the business scenarios representing the business requirements, and then using Prompt engineering technology and Dify-based modular instructions to break down the preprocessed data. Following the multiple sub-processes obtained from the instruction breakdown, the method uses a large language model to analyze scenario-based instructions to obtain multi-scenario analysis results. Finally, based on the report template and the multi-scenario analysis results, the method automatically generates business opportunity reports. This achieves accurate analysis of multi-source data collection and generates business opportunity reports, improving the efficiency and accuracy of business opportunity report generation while reducing the difficulty of analysis, enabling business opportunity reports to quickly respond to market dynamics.

[0008] To achieve the above objectives, firstly, this application proposes a method for automatically generating business opportunity reports based on a large language model, comprising the following steps:

[0009] Obtain and break down the target business requirements to obtain multiple target business scenarios that are hierarchically divided according to preset analysis dimensions. Based on the target business scenarios, determine the target data source and template format for the target business opportunity report and generate the target business opportunity report template.

[0010] Based on the target data source, collect target data including internal and external data, perform preprocessing on the target data to adapt to the large language model, and obtain preprocessed data;

[0011] By employing Prompt engineering technology and Dify-based modular instruction decomposition, scenario-based instructions adapted to the large language model are generated based on the target business scenario and preprocessed data. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results.

[0012] Input the multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

[0013] In one embodiment, a method for obtaining and breaking down target business requirements to obtain multiple target business scenarios hierarchically divided according to preset analysis dimensions includes:

[0014] Obtain the target business requirements and acquire multiple corresponding preset business scenarios;

[0015] By employing business scenario modeling technology, the triggering conditions corresponding to each preset business scenario are obtained and bound to the preset business scenario;

[0016] Using a dimensional hierarchical approach, each preset business scenario is broken down into a target business scenario with a three-tiered structure including core elements, sub-elements, and data fields, according to preset analysis dimensions.

[0017] In one embodiment, a method for generating a target business opportunity report template by determining the target data source and template format based on the target business scenario includes:

[0018] Obtain the preset analysis dimensions in the target business scenario and determine the template hierarchy structure of the template format;

[0019] A template markup language is used to configure a fixed layout in a template format for each target business scenario;

[0020] The output format constraint engine is used to determine the output format constraints of the template format.

[0021] Using data source mapping technology, a first association table is established between the template data fields and the target data source.

[0022] In one embodiment, a method for collecting target data, including internal and external data, based on a target data source includes:

[0023] Based on the relationship table, a data collection list is generated, which is used to characterize the relationship between each data field and the target data source type, collection method and collection frequency.

[0024] Configure trigger conditions for the data collection list according to the preset event-driven triggering mechanism;

[0025] Based on the data collection list and triggering conditions, collect target data, including internal and external data, from the target data source.

[0026] In one embodiment, a method for preprocessing target data to adapt to a large language model to obtain preprocessed data includes:

[0027] A rule engine is used to preprocess the structured data in the target data, including data deduplication, data completion, and unified formatting.

[0028] NLP text preprocessing techniques are used to preprocess unstructured data in the target data, including entity recognition and semantic normalization.

[0029] Preprocessed structured and unstructured data are used as preprocessed data.

[0030] In one embodiment, the method for preprocessing the target data to adapt to a large language model to obtain preprocessed data further includes:

[0031] By employing entity linking technology, related internal and external data are integrated to form a unified data archive;

[0032] A data lake storage architecture is adopted, which stores target data and preprocessed data in layers. Target data is stored in the raw layer of the data lake, preprocessed structured data is stored in the standard layer of the data lake, and preprocessed unstructured data is stored in the analysis layer of the data lake.

[0033] In one embodiment, a method for generating scenario-based instructions adapted to a large language model, using Prompt engineering techniques and Dify-based modular instruction decomposition, includes:

[0034] Using Prompt engineering technology, an instruction template is built for each target business scenario. The instruction template includes role positioning, task description, input data placeholders, and output format constraints.

[0035] Based on the preset scenario complexity assessment rules, the target business scenario is assessed, and the complexity assessment result is used as the target business scenario of the complex scenario to be broken down into atomic instructions and orchestrated by the Dify engine for Agent process.

[0036] A second association table is established between preprocessed data fields and input data placeholders using data variable mapping technology;

[0037] Based on the second association table, preprocessed data is filled into the instruction template to obtain scenario-based instructions adapted to the large language model.

[0038] In one embodiment, a method for inputting scenario-based instructions into a large language model and analyzing it according to multiple sub-processes obtained by splitting the instructions to obtain multi-scenario analysis results includes:

[0039] Obtain the main process Agent and sub-process Agent created by Dify, and assign sub-tasks to each sub-process Agent based on the main process Agent;

[0040] The sub-tasks assigned to each sub-process Agent are executed in parallel to obtain the analysis results of multiple sub-tasks;

[0041] Based on the main process Agent, the analysis results of multiple sub-tasks are summarized to obtain multi-scenario analysis results.

[0042] To achieve the above objectives, secondly, this application also proposes an automatic business opportunity report generation system based on a large language model, comprising:

[0043] The report requirements definition and template preset module is used to obtain and break down the target business requirements, obtain multiple target business scenarios hierarchically divided according to preset analysis dimensions, determine the target data source and template format of the target business opportunity report based on the target business scenario, and generate the target business opportunity report template.

[0044] The multi-source data acquisition and preprocessing module is used to acquire target data, including internal and external data, based on the target data source, and to perform preprocessing on the target data to adapt to the large language model to obtain preprocessed data.

[0045] The scenario-based instruction set construction and analysis module is used to generate scenario-based instructions adapted to the large language model based on the target business scenario and preprocessed data, using Prompt engineering technology and Dify-based modular instruction decomposition. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results.

[0046] The target business opportunity report generation module is used to input multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

[0047] Thirdly, this application also proposes a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the automatic generation method for business opportunity reports based on a large language model as described in any of the first aspects.

[0048] This application provides a method for automatically generating business opportunity reports based on a large language model. By breaking down business requirements, a report template is constructed based on the obtained business scenarios. Internal and external data are automatically collected according to business requirements. When using the large model for analysis, multi-scenario analysis is performed according to business scenarios and processed in sub-processes to avoid the source data volume exceeding the large model token limit. Finally, the obtained multi-scenario analysis results are filled into the report template to quickly generate a business opportunity report that meets the current business requirements. This realizes an intelligent process of automatic data collection, automatic analysis, and automatic report generation, solving the technical problems in existing technologies where enterprise business opportunity report generation relies on manual data collection, sorting, and analysis, resulting in low data collection efficiency and easy omissions, highly subjective and inaccurate data analysis, inconsistent report formats, and excessively long overall process time. Attached Figure Description

[0049] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a flowchart illustrating an embodiment of the business opportunity report automatic generation method based on a large language model in this application;

[0052] Figure 2 This is a flowchart illustrating yet another embodiment of the business opportunity report automatic generation method based on a large language model in this application;

[0053] Figure 3 This is a schematic diagram of the structure of an embodiment of the business opportunity report automatic generation system based on a large language model in this application;

[0054] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0055] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0056] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0057] This application provides a method for automatically generating business opportunity reports based on a large language model, referring to... Figure 1 This includes the following steps:

[0058] Obtain and break down the target business requirements to obtain multiple target business scenarios that are hierarchically divided according to preset analysis dimensions. Based on the target business scenarios, determine the target data source and template format for the target business opportunity report and generate the target business opportunity report template.

[0059] Based on the target data source, collect target data including internal and external data, perform preprocessing on the target data to adapt to the large language model, and obtain preprocessed data;

[0060] By employing Prompt engineering technology and Dify-based modular instruction decomposition, scenario-based instructions adapted to the large language model are generated based on the target business scenario and preprocessed data. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results.

[0061] Input the multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

[0062] Specifically, the target business needs can be identified by working with the business opportunity department (marketing department, sales department), determining the specific type of report to be generated, the specific related content, and the specific business scenarios, etc., and then the target business needs can be broken down. In one optional implementation, the business scenarios included in the target business needs include business opportunity customer company overview, analysis based on specified business opportunities and customers, analysis of business opportunity customer signed projects, analysis of customer purchasing and bidding behavior, and integrated data to automatically analyze potential cooperation opportunities and suggestions. In subsequent implementations, these five preset business scenarios will also be adopted and further divided into target business scenarios.

[0063] A modular component library can be preset for the target business opportunity report template, with a variety of reusable modular components that can be dragged and dropped into the template;

[0064] After configuring the business opportunity report template, template version control technologies can be used, such as Git-based branch management and an online review workflow engine that supports multi-role approval and version comparison, for template review and version management. For example, after the template is configured, it is submitted to the review process (Marketing Department Head → Legal Department → System Administrator). After the review is approved, it is marked as "effective version". The system automatically records the template's creation time, modification history, and review comments, and supports historical version backtracking (such as the difference comparison between "V1.0" and "V2.0"). When subsequent business requirements change, iterative updates can be based on the old version.

[0065] By automating the acquisition of internal and external business opportunity data, and through preprocessing such as data cleaning and standardization, we can provide high-quality data sources that match the target business needs for subsequent analysis.

[0066] By employing multiple sub-processes for analysis, this invention avoids situations where the amount of source data exceeds the large model token limit due to multiple data sources and large data source scales in the report requirements, thereby obtaining a target business opportunity report in the specified format and requirements.

[0067] In one specific implementation, such as Figure 2 As shown, the method for automatically generating business opportunity reports based on a large language model includes the following steps:

[0068] Step S1: Obtain the target business requirements and break them down to obtain multiple target business scenarios that are hierarchically divided according to preset analysis dimensions;

[0069] Step S2: Based on the target business scenario, determine the target data source and template format for the target business opportunity report, and generate the target business opportunity report template;

[0070] Step S3: Collect target data, including internal and external data, based on the target data source;

[0071] Step S4: Preprocess the target data to adapt to the large language model to obtain preprocessed data;

[0072] Step S5: Using Prompt engineering technology and Dify-based modular instruction decomposition, generate scenario-based instructions adapted to the large language model based on the target business scenario and preprocessed data.

[0073] Step S6: Input the scenario-based instructions into the large language model, analyze the multiple sub-processes obtained by splitting the instructions, and obtain multi-scenario analysis results;

[0074] Step S7: Input the multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs;

[0075] In one optional implementation, step S1 specifically includes:

[0076] Step S101: Obtain the target business requirements and the corresponding multiple preset business scenarios;

[0077] Step S102: Using business scenario modeling technology, obtain the trigger conditions corresponding to each preset business scenario and bind them to the preset business scenario;

[0078] Step S103: Using the dimensional layering method, each preset business scenario is divided into a target business scenario with a three-level structure including core elements, sub-elements and data fields according to the preset analysis dimensions.

[0079] Specifically, this implementation includes five preset business scenarios: business opportunity customer enterprise overview (Scenario 1), analysis based on specified business opportunities and customers (Scenario 2), analysis of signed projects of business opportunity customers (Scenario 3), analysis of customer procurement and bidding behavior (Scenario 4), and integrated data to automatically analyze potential cooperation opportunities (Scenario 5). The business scenario modeling technology is based on UML use case diagrams to sort out core scenarios, combined with a three-level dimensional layering method of core elements, sub-elements and data fields, which can ensure comprehensive coverage of requirements.

[0080] The triggering conditions for each scenario are clearly defined by the use case diagram. For example, when it is necessary to assess the cooperation potential of new customers, scenarios 1 and 4 are triggered.

[0081] When performing layering, each scenario is broken down into dimensions, such as core elements ("customer company overview") → sub-elements ("basic information", "business needs", etc.) → data fields ("customer name", "group to which it belongs", "keywords of need", etc.), and the business meaning of each field is marked, for example, key words of need: product / service needs explicitly mentioned by the customer extracted from the visit records.

[0082] In one optional implementation, step S2 specifically includes:

[0083] Step S201: Obtain the preset analysis dimensions in the target business scenario and determine the template hierarchy structure of the template format;

[0084] Step S202: Use template markup language to configure a fixed layout in template format for each target business scenario;

[0085] Step S203: Use the output format constraint engine to determine the output format constraints of the template format;

[0086] Step S204: Using data source mapping technology, establish the first association table between the template data fields and the target data source;

[0087] Specifically, a modular component library is used in conjunction with custom XML tags or a template markup language based on Jinja2 template syntax to achieve flexible combination and maintenance of templates. The modular component library is obtained by encapsulating recurring report elements into reusable components.

[0088] Based on the above analytical dimensions, the report template is designed with a hierarchical structure, such as "Cover → Table of Contents → Scenario 1 → Scenario 2 → Summary → Appendix". A fixed layout is configured for each scenario module, such as "Title + Body + Charts". The body section uses template markup language to reserve data fill spaces. Establish a modular component library, including reusable components such as "report header" (company logo, generation time), "data source statement" (internal and external data identifiers), and "chart container" (preset bar chart / table styles), which can be dragged and dropped into the template;

[0089] By employing data source mapping technology and an output format constraint engine, data source binding and output format constraints are achieved. The output format constraint engine obtains the rules for field format, length, type, etc., through JSON Schema. Specifically, it binds each data field in the template to a specific data source. For example, for internal data, customer_name is bound to the client_fullname field of the CRM system; for external data, parent_group is bound to the parent_company field of the enterprise query website API; and for model-generated data, demand_preference is bound to the analysis results of the large language model. The output rules are defined through the format constraint engine. For example, for text fields such as business_scope, the word count is limited to ≤300 characters; for date fields such as purchase_date, the unified format is "YYYY-MM"; and for list-type outputs such as supplier_list, they are required to be sorted in descending order by the number of collaborations.

[0090] The template version control technology and online review workflow engine mentioned above are used for template review and version management, which will not be elaborated further.

[0091] In one optional implementation, step S3 specifically includes:

[0092] Step S301: Generate a data collection list based on the relationship table. The data collection list is used to characterize the relationship between each data field and the target data source type, collection method and collection frequency.

[0093] Step S302: Configure trigger conditions for the data collection list according to the preset event-driven triggering mechanism;

[0094] Step S303: Collect target data, including internal and external data, from the target data source according to the data collection list and triggering conditions;

[0095] Specifically, the data collection scope and triggering mechanism are defined first. A first association table is used, combined with a user operation or scheduled task-driven event-driven triggering mechanism. Based on the template data fields in the first association table, a "data collection list" is generated, specifying the data source type (internal system / external platform), acquisition method (API / web crawler), and update frequency (real-time / daily / weekly) for each field. Then, the triggering conditions are configured. For example, when the user enters the target customer identifier (customer name / ID, etc.), immediate collection is triggered. The system automatically triggers incremental updates of existing customer data every day at midnight (only collecting newly added or changed data).

[0096] Then, automated collection and execution of internal and external data are carried out. For internal data, the company's CRM system interface can be called through the API gateway to obtain customer visit records (including time, participants, and record text). Alternatively, the CDC tool can be used to monitor the contract data table of the ERP system to capture newly signed projects (amount, time, and service nodes) in real time. For external data collection, the API of the enterprise query webpage can be called to obtain the enterprise's business information (group affiliation, business scope, and registered address). Alternatively, an intelligent crawler can be launched to crawl the bidding announcement pages of "customer companies" on the government procurement website and public resource trading center to extract information such as procurement products, suppliers, bidding methods, and time.

[0097] In one optional implementation, step S4 specifically includes:

[0098] Step S401: Use a rule engine to preprocess the structured data in the target data, including data deduplication, data completion, and unified format.

[0099] Step S402: Use NLP text preprocessing technology to preprocess the unstructured data in the target data, including entity recognition and semantic normalization.

[0100] Step S403: Use the preprocessed structured data and unstructured data as preprocessed data;

[0101] Specifically, structured data cleaning includes data deduplication, such as deleting duplicate bidding records (e.g., different announcements for the same project); data completion, such as deriving the missing "procurement time" field based on the announcement release time (e.g., "Announcement time 2023-03-15" → procurement time marked as "2023 Q1"); format standardization, converting dates to "YYYY-MM-DD" and standardizing the monetary unit to "ten thousand yuan"; unstructured text processing includes entity recognition, such as extracting keywords (e.g., "cloud server expansion" "Q1 budget"), time ("2023-11-05"), and person ("technical director") from visit records; and semantic normalization. For example, unifying "cloud server" and "cloud host" into "cloud server", and unifying "sufficient budget" and "funds in place" into "budget status: sufficient".

[0102] Furthermore, step S4 also includes:

[0103] Step S404: Using entity linking technology, the associated internal and external data are merged to form a unified data archive;

[0104] Step S405: Adopt a data lake storage architecture and store target data and preprocessed data in layers. Target data is stored in the raw layer of the data lake, preprocessed structured data is stored in the standard layer of the data lake, and preprocessed unstructured data is stored in the analysis layer of the data lake.

[0105] Specifically, cross-source data association is achieved based on customer company name and organization code to realize entity linking. The "customer company identifier" (such as the unified social credit code of Company D) is used as the association key to integrate internal data (visit records, contract data) with external data (enterprise information, bidding records) to form a unified customer data archive. The raw data is stored in the raw layer of the data lake for traceability, the cleaned structured data is stored in the standard layer, such as a MySQL database, and the unstructured text processing results are stored in the analysis layer.

[0106] In one optional implementation, step S5 specifically includes:

[0107] Step S501: Using Prompt engineering technology, construct an instruction template for each target business scenario. The instruction template includes role positioning, task description, input data placeholders, and output format constraints.

[0108] Step S502: According to the preset scenario complexity assessment rules, the target business scenario is assessed, and the complexity assessment result is used as the target business scenario of the complex scenario to be broken down into atomic instructions and the Agent process orchestrated through the Dify engine.

[0109] Step S503: Using data variable mapping technology, establish a second association table between preprocessed data fields and input data placeholders;

[0110] Step S504: According to the second association table, fill the preprocessed data into the instruction template to obtain the scenario-based instructions adapted to the large language model;

[0111] Specifically, Prompt engineering technology refers to building an instruction framework based on domain knowledge. Modular instruction decomposition based on Dify refers to breaking down complex analysis tasks into atomic instructions and orchestrating the report generation agent process through the Dify platform. For scenarios 1 to 5 above, instruction templates are designed, including: role positioning (e.g., "You are a business opportunity analyst and need to generate professional analysis based on data"); task description (e.g., "Analyze the high-frequency direction and cyclical patterns of customer purchasing behavior"); input data placeholders (e.g., {{purchase_records}} corresponding to preprocessed purchase records); and output format constraints (e.g., bullet points, word limits, and required keywords).

[0112] For complex scenarios (such as scenario 5 "potential cooperation opportunity suggestions"), they are broken down into atomic instructions and the Agent process is orchestrated through the Dify engine (first analyze customer needs → then match enterprise advantages → finally generate suggestions) to ensure that the model understands them without ambiguity.

[0113] Data variable mapping technology can also be combined with instruction adaptive adjustment algorithm, that is, combined with dynamic adjustment of instruction detail according to data volume to achieve dynamic parameter filling and instruction optimization.

[0114] The variable mapping table, also known as the second association table, automatically fills the placeholders in the instruction template with preprocessed customer data (such as purchase records and visit keywords) to generate the initial instruction. If the data volume is too large (such as more than 10 purchase records), the algorithm automatically simplifies the input data (only retaining high-frequency purchase records from the past 3 years) and adds the constraint "prioritize analyzing data from the past 3 years" to the instruction. If the data is missing (such as no bidding records), the instruction automatically adds "if the data is insufficient, it means 'no publicly available purchase records'".

[0115] In one optional implementation, step S6 specifically includes:

[0116] Step S601: Obtain the main process Agent and sub-process Agent created by Dify, and assign sub-tasks to each sub-process Agent according to the main process Agent;

[0117] Step S602: Execute the sub-tasks assigned to each sub-process Agent in parallel to obtain the analysis results of multiple sub-tasks;

[0118] Step S603: Based on the main process Agent, summarize the analysis results of multiple sub-tasks to obtain multi-scenario analysis results;

[0119] Specifically, this implementation method is designed for situations where "multiple monthly reports are integrated and analyzed to form quarterly or annual large-cycle reports" or "a report has a particularly large amount of data from multiple sources, a particularly large data source scale, and the amount of input source data exceeds the large model token limit." It adopts the approach of breaking down large-scale data sources or large-cycle statistical report requirements into multiple models and distributed processing sub-processes. Finally, the data extracted by the sub-processes (concentrated in terms of token scale) is delivered to the next level of convergence processing process. Based on the characteristic of dify to synchronously call multiple parameter-scale models in a single scenario process, it supports horizontal expansion of sub-processes at the same level and vertical extension of data processing, delivery, and convergence processes.

[0120] When executing step S6, firstly, the task can be broken down based on data dimensions and / or task dimensions. Pre-defined breakdown rules are used. Breaking down by data dimensions means breaking down by time, by business module, by data source, etc. For example, the annual report can be broken down into 12 monthly sub-tasks by time, and by data source into sub-tasks such as "internal CRM data", "external bidding data" and "business website business data" by data source. Customer procurement analysis can be broken down into three sub-tasks: "hardware procurement", "service procurement" and "software procurement" by business module. Breaking down by task dimensions means breaking down by analysis logic. For example, scenario 5 "potential cooperation opportunities" can be broken down into three sub-tasks: "demand extraction", "advantage matching" and "suggestion generation".

[0121] Secondly, based on Dify orchestration of main and sub-processes, the main process agent can be "initiate splitting → allocate sub-tasks → summarize sub-results → generate final report". After receiving a large-scale data source, the data is automatically split and allocated according to the process. For sub-process agents, each sub-task can correspond to one dedicated agent, and each agent can be configured with independent instruction templates and large model parameters. Then, through Dify's parallel node configuration, multiple sub-process agents can run simultaneously.

[0122] Then, data processing and information extraction are performed by the sub-process Agents to condense the tokens and avoid duplication. Specifically, for each sub-process Agent, only the allocated local data is processed, including completing the analysis according to the instruction template of the corresponding scenario, and outputting only the key conclusions and core data without outputting the complete analysis text, thereby condensing the tokens. The output of each sub-process Agent can be unified into structured data so that the main process Agent can directly read it and obtain multiple structured data, i.e., multiple sub-task analysis results.

[0123] Finally, after the main process agent receives the structured data output from all the sub-process agents, it reorganizes the data according to the dimensions of the sub-process agents to obtain multi-scenario analysis results.

[0124] Of course, if the amount of data is small and there are few data sources, you can analyze it directly without splitting it.

[0125] Further optional, in step S6, the context association analysis technology of the pre-trained large language model integration API can be invoked, such as calling the Qwen / DS model through the interface and using the model's long text understanding ability to associate multi-source data;

[0126] The optimized instructions are submitted to the large language model via API, and parameters are set (such as a sampling temperature coefficient of 0.3 to ensure output stability; a maximum number of tokens of 500 to adapt to the large model with the corresponding parameter scale and avoid token over-limit). The model performs multi-dimensional analysis based on the instructions, performs statistical summarization on structured data (such as purchase frequency) (such as "6 times / 3 years → 2 times per year"), performs semantic reasoning on unstructured text (such as visit records) (such as "mention that Q1 budget is sufficient → the purchase window may be in Q1"), and correlates internal and external data (such as combining "business scope is financial informatization" with "purchase network security equipment" to infer that "the demand is related to financial data security compliance").

[0127] To ensure the accuracy of the analysis results, validation and format correction are also performed. Specifically, this involves output format validation technology based on JSON Schema to verify the result structure, and semantic consistency checks by comparing the matching degree between the results and the data using text similarity algorithms. For example, for format validation, it checks whether the model output conforms to the format requirements in the instructions (such as whether it uses bullet points or contains keywords). If it does not conform (such as omitting the analysis of "suppliers"), a supplementary instruction ("Please supplement the analysis of major cooperating suppliers") is automatically generated and the model is called again. For semantic validation, it compares the consistency between the results and the input data using text similarity algorithms (such as cosine similarity). For example, if the data shows "an average of 2 purchases per year" but the result is mistakenly written as "3 times", it is considered inconsistent, and correction is triggered when there is inconsistency.

[0128] After obtaining the analysis results in step S6, in step S7 the multi-scenario analysis results will be aggregated according to the preset template, converted into a standardized report format, and supported for manual adjustment, including content aggregation and module assembly, dynamic content enhancement and visualization processing, format conversion and multi-version output, as well as manual interactive editing and version synchronization.

[0129] In one alternative implementation, content aggregation and module assembly refers to using template engine rendering technology such as Jinja2 data embedding page processing technology, combined with front-end module dependency resolution technology based on directed graph to sort out the sequential relationship between modules. For example, the report engine reads the preset target business opportunity report template structure in step S1, parses the arrangement order of each scenario module (such as "customer overview → business opportunity analysis → purchasing behavior → potential opportunities"), and fills the corresponding placeholders of each scenario analysis result (such as scene1_result, scene2_result) generated in step S6 into the template through the template engine, automatically splicing them into a complete report text. For modules with dependencies (such as "potential cooperation opportunities" depending on "customer needs" and "company advantages" analysis), dependency resolution ensures that the content of the preceding modules is loaded before assembling the subsequent modules.

[0130] Dynamic content enhancement and visualization processing refers to the use of data visualization automatic generation technology based on the Matplotlib / ECharts data dashboard front-end framework, combined with dynamic table of contents generation based on the automatic generation of table of contents index according to the title hierarchy. For modules containing quantitative data (such as "Purchase Frequency" and "Contract Amount"), the visualization library is automatically called to generate charts, such as matching bar charts (X-axis: month, Y-axis: number of times) for purchase frequency data and matching line charts (X-axis: year, Y-axis: amount) for contract amount data. All hierarchical titles in the report are extracted (such as "2. Business Opportunity Analysis" and "2.1 Maintenance Intensity"), and a table of contents with page numbers is generated hierarchically with support for click-to-jump. Standardized elements are automatically added, such as headers (company logo + report name), footers (generation time + data source statement), page numbers, etc.

[0131] Format conversion and multi-version output refers to the use of ReportLab / python-docx-based cross-format conversion technology to convert HTML to PDF / Word, combined with format consistency verification technology to ensure consistency in layout, font, and chart placement across different formats. For example, the aggregated HTML intermediate file can be converted to a preset output format. The ReportLab library can be used to generate a PDF version (supporting encryption and watermarking), and the python-docx library can be used to generate a Word version (retaining editable fields, such as the suggestion section). The format consistency of the converted file is verified, such as whether the font format meets the requirements of SimSun 5 for the body text and Heiti 4 for the title, whether the paragraph spacing meets the requirement of 1.5 line spacing, and whether the chart embedding position meets the requirement of alignment with the body text. If there is any inconsistency, it will be automatically adjusted.

[0132] Human-interactive editing and version synchronization refers to the use of TinyMCE-based online rich text editing technology, combined with content synchronization technology, to update the modified content of multi-format files in real time. For example, the system provides an online editing interface where users can directly modify the text content in the report (such as adjusting the wording of suggestions) and the style of charts (such as changing the color of bar charts). After editing, the system automatically synchronizes the modified content to all output formats (such as updating the PDF version in real time after modifying suggestions in Word), and records the modification history (modifier, time, content). It supports the "save as new version" function, retains historical editing records, and allows for retrospective comparison of differences between different versions.

[0133] By employing the above-described implementation methods, this invention breaks down data silos by automatically collecting and integrating internal business opportunity data with publicly available external information.

[0134] By leveraging large language models to conduct in-depth analysis of multi-source data, key insights such as customer needs and purchasing patterns can be extracted.

[0135] Structured reports are generated based on preset templates, supporting customized output for multiple scenarios (customer profile, business opportunity analysis, signed project evaluation, etc.);

[0136] Automated data collection and report generation significantly shortens the report generation cycle and improves market response efficiency.

[0137] This application also provides an automatic business opportunity report generation system based on a large language model, referring to... Figure 3 ,include:

[0138] The report requirements definition and template preset module is used to obtain and break down the target business requirements, obtain multiple target business scenarios hierarchically divided according to preset analysis dimensions, determine the target data source and template format of the target business opportunity report based on the target business scenario, and generate the target business opportunity report template.

[0139] The multi-source data acquisition and preprocessing module is used to acquire target data, including internal and external data, based on the target data source, and to perform preprocessing on the target data to adapt to the large language model to obtain preprocessed data.

[0140] The scenario-based instruction set construction and analysis module is used to generate scenario-based instructions adapted to the large language model based on the target business scenario and preprocessed data, using Prompt engineering technology and Dify-based modular instruction decomposition. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results.

[0141] The target business opportunity report generation module is used to input multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

[0142] This application also provides a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the business opportunity report automatic generation method based on a large language model as described in any of the above embodiments.

[0143] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for automatically generating business opportunity reports based on a large language model, characterized in that, Includes the following steps: Obtain and break down the target business requirements to obtain multiple target business scenarios that are hierarchically divided according to preset analysis dimensions. Based on the target business scenarios, determine the target data source and template format for the target business opportunity report and generate the target business opportunity report template. Based on the target data source, collect target data including internal and external data, perform preprocessing on the target data to adapt to the large language model, and obtain preprocessed data; By employing Prompt engineering technology and Dify-based modular instruction decomposition, scenario-based instructions adapted to the large language model are generated based on the target business scenario and preprocessed data. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results. Input the multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

2. The method for automatically generating business opportunity reports based on a large language model as described in claim 1, characterized in that, The method involves acquiring and breaking down target business requirements to obtain multiple target business scenarios hierarchically divided according to preset analysis dimensions, including: Obtain the target business requirements and acquire multiple corresponding preset business scenarios; By employing business scenario modeling technology, the triggering conditions corresponding to each preset business scenario are obtained and bound to the preset business scenario; Using a dimensional hierarchical approach, each preset business scenario is broken down into a target business scenario with a three-tiered structure including core elements, sub-elements, and data fields, according to preset analysis dimensions.

3. The method for automatically generating business opportunity reports based on a large language model as described in claim 2, characterized in that, Based on the target business scenario, determine the target data source and template format for the target opportunity report, and generate the target opportunity report template, including: Obtain the preset analysis dimensions in the target business scenario and determine the template hierarchy structure of the template format; A template markup language is used to configure a fixed layout in a template format for each target business scenario; The output format constraint engine is used to determine the output format constraints of the template format. Using data source mapping technology, a first association table is established between the template data fields and the target data source.

4. The method for automatically generating business opportunity reports based on a large language model as described in claim 3, characterized in that, Methods for collecting target data, including internal and external data, based on the target data source include: Based on the relationship table, a data collection list is generated, which is used to characterize the relationship between each data field and the target data source type, collection method and collection frequency. Configure trigger conditions for the data collection list according to the preset event-driven triggering mechanism; Based on the data collection list and triggering conditions, collect target data, including internal and external data, from the target data source.

5. The method for automatically generating business opportunity reports based on a large language model as described in claim 1, characterized in that, Methods for preprocessing target data to fit a large language model and obtaining preprocessed data include: A rule engine is used to preprocess the structured data in the target data, including data deduplication, data completion, and unified formatting. NLP text preprocessing techniques are used to preprocess unstructured data in the target data, including entity recognition and semantic normalization. Preprocessed structured and unstructured data are used as preprocessed data.

6. The method for automatically generating business opportunity reports based on a large language model as described in claim 2, characterized in that, Methods for preprocessing target data to fit a large language model and obtaining preprocessed data also include: By employing entity linking technology, related internal and external data are integrated to form a unified data archive; A data lake storage architecture is adopted, which stores target data and preprocessed data in layers. Target data is stored in the raw layer of the data lake, preprocessed structured data is stored in the standard layer of the data lake, and preprocessed unstructured data is stored in the analysis layer of the data lake.

7. The method for automatically generating business opportunity reports based on a large language model as described in claim 3, characterized in that, This paper describes a method for generating scenario-based instructions adapted to a large language model, using Prompt engineering techniques and Dify-based modular instruction decomposition, based on the target business scenario and preprocessed data. The method includes: Using Prompt engineering technology, an instruction template is built for each target business scenario. The instruction template includes role positioning, task description, input data placeholders, and output format constraints. Based on the preset scenario complexity assessment rules, the target business scenario is assessed, and the complexity assessment result is used as the target business scenario of the complex scenario to be broken down into atomic instructions and orchestrated by the Dify engine for Agent process. A second association table is established between preprocessed data fields and input data placeholders using data variable mapping technology; Based on the second association table, preprocessed data is filled into the instruction template to obtain scenario-based instructions adapted to the large language model.

8. The method for automatically generating business opportunity reports based on a large language model as described in claim 7, characterized in that, Methods for inputting contextualized instructions into a large language model and analyzing them according to multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results include: Obtain the main process Agent and sub-process Agent created by Dify, and assign sub-tasks to each sub-process Agent based on the main process Agent; The sub-tasks assigned to each sub-process Agent are executed in parallel to obtain the analysis results of multiple sub-tasks; Based on the main process Agent, the analysis results of multiple sub-tasks are summarized to obtain multi-scenario analysis results.

9. A business opportunity report automatic generation system based on a large language model, characterized in that, include: The report requirements definition and template preset module is used to obtain and break down the target business requirements, obtain multiple target business scenarios hierarchically divided according to preset analysis dimensions, determine the target data source and template format of the target business opportunity report based on the target business scenario, and generate the target business opportunity report template. The multi-source data acquisition and preprocessing module is used to acquire target data, including internal and external data, based on the target data source, and to perform preprocessing on the target data to adapt to the large language model to obtain preprocessed data. The scenario-based instruction set construction and analysis module is used to generate scenario-based instructions adapted to the large language model based on the target business scenario and preprocessed data, using Prompt engineering technology and Dify-based modular instruction decomposition. The scenario-based instructions are then input into the large language model and analyzed according to the multiple sub-processes obtained from instruction decomposition to obtain multi-scenario analysis results. The target business opportunity report generation module is used to input multi-scenario analysis results into the target business opportunity report template to obtain the target business opportunity report corresponding to the target business needs.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the automatic generation method for business opportunity reports based on a large language model as described in any one of claims 1-8.