Tax risk assessment method, device and model and storage medium

By building a tax risk assessment model based on a large language model and fine-tuning it, combined with the reinforcement learning environment to optimize the model parameters, the problem of difficulty in accurately assessing tax risks in the existing technology is solved, and more efficient and reliable tax risk management is achieved.

CN119887411APending Publication Date: 2025-04-25GREATER BAY AREA INST FOR INNOVATION HUNAN UNIV +1

Patent Information

Application Number
CN202510377050.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing tax risk assessment technology based on artificial intelligence models is difficult to accurately, comprehensively, real-time and personalize the evaluation of complex and changeable corporate operating conditions and tax policies, and is prone to omissions or misjudgments in risk points.

Method used

A tax risk assessment model based on a large language model is constructed, and the first low rank matrix and the second low rank matrix are introduced for fine-tuning, the weight matrix of the middle layer is updated, and the model parameters are optimized by combining the reinforcement learning environment and reward function to achieve accurate assessment of tax risk.

Benefits of technology

It improves the accuracy, comprehensiveness, real-timeness and personalization of tax risk assessment, can more accurately identify the tax risks faced by enterprises, generate personalized tax suggestions that meet the actual needs of enterprises, and help enterprises effectively manage tax risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887411A_ABST
    Figure CN119887411A_ABST
Patent Text Reader

Abstract

The invention relates to a tax risk assessment method, device and model and a storage medium. The method comprises the following steps: constructing a tax risk assessment model based on a large language model; and performing fine tuning on the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix into a middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to an input data set, and performing fine tuning on the tax risk assessment model according to the updated first low-rank matrix and the second low-rank matrix. Updating the weight matrix of the middle layer; and according to the tax related data, performing tax risk assessment through the fine-tuned tax risk assessment model, and outputting tax risks and / or tax suggestions. According to the scheme provided by the invention, accurate, comprehensive, real-time and personalized evaluation can be carried out on the tax risk, and the accuracy, comprehensiveness, real-time performance and personalized degree of tax risk evaluation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a tax risk assessment method, device, model and storage medium. Background Art

[0002] In today's complex and ever-changing business environment, tax risk assessment is of vital importance to the stable development of enterprises. With the acceleration of economic globalization and increasingly fierce market competition, enterprises are facing unprecedented challenges. As one of the key factors, accurate assessment and effective management of tax risk have become the focus of enterprises.

[0003] In recent years, with the rapid development of artificial intelligence technology, tax risk assessment based on artificial intelligence models has been developed. In the long-term practice of tax risk assessment based on artificial intelligence models, although certain tax risk assessment experience has been accumulated, tax risk assessment based on artificial intelligence models is still in its infancy and has gradually shown many limitations in the modern business environment.

[0004] Tax risk assessment based on artificial intelligence models of related technologies is limited by fixed rules and limited data, and it is difficult to accurately grasp the complex and ever-changing business conditions and tax policies of enterprises. When faced with diverse business models, complex legal interpretations, cross-regional operations and emerging business models, it is easy to miss or misjudge risk points, making it difficult to accurately, comprehensively, in real time and in a personalized manner assess tax risks. Summary of the invention

[0005] In order to solve or partially solve the problems existing in the relevant technologies, the present application provides a tax risk assessment method, device, model and storage medium, which can accurately, comprehensively, real-time and personalized assess tax risks, and improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment.

[0006] The first aspect of the present application provides a tax risk assessment method, the method comprising: Construct a tax risk assessment model based on a large language model; Fine-tuning the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; Based on tax-related data, tax risk assessment is conducted through a fine-tuned tax risk assessment model to output tax risks and / or tax recommendations.

[0007] Preferably, the method further comprises: Collecting tax policy data and converting the tax policy data into structured updated knowledge; The knowledge of the fine-tuned tax risk assessment model is updated according to the fusion coefficient and the updated knowledge.

[0008] Preferably, the method further comprises: defining a reinforcement learning environment for the fine-tuned tax risk assessment model; Defining a reward function of the fine-tuned tax risk assessment model according to the reinforcement learning environment; According to the reinforcement learning environment, defining an objective function for optimizing model parameters of the fine-tuned tax risk assessment model; According to the objective function, calculating and updating the gradient of the model parameters; The model parameters are updated according to the gradient.

[0009] Preferably, the first low-rank matrix and the second low-rank matrix are introduced into the middle layer of the tax risk assessment model, the first low-rank matrix and the second low-rank matrix are updated according to the input data set, and the weight matrix of the middle layer is updated according to the updated first low-rank matrix and the second low-rank matrix, including: Introducing a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model; Calculating, based on the input data set, a loss function value of the tax risk and / or tax advice output by the tax risk assessment model based on the data set; Calculate a first gradient of the first low-rank matrix according to the loss function value and the weight matrix of the intermediate layer; Calculate a second gradient of the second low-rank matrix according to the loss function value and the weight matrix of the intermediate layer; Obtaining a first updated low-rank matrix of the first low-rank matrix according to the first gradient and the learning rate of the tax risk assessment model; Obtaining a second updated low-rank matrix of the second low-rank matrix according to the second gradient and a learning rate of the tax risk assessment model; Updating the first low-rank matrix to the first updated low-rank matrix, updating the second low-rank matrix to the second updated low-rank matrix, and updating the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix until the set number of iterations is reached to obtain a fine-tuned tax risk assessment model; or, The first low-rank matrix is ​​updated to the first updated low-rank matrix, the second low-rank matrix is ​​updated to the second updated low-rank matrix, and the weight matrix of the intermediate layer is updated according to the first updated low-rank matrix and the second updated low-rank matrix, until the loss function value of the tax risk and / or tax advice output by the tax risk assessment model according to the data set is less than or equal to the set loss function threshold, so as to obtain a fine-tuned tax risk assessment model.

[0010] Preferably, the first low-rank matrix is ​​set according to the initial weight matrix of the intermediate layer; The second low-rank matrix is ​​set according to the initial weight matrix of the intermediate layer.

[0011] Preferably, updating the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix includes: According to the weight matrix of the intermediate layer, the first updated low-rank matrix and the second updated low-rank matrix, an updated weight matrix of the intermediate layer is obtained, and the weight matrix of the intermediate layer is updated to the updated weight matrix.

[0012] Preferably, the step of acquiring the data set includes: Collect tax-related data, tax policy data, tax risks and / or tax advice corresponding to the tax-related data and tax policy data; The tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data are converted into a data set in an instruction-following format.

[0013] A second aspect of the present application provides a tax risk assessment device, the device comprising: Model building module, used to build a tax risk assessment model based on a large language model; A model fine-tuning module, used for fine-tuning the tax risk assessment model constructed by the model construction module, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to an input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; The model output module is used to perform tax risk assessment based on tax-related data using the tax risk assessment model fine-tuned by the model fine-tuning module, and output tax risks and / or tax recommendations.

[0014] The third aspect of the present application provides a tax risk assessment model, including: Processor; and The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.

[0015] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor, causes the processor to execute the method as described above.

[0016] The technical solution provided by this application may have the following beneficial effects: The technical solution of the present application constructs a tax risk assessment model based on a large language model; fine-tunes the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; based on tax-related data, tax risk assessment is performed through the fine-tuned tax risk assessment model, and tax risks and / or tax recommendations are output; by constructing a new tax risk assessment model based on a large language model, the advantages of the large language model can be fully utilized, based on the powerful understanding ability of the large language model, according to the input It can output tax risks and / or tax recommendations based on the real-time tax-related data of enterprises, and generate personalized tax recommendations that meet the actual needs of enterprises based on the individual characteristics of enterprises, covering tax planning, compliance management, financial decision-making and other aspects, helping enterprises to control tax risks in a targeted manner, improve the overall tax management level and competitiveness of enterprises, overcome the limitations of tax risk assessment of related technologies, and conduct accurate, comprehensive, real-time and personalized assessment of tax risks, improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment, and provide enterprises with more efficient and reliable tax risk management solutions to cope with the increasingly complex business environment and tax challenges, and ensure that enterprises achieve sustainable development under the premise of legality and compliance.

