A method for automatically generating administrative penalty documents based on a large language model

By building a hierarchical legal and regulatory database of enterprise operations and using a large language model, the problem of automatic generation of administrative penalty documents in enterprise operations is solved, and efficient, accurate and logically consistent generation of penalty documents is achieved.

CN119129541BActive Publication Date: 2025-03-11SHANGHAI JIAOTONG UNIV +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411605709.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-11
Estimated Expiration
2044-11-12

AI Technical Summary

Technical Problem

The existing technology has failed to effectively solve the problem of automatic generation of administrative penalty documents for infringement and illegal and irregular behaviors in enterprise operations, resulting in inefficient law enforcement and inconsistent punishment logic.

Method used

By building a hierarchical legal and regulatory database of enterprise business supervision, a large language model is used to generate administrative penalty documents. Specific steps include: law analysis, Chinese embedding model, analysis of illegal facts, identification of illegal types, search for punishment basis and document generation.

Benefits of technology

It has realized the intelligent generation of administrative penalty documents for enterprise business supervision, and improved the law enforcement efficiency and legal applicability and logical consistency of punishment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119129541B_ABST
    Figure CN119129541B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically generating administrative penalty documents based on a large language model. The present invention first constructs a tree-indexed database of laws and regulations for enterprise management supervision; obtains the text of illegal facts recorded by law enforcement personnel, and queries the corresponding illegal types in the database of laws and regulations for enterprise management supervision; constructs corresponding penalty basis retrieval query questions according to the illegal types, and queries the penalty basis in the database of laws and regulations for enterprise management supervision; generates corresponding administrative penalties based on the legal applicability and illegal facts of the retrieved penalty basis; if the penalty type involves fines or confiscation of illegal gains, the amount of fines and the amount of illegal gains to be confiscated are generated based on the legal applicability; the type of violation and its legal applicability, the legal applicability of the penalty basis, the penalty category, and the amount of fines and the amount of illegal gains to be confiscated are integrated, and input into the large language model to generate administrative penalty documents for enterprise management supervision. The present invention improves the level of intelligence in the enforcement of enterprise management supervision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing, and in particular to a method for automatically generating administrative penalty documents for business operation supervision based on a large language model. Background Art

[0002] With the development of artificial intelligence technology, in order to improve work efficiency, methods for automatic document generation have been developed. For example, the patent document with publication number CN113343661A and name "A method and device for automatic generation of commutation and parole documents" discloses that by analyzing the content structure of the "Recommendation for Commutation of Sentence (Parole)", the text content extraction strategy is determined according to paragraph and keyword features; the style of the commutation and parole document is analyzed and the document template is set; the content of the "Recommendation for Commutation of Sentence (Parole)" is obtained; the content of the "Recommendation for Commutation of Sentence (Parole)" is segmented; information units are extracted from each paragraph; and the extracted information units are stored in the database for standby. Read the information from the database and generate a series of commutation and parole documents using the prepared document template. This technology improves the efficiency of processing commutation and parole documents and reduces the workload of the police officers handling them.

[0003] The method disclosed in the patent document with publication number CN115936932A and name “Method, device, electronic device and storage medium for processing judicial documents” is: annotate each paragraph of the judicial document to obtain the first content theme and the second content theme; regularize the regular paragraph represented by the first content theme to obtain the first entity information corresponding to the first content theme; input the irregular paragraph represented by the second content theme into the text classification model of the classification system corresponding to the second content theme to obtain the second entity information corresponding to the second content theme; associate the first content theme with the first entity information corresponding to the first content theme, and associate the classification system with the second entity information corresponding to the classification system to obtain the structured representation result of the judicial document. This technical solution can improve the efficiency of the structured representation of judicial documents to a certain extent.

[0004] The method disclosed in the patent document with publication number CN117725903A and title “Method, device, system and storage medium for generating judgment documents” is as follows: obtaining the case file materials of the case to be tried; obtaining the element table corresponding to the case type of the case to be tried, wherein the element table includes multiple element fields; based on the multiple element fields, determining the element information corresponding to each of at least one target element field in the case file materials; performing semantic understanding on each of the element information to obtain each first semantic understanding result; based on each of the first semantic understanding results, generating the judgment document of the case to be tried. This solution improves the efficiency of generating judgment documents, thereby improving the trial efficiency of the entire case.

