Construction method and system of report document generation model

By building a report document generation model, using bank professional knowledge documents to build a knowledge base, identify, analyze and divide the report modules, the problems of inefficiency and poor quality of the traditional report preparation model are solved, and efficient and high-quality report document generation is achieved.

CN120218043AActive Publication Date: 2025-06-27BANK OF TAIZHOU CO LTD

Patent Information

Application Number
CN202510381240.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-27
Estimated Expiration
2045-03-28

Smart Images

  • Figure CN120218043A_ABST
    Figure CN120218043A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and system for constructing a report document generation model, a report document knowledge base is constructed based on report document related knowledge extracted from a bank professional knowledge document, and the bank professional knowledge document comprises at least one of a historical report document, a bank system rule and a bank business specification. The report document knowledge base is identified and analyzed, N report modules corresponding to the report document knowledge base are obtained through division, and different report modules are used for generating contents of different parts in the report document. And the report document generation intelligent agent is used for fusing the N report modules and constructing a report document generation model. And generating the report document generation model according to a pre-configured report compiling workflow and the report document generation agent. Therefore, the quality and the efficiency of generating the report document by the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology. Specifically, it relates to a method and system for constructing a report document generation model. Background Art

[0002] In the daily operation scenarios of commercial banks, the writing of various reports is extremely frequent, such as write-off investigation reports, industry analysis reports, and market research reports. The traditional report compilation mode highly relies on manual writing and proofreading. This mode has significant drawbacks such as low efficiency and poor quality.

[0003] With the rise of large language model technology, with its powerful text generation ability, it has been widely used in many fields. Currently, large language models can also be applied in the field of report writing. Although general large language models can, to a certain extent, solve basic problems such as misspelled words, missing words, and missing subjects, however, generative artificial intelligence technology relies on complex algorithms and models, resulting in the randomness of the generated content. And the financial industry has strict regulatory requirements for reports. This randomness makes the generated content difficult to directly meet the requirements, and still requires manual repeated proofreading and modification, and there are still problems such as poor quality and low efficiency.

[0004] Therefore, how to improve the quality and efficiency of the model in generating report documents is an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a method and system for constructing a report document generation model to improve the quality and efficiency of the model in generating report documents.

[0006] Combined with the first aspect of this application, a method for constructing a report document generation model is provided. The method includes:

[0007] Based on the knowledge related to report documents extracted from bank professional knowledge documents, a report document knowledge base is constructed. The bank professional knowledge documents include at least one of historical report documents, bank system rules, and banking business specifications;

[0008] By identifying and analyzing the report document knowledge base, N report modules corresponding to the report document knowledge base are divided. Different report modules are used to generate different parts of the content in the report document;

[0009] Fuse the N report modules to construct a report document generation agent for the report document generation model;

[0010] Generate an agent according to a pre-configured report compilation workflow and the report document, and generate the report document generation model. The report compilation workflow is used to determine the execution order and interaction method between the sub-agents corresponding to each report module in the report document generation agent.

[0011] Optionally, constructing a report document knowledge base based on the bank professional knowledge document, including:

[0012] Parse the obtained initial bank professional knowledge document, and perform format processing on the parsing result of the initial bank professional knowledge document based on a document format processing tool to generate the bank professional knowledge document. The initial bank professional knowledge document comes from at least one of the bank internal system and the regulation database. The initial bank professional knowledge document includes at least one of a text document and an image document. The text document is parsed based on natural language processing, and the image document is parsed based on optical character recognition (OCR);

[0013] Locate the content entities in the bank professional knowledge document through predefined grammar rules and grammar patterns, and determine the metadata of the bank professional knowledge document from the entities based on the frequency, positional relationship, and context information of the word segmentation in the bank professional knowledge document;

[0014] Adopt a pre-trained word vector model to obtain the lexical units and sentence units included in the bank professional knowledge document, and deeply mine the semantic connotations of the lexical units and the sentence units based on a semantic understanding model according to the context information of the lexical units, so as to map the semantic information in the bank professional knowledge document into corresponding semantic feature vectors;

[0015] With the help of data association technology, associate and integrate the original text, the determined metadata, and the generated semantic feature vectors of the bank professional knowledge document through the identifiers of each document in the bank professional knowledge document to generate the report document knowledge base.

[0016] Optionally, the identifying and analyzing the report document knowledge base to divide it into N report modules corresponding to the report document knowledge base includes:

[0017] Calculate the semantic similarity between the documents in the report document knowledge base based on the semantic feature vectors and the metadata in the report document knowledge base, and divide the documents in the report document knowledge base into different report module candidate sets based on the semantic similarity;

[0018] Analyze the structural features and syntactic relationship features of the documents included in each of the candidate sets of report modules to determine the hierarchical structure and logical associations of different parts in each of the documents, and extract key entity information by identifying structural elements such as titles, paragraphs, and lists in each of the documents. The key entity information is used to clarify the core description information of different parts in each of the documents;

[0019] Based on the hierarchical structure, the logical associations, and the core description information, summarize the documents in each of the candidate sets of report modules to generate a module description for each of the candidate sets of report modules. The module description is used to reflect the role and function of the modules in the candidate sets of report modules in the report documents;

[0020] Based on the module descriptions in each of the candidate sets of report modules, the content of the documents in each of the candidate sets of report modules, and a preset scoring rule, determine the target document fragments in each of the candidate sets of report modules as the module examples for each of the candidate sets of report modules;

[0021] According to the module descriptions and module examples in each of the candidate sets of report modules, determine the module verification criteria for each of the candidate sets of report modules from the preset verification rules. The module verification criteria are used to clarify the generation accuracy and integrity of each module in the candidate sets of report modules;

[0022] Referring to the consistency of the module descriptions, module examples, and module verification criteria corresponding to each module in each of the candidate sets of report modules, determine the N report modules corresponding to the report document knowledge base in each of the candidate sets of report modules.

[0023] Optionally, the report document generation agent includes a report document synthesis agent, a report document content generation sub-agent corresponding to each of the report modules, and a report document content verification sub-agent; The report document generation agent that constructs a report document generation model according to the N report modules includes:

[0024] According to the module descriptions of each of the report modules, obtain the functional features, core point features, and expected content features of each of the report modules, and input the functional features, the core point features, and the expected content features into a large language model to guide the large language model to generate a prompt word template corresponding to each of the report modules;

[0025] Based on the prompt word template and the module examples of the report modules, fine-tune and train an initial language model to generate a report document content generation sub-agent corresponding to each of the report modules;

[0026] Convert the module verification criteria corresponding to each of the said reporting modules into executable code logic to construct a verification algorithm corresponding to each of the said module verification criteria, and generate a report document content verification sub-intelligent agent for the corresponding reporting module based on each of the said verification algorithms;

[0027] By deeply mining the overall framework of the report document and the association relationships between each of the said reporting modules, and based on the overall document framework and the said association relationships, determine the working processes of each of the report document content generation sub-intelligent agents and each of the report document content verification sub-intelligent agents, and generate a report document synthesis intelligent agent related to the said working processes;

[0028] Construct the report document generation intelligent agent of the said report document generation model according to the report document synthesis intelligent agent, the report document content generation sub-intelligent agents corresponding to each of the said reporting modules, and the report document content verification sub-intelligent agents corresponding to each of the said reporting modules.

[0029] Optionally, the generating the said report document generation model according to the report compilation workflow and the report document generation intelligent agent includes:

[0030] By formally describing the report compilation workflow, obtain the nodes, edges, and the conversion rules between the nodes in the report compilation workflow, where the nodes represent working nodes, the edges represent the working flow directions, and the conversion rules represent the triggering conditions for the conversion of working nodes;

[0031] According to the nodes, the edges, and the conversion rules, determine the execution order and the interaction methods of each of the report document content generation sub-intelligent agents, each of the report document content verification sub-intelligent agents, and the report document synthesis intelligent agent;

[0032] Based on the execution order and the interaction methods, adjust the intelligent agent scheduling parameters in the initial report document generation model to generate the said report document generation model.

