Risk analysis report generation method and device, storage medium, and terminal

By generating a task sequence that includes structured queries, unstructured queries, and computational tasks, and combining it with a large model to generate a risk analysis report, the problem of low efficiency in existing technologies is solved, and more accurate risk analysis is achieved.

CN122154661APending Publication Date: 2026-06-05CSC FINANCIAL CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CSC FINANCIAL CO LTD
Filing Date
2026-03-16
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing risk analysis reports are inefficient to generate and lack contextual awareness. Purely quantitative analysis cannot understand the underlying logic behind the numbers, requiring expert intervention to complete the final risk assessment.

Method used

By acquiring anomaly indicators, a task sequence containing structured queries, unstructured queries, and computational tasks is generated. This sequence is then combined with a large model to generate a risk analysis report. The system utilizes a structured database to obtain target structured data and a vector database to obtain candidate text fragments. The system then integrates confidence weights to generate the target text fragments and inputs them into the large model to output a report.

Benefits of technology

It enables more comprehensive and accurate risk analysis, avoids manual intervention, and improves the efficiency of risk analysis report generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154661A_ABST
    Figure CN122154661A_ABST
Patent Text Reader

Abstract

The application discloses a risk analysis report generation method and device, a storage medium and a terminal, relates to the technical field of data processing, and mainly aims to solve the problem of low accuracy of risk analysis report generation. Mainly includes acquiring at least one abnormal index for prompting risk, and generating a task sequence according to the abnormal index; based on the structured query task, the target structured data is obtained from the structured database, and based on the matching calculation task, the calculation tool is calculated according to the target structured data. Risk parameter calculation target evaluation parameter; based on the unstructured query task, a plurality of candidate text segments are obtained from the vector database, and the target text segment is generated according to the candidate text segment and the comprehensive confidence weight carried by the candidate text segment; the report generation prompt word is generated according to the target text segment and the target evaluation parameter, so as to output the risk analysis report through the large model. Mainly used for generating risk analysis report.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method and apparatus for generating risk analysis reports, a storage medium, and a terminal. Background Technology

[0002] Risk analysis is a systematic study of the potential risks faced by a specific entity, such as a company, project, or system, using various technical means and tools. Its fundamental purpose is to support decision-makers in understanding uncertainty and developing effective response strategies. It can be applied to multiple fields such as banking, financial services, insurance, manufacturing, supply chain, and energy.

[0003] Traditional risk analysis methods primarily rely on rule-based systems and machine learning or deep learning models. These methods typically perform quantitative analysis on structured data; for example, in financial scenarios, they identify anomalous indicators by calculating financial ratios, building statistical models, or training predictive algorithms. However, this approach lacks context awareness; purely quantitative analysis cannot understand the deeper logic behind the numbers, and the output still requires expert intervention to complete the final risk assessment. Consequently, a risk analysis report is generated based on the combined results of quantitative and expert analysis, leading to low efficiency in risk analysis report generation. Summary of the Invention

[0004] In view of this, the present invention provides a method and apparatus for generating risk analysis reports, a storage medium, and a terminal, the main purpose of which is to solve the problem of low generation efficiency of existing risk analysis reports.

[0005] According to one aspect of the present invention, a method for generating a risk analysis report is provided, comprising: Obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed subtasks based on the abnormal indicator, wherein the subtasks include structured query tasks, unstructured query tasks, and computation tasks. Based on the structured query task, target structured data is obtained from the structured database. Based on the calculation tool that matches the calculation task, risk parameters are calculated according to the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are obtained from the vector database, and a target text fragment is generated according to the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. Based on the target text fragment and the target evaluation parameters, a report is generated to generate prompt words. These prompt words are then input into a large model to output a risk analysis report.

[0006] Furthermore, before retrieving multiple candidate text fragments from the vector database based on the unstructured query task, the method further includes: Obtain the initial text fragment to be stored, and extract the information source type, information release time, metadata, and industry attributes corresponding to the initial text fragment; The source authority coefficient of the initial text fragment is obtained by matching it from a preset source authority coefficient relationship set based on the information source type; Based on the industry attributes and information release time, the timeliness decay factor of the initial text fragment is calculated; The comprehensive confidence weight of the initial text fragment is obtained by weighted fusion calculation based on the timeliness decay factor and the source authority coefficient. The initial text fragment is vectorized to obtain a text vector, and the text vector of the initial text fragment, the comprehensive confidence weight, and the metadata are associated and stored as a text fragment in the vector database.

[0007] Furthermore, based on the industry attributes and information release time, the timeliness decay factor of the initial text fragment is calculated, including: The industry type of the industry attribute is retrieved, and the industry decay coefficient is obtained by matching from the preset industry decay coefficient mapping relationship set according to the industry type. The industry type includes high-iteration industry, medium-iteration industry and low-iteration industry. Calculate the time difference between the information release time and the current time; Based on the time difference and the industry attenuation coefficient, an exponential attenuation calculation is performed to obtain the timeliness attenuation factor of the initial text fragment.

