Report generation method and apparatus
Patent Information
- Application Number
- CN202411529400.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2044-10-30
AI Technical Summary
在审批过程中,需要结合公司的财务状况及所属行业情况进行分析评估以生成后续的审查报告,现有方案中审查报告各章节模版固定,无法根据不同公司的规模和所属行业进行格式更改,导致生成的审查报告内容生硬且可能存在错误,生成报告准确性低
[0015] Fifthly, this application provides a computer program product that, when executed by a processor, is used to implement the method as described in any one of the first aspects.
Smart Images

Figure CN119398025B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of report review technology, and in particular to a report generation method and apparatus. Background Technology
[0002] In the bank's risk approval process, approvers need to analyze the company's financial statements from recent years uploaded by the client, and then conduct industry analysis based on information retrieval according to the company's industry. During the approval process, an analysis and evaluation based on the company's financial situation and industry needs to be conducted to generate a subsequent review report. In the existing solution, the templates for each chapter of the review report are fixed, and the format cannot be changed according to the size of different companies and their industries. This results in rigid content in the generated review reports, which may contain errors and have low accuracy. Summary of the Invention
[0003] This application provides a report generation method and apparatus. By vectorizing the name of the company requiring approval and the industry in which the company operates, and then calculating the similarity with multiple report templates in a vector database, a target report template is obtained, which helps to ensure the accuracy of the subsequently generated approval report.
[0004] In a first aspect, embodiments of this application provide a report generation method, applied to a server of a report generation system, the method comprising:
[0005] Receive report generation request information, which includes the company name and industry information of the target company from which the report is to be generated;
[0006] The target index is obtained by vectorizing the company name information and the company industry information;
[0007] A target report template is obtained by performing cosine similarity calculation on the target index and vector database. The target report template includes multiple sub-sections.
[0008] The target report is obtained based on the basic information corresponding to the multiple sub-sections of the target company within the target time period and the target report template.
[0009] Secondly, embodiments of this application provide a report generation apparatus, including:
[0010] The receiving module is used to receive report generation request information, which includes the company name and industry information of the target company from which the report is to be generated;
[0011] The processing module is configured to obtain a target index by vectorizing the company name information and the company industry information; and to obtain a target report template by performing cosine similarity calculation on the target index and the vector database, the target report template including multiple sub-sections; and to obtain a target report based on the basic information of the target company within a target time period corresponding to the multiple sub-sections and the target report template.
[0012] Thirdly, embodiments of this application provide a computer, including:
[0013] A memory, a processor, and executable program code stored in the memory and executable on the processor, wherein the processor executes the executable program code and performs the method as described in any one of the first aspects.
[0014] Fourthly, embodiments of this application provide a computer-readable storage medium storing a report generation program, the report generation program including execution instructions for performing the method as described in any one of the first aspects.
[0015] Fifthly, this application provides a computer program product that, when executed by a processor, is used to implement the method as described in any one of the first aspects.
[0016] By implementing the embodiments of this application, the server of the report generation system first receives report generation request information, which includes the company name and industry information of the target company from which the report is to be generated; then, by vectorizing the company name and industry information, a target index is obtained; by performing cosine similarity calculation on the target index and the vector database, a target report template is obtained, which includes multiple sub-sections; finally, the target report is obtained based on the basic information of the target company within a target time period corresponding to the multiple sub-sections and the target report template. By vectorizing the name of the company requiring approval and its industry, and then performing similarity calculation with multiple report templates in the vector database to obtain the target report template, the accuracy of the subsequently generated approval report is ensured. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.
[0018] Figure 1 This is an architecture diagram of a report generation system provided in an embodiment of this application;
[0019] Figure 2This is a flowchart of a report generation method provided in an embodiment of this application;
[0020] Figure 3 This is a schematic diagram of a report generation request information provided in an embodiment of this application;
[0021] Figure 4 This is a schematic diagram of the format of a report template provided in an embodiment of this application;
[0022] Figure 5 This is a schematic diagram of the format of another report template provided in this application embodiment;
[0023] Figure 6 This is a structural diagram of a report generation device provided in an embodiment of this application;
[0024] Figure 7 This is a structural diagram of a computer provided in an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] The terms "first," "second," and "third," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0027] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0028] In the bank's risk approval process, approvers need to analyze the company's financial statements from recent years uploaded by the client, and then conduct industry analysis based on information retrieval according to the company's industry. During the approval process, an analysis and evaluation based on the company's financial situation and industry needs to be conducted to generate a subsequent review report. In the existing solution, the templates for each chapter of the review report are fixed, and the format cannot be changed according to the size of different companies and their industries. This results in rigid content in the generated review reports, which may contain errors and have low accuracy.
[0029] To address the aforementioned issues, this application provides a report generation method and apparatus. The server of the report generation system first receives report generation request information, including the company name and industry information of the target company from which the report is to be generated. Then, by vectorizing the company name and industry information, a target index is obtained. By performing cosine similarity calculation on the target index and a vector database, a target report template is obtained, comprising multiple sub-sections. Finally, a target report is generated based on the basic information of the target company within a target time period corresponding to the multiple sub-sections and the target report template. By vectorizing the company name requiring approval and its industry, and then performing similarity calculation with multiple report templates in the vector database to obtain the target report template, the accuracy of the subsequently generated approval report is ensured.
[0030] Please see Figure 1 , Figure 1 This is an architecture diagram of a report generation system provided in this application embodiment. The report generation system 100 includes a server 101 and a client 102. The server 101 of the report generation system 100 can be a single server or a server cluster composed of multiple servers, used to perform operations such as information receiving and processing, ranking model training and use, and report generation. Specifically, the server 101 is responsible for receiving report generation request information sent by the user to the client 102. The server 101 vectorizes the company name information and company industry information in the report generation request information to obtain a target index. Then, by performing cosine similarity calculation on the target index and the vector database, it finds the most matching target report template and generates the final complete target report. Finally, the server 101 returns the generated target report to the client 102 and displays it to the user or provides download options.
[0031] Client 102 can be a computer, mobile terminal, handheld terminal, cellular terminal, or other terminal. Client 102 can receive target reports transmitted from server 101 and display them on the user interface. Client 102 can also receive multiple target values and target periods set by the user on the user interface.
[0032] Based on this, this application provides a report generation method and apparatus, which will be described in detail below with reference to the accompanying drawings.
[0033] Please see Figure 2 , Figure 2 This is a flowchart of a report generation method provided in an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0034] S201, Receive report generation request information.
[0035] The execution entity of this method is the server 101 of the report generation system 100. The server 101 receives the report generation request information sent by the user on the client 102. The report generation request information can be text information or graphic information. The report generation request information includes the company name information and industry information of the target company to be generated. The report generation request information may also include the time to be generated and the approver of the report to be generated.
[0036] For example, please refer to Figure 3 , Figure 3 This is a schematic diagram of a report generation request information provided in an embodiment of this application, such as... Figure 3 As shown, the report generation request information received by the server is text information, which includes the target company's name: XX Co., Ltd., and the target company's industry information: power industry.
[0037] S202, the target index is obtained by vectorizing the company name information and the company industry information.
[0038] In this solution, an embedding model can be used to vectorize company name information and company industry information. For example, the embedding model can be Word2Vec, GloVe, or FastText. Specifically, an embedding model is a technique that maps high-dimensional discrete data to a low-dimensional continuous vector space. By learning the correlation and semantic information between data, the embedding model represents each discrete item (such as words, users, items, etc.) as a dense vector of fixed length. It is mainly used in fields such as natural language processing (NLP), recommendation systems, and image processing.
[0039] In addition to using the embedding model, methods for vectorizing company name information and company industry information to obtain the target index include, but are not limited to: Bag of Words, Term Frequency-Inverse Document Frequency (TF-IDF), and BERT (Bidirectional Encoder Representations from Transformers).
[0040] Specifically, the bag-of-words model represents text as a fixed-length vector, with each dimension corresponding to a word in the vocabulary, and counts the frequency of each word in the text or uses TF-IDF values; for example, the sentence to be vectorized is "I love the blue sky", and the bag-of-words model constructs the vocabulary as follows: "I": 0, "love": 0, "blue sky": 1, and finally the vectorized representation of the sentence "I love the blue sky" is [0, 0, 1].
[0041] Specifically, Term Frequency-Inverse Document Frequency (IDF) is used to measure the importance of a word in a collection of documents. IDF combines two metrics: Term Frequency (TF) and Inverse Document Frequency (IDF). IDF determines its weight by calculating the product of the number of times a word appears in a single document and the number of documents in the entire document collection. The IDF method mainly includes the following steps:
[0042] Sentence segmentation: dividing the text to be processed into sentences or words;
[0043] Calculate term frequency (TF): For each sentence or word, calculate the number of times it appears in the current processing object (e.g., an article) and divide it by the total number of words in the current processing object;
[0044] Calculate Inverse Document Frequency (IDF): For each sentence or word, calculate the number of documents in which it appears in the entire corpus or document collection, and divide the total number of documents by this value and take the logarithm as the inverse document frequency value;
[0045] Calculate the TF-IDF value: Multiply the TF and IDF obtained in the above steps to get the final TF-IDF value.
[0046] For example, the sentence to be vectorized is "I love the blue sky". First, we need to calculate the word frequency of this word in each document. There are three documents in the corpus, as follows:
[0047] Document 1: "I love the blue sky", Document 2: "I love the blue sky", Document 3: "The blue sky is so beautiful";
[0048] Calculate the inverse document frequency (IDF). The inverse document frequency is the reciprocal of the logarithm of the ratio of the number of documents in which a word appears in the entire corpus to the total number of documents. The formula is as follows:
[0049] IDF = log(total number of files / (number of files containing the word + 1));
[0050] The total number of files is 3, of which 2 contain the phrase "I love blue sky". Therefore...
[0051] IDF=log(3 / (2+1))≈0.4055;
[0052] Finally, the TF-IDF value is calculated, and the vectorized representation is obtained by multiplying the TF of each word by its corresponding IDF value.
[0053] For the phrase "I love the blue sky", since the phrase appears only once in a single document, TF = 1. The final result is: TF-IDF = TF*IDF ≈ 1*0.4055 ≈ 0.4055.
[0054] In one possible implementation, obtaining the target index by vectorizing the company name information and the company industry information includes:
[0055] By performing word segmentation on the company name information, multiple company name terms are obtained, and the order of these terms matches their order in the company name information. Similarly, by performing word segmentation on the company industry information, multiple company industry terms are obtained, and their order matches their order in the company industry information. An index vocabulary table is obtained, comprising multiple words and their corresponding vectorized indexes. Multiple company name indexes are obtained based on the multiple company name terms and the index vocabulary table, and these indexes are combined to obtain a first index. Multiple company industry indexes are obtained based on the multiple company industry terms and the index vocabulary table, and these indexes are combined to obtain a second index. Finally, a target index is obtained based on the first index and the second index.
[0056] Word segmentation is the process of splitting a sentence or text sequence into individual words or characters. In this scheme, the segmentation method can be one of rule-based segmentation, statistical model-based segmentation, or deep learning model-based segmentation. Specifically, rule-based segmentation uses predefined rules and dictionaries for segmentation, such as dividing based on basic grammar rules, stop word lists, and domain-specific terminology. Statistical model-based segmentation uses a large amount of labeled training data to learn a statistical model and determines the most likely segmentation points in sentences by probabilistically estimating unknown text. Common segmentation algorithms include Hidden Markov Models (HMMs) and Conditional Random Fields (CRFs). Deep learning model-based segmentation uses neural network models to learn to automatically extract features and perform sequence labeling, such as Recurrent Neural Networks (RNNs), Long Short-Term Memory Networks (LSTMs), and Transformers.
[0057] The target index can be obtained from the first index and the second index in the following ways:
[0058] Method 1: Directly concatenate the first index and the second index to obtain the target index. For example, if the first index is [0,1,2] and the second index is [3,4], then the target index is [0,1,2,3,4].
[0059] Method 2: Connect the first index and the second index, and then insert a special delimiter between the two indices to obtain the target index. For example, using the "[SEP]" delimiter, the first index is [0,1,2], the second index is [3,4], and the target index is [0,1,2,[SEP],3,4].
[0060] Method 3: Nest the first and second indices in a list as elements of the target index. For example, if the first index is [0,1,2] and the second index is [3,4], then the target index is [[0,1,2],[3,4]].
[0061] For example, please refer again Figure 3 ,by Figure 3Taking the report generation request information as an example, the report generation request information includes the target company's name information: XX Co., Ltd., and the target company's industry information: power industry. First, the company name information and company industry information are segmented into words, and an index vocabulary is constructed. Segmenting the company name information "XX Co., Ltd." yields multiple company name words: ["XX", "Shares", "Limited", "Company"]. Segmenting the company industry information "Power Industry" yields multiple company industry words: ["Power", "Industry"]. The constructed index vocabulary is: {"XX": 0, "Shares": 1, "Limited": 2, "Company": 3, "Power": 4, "Industry": 5}. Based on these multiple company name words and the index vocabulary, multiple company name indexes are obtained. Combining these multiple company name indexes yields the first index, [0, 1, 2, 3]. Similarly, multiple company industry indexes are obtained based on these multiple company industry words and the index vocabulary. Combining these multiple company industry indexes yields the second index, [4, 5]. Combining the first and second indexes using the above method two, with a separator in between, yields the target index [0, 1, 2, 3, [SEP], 4, 5].
[0062] As can be seen in this example, by segmenting the company name information and company industry information into words and converting them into corresponding indexes, and then combining them to obtain the first index and the second index, and then obtaining the target index based on the first index and the second index, the data can be made easier to process by vectorization and indexing while maintaining the original order of the information. This makes it easier to accurately retrieve the target template from the vector database based on the target index later.
[0063] S203, by performing cosine similarity calculation on the target index and vector database, a target report template is obtained.
[0064] In this solution, the vector database is the Template library, which contains multiple report templates. Each report template includes multiple sub-sections. The index fields of the Template library include ID, company industry, company name, templates, historical usage count, and historical creation duration. Here, ID represents a unique identifier or number for each report template, used to distinguish different templates. templates represent the content or format of the template, used to describe a specific type of information or a predefined template style. Embeddings is the result of vectorizing a certain object. The unit of historical usage count is times, and the unit of historical creation duration can be days, hours, or minutes, without restriction.
[0065] For example: a field in the template library for a certain template is represented as (id) kElectricity, xx Electricity Company, template k ,v k When the company name and industry information are passed in, the embedding model first converts the company name "xx Power Company" into a 1024-dimensional numerical vector. This vector is used to match the embeddings field in the vector database. Then, the company industry field is limited to the power industry in the returned result.
[0066] For example, please refer to Figure 4 , Figure 4 This is a schematic diagram of the format of a report template provided in an embodiment of this application, such as... Figure 4 As shown, the report template for corporate financial analysis in the vector database includes several sub-sections, namely Company Overview (Sub-section 1), Business Overview and Market Layout (Sub-section 2), Operating Performance Analysis (Sub-section 3), Financial Analysis (Sub-section 4), and Summary (Sub-section 5).
[0067] In this scheme, the similarity between vectors is calculated using cosine similarity. In addition, similarity can also be calculated by Euclidean distance, Manhattan distance, and Pearson correlation coefficient between vectors.
[0068] In one possible implementation, the target index includes a first index corresponding to the company name information and a second index corresponding to the company industry information. The index fields of the vector database include a company name index and a company industry index. The step of obtaining the target report template by performing cosine similarity calculation on the target index and the vector database includes:
[0069] Multiple first report templates are obtained from the vector database based on a first index in the target index, wherein a first value calculated by the cosine similarity between the company name index of the multiple first report templates and the first index is greater than a first target value; at least one second report template is obtained from the multiple first report templates based on a second index in the target index, wherein a second value calculated by the cosine similarity between the company industry index of the at least one second report template is greater than a second target value; and a target report template is obtained from the at least one second report template.
[0070] The first target value and the second target value can be set or changed by the user in the client 102. The first target value and the second target value can be the same. For example, the first target value and the second target value are both 0.7. There are no restrictions on the first target value and the second target value.
[0071] Specifically, the first index (the numerical vector obtained by vectorizing the company name) is compared with each report template stored in the Template library using cosine similarity calculation. The specific cosine similarity calculation formula is shown below:
[0072]
[0073] Among them, score i The first value is the cosine similarity between the first index and the i-th report template stored in the Template library. CosineSimlariy is the cosine similarity calculation, query1 is the first index, and y... i This is the vectorized representation of the i-th report template stored in the Template library, where the closer the cosine similarity value is to 1, the more semantically similar the two are.
[0074] Specifically, the second index (a numerical vector obtained by vectorizing the company's industry) is compared with multiple first report templates using cosine similarity calculation. The specific cosine similarity calculation formula is shown below:
[0075]
[0076] Among them, score i The first value is the cosine similarity calculation result between the second index and the i-th report template of multiple first report templates. CosineSimlariy is the cosine similarity calculation, query2 is the second index, and z... i This is a vectorized representation of the i-th report template among multiple first report templates, where the closer the cosine similarity value is to 1, the more semantically similar the two are.
[0077] As can be seen in this example, multiple first report templates with similar company names are first found from the vector database using the first index. Then, second report templates with similar industry to the company are found from the first report templates using the second index. Finally, the target report template is obtained from the second report templates. By performing two cosine similarity calculations based on the first and second indices respectively to obtain the final second report template, it is beneficial to accurately find report templates similar to the target company from the vector database and eliminate a large number of irrelevant report templates.
[0078] In one possible implementation, obtaining the target report template from at least one of the second report templates includes:
[0079] Determine whether the number of the second report templates exceeds the first target number; if the number of the second report templates exceeds the first target number, sort the multiple second report templates according to the first value to obtain a report template sequence, or sort the multiple second report templates according to the second value to obtain a report template sequence, or sort the multiple second report templates according to the first value and the second value of the multiple second report templates to obtain a report template sequence; obtain the first target number of third report templates located before the report template sequence, and obtain the target report template from the third report templates; if the number of the second report templates does not exceed the first target number, obtain the target report template from the second report templates.
[0080] The first target number can be set or changed by the user on the client. For example, the first target number can be 3, which means determining whether the number of second report templates exceeds 3, and then obtaining the target report template from the second report templates based on the determination result.
[0081] When the number of second report templates exceeds the number of first targets, a ranking model can be used to rank the multiple second report templates. From these, the report templates that meet the first target number after being sorted by cosine similarity results are selected to obtain multiple third report templates. Then, the target report template is obtained from the multiple third report templates.
[0082] For example, the first target quantity is 3, the second report template quantity is 5, and the first values of the 5 second report templates are 0.8, 0.8, 0.76, 0.81, and 0.73, respectively. Then, the 5 second report templates are sorted according to the first value from highest to lowest, namely 0.81, 0.8, 0.8, 0.76, and 0.73. The first 3 report templates are selected as the third report templates, and then the report template with the highest first value is selected as the target report template from the third report templates.
[0083] Specifically, the methods for obtaining the target report template from multiple third-party report templates, and obtaining the target report template from the second-party report templates when the number of detected second-party report templates does not exceed the first target number, are both: sending all report templates to the user's client, where the user can select one as the target report template; or, the server determines the report template with the highest cosine similarity among multiple report templates as the target report template. Specifically, when the user selects a report template as the target report template on the client, the user can choose a template that better suits the current scenario. Simultaneously, the user can edit the report template, including adding, deleting, and directly modifying the content or subsections of the report template.
[0084] For example, please refer to Figure 4 and Figure 5 , Figure 5 This is a schematic diagram of another report template provided in the embodiments of this application, such as... Figure 4 and Figure 5 As shown, the server will Figure 4 The report template shown is sent to the user's client. The user can edit the report template themselves. During the editing process, the user changed the positional relationship between subsection two and subsection three, and deleted subsection four. The modified report template is as follows: Figure 5 As shown, the report template at this time includes several sub-sections, namely Company Overview (Sub-section 1), Business Performance Analysis (Sub-section 2), Business Overview and Market Layout (Sub-section 3), and Summary (Sub-section 5).
[0085] As can be seen in this example, by sorting multiple second report templates according to the numerical information of the first target quantity and the second report template, a report template sequence is obtained. Then, when the number of second report templates exceeds the first target quantity, they are sorted according to the first value and / or the second value to ensure that the most relevant template is selected as the target report. This is beneficial for quickly filtering out the target report that meets the requirements from a large number of available report templates and improving the efficiency of report generation.
[0086] S204. Obtain the target report based on the basic information of the target company within the target time period corresponding to the multiple sub-sections and the target report template.
[0087] The target time is the period during which the user needs to include the basic information in the generated report. The target time can be set by the user on the client. For example, when the target time is 3 years, the server will obtain the basic information of the target company within 3 years that corresponds to multiple sub-sections in the target report template.
[0088] After obtaining the target report, the user determines whether modifications to the relevant chapters are necessary. If modifications are required, the target report can be edited until the user deems it unmodifiable. The user then decides whether to store the obtained target report in the vector database.
[0089] In one possible implementation, obtaining the target report based on the basic information corresponding to the plurality of sub-sections within the target company's target time period and the target report template includes:
[0090] The system obtains information on multiple first sub-sections of the target company within a target time period through an interface corresponding to the first sub-section, where the first sub-section is one of the multiple sub-sections; it calculates the similarity between the multiple first sub-sections and the first sub-section to obtain a third value for the multiple first sub-sections; it sorts the multiple first sub-sections according to the third value to obtain a sequence of first sub-sections, and obtains the target first sub-section information from the sequence of first sub-sections; it performs format checks and rewrites the target first sub-section information to obtain basic information corresponding to the first sub-section; it repeats the above steps until the basic information corresponding to all sub-sections is obtained; and it obtains the target report by filling the basic information corresponding to all sub-sections into the target report template.
[0091] After obtaining the target report template, it is passed to a dedicated Template Parser module for parsing and modularization. The parsed target report template is first processed by the Man Agent. Using RAG (Retrieval-Augmented Generation) technology, it retrieves basic information about the target company within the target timeframe from the database. This basic information includes, but is not limited to, financial information, calculated financial indicators, power industry information, and information on leading companies in the power industry. This retrieved basic information is then processed and stored uniformly by the Man Agent. Next, the Man Agent assigns different sub-sections (such as profitability analysis, cash flow analysis, solvency analysis, and industry comparison) to different Agents for parallel processing based on the content of the target report template.
[0092] For example, when the target time period is 3 years, the target company's name is XX Co., Ltd., and the target company's industry information is the power industry, the server queries the database for the financial information of XX Co., Ltd. for the past 3 years, calculates financial indicators, power industry information, and basic information such as leading companies in the power industry.
[0093] The data includes the company's own financial information, which comes from the bank's credit system; and industry information, such as information on the power industry and leading companies in the power industry, sourced from the bank's power industry database. The analytical scope of each industry can vary significantly, making it crucial to automatically locate the corresponding industry database based on the attributes of the company being approved. Therefore, different interfaces are defined for each data source. For example, the request parameters for the industry database include: industry: used to limit the search to the industry, such as "power industry" for companies like XX Co., Ltd., which belong to the power industry; search: the search question, such as "macroeconomic policy." All interfaces are defined and then sent to the Man Agent. The Man Agent, based on the processed information, calls the Large Language Model (LLM) to determine the appropriate data source interface to use.
[0094] Specifically, during RAG execution, the Man Agent calls the LLM to determine the most suitable data source for that stage based on all predefined data source interfaces. When returning query results, in addition to the most relevant text, the source information such as filename and link is also returned. After searching the data source, K information blocks are obtained for each piece of content. Here, K can be set during the retrieval stage, referring to the top K most relevant texts returned by the data source for the query question. A trained ranking model is used to calculate the similarity between each of the returned K text blocks and the search question (i.e., the request parameter `search` mentioned above). The output result is a value between 0 and 1; the larger the output result, the more relevant the text block is to the search question. The text blocks are sorted from largest to smallest based on the output results, and a threshold value is set; text segments with values below this threshold are not considered as reference material.
[0095] After each Agent generates its corresponding sub-section content, the Man Agent merges and polishes the different sub-section contents. Specifically, polishing involves checking the format and rewriting the form of each sub-section. For example, in the results generated from the solvency analysis, polishing will standardize the data format to ten thousand yuan and segment the text content. After all sub-section content has been polished, it is merged, and the entire text is re-entered into the LLM (Local Management System) for a summary of key points and risk points, resulting in the target report.
[0096] As can be seen in this example, by obtaining multiple first sub-section information of the target company, calculating and sorting their similarity, an ordered sequence of first sub-section information is obtained. Then, the target first sub-section information is formatted and rewritten to obtain the basic information corresponding to the first sub-section, further improving the standardization and readability of the report. Finally, the basic information corresponding to all sub-sections is filled into the target report template to obtain the target report, which is conducive to quickly and effectively generating a target report that meets the requirements.
[0097] In one possible implementation, the method further includes:
[0098] In the first target period, delete the report template for the second target quantity from the vector database; in the second target period, add the report template for the third target quantity to the vector database.
[0099] The first target period and the second target period are set and changed by the user on the client. The first target period and the second target period can be the same, for example, both the first target period and the second target period can be one month. There are no restrictions on the first target period and the second target period.
[0100] To ensure the quality of multiple report templates in the vector database, a number of internal report templates with a second target are periodically deleted, and a number of external report templates with a third target are obtained. The number of the second and third targets is set and changed by the user on the client, and there are no restrictions on the number of the second and third targets.
[0101] Preferably, the first target period is equal to the second target period, and the second target quantity is equal to the third target quantity, thereby keeping the number of report templates in the vector database unchanged. Alternatively, the first target period is equal to the second target period, and the second target quantity is equal to the third target quantity and the number of report templates newly added to the vector database by the user within the first target period. For example, if the first target period is one month, the second target quantity is 7, the third target quantity is 5, and the user adds 2 new report templates to the vector database within one month, then the server deletes 7 report templates and adds 5 new report templates, so that the number of report templates in the vector database is consistent with the number of report templates in the previous target period (one month).
[0102] As can be seen in this example, by deleting the report templates in the vector database within a specified period and obtaining new report templates from the outside, the iterative update of the vector database is achieved, which helps to maintain the quality of the report templates in the vector database.
[0103] In one possible implementation, the step of deleting the report template for the second target quantity from the vector database during the first target period includes:
[0104] In the first target period, a first report template to be processed is obtained from the vector database. The first report template to be processed is one of all report templates in the vector database. The industry score and first weight of the first report template to be processed are multiplied by a first product. The historical usage count and second weight of the first report template to be processed are multiplied by a second product. The historical creation time and third weight of the first report template to be processed are multiplied by a third product. A fourth value of the first report template to be processed is determined based on the first product, the second product, and the third product. The above steps are repeated until the fourth value of all report templates in the vector database is obtained. All report templates in the vector database are sorted from low to high according to the fourth value to obtain a sequence of report templates to be processed. A second target number of report templates located before the sequence of report templates to be processed are obtained, and the second target number of report templates are deleted from the vector database.
[0105] Specifically, when a user uses a report template to generate a target report, the historical usage count of that report template is incremented by 1. The historical creation duration of a report template indicates the time that the report template has existed in the vector database since it was added to the database. The unit of the historical creation duration is set by the user on the client. For example, the unit of the historical creation duration can be days. If a report template was added to the vector database on 2024-10-10, then the historical creation duration of the report template on 2024-10-12 is 3 days.
[0106] The Template library allows you to set a first target period for internal iteration, such as monthly or quarterly. It uses a custom scoring function to score the existing Templates in the library at that time. Depending on the settings, you can delete the lowest-scoring portions, such as selecting the last 10% of report templates to delete.
[0107] Specifically, the formula for the scoring function is as follows:
[0108] F(t) = a1*X inds *a2*HistoryHitCnt*a3*CreatedDays;
[0109] Among them, X inds This is the industry score. You can refer to expert advice or model different industries to obtain different industry mapping values. HistoryHitCnt is the number of historical uses, CreatedDays is the historical creation time, a1 is the first weight, a2 is the second weight, and a3 is the third weight. These weight values are modeled based on the historical data of the scenario. It is necessary to collect data according to different scenarios to determine the weights.
[0110] The scoring function can be obtained by multiplying the first, second, and third products, or by adding / subtracting the first, second, and third products. There are no restrictions on this.
[0111] As can be seen in this example, scoring each report template in the vector database using parameters including industry score, historical usage count, and historical creation duration, and then removing a portion of the report templates with lower scores, helps to ensure the quality of report templates within the vector database.
[0112] In one possible implementation, the step of adding a report template for the third target quantity to the vector database during the second target period includes:
[0113] In the second target period, multiple new industry report templates are acquired from the industry report template library corresponding to the first industry information, where the first industry information is one of the multiple company industry indexes in the vector database. Cosine similarity calculations are performed on the first industry report template and all report templates in the vector database corresponding to the first industry information to obtain multiple cosine similarity calculation results. The largest value among these multiple cosine similarity calculation results is determined as the fifth value, and the first industry report template is one of the multiple industry report templates. It is then determined whether the fifth value is greater than a third target value. If the fifth value is greater than the third target value, the first industry report template is not added to the vector database. If the fifth value is not greater than the third target value, the first industry report template is added to the vector database. The above steps are repeated until industry report templates for all company industry indexes in the vector database are acquired, and it is determined whether to add the corresponding industry report template to the vector database.
[0114] The Template library can be set to iterate over a second target period, such as monthly or quarterly. The Template library can retrieve the latest reports from the provided industry analysis report library, extract the structure of each retrieved report according to the processing function of the Template Parser in this technical solution, convert it into a format that conforms to this technical solution, compare the processed Template with the existing ones, complete the steps in the above report generation method, and finally store the report template that meets the user's requirements into the Template library.
[0115] Specifically, the cosine similarity of the latest report retrieved from the industry analysis report literature database with all L existing report templates for that industry in the Template library will be calculated, resulting in L cosine similarity calculation results. The L cosine similarity calculation results will be sorted in descending order. If the maximum cosine similarity calculation result (the fifth value) is less than the third target value, it means that the Template library does not contain a report template that is exactly the same as the latest report, and the latest report should be stored.
[0116] If the latest report contains a completely new industry, that is, an industry that was not included in the original Template library, then there is no need to perform cosine similarity calculation and numerical comparison. Instead, the first report of the new industry is saved directly, and the industry is initialized.
[0117] The number of data added to the database is pre-set by the report generation system's server. Preferably, the amount of data added each time should not exceed 20% of the existing number of report templates in the industry. This threshold is set because the usability of a report template should be recognized by users (reviewers) or statistically derived from actual usage, such as the historical usage count (HistoryHitCnt) mentioned above. A higher historical usage count indicates a higher utilization rate of the report template. Adding too many new report templates will affect subsequent search functionality and the distribution of existing report template types within the industry.
[0118] In the process of extracting the latest report from external reports, if the report does not contain industry information, the report is encoded using a trained embedding model, all report templates in the Template library are searched, the most similar report template is found, and the industry of the latest report is determined as the industry of the most similar report template.
[0119] As can be seen in this example, the report template that best matches the latest retrieved report in the vector database is determined by calculating the cosine similarity. The cosine similarity calculation result is compared with the preset value to determine whether the two templates are highly similar. After determining that they are not highly similar, the latest retrieved report is added to the vector database, which helps to improve the richness of report templates in the vector database.
[0120] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a report generation device provided in an embodiment of this application, as shown below. Figure 6 As shown, the report generation device 600 includes:
[0121] The receiving module 601 is used to receive report generation request information, which includes the company name information and industry information of the target company to which the report is to be generated;
[0122] The processing module 602 is configured to obtain a target index by vectorizing the company name information and the company industry information; and to obtain a target report template by performing cosine similarity calculation on the target index and the vector database, the target report template including multiple sub-sections; and to obtain a target report based on the basic information of the target company within a target time period corresponding to the multiple sub-sections and the target report template.
[0123] In one possible implementation, regarding obtaining the target index by vectorizing the company name information and the company industry information, the processing module 602 is specifically configured to: perform word segmentation on the company name information to obtain multiple company name terms, the order of which is consistent with the order of the multiple company name terms in the company name information; perform word segmentation on the company industry information to obtain multiple company industry terms, the order of which is consistent with the order of the multiple company industry terms in the company industry information; obtain an index vocabulary list, the index vocabulary list including multiple words and their corresponding indexes after vectorization; obtain multiple company name indexes based on the multiple company name terms and the index vocabulary list, and combine the multiple company name indexes to obtain a first index; obtain multiple company industry indexes based on the multiple company industry terms and the index vocabulary list, and combine the multiple company industry indexes to obtain a second index; and obtain the target index based on the first index and the second index.
[0124] In one possible implementation, the target index includes a first index corresponding to the company name information and a second index corresponding to the company industry information. The index fields of the vector database include a company name index and a company industry index. Regarding obtaining the target report template by calculating the cosine similarity between the target index and the vector database, the processing module 602 is specifically configured to: obtain multiple first report templates from the vector database based on the first index in the target index, wherein a first value calculated by the cosine similarity between the company name index of the multiple first report templates and the first index is greater than a first target value; obtain at least one second report template from the multiple first report templates based on the second index in the target index, wherein a second value calculated by the cosine similarity between the company industry index of the at least one second report template is greater than a second target value; and obtain the target report template from the at least one second report template.
[0125] In one possible implementation, in obtaining the target report template from at least one second report template, the processing module 602 is specifically configured to: determine whether the number of second report templates exceeds a first target number; if the number of second report templates exceeds the first target number, sort the plurality of second report templates according to the first value to obtain a report template sequence, or sort the plurality of second report templates according to the second value to obtain a report template sequence, or sort the plurality of second report templates according to the first value and the second value of the plurality of second report templates to obtain a report template sequence; obtain the first target number of third report templates located before the report template sequence, and obtain the target report template from the third report templates; if the number of second report templates does not exceed the first target number, obtain the target report template from the second report templates.
[0126] In one possible implementation, regarding obtaining the target report based on the basic information corresponding to the multiple sub-sections within the target company's target time period and the target report template, the processing module 602 is specifically configured to: obtain multiple first sub-section information of the target company within the target time period through an interface corresponding to the first sub-section, wherein the first sub-section is one of the multiple sub-sections; perform similarity calculation on the multiple first sub-section information and the first sub-section to obtain a third value of the multiple first sub-section information; sort the multiple first sub-section information according to the third value to obtain a sequence of first sub-section information, and obtain the target first sub-section information from the first sub-section sequence; perform format checking and rewriting on the target first sub-section information to obtain the basic information corresponding to the first sub-section; repeat the above steps until the basic information corresponding to all sub-sections is obtained; and obtain the target report by filling the basic information corresponding to all sub-sections into the target report template.
[0127] In one possible implementation, the processing module 602 is further configured to: delete a report template for a second target quantity from the vector database during a first target period; and add a report template for a third target quantity to the vector database during a second target period.
[0128] In one possible implementation, regarding the deletion of a second target number of report templates from the vector database during a first target period, the processing module 602 is specifically configured to: obtain a first unprocessed report template from the vector database during the first target period, wherein the first unprocessed report template is one of all report templates in the vector database; obtain a first product of the industry score and a first weight of the first unprocessed report template; obtain a second product of the historical usage count and a second weight of the first unprocessed report template; obtain a third product of the historical creation time and a third weight of the first unprocessed report template; determine a fourth value of the first unprocessed report template based on the first product, the second product, and the third product; repeat the above steps until the fourth value of all report templates in the vector database is obtained; sort all report templates in the vector database from low to high according to the fourth value to obtain a sequence of unprocessed report templates; obtain a second target number of report templates located before the sequence of unprocessed report templates, and delete the second target number of report templates from the vector database.
[0129] In one possible implementation, regarding the addition of a third target number of report templates to the vector database during the second target period, the processing module 602 is specifically configured to: acquire multiple newly added industry report templates in the industry report template library corresponding to the first industry information during the second target period, where the first industry information is one of multiple company industry indexes in the vector database; calculate the cosine similarity between the first industry report template and all report templates in the vector database corresponding to the first industry information to obtain multiple cosine similarity calculation results, determine the calculation result with the largest value among the multiple cosine similarity calculation results as the fifth value, where the first industry report template is one of the multiple industry report templates; determine whether the fifth value is greater than the third target value; if the fifth value is detected to be greater than the third target value, do not add the first industry report template to the vector database; if the fifth value is detected to be less than the third target value, add the first industry report template to the vector database; repeat the above steps until the industry report templates of all company industry indexes in the vector database are acquired and it is determined whether to add the corresponding industry report template to the vector database.
[0130] It is worth noting that the specific functional implementation of the report generation device 600 is described above. Figure 2The report generation method described herein includes, for example, the receiving module 601 for implementing the relevant content of S201, and the processing module 602 for implementing the relevant content of S202-S204. Each unit or module in the report generation device 600 can be individually or entirely merged into one or more other units or modules, or some of the units or modules can be further divided into multiple functionally smaller units or modules. This achieves the same operation without affecting the technical effects of the embodiments of the present invention. The aforementioned units or modules are based on logical functional division. In practical applications, the function of one unit (or module) is implemented by multiple units (or modules), or the function of multiple units (or modules) is implemented by one unit (or module).
[0131] Based on the description of the above method embodiments and related device embodiments, please refer to... Figure 7 The present invention also provides a schematic diagram of the structure of a computer 700. Figure 7 The computer 700 shown includes a processor 701, a memory 702, a communication interface 703, and a bus 704. The processor 701, memory 702, and communication interface 703 are interconnected via the bus 704.
[0132] Optionally, the memory 702 can be a ROM, a static storage device, a dynamic storage device, or RAM.
[0133] Memory 702 can store programs. When the executable program code stored in memory 702 is executed by processor 701, processor 701 and communication interface 703 are used for execution. Figure 2 The report generation method of the illustrated embodiment includes the following steps.
[0134] The processor 701 employs a general-purpose CPU, microprocessor, application-specific integrated circuit (ASIC), GPU, or one or more integrated circuits to execute relevant programs to perform the report generation method of the method embodiments of this application.
[0135] The processor 701 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the report generation method of this application can be completed through integrated logic circuits in the hardware of the processor 701 or instructions in software form. Optionally, the processor 701 is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. The processor can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor is a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. Optional software modules are located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in the memory 702. The processor 701 reads the information in the memory 702 and, in conjunction with its hardware, performs the functions required by the receiving module 601 and the processing module 602 included in the report generation apparatus 600 of this application embodiment, or executes the report generation method of the method embodiment of this application.
[0136] The communication interface 703 uses transceiver-related devices such as, but not limited to, transceivers.
[0137] Bus 704 may include a pathway for transmitting information between various components of computer 700 (e.g., memory 702, processor 701, communication interface 703).
[0138] It should be noted that, although Figure 7 The computer 700 shown only illustrates the memory, processor, and communication interface. However, those skilled in the art should understand that in specific implementations, the computer 700 may also include other devices necessary for normal operation. Furthermore, based on specific needs, those skilled in the art should understand that the computer 700 may also include hardware devices for implementing other additional functions. Moreover, those skilled in the art should understand that the computer 700 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 7 All the devices shown.
[0139] This application provides a computer-readable storage medium storing a computer program for electronic data interchange. The computer program includes execution instructions for performing some or all of the steps of any of the report generation methods described in the above-described report generation method embodiments. The computer includes an electronic terminal device.
[0140] This application provides a computer program product, which includes a computer program operable to enable a computer to perform some or all of the steps of any of the report generation methods described in the above method embodiments. The computer program product may be a software installation package.
[0141] It should be noted that, for the sake of simplicity, each of the aforementioned report generation methods is described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to this application.
[0142] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principle and implementation of a report generation method and apparatus of this application. The description of the above embodiments is only for the purpose of helping to understand the method and its core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of a report generation method and apparatus of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
[0143] This application is described with reference to flowchart illustrations and / or block diagrams of methods, hardware products, and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0144] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The functions specified in one or more boxes. Memory may include: flash drives, read-only memory (ROM), random access memory (RAM), hard disks or optical disks, etc.
[0145] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce a good effect.
[0146] Those skilled in the art will understand that all or part of the steps in the various method embodiments of any of the above-described report generation methods can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage device, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk, or an optical disk, etc.
[0147] It is understood that any product that is controlled or configured to perform the processing method of the flowchart described in an embodiment of a report generation method of this application, such as the apparatus and computer program product of the above flowchart, falls within the scope of the related products described in this application.
[0148] Obviously, those skilled in the art can make various modifications and variations to the report generation method and apparatus provided in this application without departing from the spirit and scope of this application. Therefore, if these modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.
Claims
1. A report generation method, characterized in that, The method, applied to a server in a report generation system, includes: Receive report generation request information, which includes the company name and industry information of the target company from which the report is to be generated; The target index is obtained by vectorizing the company name information and the company industry information; A target report template is obtained by performing cosine similarity calculation on the target index and vector database. The target report template includes multiple sub-sections. The system obtains information on multiple first sub-sections of the target company within a target time period through an interface corresponding to the first sub-section, where the first sub-section is one of the multiple sub-sections; it calculates the similarity between the multiple first sub-sections and the first sub-section to obtain a third value for the multiple first sub-sections; it sorts the multiple first sub-sections according to the third value to obtain a sequence of first sub-sections, and obtains the target first sub-section information from the sequence of first sub-sections; it performs format checks and rewrites the target first sub-section information to obtain basic information corresponding to the first sub-section; it repeats the above steps until the basic information corresponding to all sub-sections is obtained; and it obtains the target report by filling the basic information corresponding to all sub-sections into the target report template. In the first target period, a first report template to be processed is obtained from the vector database. The first report template to be processed is one of all report templates in the vector database. The industry score and first weight of the first report template to be processed are multiplied together. The historical usage count and second weight of the first report template to be processed are multiplied together. The historical creation time and third weight of the first report template to be processed are multiplied together. A fourth value of the first report template to be processed is determined based on the first, second, and third products. The above steps are repeated until the fourth value of all report templates in the vector database is obtained. All report templates in the vector database are sorted from low to high according to the fourth value to obtain a sequence of report templates to be processed. A second target number of report templates preceding the sequence of report templates to be processed are obtained, and the second target number of report templates are deleted from the vector database. In the second target period, multiple new industry report templates corresponding to the first industry information are acquired from the industry report template library. The first industry information is one of the multiple company industry indexes in the vector database. Cosine similarity calculation is performed on the first industry report template and all report templates corresponding to the first industry information in the vector database to obtain multiple cosine similarity calculation results. The calculation result with the largest value among the multiple cosine similarity calculation results is determined as the fifth value, and the first industry report template is one of the multiple industry report templates. It is determined whether the fifth value is greater than the third target value. If the fifth value is detected to be greater than the third target value, the first industry report template is not added to the vector database. If the fifth value is detected to be less than the third target value, the first industry report template is added to the vector database. The above steps are repeated until industry report templates of all company industry indexes in the vector database are acquired and it is determined whether to add the corresponding industry report template to the vector database.
2. The method as described in claim 1, characterized in that, The step of vectorizing the company name information and the company industry information to obtain the target index includes: By performing word segmentation on the company name information, multiple company name terms are obtained, and the order of the multiple company name terms is consistent with the order of the multiple company name terms in the company name information. By performing word segmentation on the company industry information, multiple company industry terms are obtained, and the order of the multiple company industry terms is consistent with the order of the multiple company industry terms in the company industry information. Obtain an index vocabulary, which includes multiple words and their corresponding indexes after being vectorized; Multiple company name indexes are obtained based on the multiple company name terms and the index vocabulary list. The multiple company name indexes are combined to obtain a first index. Multiple company industry indexes are obtained based on the multiple company industry terms and the index vocabulary list. The multiple company industry indexes are combined to obtain a second index. The target index is obtained based on the first index and the second index.
3. The method as described in claim 1, characterized in that, The target index includes a first index corresponding to the company name information and a second index corresponding to the company industry information. The index fields of the vector database include a company name index and a company industry index. The step of obtaining the target report template by performing cosine similarity calculation on the target index and the vector database includes: Multiple first report templates are obtained from the vector database based on the first index in the target index, and the first value of the cosine similarity between the company name index of the multiple first report templates and the first index is greater than the first target value; At least one second report template is obtained from the plurality of first report templates based on the second index in the target index, and the second value of the cosine similarity of the company industry index of the at least one second report template is greater than the second target value; Obtain the target report template from at least one of the second report templates.
4. The method as described in claim 3, characterized in that, Obtaining the target report template from at least one of the second report templates includes: Determine whether the number of the second report templates exceeds the first target number; If the number of second report templates exceeds the first target number, sort the multiple second report templates according to the first value to obtain a report template sequence; or, sort the multiple second report templates according to the second value to obtain a report template sequence; or, sort the multiple second report templates according to the first value and the second value to obtain a report template sequence; obtain the first target number of third report templates located before the report template sequence, and obtain the target report template from the third report templates; If the number of the second report templates does not exceed the first target number, the target report template is obtained from the second report templates.
5. A report generation device, characterized in that, The device includes: The receiving module is used to receive report generation request information, which includes the company name and industry information of the target company from which the report is to be generated; The processing module is configured to: obtain a target index by vectorizing the company name information and the company industry information; obtain a target report template by performing cosine similarity calculation on the target index and the vector database, the target report template including multiple sub-sections; obtain multiple first sub-section information of the target company within a target time period through an interface corresponding to the first sub-section, the first sub-section being one of the multiple sub-sections; perform similarity calculation on the multiple first sub-section information and the first sub-section to obtain a third value of the multiple first sub-section information; sort the multiple first sub-section information according to the third value to obtain a first sub-section information sequence, obtain target first sub-section information from the first sub-section sequence; perform format checking and rewriting on the target first sub-section information to obtain basic information corresponding to the first sub-section; repeat the above steps until the basic information corresponding to all sub-sections is obtained; and obtain the target report by filling the basic information corresponding to all sub-sections into the target report template. The method includes: acquiring a first pending report template from the vector database during a first target period, wherein the first pending report template is one of all report templates in the vector database; acquiring a first product of the industry score and a first weight of the first pending report template; acquiring a second product of the historical usage count and a second weight of the first pending report template; acquiring a third product of the historical creation time and a third weight of the first pending report template; determining a fourth value of the first pending report template based on the first product, the second product, and the third product; repeating the above steps until the fourth value of all report templates in the vector database is acquired; sorting all report templates in the vector database from low to high according to the fourth value to obtain a sequence of pending report templates; acquiring a second target number of report templates preceding the sequence of pending report templates; and deleting the second target number of report templates from the vector database. The system also includes a method for acquiring multiple new industry report templates in the industry report template library corresponding to the first industry information during the second target period. The first industry information is one of multiple company industry indexes in the vector database. By performing cosine similarity calculations on the first industry report template and all report templates in the vector database corresponding to the first industry information, multiple cosine similarity calculation results are obtained. The calculation result with the largest value among the multiple cosine similarity calculation results is determined as the fifth value, and the first industry report template is one of the multiple industry report templates. The system then determines whether the fifth value is greater than a third target value. If the fifth value is detected to be greater than the third target value, the first industry report template is not added to the vector database. If the fifth value is detected to be less than the third target value, the first industry report template is added to the vector database. The above steps are repeated until industry report templates for all company industry indexes in the vector database are acquired, and it is determined whether to add the corresponding industry report template to the vector database.
6. A computer, characterized in that, The computer includes: The system includes a memory, a processor, and executable program code stored in the memory and executable on the processor, wherein the processor executes the executable program code to perform the steps of the report generation method as described in any one of claims 1-4.
Citation Information
Patent Citations
Examination report editing method, device and equipment
CN114841136A
Pig industry analysis report automatic generation method and system
CN118153544A