Tax report analysis report generation method and device, equipment and storage medium
By preprocessing, semantic chunking and vectorizing the tax statement data, combining the target index library and programming model, high-quality tax analysis reports are generated, which solves the problems of low efficiency and difficulty in finding related reports in the existing technology, and achieves more accurate and efficient generation of analysis reports.
Patent Information
- Application Number
- CN202411802949.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-04
AI Technical Summary
The prior art relies on manual operations in the generation of tax statement analysis reports, which is inefficient and difficult to effectively find high-quality analysis reports related to target topics.
By obtaining historical report data and tax statement data for preprocessing and semantic chunking, an explanatory context is generated, and the data is vectorized using the target file embedding model and stored in a vector database. Based on user input analysis topics and target index database, target report data is retrieved from vector database, analyzed using programming models, and generated high-quality analysis reports.
It improves the efficiency and quality of tax statement analysis reports, overcomes the problem of context destruction when segmenting documents, significantly improves the accuracy of searches, and improves the relevance of analysis reports.
Smart Images

Figure CN119557423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a method, device, equipment and storage medium for generating a tax report analysis report. Background Art
[0002] At present, the traditional method of generating tax report analysis reports usually includes the following steps: tax personnel formulate corresponding analysis indicators based on the selected topic and report data, use SQL (Structured Query Language) to extract and calculate data, analyze and interpret the results, and finally form a complete analysis report. However, the entire process relies on manual operation and involves multiple steps. Data calculation and verification are completely dependent on personal experience, and work efficiency is very low. In addition, although there are a large number of high-quality analysis reports accumulated historically, how to effectively find reports related to the target topic is also a major challenge.
[0003] From the above, it can be seen that how to efficiently and comprehensively utilize report data and knowledge in the tax field to quickly generate high-quality analysis reports is an urgent problem that needs to be solved. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a tax report analysis report generation method, device, equipment and storage medium, which can efficiently and comprehensively utilize report data and knowledge in the tax field to quickly generate high-quality analysis reports. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a method for generating a tax return analysis report, comprising:
[0006] Acquire historical report data and tax report data, preprocess and semantically segment the historical report data to obtain segmented report data, and add explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data;
[0007] The context block data is vectorized using a target file embedding model and stored in a vector database; the target text embedding model is a text embedding model obtained by optimizing an initial text embedding model based on target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data;
[0008] After receiving the analysis topic input by the user end, the corresponding target report data is determined from the vector database based on the analysis topic and in combination with the target index library; the target index library is an index library created based on the context block data;
[0009] Analyzing the analysis subject and the target report data using each programming big model to obtain an analysis result, and vectorizing the analysis result and the analysis subject to obtain vectorized data;
[0010] Target context block data corresponding to the vectorized data is retrieved from the vector database, and a report generation prompt generated based on the target context block data and the analysis result is input into a preset analysis report generation model to obtain an analysis report.
[0011] Optionally, the acquiring of historical report data and tax report data, preprocessing and semantically segmenting the historical report data to obtain segmented report data, and adding an explanatory context corresponding to the segmented report data generated based on a preset prompt word to the segmented report data to obtain context segmented data, includes:
[0012] Acquire the collected historical report data and tax report data, and pre-process the historical report data to obtain processed report data;
[0013] The processed report data is semantically segmented to obtain segmented report data, an explanatory context corresponding to the segmented report data is generated based on preset prompt words, and the explanatory context is added to the segmented report data to obtain context segmented data.
[0014] Optionally, the vectorizing the context block data by using the target file embedding model and storing the vectorized context block data in a vector database includes:
[0015] The initial text embedding model is trained based on the training data obtained from the target tax data to obtain a target text embedding model, and the context block data is vectorized using the target document embedding model, and the context block data obtained after vectorization is stored in a vector database.
[0016] Optionally, the training data obtained based on the target tax data is used to train the initial text embedding model to obtain the target text embedding model, including:
[0017] Vectorizing the target tax data based on the initial text embedding model to obtain vectorized tax data;
[0018] By calculating the similarity between the query text and the vectorized tax data, and obtaining the target vectorized tax data that meets the preset similarity condition based on the calculation result;
[0019] The target vectorized tax data is filtered based on preset filtering rules to obtain training data, and the initial text embedding model is trained based on the training data to obtain a target text embedding model.
[0020] Optionally, after receiving the analysis topic input by the user terminal, determining corresponding target report data from the vector database based on the analysis topic and in combination with the target index library includes:
[0021] Creating a corresponding index library based on the context block data to obtain a target index library;
[0022] After receiving the analysis topic input by the user, semantic analysis is performed on the analysis topic to obtain the user intention;
[0023] The vector database is searched based on the user intention and in combination with the target index library to obtain target report data corresponding to the analysis topic.
[0024] Optionally, the using of each programming large model to analyze the analysis subject and the target report data to obtain an analysis result, and vectorizing the analysis result and the analysis subject to obtain vectorized data, includes:
[0025] Analyze the analysis subject and the target report data to generate various analysis directions, and debug each analysis direction using a preset prompting project to generate a target prompting statement;
[0026] Based on the target prompts and using various programming models, the target report data is processed to obtain corresponding target answers, and corresponding question-answer pairs are obtained based on the target answers. The question-answer pairs and the analysis topics are vectorized to obtain vectorized data.
[0027] Optionally, retrieving target context block data corresponding to the vectorized data from the vector database, and inputting a report generation prompt generated based on the target context block data and the analysis result into a preset analysis report generation model to obtain an analysis report, including:
[0028] Performing vector retrieval on the vectorized data by using a context retrieval technology to retrieve relevant block data satisfying a preset relevance condition from the vector database;
[0029] Filtering and sorting the relevant block data by using a reordering technique to obtain target context block data;
[0030] A report generation prompt is generated based on the target context block data and the analysis result, and the report generation prompt is input into a preset analysis report generation model to obtain an analysis report.
[0031] In a second aspect, the present application provides a tax return analysis report generating device, comprising:
[0032] A data segmentation module is used to obtain historical report data and tax report data, pre-process the historical report data and semantically segment the historical report data to obtain segmented report data, and add an explanatory context corresponding to the segmented report data generated based on a preset prompt word to the segmented report data to obtain context segmented data;
[0033] A data vectorization module, used to vectorize the context block data using a target file embedding model and store it in a vector database; the target text embedding model is a text embedding model obtained by optimizing an initial text embedding model based on target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data;
[0034] A target data determination module is used to determine corresponding target report data from the vector database based on the analysis theme and in combination with a target index library after receiving the analysis theme input by the user terminal; the target index library is an index library created based on the context block data;
[0035] A data analysis module, used for analyzing the analysis subject and the target report data by using each programming big model to obtain an analysis result, and vectorizing the analysis result and the analysis subject to obtain vectorized data;
[0036] An analysis report generation module is used to retrieve target context block data corresponding to the vectorized data from the vector database, and input a report generation prompt generated based on the target context block data and the analysis results into a preset analysis report generation model to obtain an analysis report.
[0037] In a third aspect, the present application provides an electronic device, including:
[0038] Memory, used to store computer programs;
[0039] The processor is used to execute the computer program to implement the aforementioned tax report analysis report generation method.
[0040] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned tax return analysis report generation method.
[0041] The present application obtains historical report data and tax report data, pre-processes and semantically segments the historical report data to obtain segmented report data, and adds an explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data; vectorizes the context segmented data using a target file embedding model and stores it in a vector database; the target text embedding model is a text embedding model obtained by optimizing an initial text embedding model based on target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data; upon receiving a user's After the analysis topic is input by the end, the corresponding target report data is determined from the vector database based on the analysis topic and in combination with the target index library; the target index library is an index library created based on the context block data; the analysis topic and the target report data are analyzed by using each programming large model to obtain an analysis result, and the analysis result and the analysis topic are vectorized to obtain vectorized data; the target context block data corresponding to the vectorized data is retrieved from the vector database, and the report generation prompt generated based on the target context block data and the analysis result is input into the preset analysis report generation model to obtain an analysis report.
[0042] As can be seen from the above, before constructing the vector database, the present application first pre-processes and semantically segments the historical report data, adds explanatory context generated based on preset prompt words to each segmented report data, and creates a target index library based on the context segmented data. In this way, report data retrieval based on the vector database and the target index library can overcome the problem of destroying the context when segmenting documents, resulting in the lack of sufficient background information in the retrieved information segments, and significantly improve the accuracy of retrieval; at the same time, the initial text embedding model is optimized, so that the optimized target text embedding model exhibits excellent processing capabilities for tax field data, effectively improves the quality of vectorization, and directly affects the effect of subsequent vector retrieval, thereby improving the quality and relevance of the analysis report. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A flow chart of a method for generating a tax return analysis report disclosed in this application;
[0045] Figure 2 A schematic diagram of a preset prompt word for adding explanatory context provided in this application;
[0046] Figure 3 A data analysis schematic diagram provided for this application;
[0047] Figure 4 A schematic diagram of a report generation prompt provided for this application;
[0048] Figure 5 A flow chart of a specific tax return analysis report generation method disclosed in this application;
[0049] Figure 6 A schematic diagram of generating a question-answer pair provided for this application;
[0050] Figure 7 A schematic diagram for generating an analysis report provided for this application;
[0051] Figure 8 A schematic diagram of the structure of a tax report analysis report generating device disclosed in this application;
[0052] Fig. 9 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] At present, a database is usually used to extract and calculate report data, analyze and interpret the results, and finally form a complete analysis report. However, the entire process relies on manual operation and involves multiple steps, and the work efficiency is very low. Even if there are a large number of high-quality analysis reports accumulated historically, it is not possible to effectively find reports related to the target topic. To this end, the present application provides a tax report analysis report generation method, which performs report data retrieval based on a vector database and a target index library, which can overcome the problem of destroying the context when segmenting documents, resulting in the lack of sufficient background information in the retrieved information blocks, and significantly improves the accuracy of retrieval; at the same time, the initial text embedding model is optimized, so that the optimized target text embedding model exhibits excellent tax field data processing capabilities, effectively improves the quality of vectorization, and directly affects the effect of subsequent vector retrieval, thereby improving the quality and relevance of the analysis report.
[0055] See also Figure 1 As shown, the embodiment of the present invention discloses a method for generating a tax report analysis report, including:
[0056] Step S11, obtaining historical report data and tax report data, preprocessing and semantically segmenting the historical report data to obtain segmented report data, and adding an explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data.
[0057] In this embodiment, after the historical report data and the tax form data are obtained, the historical report data is cleaned and filtered to obtain processed report data, the processed report data is semantically segmented based on natural breakpoints to obtain segmented report data, and preset prompt words are used to generate explanatory contexts corresponding to the segmented report data and create a BM25 index (an algorithm for information retrieval). Figure 2 A schematic diagram of preset prompt words for adding explanatory context provided for the present embodiment. The explanatory context is then added to the segmented report data to obtain context segmented data. Specifically, the acquisition of historical report data and tax report data, preprocessing and semantically segmenting the historical report data to obtain segmented report data, and adding the explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data, includes: acquiring the collected historical report data and tax report data, preprocessing the historical report data to obtain processed report data; semantically segmenting the processed report data to obtain segmented report data, generating an explanatory context corresponding to the segmented report data based on preset prompt words, and adding the explanatory context to the segmented report data to obtain context segmented data.
[0058] It is understandable that the historical report data is preprocessed, and the preprocessing includes cleaning and filtering the historical report data to remove illegal characters and special symbols in the historical report data, and then the processed report data is divided into blocks according to natural breakpoints in the processed report data, such as paragraphs, parts or topics, to ensure the integrity of the data in each block; then the corresponding explanatory context is added to each of the block report data. In a specific embodiment, the block report data can be: the company's revenue increased by 5% over the previous quarter. Based on the preset prompt words of the large language model, a corresponding explanatory context is generated for each of the block report data to obtain context block data, and the context block data can be: this block comes from Company A's B file in the second quarter of 2024; the revenue in the previous quarter was 250 million yuan. The company's revenue increased by 5% over the previous quarter. In this way, there is no need to manually add the explanatory context, and the above operation can be completed through the preset prompt words of the large language model.
[0059] Step S12: vectorize the context block data using the target file embedding model and store it in a vector database; the target text embedding model is a text embedding model obtained by optimizing the initial text embedding model based on the target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data.
[0060] In this embodiment, the initial text embedding model is optimized based on the target tax data to obtain the target text embedding model, so as to use the target file embedding model to vectorize the context block data, and the context block data obtained after vectorization is stored in the vector database. Specifically, the context block data is vectorized using the target file embedding model and stored in the vector database, including: training the initial text embedding model based on the training data obtained from the target tax data to obtain the target text embedding model, and using the target file embedding model to vectorize the context block data, and storing the context block data obtained after vectorization in the vector database.
[0061] It is understandable that the initial text embedding model includes but is not limited to M3E (Multi-grained Embedding, i.e. a multi-grained embedding model), Qwen-embedding (i.e. a text embedding model), BGE (BAAI General Embedding, i.e. an open source embedded vector model) and other models. In a specific implementation, the BGE model is optimized based on the target tax data in the tax field, and the optimization process is specifically as follows: first, the target tax data is vectorized using the initial text embedding model to obtain vectorized tax data, the target tax data includes the historical report data and the tax report data, and the query text and the vectorized tax data are similarity calculated, the vectorized tax data ranked in the top 50 in similarity are used as the target vectorized tax data, and the target vectorized tax data with a similarity between 0.3 and 0.8 is used as training data, and then the initial text embedding model is trained based on the training data to obtain the target text embedding model. Among them, 0.3 and 0.8 are preset filtering rules obtained based on multiple experiments in the tax field.
[0062] Specifically, the training data obtained based on the target tax data is used to train the initial text embedding model to obtain the target text embedding model, including: vectorizing the target tax data based on the initial text embedding model to obtain vectorized tax data; calculating the similarity between the query text and the vectorized tax data, and obtaining the target vectorized tax data that meets the preset similarity conditions based on the calculation result; filtering the target vectorized tax data based on preset filtering rules to obtain training data, and training the initial text embedding model based on the training data to obtain the target text embedding model.
[0063] Step S13: after receiving the analysis theme input by the user, determine the corresponding target report data from the vector database based on the analysis theme and in combination with the target index library; the target index library is an index library created based on the context block data.
[0064] In this embodiment, a target index library is obtained by creating a corresponding index library through the context block data, a semantic analysis is performed on the analysis topic input by the user end to identify the user intent, and the vector database is searched based on the user intent and in combination with the target index library to obtain the target report data most relevant to the user intent. Specifically, after receiving the analysis topic input by the user end, the corresponding target report data is determined from the vector database based on the analysis topic and in combination with the target index library, including: creating a corresponding index library based on the context block data to obtain the target index library; after receiving the analysis topic input by the user end, semantic analysis is performed on the analysis topic to obtain the user intent; based on the user intent and in combination with the target index library, the vector database is searched to obtain the target report data corresponding to the analysis topic.
[0065] It is understandable that after obtaining the analysis topic input by the user, the analysis topic is first semantically analyzed using the preset large model to obtain the user's intention, and then the report data most relevant to the user's intention is retrieved based on the vector database and the target index library to obtain the target report data. Using the vector database and the target index library for double retrieval can effectively ensure that the retrieved target report data is the report data most relevant to the user's intention, thereby improving the accuracy of subsequent analysis report generation.
[0066] Step S14: Analyze the analysis subject and the target report data using each programming big model to obtain an analysis result, and vectorize the analysis result and the analysis subject to obtain vectorized data.
[0067] In this embodiment, the multimodal large model is used to analyze the analysis topic and the target report data to generate various analysis directions. Figure 3A data analysis schematic diagram is provided for this embodiment, and then each of the analysis directions is debugged using a preset prompt project to obtain a target prompt, the target report data is processed using the target prompt and based on each programming large model to obtain a corresponding target answer, and a corresponding question-answer pair is generated based on the target answer, and then the question-answer pair and the analysis topic are vectorized to obtain vectorized data. Specifically, the analysis topic and the target report data are analyzed using each programming large model to obtain an analysis result, and the analysis result and the analysis topic are vectorized to obtain vectorized data, including: analyzing the analysis topic and the target report data to generate each analysis direction, and debugging each of the analysis directions using a preset prompt project to generate a target prompt; based on the target prompt and using each programming large model, the target report data is processed to obtain a corresponding target answer, and based on the target answer, a corresponding question-answer pair is obtained, and the question-answer pair and the analysis topic are vectorized to obtain vectorized data.
[0068] In a specific implementation, each programming big model is used to answer the user's question, and a general big model is selected to judge all the answers obtained to obtain the optimal target answer for output, and the final question-answer pair is presented in the form of a dictionary, such as (Question 1: Answer 1, Question 2: Answer 2). It should be pointed out that the multimodal big model includes but is not limited to Qwen2.5 (Tongyi Qianwen, i.e. Tongyi Qianwen Model) and ChatGLM (Chat Global Language Model); the programming big model includes but is not limited to TableLLM (a big language model).
[0069] Step S15, retrieving target context block data corresponding to the vectorized data from the vector database, and inputting a report generation prompt generated based on the target context block data and the analysis result into a preset analysis report generation model to obtain an analysis report.
[0070] In this embodiment, the vectorized data is searched based on the context retrieval technology and using the vector database and the target index library to obtain the relevant block data that meets the preset relevance conditions, and the relevant block data is filtered and sorted using the reordering technology, and the obtained target context block data is combined with the analysis results to generate a report generation prompt. Figure 4 A schematic diagram of generating a report generation prompt is provided in this embodiment, and the report generation prompt is input into a preset analysis report generation model to obtain an analysis report.
[0071] Specifically, the target context block data corresponding to the vectorized data is retrieved from the vector database, and a report generation prompt generated based on the target context block data and the analysis result is input into a preset analysis report generation model to obtain an analysis report, including: performing vector retrieval on the vectorized data through context retrieval technology to retrieve each related block data that meets preset correlation conditions from the vector database; using reordering technology to filter and sort each related block data to obtain the target context block data; generating a report generation prompt based on the target context block data and the analysis result, and inputting the report generation prompt into a preset analysis report generation model to obtain an analysis report.
[0072] As can be seen from the above, before constructing the vector database, the present application first pre-processes and semantically segments the historical report data, adds explanatory context generated based on preset prompt words to each segmented report data, and creates a target index library based on the context segmented data. In this way, report data retrieval based on the vector database and the target index library can overcome the problem of destroying the context when segmenting documents, resulting in the lack of sufficient background information in the retrieved information segments, and significantly improve the accuracy of retrieval; at the same time, the initial text embedding model is optimized, so that the optimized target text embedding model exhibits excellent processing capabilities for tax field data, effectively improves the quality of vectorization, and directly affects the effect of subsequent vector retrieval, thereby improving the quality and relevance of the analysis report.
[0073] It can be seen from the above embodiments that the present application generates a report generation prompt based on the target report data retrieved from the vector database and the target index library to generate an analysis report. Therefore, the process of generating a report generation prompt based on the target report data retrieved from the vector database and the target index library is described.
[0074] See also Figure 5 As shown, the embodiment of the present invention discloses a specific method for generating a tax report analysis report, including:
[0075] First, historical report data and tax report data in the tax field are obtained, the historical report data are preprocessed to obtain processed report data, the processed report data are semantically segmented based on natural breakpoints to obtain segmented report data, an explanatory context corresponding to the segmented report data generated based on preset prompt words is added to the segmented report data to obtain context segmented data, and the context segmented data is vectorized using an optimized target file embedding model to obtain a vector database, and a target index library is created based on the context segmented data.
[0076] Figure 6A schematic diagram of generating a question-answer pair is provided for this embodiment. After receiving the analysis topic input by the user, the analysis is semantically parsed day by day to obtain the user's intention, and based on the analysis topic and in combination with the target index library, the target report data most relevant to the user's intention is retrieved from the vector database, and the analysis topic and the target report data are analyzed using a multimodal large model to obtain multiple analysis directions, and then each of the analysis directions is debugged using a preset prompt project to obtain a target prompt, and the target report data is processed using the target prompt and based on each programming large model to obtain a corresponding target answer, and a corresponding question-answer pair is generated based on the target answer.
[0077] Figure 7 A schematic diagram of an analysis report generation provided for this embodiment. The question-answer pair and the analysis topic are vectorized to obtain vectorized data, and then the vectorized data is vectorized using context retrieval technology and based on the vector database and the target index library to obtain knowledge fragments (i.e., each related block data) that meet preset relevance conditions, and the knowledge fragments are filtered and sorted using reordering technology, and the target context block data obtained is combined with the question-answer pair based on a preset prompt project to generate a report generation prompt, and finally the report generation prompt is input into a preset analysis report generation model to obtain an analysis report.
[0078] As can be seen from the above, this embodiment constructs a vector knowledge base and a target index library through historical report data and tax report data, and performs double retrieval on the analysis topic input by the user, so that the retrieved target report data is more accurate. At the same time, the initial file embedding model is optimized to obtain the target file embedding model, so that the optimized target text embedding model shows excellent processing capabilities for tax field data, thereby greatly improving the quality of the analysis report.
[0079] Accordingly, see Figure 8 As shown, the present application also provides a tax report analysis report generating device, including:
[0080] The data segmentation module 11 is used to obtain historical report data and tax report data, pre-process the historical report data and semantically segment the historical report data to obtain segmented report data, and add an explanatory context corresponding to the segmented report data generated based on a preset prompt word to the segmented report data to obtain context segmented data;
[0081] The data vectorization module 12 is used to vectorize the context block data using the target file embedding model and store it in a vector database; the target text embedding model is a text embedding model obtained by optimizing the initial text embedding model based on the target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data;
[0082] The target data determination module 13 is used to determine the corresponding target report data from the vector database based on the analysis theme and in combination with the target index library after receiving the analysis theme input by the user terminal; the target index library is an index library created based on the context block data;
[0083] The data analysis module 14 is used to analyze the analysis subject and the target report data using each programming big model to obtain an analysis result, and vectorize the analysis result and the analysis subject to obtain vectorized data;
[0084] The analysis report generation module 15 is used to retrieve the target context block data corresponding to the vectorized data from the vector database, and input the report generation prompt generated based on the target context block data and the analysis results into a preset analysis report generation model to obtain an analysis report.
[0085] As can be seen from the above, before constructing the vector database, the present application first pre-processes and semantically segments the historical report data, adds explanatory context generated based on preset prompt words to each segmented report data, and creates a target index library based on the context segmented data. In this way, report data retrieval based on the vector database and the target index library can overcome the problem of destroying the context when segmenting documents, resulting in the lack of sufficient background information in the retrieved information segments, and significantly improve the accuracy of the retrieval; at the same time, the initial text embedding model is optimized so that the optimized target text embedding model exhibits excellent processing capabilities for tax field data, effectively improves the quality of vectorization, and directly affects the effect of subsequent vector retrieval, thereby improving the quality and relevance of the analysis report. In some specific implementations, the data segmentation module 11 may specifically include:
[0086] A data preprocessing unit, used to obtain the collected historical report data and tax report data, and preprocess the historical report data to obtain processed report data;
[0087] A semantic segmentation unit is used to semantically segment the processed report data to obtain segmented report data, generate an explanatory context corresponding to the segmented report data based on preset prompt words, and add the explanatory context to the segmented report data to obtain context segmented data.
[0088] In some specific implementations, the data vectorization module 12 may specifically include:
[0089] The model training unit is used to train the initial text embedding model based on the training data obtained from the target tax data to obtain the target text embedding model, and use the target file embedding model to vectorize the context block data, and store the context block data obtained after vectorization in the vector database.
[0090] In some specific implementations, the data vectorization module 12 may specifically include:
[0091] A tax data vectorization unit, used for vectorizing the target tax data based on the initial text embedding model to obtain vectorized tax data;
[0092] A similarity calculation unit, configured to perform similarity calculation on the query text and the vectorized tax data, and obtain target vectorized tax data that meets a preset similarity condition based on the calculation result;
[0093] The model training completion unit is used to filter the target vectorized tax data based on preset filtering rules to obtain training data, and train the initial text embedding model based on the training data to obtain the target text embedding model.
[0094] In some specific implementations, the target data determination module 13 may specifically include:
[0095] An index library creation unit, used to create a corresponding index library based on the context block data to obtain a target index library;
[0096] A semantic analysis unit, configured to perform semantic analysis on the analysis topic after receiving the analysis topic input by the user end, so as to obtain the user intention;
[0097] A database retrieval unit is used to search the vector database based on the user intention and in combination with the target index library to obtain target report data corresponding to the analysis topic.
[0098] In some specific implementations, the data analysis module 14 may specifically include:
[0099] A data analysis completion unit, used for analyzing the analysis subject and the target report data to generate various analysis directions, and debugging each of the analysis directions using a preset prompting project to generate a target prompting language;
[0100] A report data processing unit is used to process the target report data based on the target prompt and using each programming model to obtain a corresponding target answer, and obtain a corresponding question-answer pair based on the target answer, and vectorize the question-answer pair and the analysis topic to obtain vectorized data.
[0101] In some specific implementations, the analysis report generating module 15 may specifically include:
[0102] A vector retrieval unit, configured to perform vector retrieval on the vectorized data by using a context retrieval technology, so as to retrieve relevant block data satisfying a preset relevance condition from the vector database;
[0103] A block data filtering unit, used for filtering and sorting each of the related block data by using a reordering technique to obtain target context block data;
[0104] A report generation unit is used to generate a report generation prompt based on the target context block data and the analysis result, and input the report generation prompt into a preset analysis report generation model to obtain an analysis report.
[0105] Furthermore, the present application also discloses an electronic device. Fig. 9 This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the tax report analysis report generation method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0106] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0107] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0108] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the tax report analysis report generation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0109] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed tax report analysis report generation method is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0110] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0111] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0112] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0113] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0114] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods 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 general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for generating a tax report analysis report, characterized in that: include: Acquire historical report data and tax report data, preprocess and semantically segment the historical report data to obtain segmented report data, and add explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data; Vectorizing the context block data using a target file embedding model and storing the vectorized data in a vector database; The target text embedding model is a text embedding model obtained by optimizing the initial text embedding model based on the target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data; After receiving the analysis topic input by the user, the corresponding target report data is determined from the vector database based on the analysis topic and in combination with the target index library; The target index library is an index library created based on the context block data; Analyzing the analysis subject and the target report data using each programming big model to obtain an analysis result, and vectorizing the analysis result and the analysis subject to obtain vectorized data; Target context block data corresponding to the vectorized data is retrieved from the vector database, and a report generation prompt generated based on the target context block data and the analysis result is input into a preset analysis report generation model to obtain an analysis report.
2. The method for generating a tax return analysis report according to claim 1, characterized in that: The acquiring of historical report data and tax report data, preprocessing and semantically segmenting the historical report data to obtain segmented report data, and adding an explanatory context corresponding to the segmented report data generated based on preset prompt words to the segmented report data to obtain context segmented data, includes: Acquire the collected historical report data and tax report data, and pre-process the historical report data to obtain processed report data; The processed report data is semantically segmented to obtain segmented report data, an explanatory context corresponding to the segmented report data is generated based on preset prompt words, and the explanatory context is added to the segmented report data to obtain context segmented data.
3. The method for generating a tax report analysis report according to claim 1, characterized in that: The process of vectorizing the context block data by using the target file embedding model and storing the vectorized context block data in a vector database includes: The initial text embedding model is trained based on the training data obtained from the target tax data to obtain a target text embedding model, and the context block data is vectorized using the target document embedding model, and the context block data obtained after vectorization is stored in a vector database.
4. The method for generating a tax return analysis report according to claim 3, characterized in that: The training data obtained based on the target tax data is used to train the initial text embedding model to obtain the target text embedding model, including: Vectorizing the target tax data based on the initial text embedding model to obtain vectorized tax data; By calculating the similarity between the query text and the vectorized tax data, and obtaining the target vectorized tax data that meets the preset similarity condition based on the calculation result; The target vectorized tax data is filtered based on preset filtering rules to obtain training data, and the initial text embedding model is trained based on the training data to obtain a target text embedding model.
5. The method for generating a tax report analysis report according to claim 1, characterized in that: After receiving the analysis topic input by the user, determining corresponding target report data from the vector database based on the analysis topic and in combination with the target index library includes: Creating a corresponding index library based on the context block data to obtain a target index library; After receiving the analysis topic input by the user, semantic analysis is performed on the analysis topic to obtain the user intention; The vector database is searched based on the user intention and in combination with the target index library to obtain target report data corresponding to the analysis topic.
6. The method for generating a tax return analysis report according to claim 1, characterized in that: The using of each programming big model to analyze the analysis subject and the target report data to obtain analysis results, and vectorizing the analysis results and the analysis subject to obtain vectorized data, includes: Analyze the analysis subject and the target report data to generate various analysis directions, and debug each analysis direction using a preset prompting project to generate a target prompting statement; Based on the target prompts and using various programming models, the target report data is processed to obtain corresponding target answers, and corresponding question-answer pairs are obtained based on the target answers. The question-answer pairs and the analysis topics are vectorized to obtain vectorized data.
7. The method for generating a tax report analysis report according to any one of claims 1 to 6, characterized in that: The step of retrieving target context block data corresponding to the vectorized data from the vector database, and inputting a report generation prompt generated based on the target context block data and the analysis result into a preset analysis report generation model to obtain an analysis report includes: Performing vector retrieval on the vectorized data by using a context retrieval technology to retrieve relevant block data satisfying a preset relevance condition from the vector database; Filtering and sorting the relevant block data by using a reordering technique to obtain target context block data; A report generation prompt is generated based on the target context block data and the analysis result, and the report generation prompt is input into a preset analysis report generation model to obtain an analysis report.
8. A tax report analysis report generating device, characterized in that: include: A data segmentation module is used to obtain historical report data and tax report data, pre-process the historical report data and semantically segment the historical report data to obtain segmented report data, and add an explanatory context corresponding to the segmented report data generated based on a preset prompt word to the segmented report data to obtain context segmented data; A data vectorization module, used to vectorize the context block data using a target file embedding model and store it in a vector database; The target text embedding model is a text embedding model obtained by optimizing the initial text embedding model based on the target tax data; the vector database also includes data obtained by vectorizing each report field in the tax report data; A target data determination module, configured to determine corresponding target report data from the vector database based on the analysis theme and in combination with a target index library after receiving the analysis theme input by the user terminal; The target index library is an index library created based on the context block data; A data analysis module, used for analyzing the analysis subject and the target report data by using each programming big model to obtain an analysis result, and vectorizing the analysis result and the analysis subject to obtain vectorized data; An analysis report generation module is used to retrieve target context block data corresponding to the vectorized data from the vector database, and input a report generation prompt generated based on the target context block data and the analysis results into a preset analysis report generation model to obtain an analysis report.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the tax return analysis report generation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the tax form analysis report generating method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Project document generation method, device and system and computer medium
CN120975049A
Report generation method and device, storage medium, electronic equipment and program product
CN121766277A