[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.

[0019] Figure 1 It is a flowchart of a tax risk assessment method shown in an embodiment of the present application; Figure 2 is another flow chart of the tax risk assessment method shown in the embodiment of the present application; Figure 3 is another flow chart of the tax risk assessment method shown in the embodiment of the present application; Figure 4 It is a structural schematic diagram of a tax risk assessment device shown in an embodiment of the present application; Figure 5 is another structural schematic diagram of the tax risk assessment device shown in the embodiment of the present application; Figure 6 It is a structural diagram of the tax risk assessment model shown in the embodiment of the present application. DETAILED DESCRIPTION

[0020] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.

[0021] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0022] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0023] In today's complex and ever-changing business environment, tax risk assessment is of vital importance to the stable development of enterprises. With the acceleration of economic globalization and increasingly fierce market competition, enterprises are facing unprecedented challenges. As one of the key factors, accurate assessment and effective management of tax risk have become the focus of enterprises.

[0024] In recent years, with the rapid development of artificial intelligence (AI) technology, tax risk assessment based on AI models has been developed. In the long-term practice of tax risk assessment based on AI models, although certain tax risk assessment experience has been accumulated, tax risk assessment based on AI models is still in its infancy and has gradually shown many limitations in the modern business environment.

[0025] First, the tax risk assessment based on artificial intelligence models of related technologies is mostly limited to simple tax knowledge query, regulatory retrieval or preliminary consulting services, and fails to deeply tap the potential of artificial intelligence models. The diversity and complexity of business activities of enterprises continue to rise, business model innovations emerge in an endless stream, and tax laws and regulations also change frequently. With the rise of the digital economy, the emergence of some emerging industries such as e-commerce and sharing economy has brought new business models and transaction methods. The tax risk assessment based on artificial intelligence models of related technologies is difficult to adapt to these changes. It often relies on fixed assessment rules and relatively limited data sources, and cannot accurately assess the potential tax risks. When dealing with complex business scenarios and massive internal data of enterprises, the tax risk assessment based on artificial intelligence models of related technologies lacks effective data access and processing mechanisms, and cannot deeply integrate the actual situation of enterprises with artificial intelligence models, making it difficult to achieve accurate risk assessment.

[0026] Secondly, the complex tax law system requires precise interpretation and application. There are significant differences in tax policies in different industries and regions, and the tax laws and regulations are numerous and highly professional. It is not easy for enterprises to accurately understand and follow these regulations. The tax risk assessment based on artificial intelligence models of related technologies lacks flexibility and depth in interpreting regulations, making it difficult to cope with the challenges brought about by changes in regulations, and easily leads to misjudgment or omission of tax risks. At the same time, the tax risk assessment based on artificial intelligence models of related technologies has obvious shortcomings in data integration and mining. The enterprise involves multiple departments such as finance, taxation, and business operations, and the data is stored in a scattered manner and in different formats, lacking effective integration methods. This makes it difficult for the tax risk assessment based on artificial intelligence models of related technologies to fully obtain and comprehensively analyze relevant data, and it is impossible to fully mine the risk information hidden behind the data. The insufficient use of external environmental data, such as macroeconomic conditions, market dynamics, industry development trends, and policy changes, has led to the lack of foresight and comprehensiveness of the assessment results, and the inability to timely reflect the impact of external factors on corporate tax risks.

[0027] Thirdly, the tax risk assessment based on artificial intelligence models of relevant technologies finds it difficult to track changes in business operating data and tax policy updates in real time, and fails to keep pace with real-time changes in tax policies and business conditions, resulting in delayed assessment results and lack of timeliness and adaptability.

[0028] Finally, although the tax risk assessment based on artificial intelligence models of relevant technologies assesses tax risks, it often lacks personalized considerations and cannot meet the specific needs and risk preferences of different companies, and the assessment results are poorly personalized.

[0029] Therefore, tax risk assessment based on AI models of relevant technologies is limited by fixed rules and limited data, and it is difficult to accurately grasp the complex and ever-changing business conditions and tax policies of enterprises. When faced with diverse business models, complex legal interpretations, cross-regional operations and emerging business models, it is easy to miss or misjudge risk points, making it difficult to accurately, comprehensively, in real time and individually assess tax risks.

[0030] In response to the above problems, the embodiments of the present application provide a tax risk assessment method that can accurately, comprehensively, real-time and personalized assess tax risks, thereby improving the accuracy, comprehensiveness, real-time and personalization of tax risk assessment.

[0031] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0032] Figure 1 It is a flowchart of the tax risk assessment method shown in the embodiment of the present application.

[0033] See also Figure 1 , a tax risk assessment method, comprising: Step 101, construct a tax risk assessment model based on a large language model.

[0034] In one embodiment, a tax risk assessment model based on a big language model may be constructed according to the architecture of the big language model.

[0035] Step 102, fine-tuning the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix.

[0036] In one embodiment, tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data of the enterprise's historical tax risk assessment can be collected; the tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data are pre-processed to obtain a data set for fine-tuning the tax risk assessment model; a first low-rank matrix and a second low-rank matrix are introduced into the middle layer of the tax risk assessment model; the data set is input into the tax risk assessment model that introduces the first low-rank matrix and the second low-rank matrix into the middle layer, and the first low-rank matrix and the second low-rank matrix are updated according to the output tax risks and / or tax suggestions, and the weight matrix of the middle layer is updated according to the updated first low-rank matrix and the second low-rank matrix, so as to achieve fine-tuning of the tax risk assessment model.

[0037] Step 103 , based on the tax-related data, tax risk assessment is performed using the fine-tuned tax risk assessment model, and tax risks and / or tax recommendations are output.

[0038] In one embodiment, the current tax-related data may be input into a fine-tuned tax risk assessment model; based on the current tax-related data, a tax risk assessment is performed using the fine-tuned tax risk assessment model, and tax risks and / or tax recommendations corresponding to the current tax-related data are output.

[0039] The tax risk assessment method of the embodiment of the present application constructs a tax risk assessment model based on a large language model; fine-tunes the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; performing tax risk assessment through the fine-tuned tax risk assessment model according to tax-related data, and outputting tax risks and / or tax recommendations; by constructing a new tax risk assessment model based on a large language model, it is possible to fully utilize the advantages of the large language model, based on the powerful understanding ability of the large language model, Based on the input real-time corporate tax-related data, tax risks and / or tax recommendations are output. Combined with the individual characteristics of the enterprise, personalized tax recommendations that meet the actual needs of the enterprise can be generated, covering tax planning, compliance management, financial decision-making and other aspects, helping enterprises to control tax risks in a targeted manner, improve the overall tax management level and competitiveness of the enterprise, overcome the limitations of tax risk assessment of related technologies, and conduct accurate, comprehensive, real-time and personalized assessment of tax risks, improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment, and provide enterprises with more efficient and reliable tax risk management solutions to cope with the increasingly complex business environment and tax challenges, and ensure that enterprises achieve sustainable development under the premise of legality and compliance.