[0005] In the medical field, the method disclosed in the patent document with publication number CN117393099A and name “Medical document generation method, device, electronic device and storage medium” is: generating a task description according to patient medical data and medical document generation requirements; the task description includes description information of the medical document generation task, and the medical document generation task is used to generate a medical document corresponding to the patient medical data and meeting the medical document generation requirements; generating a task instruction including at least the patient medical data and the task description; inputting the task instruction into a pre-trained document generation model to obtain a medical document; wherein the document generation model is obtained by at least training a pre-trained generative language model for medical document generation based on the task instruction.

[0006] With the vigorous development of social economy and business operations, more diverse illegal behaviors have put forward higher requirements for law enforcement personnel. At present, there is no method for automatically generating administrative penalty documents for infringement and illegal and irregular behaviors in business operations; in order to improve the efficiency of law enforcement personnel and realize the legal and logical consistency of administrative penalties for the above behaviors, it is necessary to build an intelligent method and device for automatically generating administrative penalty documents. Summary of the invention

[0007] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method for automatically generating administrative penalty documents for business operations of enterprises based on a large language model.

[0008] The present invention first obtains a tree-like indexed enterprise operation supervision law and regulation database through a hierarchical construction method based on the full text of laws and regulations; obtains the text of illegal facts recorded by law enforcement personnel, and searches the corresponding illegal types in the enterprise operation supervision law and regulation database; constructs corresponding penalty basis retrieval query questions according to the violation types, and searches the penalty basis in the enterprise operation supervision law and regulation database; generates corresponding administrative penalties with the legal application of the retrieved penalty basis as the major premise condition and the illegal facts as the minor premise condition; if the penalty type involves fines or confiscation of illegal gains, the calculation process and final results of the corresponding amounts are generated through a large language model, and then the fine amount and the confiscation of illegal gains amount are generated based on the legal application; the key information such as the violation type and its corresponding legal application, the legal application of the penalty basis, the penalty category, and the fine amount, the confiscation of illegal gains amount, etc. are integrated and input into the large language model to generate an enterprise operation supervision administrative penalty document with coherent sentences, accurate penalties, legal basis, and consistent logic.

[0009] The technical solution of the present invention is:

[0010] A method for automatically generating administrative penalty documents based on a large language model, the steps of which include:

[0011] 1) The full text of laws and regulations is disassembled through the legal article parsing algorithm to obtain a hierarchical structure from coarse to fine; then a tree-like indexed enterprise management supervision legal and regulatory database is constructed using a hierarchical construction method based on the hierarchical structure;

[0012] 2) Mapping each node in the tree index of the enterprise operation supervision laws and regulations database into an embedding vector through the Chinese embedding model; then adopting a bottom-up approach to provide summary information for each node through a large language model, and extracting other legal provisions cited across codes and chapters for each leaf node; summarizing the summaries of the child nodes contained in each non-leaf node as the high-level information of the corresponding non-leaf node, and using it for hierarchical retrieval of the legal provisions of the leaf node;

[0013] 3) Obtain the text of the illegal facts recorded by the law enforcement personnel, construct the illegal type recognition problem based on the first prompt template and input it into the large language model to obtain a set of candidate illegal types;

[0014] 4) For each violation type in the candidate violation type set, an embedding model is used to generate a query embedding vector; based on the query embedding vector, applicable laws for the violation type are retrieved in the enterprise operation supervision laws and regulations database based on the embedding vector similarity, to obtain a set of candidate violation type applicable laws corresponding to the candidate violation type set;

[0015] 5) Merge the illegal facts recorded in step 3) and the set of applicable laws of the candidate illegal types obtained in step 4), and construct a correlation judgment problem between the illegal facts and the applicable laws of the illegal types based on the second prompt template and input it into the large language model to obtain the logical relationship judgment of each applicable law, and obtain the set of applicable laws of the illegal types according to the logical relationship judgment of each applicable law;