[0033] Optionally, the parsing the image document based on optical character recognition OCR includes:

[0034] Obtain the original image data of the image document, and perform image preprocessing on the original image data through at least one of grayscale processing, binarization processing, and noise elimination processing to generate standardized image data;

[0035] Locate the text regions in the standardized image data based on an edge detection algorithm, and perform geometric correction on the inclined or distorted text regions using an affine transformation algorithm to generate a corrected text region image;

[0036] Use the pre-trained OCR recognition model to perform text recognition on the corrected text region image, extract the text sequence in the text region image, and perform error correction processing on the text sequence through character-level confidence verification and context semantic verification to generate a preliminary parsed text;

[0037] According to the layout structure features of the image document, logically segment paragraphs, headings, and tables in the preliminary parsed text, and generate a structured parsed text by aligning and matching with the paragraph marks, heading levels, and table identifiers of the text document;

[0038] Perform cross-modal semantic consistency verification on the structured parsed text and the parsing result of the text document, and perform manual annotation and correction on the semantic ambiguity fragments in the structured parsed text according to the verification result to generate the target parsed text of the image document.

[0039] Optionally, calculating the semantic similarity between each document in the report document knowledge base based on the semantic feature vector and the metadata in the report document knowledge base includes:

[0040] Extract the sentence vectors corresponding to the sentence units of each document from the semantic feature vector, and aggregate the sentence vectors of each document into a document-level semantic vector through a weighted average algorithm;

[0041] Calculate the first similarity value between each document-level semantic vector based on the cosine similarity algorithm, and calculate the keyword overlap rate between each document based on the keyword set in the metadata as the second similarity value;

[0042] Perform weighted fusion on the first similarity value and the second similarity value according to a preset weight allocation strategy to generate a comprehensive semantic similarity score between each document;

[0043] Construct a document similarity matrix based on the comprehensive semantic similarity score, and perform unsupervised clustering analysis on the document similarity matrix based on the spectral clustering algorithm to generate a document clustering result;

[0044] According to the density distribution characteristics and inter-cluster distance characteristics of each cluster in the document clustering result, dynamically adjust the clustering parameters and re-partition the document clusters until the variance of the comprehensive semantic similarity scores of the documents within each cluster is lower than a preset threshold, and generate the report module candidate set.

[0045] Optionally, inputting the functional feature, the core point feature, and the expected content feature into a large language model to guide the large language model to generate a prompt word template corresponding to each report module includes:

[0046] Convert the functional features into module role description statements, convert the core key features into keyword constraint lists, and convert the expected content features into content generation format specifications;

[0047] Based on preset template generation rules, splice the module role description statements, the keyword constraint lists, and the content generation format specifications in sequence into an initial prompt word sequence;

[0048] Perform grammar optimization and semantic enhancement processing on the initial prompt word sequence through the large language model to generate a candidate prompt word template set;

[0049] Use the module example as a verification sample, generate simulated content through the large language model based on the candidate prompt word template, and calculate the content overlap degree and logical coherence index between the simulated content and the module example;

[0050] Select candidate prompt word templates with a content overlap degree higher than a first preset threshold and a logical coherence index higher than a second preset threshold as the prompt word template corresponding to the reporting module.

[0051] Optionally, when locating content entities in the bank professional knowledge document through predefined grammar rules and grammar patterns, it further includes:

[0052] Identify table areas with fixed grammar structures in the bank professional knowledge document, and extract the row and column headers in the table areas as entity attribute labels;

[0053] Analyze the numerical types and unit symbols of the cell data in the table area, and associate the numerical types and the unit symbols with the entity attribute labels to form structured fields;

[0054] Detect logical connectives between consecutive paragraphs in the bank professional knowledge document, and divide the dependency relationship chain of the content entities according to the logical connectives;

[0055] Map the structured fields and the dependency relationship chain to a preset entity relationship graph to generate a multi-level semantic association network of the content entities;

[0056] Based on the multi-level semantic association network, perform entity alignment on the cross-chapter content mutually referenced in the bank professional knowledge document, and eliminate duplicate entity nodes.

[0057] Combined with the second aspect of the present application, a construction system for a report document generation model is provided. The construction system for the report document generation model includes a machine-readable storage medium and a processor. The machine-readable storage medium stores machine-executable instructions. When the processor executes the machine-executable instructions, the construction system for the report document generation model implements the aforementioned construction method for the report document generation model.

[0058] Combined with the third aspect of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed, the aforementioned construction method for the report document generation model is implemented.

[0059] Combined with the fourth aspect of the present application, a computer program product is provided. When the computer program is executed by a processor, the aforementioned construction method for the report document generation model is implemented.

[0060] Combined with any of the above aspects, a report document knowledge base is constructed based on the report document-related knowledge extracted from bank professional knowledge documents, where the bank professional knowledge documents include at least one of historical report documents, bank system rules, and banking business specifications. By identifying and analyzing the report document knowledge base, N report modules corresponding to the report document knowledge base are obtained. Different report modules are used to generate different parts of the content in the report document. The N report modules are fused to construct a report document generation agent for the report document generation model. According to a pre-configured report compilation workflow and the report document generation agent, the report document generation model is generated. By using the report document generation model to generate report documents, the generation quality and generation efficiency of the report documents are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0062] Figure 1 The flowchart of the construction method for the report document generation model provided by the embodiments of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0063] To enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0064] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or terminal comprising a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or terminals.

[0065] Referring to "embodiments" herein means that specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0066] Figure 1 The flowchart of the method for constructing a report document generation model provided by the embodiments of the present application is shown. It should be understood that in other embodiments, the order of some steps of the method for constructing the report document generation model in this embodiment can be shared according to actual needs, or some of the steps can also be omitted or maintained. The detailed method for constructing the report document generation model includes:

[0067] S110. Construct a report document knowledge base based on the knowledge related to the report document extracted from the bank professional knowledge documents.

[0068] Among them, the bank professional knowledge documents include at least one of historical report documents, bank system rules, and banking business specifications.

[0069] In this step, the initially obtained bank professional knowledge documents can be parsed first. The initial documents can be from channels such as the bank's internal system and the regulation database, and include text documents, image documents, etc. The text documents can be parsed based on natural language processing, and the image documents can be parsed based on optical character recognition (OCR).

[0070] Subsequently, format processing can be performed on the parsing results based on a document format processing tool to generate a bank professional knowledge document. Then, content entities in the bank professional knowledge document are located through predefined syntax rules and syntax patterns, and based on the frequency, positional relationship, and context information of word segmentation in the document, metadata of the bank professional knowledge document is determined from the entities. Furthermore, a pre-trained word vector model is used to obtain lexical units and sentence units included in the document, and based on a semantic understanding model, the semantic connotations of the lexical units and sentence units are deeply mined according to the context information of the lexical units, and the semantic information in the document is mapped to corresponding semantic feature vectors. Finally, with the help of data association technology, the original text, the determined metadata, and the generated semantic feature vectors of the bank professional knowledge document are associated and integrated through the identifiers of each document in the document to generate a report document knowledge base.

[0071] Exemplarily, assuming that a bank wants to build a knowledge base for credit business report documents, historical credit business report documents and relevant credit business system rules in the past few years can be collected as initial bank professional knowledge documents. After parsing and processing these documents, content entities such as loan amount and loan term are located, metadata is determined, semantic feature vectors are mined, and finally a knowledge base is integrated and generated.

[0072] S120. By identifying and analyzing the report document knowledge base, N report modules corresponding to the report document knowledge base are obtained through division.

[0073] Among them, different report modules are used to generate content of different parts in the report document.

[0074] In this step, first, according to the semantic feature vectors and metadata in the report document knowledge base, the semantic similarity between each document is calculated, and the documents are divided into different candidate sets of report modules based on this similarity.

[0075] Then, the structural feature (such as paragraph layout and chapter setting) and syntactic relationship feature (such as the subject-predicate-object structure of sentences and the use of conjunctions) of the documents in each candidate set are carefully analyzed to clarify the hierarchical structure and logical association of different parts of the documents. By identifying structural elements such as titles, paragraphs, and lists in the documents, key entity information is refined, and this information can clearly reflect the core descriptive content of different parts of the documents.