[0008] Furthermore, based on the aforementioned anomaly indicators, a task sequence comprising multiple sequentially executed subtasks is generated, including: The target prompt word template matching the abnormal indicators is retrieved from the pre-built expert prompt word library. The target prompt word template includes a role definition section, a task target section, a quantitative requirement section for constraining the calculation tool, and a qualitative analysis section for constraining the query tool. Based on the business entity association information of the aforementioned abnormal indicators, fill the variable positions in the role definition section, task objective section, quantitative requirement section, and qualitative analysis section to obtain task decomposition prompt words; The task decomposition prompts are input into the large model to decompose the task based on the large model and generate a task sequence containing multiple sequentially executed sub-tasks.

[0009] Furthermore, the role definition section includes an analysis identity that matches the industry attributes of the business entity corresponding to the abnormal indicator; The task objective segment includes abnormal indicators, analysis cycle, and key data output requirements; The quantitative requirements section includes quantitative analysis tools and quantitative analysis content; The qualitative analysis section includes the type of retrieval tool invoked and the scope of retrieval information.

[0010] Further, based on the combined confidence weights carried by the candidate text fragments and the candidate text pieces, a target text fragment is generated, including: Calculate the similarity between the query statement and different text segments in the vector database, and select the text segments whose order in the similarity ranking meets the preset order condition as candidate text segments; The confidence parameters of the candidate text segments are obtained by fusing the similarity corresponding to the candidate text segments and the comprehensive confidence weight of the candidate text segments. The candidate text segment with the highest confidence parameter is selected as the target text segment.

[0011] Furthermore, the target prompt word template includes an inference output segment; Based on the target text fragment and the target evaluation parameters, a report is generated to generate prompt words, including: The target text fragment and the target evaluation parameters are filled into the variable positions of the inference output segment to generate report generation prompts. The inference output segment also includes inference logic, report output format, and number of attribution categories.

[0012] According to another aspect of the present invention, a risk analysis report generation apparatus is provided, comprising: The task generation module is used to obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator, wherein the sub-tasks include structured query tasks, unstructured query tasks, and calculation tasks. The calculation module is used to query the target structured data from the structured database based on the structured query task, and calculate the risk parameters based on the target structured data using a calculation tool that matches the calculation task, so as to obtain the target assessment parameters. The query module is used to retrieve multiple candidate text fragments from the vector database based on the unstructured query task, and generate a target text fragment based on the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. The report generation module is used to generate report generation prompts based on the target text fragment and the target evaluation parameters, and input the generated report generation prompts into the large model so that the large model can output a risk analysis report.

[0013] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to the risk analysis report generation method described above.

[0014] According to another aspect of the present invention, a terminal is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the risk analysis report generation method described above.

[0015] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: This invention provides a method, apparatus, storage medium, and terminal for generating risk analysis reports. In this embodiment, the invention acquires at least one abnormal indicator for risk alerting and generates a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator. These sub-tasks include a structured query task, an unstructured query task, and a calculation task. Based on the structured query task, target structured data is retrieved from a structured database. Using a calculation tool matching the calculation task, risk parameters are calculated based on the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are retrieved from a vector database. A target text fragment is generated based on the candidate text fragments and their combined confidence weights. Report generation prompts are generated based on the target text fragments and the target assessment parameters. These prompts are then input into a large model to output a risk analysis report. This method combines quantitative analysis results with qualitative analysis based on unstructured text. The large model provides a more comprehensive and accurate assessment of abnormal financial indicators, avoiding manual intervention while ensuring the accuracy of risk analysis, thereby significantly improving the efficiency of risk analysis report generation.