[0040] Figure 2 is another flow chart of the tax risk assessment method shown in the embodiment of the present application; Figure 3 It is another flowchart of the tax risk assessment method shown in the embodiment of the present application. Figure 2 and Figure 3 Relative to Figure 1 The scheme of the present application is described in more detail.

[0041] See also Figure 2 and Figure 3 , a tax risk assessment method, comprising: Step 201, constructing a tax risk assessment model based on a large language model.

[0042] In one embodiment, a tax risk assessment model based on a big language model may be constructed according to the architecture of the big language model.

[0043] In one embodiment, the large language model has powerful natural language processing capabilities and can understand and process complex text information. Its architecture can provide a basic framework for data processing, knowledge fusion and risk assessment in the tax risk assessment process. Through this architecture, multi-source data can be effectively organized and analyzed, and various types of input data can be converted into a form that the model can understand, laying the foundation for accurate tax risk assessment.

[0044] Step 202 , pre-process the collected data to generate a data set in an instruction-following format for fine-tuning the tax risk assessment model.

[0045] In one embodiment, tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data may be collected; and the tax-related data, tax policy data, tax risks and / or tax suggestions may be converted into a data set in an instruction-following format.

[0046] In one embodiment, the collected data may be tax-related data for a set time period within the enterprise, tax policy data for a set time period outside the enterprise, and tax risks and / or tax suggestions corresponding to the tax-related data for a set time period within the enterprise and the tax policy data for a set time period outside the enterprise. The tax-related data, tax policy data, tax risks and / or tax suggestions may be in the format of text+data.

[0047] In one embodiment, as shown in Table 1, the tax-related data for a time period set within the enterprise may include, but is not limited to, one or more of financial data, tax data, and market data. The tax policy data for a time period set outside the enterprise may include, but is not limited to, industry regulatory policy data and / or tax policy and regulation data.

[0048] Table 1:

[0049] In one embodiment, the collected tax-related data, tax policy data, tax risks and / or tax recommendations may be preprocessed to obtain a data set in an instruction-output format (a type of instruction-following format, specifically a format in which a user inputs instructions and a model outputs results according to the requirements of the instructions).

[0050] In one embodiment, the tax-related data and the tax policy data may be preprocessed, and the tax-related data and the tax policy data may be spliced ​​into a Prompt (AI model prompt word); the Prompt spliced ​​into the tax-related data and the tax policy data may be used as the instruction of the instruction-output format dataset, and the tax risk and / or tax advice corresponding to the tax-related data and the tax policy data may be used as the out of the instruction-output format dataset to obtain the instruction-output format dataset. The instruction-output format may be as shown in Table 2.

[0051] Table 2:

[0052] In one embodiment, tax policy data for a set time period outside the enterprise can be collected in real time through web crawler technology, industry regulatory policy data and / or tax policy and regulation data for a set time period outside the enterprise can be obtained, the collected tax-related data, tax policy data, and tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data can be pre-processed, and historical tax-related data within the enterprise, tax policies outside the enterprise, and corresponding tax risks and / or tax suggestions given by industry experts based on the historical tax-related data within the enterprise and tax policies outside the enterprise can be integrated to generate a data set in instruction-output format.

[0053] Step 203: input the data set into the tax risk assessment model, fine-tune the tax risk assessment model, and obtain a fine-tuned tax risk assessment model.

[0054] In one embodiment, the weight matrix of the middle layer of the large language model can be obtained , where d in is the input dimension of the middle layer of the large language model, d outis the output dimension of the middle layer of the large language model, and R is a real number set; a large amount of language knowledge and patterns are encoded in the weight matrix of the middle layer of the large language model. The weight matrix of the middle layer of the large language model can be used as the weight matrix of the pre-training of the tax risk assessment model, and the weight matrix of the middle layer of the large language model is set to the initial weight matrix of the middle layer of the tax risk assessment model. According to the initial weight matrix of the middle layer of the tax risk assessment model, the first low-rank matrix is ​​set; according to the initial weight matrix of the middle layer of the tax risk assessment model, the second low-rank matrix is ​​set; the first low-rank matrix and the second low-rank matrix are introduced into the middle layer of the large language model.

[0055] In one embodiment, the input dimension d of the middle layer of the large language model can be in , real number set R, set the first low-rank matrix ; According to the input dimension d of the middle layer of the large language model out , real number set R, set the second low-rank matrix ; Where r is the rank of the first low-rank matrix A and the second low-rank matrix B, r≤min(d in , d out ).

[0056] In one embodiment, the first low-rank matrix A and the second low-rank matrix B can be preliminarily set according to the complexity of the tax risk assessment, the data scale and the architecture of the large language model. For a tax risk assessment model with high data feature dimensions and complex model structure, the ranks of the first low-rank matrix A and the second low-rank matrix B can be increased respectively.

[0057] In one embodiment, a first low-rank matrix and a second low-rank matrix may be introduced into the middle layer of the tax risk assessment model; a data set is input into the tax risk assessment model; based on the input data set, a loss function value of the tax risk assessment model outputting tax risks and / or tax recommendations based on the data set is calculated; based on the loss function value and the weight matrix of the middle layer, a first gradient of the first low-rank matrix is ​​calculated; based on the loss function value and the weight matrix of the middle layer, a second gradient of the second low-rank matrix is ​​calculated; based on the first gradient and the learning rate of the tax risk assessment model, a first updated low-rank matrix of the first low-rank matrix is ​​obtained; based on the second gradient and the learning rate of the tax risk assessment model, a second updated low-rank matrix of the second low-rank matrix is ​​obtained; the first low-rank matrix is ​​updated to a first updated low-rank matrix, the second low-rank matrix is ​​updated to a second updated low-rank matrix, and the weight matrix of the middle layer is updated according to the first updated low-rank matrix and the second updated low-rank matrix, until a set number of iterations is reached to obtain a fine-tuned tax risk assessment model.

[0058] In one embodiment, the first low-rank matrix can be updated to a first updated low-rank matrix, the second low-rank matrix can be updated to a second updated low-rank matrix, and the weight matrix of the intermediate layer can be updated according to the first updated low-rank matrix and the second updated low-rank matrix until the loss function value of the tax risk and / or tax advice output by the tax risk assessment model based on the data set is less than or equal to the set loss function threshold, thereby obtaining a fine-tuned tax risk assessment model.

[0059] In one embodiment, a dataset in the format of instruction-output can be input into the tax risk assessment model. The tax risk assessment model can encode "instruction" in the dataset into a vector that the model can understand: [id_1, id_2, ..., id_n], where id_n represents the id corresponding to the nth token (i.e., the nth word in the instruction text) in the tax risk assessment model vocabulary; encode the output into a vector: [-100, -100, -100, id_1, id_2, ..., id_m], where -100 has n, indicating that n tokens of "instruction" are masked, and id_1 to id_m represent the ids corresponding to the tokens in the output; adopt the LoRA (Low-Rank Adaptation, a large language model fine-tuning technology based on low-rank adaptation) supervised fine-tuning strategy, fine-tune the tax risk assessment model according to the dataset, and obtain the fine-tuned tax risk assessment model.

[0060] In one embodiment, the LoRA supervised fine-tuning strategy is adopted to train and adjust a small part of the parameters of the tax risk assessment model (the weight matrix of the middle layer, the first low-rank matrix and the second low-rank matrix), so that the tax risk assessment model can understand the tax knowledge and the corporate tax situation, and construct a tax risk assessment model suitable for tax risk assessment.

