Report generation method and device
By vectorizing the company name and industry information and calculating the similarity with the report template in the vector database, the problem that the review report format cannot be dynamically adjusted in the existing technology is solved, and a more accurate and personalized approval report generation is achieved.
Patent Information
- Application Number
- CN202411529400.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-30
AI Technical Summary
In the bank risk approval process, the existing technology cannot dynamically adjust the format of the review report based on the size of different companies and the industry to which it belongs, resulting in the generated report content being blunt and possible errors, and low accuracy.
By vectorizing company names and industry information and performing similarity calculations with report templates in vector databases, the target report templates are obtained to generate a more accurate and personalized approval report.
Ensure that the generated approval reports are more in line with the actual situation of the company, improve the accuracy and personalization of the reports, and reduce the occurrence of errors.
Smart Images

Figure CN119398025A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of report review, and in particular to a report generation method and device. Background Art
[0002] In the risk approval process of banks, the approvers need to analyze the company's financial status based on the financial reports uploaded by customers in recent years, and then conduct information retrieval to complete industry analysis based on the industry the company is in. During the approval process, it is necessary to analyze and evaluate the company's financial status and the industry to which it belongs in order 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 the industry to which they belong. As a result, the generated review report is rigid and may contain errors, and the accuracy of the generated report is low. Summary of the invention
[0003] An embodiment of the present application provides a report generation method and device, which vectorizes the name of a company that needs approval and the industry in which the company is located, and then calculates the similarity with multiple report templates in a vector database to obtain a target report template, which is beneficial to ensure the accuracy of the subsequently generated approval report.
[0004] In a first aspect, an embodiment of the present application provides a report generation method, which is applied to a server of a report generation system, and the method includes:
[0005] Receiving report generation request information, wherein the report generation request information includes company name information and company industry information of a target company for which a report is to be generated;
[0006] By vectorizing the company name information and the company industry information, a target index is obtained;
[0007] By performing cosine similarity calculation on the target index and the vector database, a target report template is obtained, wherein the target report template includes a plurality of sub-sections;
[0008] A target report is obtained according to the basic information corresponding to the plurality of sub-sections within the target time of the target company and the target report template.
[0009] In a second aspect, an embodiment of the present application provides a report generating device, including:
[0010] A receiving module, configured to receive report generation request information, wherein the report generation request information includes company name information and company industry information of a target company for which a report is to be generated;
[0011] A processing module is used 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, wherein the target report template includes multiple sub-sections; and to obtain a target report based on basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template.
[0012] In a third aspect, an embodiment of the present application provides a computer, including:
[0013] A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the method as described in any one of the first aspects when executing the executable program code.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a report generation program is stored. The report generation program includes execution instructions, and the execution instructions are used to execute the method as described in any one of the first aspects.
[0015] In a fifth aspect, the present application provides a computer program product, which, when executed by a processor, is used to implement the method as described in any one of the first aspects.
[0016] By implementing the embodiment of the present application, the server of the report generation system first receives the report generation request information, the report generation request information includes the company name information and company industry information of the target company to be generated for the report; then the target index is obtained by vectorizing the company name information and the company industry information; the target report template is obtained by calculating the cosine similarity between the target index and the vector database, and the target report template includes multiple sub-sections; finally, the target report is obtained according to the basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template. By vectorizing the name of the company that needs to be approved and the industry in which the company is located, and then calculating the similarity with multiple report templates in the vector database, the target report template is obtained, which is conducive to ensuring the accuracy of the approval report generated subsequently. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0018] Figure 1 It is an architecture diagram of a report generation system provided in an embodiment of the present application;
[0019] Figure 2is a flow chart of a report generation method provided in an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of report generation request information provided by an embodiment of the present application;
[0021] Figure 4 It is a format diagram of a report template provided in an embodiment of the present application;
[0022] Figure 5 It is a format diagram of another report template provided in an embodiment of the present application;
[0023] Figure 6 is a structural diagram of a report generating device provided in an embodiment of the present application;
[0024] Figure 7 It is a structural diagram of a computer provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0027] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0028] In the risk approval process of banks, the approvers need to analyze the company's financial status based on the financial reports uploaded by customers in recent years, and then conduct information retrieval to complete industry analysis based on the industry the company is in. During the approval process, it is necessary to analyze and evaluate the company's financial status and the industry to which it belongs in order 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 the industry to which they belong. As a result, the generated review report is rigid and may contain errors, and the accuracy of the generated report is low.
[0029] In view of the above problems, the embodiment of the present application provides a report generation method and device, wherein the server of the report generation system first receives the report generation request information, wherein the report generation request information includes the company name information and the company industry information of the target company to be generated for the report; then the target index is obtained by vectorizing the company name information and the company industry information; the target report template is obtained by performing cosine similarity calculation on the target index and the vector database, wherein the target report template includes multiple sub-sections; finally, the target report is obtained based on the basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template. By vectorizing the name of the company to be approved and the industry in which the company is located, and then performing similarity calculation with multiple report templates in the vector database, the target report template is obtained, which is conducive to ensuring the accuracy of the approval report generated subsequently.
[0030] See also Figure 1 , Figure 1 This is an architecture diagram of a report generation system provided by an embodiment of the present application. The report generation system 100 includes a server 101 and a client 102, wherein the server 101 of the report generation system 100 can be a server cluster composed of one server or multiple servers, and is used to perform operations such as information reception and processing, sorting model training and use, and report generation. Specifically, the server 101 is responsible for receiving the report generation request information sent by the user on the client 102. The server 101 vectorizes the company name information and company industry information in the report generation request information to obtain the target index, and then calculates the cosine similarity between the target index and the vector database to find the target report template that best matches it, 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 operations such as downloading.
[0031] The client 102 can be a computer, mobile terminal, handheld terminal, cellular terminal or other terminal. The client 102 can receive the target report transmitted from the server 101 and display it on the user interface. The client 102 can also receive multiple target values and target periods set by the user on the user interface.
[0032] Based on this, the present application provides a report generation method and device, which will be described in detail below in conjunction with the accompanying drawings.
[0033] See also Figure 2 , Figure 2 is a flow chart of a report generation method provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0034] S201, receiving report generation request information.
[0035] Among them, the executor of the method is the server 101 of the report generation system 100, and the server 101 receives the report generation request information sent by the user at 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 company industry information of the target company to be reported. The report generation request information can also include the time to be generated and the approver of the report to be generated.
[0036] For example, see Figure 3 , Figure 3 is a schematic diagram of a report generation request information provided by an embodiment of the present application, such as Figure 3 As shown, the report generation request information received by the server is text information, and the report generation request information includes the company name information of the target company: XX Co., Ltd., and the company industry information of the target company: electric power industry.
[0037] S202, obtaining a target index by vectorizing the company name information and the company industry information.
[0038] Among them, 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 and FastText. Specifically, the embedding model is a technology 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, projects, etc.) as a dense vector of a fixed length. It is mainly used in natural language processing (NLP), recommendation systems, image processing and other fields.
[0039] Among them, in addition to using the embedding model, the methods of 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 vector of fixed length, where each dimension corresponds to a word in the vocabulary, and counts the frequency of each word in the text or uses the TF-IDF value; 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 is used to measure the importance of a term in a document collection. Term frequency-inverse document frequency combines two indicators: term frequency (TF) and inverse document frequency (IDF). Term frequency-inverse document frequency determines its weight by calculating the product of the number of times a term appears in a single document and the number of documents in which the term appears in the entire document collection. The term frequency-inverse document frequency method mainly includes the following steps:
[0042] Sentence segmentation: segment the text to be processed into sentences or word levels;
[0043] Calculate word frequency (TF): For each sentence or word, calculate the number of times it appears in the current processing object (such as an article), and divide it by the total number of words contained in the current processing object;
[0044] Calculate the 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 to 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, the frequency of the word in each document needs to be calculated. 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 refers to the logarithm of the ratio of the number of documents in which the word appears in the entire corpus to the total number of documents. The calculation formula is as follows:
[0049] IDF = log (total number of documents / (number of documents containing the word + 1));
[0050] The total number of files is 3, of which the number of files containing "I love the blue sky" is 2, so
[0051] IDF=log(3 / (2+1))≈0.4055;
[0052] Finally, calculate the TF-IDF value and multiply the TF of each word by its corresponding IDF value to get the vectorized representation.
[0053] For the term "I love the blue sky", since the term only appears once in a single document, TF = 1, and the final result is: TF-IDF = TF*IDF≈1*0.4055≈0.4055.
[0054] In a possible implementation, vectorizing the company name information and the company industry information to obtain a target index includes:
[0055] By performing a word segmentation operation on the company name information, a plurality of company name words are obtained, and the arrangement order of the plurality of company name words is consistent with the order of the plurality of company name words in the company name information; by performing a word segmentation operation on the company industry information, a plurality of company industry words are obtained, and the arrangement order of the plurality of company industry words is consistent with the order of the plurality of company industry words in the company industry information; an index vocabulary is obtained, and the index vocabulary includes a plurality of words and indexes corresponding to the plurality of words after vectorization; a plurality of company name indexes are obtained according to the plurality of company name words and the index vocabulary, and the plurality of company name indexes are combined to obtain a first index; a plurality of company industry indexes are obtained according to the plurality of company industry words and the index vocabulary, and the plurality of company industry indexes are combined to obtain a second index; a target index is obtained according to the first index and the second index.
[0056] Among them, the word segmentation operation is the process of splitting a sentence or text sequence into individual words or characters. In this solution, the method used for the word segmentation operation can be one of rule-based word segmentation, statistical model-based word segmentation and deep learning model-based word segmentation. Specifically, rule-based word segmentation uses predefined rules and dictionaries for segmentation, for example, according to some basic grammatical rules, stop word lists and specific field professional terms. Word segmentation based on statistical models uses a large amount of labeled training data to learn statistical models, and determines the most likely segmentation points in the sentence by probabilistically estimating unknown texts. Among them, common word segmentation algorithms include Hidden Markov Model and Conditional Random Fields. Word segmentation based on deep learning models uses neural network models to learn to automatically extract features and perform sequence annotation, such as based on recurrent neural networks (RNN), long short-term memory networks (LSTM), transformers, etc.
[0057] The method of obtaining the target index according to the first index and the second index may be as follows:
[0058] Method 1: directly connect the first index and the second index to get 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 separator between the two indexes to get the target index. For example, use the "[SEP]" marker as a separator, 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 indexes 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 to Figure 3 ,by Figure 3Taking the report generation request information in as an example, the report generation request information includes the company name information of the target company: XX Co., Ltd., and the company industry information of the target company: power industry. First, the company name information and company industry information are segmented, and an index vocabulary is constructed. Among them, after the company name information "XX Co., Ltd." is segmented, multiple company name words are obtained: ["XX", "shares", "limited", "company"], and after the company industry information "electric power industry" is segmented, multiple company industry words are obtained: ["electric power", "industry"], and the constructed index vocabulary is: {"XX": 0, "shares": 1, "limited": 2, "company": 3, "electric power": 4, "industry": 5}, then multiple company name indexes are obtained according to multiple company name words and the index vocabulary, and the multiple company name indexes are combined to obtain a first index, the first index is [0,1,2,3], and multiple company industry indexes are obtained according to multiple company industry words and the index vocabulary. The multiple company industry indexes are combined to obtain a second index, the second index is [4,5]. The first index and the second index are combined in the above method 2, and a separator is added in the middle to obtain the target index [0,1,2,3,[SEP],4,5].
[0062] It can be seen that in this example, by segmenting the company name information and the company industry information and converting them into corresponding indexes, and then combining them to obtain the first index and the second index, and obtaining the target index based on the first index and the second index, the data can be made easier to process through vectorization and indexing while maintaining the order of the original information, which facilitates the subsequent accurate acquisition of the target template from the vector database based on the target index.
[0063] S203, obtaining a target report template by performing cosine similarity calculation on the target index and the vector database.
[0064] Among them, the vector database in this solution is the Template library, which includes multiple report templates, each report template includes multiple sub-chapters, and the index field names of the Template library include ID, company industry, company name, templates, historical usage times and historical creation time, among which ID represents the unique identifier or number of each report template, which is used to distinguish different templates, templates represents the content or format of the template, which is used to describe a specific type of information or predefined template style, and Embeddings is the result of vectorized representation of a certain object, among which the unit of historical usage times is times, and the unit of historical creation time can be days, hours or minutes, which are not limited here.
[0065] For example: a template field in the template library is represented as (id k,electricity,xx power company,template k ,v k ,13,13),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, which is used to match the embeddings field in the vector database, and then limits the company industry field to the power industry in the returned results.
[0066] For example, see Figure 4 , Figure 4 is a format diagram of a report template provided in an embodiment of the present application, such as Figure 4 As shown, the report template for company financial analysis in the vector database includes multiple sub-chapters, namely company profile (sub-chapter one), business overview and market layout (sub-chapter two), operating situation analysis (sub-chapter three), financial analysis (sub-chapter four) and summary (sub-chapter five).
[0067] In this scheme, the method for calculating the similarity between vectors is cosine similarity calculation. In addition, similarity calculation can also be performed by calculating the Euclidean distance, Manhattan distance, and Pearson correlation coefficient between vectors.
[0068] In a 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 field of the vector database includes a company name index and a company industry index, and the target report template is obtained by performing cosine similarity calculation on the target index and the vector database, including:
[0069] According to the first index in the target index, multiple first report templates are obtained from the vector database, and 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; according to the second index in the target index, at least one second report template is obtained from the multiple first report templates, and 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 at least one of the second report templates.
[0070] Among them, the first target value and the second target value can be set or changed by the user on the client 102, and 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 is no restriction on the first target value and the second target value.
[0071] Among them, the cosine similarity calculation is performed between the first index (i.e., the numerical vector obtained by vectorizing the company name) and each report template stored in the Template library. The specific cosine similarity calculation formula is as follows:
[0072]
[0073] Among them, score i is the cosine similarity calculation result between the first index and the i-th report template stored in the Template library, that is, the first value, CosineSimlariy is the cosine similarity calculation, query1 is the first index, y i It is the vectorized representation of the i-th report template stored in the Template library, where the closer the value calculated by the cosine similarity is to 1, the more similar the two are in semantics.
[0074] Among them, the cosine similarity calculation is performed between the second index (i.e., the numerical vector obtained by vectorizing the company industry) and multiple first report templates. The specific cosine similarity calculation formula is as follows:
[0075]
[0076] Among them, score i is the cosine similarity calculation result between the second index and the i-th report template of the plurality of first report templates, that is, the first value, CosineSimlariy is the cosine similarity calculation, query2 is the second index, z i It is a vectorized representation of the i-th report template of multiple first report templates, wherein the closer the value obtained by calculating the cosine similarity is to 1, the more similar the two are in semantics.
[0077] It can be seen that in this example, the first index is used to find multiple first report templates that are relatively similar to the company name from the vector database, and then the second index is used to find the second report template that is relatively similar to the company industry from the first report template, and finally the target report template is obtained from the second report template. The final second report template is obtained by performing two cosine similarity calculations based on the first index and the second index respectively, which is conducive to accurately finding report templates similar to the target company from the vector database and excluding a large number of irrelevant report templates.
[0078] In a possible implementation manner, obtaining a 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 it is detected that the number of the second report templates exceeds the first target number, sort the multiple second report templates according to the first numerical value to obtain a report template sequence, or sort the multiple second report templates according to the second numerical value to obtain a report template sequence, or sort the multiple second report templates according to the first numerical value and the second numerical value of the multiple second report templates to obtain a report template sequence; obtain the third report template of the first target number located in front of the report template sequence, and obtain the target report template from the third report template; if it is detected that the number of the second report templates does not exceed the first target number, obtain the target report template from the second report template.
[0080] Among them, the first target number can be set or changed by the user on the client. For example, the first target number can be 3, that is, determine whether the number of second report templates exceeds 3, and then further obtain the target report template from the second report template based on the judgment result.
[0081] Among them, when the number of second report templates exceeds the first target number, the sorting model can be used to sort multiple second report templates, and the report templates of the first target number whose cosine similarity results are sorted by size are selected to obtain multiple third report templates, and then the target report template is obtained from the multiple third report templates.
[0082] Exemplarily, the first target quantity is 3, the number of second report templates 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. At this time, the 5 second report templates are sorted according to the first values, namely 0.81, 0.8, 0.8, 0.76, and 0.73, and the first 3 report templates are selected as the third report templates, and then the report template with the highest first value is selected from the third report templates as the target report template.
[0083] Among them, the target report template is obtained from multiple third report templates, and, when it is detected that the number of second report templates does not exceed the first target number, the target report template is obtained from the second report template in a manner of sending all report templates to the user's client, and the user selects a report template as the target report template on the client, or the server determines the report template with the largest cosine similarity calculation result 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 select a report template that better suits the current scenario. At the same time, the user can edit the report template, and the editing operation includes adding a report template, deleting a report template, and directly modifying the content or sub-sections of the report template.
[0084] For example, see Figure 4 and Figure 5 , Figure 5 is a schematic diagram of the format of another report template provided in an embodiment of the present application, such as Figure 4 and Figure 5 As shown, the server will Figure 4 The report template shown in the figure is sent to the user's client. The user can edit the report template. During the editing operation, the user changes the position relationship between sub-section 2 and sub-section 3 and deletes sub-section 4. The modified report template is as follows Figure 5 As shown, the report template now includes multiple sub-chapters, namely company profile (sub-chapter one), operating situation analysis (sub-chapter two), business overview and market layout (sub-chapter three), and summary (sub-chapter five).
[0085] It can be seen that in this example, multiple second report templates are sorted according to the first target quantity and the numerical information of the second report template to obtain a report template sequence, and then when the number of second report templates exceeds the first target quantity, they are sorted according to the first numerical value and / or the second numerical value to ensure that the most relevant template is selected as the target report, which is conducive to quickly screening out target reports that meet the requirements from a large number of optional report templates, thereby improving report generation efficiency.
[0086] S204, obtaining a target report according to the basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template.
[0087] Among them, the target time is the time of the basic information that the user needs to cover 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 corresponding to multiple sub-chapters in the target report template.
[0088] After obtaining the target report, the user determines whether to modify the contents of the relevant chapters. If modification is required, the target report can be edited until the user determines that the target report does not need to be modified, and then the user further determines whether to store the target report obtained this time into the vector database.
[0089] In a possible implementation, obtaining the target report according to the basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template includes:
[0090] Acquire multiple first sub-section information within the target time of the target company through the 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, and obtain the target first sub-section information from the first sub-section sequence; perform format check and form rewrite 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; obtain the target report by filling the basic information corresponding to all sub-sections into the target report template.
[0091] Among them, after obtaining the target report template, the target report template will be passed to the special Template parser module to parse and modularize the target report template. The parsed target report template will first be processed by Man Agent. Using RAG (Retrieval-Augmented Generation) technology, the basic information of the target company within the target time is queried from the database. The basic information includes but is not limited to financial information, calculated financial indicators, power industry information, leading companies in the power industry, and other related information. These retrieved basic information will be uniformly processed and stored by Man Agent, and then Man Agent will hand over different sub-chapters (such as profit analysis, cash flow analysis, debt repayment ability analysis, and comparison with the same industry) to different Agents for parallel processing according to the content information of the target report template.
[0092] For example, when the target time is 3 years, the target company's name information is xx Co., Ltd., and the target company's industry information is the electric power industry, the server queries the financial information of xx Co., Ltd. for the past 3 years from the database, calculates financial indicators, electric power industry information, leading companies in the electric power industry and other basic information.
[0093] Among them, the company's own financial information, these data are transmitted from the bank's own credit system; information on the power industry and the leading companies in the power industry belong to industry information, and the source is the bank's power industry information database. The analysis of each industry may vary greatly, so it is very important to automatically find the corresponding industry information database according to the attributes of the approved enterprise. Therefore, different interfaces are defined according to each data source. For example, the request parameters of the industry information database include: industry: used to limit the query industry, such as xx Co., Ltd. belongs to the power industry, then enter "power industry"; search: search questions, such as "macro policy"; All interfaces will be defined and sent to Man Agent, and ManAgent will call the Large Language Model (LLM) according to the processed information paragraph to determine the appropriate data source interface to call.
[0094] Specifically, during the execution of RAG, Man Agent will call LLM according to all defined data source interfaces to determine the most appropriate data source for query in this link. When the query results are returned, in addition to returning the most relevant text data, the file name, link and other source information of the text source must also be returned. After completing the data source search, K information blocks will be obtained for each piece of content. Here, K can be set in the retrieval stage, which refers to the most relevant first K texts returned by the data source for the query question. The trained sorting model is used to calculate the similarity between the K text blocks returned each time and the search question (i.e. the above request parameter search). The output result is a value of 0-1. The larger the output result, the more relevant the text block is to the search question. The output results are sorted from large to small, and a numerical threshold is set at the same time. Text segments smaller than the numerical threshold are not used as reference materials.
[0095] Among them, after each Agent generates the corresponding sub-chapter content, Man Agent will merge and polish the different sub-chapter contents. Specifically, the polishing operation refers to checking the format of each sub-chapter content and rewriting it in form. For example, in the results generated by the solvency analysis, the polishing operation will unify the data format into 10,000 yuan and segment the text content. After all sub-chapter contents are polished, they are merged and the full text content is input into LLM again to summarize the key points and risk points of the full text to obtain the target report.
[0096] It can be seen that in this example, by obtaining multiple first sub-chapter information of the target company and calculating and sorting the similarity, an ordered first sub-chapter information sequence is obtained, and then the target first sub-chapter information is formatted and rewritten to obtain the basic information corresponding to the first sub-chapter, thereby further improving the standardization and readability of the report. Finally, the basic information corresponding to all sub-chapter sections is filled into the target report template to obtain the target report, which is conducive to quickly and efficiently generating a target report that meets the requirements.
[0097] In a possible implementation, the method further includes:
[0098] In the first target period, the report templates of the second target quantity are deleted from the vector database; and in the second target period, the report templates of the third target quantity are added to the vector database.
[0099] The first target period and the second target period are set and changed by the user on the client, and the first target period and the second target period may be the same, for example, the first target period and the second target period are both one month, and there is no restriction on the first target period and the second target period.
[0100] In order to ensure the quality of multiple report templates in the vector database, the internal second target quantity report template is regularly deleted, and the third target quantity report template is obtained from the outside. The second target quantity and the third target quantity are set and changed by the user on the client, and there is no limit on the second target quantity and the third target quantity.
[0101] Preferably, the first target period is equal to the second target period, and the second target number is equal to the third target number, 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 number is equal to the third target number and the number of report templates newly added by users to the vector database during the first target period. For example, the first target period is one month, the second target number is 7, and the third target number is 5. The number of report templates newly added by users to the vector database during one month is 2. At this time, the server deletes 7 report templates and adds 5 new report templates. 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] It can be seen that 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 is conducive to maintaining the quality of the report templates in the vector database.
[0103] In a possible implementation, the deleting the report template of the second target quantity in the vector database in the first target period includes:
[0104] In the first target period, obtain the first report template to be processed in the vector database, where the first report template to be processed is one of all the report templates in the vector database; obtain a first product of the industry score of the first report template to be processed and a first weight; obtain a second product of the historical number of uses of the first report template to be processed and a second weight; obtain a third product of the historical creation time of the first report template to be processed and a third weight; determine a fourth value of the first report template to be processed based on the first product, the second product and the third product; repeat the above steps until the fourth values of all report templates in the vector database are obtained; sort all report templates in the vector database from low to high according to the fourth value to obtain a sequence of report templates to be processed; obtain a second target number of report templates located in front of the sequence of report templates to be processed, and delete the second target number of report templates from the vector database.
[0105] Among them, when a user uses a report template to generate a target report, the historical usage count of the report template is increased by 1. The historical creation duration of the report template is used to indicate the time the report template exists in the vector database after it is added to the vector 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 is added to the vector database since 2024-10-10, then the historical creation duration of the report template on 2024-10-12 is 3 days.
[0106] The Template library can set the first target cycle for internal iteration, such as every month or every quarter, and use a custom scoring function to score the existing Templates in the library at this time. According to the setting, the part with the lowest score can be deleted, for example, the last 10% of the report templates can be selected for deletion.
[0107] Specifically, the formula of the scoring function is as follows:
[0108] F(t)=a1*X inds *a2*HistoryHitCnt*a3*CreatedDays;
[0109] Among them, X inds It is the industry score. You can refer to the expert advice or model different industries to get the mapping values of different industries. HistoryHitCnt is the historical usage times, 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 scene. It is necessary to collect data according to different scenarios to determine the weights.
[0110] The scoring function may be obtained by multiplying the first product, the second product and the third product, or by adding and / or subtracting the first product, the second product and the third product, and there is no limitation here.
[0111] It can be seen that in this example, by using parameters including industry score, historical usage times and historical creation time to score each report template in the vector database, and then removing some report templates with lower scores, it is beneficial to ensure the quality of the report templates within the vector database.
[0112] In a possible implementation, the adding a report template of a third target quantity to the vector database in the second target period includes:
[0113] In the second target period, multiple industry report templates newly added to the industry report template library corresponding to the first industry information are obtained, and the first industry information is one of the multiple company industry indexes in the vector database; by performing cosine similarity calculation on the first industry report template and all report templates corresponding to the first industry information in the vector database, multiple cosine similarity calculation results are obtained, and it is determined that the calculation result with the largest value among the multiple cosine similarity calculation results is the fifth value, and the first industry report template is one of the multiple industry report templates; it is judged whether the fifth value is greater than the third target value; if it is detected that the fifth data is greater than the third target value, the first industry report template is not added to the vector database; if it is detected that the fifth data is not greater than the third target data, the first industry report template is added to the vector database; repeat the above steps until the industry report templates of all company industry indexes in the vector database are obtained and it is judged whether to add the corresponding industry report template to the vector database.
[0114] Among them, the Template library can set a second target cycle for iteration, such as every month or every quarter; the Template library can retrieve the latest report from the provided industry analysis report document library, and extract the structure of each retrieved report according to the processing function in the Template Parser in this technical solution and convert it into a format that complies with this technical solution, and compare the processed Template with the stock to complete the steps in the above report generation method, and finally store the report template confirmed by the user to meet the requirements into the Template library.
[0115] Specifically, the cosine similarity of the latest report retrieved from the industry analysis report document library is calculated with all L existing report templates of the industry in the Template library to obtain L cosine similarity calculation results; the L cosine similarity calculation results are sorted in descending order, and 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] Among them, if the latest report contains a brand new industry, that is, an industry that is not included in the original Template library, there is no need to perform cosine similarity calculation and numerical comparison. The first report of the brand new industry is directly saved and the industry is initialized.
[0117] The number of data added to the database is set in advance by the server of the report generation system. Preferably, the amount of data added to the database each time shall not exceed 20% of the number of existing report templates in the industry. The reason for setting this threshold is that the practicality of the report template should be recognized by the user (reviewer) or obtained from actual usage statistics, such as the historical usage count (HistoryHitCnt) of each usage statistics above. The larger the statistical value, the higher the usage of the report template. If there are too many newly added report templates, it will affect the subsequent searches and the distribution of report template types in the existing 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 the trained embedding model, all report templates in the Template library are retrieved, the most similar report template is found, and the industry of the latest report is determined to be the industry of the most similar report template.
[0119] It can be seen that in this example, the report template in the vector database that best matches the latest retrieved report is determined based on the cosine similarity calculation, and whether the two templates are highly similar is determined by comparing the cosine similarity calculation result and the preset value. After determining that they are not highly similar, the latest retrieved report is added to the vector database, which is beneficial to improve the richness of the report templates in the vector database.
[0120] See also Figure 6 , Figure 6 is a structural diagram of a report generating device provided in an embodiment of the present application, such as Figure 6 As shown, the report generating device 600 includes:
[0121] A receiving module 601 is used to receive report generation request information, wherein the report generation request information includes the company name information and company industry information of the target company for which the report is to be generated;
[0122] Processing module 602 is used 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, wherein the target report template includes multiple sub-chapters; and to obtain a target report based on basic information corresponding to the multiple sub-chapters within the target time of the target company and the target report template.
[0123] In one possible implementation, in terms of obtaining a target index by vectorizing the company name information and the company industry information, the processing module 602 is specifically used to: obtain multiple company name words by performing a word segmentation operation on the company name information, and the arrangement order of the multiple company name words is consistent with the order of the multiple company name words in the company name information; obtain multiple company industry words by performing a word segmentation operation on the company industry information, and the arrangement order of the multiple company industry words is consistent with the order of the multiple company industry words in the company industry information; obtain an index vocabulary, the index vocabulary including multiple words and indexes corresponding to the multiple words after vectorization; obtain multiple company name indexes based on the multiple company name words and the index vocabulary, and combine the multiple company name indexes to obtain a first index; obtain multiple company industry indexes based on the multiple company industry words and the index vocabulary, and combine the multiple company industry indexes to obtain a second index; obtain a 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, and the index field of the vector database includes a company name index and a company industry index. In terms of obtaining a target report template by performing cosine similarity calculation on the target index and the vector database, the processing module 602 is specifically used to: obtain multiple first report templates from the vector database according to the first index in the target index, and a first value calculated by 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 according to the second index in the target index, and a second value calculated by cosine similarity of the company industry index of the at least one second report template is greater than a second target value; and obtain a target report template from at least one of the second report templates.
[0125] In one possible implementation, in terms of obtaining a target report template from at least one of the second report templates, the processing module 602 is specifically used to: determine whether the number of the second report templates exceeds the first target number; when it is detected that the number of the second report templates exceeds the first target number, sort the multiple second report templates according to the first numerical value to obtain a report template sequence, or, sort the multiple second report templates according to the second numerical value to obtain a report template sequence, or, sort the multiple second report templates according to the first numerical value and the second numerical value of the multiple second report templates to obtain a report template sequence; obtain a third report template of the first target number located in front of the report template sequence, and obtain a target report template from the third report template; when it is detected that the number of the second report templates does not exceed the first target number, obtain a target report template from the second report template.
[0126] In one possible implementation, in terms of obtaining a target report based on the basic information corresponding to the multiple sub-chapters within the target time of the target company and the target report template, the processing module 602 is specifically used to: obtain multiple first sub-chapters information within the target time of the target company through an interface corresponding to the first sub-chapters, the first sub-chapters being one of the multiple sub-chapters; perform similarity calculation on the multiple first sub-chapters information and the first sub-chapters to obtain a third value of the multiple first sub-chapters information; sort the multiple first sub-chapters information according to the third value to obtain a first sub-chapters information sequence, and obtain the target first sub-chapters information from the first sub-chapters sequence; perform format checking and form rewriting on the target first sub-chapters information to obtain the basic information corresponding to the first sub-chapters; repeat the above steps until the basic information corresponding to all sub-chapters is obtained; and obtain the target report by filling the basic information corresponding to all sub-chapters into the target report template.
[0127] In a possible implementation, the processing module 602 is further configured to: delete a second target number of report templates in the vector database in a first target period; and add a third target number of report templates to the vector database in a second target period.
[0128] In one possible implementation, in terms of deleting the second target number of report templates in the vector database in the first target period, the processing module 602 is specifically used to: obtain the first report template to be processed in the vector database in the first target period, the first report template to be processed being one of all the report templates in the vector database; obtain a first product of the industry score of the first report template to be processed and a first weight; obtain a second product of the historical number of uses of the first report template to be processed and a second weight; obtain a third product of the historical creation time of the first report template to be processed and a third weight; determine a fourth value of the first report template to be processed 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 report templates to be processed; obtain the second target number of report templates located in front of the sequence of report templates to be processed, and delete the second target number of report templates from the vector database.
[0129] In one possible implementation, in terms of adding a third target number of report templates to the vector database in the second target period, the processing module 602 is specifically used to: obtain multiple industry report templates newly added to the industry report template library corresponding to the first industry information in the second target period, where the first industry information is one of the multiple company industry indexes in the vector database; obtain multiple cosine similarity calculation results by performing cosine similarity calculation on the first industry report template and all report templates corresponding to the first industry information in the vector database, determine that the calculation result with the largest value among the multiple cosine similarity calculation results is the fifth value, and the first industry report template is one of the multiple industry report templates; judge whether the fifth value is greater than the third target value; if it is detected that the fifth data is greater than the third target value, the first industry report template is not added to the vector database; if it is detected that the fifth data is not greater than the third target data, the first industry report template is added to the vector database; repeat the above steps until the industry report templates of all company industry indexes in the vector database are obtained and it is judged 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 generating device 600 is shown in the above Figure 2The description of the report generation method shown in the figure, for example, the receiving module 601 is used to implement the relevant content of executing S201, and the processing module 602 is used to implement the relevant content of executing S202-S204. The various units or modules in the report generation device 600 can be respectively or completely combined into one or several other units or modules to form, or some (some) of the units or modules can be further divided into multiple functionally smaller units or modules to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided based on logical functions. In actual applications, the functions of one unit (or module) are implemented by multiple units (or modules), or the functions of multiple units (or modules) are 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 , an embodiment of the present invention also provides a structural diagram 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 , the memory 702 , and the communication interface 703 are connected to each other through the bus 704 .
[0132] Optionally, the memory 702 is a ROM, a static storage device, a dynamic storage device or a RAM.
[0133] The memory 702 can store programs. When the executable program code stored in the memory 702 is executed by the processor 701, the processor 701 and the communication interface 703 are used to execute Figure 2 The various steps of the report generation method of the illustrated embodiment.
[0134] The processor 701 adopts a general-purpose CPU, a microprocessor, an application-specific integrated circuit ASIC, a GPU or one or more integrated circuits to execute relevant programs to perform the report generation method of the method embodiment of the present application.
[0135] The processor 701 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the report generation method of the present application can be completed by the hardware integrated logic circuit or software instructions in the processor 701. Optionally, the processor 701 is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. The optional software module is located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage media in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and combines its hardware to complete the functions required to be performed by the receiving module 601 and the processing module 602 included in a report generating device 600 of an embodiment of the present application, or executes the report generating method of the method embodiment of the present application.
[0136] The communication interface 703 uses a transceiver or other related device such as, but not limited to, a transceiver.
[0137] The bus 704 may include a path for transmitting information between various components of the computer 700 (eg, the memory 702 , the processor 701 , and the communication interface 703 ).
[0138] It should be noted that although Figure 7 The computer 700 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the computer 700 also includes other devices necessary for normal operation. At the same time, based on specific needs, those skilled in the art should understand that the computer 700 may also include hardware devices that implement other additional functions. In addition, those skilled in the art should understand that the computer 700 may also only include the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 7 All devices shown in .
[0139] An embodiment of the present application provides a computer-readable storage medium, in which a computer program for electronic data exchange is stored. The computer program includes execution instructions, and the execution instructions are used to execute part or all of the steps of any one of the report generation methods recorded in the above-mentioned report generation method embodiments. The above-mentioned computer includes an electronic terminal device.
[0140] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to enable a computer to perform part or all of the steps of any report generation method recorded in the above method embodiments. The computer program product can be a software installation package.
[0141] It should be noted that, for the sake of simplicity, the embodiments of any of the above-mentioned report generation methods are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present application.
[0142] The embodiments of the present application are introduced in detail above. Specific examples are used herein to illustrate the principle and implementation mode of a report generation method and device of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for a person skilled in the art, according to the idea of a report generation method and device of the present application, there may be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0143] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0144] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1The memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0145] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0146] A person skilled in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned report generation methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.
[0147] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in an embodiment of a report generation method of the present application, such as the device and computer program product of the above flowchart, belongs to the category of related products described in the present application.
[0148] Obviously, those skilled in the art can make various changes and modifications to the report generation method and device provided by the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A report generation method, characterized in that: Applied to a server of a report generation system, the method comprises: Receiving report generation request information, wherein the report generation request information includes company name information and company industry information of a target company for which a report is to be generated; By vectorizing the company name information and the company 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, wherein the target report template includes a plurality of sub-sections; A target report is obtained according to the basic information corresponding to the plurality of sub-sections within the target time of the target company and the target report template.
2. The method according to claim 1, characterized in that The target index is obtained by vectorizing the company name information and the company industry information, including: By performing a word segmentation operation on the company name information, a plurality of company name words are obtained, and the arrangement order of the plurality of company name words is consistent with the order of the plurality of company name words in the company name information; By performing a word segmentation operation on the company industry information, a plurality of company industry words are obtained, and the arrangement order of the plurality of company industry words is consistent with the order of the plurality of company industry words in the company industry information; Obtain an index vocabulary, wherein the index vocabulary includes a plurality of words and indexes corresponding to the plurality of words after vectorization; Obtain a plurality of company name indexes according to the plurality of company name vocabularies and the index vocabulary, and combine the plurality of company name indexes to obtain a first index; Obtain a plurality of company industry indexes according to the plurality of company industry vocabularies and the index vocabulary, and combine the plurality of company industry indexes to obtain a second index; A target index is obtained according to the first index and the second index.
3. The method according to 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 field of the vector database includes a company name index and a company industry index, and the target report template is obtained by performing cosine similarity calculation on the target index and the vector database, including: Obtaining a plurality of first report templates from the vector database according to a first index in the target index, wherein a first value calculated by the cosine similarity between the company name index of the plurality of first report templates and the first index is greater than a first target value; Obtaining at least one second report template from the plurality of first report templates according to a second index in the target index, wherein a second value calculated by the cosine similarity of the company industry index of the at least one second report template is greater than a second target value; A target report template is obtained from at least one of the second report templates.
4. The method according to claim 3, characterized in that The obtaining a target report template from at least one of the second report templates comprises: Determining whether the number of the second report templates exceeds the first target number; It is detected that the number of the second report templates exceeds the first target number, and the multiple second report templates are sorted according to the first value to obtain a report template sequence, or the multiple second report templates are sorted according to the second value to obtain a report template sequence, or the multiple second report templates are sorted according to the first value and the second value of the multiple second report templates to obtain a report template sequence; obtain a third report template of the first target number located in front of the report template sequence, and obtain a target report template from the third report template; It is detected that the number of the second report templates does not exceed the first target number, and a target report template is obtained from the second report templates.
5. The method according to claim 1, characterized in that The step of obtaining a target report according to the basic information corresponding to the plurality of sub-sections within the target time of the target company and the target report template includes: Acquire multiple first sub-section information within the target time of the target company through an interface corresponding to the first sub-section, where the first sub-section is one of the multiple sub-sections; Calculating similarity between the plurality of first sub-section information and the first sub-section to obtain third values of the plurality of first sub-section information; sorting the plurality of first sub-section information according to the third value to obtain a first sub-section information sequence, and obtaining target first sub-section information from the first sub-section sequence; Performing format check and form rewriting on the target first sub-chapter information to obtain basic information corresponding to the first sub-chapter; Repeat the above steps until the basic information corresponding to all sub-chapters is obtained; The target report is obtained by filling in the basic information corresponding to all sub-sections into the target report template.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: deleting a second target number of report templates in the vector database during a first target period; A third target number of report templates are added to the vector database during a second target period.
7. The method according to claim 6, characterized in that The report template for deleting the second target quantity in the vector database in the first target period includes: Acquire a first to-be-processed report template in the vector database in a first target period, where the first to-be-processed report template is one of all report templates in the vector database; Obtaining a first product of the industry score of the first report template to be processed and a first weight; Obtaining a second product of the number of historical usages of the first to-be-processed report template and a second weight; Obtaining a third product of the historical creation time of the first to-be-processed report template and the third weight; Determine a fourth value of the first to-be-processed report template according to the first product, the second product and the third product; Repeat the above steps until the fourth values of all report templates in the vector database are obtained; Sort all report templates in the vector database from low to high according to the fourth value to obtain a sequence of report templates to be processed; Acquire a second target number of report templates located in front of the sequence of report templates to be processed, and delete the second target number of report templates from the vector database.
8. The method according to claim 6, characterized in that The report template for adding a third target quantity to the vector database in the second target period includes: Acquire multiple industry report templates newly added in the industry report template library corresponding to the first industry information in the second target period, where the first industry information is one of the multiple company industry indexes in the vector database; By performing cosine similarity calculation on the first industry report template and all report templates corresponding to the first industry information in the vector database, a plurality of cosine similarity calculation results are obtained, and a calculation result with the largest value among the plurality of cosine similarity calculation results is determined as a fifth value, and the first industry report template is one of the plurality of industry report templates; Determining whether the fifth value is greater than a third target value; If it is detected that the fifth data is greater than the third target value, the first industry report template is not added to the vector database; if it is detected that the fifth data is not greater than the third target data, the first industry report template is added to the vector database; Repeat the above steps until the industry report templates of all company industry indexes in the vector database are obtained and it is determined whether to add the corresponding industry report template to the vector database.
9. A report generating device, characterized in that: The device comprises: A receiving module, configured to receive report generation request information, wherein the report generation request information includes company name information and company industry information of a target company for which a report is to be generated; A processing module is used 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, wherein the target report template includes multiple sub-sections; and to obtain a target report based on basic information corresponding to the multiple sub-sections within the target time of the target company and the target report template.
10. A computer, characterized in that: The computer comprises: A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the steps of the report generating method according to any one of claims 1 to 8 when executing the executable program code.
Citation Information
Patent Citations
Clinical PDF report automatic generation method and system
CN111145855A
Examination report editing method, device and equipment
CN114841136A
Report generation method and device based on large language model
CN118133973A
Pig industry analysis report automatic generation method and system
CN118153544A