[0076] After that, based on the hierarchical structure, logical association, and core descriptive information, the documents in each candidate set are summarized to generate a module description that can reflect the role and function of the set in the report document.

[0077] Again, according to the module descriptions, document content, and preset scoring rules of each candidate set, target document fragments are selected from the candidate sets as module examples.

[0078] Finally, according to the module description and module examples, determine the module verification criteria for each candidate set from the preset verification rules. Refer to the consistency of the module description, module examples, and module verification criteria, and determine N report modules corresponding to the report document knowledge base in each candidate set.

[0079] S130. Integrate N report modules to construct a report document generation agent for the report document generation model.

[0080] In this step, for each report module, functional features, core key point features, and expected content features can be extracted according to its module description. Input these features into a large language model to guide the large language model to generate a prompt word template corresponding to each report module.

[0081] Based on the generated prompt word template and the module examples of the report module, fine-tune and train the initial language model to obtain a report document content generation sub-agent corresponding to each report module.

[0082] Convert the module verification criteria corresponding to each report module into code logic that can be executed by a computer, construct a verification algorithm for each module verification criteria, and generate a report document content verification sub-agent for each report module based on these algorithms.

[0083] Deeply analyze the overall framework of the report document and the internal correlation relationship between each report module. Based on this, determine the work processes of each report document content generation sub-agent and each report document content verification sub-agent, and then generate a report document synthesis agent adapted to this work process.

[0084] Finally, integrate the report document synthesis agent, the report document content generation sub-agents corresponding to each report module, and the report document content verification sub-agents corresponding to each report module to construct a report document generation agent for the report document generation model.

[0085] Exemplarily, assume that it is necessary to construct a report document generation agent for the annual comprehensive business report of a bank, and the report modules are divided into three modules: "savings business", "credit business", and "intermediate business". Taking the "savings business" report module as an example:

[0086] First, according to the module description, its functional feature can be determined to be showing the overall situation of the savings business. The core key point features include types of savings, interest rate levels, customer groups, etc. The expected content feature is a detailed data statement and trend analysis. Input these features into the large language model to generate a prompt word template similar to "In the role of an introducer of the bank's savings business situation, generate content around keywords such as types of savings, interest rate levels, and customer groups in the format of a data statement plus trend analysis".

[0087] Then, the initial language model is fine-tuned using the prompt template and the example of the "Savings Business" module (such as part of the content about savings business in past savings business reports) to obtain the content generation sub-agent for savings business report documents.

[0088] By the same method, corresponding content generation sub-agents can be generated for the "Credit Business" and "Intermediate Business" modules respectively.

[0089] For the report document content verification sub-agent, taking the "Savings Business" module as an example, the module verification criteria (such as data accuracy, rationality of trend analysis, etc.) are transformed into code logic to construct a verification algorithm. For example, checking whether the data is consistent with the bank system records and whether the trend analysis conforms to the business logic, etc. Based on this, the "Savings Business Report Document Content Verification Sub-agent" is generated. Verification sub-agents for other modules are generated accordingly.

[0090] Next, analyze the overall framework of the report document, determine that the content generation sub-agents of each module generate corresponding content first, then the verification sub-agent conducts content verification, and finally the report document synthesis agent integrates and formats the content that has passed the verification of each module. According to this workflow, the report document synthesis agent is generated.

[0091] Finally, integrate the report document synthesis agent, the report document content generation sub-agents corresponding to the three report modules, and the report document content verification sub-agent to construct the report document generation agent of the report document generation model.

[0092] S140. According to the pre-configured report compilation workflow and the report document generation agent, generate the report document generation model.

[0093] Among them, the report compilation workflow is used to determine the execution order and interaction method among the sub-agents corresponding to each report module in the report document generation agent.

[0094] In this step, the report compilation workflow can be formally described first, and the nodes (representing various work tasks), edges (indicating the direction of the workflow), and conversion rules between nodes (i.e., the triggering conditions for the conversion of work nodes) in the workflow can be obtained from it.

[0095] According to the obtained nodes, edges, and conversion rules, clarify the execution order and interaction method of each report document content generation sub-agent, each report document content verification sub-agent, and the report document synthesis agent.

[0096] Finally, adjust the intelligent agent scheduling parameters in the initial report document generation model according to the determined execution order and interaction method, so as to generate the report document generation model.

[0097] Based on the above steps, a report document knowledge base is constructed based on the knowledge related to the report documents extracted from bank professional knowledge documents, where the bank professional knowledge documents include at least one of historical report documents, bank system rules, and banking business specifications. By identifying and analyzing the report document knowledge base, N report modules corresponding to the report document knowledge base are obtained. Different report modules are used to generate different parts of the content in the report document. The N report modules are integrated to construct a report document generation agent for the report document generation model. According to the pre-configured report compilation workflow and the report document generation agent, the report document generation model is generated. Thereby, the quality and efficiency of the model for generating report documents are improved.

[0098] In a possible implementation manner, the constructing of the report document knowledge base based on the bank professional knowledge documents includes:

[0099] Parse the obtained initial bank professional knowledge documents, and perform format processing on the parsing results of the initial bank professional knowledge documents based on a document format processing tool to generate the bank professional knowledge documents. The initial bank professional knowledge documents come from at least one of bank internal systems and regulatory databases. The initial bank professional knowledge documents include at least one of text documents and image documents. The text documents are parsed based on natural language processing, and the image documents are parsed based on optical character recognition (OCR).

[0100] Locate the content entities in the bank professional knowledge documents through predefined syntax rules and syntax patterns, and determine the metadata of the bank professional knowledge documents from the entities based on the frequency, positional relationship, and context information of the word segmentation in the bank professional knowledge documents.

[0101] Use a pre-trained word vector model to obtain the lexical units and sentence units included in the bank professional knowledge documents, and deeply mine the semantic connotations of the lexical units and the sentence units based on a semantic understanding model according to the context information of the lexical units, so as to map the semantic information in the bank professional knowledge documents into corresponding semantic feature vectors.

[0102] With the help of data association technology, associate and integrate the original text of the bank professional knowledge documents, the determined metadata, and the generated semantic feature vectors through the identifiers of each document in the bank professional knowledge documents to generate the report document knowledge base.

[0103] In this embodiment, initial bank professional knowledge documents can be obtained from at least one channel such as the bank's internal system, regulatory database, etc. These documents include at least one type of text document and image document. For text documents, natural language processing techniques are used for parsing to convert the text into a structured representation that can be understood by a computer, such as lexical analysis, syntactic analysis, and other operations. For image documents, OCR technology is used for parsing. First, the image is preprocessed, such as grayscale conversion, binarization, noise reduction, etc. to improve the image quality. Then, the text area is located and geometric correction is performed. Finally, the OCR recognition model is used to extract text information. After parsing, a document format processing tool is used to process the parsing results, unify the data format, and generate bank professional knowledge documents that meet the requirements.

[0104] Then, according to predefined grammar rules and grammar patterns, content entities with specific structures or features can be searched for and located in the bank professional knowledge documents. For example, identify table areas with a fixed grammar structure in the document, and extract the row and column headers of the table as entity attribute labels; analyze the numerical types and unit symbols of the table cell data and associate them with the attribute labels to form structured fields. At the same time, detect the logical connectives between consecutive paragraphs in the document, and accordingly divide the dependency relationship chain of the content entities. After that, combining the frequency of word segmentation in the document, the positional relationship in the document, and the context information, metadata that can represent the key information of the document is screened and determined from these located entities. These metadata can be the document theme, key indicators, important time nodes, etc.

[0105] Next, a pre-trained word vector model can be used to decompose the text in the bank professional knowledge document into lexical units and sentence units, and generate corresponding vector representations for each lexical unit and sentence unit. These pre-trained models have learned rich language knowledge on large-scale text data and can provide effective semantic representations for words and sentences. After that, based on the semantic understanding model, combined with the context information of the lexical units, the semantic connotations of each lexical unit and sentence unit are further explored and understood. The semantic understanding model can capture semantic relationships between words, semantic structures of sentences, and other information. Finally, these deeply understood semantic information is mapped into corresponding semantic feature vectors, which will be used as a digital representation of the document semantic information for subsequent analysis and processing.