[0061] In one embodiment, after the data set in the instruction-output format is input into the tax risk assessment model, the tax risk assessment model quickly carries out tax risk assessment. When assessing tax risks, the tax risk assessment model conducts in-depth analysis on the financial data, tax data, market data, and tax policy data of the instruction of the data set "instruction-output", including but not limited to analyzing whether the depreciation provision method of assets in the balance sheet data complies with tax regulations, analyzing whether the time of revenue recognition in the profit statement is accurate, carefully checking the accuracy and compliance of various tax calculations in the tax return records (for example, whether the input and output tax amounts of value-added tax match, and whether the conditions for enjoying tax incentives are met, etc.), judging whether the enterprise may adopt unreasonable tax measures due to competitive pressure through the trend of changes in the industry market share, examining whether there is suspicion of unreasonable pricing and profit transfer in the price fluctuations of products and services, and evaluating whether the tax policy data complies with the latest policies and regulations (for example, the impact of changes in industry regulatory policies on corporate taxation).

[0062] In one embodiment, the tax risk assessment model can output tax risk classification based on the data set, and the tax risk classification includes but is not limited to whether there is a risk of tax violation and / or the risk level. For example, a high risk level may mean serious declaration errors and / or potential tax evasion; a medium or low risk level may involve some detailed improper tax treatment.

[0063] In one embodiment, the tax risk analysis output by the tax risk assessment model may also include the size of the tax planning space and the relative level of the overall tax risk in the industry. Tax planning refers to a planning method that aims to obtain the tax benefits of "tax saving" as much as possible through the prior planning and arrangement of business, investment, financial management and other activities within the scope prescribed by the tax law. It has the characteristics of legality, planning, purpose, risk and professionalism.

[0064] In one embodiment, the tax risk assessment model can generate tax recommendations based on the output tax risk analysis.

[0065] For example, when the tax risk assessment model determines that the enterprise has a compliance risk in its tax affairs based on the output tax risk sharing, it generates tax suggestions for improving compliance management, such as strengthening the internal tax audit process and regularly training financial personnel. For tax planning adjustments, if the tax risk assessment model finds that the enterprise has not fully utilized the policy of additional deduction for R&D expenses based on the output tax risk sharing, it can generate tax suggestions to guide the enterprise to sort out R&D projects and standardize the accounting process to enjoy preferential treatment. In terms of financial decision optimization, if the tax risk assessment model finds that the enterprise has idle funds and a high tax burden based on the output tax risk sharing, it can analyze the impact of different investment projects on the tax burden and generate tax suggestions for rationally planning investments and selecting projects with tax incentives.

[0066] In one embodiment, the tax risk assessment model can provide specific implementation steps for each tax suggestion based on the output tax risk distribution and tax suggestions, estimate the expected effect of each tax suggestion on reducing the tax burden, and set tax risk warning indicators when the tax burden rate changes by more than a certain percentage.

[0067] In one embodiment, the elements of the first low-rank matrix A can be initialized with all zeros, and the elements of the second low-rank matrix B can be initialized with a Gaussian function; the data set is input into the tax risk assessment model after the elements of the first low-rank matrix A and the second low-rank matrix B are initialized, and the tax risk assessment model is fine-tuned according to the data set to obtain the fine-tuned tax risk assessment model. The elements of the first low-rank matrix A after being initialized with all zeros can be expressed as a o , the elements of the second low-rank matrix B initialized with the Gaussian function can be expressed as b q ,in, , a o represents the oth element of the first low-rank matrix A; b q represents the qth element of the second low-rank matrix B; Represents the standard deviation of the second low-rank matrix B after initialization.

[0068] In one embodiment, a cross entropy loss function L may be used to measure the predicted value of the tax risk and / or tax advice output by the tax risk assessment model. The difference between the actual label y and the actual label y, where the cross entropy loss function L is as follows: .

[0069] In one embodiment, the tax risk assessment model can output tax risks and / or tax suggestions based on an input data set; based on the input data set, the output tax risks and / or tax suggestions, and the cross-entropy loss function L, calculate the loss function value of the tax risks and / or tax suggestions output based on the data set.

[0070] In one embodiment, the tax risk assessment model can calculate the first gradient of the first low-rank matrix A according to the cross entropy loss function value, the updated weight matrix and the chain rule. , the second gradient of the second low-rank matrix B ;in, ; .

[0071] In one embodiment, the tax risk assessment model can use the Adam optimizer to update the elements of the first low-rank matrix A by setting the number of iterations, and to update the elements of the second low-rank matrix B by setting the number of iterations. The tax risk assessment model uses the Adam optimizer to obtain the first updated low-rank matrix A′ according to the first gradient and learning rate α of the first low-rank matrix A; obtain the second updated low-rank matrix B′ according to the gradient and learning rate α of the second low-rank matrix B; according to the first updated low-rank matrix A′, update the elements of the first low-rank matrix A by setting the number of iterations, and according to the second updated low-rank matrix B′, update the elements of the second low-rank matrix B by setting the number of iterations, update the first low-rank matrix A to the first updated low-rank matrix A′, and update the second low-rank matrix B to the second updated low-rank matrix B′; according to the first updated low-rank matrix A′ and the second updated low-rank matrix B′, update the weight matrix of the intermediate layer introduced into the first low-rank matrix A and the second low-rank matrix B, until the set number of iterations is reached, so that the tax risk assessment model is adapted to the tax risk assessment task, and a fine-tuned tax risk assessment model is obtained; wherein, ; .

[0072] In one embodiment, the tax risk assessment model can use the Adam optimizer to obtain a first updated low-rank matrix A′ according to the first gradient and learning rate α of the first low-rank matrix A; obtain a second updated low-rank matrix B′ according to the second gradient and learning rate α of the second low-rank matrix B; update the elements of the first low-rank matrix A according to the first updated low-rank matrix A′, and update the elements of the second low-rank matrix B according to the second updated low-rank matrix B′, update the first low-rank matrix A to the first updated low-rank matrix A′, and update the second low-rank matrix B to the second updated low-rank matrix B′, and update the weight matrix of the intermediate layer introduced into the first low-rank matrix A and the second low-rank matrix B according to the first updated low-rank matrix A′ and the second updated low-rank matrix B′, until the cross-entropy loss function value of the tax risk assessment model is less than or equal to the set loss function threshold, so that the tax risk assessment model is adapted to the tax risk assessment task, and a fine-tuned tax risk assessment model is obtained.

[0073] In one embodiment, the updated weight matrix W′ of the middle layer can be obtained according to the weight matrix W of the middle layer, the first updated low-rank matrix A′ and the second updated low-rank matrix B′, and the weight matrix of the middle layer is updated to the updated weight matrix; wherein the updated weight matrix W′ can be expressed as: W′=W+B′A′.

[0074] In one embodiment, during the fine-tuning process of the tax risk assessment model, the gradient of each parameter is continuously and dynamically adjusted through back propagation, so that the cross entropy loss function value reaches the local optimum or the global optimum. That is to say, each parameter and the gradient of each parameter are not fixed, but change dynamically.

[0075] In one embodiment, LoRA technology can be used to fine-tune the tax risk assessment model based on a data set in an instruction-output format to obtain a fine-tuned tax risk assessment model.

[0076] Taking a law firm (hereinafter referred to as a law firm) as an example, the balance sheet data of the financial data of the "instruction - output" instruction in the data set can reflect the asset size and structure of the law firm, such as the proportion of fixed assets, which involves tax treatment such as depreciation; the income statement data can reflect the source of income of the law firm (for example, case agency fees, consulting fees, etc.) and profitability, and help analyze the rationality of the tax burden of the law firm. The tax declaration record of tax data is the key to check whether there are any declaration errors or omissions; the tax incentive enjoyment record is related to whether the tax policy is fully utilized (for example, tax incentives for small and micro-profit enterprises, etc.).