[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the specification. Furthermore, in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a method for generating a risk analysis report according to an embodiment of the present invention is shown; Figure 2 A flowchart illustrating another method for generating a risk analysis report provided by an embodiment of the present invention is shown; Figure 3 A block diagram of a risk analysis report generation device provided in an embodiment of the present invention is shown; Figure 4 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention is shown. Detailed Implementation

[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0019] To address the low efficiency of existing risk analysis report generation, this invention provides a method for generating risk analysis reports. This method is based on an intelligent agent with a large speech model as the decision-making core. This agent includes an agent framework, a large speech model, a query tool, and a computational tool. The query tool is used to query structured and unstructured data, and the computational tool is specifically designed for calculating various quantitative indicators; that is, the processing of structured data does not depend on the large speech model. Figure 1 As shown, the method includes: 101. Obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed subtasks based on the abnormal indicator.

[0020] In this embodiment of the invention, the intelligent agent framework acts as the execution subject, and report generation is triggered by abnormal indicators. When the execution subject collects externally input data containing abnormal indicators used to indicate risks, it initiates the subsequent risk analysis report generation operation. The externally input data can originate from business monitoring systems, quantitative indicator calculation systems, etc. After acquiring the abnormal indicators, based on the business scenario characteristics represented by the abnormal indicators and the business subject corresponding to the abnormal indicators, the corresponding task processing logic is determined. The report generation task is then broken down into multiple sequentially executed sub-tasks, resulting in a task sequence to provide operational path guidance for the subsequent generation process. The sub-tasks include structured query tasks, unstructured query tasks, and calculation tasks.

[0021] In financial scenarios, abnormal indicators can be categorized into the following dimensions: core abnormal indicators in the profitability quality risk dimension, such as significant fluctuations in gross profit margin, discrepancies between net profit and operating cash flow, a surge in period expense ratio, and an excessively high proportion of non-recurring gains and losses; core abnormal indicators in the asset structure risk dimension, such as a significant increase in the debt-to-asset ratio, a sharp drop in accounts receivable turnover, inventory backlog, and abnormal fixed asset impairment provisions; core abnormal indicators in the cash flow risk dimension, including negative net cash flow from operating activities, a continuously declining cash ratio, high reliance on cash flow from financing activities, and blind expansion of investment cash flow; core abnormal indicators in the R&D investment risk dimension, such as a surge or sharp drop in R&D expenses, an abnormal capitalization ratio of R&D expenses, and a mismatch between R&D investment and revenue growth; core abnormal indicators in the sales and operations risk dimension, such as significant fluctuations in the sales expense ratio, a sharp drop in revenue growth, an abnormal increase in customer concentration, and high channel inventory; and core abnormal indicators in the industry policy risk dimension, such as revenue or cost anomalies caused by policy adjustments, asset impairment caused by strengthened industry regulation, and R&D or investment adjustments caused by changes in industry support policies.

[0022] 102. Based on the structured query task, the target structured data is obtained from the structured database, and based on the calculation tool matching the calculation task, the risk parameters are calculated according to the target structured data to obtain the target evaluation parameters.

[0023] In this embodiment of the invention, based on the structured query task in the task sequence, target structured data related to risk, such as financial statements, equipment operating parameters, and historical transaction records, are extracted from a structured database. Then, a computing tool matching the calculation task in the task sequence is invoked to process this data, thereby calculating target assessment parameters that can quantify the risk level. In this process, the transformation from raw data to quantitative indicators is completed, providing objective data support for the report. The structured database can be a relational database, a data warehouse, etc.; the computing tool can be a pre-built algorithm model, statistical script, or financial calculation library, etc.; the target assessment parameters can be the Sharpe ratio, probability of default, etc.; this embodiment of the invention does not impose specific limitations.

[0024] 103. Based on the unstructured query task, multiple candidate text fragments are obtained from the vector database, and a target text fragment is generated according to the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments.

[0025] In this embodiment of the invention, the current executing entity also performs unstructured query tasks in parallel or serially. Specifically, through vectorized retrieval technology, multiple candidate text fragments related to the current risk scenario and business entity are recalled based on semantic similarity from a vector database storing massive amounts of documents, research reports, news, and regulations. Unlike conventional retrieval, the system not only relies on semantic matching but also comprehensively considers the overall confidence weight carried by each candidate text fragment. This weight can be dynamically determined based on factors such as source authority, timeliness, and historical hit accuracy. Furthermore, through weighted fusion or confidence ranking, the most reliable and relevant target text fragment is selected from multiple candidates. This provides accurate contextual and public opinion information for subsequent risk analysis, offering richer information for subsequent large-scale model inference while resolving the large-scale model illusion problem and ensuring that the cited text is verifiable.

[0026] 104. Generate report generation prompts based on the target text fragment and the target evaluation parameters, and input the generated report generation prompts into the large model to output a risk analysis report through the large model.

[0027] In this embodiment of the invention, the target evaluation parameters produced in the preceding steps are used as quantitative evidence, and the target text fragments are used as unstructured evidence. These are assembled according to a pre-constructed prompt word template that matches the business scenario characteristics corresponding to the current abnormal indicator, forming a clearly structured and explicit report generation prompt word. This prompt word not only includes the data foundation required for generating the report but also contains constraints on the report's style and chapter structure. Finally, the current executing entity inputs this highly structured prompt word into a large model, utilizing the model's reasoning and text generation capabilities to integrate the scattered data and text fragments into a logically coherent and well-supported risk analysis report.

[0028] In one embodiment of the present invention, for further explanation and limitation, the step of generating a task sequence comprising multiple sequentially executed subtasks based on the anomaly index includes: Retrieve target prompt word templates that match the abnormal indicators from a pre-built expert prompt word library.

[0029] Based on the business entity association information of the aforementioned abnormal indicators, the variable positions in the role definition section, task objective section, quantitative requirement section, and qualitative analysis section are filled to obtain task decomposition prompt words.

[0030] The task decomposition prompts are input into the large model to decompose the task based on the large model and generate a task sequence containing multiple sequentially executed sub-tasks.

[0031] In this embodiment of the invention, task decomposition is performed based on a large model. However, to avoid excessive freedom or logical drift in the large model during report generation, upon receiving anomaly indicators, they are not directly passed to the large model. Instead, an expert prompt term matching mechanism is initiated. This expert prompt term library includes a structured analysis framework and prompt term templates for various anomaly indicators, pre-constructed based on the analytical experience of domain experts. After obtaining anomaly indicators, the target prompt term template is matched from the expert prompt term library. In the matching process with multiple anomaly indicators, a prompt term template can be matched based on each anomaly indicator, and then multiple prompt term templates can be deduplicated and combined. Alternatively, a prompt term template can be matched based on a combination of multiple anomaly indicators. This embodiment of the invention does not impose specific limitations. Through the above mechanism, the analytical experience of domain experts can be transformed into a set of instructions that the large model can strictly execute. It not only avoids the illusionary risks in numerical calculations of the large model but also ensures that every risk analysis follows a unified high-quality standard, achieving standardization, reusability, and interpretability of the analytical logic.

[0032] The matched target prompt template is a standardized, multi-segmented structural framework containing scalar placeholders. This target prompt template can include content for two-stage prompt generation: the first stage is task decomposition prompts, and the second stage is report generation prompts. The target prompt template includes a role definition segment, a task objective segment, a quantitative requirement segment for constraining calculation tools, and a qualitative analysis segment for constraining query tools, primarily used to generate task decomposition prompts. The variable population stage then proceeds, combining the business entity-related information associated with the abnormal indicators, such as company name, stock code, industry, specific indicator values, and analysis period, to dynamically instantiate at least one segment in the template, obtaining task decomposition prompts. The instantiated prompts are then input into the large model. At this point, the large model acts as an "advanced analysis planner." Under the strict constraints of the template, especially the mandatory instructions in the quantitative requirement segment for using calculation tools and the qualitative analysis segment for calling retrieval tools, the large model is guided to logically decompose the complex analysis objectives into a series of sequentially executed, clearly dependent subtasks. The final generated task sequence is an execution list that mixes various operation types. For example: Subtask 1, the interface call parameters for a structured query, instructs the extraction of the aging structure and information on the top five debtors from the "Accounts Receivable" notes in the financial statement database; Subtask 2, the interface call parameters for a computational task, instructs the invocation of financial calculation tools to calculate the company's accounts receivable turnover days over the past three years and the average of comparable companies in the same industry; Subtask 3, the interface call parameters for an unstructured query, instructs the retrieval of recent discussions about the company's sales policies and customer payment status from news and public opinion databases and brokerage research report databases. Throughout this process, the model only outputs the interface call parameters; the actual operations are executed by the intelligent agent framework.

[0033] In one embodiment of the present invention, for further explanation and limitation, the role definition segment includes the analysis identity that matches the industry attributes of the business entity corresponding to the abnormal indicator; the task objective segment includes the abnormal indicator, analysis cycle, and key data output requirements; the quantitative requirement segment includes quantitative analysis tools and quantitative analysis content; and the qualitative analysis segment includes the retrieval tool call type and retrieval information range.

[0034] In this embodiment of the invention, the content to be filled in different sections can be as shown in the following examples: In the role definition section, fill in the specific industry analyst identity, such as "You are a senior financial analyst with over 10 years of experience in the new energy industry research, focusing on financial risk assessment and strategic analysis of power battery companies, and familiar with the high-iteration technology and policy characteristics of the new energy industry"; In the task objective section, fill in the specific abnormal indicator name and analysis time range, such as conducting a full-dimensional analysis of the abnormal indicator of the target power battery company's R&D expenses surging by 80% year-on-year in Q1 202X, judging the commercial rationality of this expense surge based on the technological iteration patterns of the new energy industry, tracing the core driving reasons, and providing traceable evidence. In the quantitative requirements section, specify the specific financial ratios to be calculated; obtain the company's R&D expenses in Q1 202X and the entire year of 202X, the composition of R&D expenses, and calculate the R&D expense ratio to operating revenue based on calculation tools, as well as the average R&D expense ratio of comparable companies in the new energy power battery industry in Q1 202X. The qualitative analysis section specifies the scope of unstructured information to be retrieved. For example, it calls a vector search tool to retrieve all publicly available information released by the target company in Q1 of 202X regarding new R&D projects, technological collaborations, and production line upgrades; it also calls a vector search tool to retrieve research reports and news related to industry policies and technical standard adjustments in the new energy power battery industry in Q1 of 202X. Through this process, the originally abstract template is transformed into a highly customized, context-complete task decomposition prompt, which includes both the expert's general analytical logic and incorporates the current specific business data.

[0035] In one embodiment of the present invention, for further explanation and limitation, before the step of querying multiple candidate text fragments from a vector database based on the unstructured query task, the method further includes: Obtain the initial text fragment to be stored, and extract the information source type, information release time, metadata, and industry attributes of the industry attribute corresponding to the initial text fragment; The source authority coefficient of the initial text fragment is obtained by matching it from a preset source authority coefficient relationship set based on the information source type; Based on the industry attributes and information release time, the timeliness decay factor of the initial text fragment is calculated; The comprehensive confidence weight of the initial text fragment is obtained by weighted fusion calculation based on the timeliness decay factor and the source authority coefficient. The initial text fragment is vectorized to obtain a text vector, and the initial text fragment, the text vector, the comprehensive confidence weight, and the metadata are associated and stored as a text fragment in the vector database.

[0036] In this embodiment of the invention, a comprehensive confidence weight is configured for each text fragment originating from an unstructured document, considering both data authority and timeliness. This provides multi-dimensional reference for identifying the optimal text during subsequent unstructured queries. Specifically, for any initial text fragment, its corresponding source authority coefficient and timeliness decay factor are determined based on the information source type, information release time, and industry attribute of the business entity. The comprehensive confidence weight of the initial text fragment is then calculated based on these factors. The comprehensive confidence weight can be expressed by the formula: ; in, The source authority coefficient indicates the authority of the information source. This refers to a timeliness decay factor based on industry characteristics. The core idea is to design a differentiated index decay model according to the industry attributes of the target company, aligning with the information value lifecycle characteristics of different industries to ensure that information freshness matches industry characteristics. For the weight adjustment parameter, and satisfying It can be dynamically adjusted according to the analysis scenario. If the focus is on the credibility of the information source, increase the adjustment. If the focus is on the timeliness of information, increase the adjustment. In the default analysis scenario =0.6, =0.4.

[0037] The source authority coefficient is obtained by matching from a preset source authority coefficient relationship set, which includes the correspondence between different information source types and their corresponding source authority coefficients. Information source types can be categorized as official sources (e.g., stock exchanges, company websites), research sources (e.g., research reports from mainstream financial data platforms), media sources (e.g., authoritative financial media), and general online media sources. The source authority coefficients for different information source types are specifically assigned values ​​based on the following strategy: official sources are assigned a value of 1; research sources can be assigned a value in the range of [0.8, 1.0); media sources can be assigned a value in the range of [0.6, 0.8); and general online media sources can be assigned a value in the range of [0.4, 0.6].

[0038] The initial text extraction process involves collecting massive amounts of unstructured documents related to different business entities from various publicly available data sources, such as stock exchanges, official corporate investor relations platforms, authoritative financial media, and brokerage research report platforms. These unstructured documents include, but are not limited to, financial reports, annual reports, prospectuses, interim announcements, and industry research reports. A text parser then unifies these heterogeneous documents into plain text fragments. For documents with fixed layout formats, such as listed company annual reports, they can be stored in a structured database based on their chapter structure. For documents with variable layout formats, such as news articles, announcements, and research reports, key text sections are extracted as the initial text fragments to be stored.

[0039] In one embodiment of the present invention, for further explanation and limitation, the step of calculating the timeliness decay factor of the initial text fragment based on the industry attributes and information release time includes: Retrieve the industry type of the industry attribute, and obtain the industry attenuation coefficient by matching it from the preset industry attenuation coefficient mapping relationship set according to the industry type; Calculate the time difference between the information release time and the current time; Based on the time difference and the industry attenuation coefficient, an exponential attenuation calculation is performed to obtain the timeliness attenuation factor of the initial text fragment.

[0040] In this embodiment of the invention, the time-related decay factor is calculated based on the time difference and the time-related decay factor. The formula is expressed as: ;in, This represents the difference between the current time and the time the information was published, i.e., the time difference; This represents the industry attenuation coefficient. The industry attenuation coefficient is a core adjusting factor for timeliness decay. It is differentiated and categorized into different industry types based on the industry's information iteration speed, technology update frequency, market structure stability, and sensitivity to policy impacts, ensuring that all unstructured information within the same industry uses a unified industry attenuation coefficient. The preset industry attenuation coefficient mapping relationship set includes the mapping relationship between different industry types and their corresponding industry attenuation coefficients. Industry types include high-iteration industries, medium-iteration industries, and low-iteration industries. The industry attenuation coefficient values ​​for different industry types can be referenced as follows: High-iteration industries are used to characterize industries with rapid technology updates, unstable market structures, frequent policy adjustments, and short product iteration cycles, and can include industries such as the internet, semiconductors, new energy, and biomedicine. Therefore, their corresponding industry attenuation coefficients can be selected as follows: The term "internal iterative industry" is used to characterize industries with relatively stable development, fixed cycles of technological iteration, moderate adjustments in market competition and industrial policies, phased business strategies and product development, and where the value of all information within the industry remains valid within a business cycle. Industries such as manufacturing, consumer goods, home appliances, and automobiles can be included. Therefore, the corresponding industry attenuation coefficient can be determined as follows: Low-iteration industries are used to characterize basic sectors of the national economy characterized by mature business models, slow technological iteration, highly stable market structure and industrial policies, minimal impact of short-term market changes on business operations, and extremely slow decay of the value of all information within the industry. These industries may include public utilities, transportation, and traditional infrastructure. Some fundamental information within such industries can serve as a core reference for long-term financial analysis; therefore, their corresponding industry decay coefficient can be determined as follows: .

[0041] In one embodiment of the present invention, for further illustration and limitation, such as Figure 2 As shown, step 103 generates a target text fragment based on the candidate text fragment and the comprehensive confidence weight carried by the candidate text fragment, including: 1031. Calculate the similarity between the query statement and different text segments in the vector database, and select the text segments whose order in the similarity ranking meets the preset order condition as candidate text segments.

[0042] 1032. The confidence parameters of the candidate text segments are obtained by fusing the similarity corresponding to the candidate text segments and the comprehensive confidence weight of the candidate text segments.

[0043] 1033. Select the candidate text segment with the highest confidence parameter as the target text segment.

[0044] In this embodiment of the invention, the query statement is vectorized using an embedding model, and then the Top-K most similar candidate text segments (based on a preset order condition) are found in the vector database. For each candidate text segment, a confidence parameter is calculated. The formula for calculating the confidence parameter F is as follows: ; in, Indicates similarity. Indicates the overall confidence weight. This is an adjustable parameter used to balance semantic relevance and information quality. The confidence parameter of candidate text fragments is used as the criterion for selecting target text fragments. Even if two text fragments have very close semantic similarity to the query, fragments from official annual reports or timely updates will receive a higher overall confidence weight. This ensures that the contextual information input to the large model agent is not only relevant, but also of high quality and credibility, and is placed before non-authoritative media and outdated text fragments.

[0045] In one embodiment of the present invention, for further explanation and limitation, the step of generating prompt words based on the target text fragment and the target evaluation parameters includes: The target text fragment and the target evaluation parameters are filled into the variable positions of the inference output segment to generate a report and prompt words.

[0046] In this embodiment of the invention, the target prompt word template includes an inference output section. The inference output section further includes inference logic, report output format, and the number of attribution categories. After the agent framework completes all subtasks and gathers structured data from computing tools and textual evidence with confidence weights from a vector database, it retrieves the initially matched target prompt word template, locates the inference output section, and performs dynamic variable filling. This involves filling the calculated target evaluation parameters into the template at the location requiring quantitative result interpretation and attribution analysis; simultaneously, it fills the retrieved target text fragments and their source tags into the location requiring the labeling of specific traceable evidence sources. After filling, the template paragraph, which originally contained abstract instructions such as "requires the conclusion to label the evidence source" and "limits the attribution categories to 3," becomes a report generation prompt word containing specific data that can be directly executed by a large model. Upon receiving this prompt, the large-scale model does not need to devise its own report structure or determine the analysis dimensions. It simply needs to strictly adhere to the pre-defined reasoning logic and output format in the template, such as paragraph format, bullet point format, and limitations on the number of attribution categories. It then logically connects and interprets the filled-in data, ultimately outputting a comprehensive risk analysis report that is both professional and interpretable. This mechanism ensures the standardization of the large-scale model's output and the traceability of its conclusions by entrusting the decision-making power regarding report writing to the expert template.

[0047] This invention provides a method for generating risk analysis reports. In this embodiment, the method acquires at least one abnormal indicator for risk alerting and generates a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator. These sub-tasks include a structured query task, an unstructured query task, and a calculation task. Based on the structured query task, target structured data is retrieved from a structured database. Using a calculation tool matching the calculation task, risk parameters are calculated based on the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are retrieved from a vector database. A target text fragment is generated based on the candidate text fragments and their combined confidence weights. Report generation prompts are generated based on the target text fragments and the target assessment parameters. These prompts are then input into a large-scale model to output a risk analysis report. This method combines quantitative analysis results with qualitative analysis based on unstructured text. The large-scale model provides a more comprehensive and accurate assessment of abnormal financial indicators, avoiding manual intervention while ensuring the accuracy of risk analysis, thereby significantly improving the efficiency of risk analysis report generation.

[0048] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this embodiment of the invention provides a risk analysis report generation device, such as... Figure 3 As shown, the device includes: The task generation module 31 is used to obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator, wherein the sub-tasks include structured query tasks, unstructured query tasks and calculation tasks. The calculation module 32 is used to query the target structured data from the structured database based on the structured query task, and calculate the risk parameters based on the target structured data using the calculation tool that matches the calculation task, so as to obtain the target evaluation parameters. The query module 33 is used to query multiple candidate text fragments from the vector database based on the unstructured query task, and generate a target text fragment based on the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. The report generation module 34 is used to generate report generation prompts based on the target text fragment and the target evaluation parameters, and input the generated report generation prompts into the large model so as to output a risk analysis report through the large model.

[0049] Furthermore, the device also includes: The acquisition module is used to acquire the initial text fragment to be stored, and extract the information source type, information release time, metadata, and industry attributes of the industry attribute corresponding to the initial text fragment. The matching module is used to match the source authority coefficient of the initial text fragment from a preset source authority coefficient relationship set according to the information source type; The calculation module 32 is also used to calculate the timeliness decay factor of the initial text fragment based on the industry attributes and information release time. The calculation module 32 is also used to perform weighted fusion calculation based on the timeliness decay factor and the source authority coefficient to obtain the comprehensive confidence weight of the initial text segment; The storage module is used to vectorize the initial text fragment to obtain a text vector, and to associate and store the initial text fragment, the text vector, the comprehensive confidence weight, and the metadata as a text fragment in the vector database.

[0050] Furthermore, the computing module 32 specifically includes: The first matching unit is used to retrieve the industry type of the industry attribute and match the industry attenuation coefficient from the preset industry attenuation coefficient mapping relationship set according to the industry type. The industry type includes high-iteration industry, medium-iteration industry and low-iteration industry. The first calculation unit is used to calculate the time difference between the information release time and the current time; The second calculation unit is used to perform exponential decay calculation based on the time difference and the industry decay coefficient to obtain the timeliness decay factor of the initial text segment.

[0051] Furthermore, the task generation module 31 includes: The second matching unit is used to retrieve target prompt word templates that match the abnormal indicators from a pre-built expert prompt word library. The target prompt word templates include a role definition section, a task target section, a quantitative requirement section for constraining the calculation tool, and a qualitative analysis section for constraining the query tool. The filling unit is used to fill the variable positions in the role definition section, task target section, quantitative requirement section and qualitative analysis section based on the business entity association information of the abnormal indicators, so as to obtain task decomposition prompt words; The input unit is used to input the task decomposition prompts into the large model, so as to perform task decomposition based on the large model and generate a task sequence containing multiple sequentially executed sub-tasks.

[0052] Furthermore, in specific application scenarios, the role definition segment includes an analysis identity that matches the industry attributes of the business entity corresponding to the abnormal indicator; The task objective segment includes abnormal indicators, analysis cycle, and key data output requirements; The quantitative requirements section includes quantitative analysis tools and quantitative analysis content; The qualitative analysis section includes the type of retrieval tool invoked and the scope of retrieval information.

[0053] Furthermore, the query module 33 includes: The third calculation unit is used to calculate the similarity between the query statement and different text segments in the vector database, and to select the text segments whose order in the similarity ranking meets the preset order conditions as candidate text segments. The fourth calculation unit is used to perform a fusion calculation based on the similarity corresponding to the candidate text segment and the comprehensive confidence weight of the candidate text segment to obtain the confidence parameter of the candidate text segment; The determining unit is used to select the candidate text segment with the highest confidence parameter as the target text segment.

[0054] Furthermore, the target prompt word template includes an inference output segment; the report generation module 34 is specifically used to fill the target text fragment and the target evaluation parameters into the variable positions of the inference output segment to generate report generation prompt words, wherein the inference output segment also includes inference logic, report output format and number of attribution categories.

[0055] This invention provides a risk analysis report generation apparatus. In its embodiments, the apparatus acquires at least one abnormal indicator for risk alerting and generates a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator. These sub-tasks include a structured query task, an unstructured query task, and a calculation task. Based on the structured query task, target structured data is retrieved from a structured database. Using a calculation tool matching the calculation task, risk parameters are calculated based on the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are retrieved from a vector database. A target text fragment is generated based on the candidate text fragments and their combined confidence weights. Report generation prompts are generated based on the target text fragments and the target assessment parameters. These prompts are then input into a large model to output a risk analysis report. This approach combines quantitative analysis results with qualitative analysis based on unstructured text. The large model provides a more comprehensive and accurate assessment of abnormal financial indicators, avoiding manual intervention while ensuring the accuracy of risk analysis, thereby significantly improving the efficiency of risk analysis report generation.

[0056] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction, the computer-executable instruction being capable of executing the risk analysis report generation method in any of the above method embodiments.

[0057] Figure 4 The diagram shows a structural schematic of a terminal according to an embodiment of the present invention. The specific implementation of the present invention is not limited to the specific implementation of the terminal.

[0058] like Figure 4 As shown, the terminal may include: a processor 402, a communication interface 404, a memory 406, and a communication bus 408.

[0059] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408.

[0060] Communication interface 404 is used for network communication with other devices such as clients or other servers.

[0061] The processor 402 is used to execute program 410, specifically to execute the relevant steps in the above-described risk analysis report generation method embodiment.

[0062] Specifically, program 410 may include program code that includes computer operation instructions.

[0063] Processor 402 may be a central processing unit (CPU), a specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The terminal may include one or more processors of the same type, such as one or more CPUs; or it may include processors of different types, such as one or more CPUs and one or more ASICs.

[0064] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0065] Specifically, program 410 can be used to cause processor 402 to perform the following operations: Obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed subtasks based on the abnormal indicator, wherein the subtasks include structured query tasks, unstructured query tasks, and computation tasks. Based on the structured query task, target structured data is obtained from the structured database. Based on the calculation tool that matches the calculation task, risk parameters are calculated according to the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are obtained from the vector database, and a target text fragment is generated according to the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. Based on the target text fragment and the target evaluation parameters, a report is generated to generate prompt words. These prompt words are then input into a large model to output a risk analysis report.