[0106] Then, using data association technology, through the unique identifiers of each document in the bank's professional knowledge documents, an association relationship is established among the original text content of the documents, the previously determined metadata, and the generated semantic feature vectors. For example, an identifier can be assigned to each document, and in the database, the tables storing the original text of the documents, the tables storing the metadata, and the tables storing the semantic feature vectors are associated through this identifier. Through this association and integration, different types of but interrelated information are integrated together to form a complete report document knowledge base, which can comprehensively store and represent various knowledge related to the report documents.

[0107] Exemplarily, assume that a bank wants to build a knowledge base for risk management report documents. First, historical risk management reports (text documents) for the past few years can be obtained from the bank's internal system, and relevant risk management system regulations (partially image documents) can be obtained from the regulatory database as initial bank professional knowledge documents. The text documents are parsed through natural language processing, and the image documents are parsed through OCR. Then, a document format processing tool is used to unify the format to generate bank professional knowledge documents. Next, content entities such as risk indicator tables and risk event description paragraphs in the documents are found according to predefined grammar rules, and metadata such as risk types and risk occurrence times are determined in combination with word segmentation information. Then, a pre-trained word vector model and a semantic understanding model are used to convert the words and sentences in the documents into semantic feature vectors. Finally, the original text of the documents, the metadata, and the semantic feature vectors are associated and integrated through document identifiers to form a risk management report document knowledge base, providing comprehensive data support for the construction of subsequent report generation models.

[0108] In a possible implementation manner, the identification and analysis of the report document knowledge base are performed to divide the report document knowledge base into N corresponding report modules, including:

[0109] Based on the semantic feature vectors and the metadata in the report document knowledge base, calculate the semantic similarity between each document in the report document knowledge base, and divide the documents in the report document knowledge base into different candidate sets of report modules based on the semantic similarity;

[0110] Analyze the structural features and syntactic relationship features of the documents included in each candidate set of report modules to determine the hierarchical structure and logical association of different parts of each document, and extract key entity information by identifying structural elements such as titles, paragraphs, and lists in each document, where the key entity information is used to clarify the core description information of different parts of each document;

[0111] Summarize the documents in each candidate set of report modules based on the hierarchical structure, the logical association, and the core description information to generate a module description for each candidate set of report modules, where the module description is used to reflect the role and function of the modules in the candidate set of report modules in the report document;

[0112] Based on the module descriptions in each candidate set of report modules, the content of the documents in each candidate set of report modules, and a preset scoring rule, determine the target document fragments in each candidate set of report modules as the module examples for each candidate set of report modules;

[0113] According to the module descriptions and module examples in each candidate set of report modules, determine the module verification criteria for each candidate set of report modules from the preset verification rules, where the module verification criteria are used to clarify the generation accuracy and integrity of each module in the candidate set of report modules;

[0114] With reference to the consistency of the module descriptions, module examples, and module verification criteria corresponding to each module in each candidate set of report modules, determine the N report modules corresponding to the report document knowledge base in each candidate set of report modules.

[0115] In this embodiment, first, from the semantic feature vectors contained in the report document knowledge base, the sentence vectors corresponding to the sentence units of each document are extracted. These sentence vectors can reflect the semantic information of the sentences. For example, for the two sentences "The adjustment of bank deposit interest rates affects customers' savings behavior" and "The bank launches new financial products to attract customers", their vectors will show semantic differences. Then, these sentence vectors are aggregated through a weighted average algorithm to obtain the document-level semantic vector. In this process, weights can be set according to factors such as the importance of the sentence in the document. For example, sentences in paragraphs that elaborate on the core idea are given higher weights. At the same time, a set of keywords is found from the metadata, and by calculating the overlap of keywords between each document, the keyword overlap rate is obtained. For example, if the keywords of document A are "bank loans, interest rates, enterprises" and the keywords of document B are "loan business, interest rate adjustment, small and medium-sized enterprises", the overlap degree between them can be calculated. Then, according to the pre-set weight distribution strategy, the similarity value (such as cosine similarity) calculated based on the document-level semantic vector and the keyword overlap rate are weighted and fused to obtain the comprehensive semantic similarity score between each document. This score can more comprehensively reflect the semantic similarity degree between documents. Based on the comprehensive semantic similarity score, a document similarity matrix is constructed, and the elements in the matrix represent the similarity between each document. Finally, the spectral clustering algorithm is used to perform unsupervised clustering analysis on this matrix, so that documents with high semantic similarity are clustered together to form a preliminary document clustering result. Then, according to the characteristics such as the density distribution of each cluster and the distance between clusters in the clustering result, the clustering parameters are dynamically adjusted, and the document clusters are re-divided until the variance of the comprehensive semantic similarity scores of the documents within each cluster is lower than the pre-set threshold, and thus different candidate sets of report modules are obtained. For example, in a knowledge base containing various banking business reports, documents related to credit card business will be grouped into the same candidate set of report modules due to their high semantic similarity.

[0116] Then, the documents in each candidate set of report modules can be structurally analyzed. For example, syntactic analysis techniques in natural language processing are used to parse the grammatical structure of the document to determine the subject-predicate-object and other grammatical relationships between sentences. The hierarchical structure is determined by identifying the title levels in the document. For example, which second-level headings and paragraphs are included under the first-level heading. For list structures, analyze the logical relationships between list items, whether they are parallel or progressive relationships, etc. Key entity information is extracted from these structural elements. For example, in a document about bank loan business, through the title "Loan Customer Classification" and the following paragraph description, key entity information such as "large enterprise customers" and "small and medium-sized enterprise customers" can be extracted, which clarifies the core description content of this part of the document.

[0117] Next, the hierarchical structure, logical associations, and core description information of the documents in a candidate set of report modules can be integrated. For example, the documents in a candidate set of report modules mainly focus on the deposit business of a bank and elaborate on information such as deposit product types, interest rate policies, and customer groups from different aspects. By sorting out and summarizing this information, the generated module description can be "This module mainly introduces information related to various deposit businesses of the bank, including the characteristics of different deposit products, applicable customer groups, and corresponding interest rate policies, providing basic information for a comprehensive understanding of the bank's deposit business and serving as the core description part of the deposit business section in the report document", thereby reflecting the role and function of this module in the report document.

[0118] After that, the parts in the document content with a high degree of matching with the module description can be determined. For example, for the above-mentioned deposit business module, the module description emphasizes key information such as deposit product types and interest rate policies. Then, in the document content, search for fragments that contain these key information and are clearly and completely expressed. The preset scoring rules can be formulated based on factors such as the frequency of keyword occurrence and the logical coherence between the fragment and the module description. For example, a document fragment that details various deposit products and their corresponding interest rate policies, highly matches the module description, and obtains a high score according to the scoring rules, can be determined as a module example of this candidate set of report modules.

[0119] Compare the module descriptions, module examples, and module verification criteria in each candidate set of report modules. If these three in a candidate set of report modules are consistent in terms of theme, key information, etc., for example, all focus on the bank's loan business, the module description accurately summarizes the content related to the loan business, the module example can well reflect this content, and the module verification criteria are also consistent with it, then this candidate set of report modules can be determined as a report module. By performing such consistency checks on all candidate sets of report modules, N report modules corresponding to the report document knowledge base are finally determined.

[0120] In a possible implementation manner, the report document generation agent includes a report document synthesis agent, a report document content generation sub-agent corresponding to each of the report modules, and a report document content verification sub-agent; the report document generation agent for constructing a report document generation model according to the N report modules includes:

[0121] According to the module descriptions of the respective report modules, obtain the functional characteristics, core point characteristics, and expected content characteristics of the respective report modules, and input the functional characteristics, the core point characteristics, and the expected content characteristics into a large language model to guide the large language model to generate a prompt word template corresponding to each of the report modules;