[0016] 6) Based on the applicable laws for the violation type in the set of applicable laws for the violation type, construct a query for applicable laws for punishment basis to search in the database of laws and regulations for business supervision of enterprises to obtain a set of candidate applicable laws for punishment basis;

[0017] 7) Merge the illegal facts recorded in step 3), the candidate illegal type applicable law set obtained in step 4), and the candidate penalty basis applicable law set obtained in step 6), and construct the illegal facts and applicable law relevance judgment problem based on the third prompt template and input it into the large language model to obtain the logical relationship judgment of each applicable law, and obtain the final penalty basis applicable law set according to the logical relationship judgment of each applicable law;

[0018] 8) Integrate the set of applicable laws for the violation type obtained in step 5) and the set of applicable laws for the basis for punishment obtained in step 7), and generate an administrative penalty document for business supervision based on the fourth prompt template input into the large language model, which includes the violation type, the set of applicable laws for the violation type, the set of applicable laws for the basis for punishment, analysis of the facts of the violation and the result of the punishment.

[0019] Furthermore, in step 7), if the penalty type involves a fine or confiscation of illegal gains, the calculation process and final result of the corresponding amount are generated through a large language model, and then the fine amount and the confiscation of illegal gains amount are generated based on the applicable law; in step 8), the applicable legal provisions set of the illegal type obtained in step 5), the applicable legal provisions set of the penalty obtained in step 7), the fine amount and the confiscation of illegal gains are integrated.

[0020] Furthermore, the fourth prompt template in step 8) is "Please generate a penalty document with coherent sentences, accurate penalties, legal basis, and consistent logic based on the illegal facts and the set of legal provisions {x}, which is required to include..."

[0021] Furthermore, the first prompt template in step 3) is "Please generate the involved violation type {y} based on the violation fact {x}, for example..."; the second prompt template in step 4) is "Please analyze whether the applicable law for each violation type is relevant to the violation fact, the options include {relevant, irrelevant, uncertain}"; the third prompt template in step 7) is "Please analyze whether the applicable law for each penalty basis is a relevant penalty for the violation fact and the corresponding violation type applicable law, the options include {relevant, irrelevant, uncertain}".

[0022] Furthermore, the query of the applicable laws and regulations for the punishment basis constructed in step 6) is "the punishment basis includes warning, fine, confiscation of illegal gains, and revocation of business license, and the applicable laws and regulations for the types of violations involved are: {Type of violation law 1}, {Type of violation law 2}...".

[0023] Furthermore, the hierarchical structure is, from coarse to fine, law, chapter, section, article, clause, and item; among them, the nodes corresponding to the article, clause, and item in the tree index of the enterprise operation supervision laws and regulations library are leaf nodes, and the nodes corresponding to the law, chapter, and section are non-leaf nodes.

[0024] Furthermore, the Chinese embedding model is a BGE series model.

[0025] A server, characterized in that it comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the above method.

[0026] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the above method when executed by a processor.

[0027] The first aspect of the present invention constructs a hierarchical legal and regulatory database for business operations, the method comprising the steps of:

[0028] Through legal article parsing algorithms, such as regular expression technology, the full text of laws and regulations is refined and disassembled, and organized according to the coarse-to-fine hierarchical structure of laws, chapters, sections, articles, clauses, and items;

[0029] Build a tree-indexed database of laws and regulations for business supervision, and map each node to an embedded vector for storage through a Chinese embedding model (such as the general vector model BGE open sourced by Zhiyuan Research Institute). Articles, clauses, and items are stored as leaf nodes and returned as applicable laws during the search process; laws, chapters, and sections are stored as non-leaf nodes to improve the speed and accuracy of retrieval;

[0030] A bottom-up approach is adopted to provide summary information for each node through a large language model. In addition to considering the content of the current law, leaf nodes also need to extract other laws that are cited across codes (such as the supplementary explanation of the superior law by the lower-level law) and across chapters (such as the punishment measures for the aforementioned laws). Non-leaf nodes summarize the summaries of their child nodes and extract high-level information for hierarchical retrieval of the law content of the leaf nodes.