[0066] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

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

Claims

1. A method for generating a risk analysis report, characterized in that, include: Obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed subtasks based on the abnormal indicator, wherein the subtasks include structured query tasks, unstructured query tasks, and computation tasks. Based on the structured query task, target structured data is obtained from the structured database. Based on the calculation tool that matches the calculation task, risk parameters are calculated according to the target structured data to obtain target assessment parameters. Based on the unstructured query task, multiple candidate text fragments are obtained from the vector database, and a target text fragment is generated according to the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. Based on the target text fragment and the target evaluation parameters, a report is generated to generate prompt words. These prompt words are then input into a large model to output a risk analysis report.

2. The method according to claim 1, characterized in that, Based on the aforementioned unstructured query task, before retrieving multiple candidate text fragments from the vector database, the method further includes: Obtain the initial text fragment to be stored, and extract the information source type, information release time, metadata, and industry attributes of the industry attribute corresponding to the initial text fragment; The source authority coefficient of the initial text fragment is obtained by matching it from a preset source authority coefficient relationship set based on the information source type; Based on the industry attributes and information release time, the timeliness decay factor of the initial text fragment is calculated; The comprehensive confidence weight of the initial text fragment is obtained by weighted fusion calculation based on the timeliness decay factor and the source authority coefficient. The initial text fragment is vectorized to obtain a text vector, and the initial text fragment, the text vector, the comprehensive confidence weight, and the metadata are associated and stored as a text fragment in the vector database.