[0077] The first low-rank matrix A and the second low-rank matrix B are introduced into the specific layer of the large language model (the middle layer related to feature extraction) to build a tax risk assessment model based on the large language model; the tax risk assessment model is fine-tuned according to the data set in the instruction-output format to obtain the fine-tuned tax risk assessment model. When dealing with complex business income recognition tax issues of law firms, according to the income recognition time points and tax treatment methods of different case types, the weight matrix W of the specific layer of the large language model that introduces the first low-rank matrix A and the second low-rank matrix B is introduced through learning and adjustment; wherein the new weight matrix W' = W + BA of the specific layer of the large language model that introduces the first low-rank matrix A and the second low-rank matrix B is introduced.

[0078] Before fine-tuning the tax risk assessment model, the elements of the first low-rank matrix A are initialized with all zeros, and the elements of the second low-rank matrix B are initialized with a Gaussian function. The cross-entropy loss function L is used to measure the difference between the prediction and the actual situation of the tax risk assessment model in the tax risk assessment task. If there is a deviation when evaluating the legality of a tax planning scheme of a law firm, the gradient of the first low-rank matrix A and the second low-rank matrix B is calculated according to the chain rule; the Adam optimizer is used to update the first low-rank matrix A and the second low-rank matrix B. After a set number of iterations (or the loss function value is less than or equal to the set loss function threshold), the tax risk assessment model can accurately understand the tax situation of the law firm, effectively evaluate issues such as tax risks in the partner allocation mechanism and tax planning in business development, and enhance the professionalism of the tax risk assessment model in tax risk assessment.

[0079] In one embodiment, before fine-tuning the tax risk assessment model, the elements of the first low-rank matrix A are initialized with all zeros, and the elements of the second low-rank matrix B are initialized with a Gaussian function. By initializing the elements of the first low-rank matrix A and the second low-rank matrix B to be randomly distributed near zero, it is possible to avoid the initial values ​​of the elements of the first low-rank matrix A and the second low-rank matrix B being too concentrated, which may cause the fine-tuning of the tax risk assessment model to fall into a local optimum. It also provides a diversified starting point for the fine-tuning of the tax risk assessment model, allowing the tax risk assessment model to explore a wider parameter space in the early stage of fine-tuning, which is helpful to improve the generalization ability and fine-tuning effect of the tax risk assessment model.

[0080] The tax risk assessment method of the embodiment of the present application introduces a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updates the first low-rank matrix and the second low-rank matrix according to the input data set, and updates the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix. The tax risk assessment model is fine-tuned by training and adjusting a small part of the parameters of the tax risk assessment model, which can reduce the difficulty of fine-tuning the tax risk assessment model. Compared with directly fine-tuning the parameter matrix of the entire tax risk assessment model, the use of the first low-rank matrix and the second low-rank matrix can significantly reduce the parameters that need to be trained and reduce storage and computing costs. It can achieve fine-tuning of the tax risk assessment model under limited computing resources and avoid overfitting of the tax risk assessment model.

[0081] Step 204: Perform tax risk assessment based on tax-related data using the fine-tuned tax risk assessment model.

[0082] In one embodiment, after obtaining the fine-tuned tax risk assessment model, the current tax-related data can be input into the fine-tuned tax risk assessment model; the fine-tuned tax risk assessment model performs tax risk assessment based on the input tax-related data and outputs tax risks and / or tax recommendations.

[0083] In one embodiment, the tax risk assessment model can output personalized tax advice that meets the specific needs and risk preferences of the enterprise based on the enterprise's tax-related data. The personalized tax advice can cover tax planning, compliance management, and financial decision optimization. Based on personalized tax advice, enterprises can reasonably plan tax arrangements, strengthen tax compliance management, optimize financial decisions, reduce tax costs, improve the overall operational efficiency of the enterprise, enhance market competitiveness, and provide strong support for the sustainable development of the enterprise.

[0084] Step 205: updating the knowledge of the fine-tuned tax risk assessment model.

[0085] In one embodiment, tax policy data may be collected and converted into structured updated knowledge; and the knowledge of the fine-tuned tax risk assessment model may be updated based on the fusion coefficient and the updated knowledge.

[0086] In one embodiment, tax policy data outside the enterprise can be collected in real time through web crawler technology to obtain tax policy data corresponding to the current market environment, industry supervision policies and tax policy regulations, and update the data set in the instruction-output format, and update the "instruction" of the "instruction-output" instruction of the data set; the updated "instruction-output" instructions in the data set are integrated into the fine-tuned tax risk assessment model in batches, and the knowledge of the fine-tuned tax risk assessment model is updated.

[0087] In one embodiment, tax policy data corresponding to current market conditions and tax policies can be obtained from relevant websites at a set frequency through a web crawler; the obtained tax policy data is structured and converted into a structured knowledge representation. j , obtain the current knowledge K of the updated fine-tuned tax risk assessment model old According to the updated knowledge K, the current knowledge K of the tax risk assessment model is calculated by weighted average. old After updating, the updated knowledge can be expressed as K new ;in, ; In the formula, β is the fusion coefficient, which determines the updated knowledge K and the current knowledge K oldThe weight of .

[0088] In one embodiment, the tax policy data obtained in real time by the web crawler can be used to achieve real-time acquisition of tax risk assessment model knowledge using web crawler technology. The web crawler is used to search various tax-related information sources on the Internet according to preset rules and algorithms, and to capture the latest tax law and regulations, official policy interpretation documents, analysis reports of industry experts, and the latest industry trends and other tax policy data, and convert these tax policy data into structured updated knowledge; according to the fusion coefficient and updated knowledge, the knowledge of the tax risk assessment model is updated. By acquiring external tax policy data in real time, timely integrating the external tax policy data into the tax risk assessment model, and constantly updating the knowledge of the tax risk assessment model, it can ensure that the tax risk assessment model's understanding of tax policies and industry environment is always kept up to date to cope with the ever-changing tax risk assessment needs.

[0089] In one embodiment, external knowledge is acquired and the tax risk assessment model is updated in real time through a web crawler. The tax risk assessment model always keeps pace with the latest tax laws and regulations, policy interpretations, and industry trends, and can timely conduct tax risk assessments based on the latest external knowledge, and output tax risks and / or tax recommendations that are more accurate, comprehensive, real-time, and more personalized. This can ensure that when faced with policy adjustments or market changes, companies can adjust their business strategies in a timely manner, avoid tax risks caused by policy lags, and ensure that corporate operations always comply with regulatory requirements and adapt to market changes.

[0090] Step 206: Update the model parameters of the fine-tuned tax risk assessment model.

[0091] In one embodiment, a reinforcement learning environment of a fine-tuned tax risk assessment model may be defined. Tax-related data (financial data, tax data, market data) may be defined as various states s in a state space S of the reinforcement learning environment, tax risks and / or tax recommendations corresponding to the tax-related data may be defined as actions a in an action space A of the reinforcement learning environment, and the policy network of the fine-tuned tax risk assessment model may be defined as: Indicates in status Take action , θ represents the model parameters of the fine-tuned tax risk assessment model.

[0092] In one embodiment, a reward function of the fine-tuned tax risk assessment model may be defined according to a reinforcement learning environment; the reward function of the fine-tuned tax risk assessment model may be used to evaluate the accuracy, timeliness and economic benefit impact of the tax risks and / or tax recommendations output by the fine-tuned tax risk assessment model; the reward function is: .