[0031] The second aspect of the present invention proposes a process for generating administrative penalty decision documents based on a large language model, and the method comprises the following steps:

[0032] Obtain the text of illegal facts recorded by law enforcement personnel, and construct a violation type identification problem based on the first prompt template (such as "Please generate the involved violation type {y} based on the illegal facts {x}, for example..."), and input the large language model to obtain a set of candidate violation types, such as price fraud, producer product quality issues, etc.;

[0033] For each violation type in the candidate violation type set, an embedding model is used to generate a query embedding vector, and multiple similar violation type applicable laws are retrieved from the hierarchical enterprise operation supervision legal and regulatory database described in the first aspect of the present invention based on the embedding vector similarity, and the above process is repeated to obtain a candidate violation type applicable law set; the constructed violation type applicable law query includes multiple nodes, and the embedding vector of each node is used as the embedding vector of the query; the legal article in the legal database also includes multiple nodes, and the embedding vector of each node in the legal article is used as the embedding vector of the legal article, and then the similarity is calculated based on the embedding vector of the query and the embedding vector of the legal article;

[0034] Combine the above illegal facts and candidate illegal type applicable legal provisions, and construct a relevance judgment question between illegal facts and illegal type applicable legal provisions based on the second prompt template (such as "Please analyze whether each illegal type applicable legal provision is relevant to the illegal facts, the options include {relevant, irrelevant, uncertain}"), input the large language model to obtain three logical relationship judgments for each applicable legal provision, and retain those with relevant logic as the final illegal type applicable legal provision set;

[0035] Based on the applicable laws of the violation type in the above-mentioned set of applicable laws of the violation type, construct a query of applicable laws of the penalty basis (such as "penalty basis, including warning, fine, confiscation of illegal gains, revocation of business license, etc., the applicable laws of the violation type involved are: {violation type law 1}, {violation type law 2}..."), retrieve multiple applicable laws of the penalty basis in the hierarchical enterprise operation supervision law and regulation database described in the first aspect of the present invention, and obtain a corresponding set of candidate applicable laws of the penalty basis;

[0036] Combine the above-mentioned illegal facts, the set of applicable laws for the final illegal type, and the set of applicable laws for candidate punishment bases, and construct a relevance judgment question between illegal facts and applicable laws based on the third prompt template (such as "Please analyze whether each applicable law for punishment base is a relevant punishment for the illegal facts and the corresponding applicable law for the illegal type, and the options include {relevant, irrelevant, uncertain}"), input the large language model to obtain three logical relationship judgments for each applicable law, and retain those with relevant logic as the set of applicable laws for the final punishment base;

[0037] If the penalty type involves fines or confiscation of illegal gains, the calculation process and final result of the corresponding amount must be generated through a large language model, and then the fine amount and the amount of confiscation of illegal gains are generated based on the applicable law;

[0038] Integrate the key information such as the set of applicable laws for the above-mentioned final violation type, the set of applicable laws for the basis for punishment, the amount of fines, and the amount of confiscated illegal gains (if any), and generate an administrative penalty document containing the violation type, the set of applicable laws for the violation type, the set of applicable laws for the basis for punishment, an analysis of the facts of the violation, and the result of the punishment based on the fourth prompt template (such as "Please generate a penalty document with coherent sentences, accurate punishment, legal basis, and consistent logic based on the facts of the violation and the set of laws {x}, which is required to include...").

[0039] The advantages of the present invention are as follows:

[0040] In response to the needs of diversifying business violations and improving law enforcement efficiency, we first built a hierarchical database of laws and regulations for business supervision to achieve efficient retrieval and understanding of the regulatory structure. Secondly, we designed a set of administrative penalty decision document generation processes, which include: after obtaining the facts of the violation, input the large language model to identify the type of violation; based on the type of violation, search the legal provisions applicable to the violation type and the candidate applicable legal provisions for the penalty basis in the legal database, and require the large language model to judge the logical relationship and select the relevant applicable legal provisions; if it involves fines or confiscation of illegal gains, the calculation process and specific amount are automatically generated; finally, the key information is integrated and input into the large language model to generate a semantically coherent, legally accurate, and logically rigorous administrative penalty document for business supervision, which effectively improves the intelligence level and accuracy of regulatory enforcement. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flowchart of establishing a hierarchical legal and regulatory database in an embodiment of the present invention.