3. The method according to claim 2, characterized in that, Based on the industry attributes and information release time, the timeliness decay factor of the initial text fragment is calculated, including: The industry type of the industry attribute is retrieved, and the industry decay coefficient is obtained by matching from the preset industry decay coefficient mapping relationship set according to the industry type. The industry type includes high-iteration industry, medium-iteration industry and low-iteration industry. Calculate the time difference between the information release time and the current time; Based on the time difference and the industry attenuation coefficient, an exponential attenuation calculation is performed to obtain the timeliness attenuation factor of the initial text fragment.

4. The method according to claim 1, characterized in that, Based on the aforementioned anomaly indicators, a task sequence comprising multiple sequentially executed subtasks is generated, including: The target prompt word template matching the abnormal indicators is retrieved from the pre-built expert prompt word library. The target prompt word template includes a role definition section, a task target section, a quantitative requirement section for constraining the calculation tool, and a qualitative analysis section for constraining the query tool. Based on the business entity association information of the aforementioned abnormal indicators, fill the variable positions in the role definition section, task objective section, quantitative requirement section, and qualitative analysis section to obtain task decomposition prompt words; The task decomposition prompts are input into the large model to decompose the task based on the large model and generate a task sequence containing multiple sequentially executed sub-tasks.

5. The method according to claim 4, characterized in that, The role definition section includes the analysis identity that matches the industry attributes of the business entity corresponding to the abnormal indicators; The task objective segment includes abnormal indicators, analysis cycle, and key data output requirements; The quantitative requirements section includes quantitative analysis tools and quantitative analysis content; The qualitative analysis section includes the type of retrieval tool invoked and the scope of retrieval information.