[0122] Fine-tune and train the initial language model based on the prompt template and the module examples of the reporting module to generate report document content generation sub-intelligent agents corresponding to each reporting module;

[0123] Convert the module verification criteria corresponding to each reporting module into executable code logic to construct verification algorithms corresponding to each module verification criterion, and generate report document content verification sub-intelligent agents corresponding to each reporting module based on each verification algorithm;

[0124] By deeply mining the overall framework of the report document and the correlation relationship between each reporting module, and based on the overall document framework and the correlation relationship, determine the working processes of each report document content generation sub-intelligent agent and each report document content verification sub-intelligent agent, and generate a report document synthesis intelligent agent related to the working process;

[0125] Construct the report document generation intelligent agent of the report document generation model according to the report document synthesis intelligent agent, the report document content generation sub-intelligent agents corresponding to each reporting module, and the report document content verification sub-intelligent agents corresponding to each reporting module.

[0126] In this embodiment, the functional features, core key point features, and expected content features can be extracted first according to the module descriptions of each reporting module. For example, for the "bank credit business analysis" module, features such as "analyze and interpret credit business data" are refined from the module description, and these features are input into the large language model to generate corresponding prompt templates, such as templates like "analyze and interpret around the core key points of the credit business and present the results in a specific form".

[0127] Then, use the generated prompt template and module examples to fine-tune and train the initial language model. Taking the past reports of the "bank credit business analysis" module as an example, let the initial language model learn the content style, structure, and professional expression in the examples, so that it can generate content that conforms to the module characteristics, and then generate report document content generation sub-intelligent agents corresponding to each reporting module.

[0128] After that, convert the module verification criteria of each reporting module into executable code logic. For example, the verification criteria of the "bank credit business analysis" module, such as covering data for the past year and citing authoritative indicators, write the corresponding code logic to construct a verification algorithm, and generate a report document content verification sub-intelligent agent based on this to automatically verify the generated report content.

[0129] Further explore the overall framework of the in-depth mining report document and the correlation between each report module. For example, the arrangement order and causal relationship of each business module in the bank comprehensive report, and based on this, determine the working processes of the content generation sub-agent and the verification sub-agent for each report document content. First, the content is generated by the content generation sub-agent of each module, and after being verified by the verification sub-agent, it is transmitted to the report document synthesis agent, which integrates the content according to the framework and correlation.

[0130] Finally, integrate the report document synthesis agent, the report document content generation sub-agent corresponding to each report module, and the report document content verification sub-agent. By establishing a unified interface, the sub-agents are combined in a predetermined cooperation manner to form a complete intelligent agent system, and the report document generation agent of the report document generation model is constructed to generate report documents efficiently and accurately.

[0131] In a possible implementation manner, the generating the report document generation model according to the report compilation workflow and the report document generation agent includes:

[0132] By formalizing the report compilation workflow, obtain the nodes, edges, and conversion rules between the nodes in the report compilation workflow. The nodes represent working nodes, the edges represent the working flow direction, and the conversion rules represent the trigger conditions for the conversion of working nodes.

[0133] According to the nodes, the edges, and the conversion rules, determine the execution order and the interaction method of each report document content generation sub-agent, each report document content verification sub-agent, and the report document synthesis agent.

[0134] Based on the execution order and the interaction method, adjust the intelligent agent scheduling parameters in the initial report document generation model to generate the report document generation model.

[0135] In this embodiment, assume that a bank annual comprehensive report needs to be generated, which involves multiple report modules such as credit business, deposit business, and financial status. The report document generation agent has been constructed, and now the report document generation model is generated in combination with the report compilation workflow.

[0136] First, formally describe the report compilation workflow. Taking the compilation process of the bank's annual comprehensive report as an example, the starting node of the workflow is "data collection", which collects the original data from various business systems; nodes such as "credit business analysis", "deposit business analysis", and "financial condition analysis" are carried out in parallel to process the corresponding businesses respectively; then they converge to the "report integration" node to integrate the analysis results of each part; finally, it reaches the "report review" node. The edges represent the workflow direction, pointing from the "data collection" node to each business analysis node respectively, each business analysis node to the "report integration" node, and the "report integration" node to the "report review" node. In terms of transformation rules, after the "data collection" node completes data collection, it triggers each business analysis node to start working; after each business analysis node completes the analysis, it triggers the "report integration" node; after "report integration" is completed, it triggers the "report review" node.

[0137] Next, determine the execution order and interaction method of the agents according to the above nodes, edges and transformation rules. The report document content generation sub-agents corresponding to "credit business analysis", "deposit business analysis", and "financial condition analysis" are started in parallel after "data collection" is completed to generate the report content of their respective business modules, and then the corresponding report document content verification sub-agents verify the generated content. After passing the verification, the results are passed to the report document synthesis agent for integration. After the report document synthesis agent completes the integration, it is submitted to the process responsible for the review link for review.

[0138] Finally, based on the determined execution order and interaction method, adjust the agent scheduling parameters in the initial report document generation model. For example, set the parallel processing quantity of each business content generation sub-agent, set the waiting time for data transfer between the verification sub-agent and the synthesis agent and other parameters. After these adjustments, the final report document generation model is generated, which can coordinate the work of each sub-agent in the report document generation agent according to the compilation workflow of the bank's annual comprehensive report and generate the report efficiently and accurately.

[0139] In a possible implementation manner, the parsing of the image document based on optical character recognition OCR includes:

[0140] Obtain the original image data of the image document, and perform image preprocessing on the original image data through at least one of grayscale processing, binarization processing, and noise elimination processing to generate standardized image data;

[0141] Locate the text area in the standardized image data based on the edge detection algorithm, and perform geometric correction on the inclined or distorted text area using the affine transformation algorithm to generate the corrected text area image;

[0142] Use a pre-trained OCR recognition model to perform character recognition on the corrected text region image, extract the character sequence in the text region image, and correct the character sequence through character-level confidence verification and context semantic verification to generate a preliminary parsed text;

[0143] According to the layout structure features of the image document, logically segment the paragraphs, headings, and tables in the preliminary parsed text, and generate a structured parsed text by aligning and matching with the paragraph markers, heading levels, and table identifiers of the text document;

[0144] Perform cross-modal semantic consistency verification on the structured parsed text and the parsing result of the text document, and manually annotate and correct the semantic ambiguity segments in the structured parsed text according to the verification result to generate the target parsed text of the image document.

[0145] In this embodiment, it is assumed that an image document of a bank loan contract needs to be parsed.

[0146] First, the original image data of the image document can be obtained. This image may have problems such as color interference, uneven brightness, and noise. To generate standardized image data, it can be first grayscaled to convert the color image into a grayscale image, simplifying the image information. For example, the RGB values of each pixel in the image are converted into a single grayscale value according to a certain algorithm. Then, binarization is performed by setting an appropriate threshold to divide the pixels in the image into foreground (text part) and background, making the text part appear black and the background white, further highlighting the text information. At the same time, noise elimination processing is carried out, and algorithms such as Gaussian filtering are used to remove the random noise in the image to make the image clearer.

[0147] Based on an edge detection algorithm, such as the Canny algorithm, locate the text region in the standardized image data and find the contour boundary of the text. If it is found that the text region is tilted or distorted, an affine transformation algorithm is used to perform geometric correction on it. For example, if the document image is tilted due to the scanning angle problem, the transformation matrix is calculated through the affine transformation algorithm to correct the text region to a horizontal and regular state, generating a corrected text region image.

[0148] Use a pre-trained OCR recognition model to perform character recognition on the corrected text region image and extract the character sequence. During the recognition process, through character-level confidence verification, a confidence score is given to each recognized character, and the characters with low confidence are marked. Then, combined with context semantic verification, the marked characters are corrected according to the semantic logic of the context to generate a preliminary parsed text.

[0149] According to the layout structure features of the loan contract image document, such as paragraph spacing, title font size, etc., logically segment the paragraphs, titles, and tables in the preliminary parsed text. Align and match the segmented content with the paragraph marks, title levels, and table identifiers in the text document of the same loan contract to make the parsing result more structured and generate a structured parsed text.