[0042] Figure 2 It is a partial schematic diagram of the hierarchical legal and regulatory database in an embodiment of the present invention.

[0043] Figure 3 It is a schematic diagram of the process of generating a penalty document in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the detailed description below, many specific details are proposed to provide a comprehensive understanding of the present invention. But it is obvious to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is by no means limited to any specific configuration and algorithm proposed below, but covers any modification, replacement and improvement of elements, parts and algorithms without departing from the spirit of the present invention. In the accompanying drawings and the following description, known structures and technologies are not shown to avoid unnecessary ambiguity to the present invention.

[0045] In the present invention, a specific implementation method of a method and device for automatically generating administrative penalty documents for enterprise operation supervision based on a large language model is disclosed, which mainly consists of the following steps:

[0046] Combine the following Figure 1 The construction of a hierarchical legal and regulatory database in an embodiment of the present invention is described.

[0047] S101: Collect and organize the full text of laws and regulations to establish a unified data source. Design and apply a regular expression rule set to disassemble the legal text and organize it in detail and systematically according to the hierarchical structure of laws, chapters, sections, articles, clauses, and items.

[0048] S102: Construct a hierarchical enterprise management supervision law database with a tree-like retrieval structure and efficient retrieval performance. Each specific legal provision, including articles, clauses, and items, is stored as a leaf node. Non-leaf nodes, including codes, chapters, and sections, do not directly store specific legal content, but serve as intermediate indexes to improve query efficiency by aggregating information from lower-level nodes. Specific implementation tools include the LLaMA-Index native tree database, or using LLaMA-Index to call MongoDB or Elasticsearch interfaces.

[0049] S103: Generate summary information of nodes at each level from bottom to top through a large language model. For the leaf nodes at the bottom level, the summary is generated not only based on the content of the article itself, but also includes other legal content extracted from it that is quoted across codes (such as the supplementary explanation of the superior law by the lower-level law) and across chapters (such as the punishment measures for the aforementioned legal articles), and comprehensively generates a comprehensive summary. For non-leaf nodes, summarize the summary information of all lower-level leaf nodes and generate a high-level summary through a large language model. The content and summary information of each node are vectorized and stored based on the embedding model to ensure retrieval performance. Optional embedding models include the BGE series models developed by BAAI.

[0050] Figure 2 A partial schematic diagram of a hierarchical legal and regulatory library provided for an example of the present invention.

[0051] The summary generated by the large language model for Article 14 of the Price Law of the People's Republic of China summarizes the contents of eight sub-items involving price violations. Article 40 of the Price Law of the People's Republic of China quotes the contents of Article 14 of this law, and the summary generated by the large language model combines the contents of the two articles. Article 7 of the Provisions on Administrative Penalties for Price Violations cross-codes and quotes the contents of Article 14 of the Price Law of the People's Republic of China, and the large language model extracts item (iv) for summary.

[0052] Combine the following Figure 3 The penalty document generation method based on the large language model in the embodiment of the present invention is described.

[0053] S201: Obtain the text of the illegal facts recorded by law enforcement personnel, which should generally include: (1) time and location information, (2) a clear description of the specific circumstances, process and content of the illegal behavior, including information such as the subject, object, method, etc. involved, and (3) relevant evidence supporting the illegal facts. Then, based on the first prompt template, construct a violation type identification problem (such as "Please generate the involved violation type {y} based on the illegal fact {x}, for example..."), and input it into the large language model to obtain a set of candidate violation types, such as price fraud, producer product quality problems, etc.

[0054] S202: For each violation type in the candidate violation type set, an embedding model is used to generate a query embedding vector, and multiple similar violation type applicable laws are retrieved from the hierarchical enterprise operation supervision legal and regulatory database described in the first aspect of the present invention. The above process is repeated to obtain a candidate violation type applicable law set. The retrieval process of each violation type applicable law adopts a beam search: (1) the query content is vectorized using the embedding model, (2) similarity matching is performed based on the query vector and the highest level code name and summary vector, and the K codes with the highest similarity are selected, where K is a definable parameter, and generally at least 3 are selected, (3) matching is performed based on the query content and the second level chapter names and summary vectors of all selected codes, and the K chapters with the highest similarity are selected, (4) and so on, until the leaf node, that is, the article or clause or item, is returned.