6. The method according to claim 1, characterized in that, Based on the combined confidence weights carried by the candidate text fragments and the candidate text pieces, a target text fragment is generated, including: Calculate the similarity between the query statement and different text segments in the vector database, and select the text segments whose order in the similarity ranking meets the preset order condition as candidate text segments; The confidence parameters of the candidate text segments are obtained by fusing the similarity corresponding to the candidate text segments and the comprehensive confidence weight of the candidate text segments. The candidate text segment with the highest confidence parameter is selected as the target text segment.

7. The method according to claim 1, characterized in that, The target prompt word template includes an inference output section; Based on the target text fragment and the target evaluation parameters, a report is generated to generate prompt words, including: The target text fragment and the target evaluation parameters are filled into the variable positions of the inference output segment to generate report generation prompts. The inference output segment also includes inference logic, report output format, and number of attribution categories.

8. A risk analysis report generation device, characterized in that, include: The task generation module is used to obtain at least one abnormal indicator for risk warning, and generate a task sequence containing multiple sequentially executed sub-tasks based on the abnormal indicator, wherein the sub-tasks include structured query tasks, unstructured query tasks, and calculation tasks. The calculation module is used to query the target structured data from the structured database based on the structured query task, and calculate the risk parameters based on the target structured data using a calculation tool that matches the calculation task, so as to obtain the target assessment parameters. The query module is used to retrieve multiple candidate text fragments from the vector database based on the unstructured query task, and generate a target text fragment based on the candidate text fragments and the comprehensive confidence weights carried by the candidate text fragments. The report generation module is used to generate report generation prompts based on the target text fragment and the target evaluation parameters, and input the generated report generation prompts into the large model so that the large model can output a risk analysis report.

9. A storage medium, characterized in that, The storage medium stores at least one executable instruction that causes the processor to perform the operation corresponding to the risk analysis report generation method as described in any one of claims 1-7.

10. A terminal, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation corresponding to the risk analysis report generation method as described in any one of claims 1-7.