[0093] Where R(s, a, s′) represents the reward for transferring to state s′ after taking action a in state s; R accuracy (s, a, s′) represents the accuracy of the tax risk and / or tax advice output by the tax risk assessment model; R timeliness (s, a, s′) represents the timeliness of the tax risk assessment model assessment; R economic (s, a, s′) represents the impact of tax risks and / or tax recommendations output by the tax risk assessment model on economic benefits; w1, w2, and w3 are weights, representing the importance of accuracy, timeliness, and impact on economic benefits, respectively, w1+w2+w3=1.

[0094] In one embodiment, the accuracy R of the tax risk and / or tax advice output by the tax risk assessment model can be calculated based on the difference between the tax risk and / or tax advice (predicted value) output by the tax risk assessment model and the actual tax risk and / or tax advice. accuracy (s, a, s′).

[0095] For example, the real tax risk of an enterprise is the risk of not declaring a certain tax on time, but the tax risk assessment model does not output this risk during the assessment. accuracy (s, a, s′) = 1-output tax risk number / actual tax risk number. Since one tax risk is missing, the ratio of the output tax risk number to the actual tax risk number is less than 1, R accuracy (s, a, s′) is a value less than 1, which reflects that the tax risk assessment model has a low assessment accuracy and gives the tax risk assessment model a lower reward.

[0096] In one embodiment, the timeliness R of the tax risk assessment model evaluation can be calculated based on the time delay of the tax risk assessment model evaluation. timeliness (s, a, s′).

[0097] For example, it can be stipulated that when a company faces a major tax risk, the tax risk assessment model must complete the assessment and issue an early warning within 24 hours. If the tax risk assessment model completes the assessment within 12 hours after the tax risk occurs, then R timeliness (s, a, s′) = (24-12) / 24. The shorter the evaluation time delay, the higher the R timeliness The closer (s, a, s′) is to 1, the higher the reward given to the tax risk assessment model, which encourages the tax risk assessment model to perform tax risk assessment faster.

[0098] In one embodiment, the impact of the tax risk and / or tax suggestion output by the tax risk assessment model on the economic benefit R can be calculated based on the changes in economic indicators caused by the tax risk and / or tax suggestion output by the tax risk assessment model. economic (s, a, s′).

[0099] For example, if an enterprise’s net profit increases by 20% based on the tax risks and / or tax recommendations output by the tax risk assessment model, R economic The value of (s, a, s′) may be 0.2, reflecting that tax risks and / or tax advice have a positive impact on the economic benefits of the enterprise, and the tax risk assessment model is rewarded accordingly.

[0100] In one embodiment, an objective function for optimizing the model parameters of the fine-tuned tax risk assessment model may be defined according to a reinforcement learning environment; wherein the objective function is as follows:

[0101] In the formula, E represents mathematical expectation; For the old strategy network; for new strategic networks; is the estimated advantage function; is the action value function; V(s) is the state value function; To trim parameters, it can prevent the policy network from being too large.

[0102] In one embodiment, the clipping parameter may be adjusted based on experience, and the value range of the clipping parameter may be 0.1-0.3.

[0103] In one embodiment, the objective function can be used to calculate the gradient of the updated model parameters ; According to the gradient , update the model parameters θ. Update the gradient through the reward function back propagation , thereby updating the value of the model parameter θ and finally updating the objective function J(θ).

[0104] In one embodiment, a PPO (Proximal Policy Optimization) algorithm can be used to adopt an optimizer according to the reinforcement learning environment, reward function, and objective function, and to update the gradient through the back propagation of the reward function. , thereby updating the value of the model parameter θ, and finally updating the objective function J(θ) to achieve the update of the model parameters of the fine-tuned tax risk assessment model. The updated model parameters of the fine-tuned tax risk assessment model can be θ′; .

[0105] In one embodiment, the tax risk assessment model can construct tax risk assessment (output tax risk and / or tax advice) as a reinforcement learning task, with the accuracy, timeliness and economic benefit impact of tax risk assessment as the reward function elements, and use historical data and simulation scenarios (reinforcement learning environment) to optimize the model parameters of the tax risk assessment model through the PPO algorithm. The tax risk assessment model tries multiple strategies and parameters based on enterprise data and learned knowledge, and automatically selects the optimal assessment strategy and parameters based on reward feedback optimization to improve the accuracy, comprehensiveness, real-timeness and personalization of the assessment.

[0106] In one embodiment, the tax risk assessment model constructs tax risk assessment as a reinforcement learning task. In the tax risk assessment process, the tax risk assessment model explores different assessment strategies and parameter combinations based on the input tax-related data and the learned knowledge. Each assessment attempt of the tax risk assessment model will produce a result, which will be evaluated according to a pre-set reward function. The reward function comprehensively considers factors such as the accuracy and timeliness of the assessment and the impact on the economic benefits of the enterprise. Through the PPO algorithm, the tax risk assessment model continuously adjusts its own strategies and parameters according to the reward feedback, and gradually tends to select the assessment strategy and parameter combination that can bring higher rewards (i.e., more accurate, more timely and more beneficial to the economic benefits of the enterprise). After iterative training with a set number of iterations, the tax risk assessment model can automatically optimize to the optimal assessment strategy and parameter state, thereby significantly improving the accuracy and efficiency of tax risk assessment, achieving accurate, comprehensive, real-time and personalized assessment of tax risks, and providing enterprises with more valuable decision support.

[0107] For example, the business of a law firm involves agency and consulting services for various legal cases. In the process of reinforcement learning, the state space S of the tax risk assessment model includes the internal financial data, tax data, market data and external tax policy data of the law firm. The action space A covers aspects such as adjusting tax planning strategies, improving compliance management, and optimizing financial decisions. In reinforcement learning, historical data is used to build simulation scenarios, and data combinations from different time periods in the past three years are selected as the initial state s0. Action a0 is set based on the actual actions taken at that time, and the subsequent state s1 and the corresponding reward r0 after the action is executed are determined. For the reward function R (s, a, s′), if the tax risk assessment model accurately identifies that the law firm has tax risks in the risk agency income recognition link and gives a warning in time, and the tax suggestions put forward are implemented to avoid potential tax losses of x million yuan for the firm, and at the same time, have no negative impact on normal business development, then the reward can be calculated according to the set weights (w1, w2, w3).

[0108] In the PPO algorithm, the policy network The tax risk assessment model is parameterized by a fine-tuned tax risk assessment model. The tax risk assessment model generates a probability distribution of action choices under different states based on its understanding of tax knowledge and law firm business. Through continuous iteration, the tax risk assessment model parameters are adjusted according to the reward function and objective function feedback. , so that the tax risk assessment model can better assess tax risks and select the optimal strategy, better output tax risks and / or tax recommendations based on tax-related data, improve the efficiency of risk assessment, and conduct accurate, comprehensive, real-time and personalized assessment of tax risks, thereby improving the accuracy, comprehensiveness, real-time and personalization of tax risk assessment.