[0055] S203: Combine the above-mentioned illegal facts and candidate illegal type applicable legal provisions, and construct a correlation judgment question between illegal facts and illegal type applicable legal provisions based on the second prompt template (such as "Please analyze whether each illegal type applicable legal provision is relevant to the illegal facts, the options include {relevant, irrelevant, uncertain}"), input the large language model to obtain three logical relationship judgments for each applicable legal provision, and retain those with relevant logic as the final illegal type applicable legal provision set.

[0056] S204: Based on the above-mentioned violation type laws, construct a query on the applicable laws for the basis for punishment (such as "the basis for punishment, including warnings, fines, confiscation of illegal gains, revocation of business licenses, etc., the applicable laws for the types of violations involved are: {violation type law 1}, {violation type law 2}..."), and retrieve multiple applicable laws for punishment in the hierarchical enterprise management supervision legal and regulatory database described in the first aspect of the present invention to obtain a corresponding set of candidate applicable laws for punishment. The specific search process is similar to S202. By adding the prefix "the basis for punishment, including warnings, fines, confiscation of illegal gains, revocation of business licenses, etc.", a search result different from S202 can be achieved.

[0057] S205: Combine the above-mentioned illegal facts, the set of applicable laws for the final illegal type, and the set of applicable laws for candidate penalty bases, and construct a relevance judgment question between illegal facts and applicable laws based on the third prompt template (such as "Please analyze whether each applicable law for penalty base is a relevant punishment for the illegal facts and the corresponding applicable laws for the illegal type. The options include {relevant, irrelevant, uncertain}"), and input the large language model to obtain three logical relationship judgments for each applicable law, and retain the ones with relevant logic as the final set of applicable laws for penalty bases.

[0058] S206: If the penalty type involves fines or confiscation of illegal gains, the calculation process and final results of the corresponding amount must be generated through the large language model, and then the fine amount and the confiscation of illegal gains amount are generated based on the applicable law. In the actual calculation, external mathematical tools such as Wolfram Alpha can be called for verification to ensure the consistency and correctness of the results.

[0059] S207: Integrate the key information such as the set of applicable laws for the above-mentioned final violation type, the set of applicable laws for the basis for punishment, and the amount of fines and the amount of confiscated illegal gains (if any), and generate an administrative penalty document for business supervision based on the fourth prompt template input into the large language model, which includes the violation type, the set of applicable laws for the violation type, the set of applicable laws for the basis for punishment, an analysis of the facts of the violation, and the result of the punishment (such as "Please generate a penalty document with coherent sentences, accurate punishment, legal basis, and consistent logic based on the facts of the violation and the set of laws {x}, which is required to include...").

[0060] The present invention also provides a server, characterized in that it includes a memory and a processor, the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program includes instructions for executing each step in the above method.

[0061] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0062] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.

Claims