[0150] Finally, perform cross-modal semantic consistency verification on the structured parsed text and the parsing result of the text document. For example, check whether the key information such as the loan amount and interest rate parsed from the image is consistent with that in the text document. If there are semantic ambiguity segments, such as a certain clause parsed from the image being unclear and different from the text document, manual annotation and correction are carried out, and finally the target parsing text of the image document is generated.

[0151] In a possible implementation manner, calculating the semantic similarity between each document in the report document knowledge base based on the semantic feature vectors and the metadata in the report document knowledge base includes:

[0152] Extract the sentence vectors corresponding to the sentence units of each document from the semantic feature vectors, and aggregate the sentence vectors of each document into a document-level semantic vector through a weighted average algorithm;

[0153] Calculate the first similarity value between each document-level semantic vector based on the cosine similarity algorithm, and calculate the keyword overlap rate between each document as the second similarity value based on the keyword set in the metadata;

[0154] Perform weighted fusion on the first similarity value and the second similarity value according to a preset weight allocation strategy to generate a comprehensive semantic similarity score between each document;

[0155] Construct a document similarity matrix according to the comprehensive semantic similarity score, and perform unsupervised clustering analysis on the document similarity matrix based on the spectral clustering algorithm to generate a document clustering result;

[0156] According to the density distribution characteristics and inter-cluster distance characteristics of each cluster in the document clustering result, dynamically adjust the clustering parameters and re-partition the document clusters until the variance of the comprehensive semantic similarity scores of the documents within each cluster is lower than a preset threshold, and generate the candidate set of the report module.

[0157] In this embodiment, it is assumed that the report document knowledge base contains multiple documents on different bank businesses, such as reports related to credit business, deposit business, wealth management business, etc.

[0158] First, sentence vectors corresponding to each document sentence unit can be extracted from the semantic feature vectors. For example, in a credit business document, there are sentences "Recently, banks have increased their credit support for small and medium-sized enterprises" and "The increase in the non-performing loan ratio has affected the profitability of credit business". Their corresponding sentence vectors are extracted respectively. Then, these sentence vectors are aggregated into a document-level semantic vector through a weighted average algorithm. For example, sentences in important paragraphs are given higher weights. For instance, the weight of a sentence elaborating on the core credit policy is 0.6, and the weight of other auxiliary explanatory sentences is 0.4. Based on this, the document-level semantic vector of the credit business document is calculated.

[0159] Then, based on the cosine similarity algorithm, the first similarity value between each document-level semantic vector is calculated. Suppose the document-level semantic vectors of the credit business document and the deposit business document are calculated, and a numerical value is obtained to represent their similarity at the semantic vector level. At the same time, the keyword overlap rate is calculated based on the keyword set in the metadata as the second similarity value. For example, the keywords of the credit business document are "credit limit, small and medium-sized enterprises, non-performing loans", and the keywords of the deposit business document are "deposit interest rate, customer savings, credit business". Their keyword overlap rate is calculated.

[0160] According to the preset weight distribution strategy, assuming the weight of the first similarity value is 0.6 and the weight of the second similarity value is 0.4, the two are weighted and fused to generate the comprehensive semantic similarity score between each document.

[0161] Based on the comprehensive semantic similarity score, a document similarity matrix is constructed. The elements in the matrix represent the similarity between each document. For example, the element in the i-th row and j-th column of the matrix represents the similarity between the i-th document and the j-th document. Based on the spectral clustering algorithm, unsupervised clustering analysis is performed on the document similarity matrix, and documents with high semantic similarity are grouped together to form a preliminary document clustering result. It may result in, for example, credit business-related documents being grouped into one category, and deposit business-related documents being grouped into one category, etc.

[0162] Finally, view the density distribution characteristics and inter-cluster distance characteristics of each cluster in the document clustering result. If the documents in a certain cluster are relatively dispersed, that is, the density is low, and the distance from other clusters is relatively close, it indicates that the clustering effect is not good. Dynamically adjust the clustering parameters, such as changing the clustering radius or the minimum number of samples, etc., and re-partition the document clusters. Continuously repeat this process until the variance of the comprehensive semantic similarity scores of the documents within each cluster is lower than the preset threshold, and finally generate a candidate set of report modules, such as forming candidate sets of different report modules for credit business, deposit business, wealth management business, etc.

[0163] In a possible implementation manner, inputting the functional feature, the core key feature, and the expected content feature into a large language model to guide the large language model to generate a prompt word template corresponding to each of the report modules includes:

[0164] Converting the functional feature into a module role description statement, converting the core key feature into a keyword constraint list, and converting the expected content feature into a content generation format specification;

[0165] Based on a preset template generation rule, concatenating the module role description statement, the keyword constraint list, and the content generation format specification in sequence into an initial prompt word sequence;

[0166] Performing grammar optimization and semantic enhancement processing on the initial prompt word sequence through the large language model to generate a candidate prompt word template set;

[0167] Using the module example as a verification sample, generating simulated content through the large language model based on the candidate prompt word template, and calculating the content overlap degree and logical coherence index between the simulated content and the module example;

[0168] Selecting a candidate prompt word template with a content overlap degree higher than a first preset threshold and a logical coherence index higher than a second preset threshold as the prompt word template corresponding to the report module.

[0169] In this embodiment, it is assumed that there is a report module of "Bank Customer Credit Assessment Report". First, its functional feature can be determined as "assessing the credit status of bank customers", and it is converted into a module role description statement: "You are a professional bank customer credit assessor"; the core key features include "credit record, income level, debt situation", and are converted into a keyword constraint list: "credit record, income level, debt situation"; the expected content feature is "giving a credit score out of 100 points and grading it, and elaborating the evaluation basis in paragraphs", and is converted into a content generation format specification: "Giving a customer credit score out of 100 points, dividing the credit grade (excellent, good, average, poor), and elaborating each evaluation basis in clear paragraphs".

[0170] Then, according to the preset template generation rule, the module role description statement, the keyword constraint list, and the content generation format specification are concatenated in sequence into an initial prompt word sequence: "You are a professional bank customer credit assessor, around key points such as credit record, income level, and debt situation, give a customer credit score out of 100 points, divide the credit grade (excellent, good, average, poor), and elaborate each evaluation basis in clear paragraphs".

[0171] Then, input this initial prompt sequence into the large language model, and the large language model performs grammar optimization and semantic enhancement processing on it to generate a set of candidate prompt templates. For example, the model may optimize the statement expression to make the semantics clearer and more accurate, generating multiple candidate prompt templates with different expressions but similar meanings.

[0172] Use the module example of this reporting module as a verification sample. This module example is a past bank customer credit assessment report. The large language model generates simulated content based on each candidate prompt template. After generating the simulated content, calculate the content overlap and logical coherence metrics between the simulated content and the module example. For example, check whether the simulated content mentions the key credit assessment factors in the module example, and whether the logic in elaborating the assessment basis is clear and well-organized.

[0173] Finally, assuming that the first preset threshold is set at 70% and the second preset threshold is set at 80%, then templates with a content overlap higher than 70% and a logical coherence metric higher than 80% can be selected from the candidate prompt templates as the prompt templates corresponding to the "bank customer credit assessment report" module. This prompt template will be used for subsequent fine-tuning training of the initial language model to generate report content that meets the requirements of this module.

[0174] In a possible implementation manner, when locating the content entities in the bank professional knowledge document through predefined grammar rules and grammar patterns, this method may further include:

[0175] Identify the table areas in the bank professional knowledge document with fixed grammar structures, and extract the row and column headers in the table areas as entity attribute labels;

[0176] Analyze the numerical types and unit symbols of the cell data in the table area, and associate the numerical types and the unit symbols with the entity attribute labels to form structured fields;

[0177] Detect the logical connectives between consecutive paragraphs in the bank professional knowledge document, and divide the dependency relationship chains of the content entities according to the logical connectives;

[0178] Map the structured fields and the dependency relationship chains to a preset entity relationship graph to generate a multi-level semantic association network of the content entities;