[0109] In one embodiment, tax-related data can be input into a fine-tuned tax risk assessment model with updated knowledge and updated model parameters, and the tax risk assessment model outputs tax risks and / or tax suggestions based on the tax-related data. Tax-related data is input into a fine-tuned tax risk assessment model with updated knowledge and updated model parameters; the tax risk assessment model starts the assessment of tax risks and outputs tax risks and / or tax suggestions. During the risk assessment process, the tax risk assessment model will comprehensively consider various data of the input tax-related data, such as the enterprise's tax declaration records, tax preferential enjoyment records, tax-related data in financial data, etc.; through the built-in advanced algorithms and risk assessment mechanisms, it accurately analyzes the tax risks that the enterprise may currently face, analyzes whether it has the risk of underreporting or misreporting taxes, or potential tax compliance issues, etc. Based on the tax risks, as well as the enterprise's own specific needs and tax risk preferences, the tax risk assessment model generates tax suggestions in a targeted manner. If the enterprise prefers to reduce its tax burden, the tax risk assessment model will deeply analyze the enterprise's business structure in terms of tax planning adjustments, find out suitable tax preferential policies, and recommend reasonable adjustments to the business structure to reduce tax costs. For compliance management improvement, the tax risk assessment model can point out in detail the compliance loopholes in the tax declaration and payment procedures of enterprises based on tax risks, and give specific improvement measures such as strengthening internal control and improving tax operation processes. In terms of financial decision optimization, the tax risk assessment model can consider the impact of tax risks on financial decisions. For example, when making investment decisions, it can assess the tax risks of different investment projects and provide enterprises with better investment plans. At the same time, the tax risk assessment model can also attach detailed implementation steps to each tax suggestion, conduct quantitative evaluation of the expected effect of the implementation of each tax suggestion, and set tax risk warning indicators so that enterprises can respond to potential tax risk changes in a timely manner.

[0110] The tax risk assessment method of the embodiment of the present application constructs a tax risk assessment model based on a large language model; fine-tunes the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; performing tax risk assessment through the fine-tuned tax risk assessment model according to tax-related data, and outputting tax risks and / or tax recommendations; by constructing a new tax risk assessment model based on a large language model, it is possible to fully utilize the advantages of the large language model, based on the powerful understanding ability of the large language model, Based on the input real-time corporate tax-related data, tax risks and / or tax recommendations are output. Combined with the individual characteristics of the enterprise, personalized tax recommendations that meet the actual needs of the enterprise can be generated, covering tax planning, compliance management, financial decision-making and other aspects, helping enterprises to control tax risks in a targeted manner, improve the overall tax management level and competitiveness of the enterprise, overcome the limitations of tax risk assessment of related technologies, and conduct accurate, comprehensive, real-time and personalized assessment of tax risks, improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment, and provide enterprises with more efficient and reliable tax risk management solutions to cope with the increasingly complex business environment and tax challenges, and ensure that enterprises achieve sustainable development under the premise of legality and compliance.

[0111] Furthermore, the tax risk assessment method of the embodiment of the present application collects tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data; converts the tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data into a data set in an instruction-following format; fine-tunes the tax risk assessment model based on the data set; the tax risk assessment model based on the large language model can deeply integrate multi-source data, and integrate the multi-source data into the tax risk assessment model based on the large language model. The tax risk assessment model can integrate business operations (financial data, tax data, market data) and external tax policy data (industry regulatory policy data, tax policy and regulations data) and other data, comprehensively and deeply analyze the tax situation of the enterprise, and accurately identify potential tax risk points in various complex business scenarios. Whether it is an emerging business model or a tax difference problem caused by cross-regional operations, it can be accurately assessed, overcoming the defects of insufficient integration of tax risk assessment data in related technologies, and further improving the accuracy and comprehensiveness of tax risk assessment.

[0112] Furthermore, the tax risk assessment method of the embodiment of the present application collects tax policy data and converts the tax policy data into structured updated knowledge; updates the knowledge of the fine-tuned tax risk assessment model based on the fusion coefficient and updated knowledge; is able to capture external information such as tax laws and regulations, policy interpretations, etc. in real time, dynamically update the knowledge of the tax risk assessment model, obtain the company's tax-related data in real time for dynamic assessment, and through real-time data processing capabilities, promptly discover changing trends in tax risks, further improve the accuracy and real-time nature of tax risk assessment, ensure that the tax risks and / or tax recommendations output by the tax risk assessment model always reflect the latest situation, provide companies with accurate, timely and effective risk warnings and response bases, and effectively prevent companies from getting into trouble due to tax risks.

[0113] Furthermore, the tax risk assessment method of the embodiment of the present application defines a reinforcement learning environment for the fine-tuned tax risk assessment model; based on the reinforcement learning environment, defines a reward function for the fine-tuned tax risk assessment model; based on the reinforcement learning environment, defines an objective function for optimizing the model parameters of the fine-tuned tax risk assessment model; based on the objective function, calculates the gradient for updating the model parameters; based on the gradient, updates the model parameters; can combine the large language model with the reinforcement learning mechanism, try a variety of strategy networks and model parameters based on the company's tax-related data and the learned knowledge, optimize the model parameters based on the reward function and the objective function feedback, automatically select the optimal strategy network and model parameters, and further improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment.

[0114] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a tax risk assessment device, a tax risk assessment model and corresponding embodiments.

[0115] Figure 4 It is a structural schematic diagram of a tax risk assessment device shown in an embodiment of the present application.

[0116] See also Figure 4 A tax risk assessment device includes a model building module 401, a model fine-tuning module 402, and a model output module 403.

[0117] The model building module 401 is used to build a tax risk assessment model based on a large language model.

[0118] In one embodiment, the model building module 401 may build a tax risk assessment model based on a large language model according to the architecture of the large language model.

[0119] The model fine-tuning module 402 is used to fine-tune the tax risk assessment model constructed by the model construction module 401, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix.

[0120] In one embodiment, the model fine-tuning module 402 can collect tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data of the enterprise's historical tax risk assessment; pre-process the tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data to obtain a data set for fine-tuning the tax risk assessment model; introduce a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model; input the data set into the tax risk assessment model that introduces the first low-rank matrix and the second low-rank matrix into the middle layer, and update the first low-rank matrix and the second low-rank matrix according to the input data set and the output tax risks and / or tax suggestions, and update the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix to achieve fine-tuning of the tax risk assessment model.

[0121] The model output module 403 is used to perform tax risk assessment based on tax-related data using the tax risk assessment model fine-tuned by the model fine-tuning module 402, and output tax risks and / or tax recommendations.

[0122] In one embodiment, the current tax-related data may be input into a fine-tuned tax risk assessment model; the model output module 403 performs tax risk assessment based on the current tax-related data through the fine-tuned tax risk assessment model, and outputs tax risks and / or tax recommendations corresponding to the current tax-related data.

[0123] The technical solution of the embodiment of the present application constructs a tax risk assessment model based on a large language model; fine-tunes the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; based on tax-related data, tax risk assessment is performed through the fine-tuned tax risk assessment model, and tax risks and / or tax recommendations are output; by constructing a new tax risk assessment model based on a large language model, the advantages of the large language model can be fully utilized, based on the powerful understanding ability of the large language model, according to It inputs real-time corporate tax-related data and outputs tax risks and / or tax advice. It can combine the individual characteristics of the enterprise to generate personalized tax advice that meets the actual needs of the enterprise, covering tax planning, compliance management, financial decision-making and other aspects, helping enterprises to control tax risks in a targeted manner, improve the overall tax management level and competitiveness of the enterprise, overcome the limitations of tax risk assessment of related technologies, and can conduct accurate, comprehensive, real-time and personalized assessment of tax risks, improve the accuracy, comprehensiveness, real-time and personalization of tax risk assessment, and provide enterprises with more efficient and reliable tax risk management solutions to cope with the increasingly complex business environment and tax challenges, and ensure that enterprises achieve sustainable development under the premise of legality and compliance.

[0124] Figure 5 It is another structural schematic diagram of the tax risk assessment device shown in the embodiment of the present application.

[0125] See also Figure 5 A tax risk assessment device includes a model building module 401, a model fine-tuning module 402, a model output module 403, a knowledge updating module 501, and a parameter updating module 502.

[0126] The model building module 401 is used to build a tax risk assessment model based on a large language model.