1. A method for automatically generating administrative penalty documents based on a large language model, the steps of which include: 1) Use the legal article parsing algorithm to disassemble the full text of laws and regulations to obtain a hierarchical structure from coarse to fine; Then, a tree-like indexed enterprise management supervision laws and regulations database is constructed using a hierarchical construction method according to the hierarchical structure; 2) Map each node in the tree index of the enterprise operation supervision laws and regulations database into an embedding vector through the Chinese embedding model; then use a bottom-up approach to provide summary information for each node through a large language model, and extract other legal provisions cited across codes and chapters for each leaf node; Summarize the summaries of the child nodes contained in each non-leaf node as the high-level information of the corresponding non-leaf node, and use it to hierarchically search the legal content of the corresponding leaf node; 3) Obtain the text of the illegal facts recorded by the law enforcement personnel, construct the illegal type recognition problem based on the first prompt template and input it into the large language model to obtain a set of candidate illegal types; 4) For each violation type in the candidate violation type set, use the embedding model to generate a query embedding vector; According to the query embedding vector, the applicable laws and regulations for the violation type are retrieved in the enterprise operation supervision laws and regulations database based on the embedding vector similarity, and a set of candidate applicable laws and regulations for the violation type corresponding to the set of candidate violation types is obtained; 5) Merge the illegal facts recorded in step 3) and the set of applicable laws of the candidate illegal types obtained in step 4), and construct a correlation judgment problem between the illegal facts and the applicable laws of the illegal types based on the second prompt template and input it into the large language model to obtain the logical relationship judgment of each applicable law, and obtain the set of applicable laws of the illegal types according to the logical relationship judgment of each applicable law; 6) Based on the applicable laws for the violation type in the set of applicable laws for the violation type, construct a query for applicable laws for punishment basis to search in the database of laws and regulations for business supervision of enterprises to obtain a set of candidate applicable laws for punishment basis; 7) Merge the illegal facts recorded in step 3), the candidate illegal type applicable law set obtained in step 4), and the candidate penalty basis applicable law set obtained in step 6), and construct the illegal facts and applicable law relevance judgment problem based on the third prompt template and input it into the large language model to obtain the logical relationship judgment of each applicable law, and obtain the final penalty basis applicable law set according to the logical relationship judgment of each applicable law; 8) Integrate the set of applicable laws for the violation type obtained in step 5) and the set of applicable laws for the basis for punishment obtained in step 7), and generate an administrative penalty document based on the fourth prompt template input large language model containing the violation type, the set of applicable laws for the violation type, the set of applicable laws for the basis for punishment, analysis of the facts of the violation and the result of the punishment.

2. The method according to claim 1, characterized in that In step 7), if the penalty type involves a fine or confiscation of illegal gains, the calculation process and final result of the corresponding amount are generated through a large language model, and then the fine amount and the confiscation of illegal gains amount are generated based on the applicable law; in step 8), the applicable legal provisions set of the illegal type obtained in step 5), the applicable legal provisions set of the penalty basis obtained in step 7), the fine amount and the confiscation of illegal gains are integrated.

3. The method according to claim 2, characterized in that The fourth prompt template in step 8) is "Please generate a penalty document with coherent sentences, accurate penalties, legal basis, and consistent logic based on the illegal facts and legal set {x}, which is required to include..." 4. The method according to claim 1, 2 or 3, characterized in that: The first prompt template in step 3) is "Please generate the involved violation type {y} based on the violation fact {x}, for example: violation type {1}, violation type {2}..."; the second prompt template in step 4) is "Please analyze whether the applicable law for each violation type is relevant to the violation fact, the options include {relevant, irrelevant, uncertain}"; the third prompt template in step 7) is "Please analyze whether the applicable law for each penalty is a relevant penalty for the violation fact and the corresponding violation type applicable law, the options include {relevant, irrelevant, uncertain}".

5. The method according to claim 1, 2 or 3, characterized in that: Step 6) The query of the applicable laws for the punishment basis constructed is "the punishment basis includes warning, fine, confiscation of illegal income, and revocation of business license. The applicable laws for the violation types involved are: {Violation type law 1}, {Violation type law 2}...".

6. The method according to claim 1, 2 or 3, characterized in that: The hierarchical structure is composed of laws, chapters, sections, articles, clauses and items from coarse to fine. Among them, the nodes corresponding to articles, clauses and items in the tree index of the enterprise operation supervision laws and regulations database are leaf nodes, and the nodes corresponding to laws, chapters and sections are non-leaf nodes.

7. The method according to claim 1, 2 or 3, characterized in that: The Chinese embedding model is a BGE series model.

8. A server, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, the computer program is configured to be executed by the processor, and the computer program comprises instructions for executing each step in the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for automatically generating commutation and parole document

    CN113343661A

  • Judicial document processing method and device, electronic equipment and storage medium

    CN115936932A

  • Medical document generation method and device, electronic equipment and storage medium

    CN117393099A

  • Judgment document generation method, device and system and storage medium

    CN117725903A

  • Legal knowledge graph construction method and device, equipment and storage medium

    CN118036736A