[0179] Based on the multi-level semantic association network, perform entity alignment on the cross-chapter content that cross-references each other in the bank professional knowledge document, and eliminate the entity nodes with duplicate descriptions.

[0180] In this embodiment, it is assumed that there is a professional knowledge document of a bank regarding loan business. First, it is possible to identify the table areas with fixed grammar structures in the document. For example, there is a table in the document showing information on different types of loan products. The row headings of the table are "Loan Product Name", "Interest Rate", "Loan Term", etc., and the column headings correspond to different types of loan products. These row and column headings are extracted as entity attribute tags, which represent different dimensions of the information related to loan products.

[0181] Next, analyze the numerical types and unit symbols of the cell data within the table area. In the column of "Interest Rate", the numerical type of the cell data is a decimal, and the unit symbol is "%". Associate it with the entity attribute tag of "Interest Rate" to form a structured field such as "Interest Rate (numerical type: decimal, unit: %)"; the data in the "Loan Term" column has an integer numerical type and the unit is "month", forming a structured field of "Loan Term (numerical type: integer, unit: month)".

[0182] Then, detect the logical connectives between consecutive paragraphs in the document. For example, in the paragraph describing the loan approval process, logical connectives such as "First", "Second", "Then" appear. Based on these connectives, the dependency relationship chain of the content entities can be divided: first collect customer information, second conduct credit assessment, and then make an approval decision, clarifying the sequence and dependency relationship between each link.

[0183] After that, map the generated structured fields and the dependency relationship chain to a preset entity relationship graph. This graph may already contain the relationship framework of various entities in the bank loan business. Incorporate structured fields such as "Loan Product", "Interest Rate", "Loan Term", etc., and the dependency relationship chain of the loan approval process into it to generate a multi-level semantic association network of content entities, enabling the information related to the loan business to be interconnected and hierarchical in one network.

[0184] Finally, based on this multi-level semantic association network, perform entity alignment on the cross-chapter content that cross-references each other in the document. For example, the entity of "high-quality customers" is mentioned in both the chapter introducing different loan products and the chapter on the loan approval process. Through entity alignment using the semantic association network, eliminate the duplicate entity nodes of the description, avoid information redundancy, and make the knowledge structure of the entire document clearer and more unified, providing a more efficient basis for subsequent knowledge processing and application.

[0185] In the above embodiments, the construction system for the report document generation model for implementing the above method embodiments includes at least one processor, a control module (chipset) coupled to at least one of the (at least one) processors, a memory coupled to the control module, a non-volatile memory (NVM) / storage device coupled to the control module, at least one input / output device coupled to the control module, and a network interface coupled to the control module.

[0186] The processor may include at least one single-core or multi-core processor, and the processor may include any combination of general-purpose processors or dedicated processors (such as graphics processors, application processors, baseband processors, etc.). For some alternative embodiments, the construction system of the report document generation model can be used as the construction system device of the report document generation model such as the gateway described in the embodiments of the present application.

[0187] For some alternative embodiments, the construction system of the report document generation model may include at least one computer-readable medium having instructions (e.g., a memory or an NVM / storage device) and at least one processor integrated with the at least one computer-readable medium and configured to execute the instructions to implement modules to perform the actions described in the present disclosure.

[0188] For one embodiment, the control module may include any suitable interface controller to provide any suitable interface to at least one of the (at least one) processors and / or any suitable device or component communicating with the control module.

[0189] The control module may include a memory controller module to provide an interface to the memory. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0190] The memory may be used, for example, to load and store data and / or instructions for the construction system of the report document generation model. For one embodiment, the memory may include any suitable volatile memory, e.g., suitable DRAM.

[0191] For one embodiment, the control module may include at least one input / output controller to provide an interface to the NVM / storage device and the (at least one) input / output device.

[0192] For example, the NVM / storage device may be used to store data and / or instructions. The NVM / storage device may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (at least one) non-volatile storage device (e.g., at least one hard disk drive (HDD), at least one compact disc (CD) drive, and / or at least one digital versatile disc (DVD) drive).

[0193] The NVM / storage device may include storage resources that are physically part of the device on which the construction system for the report document generation model is installed, or it may be accessible by the device without being part of the device. For example, the NVM / storage device may be accessed via (at least one) input / output device according to a network.

[0194] (At least one) input / output device may provide an interface for the construction system of the report document generation model to communicate with any other suitable device. The input / output device may include a communication component, a pinyin component, a sensor component, etc. The network interface may provide an interface for the construction system of the report document generation model to communicate according to at least one network. The construction system of the report document generation model may wirelessly communicate with at least one component of the wireless network according to any standard and / or protocol in at least one wireless network standard and / or protocol, such as accessing a wireless network according to a communication standard.

[0195] For one embodiment, at least one of the (at least one) processors may be logically loaded together with at least one controller of the control module (e.g., the memory controller module). For one embodiment, at least one of the (at least one) processors may be logically loaded together with at least one controller of the control module to form a system-level load. For one embodiment, at least one of the (at least one) processors may be logically integrated with at least one controller of the control module on the same die. For one embodiment, at least one of the (at least one) processors may be logically integrated with at least one controller of the control module on the same die to form a system-on-chip (SoC).

[0196] The embodiments of the present application have been introduced in detail above. Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.

[0197] An embodiment of the present invention discloses a computer-readable storage medium that stores a computer program for electronic data exchange. Wherein, the computer program enables the computer to execute the steps in the method for constructing a report document generation model described in the foregoing embodiments.

[0198] An embodiment of the present invention discloses a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable the computer to execute the steps in the method for constructing a report document generation model described in the foregoing embodiments.

[0199] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative labor.

[0200] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, and the storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disk memories, tape memories, or any other medium that can be used for a computer to have or store data.

[0201] Finally, it should be noted that: the above-disclosed is only the preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for constructing a report document generation model, characterized in that: include: Building a report document knowledge base based on report document related knowledge extracted from bank professional knowledge documents, wherein the bank professional knowledge documents include at least one of historical report documents, bank system rules, and bank business specifications; By identifying and analyzing the report document knowledge base, N report modules corresponding to the report document knowledge base are obtained, and different report modules are used to generate different parts of the content in the report document; Fusing the N report modules to construct a report document generation agent of a report document generation model; The report document generation model is generated according to the preconfigured report preparation workflow and the report document generation agent. The report preparation workflow is used to determine the execution order and interaction mode between the sub-agents corresponding to each of the report modules in the report document generation agent.

2. The method for constructing a report document generation model according to claim 1, characterized in that: The report document knowledge base is constructed based on the bank's professional knowledge documents, including: Parsing the acquired initial banking professional knowledge document, and formatting the parsed result of the initial banking professional knowledge document based on a document formatting tool to generate the banking professional knowledge document, wherein the initial banking professional knowledge document comes from at least one channel in a bank's internal system and a regulatory database, and the initial banking professional knowledge document includes at least one of a text document and an image document, wherein the text document is parsed based on natural language processing, and the image document is parsed based on optical character recognition (OCR); Locating content entities in the banking expertise document through predefined grammatical rules and grammatical patterns, and determining metadata of the banking expertise document from the entities based on the frequency, positional relationship, and contextual information of the word segments in the banking expertise document; A pre-trained word vector model is used to obtain vocabulary units and sentence units included in the banking professional knowledge document, and based on a semantic understanding model, the semantic connotations of the vocabulary units and the sentence units are deeply mined according to the context information of the vocabulary units, so as to map the semantic information in the banking professional knowledge document into a corresponding semantic feature vector; By means of data association technology, the original text of the banking professional knowledge document, the determined metadata, and the generated semantic feature vector are associated and integrated through the identification of each document in the banking professional knowledge document to generate the report document knowledge base.