[0127] The model fine-tuning module 402 is used to collect tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data; convert the tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data into a data set in an instruction-following format; introduce a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model; input the data set into the tax risk assessment model, and calculate the loss function value of the tax risk assessment model outputting the tax risks and / or tax suggestions according to the data set based on the input data set; calculate the first gradient of the first low-rank matrix based on the loss function value and the weight matrix of the middle layer; calculate the second gradient of the second low-rank matrix based on the loss function value and the weight matrix of the middle layer; and calculate the learning rate of the tax risk assessment model based on the first gradient. Obtain a first updated low-rank matrix of the first low-rank matrix; obtain a second updated low-rank matrix of the second low-rank matrix according to the second gradient and the learning rate of the tax risk assessment model; update the first low-rank matrix to the first updated low-rank matrix, update the second low-rank matrix to the second updated low-rank matrix, and update the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix, until the set number of iterations is reached, and the fine-tuned tax risk assessment model is obtained; or, update the first low-rank matrix to the first updated low-rank matrix, update the second low-rank matrix to the second updated low-rank matrix, and update the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix, until the tax risk assessment model outputs a loss function value of tax risk and / or tax advice according to the data set that is less than or equal to the set loss function threshold, and the fine-tuned tax risk assessment model is obtained.

[0128] The model output module 403 is used to perform tax risk assessment based on tax-related data through a fine-tuned tax risk assessment model, and output tax risks and / or tax recommendations.

[0129] The knowledge updating module 501 is used to collect tax policy data and convert the tax policy data into structured updated knowledge; based on the fusion coefficient and updated knowledge, the knowledge of the fine-tuned tax risk assessment model is updated.

[0130] The parameter updating module 502 is used to define a reinforcement learning environment for the fine-tuned tax risk assessment model; define a reward function for the fine-tuned tax risk assessment model based on the reinforcement learning environment; define an objective function for optimizing the model parameters of the fine-tuned tax risk assessment model based on the reinforcement learning environment; calculate the gradient of the updated model parameters based on the objective function; and update the model parameters based on the gradient of the updated model parameters.

[0131] In one embodiment, the model output module 403 is further used to perform tax risk assessment based on tax-related data through a fine-tuned tax risk assessment model with updated knowledge and model parameters, and output tax risks and / or tax recommendations.

[0132] Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment of the method, and will not be elaborated again here.

[0133] Figure 6 It is a structural diagram of the tax risk assessment model shown in the embodiment of the present application.

[0134] See also Figure 6 The tax risk assessment model 1000 includes a memory 1010 and a processor 1020 .

[0135] The processor 1020 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0136] The memory 1010 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 1020 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 1010 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 1010 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.

[0137] The memory 1010 stores executable codes, and when the executable codes are processed by the processor 1020 , the processor 1020 can execute part or all of the methods described above.

[0138] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.

[0139] Alternatively, the present application can also be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) on which an executable code (or a computer program or a computer instruction code) is stored. When the executable code (or a computer program or a computer instruction code) is executed by a processor of a tax risk assessment model (or an electronic device, or a server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.

[0140] The embodiments of the present application have been described above. In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. It can be understood that the steps in the method of the embodiment of the present application can be adjusted in order, merged and deleted according to actual needs, and the modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0141] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A tax risk assessment method, characterized in that: include: Construct a tax risk assessment model based on a large language model; Fine-tuning the tax risk assessment model, including: introducing a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; Based on tax-related data, tax risk assessment is conducted through a fine-tuned tax risk assessment model to output tax risks and / or tax recommendations.

2. The method according to claim 1, characterized in that The method further comprises: Collecting tax policy data and converting the tax policy data into structured updated knowledge; The knowledge of the fine-tuned tax risk assessment model is updated according to the fusion coefficient and the updated knowledge.

3. The method according to claim 1 or 2, characterized in that: The method further comprises: defining a reinforcement learning environment for the fine-tuned tax risk assessment model; Defining a reward function of the fine-tuned tax risk assessment model according to the reinforcement learning environment; According to the reinforcement learning environment, defining an objective function for optimizing model parameters of the fine-tuned tax risk assessment model; According to the objective function, calculating and updating the gradient of the model parameters; The model parameters are updated according to the gradient.

4. The method according to claim 1, characterized in that The step of introducing a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to the input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix, comprises: Introducing a first low-rank matrix and a second low-rank matrix into the middle layer of the tax risk assessment model; Calculating, based on the input data set, a loss function value of the tax risk and / or tax advice output by the tax risk assessment model based on the data set; Calculate a first gradient of the first low-rank matrix according to the loss function value and the weight matrix of the intermediate layer; Calculate a second gradient of the second low-rank matrix according to the loss function value and the weight matrix of the intermediate layer; Obtaining a first updated low-rank matrix of the first low-rank matrix according to the first gradient and the learning rate of the tax risk assessment model; Obtaining a second updated low-rank matrix of the second low-rank matrix according to the second gradient and a learning rate of the tax risk assessment model; Updating the first low-rank matrix to the first updated low-rank matrix, updating the second low-rank matrix to the second updated low-rank matrix, and updating the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix until the set number of iterations is reached to obtain a fine-tuned tax risk assessment model; or, The first low-rank matrix is ​​updated to the first updated low-rank matrix, the second low-rank matrix is ​​updated to the second updated low-rank matrix, and the weight matrix of the intermediate layer is updated according to the first updated low-rank matrix and the second updated low-rank matrix, until the loss function value of the tax risk and / or tax advice output by the tax risk assessment model according to the data set is less than or equal to the set loss function threshold, so as to obtain a fine-tuned tax risk assessment model.

5. The method according to claim 1 or 4, characterized in that: According to the initial weight matrix of the intermediate layer, setting the first low-rank matrix; The second low-rank matrix is ​​set according to the initial weight matrix of the intermediate layer.

6. The method according to claim 4, characterized in that The updating of the weight matrix of the intermediate layer according to the first updated low-rank matrix and the second updated low-rank matrix comprises: According to the weight matrix of the intermediate layer, the first updated low-rank matrix and the second updated low-rank matrix, an updated weight matrix of the intermediate layer is obtained, and the weight matrix of the intermediate layer is updated to the updated weight matrix.

7. The method according to claim 1, characterized in that The step of obtaining the data set includes: Collect tax-related data, tax policy data, tax risks and / or tax advice corresponding to the tax-related data and tax policy data; The tax-related data, tax policy data, tax risks and / or tax suggestions corresponding to the tax-related data and tax policy data are converted into a data set in an instruction-following format.

8. A tax risk assessment device, characterized in that: include: Model building module, used to build a tax risk assessment model based on a large language model; A model fine-tuning module, used for fine-tuning the tax risk assessment model constructed by the model construction module, including: introducing a first low-rank matrix and a second low-rank matrix in the middle layer of the tax risk assessment model, updating the first low-rank matrix and the second low-rank matrix according to an input data set, and updating the weight matrix of the middle layer according to the updated first low-rank matrix and the second low-rank matrix; The model output module is used to perform tax risk assessment based on tax-related data using the tax risk assessment model fine-tuned by the model fine-tuning module, and output tax risks and / or tax recommendations.

9. A tax risk assessment model, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: An executable code is stored thereon, and when the executable code is executed by a processor, the processor is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Speech recognition fine tuning task acceleration method based on low-rank matrix approximation

    CN117059103A

  • Low-rank adaptation quantization fine tuning method and device for large language model

    CN118035624A

  • Training and using method of financial service large model based on risk assessment result

    CN118313932A

  • Financial analysis report generation method and system

    CN118761401A

  • Automobile financial post-loan risk identification method based on multi-modal large model

    CN118917936A

Cited By

  • Industrial chain data label configuration management method based on large language model and related equipment

    CN121233848A