3. The method for constructing a report document generation model according to claim 2, characterized in that: The N report modules corresponding to the report document knowledge base are obtained by identifying and analyzing the report document knowledge base, including: Based on the semantic feature vector and the metadata in the report document knowledge base, calculating the semantic similarity between the documents in the report document knowledge base, and dividing the documents in the report document knowledge base into different report module candidate sets based on the semantic similarity; Analyze the structural features and grammatical relationship features of the documents included in each of the candidate sets of the report modules to determine the hierarchical structure and logical association of different parts in each of the documents, and extract key entity information by identifying structural elements such as titles, paragraphs, lists, etc. in each of the documents, wherein the key entity information is used to clarify the core description information of different parts in each of the documents; Based on the hierarchical structure, the logical association, and the core description information, summarize the documents in each of the report module candidate sets, and generate module descriptions of each of the report module candidate sets, wherein the module descriptions are used to reflect the roles and functions of the modules in the report module candidate sets in the report documents; Based on the module descriptions in each of the report module candidate sets, the contents of the documents in each of the report module candidate sets, and a preset scoring rule, determine a target document fragment in each of the report module candidate sets as a module example of each of the report module candidate sets; According to the module descriptions and module examples in each of the report module candidate sets, the module verification standard of each of the report module candidate sets is determined from the preset verification rules, and the module verification standard is used to clarify the generation accuracy and completeness of each module in the report module candidate set; Referring to the consistency of the module description, module example, and module verification standard corresponding to each module in each of the report module candidate sets, N report modules corresponding to the report document knowledge base are determined in each of the report module candidate sets.

4. The method for constructing a report document generation model according to claim 3, characterized in that: The report document generation agent includes a report document synthesis agent, a report document content generation sub-agent corresponding to each of the report modules, and a report document content verification sub-agent; the report document generation agent that constructs a report document generation model according to the N report modules includes: According to the module description of each of the report modules, functional features, core features, and expected content features of each of the report modules are obtained, and the functional features, core features, and expected content features are input into a large language model to guide the large language model to generate a prompt word template corresponding to each of the report modules; Based on the prompt word template and the module examples of the report module, fine-tune the initial language model to generate a report document content generation sub-agent corresponding to each of the report modules; Convert the module verification standards corresponding to each of the report modules into executable code logic to construct verification algorithms corresponding to each of the module verification standards, and generate report document content verification sub-agents of the corresponding report modules based on each of the verification algorithms; By deeply mining the association relationship between the overall framework of the report document and each of the report modules, and based on the overall framework of the document and the association relationship, determining the workflow of each of the report document content generation sub-agents and each of the report document content verification sub-agents, a report document synthesis agent related to the workflow is generated; The report document generation agent of the report document generation model is constructed based on the report document synthesis agent, the report document content generation sub-agent corresponding to each of the report modules, and the report document content verification sub-agent corresponding to each of the report modules.

5. The method for constructing a report document generation model according to claim 4, characterized in that: The step of generating the report document generation model according to the report preparation workflow and the report document generation agent comprises: By formally describing the report preparation workflow, nodes, edges, and conversion rules between the nodes in the report preparation workflow are obtained, wherein the nodes represent work nodes, the edges represent workflow directions, and the conversion rules represent triggering conditions for work node conversion; Determine the execution order and the interaction mode of each of the report document content generation sub-agents, each of the report document content verification sub-agents, and the report document synthesis agent according to the nodes, the edges, and the conversion rules; Based on the execution order and the interaction mode, the agent scheduling parameters in the initial report document generation model are adjusted to generate the report document generation model.

6. The method for constructing a report document generation model according to claim 2, characterized in that: The step of parsing the image document based on optical character recognition (OCR) includes: Acquire the original image data of the image document, and perform image preprocessing on the original image data by at least one of grayscale processing, binarization processing, and noise elimination processing to generate standardized image data; Locating the text area in the standardized image data based on an edge detection algorithm, and geometrically correcting the tilted or distorted text area using an affine transformation algorithm to generate a corrected text area image; Using a pre-trained OCR recognition model to perform text recognition on the corrected text area image, extracting a text sequence in the text area image, and performing error correction processing on the text sequence through character-level confidence verification and context semantic verification to generate a preliminary parsed text; According to the layout structure features of the image document, the paragraphs, titles, and tables in the preliminary parsed text are logically segmented, and the structured parsed text is generated by aligning and matching the paragraph marks, title levels, and table marks of the text document; The structured parsed text and the parsing results of the text document are subjected to a cross-modal semantic consistency check, and the semantically ambiguous segments in the structured parsed text are manually annotated and corrected according to the check results to generate a target parsed text of the image document.

7. The method for constructing a report document generation model according to claim 3, characterized in that: The calculating the semantic similarity between the documents in the report document knowledge base based on the semantic feature vector and the metadata in the report document knowledge base includes: Extracting sentence vectors corresponding to sentence units of each of the documents from the semantic feature vectors, and aggregating the sentence vectors of each of the documents into a document-level semantic vector by a weighted average algorithm; Calculating a first similarity value between each of the document-level semantic vectors based on a cosine similarity algorithm, and calculating a keyword overlap rate between each of the documents based on a keyword set in the metadata as a second similarity value; Performing weighted fusion on the first similarity value and the second similarity value according to a preset weight allocation strategy to generate a comprehensive semantic similarity score between the documents; Constructing a document similarity matrix according to the comprehensive semantic similarity score, and performing unsupervised clustering analysis on the document similarity matrix based on a spectral clustering algorithm to generate a document clustering result; According to the density distribution characteristics of each cluster and the inter-cluster distance characteristics in the document clustering results, the clustering parameters are dynamically adjusted and the document clusters are re-divided until the variance of the comprehensive semantic similarity scores of the documents within each cluster is lower than a preset threshold, and the candidate set of the report module is generated.

8. The method for constructing a report document generation model according to claim 4, characterized in that: The step of inputting the functional features, the core features, and the expected content features into a large language model to guide the large language model to generate prompt word templates corresponding to each of the report modules includes: Convert the functional features into module role description statements, convert the core features into keyword constraint lists, and convert the expected content features into content generation format specifications; Based on a preset template generation rule, the module role description statement, the keyword constraint list, and the content generation format specification are sequentially spliced ​​into an initial prompt word sequence; Performing grammatical optimization and semantic enhancement processing on the initial prompt word sequence through the large language model to generate a candidate prompt word template set; Using the module example as a verification sample, generating simulated content based on the candidate prompt word template through the large language model, and calculating the content overlap and logical coherence index between the simulated content and the module example; A candidate prompt word template whose content overlap degree is higher than a first preset threshold and whose logical coherence index is higher than a second preset threshold is selected as the prompt word template corresponding to the report module.

9. The method for constructing a report document generation model according to claim 2, characterized in that: When locating the content entity in the banking professional knowledge document by using the predefined grammatical rules and grammatical patterns, it also includes: Identifying a table area with a fixed grammatical structure in the banking professional knowledge document, and extracting row and column headings in the table area as entity attribute labels; Analyze the value type and unit symbol of the cell data in the table area, and associate the value type and the unit symbol with the entity attribute tag to form a structured field; Detecting logical connectives between consecutive paragraphs in the banking professional knowledge document, and dividing the dependency chain of the content entity according to the logical connectives; Mapping the structured fields and the dependency chain to a preset entity relationship graph to generate a multi-level semantic association network of the content entity; Based on the multi-level semantic association network, entity alignment is performed on the cross-section contents that reference each other in the banking professional knowledge document to eliminate entity nodes with repeated descriptions.

10. A system for constructing a report document generation model, characterized in that: The construction system of the report document generation model includes a processor and a memory, the memory is connected to the processor, the memory is used to store programs, instructions or codes, and the processor is used to execute the programs, instructions or codes in the memory to implement the construction method of the report document generation model described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Template-based document generation device and method, equipment and storage medium

    CN117034899A

  • Construction method and device of multi-component data agent

    CN119398092A

  • Enterprise transformation diagnosis report generation method based on large model

    CN119538895A

  • Machine learning automation of network resource workflows

    US20240403328A1

Cited By

  • Document outline generation method and system, terminal and medium

    CN120911406A

  • Authentication report rapid generation method based on intelligent report template

    CN121390021A

  • Newspaper picture color optimization intelligent model construction method

    CN121437762A