Knowledge base construction, compliance reasoning, and legal knowledge base construction methods

By acquiring and analyzing the compliance results of rules, examples and labels in the target field, reasoning and integrating empirical knowledge, the problem of insufficient accuracy of compliance reasoning is solved, and high-quality compliance reasoning results are achieved.

CN118734954BActive Publication Date: 2025-03-11ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the accuracy of compliance reasoning is mainly due to insufficient knowledge, poor reasoning paths, inability to fully understand key information and lack of critical thinking, and the search and enhancement generation technology has high requirements for high-quality empirical knowledge, which is easily affected by low-quality empirical knowledge.

Method used

By obtaining the target rules, sample examples and label compliance results of the target field, reasoning whether the sample examples comply with the target rules, conduct inference analysis of the inference process based on the label compliance results, obtain inference empirical knowledge of inference for the target rules, and integrate these empirical knowledge to build a knowledge base to improve the accuracy of compliance reasoning.

Benefits of technology

It effectively improves the accuracy of compliance reasoning in the target field, ensures that the empirical knowledge stored in the knowledge base is high-quality and misleading, thereby improving the overall performance of compliance reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734954B_ABST
    Figure CN118734954B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a method for constructing a knowledge base, compliance reasoning, and a legal knowledge base, wherein the knowledge base construction method includes: obtaining at least one set of target rules, sample examples, and labeled compliance results in a target domain, wherein the labeled compliance results are annotated with whether the sample examples comply with the target rules; reasoning whether the sample examples comply with the target rules to obtain predicted compliance results; based on the labeled compliance results, performing reasoning analysis on the process of obtaining the predicted compliance results to obtain reasoning experience knowledge for the target rules; integrating the reasoning experience knowledge for each target rule to construct a knowledge base for compliance reasoning in the target domain, including a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target domain, thereby effectively improving the accuracy of compliance reasoning in the target domain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the technical field of model reasoning, and in particular to a method for knowledge base construction, compliance reasoning, and legal knowledge base construction. Background Art

[0002] With the development of deep learning technology, reasoning models have been widely studied and applied in complex reasoning tasks in the real world, such as mathematical reasoning, common sense reasoning, and logical reasoning.

[0003] In the application of compliance reasoning in the target field, the accuracy of compliance reasoning is insufficient due to insufficient knowledge, imprecise reasoning paths, inability to fully understand key information, lack of critical thinking (tendency to answer positively), etc. To address this problem, the retrieval-augmented generation (RAG) technology is currently used to retrieve relevant rules and examples as empirical knowledge for compliance reasoning, which can theoretically improve the accuracy of reasoning.

[0004] However, retrieval enhancement has high requirements for the empirical knowledge to be retrieved. In real applications, irrelevant and misleading low-quality empirical knowledge will seriously affect the accuracy of compliance reasoning. Therefore, a high-accuracy knowledge base construction method is urgently needed to provide high-quality empirical knowledge for compliance reasoning. Summary of the invention

[0005] In view of this, an embodiment of this specification provides a knowledge base construction method. One or more embodiments of this specification also involve a compliance reasoning method, a legal knowledge base construction method, another legal knowledge base construction method, a compliance reasoning method in the legal field, a task platform, another task platform, a knowledge base construction device, a model compliance construction device, a legal knowledge base construction device, another legal knowledge base construction device, a compliance reasoning device in the legal field, a computing device, a computer-readable storage medium, and a computer program product to solve the technical defects existing in the prior art.

[0006] In one embodiment of the present specification, a knowledge base construction method is provided, including: obtaining at least one set of target rules, sample examples and label compliance results in a target domain, wherein the label compliance results are annotated with whether the sample examples comply with the target rules; reasoning whether the sample examples comply with the target rules to obtain predicted compliance results; based on the label compliance results, performing reasoning analysis on the process of obtaining the predicted compliance results to obtain reasoning experience knowledge for the target rules; integrating the reasoning experience knowledge for each target rule to construct a knowledge base for compliance reasoning in the target domain.

[0007] In one embodiment of the present specification, after reasoning whether a sample example complies with a target rule, the reasoning process is analyzed based on the label compliance result to heuristically obtain reasoning experience knowledge for the target rule, which is high-quality experience knowledge directly related to the target rule. The reasoning experience knowledge for each target rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field, effectively improving the accuracy of compliance reasoning in the target field. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 is a flow chart of a knowledge base construction method provided by an embodiment of this specification;

[0009] Figure 2 It is a flowchart of a knowledge base construction method provided by an embodiment of this specification;

[0010] Figure 3 is a flow chart of a compliance reasoning method provided by an embodiment of this specification;

[0011] Figure 4 is a flow chart of a method for constructing a legal knowledge base provided by an embodiment of this specification;

[0012] Figure 5 is a flowchart of another method for constructing a legal knowledge base provided by an embodiment of this specification;

[0013] Figure 6 It is a schematic diagram of the principle of a method for constructing a legal knowledge base provided by an embodiment of this specification;

[0014] Figure 7 It is a flowchart of a compliance reasoning method in the legal field provided by an embodiment of this specification;

[0015] Figure 8 It is a structural diagram of a task platform provided by an embodiment of this specification;

[0016] Fig. 9 is a schematic diagram of the structure of another task platform provided by an embodiment of this specification;

[0017] Fig.10 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0018] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0019] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification 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 in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0020] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, 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 one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0021] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0022] In one or more embodiments of this specification, a large model refers to a deep learning model with large-scale model parameters, which usually contains hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than 10 trillion model parameters. A large model can also be called a foundation model / foundation model. The large model is pre-trained with large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks, and the model has good generalization ability, such as a large language model (LLM for short), a multi-modal pre-training model, etc.

[0023] When the big model is used in practice, only a small number of samples are needed to fine-tune the pre-trained model and it can be applied to different tasks. The big model can be widely used in natural language processing (NLP), computer vision and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image caption (IC), image generation, as well as natural language processing tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of the big model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, etc.

[0024] First, the terms involved in one or more embodiments of this specification are explained.

[0025] Big Language Model: A deep learning model trained on massive text data.

[0026] Deep Self-Attention Model (Transformer Model): A deep learning architecture based on the attention mechanism for processing sequence data such as natural language.

[0027] Bidirectional Encoder Representations from Transformers (BERT): A special deep self-attention model trained using a bidirectional Transformer encoder and large-scale unlabeled text data.

[0028] Retrieval-Augmented Generation (RAG): A natural language processing technique that combines information retrieval and text generation methods to improve the accuracy and contextual relevance of model-generated content. In traditional generative models, the model generates text directly based on its internally stored knowledge. In contrast, the RAG model retrieves the most relevant fragments of the input query from an external knowledge base before generating a response, and then uses this retrieved information to guide and enrich its generation process.

[0029] Few-Shot Learning: A learning method that guides the model to perform tasks based on a small number of samples. It can learn and generalize based on very small amounts of example information to solve new tasks or classifications, emphasizing efficient use of data and rapid adaptability.

[0030] Prompt: A type of information that uses natural language to guide or inspire the reasoning model to perform tasks.

[0031] Prompt Learning: A learning method that uses natural language to guide or inspire reasoning models to perform tasks.

[0032] In the application of compliance reasoning in the target field, the accuracy of compliance reasoning is insufficient due to problems such as insufficient knowledge, imprecise reasoning path, inability to fully understand key information, and lack of critical thinking (tendency to answer positively).

[0033] To address this problem, an optional method is to train the inference model using massive sample data from the target domain. However, the amount of sample data in the target domain is insufficient, and directly training a large-scale inference model has a high training cost and the risk of overfitting.

[0034] Another optional method is to use the Retrieval-augmented Generation (RAG) technology to retrieve relevant rules and examples as empirical knowledge and perform compliance reasoning. In theory, this can improve the accuracy of reasoning. However, retrieval enhancement has high requirements for the empirical knowledge to be retrieved. In real applications, irrelevant and misleading low-quality empirical knowledge will seriously affect the accuracy of compliance reasoning.

[0035] In response to the above problems, this specification provides a knowledge base construction method. This specification also involves a compliance reasoning method, a legal knowledge base construction method, another legal knowledge base construction method, a compliance reasoning method in the legal field, a task platform, another task platform, a knowledge base construction device, a model compliance construction device, a legal knowledge base construction device, another legal knowledge base construction device, a compliance reasoning device in the legal field, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0036] See also Figure 1 , Figure 1 A flowchart of a knowledge base construction method provided by an embodiment of this specification is shown, including the following specific steps:

[0037] Step 102: Obtain at least one set of target rules, sample examples, and label compliance results in the target domain, wherein the label compliance results are annotated with whether the sample examples comply with the target rules.

[0038] The embodiments of this specification are applied to websites, applications or platforms with knowledge base construction functions. The target domain is a knowledge domain with specific rules, such as the medical field and the legal field. The examples in the target domain are subject to specific rules, and compliance reasoning is required to determine whether the examples comply with the rules. The target rules are the standards or criteria used to determine whether compliance is achieved in the target domain, and serve as the reasoning basis for compliance reasoning in the knowledge base construction process. For example, disease diagnosis standards in the medical field, and legal rules in the legal field. Sample examples are specific instances in the target domain that need to be judged for compliance, and serve as the reasoning objects for compliance reasoning in the knowledge base construction process, such as medical diagnosis reasoning in the medical field, and legal case reasoning in the legal field.

[0039] The label compliance result is a label that characterizes whether the sample example complies with the target rule. The label compliance result includes: compliance and non-compliance. It is used as a reference standard for compliance reasoning during the knowledge base construction process to evaluate the accuracy of compliance reasoning. The label compliance result is annotated with whether the sample example complies with the target rule. For example, in the medical field, whether a symptom medical record complies with the diagnosis result of the disease diagnosis standard of a certain disease. Another example is in the legal field, whether a legal case complies with the case judgment of a certain legal rule.

[0040] The target rules, sample examples and label compliance results constitute a sample data group. One target rule may correspond to at least one sample example, and the label compliance result may indicate whether each sample example complies with the target rule. Alternatively, at least one target rule may correspond to one sample example, and the label compliance result may indicate whether the sample example complies with each target rule. There is no limitation on this.

[0041] One optional way to obtain at least one set of target rules, sample examples, and label compliance results in the target domain is to obtain at least one set of target rules, sample examples, and label compliance results from a historical database of the target domain, and another optional way is to obtain at least one set of target rules and sample examples, and have experts mark whether the sample examples comply with the target rules to obtain label compliance results. The two ways are not limited here.

[0042] Exemplarily, the disease diagnosis criteria, symptom medical records and diagnosis results of 10 common cardiovascular diseases are obtained from a historical database in the medical field.

[0043] Obtaining target rules and sample examples provides reasoning basis and reasoning objects for subsequent compliance reasoning, and obtaining label compliance results provides reference standards for subsequent evaluation of compliance reasoning.

[0044] Step 104: Infer whether the sample example complies with the target rule and obtain a predicted compliance result.

[0045] The predicted compliance result is the result of whether the output sample example complies with the target rule, including the predicted compliance conclusion and the compliance reasoning process. The predicted compliance conclusion is the conclusion of whether the sample example complies with the rule based on the logical relationship prediction of the example. The predicted compliance results include: compliance and non-compliance. The compliance reasoning process is the process record of compliance reasoning before the predicted compliance conclusion is drawn, involving how to interpret the information of the sample example, extract key elements, match the target rule, and form a logically coherent reasoning chain. For example, the symptom history in the medical field is: the patient has a high fever and dyspnea, and the chest CT shows ground-glass shadows, which are consistent with the disease diagnosis criteria for coronavirus infection. Therefore, in the reasoning process, the model will extract the key elements "high fever", "dyspnea", "chest CT shows ground-glass shadows", and finally get the predicted compliance result of "compliance" (i.e., meeting the disease diagnosis criteria for coronavirus infection). For example, a legal case in the legal field is: XX personnel performed ZZ operation on YY funds, which is in compliance with the legal rules of A fund law. Therefore, during the reasoning process, the model will extract the key elements "XX personnel", "YY funds", and "ZZ operation", and finally obtain the predicted compliance result of "compliance" (that is, compliance with the legal rules of A fund law).

[0046] An optional method is to use an inference model to determine whether a sample example complies with a target rule and obtain a predicted compliance result.

[0047] The inference model is a deep learning model that can reason whether an example complies with the rules. The inference model can also integrate functions such as reasoning analysis and factor extraction. The inference model uses semantic understanding to sort out the logical relationship of the example, and infers whether the example complies with the rules based on the logical relationship, and outputs the predicted compliance result. The inference model can be customized for a specific field, such as medicine or law, or it can be general and can be applied across fields. Inference models include but are not limited to: large language models, Transformer-based models, and models based on Generative Adversarial Networks (GAN).

[0048] Using the inference model, the sample example is inferred to comply with the target rule to obtain a predicted compliance result. An optional method is: using the inference model, based on the prompt information, the sample example is inferred to comply with the target rule to obtain a predicted compliance result, wherein the inference model has not been specifically trained, and the compliance reasoning is performed under the guidance of the prompt information. Optionally, the prompt information includes but is not limited to: target domain, instruction information and output format. Another optional method is: inputting the sample example and the target rule into the inference model, inferring whether the sample example complies with the target rule, and obtaining a predicted compliance result, wherein the inference model has been specifically trained and directly performs compliance reasoning. There is no limitation on the two methods here.

[0049] Exemplarily, using a large language model, based on the prompt information "As a medical expert (target field), please infer whether the symptom medical records meet the disease diagnosis criteria for 10 diseases. Please answer according to the following requirements: clearly express your judgment logic and give a clear conclusion answer: compliant or not (indicative information), answer format: predicted compliance conclusion + compliance reasoning process. (output format)", it is inferred whether each symptom medical record meets the disease diagnosis criteria for 10 common diseases, and the predicted compliance results of each symptom medical record are obtained.

[0050] Whether the inference sample example complies with the target rule and the predicted compliance result is obtained, which provides prior information for the subsequent heuristic acquisition of reasoning experience knowledge.

[0051] Step 106: Based on the label compliance result, perform reasoning analysis on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

[0052] The reasoning experience knowledge for the target rule is the heuristic experience knowledge determined by analysis on how to correctly reason whether an example complies with the target rule. The reasoning experience knowledge is obtained by reasoning and analyzing the process of obtaining the predicted compliance result with the label compliance result as prior information. Since the reasoning experience knowledge is obtained heuristically, the reasoning experience knowledge is high-quality experience knowledge directly related to the target rule. The reasoning experience knowledge includes but is not limited to: matching experience knowledge, mismatching experience knowledge, key element identification, reasoning path, etc. of compliance reasoning. For example, only when "high fever", "difficulty breathing" and "ground glass shadows on chest CT" occur at the same time, the disease diagnosis criteria for coronavirus infection are met. For another example, if the person is not "XX person", it does not meet the legal rules of A fund law.

[0053] Based on the label compliance results, the process of obtaining the predicted compliance results is reasoned and analyzed to obtain the reasoning experience knowledge for the target rules. An optional method is to use the reasoning model to perform reasoning analysis on the process of obtaining the predicted compliance results based on the label compliance results to obtain the reasoning experience knowledge for the target rules.

[0054] Using the inference model, based on the label compliance results, the process of obtaining the predicted compliance results is analyzed and inferenced to obtain the empirical knowledge of the target rules. An optional method is: using the inference model, based on the prompt information, with the label compliance results as prior information, the process of obtaining the predicted compliance results is analyzed and inferenced to obtain the empirical knowledge of the target rules, wherein the inference model has not been trained in a targeted manner, and the inference process is analyzed and inferenced under the guidance of the prompt information. Optionally, the prompt information includes but is not limited to: target domain, prior information and indication information.

[0055] Exemplarily, using a large language model, based on the prompt information "As a medical expert (target field), you can improve yourself through self-reflection. I will give you an example of whether a given symptom medical record meets the disease diagnosis criteria for 10 diseases through reasoning. The following is a medical compliance problem. Given the label compliance result (prior information), please emphasize the key elements in one sentence to generate reasoning experience knowledge for 10 diseases. (Indicative information)", with the label compliance result as prior information, the process of obtaining the predicted compliance results of each symptom medical record is reasoned and analyzed to obtain the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0056] Based on the predicted compliance results, the reasoning process is analyzed and the reasoning experience knowledge for the target rules is heuristically obtained. This is high-quality experience knowledge directly related to the target rules, which provides an experience knowledge foundation for the subsequent construction of the knowledge base.

[0057] Step 108: Integrate the reasoning experience knowledge for each target rule and build a knowledge base for compliance reasoning in the target domain.

[0058] The knowledge base is an empirical knowledge database used for compliance reasoning in the target domain. It stores reasoning empirical knowledge for each target rule. In the compliance reasoning process, if you need to infer whether a certain example complies with a certain target rule, you can retrieve the reasoning empirical knowledge for the target rule from the knowledge base as supplementary information to complete high-quality retrieval enhancement generation and achieve high-accuracy compliance reasoning in the target domain.

[0059] Optionally, the reasoning experience knowledge for each target rule is integrated. One optional way is to extract the heuristic reasoning experience knowledge from the reasoning experience knowledge for the target rule, which can be achieved by designing a special extraction function model as an extraction agent. Another optional way is to repeatedly screen the reasoning experience knowledge for each target rule, which can be achieved by designing a special screening function model as a screening agent.

[0060] An optional way to construct a knowledge base for compliance reasoning in the target domain is to integrate the reasoning experience knowledge for each target rule and construct a knowledge base for compliance reasoning in the target domain.

[0061] For example, for 10 common cardiovascular diseases, the reasoning experience knowledge for the 10 common diseases is integrated to construct a knowledge base for compliance reasoning in the medical field.

[0062] In the embodiments of the present specification, after reasoning whether a sample example complies with the target rule, the reasoning process is analyzed based on the label compliance result, and reasoning experience knowledge for the target rule is heuristically obtained, which is high-quality experience knowledge directly related to the target rule. The reasoning experience knowledge for each target rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field, effectively improving the accuracy of compliance reasoning in the target field.

[0063] In an optional embodiment of the present specification, the label compliance result includes a label compliance result of at least one target dimension, and the label compliance result of at least one target dimension is annotated with whether the sample example complies with the target rule under the at least one target dimension; step 104 includes the following specific steps:

[0064] Using the first inference model, inferring whether the sample example complies with the target rule under at least one target dimension, and obtaining a predicted compliance result of at least one target dimension;

[0065] Correspondingly, step 106 includes the following specific steps:

[0066] Using the second reasoning model, based on the label compliance result of at least one target dimension, a reasoning analysis is performed on the process of obtaining the predicted compliance result of at least one target dimension to obtain reasoning experience knowledge for the target rule.

[0067] The target dimension is the dimension used in the compliance reasoning process to determine whether the reasoning example complies with the rules. At least one target dimension is used to realize the disassembly of compliance reasoning, complete more detailed and comprehensive compliance reasoning, ensure the multi-faceted and completeness of the reasoning process, and then ensure the accuracy of the reasoning results. For example, symptoms, signs, laboratory test results, and imaging features in the medical field. Another example is the subject, object, subjective aspect, and objective aspect in the legal field.

[0068] The label compliance result of the target dimension represents the label of whether the sample example complies with the target rule under the target dimension, including: compliance and non-compliance, which serves as the reference standard for compliance reasoning under the target dimension and is used to evaluate the accuracy of compliance reasoning under the target dimension. The label compliance result is annotated with whether the sample example complies with the target rule under the target dimension. For example, in the medical field, whether the signs in a symptom medical record meet the diagnosis results of the disease diagnosis criteria of a certain disease. For another example, in the legal field, whether the subject of a legal case complies with the case judgment of the subject of a certain legal rule.

[0069] The first reasoning model is a deep learning model that has the function of reasoning whether an example complies with the rules. The first reasoning model sorts out the logical relationship of the example through semantic understanding, reasons whether the example complies with the rules based on the logical relationship, and outputs the predicted compliance result. The first reasoning model can be customized for a specific field, such as medicine or law, or it can be general and can be applied across fields. Reasoning models include but are not limited to: large language models, models based on deep self-attention models, and models based on generative adversarial networks (GAN).

[0070] The second reasoning model is a deep learning model that performs reasoning analysis on the reasoning process of whether the reasoning example conforms to the rule function. The second reasoning model performs reasoning analysis on the reasoning process of the first reasoning model by means of semantic understanding. The second reasoning model can be customized for a specific field, such as medicine or law, or it can be general and can be applied across fields. Reasoning models include, but are not limited to: large language models, models based on deep self-attention models, and models based on generative adversarial networks.

[0071] It should be noted that the first reasoning model and the second reasoning model can be the same reasoning model or different reasoning models, which is not limited here.

[0072] The predicted compliance result of the target dimension is the result of whether the output sample example complies with the target rule under the target dimension, including the predicted compliance conclusion and compliance reasoning process under the target dimension, wherein the predicted compliance conclusion under the target dimension is the conclusion of whether the sample complies with the rule under the target dimension based on the logical relationship prediction of the example, and the predicted compliance results under the target dimension include: compliance and non-compliance, and the compliance reasoning process under the target dimension is the process record of compliance reasoning before the predicted compliance conclusion is obtained, involving how the first reasoning model interprets the information of the sample example under the target dimension, extracts key elements, matches the target rule, and forms a logically coherent reasoning chain. For example, the symptom medical record in the medical field is: the patient has a high fever and dyspnea, and the chest CT shows ground-glass shadows, which is consistent with the disease diagnosis criteria of coronavirus infection under physical signs. Therefore, in the reasoning process, the model will extract the key elements "high fever" and "dyspnea", and finally get the predicted compliance result of "compliance" (i.e., compliance with the disease diagnosis criteria of coronavirus infection). For another example, a legal case in the legal field is: XX personnel performed ZZ operation on YY funds, which is consistent with the legal rules of A fund law in the subject dimension. Therefore, in the reasoning process, the first reasoning model will extract the key element "XX personnel" and ultimately obtain a predicted compliance result of "compliance" (that is, compliance with the standards of A fund law in the subject dimension).

[0073] Using the first reasoning model, the sample example is inferred to comply with the target rule under at least one target dimension to obtain a predicted compliance result of at least one target dimension. An optional method is: using the first reasoning model, based on the prompt information, the sample example is inferred to comply with the target rule to obtain a predicted compliance result, wherein the first reasoning model has not been specifically trained and performs compliance reasoning under the guidance of the prompt information. Optionally, the prompt information includes but is not limited to: target field, at least one target dimension, instruction information and output format. Another optional method is: inputting the sample example and the target rule into the first reasoning model, inferring whether the sample example complies with the target rule, and obtaining a predicted compliance result, wherein the first reasoning model has been specifically trained and directly performs compliance reasoning. There is no limitation on the two methods here.

[0074] Using the second inference model, based on the label compliance results of at least one target dimension, the process of obtaining the predicted compliance results of at least one target dimension is analyzed by reasoning, and the reasoning experience knowledge for the target rule is obtained. An optional method is: using the second inference model, based on the prompt information, taking the label compliance results of at least one target dimension as prior information, the process of obtaining the predicted compliance results of at least one target dimension is analyzed by reasoning, and the reasoning experience knowledge for the target rule is obtained, wherein the second inference model has not been trained in a targeted manner, and the reasoning process is carefully and comprehensively analyzed for at least one target dimension under the guidance of the prompt information. Optionally, the prompt information includes but is not limited to: the target field, at least one target dimension, instruction information, and output format.

[0075] Exemplarily, using a large language model, based on the prompt information "As a medical expert (target field), please infer whether the symptom medical records meet the disease diagnosis criteria for 10 diseases from the four target dimensions (at least one target dimension) of symptoms, signs, laboratory test results, and imaging features. Please answer according to the following requirements: clearly express your judgment logic and give a clear conclusion answer: compliant or not (indicative information), answer format: predicted compliance conclusion + compliant reasoning process. (output format)", infer whether each symptom medical record meets the disease diagnosis criteria for 10 common diseases under the four target dimensions, and obtain the predicted compliance results of the four target dimensions of each symptom medical record. Using a large language model, based on the prompt information "As a medical expert (target field), you can improve yourself through self-reflection. I will give you an example of reasoning whether the symptom medical record meets the disease diagnosis criteria for 10 diseases from four target dimensions (at least one target dimension) of symptoms, signs, laboratory test results, and imaging features. The following is a medical compliance problem. Given the labeled compliance results of the four target dimensions (prior information), each dimension has an unmatched predicted compliance result and a matched predicted compliance result. Please emphasize the key elements in one sentence to generate reasoning experience knowledge for 10 diseases. (Indicative information)", using the labeled compliance results of the four target dimensions as prior information, the process of obtaining the predicted compliance results of the four target dimensions is reasoned and analyzed to obtain reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0076] In the embodiments of this specification, compliance reasoning is broken down into subtasks under at least one target dimension, compliance reasoning is performed separately, and then reasoning analysis of the reasoning process is completed, so as to obtain reasoning experience knowledge for the target rules in a detailed, comprehensive and heuristic manner, thereby improving the quality of experience knowledge and further improving the accuracy of compliance reasoning in the target field.

[0077] In an optional embodiment of the present specification, the first reasoning model includes at least one first reasoning sub-model corresponding to the target dimension;

[0078] Using the first inference model, reasoning whether the sample example complies with the target rule under at least one target dimension, and obtaining the predicted compliance result of at least one target dimension, includes the following specific steps:

[0079] Using each first reasoning sub-model, based on the prompt information of each target dimension, it is inferred whether the sample example complies with the target rule under each target dimension, and a predicted compliance result of at least one target dimension is obtained.

[0080] The first reasoning model includes at least one first reasoning sub-model corresponding to a target dimension.

[0081] The prompt information of the target dimension is the paradigm information that uses natural language to guide or inspire the reasoning model to perform compliance reasoning under the target dimension, which is used to guide the reasoning model to focus on the key elements of the target dimension, so as to more accurately reason whether the sample example complies with the established target rules under at least one target dimension. The prompt information may include guidance on reasoning logic, key element identification, reasoning path, etc., to ensure that the model can follow the correct reasoning path and make reasonable judgments during the reasoning process. By setting the prompt information of the target dimension, multiple first reasoning sub-models as automatic planning agents are specifically responsible for solving the sub-tasks of compliance reasoning of the corresponding target dimension. Optionally, the prompt information includes but is not limited to: target field, at least one target dimension, instruction information and output format.

[0082] For example, the prompt information of at least one target dimension in the medical field is:

[0083] “As a medical professional, (target area)

[0084] Based on the following information, please infer whether the symptom medical record {records} meets the target dimension {aspect} of the {diagnosis} disease diagnosis standard. (At least one target dimension)

[0085] Rules Description:

[0086] {aspect_rule}:

[0087] [Note]:

[0088] {insight}:

[0089]

xxx:

[0090] {fact}

[0091] Please carefully review the symptom history and disease diagnosis criteria, and analyze only from the perspective of the target dimension {aspect} qualification, without involving the analysis of other components. Please answer as follows: (Instructions)

[0092] 1. Clarify the correspondence between the constituent elements of the target dimension {aspect} and the rules. Please clearly express your compliance reasoning process and give a clear predicted compliance conclusion: True, False (the target dimension {aspect} that meets the {diagnosis} disease diagnosis standard is answered as True, and the target dimension {aspect} that does not meet the {diagnosis} disease diagnosis standard is answered as False). Answer format: predicted compliance conclusion + compliance reasoning process (output format)".

[0093] By adjusting the target dimension {aspect}, the first reasoning model plays different roles and acts as an expert agent under different target dimensions to solve the subtasks of compliance reasoning.

[0094] For another example, the prompt information of at least one target dimension in the legal field is:

[0095] “As a legal expert, (target area)

[0096] Based on the following information, please infer whether the legal case reasoning {criminals} meets the target dimension {aspect} of the {charge} legal rule. (At least one target dimension)

[0097] Rules Description:

[0098] {aspect_rule}:

[0099] [Note]:

[0100] {insight}:

[0101]

xxx:

[0102] {fact}

[0103] Please carefully review the legal case reasoning and legal rules, and analyze only from the perspective of the target dimension {aspect} qualification, without involving the analysis of other constituent elements. Please answer according to the following requirements: (Instructions)

[0104] 1. Clarify the correspondence between the constituent elements and rules of the target dimension {aspect}. Please clearly express your compliance reasoning process and give a clear predicted compliance conclusion: True, False (the target dimension {aspect} that complies with the {charge} legal provisions and rules is answered as True, and the target dimension {aspect} that does not comply is answered as False). Answer format: predicted compliance conclusion + compliance reasoning process (output format)".

[0105] By adjusting the target dimension {aspect}, the first reasoning model plays different roles and acts as an expert agent under different target dimensions to solve the subtasks of compliance reasoning.

[0106] Correspondingly, the second reasoning model acts as a self-reflective agent to acquire reasoning experience knowledge. Based on the judgment results generated by the subtask expert agent of at least one target dimension, the self-reflective agent uses the label of the actual crime of the case facts as external feedback, and performs reasoning analysis on the process of the subtask expert agent reasoning to obtain the predicted compliance results of at least one target dimension to obtain reasoning experience knowledge.

[0107] Exemplarily, a large language model is used to infer whether each symptom medical record meets the disease diagnosis criteria of 10 common diseases based on the prompt information of the above four target dimensions, and the predicted compliance results of each symptom medical record in the four target dimensions are obtained. A large language model is used, based on the prompt information in the above example, with the label compliance results of the four target dimensions as prior information, to perform reasoning analysis on the process of obtaining the predicted compliance results of the four target dimensions, and obtain the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0108] In the embodiments of this specification, multi-dimensional prompt information is used to guide the reasoning model to focus on key elements, and to perform compliance reasoning in a detailed and comprehensive manner, providing higher accuracy prior information for the subsequent heuristic acquisition of reasoning experience knowledge.

[0109] In an optional embodiment of the present specification, step 106 includes the following specific steps:

[0110] Determine result matching information based on the label compliance result and the predicted compliance result;

[0111] Based on the result matching information, the process of obtaining the predicted compliance results is reasoned and analyzed to obtain the reasoning experience knowledge for the target rules.

[0112] In step 106, the intermediate step of obtaining the result matching information can be directly based on the predicted compliance results and the label compliance results to perform reasoning analysis to obtain reasoning experience knowledge, or it can be based on the label compliance results and the predicted compliance results to first determine the result matching information, and then perform reasoning analysis based on the predicted compliance results and the label compliance results to obtain reasoning experience knowledge.

[0113] The result matching information is the consistency matching information determined based on the label compliance result and the predicted compliance result. The result matching information includes: match and mismatch. The result matching information is used to evaluate the accuracy of compliance reasoning. If the predicted compliance result is consistent with the label compliance result, it means that the compliance reasoning is correct and the result matching information is a match; if they are inconsistent, it means that the compliance reasoning is wrong and the result matching information is a mismatch. The result matching information is the prior information for the subsequent heuristic acquisition of reasoning experience knowledge.

[0114] Based on the label compliance result and the predicted compliance result, the result matching information is determined. An optional method is to compare the label compliance result and the predicted compliance result to determine the result matching information.

[0115] Based on the result matching information, the process of obtaining the predicted compliance result is reasoned and analyzed to obtain the reasoning experience knowledge for the target rule. An optional method is to use the reasoning model to perform reasoning analysis on the process of obtaining the predicted compliance result based on the result matching information to obtain the reasoning experience knowledge for the target rule.

[0116] Using the inference model, based on the result matching information, the process of obtaining the predicted compliance result is analyzed and inferenced, and the inference experience knowledge for the target rule is obtained. An optional method is: using the inference model, based on the prompt information, with the result matching information as prior information, the process of obtaining the predicted compliance result is analyzed and inference experience knowledge for the target rule is obtained, wherein the inference model has not been trained in a targeted manner, and the inference process is analyzed and inferenced under the guidance of the prompt information. Optionally, the prompt information includes but is not limited to: target field, prior information and indication information.

[0117] Exemplarily, the label compliance results and predicted compliance results of each symptom medical record are compared to determine the result matching information. Using the large language model, based on the prompt information "As a medical expert (target field), you can improve yourself through self-reflection. I will give you an example of whether the given reasoning symptom medical record meets the disease diagnosis criteria of 10 diseases. The following is a medical compliance problem. Given the label compliance results, there is an unmatched result matching information and a matching result matching information (prior information). Please use one sentence to emphasize the key elements and generate reasoning experience knowledge for 10 diseases. (Indicative information)", with the label compliance results as prior information, the process of obtaining the predicted compliance results of each symptom medical record is reasoned and analyzed to obtain the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0118] Similar to the above embodiment, a more detailed and comprehensive reasoning analysis is performed on the model reasoning compliance process from multiple target dimensions to ensure the multi-faceted, complete and accurate nature of the extracted reasoning knowledge and experience. The label compliance result includes a label compliance result of at least one target dimension, and the label compliance result of at least one target dimension is annotated with whether the sample example complies with the target rule under at least one target dimension;

[0119] Based on the label compliance results and the predicted compliance results, result matching information is determined. An optional method is: based on the label compliance results and the predicted compliance results of each target dimension, result matching information of at least one target dimension is determined.

[0120] Based on the result matching information, the process of obtaining the predicted compliance result is reasoned and analyzed to obtain the reasoning experience knowledge for the target rule. An optional method is: using the reasoning model, based on the result matching information of at least one target dimension, the process of obtaining the predicted compliance result of at least one target dimension is reasoned and analyzed to obtain the reasoning experience knowledge for the target rule.

[0121] Furthermore, based on the label compliance results and predicted compliance results of each target dimension, the result matching information of at least one target dimension is determined. An optional method is to compare the label compliance results and predicted compliance results of each target dimension to determine the result matching information of at least one target dimension.

[0122] The result matching information of the target dimension is the consistency matching information determined based on the label compliance result of the target dimension and the predicted compliance result of the target dimension, including: match and mismatch. The result matching information of the target dimension is used to evaluate the accuracy of compliance reasoning under the target dimension. If the predicted compliance result of the target dimension is consistent with the label compliance result of the target dimension, it means that the compliance reasoning is correct under the target dimension, and the result matching information of the target dimension is a match; if it is inconsistent, it means that the compliance reasoning is incorrect under the target dimension, and the result matching information of the target dimension is a mismatch. The result matching information of the target dimension is the prior information under the target dimension for the subsequent heuristic acquisition of reasoning experience knowledge. For example, the result matching information of the four target dimensions in the medical field: symptoms: compliance; signs: non-compliance; laboratory test results: compliance; imaging features: compliance. For another example, the result matching information of the four target dimensions in the legal field: subject: compliance; object: compliance; subjective aspects: compliance; objective aspects: compliance.

[0123] Furthermore, using the inference model, based on the result matching information of at least one target dimension, the process of obtaining the predicted compliance result of at least one target dimension is inferred and analyzed to obtain the inference experience knowledge for the target rule. An optional method is: using the second inference model, based on the prompt information, with the result matching information of at least one target dimension as prior information, the process of obtaining the predicted compliance result of at least one target dimension is inferred and analyzed to obtain the inference experience knowledge for the target rule, wherein the second inference model has not been trained in a targeted manner, and under the guidance of the prompt information, the inference process is subjected to a detailed and comprehensive inference analysis of at least one target dimension. Optionally, the prompt information includes, but is not limited to: the target field, at least one target dimension, instruction information, and output format.

[0124] Exemplarily, the label compliance results of the four target dimensions of each symptom medical record and the predicted compliance results of the four target dimensions are compared to determine the result matching information of the four target dimensions. Using the large language model, based on the prompt information "As a medical expert (target field), you can improve yourself through self-reflection. I will give you an example of reasoning whether the symptom medical record meets the disease diagnosis criteria of 10 diseases from the four target dimensions (at least one target dimension) of symptoms, signs, laboratory test results, and imaging features. The following is a medical compliance problem. Given the label compliance results of the four target dimensions, each dimension has an unmatched matching result information and a matching matching result information (prior information), please use one sentence to emphasize the key elements and generate reasoning experience knowledge for 10 diseases. (Indicative information)", the label compliance results of the four target dimensions are used as prior information to perform reasoning analysis on the process of obtaining the predicted compliance results of the four target dimensions, and obtain reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0125] In the embodiments of this specification, after reasoning whether a sample example complies with the target rule, the result matching information is determined based on the label compliance result and the predicted compliance result, and the reasoning process is reasoned and analyzed based on the result matching information to heuristically obtain reasoning experience knowledge for the target rule, which is high-quality experience knowledge directly related to the target rule. The reasoning experience knowledge for each target rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field, effectively improving the accuracy of compliance reasoning in the target field.

[0126] In an optional embodiment of the present specification, the result matching information includes mismatch; step 106 includes the following specific steps:

[0127] In the case where the result matching information is mismatched, the mismatched result matching information is used as a negative example to perform reverse reasoning analysis on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

[0128] Reverse reasoning analysis is to identify and understand the reasoning analysis strategy that leads to mismatches by tracing the reasoning process backwards. Reverse reasoning analysis usually involves examining the thinking path of the reasoning model in a specific case and analyzing which key elements of incorrect reasoning lead to mismatched predicted compliance results. For example, if the result matching information is mismatched, the reasoning model will reverse reasoning to analyze the cause of the mismatch, add the cause of the mismatch as additional information to the reasoning model, and perform a new round of compliance reasoning until a predictive compliance result that can be matched is obtained.

[0129] In the case where the result matching information is mismatched, the mismatched result matching information is used as a negative example to perform reverse reasoning analysis on the process of obtaining the predicted compliance result, and obtain reasoning experience knowledge for the target rule. An optional method is: using the reasoning model, based on the prompt information, and taking the mismatched result matching information as the prior information of the negative example, to perform reverse reasoning analysis on the process of obtaining the predicted compliance result, and obtain reasoning experience knowledge for the target rule. Optionally, the prompt information includes but is not limited to: the target field, the prior information of the negative example, the instruction information, and the output format.

[0130] Similar to the above embodiment, compliance reasoning can be completed from at least one target dimension, and then the reasoning analysis of the reasoning process can be completed with the result matching information of at least one target dimension as the prior information of the negative example to obtain reasoning experience knowledge.

[0131] For example, tips in the medical field:

[0132] “As a medical professional (target field), you can analyze the mismatched result matching information through self-reflection and think about the reasons.

[0133] An attempt was made to answer inference questions based on the symptom history and the four target dimensions by breaking down the disease diagnostic criteria into four target dimensions.

[0134] You answered this question incorrectly. I need you to match the information example based on your mismatched results and analyze which target dimension (or dimensions) is wrong in your reasoning. (Indicative information)

[0135] [Symptoms and medical history]{facts}

[0136] [Problem description]

[0137] According to symptoms <symptoms>, signs <signs>, laboratory test results<laboratory testresult> ; Imaging features<imaging features> How to determine whether the symptom medical records meet the four target dimensions of the disease diagnosis criteria?

[0138] [Mismatched result matching information] (prior information of negative examples)

[0139] {initial_answer}

[0140] [Label compliance results]

[0141] The symptom records {records} meet the {diagnosis} disease diagnosis criteria, so there is no result for a certain target dimension that is Fasle.

[0142] [Require]

[0143] Answer format:

[0144] Target dimension 1: <Only four target dimension options; symptoms are unclear>

[0145] Reason 1: <Only reason target dimension 1 you get wrong result>... (output format)

[0146] Choosing the wrong target dimension, not all target dimensions need to be analyzed".

[0147] For another example, the prompt information in the legal field is:

[0148] "As a legal expert (target field), you can analyze the mismatched results and match information through self-reflection and think about the reasons.

[0149] An attempt to answer reasoning questions based on legal cases and the four target dimensions by breaking down legal rules into four target dimensions.

[0150] You answered this question incorrectly. I need you to match the information example based on your mismatched results and analyze which target dimension (or dimensions) is wrong in your reasoning. (Indicative information)

[0151] [Legal case]{fact}

[0152] [Problem description]

[0153] According to the subject <subject>, subjective aspect <mental>,object <object>, objective aspects <conduct>What are the four target dimensions for judging whether legal cases {criminals} meet {charge} legal rules?

[0154] [Mismatched result matching information] (prior information of negative examples)

[0155] {initial_answer}

[0156] [Label compliance results]

[0157] The legal case {criminals} complies with the {charge} legal rule, so there is no result of Fasle for a certain target dimension.

[0158] [Require]

[0159] Answer format:

[0160] Target dimension 1: <Only four target dimension options; not a complete sentence>

[0161] Reason 1: <Only reason target dimension 1 you get wrong result>... (output format)

[0162] Choosing the wrong target dimension, not all target dimensions need to be analyzed".

[0163] Exemplarily, when the result matching information is a mismatch, a large language model is used to perform reasoning analysis on the process of obtaining predicted compliance results of medical records for each symptom based on the above prompt information and taking the result matching information as the prior information of the negative example, so as to obtain the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0164] In the embodiments of this specification, when the result matching information is a mismatch, reverse reasoning analysis is performed on the reasoning process based on the result matching information, and reasoning experience knowledge for the target rule is heuristically obtained from the perspective of mismatch. This is high-quality reverse experience knowledge directly related to the target rule, which further improves the accuracy of compliance reasoning in the target field.

[0165] In an optional embodiment of the present specification, when the result matching information is not matched, based on the result matching information, reverse reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule, including the following specific steps:

[0166] In the case where the result matching information is mismatched, the mismatched result matching information is used as a negative example to perform reverse reasoning analysis on the process of obtaining the predicted compliance result to obtain the reasoning process analysis result;

[0167] Taking the unmatched result matching information as a negative example, based on the analysis results of the reasoning process, infer whether the sample example meets the target rule, and obtain an updated prediction compliance result;

[0168] Return to the step of determining result matching information based on the label compliance result and the predicted compliance result. When the result matching information is a match, determine the reasoning experience knowledge for the target rule based on the reasoning process analysis result.

[0169] The reasoning process analysis result is the analysis result of the compliance reasoning path when the predicted compliance result does not match the label compliance result during the compliance reasoning process. The reasoning process analysis result includes the identification of errors or deviations in the model reasoning process and the analysis of the reasons for the mismatched result matching information. The reasoning process analysis result is added as additional information to the new round of compliance reasoning process.

[0170] The updated predicted compliance result is the result of whether the sample examples output by the reasoning model meet the target rules based on the analysis results of the reasoning process. The updated predicted compliance result is the updated result obtained by re-inference of the compliance of the same target rule and sample example. It is the embodiment of the attempt to correct the original erroneous reasoning after the reverse reasoning analysis process. For example, a legal case in the legal field is: XX personnel performed ZZ operation on YY funds, which is in line with the legal provisions of A fund law. The initial predicted compliance result is "compliant", and the updated predicted compliance result is "non-compliant".

[0171] The methods of reasoning process analysis and compliance reasoning are described in the above-mentioned embodiments of the specification and will not be repeated here.

[0172] Based on the analysis result of the reasoning process, the reasoning experience knowledge for the target rule is determined. One optional way is to use the reasoning model to extract the reasoning experience knowledge for the target rule based on the analysis result of the reasoning process. Another optional way is to directly determine the analysis result of the reasoning process as the reasoning experience knowledge for the target rule. The two ways are not limited here.

[0173] For example, when the result matching information is not matched, the large language model is used to improve oneself through self-reflection based on the prompt information "As a medical expert, you can improve yourself through self-reflection. I will give you an example of whether the given reasoning symptom medical records meet the disease diagnosis criteria of 10 diseases. The following is a medical compliance problem. There is a mismatched result matching information. Please emphasize the most critical elements in one sentence and generate reasoning experience knowledge for 10 diseases. "Use the result matching information as prior information to perform reasoning analysis on the process of obtaining the predicted compliance results of each symptom medical record to obtain the reasoning process analysis results. Use the large language model based on the prompt information "as a Medical experts, please reason whether the symptom medical records meet the disease diagnosis criteria for 10 diseases. Please answer according to the following requirements: clearly express your judgment logic and give a clear conclusion answer: meet or not meet, answer format: predict compliance conclusion + compliance reasoning process. ", using the analysis results of the reasoning process as prior information, reason whether the sample example meets the target rule, obtain the updated predicted compliance result, return to perform the comparison of the label compliance result and the predicted compliance result, determine the result matching information, and use the large language model to extract the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases based on the analysis results of the reasoning process.

[0174] In the embodiments of this specification, when the result matching information is a mismatch, reverse iterative reasoning analysis is performed on the reasoning process based on the result matching information, and reasoning experience knowledge for the target rule is heuristically obtained from the perspective of mismatch in an iterative manner. This is high-quality reverse experience knowledge directly related to the target rule, which further improves the accuracy of compliance reasoning in the target field.

[0175] In an optional embodiment of the present specification, the result matching information includes matching; step 108 includes the following specific steps:

[0176] In the case where the result matching information is a match, the matched result matching information is used as a positive example to perform forward reasoning analysis on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

[0177] Forward reasoning analysis is to identify and understand the reasoning analysis strategy that leads to a match by forward tracing the reasoning process. Forward reasoning analysis usually involves examining the thinking path of the reasoning model in a specific case and analyzing which key elements' correct reasoning leads to the matching result matching information. For example, if the result matching information is a match, the reasoning model will forward reason and analyze the cause of the match and determine the forward reasoning experience knowledge for the target rule.

[0178] In the case where the result matching information is a match, the matched result matching information is used as a positive example, and a forward reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain the reasoning experience knowledge for the target rule. An optional method is: using the reasoning model, based on the prompt information, and taking the matched result matching information as the prior information of the positive example, a forward reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain the reasoning experience knowledge for the target rule. Optionally, the prompt information includes but is not limited to: the target domain, the prior information of the negative example, the instruction information and the output format.

[0179] Similar to the above embodiment, compliance reasoning can be completed from at least one target dimension, and then the reasoning analysis of the reasoning process can be completed with the result matching information of at least one target dimension as the prior information of the positive example to obtain reasoning experience knowledge.

[0180] For example, the prompt information in the medical field is:

[0181] "As a medical professional. (Target area)

[0182] The following are questions based on [symptom history] and [disease diagnosis criteria], and all of them are answered correctly. Please emphasize the key elements of the 2 disease diagnosis criteria in one sentence. (Instructions)

[0183] [Symptoms and medical history]{facts}

[0184] [Rule Description 1]

[0185] {rule1}

[0186] [Related question 1]

[0187] Do the symptom records {records} meet the {true_diagnosis} disease diagnosis criteria?

[0188] [Matching result matching information 1] (prior information of positive example)

[0189] {answer1}

[0190] [Rule Description 2]

[0191] {rule2}

[0192] [Related question 2]

[0193] Do the symptom records {records} meet the {false_diagnosis} disease diagnosis criteria?

[0194] [Matching result matching information 2] (prior information of positive example)

[0195] {answer2}

[0196] [[Output format]

[0197] insight: If [condition], then the <key element> element that does not meet the {true_diagnosis} disease diagnosis criteria.

[0198] <Key element> Select from ['symptoms', 'signs', 'laboratory test results', 'imaging features'] (output format)

[0199] Requirements: The generated content should be very easy to understand and concise

[0200] Compare the two disease diagnosis standards, and try to refer to the conditions of the {diagnosis} disease diagnosis standard for generation.

[0201] For another example, the prompt information of at least one target dimension in the legal field is:

[0202] "As a legal expert. (Target area)

[0203] The following are questions based on [Legal Cases] and [Legal Rules], and all of them are answered correctly. Please emphasize the key elements of the two legal rules in one sentence. (Instructions)

[0204] [Legal Case]{facts}

[0205] [Rule Description 1]

[0206] {rule1}

[0207] [Related question 1]

[0208] Does the legal case {criminals} comply with {true_charge} legal rules?

[0209] [Matching result matching information 1] (prior information of positive example)

[0210] {answer1}

[0211] [Rule Description 2]

[0212] {rule2}

[0213] [Related question 2]

[0214] Does the legal case {criminals} comply with {false_charge} legal provisions?

[0215] [Matching result matching information 2] (prior information of positive example)

[0216] {answer2}

[0217] [[Output format]

[0218] insight: If [condition], then the <key element> element of the {true_charge} rule is not met.

[0219] <key element> is selected from ['subject', 'subjective aspect', 'object', 'objective aspect'] (output format)

[0220] Requirements: The generated content should be very easy to understand and concise

[0221] When comparing two legal provisions, [conditions] should be generated as much as possible in accordance with the conditions of the {charge} legal provision."

[0222] Exemplarily, when the result matching information is a match, a large language model is used to perform reasoning analysis on the process of obtaining predicted compliance results for each symptom case based on the above prompt information and the result matching information as the prior information of the positive example, so as to obtain the reasoning experience knowledge of the disease diagnosis criteria for 10 common diseases.

[0223] In the embodiments of this specification, when the result matching information is a match, forward reasoning analysis is performed on the reasoning process based on the result matching information, and reasoning experience knowledge for the target rule is obtained heuristically from the perspective of matching. This is high-quality forward experience knowledge directly related to the target rule, which further improves the accuracy of compliance reasoning in the target field.

[0224] In an optional embodiment of the present specification, the result matching information includes matches and mismatches; step 104 includes the following specific steps:

[0225] Taking the matching result information as the positive example and the mismatching result information as the negative example, a two-way reasoning analysis is performed on the process of obtaining the predicted compliance result to generate reasoning experience knowledge for the target rule.

[0226] Bidirectional reasoning analysis is a strategy for identifying and understanding the reasoning analysis that leads to matching by bidirectionally tracing the reasoning process. Bidirectional reasoning analysis usually involves examining the thinking path of the reasoning model in a specific case, analyzing which key elements' correct reasoning leads to matching result matching information and which key elements' incorrect reasoning leads to mismatching result matching information. For example, if the result matching information includes matching and mismatching, the reasoning model will analyze the reasons for matching and mismatching respectively through bidirectional reasoning, and determine the bidirectional reasoning experience knowledge for the target rule.

[0227] Taking the matching result matching information as a positive example and the non-matching result matching information as a negative example, a two-way reasoning analysis is performed on the process of obtaining the predicted compliance result to generate reasoning experience knowledge for the target rule. An optional method is: using the reasoning model, based on the prompt information, taking the matching result matching information as a positive example and the non-matching result matching information as a negative example, a two-way reasoning analysis is performed on the process of obtaining the predicted compliance result to generate reasoning experience knowledge for the target rule. Optionally, the prompt information includes but is not limited to: target domain, prior information of positive examples, prior information of negative examples, instruction information and output format.

[0228] Similar to the above embodiment, compliance reasoning can be completed from at least one target dimension, and then the result matching information of the match of at least one target dimension is used as the prior information of the positive example, and the result matching information of the mismatch of at least one target dimension is used as the prior information of the negative example, to complete the reasoning analysis of the reasoning process and obtain reasoning experience knowledge.

[0229] For example, the prompt information in the medical field is:

[0230] "As a healthcare professional (target area), you can improve yourself through self-reflection.

[0231] I will give you a previous attempt to answer an inference question given a [symptom history] and [disease diagnostic criteria].

[0232] The following is a medical compliance question. There is a mismatched result matching information and a matched result matching information. Please emphasize the key elements in one sentence. (Indicative information)

[0233] Here is the example:

[0234] [Rule Description]

[0235] {rule}

[0236] [Symptom history]

[0237] {fact}

[0238] [Related Questions]

[0239] Do the symptom records meet the diagnostic criteria of the disease?

[0240] [Mismatched result matching information] (prior information of negative examples)

[0241] {false_trial}

[0242] [Matching result matching information] (prior information of positive example)

[0243] {true_trial}

[0244] [Output format]

[0245] If xx, then the {element} element (output format) does not meet the {diagnosis} disease diagnosis criteria."

[0246] For another example, the prompt information in the legal field is:

[0247] "As a legal professional (target area), you can improve yourself through self-reflection.

[0248] I will give you a previous attempt to answer the reasoning question given a [legal case] and a [legal rule].

[0249] The following is a legal compliance question. There is a mismatched result and a matched result. Please emphasize the key elements in one sentence. (Indicative information)

[0250] Here is the example:

[0251] [Rule Description]

[0252] {rule}

[0253] [Legal Case]

[0254] {fact}

[0255] [Related Questions]

[0256] Do the legal cases {criminals} meet {charge} {element} of the legal rules?

[0257] [Mismatched result matching information] (prior information of negative examples)

[0258] {false_trial}

[0259] [Matching result matching information] (prior information of positive example)

[0260] {true_trial}

[0261] [Output format]

[0262] If xx, then the {element} element (output format) of the {charge} rule is not met."

[0263] Exemplarily, a large language model is used, based on the above prompt information, with the matching result matching information as the positive example and the mismatching result matching information as the negative example, to perform reasoning analysis on the process of obtaining the predicted compliance results of each symptom medical record, and obtain the reasoning experience knowledge of the disease diagnosis standards for 10 common diseases.

[0264] In the embodiments of this specification, a bidirectional reasoning analysis is performed on the reasoning process based on the result matching information, and reasoning experience knowledge for the target rules is heuristically obtained from the perspectives of matching and mismatching, respectively. This is high-quality bidirectional experience knowledge directly related to the target rules, which further improves the accuracy of compliance reasoning in the target field.

[0265] In an optional embodiment of the present specification, before step 110, the following specific steps are also included:

[0266] For the reasoning experience knowledge of any target rule, repeated reasoning experience knowledge is screened.

[0267] An example of repeated inferential experiential knowledge in the legal field is: for Article A on funding, one piece of inferential experiential knowledge is "If the personnel is not "XX personnel", it does not comply with the legal provisions of Article A on funding", and another piece of inferential experiential knowledge is "If the personnel is not "personnel of the XX department", it does not comply with the legal provisions of Article A on funding". Both are repeated inferential experiential knowledge.

[0268] For the reasoning experience knowledge of any target rule, the repeated reasoning experience knowledge is screened out. One optional method is to screen out the repeated reasoning experience knowledge based on the semantic similarity of the reasoning experience knowledge of any target rule. Another optional method is to use the reasoning model and the prompt information to screen out the repeated reasoning experience knowledge for any target rule. The two methods are not limited here. For example, the prompt information is:

[0269] "You are a filter of inference experience knowledge, able to filter the inference experience knowledge in the knowledge base.

[0270] [Insights knowledge base]

[0271] {insight_from_knowledge_base} / JSON Format /

[0272] Screening requirements

[0273] 1. Check the semantic correctness of inferred empirical knowledge

[0274] 2. Filter and remove duplicate reasoning experience knowledge

[0275] 3. Do not change the original expression of any inferred empirical knowledge

[0276] 4. Returns the same json format as [Insights knowledge base]".

[0277] Exemplarily, a large language model is used to screen repeated inference experience knowledge of disease diagnostic criteria for any common disease based on the above prompt information.

[0278] In the embodiments of this specification, repeated reasoning experience knowledge is screened to ensure that the knowledge base constructed subsequently is refined and effective.

[0279] Figure 2 A schematic diagram of a knowledge base construction method provided by an embodiment of this specification is shown. Figure 2 As shown:

[0280] Using the inference model, it is inferred whether the sample example complies with the target rule under at least one target dimension, and a predicted compliance result of at least one target dimension is obtained.

[0281] Compare the label compliance results and the predicted compliance results of each target dimension to determine the result matching information of each target dimension, wherein the result matching information includes matching result matching information and non-matching result matching information.

[0282] When the result matching information is mismatched, the inference model is used to analyze the results of the inference process to determine whether the sample example complies with the target rule under at least one target dimension, and to obtain an updated prediction compliance result.

[0283] Return to the step of determining result matching information based on the label compliance result and the predicted compliance result. When the result matching information is a match, determine the reasoning experience knowledge for the target rule based on the reasoning process analysis result.

[0284] When the result matching information is a match, the reasoning model is used to perform forward reasoning analysis on the process of obtaining the predicted compliance result based on the result matching information to obtain reasoning experience knowledge for the target rule.

[0285] For the reasoning experience knowledge of any target rule, repeated reasoning experience knowledge is screened.

[0286] Integrate the reasoning experience knowledge for each target rule and build a knowledge base for compliance reasoning in the target field.

[0287] See also Figure 3 , Figure 3 A flowchart of a compliance reasoning method provided by an embodiment of this specification is shown, including the following specific steps:

[0288] Step 302: Obtain target rules and target examples of the target domain.

[0289] The embodiments of this specification are applied to a website, application or platform with compliance reasoning. Optionally, a reasoning model is deployed on the backend of the website, application or platform. Optionally, an application calls the application, website or platform of the reasoning model through an application programming interface (Application Programming Interface, API for short).

[0290] The target domain is a knowledge domain with specific rules, such as the medical field and the legal field.

[0291] The target rules are the standards or criteria used to determine compliance within the target domain, and serve as the basis for compliance reasoning.

[0292] Sample examples are specific instances in the target domain that need to be judged for compliance, and serve as the reasoning objects of compliance reasoning.

[0293] One optional way to obtain the target rules and target examples of the target domain is to receive the target rules and target examples of the target domain sent by the terminal device, and another optional way is to obtain the target rules and target examples of the target domain from a database of the target domain. The two ways are not limited here.

[0294] Exemplarily, the disease diagnosis criteria and symptom medical records of 10 common cardiovascular diseases in the medical field sent by the receiving terminal device.

[0295] Obtaining target rules and target examples in the target field provides reasoning basis and reasoning objects for subsequent compliance reasoning.

[0296] Step 304: Retrieve reasoning experience knowledge for the target rule from a knowledge base for compliance reasoning in the target domain, wherein the knowledge base is pre-constructed according to the above-mentioned knowledge base construction method.

[0297] The knowledge base is an empirical knowledge database used for compliance reasoning in the target domain. It stores reasoning empirical knowledge for each target rule. In the compliance reasoning process, if you need to infer whether a certain example complies with a certain target rule, you can retrieve the reasoning empirical knowledge for the target rule from the knowledge base as supplementary information to complete high-quality retrieval enhancement generation and achieve high-accuracy compliance reasoning in the target domain.

[0298] The reasoning experience knowledge for the target rule is the heuristic experience knowledge determined by analysis on how to correctly reason whether an example complies with the target rule. The reasoning experience knowledge is the prior knowledge of compliance reasoning. Since the reasoning experience knowledge is obtained heuristically, the reasoning experience knowledge is high-quality experience knowledge directly related to the target rule.

[0299] Retrieving reasoning experience knowledge for target rules from the knowledge base used for compliance reasoning in the target domain, one optional way is: based on the keywords of the target rules, retrieving reasoning experience knowledge for target rules from the knowledge base used for compliance reasoning in the target domain, another optional way is: based on the semantic similarity of the target rules, retrieving reasoning experience knowledge for target rules from the knowledge base used for compliance reasoning in the target domain. There is no limitation on the two ways.

[0300] Exemplarily, based on the keywords of the disease diagnosis standards of 10 common diseases, reasoning experience knowledge of the disease diagnosis standards for 10 common diseases is retrieved from a knowledge base used for compliance reasoning in the medical field.

[0301] By retrieving the reasoning experience knowledge for the target rules, it provides a reference for subsequent compliance reasoning and improves the reasoning ability of compliance reasoning.

[0302] Step 306: Based on the reasoning experience knowledge, reason whether the target example complies with the target rule to obtain a target compliance result.

[0303] The target compliance result is the result of whether the target example output by the reasoning model conforms to the target rule based on the reasoning experience knowledge.

[0304] Based on the reasoning experience knowledge, it is inferred whether the target example complies with the target rule to obtain the target compliance result. An optional way is: using the reasoning model, based on the reasoning experience knowledge, it is inferred whether the target example complies with the target rule to obtain the target compliance result.

[0305] Furthermore, the reasoning model is used to infer whether the target example complies with the target rules based on the reasoning experience knowledge, and the target compliance result is obtained. An optional method is: using the reasoning model, based on the prompt information, using the reasoning experience knowledge as prior knowledge, to infer whether the target example complies with the target rules and obtain the target compliance result.

[0306] Exemplarily, a large language model is used to infer whether the symptom medical record meets the disease diagnosis criteria of the 10 common diseases based on prompt information and the prior knowledge of the inference experience of the disease diagnosis criteria of the 10 common diseases to obtain the target diagnosis result.

[0307] In the embodiments of the present specification, reasoning experience knowledge for target rules is retrieved from a knowledge base that includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field. Based on the reasoning experience knowledge, it is inferred whether the target example complies with the target rule, and the target compliance result is obtained, which effectively improves the accuracy of compliance reasoning in the target field.

[0308] In an optional embodiment of the present specification, after step 304, the following specific steps are also included:

[0309] In the case where no reasoning experience knowledge for the target rule is retrieved, based on the semantic similarity of the target rule, the reasoning experience knowledge for similar rules is retrieved, wherein the semantic similarity between the similar rule and the target rule exceeds a preset similarity threshold;

[0310] Based on the reasoning experience knowledge for similar rules, the reasoning experience knowledge for the target rule is generated.

[0311] The semantic similarity of the target rules is the degree of semantic similarity between two rules in the semantic space. The semantic similarity of the target rules can be calculated using natural language processing techniques such as word embedding, semantic vectors, or deep learning models.

[0312] Similar rules are knowledge domains in the target domain that have high semantic similarity with the target rule. For example, the target rule is A capital law, and the similar rule is B capital law.

[0313] The reasoning experience knowledge for similar rules is the heuristic experience knowledge determined through analysis on how to correctly reason whether an example complies with similar rules. The reasoning experience knowledge for similar rules is the few-shot prior knowledge of compliance reasoning. For example, if the person is not "XX person", it does not comply with the legal rules of B capital law.

[0314] Based on the reasoning experience knowledge for similar rules, the reasoning experience knowledge for the target rule is generated. An optional way is to use the reasoning model to generate the reasoning experience knowledge for the target rule based on the reasoning experience knowledge for similar rules.

[0315] Furthermore, the reasoning model is used to generate the reasoning experience knowledge for the target rule based on the reasoning experience knowledge for similar rules. An optional method is to use the reasoning model based on prompt information and take the reasoning experience knowledge for similar rules as prior knowledge to generate the reasoning experience knowledge for the target rule.

[0316] Optionally, after generating reasoning experience knowledge for the target rule based on reasoning experience knowledge for similar rules, step 306 may be performed to implement compliance reasoning.

[0317] Exemplarily, when the inference experience knowledge of disease diagnosis standards for 10 common diseases is not retrieved, based on the semantic similarity of the disease diagnosis standards for the 10 common diseases, the inference experience knowledge of disease diagnosis standards for another uncommon disease is retrieved, and by using a large language model, based on prompt information, and taking the inference experience knowledge of disease diagnosis standards for uncommon diseases as prior knowledge, the inference experience knowledge of disease diagnosis standards for 10 common diseases is generated.

[0318] In the embodiments of this specification, the accuracy and generalization ability of compliance reasoning are improved by utilizing the reasoning experience knowledge of similar rules.

[0319] Taking the legal field as an example, Figure 1 The embodiment of the knowledge base construction method is further illustrated. Figure 4 A flowchart of a method for constructing a legal knowledge base provided by an embodiment of this specification is shown, including the following specific steps:

[0320] Step 402: Obtain at least one set of legal provisions, sample cases, and label compliance results in the legal field, wherein the label compliance results are marked with whether the sample cases comply with the legal provisions.

[0321] The embodiments of this specification are applied to a website, application or platform with the function of building a legal knowledge base.

[0322] For example, the legal rule in the legal field is: "The crime of misappropriation of specific funds refers to the act of a person with a specific identity, taking advantage of the convenience of his or her position, arbitrarily using specific funds for personal affairs, illegal activities, or investing in profit-making projects, and occupying large amounts of funds for a long time beyond the prescribed period without permission. The subject of this crime is a person with a specific identity, who is usually in a position to access and manage specific funds. On the subjective level, the criminal act is based on direct intent, that is, the perpetrator is aware of the nature of the funds and intentionally does so, and his or her main intention is to improperly possess the right to use the funds. The criminal motive does not affect the establishment of the crime. Regardless of the reason for misappropriation of funds, it constitutes a crime. The main object of this act is the management order and use rights of specific funds. Specific funds include but are not limited to the ownership of public institutions, enterprises, social charity funds or private property in the circulation state of public institutions. In addition, the ownership of funds of non-public companies, enterprises and other organizations may also become the object of infringement. Objective behavioral characteristics include: (1) transferring specific funds to personal control without due process; (2) taking advantage of the convenience of the position to carry out the above-mentioned acts; (3) The specific funds are used for personal purposes, which is not limited to the use of the embezzler himself, but also includes the use of the embezzler by others. "

[0323] For example, a sample case in the legal field is: "Sample case [{'true_charge': 'A funding law', 'confusing_charge': 'A funding law'}, {'fact': 'In a certain area, a XX person, who was the head of the local social security office, was responsible for managing a new social insurance program. The program involved collecting fees from participants and ensuring that these fees were deposited into the corresponding accounts on time. However, due to his personal bad habits, X had the idea of ​​embezzling the fees. XX gradually embezzled the fees he was responsible for managing, mainly to satisfy his personal hobbies and repay the debts incurred. Some participants found that their insurance accounts had interrupted payments and began to question XX's management behavior. Faced with the questioning, XX tried to cover it up with various reasons and re-used part of the embezzled fees to pay the insured personnel's expenses to cover up his behavior. As more payment interruptions were revealed, XX was required by the superior department to make up for the interrupted insurance payments. To this end, X made up for the fees by borrowing money. However, XX was investigated. After investigation, it was confirmed that XX used his position to embezzle funds for personal purposes, which constituted a serious violation of the law. The evidence provided by the prosecution included XX's position certificate, relevant financial records, the payment list of the insured personnel, the record of the supplementary payment, and the statements of multiple witnesses. In the end, XX was found guilty of the A fund law.}}]"

[0324] For the specific method, please refer to the content of step 102 above, which will not be repeated here.

[0325] Obtaining group legal rules and sample cases provides the basis and object of reasoning for subsequent compliance reasoning, and obtaining label compliance results provides a reference standard for subsequent evaluation of compliance reasoning.

[0326] Step 404: Reason whether the sample case complies with the law and obtain a predicted compliance result.

[0327] An optional way to infer whether sample cases comply with legal rules and obtain predicted compliance results is to use a reasoning model to infer whether sample cases comply with legal rules and obtain predicted compliance results.

[0328] Exemplarily, the predicted compliance result is compliant.

[0329] For the specific method, please refer to the content of the above step 104, which will not be repeated here.

[0330] By using the reasoning model, we can infer whether the sample cases comply with the laws and regulations and obtain the predicted compliance results, which provides prior information for the subsequent heuristic acquisition of reasoning experience knowledge.

[0331] Step 406: Based on the label compliance results, perform reasoning analysis on the process of obtaining the predicted compliance results to obtain reasoning experience knowledge for the legal rules.

[0332] An optional approach is to use a reasoning model to perform reasoning analysis on the process of obtaining predicted compliance results based on label compliance results, and obtain reasoning experience knowledge for legal rules.

[0333] Another optional method is to determine the result matching information based on the label compliance results and the predicted compliance results, and use the reasoning model to perform reasoning analysis on the process of obtaining the predicted compliance results based on the result matching information to obtain reasoning experience knowledge for the legal rules.

[0334] For example, the result matching information is not matched. The reasoning experience knowledge for the legal rules is: if the person is not "XX person", it does not meet the legal rules of the A fund law.

[0335] For the specific method, please refer to the content of the above step 106, which will not be repeated here.

[0336] Based on the label compliance results, the reasoning process is analyzed and the reasoning experience knowledge for legal provisions and rules is heuristically obtained. This is high-quality experience knowledge directly related to legal provisions and rules, and provides an experience knowledge foundation for the subsequent construction of a legal knowledge base.

[0337] Step 408: Integrate the reasoning experience knowledge for each legal rule to build a legal knowledge base for compliance reasoning in the legal field.

[0338] The legal knowledge base is an empirical knowledge database used for compliance reasoning in the legal field. It stores reasoning empirical knowledge for each legal rule according to each legal rule. In the compliance reasoning process, if you need to infer whether a case complies with a certain legal rule, you can retrieve the reasoning empirical knowledge for the legal rule from the knowledge base as supplementary information to complete high-quality retrieval enhancement generation and achieve high-accuracy compliance reasoning in the legal field.

[0339] For the specific method, please refer to the content of the above step 110, which will not be repeated here.

[0340] In the embodiments of this specification, after reasoning whether a sample case complies with the legal rules, the reasoning process is analyzed based on the label compliance results, and reasoning experience knowledge for the legal rules is heuristically obtained. This is high-quality experience knowledge directly related to the legal rules. The reasoning experience knowledge for each legal rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field, which effectively improves the accuracy of compliance reasoning in the legal field.

[0341] Taking at least one legal dimension in the legal field as an example, Figure 1 The embodiment of the knowledge base construction method is further illustrated. Figure 5 A flowchart of another method for constructing a legal knowledge base provided by an embodiment of this specification is shown.

[0342] Step 502: Obtain label compliance results of at least one set of legal rules, sample cases and at least one legal dimension in the legal field, wherein the label compliance results of at least one legal dimension are marked with whether the sample case complies with the legal rules under at least one legal dimension, and the legal dimension includes subject dimension, object dimension, subjective aspect dimension and objective aspect dimension.

[0343] The embodiments of this specification are applied to a website, application or platform with the function of building a legal knowledge base.

[0344] The legal dimension is the dimension used in the compliance reasoning process to determine whether a case complies with legal provisions. At least one legal dimension is used to decompose compliance reasoning, complete more detailed and comprehensive compliance reasoning, ensure the multi-facetedness and integrity of the reasoning process, and thus ensure the accuracy of the reasoning results. The legal dimension includes the subject dimension, the object dimension, the subjective aspect dimension, and the objective aspect dimension.

[0345] The subject dimension is the subject in the sample case, that is, the identity and status of the individual or organization involved in the case. The subject dimension helps determine whether the responsible person or beneficiary in the sample case meets the requirements of specific legal provisions. In legal compliance reasoning, the subject dimension considers who is the executor of the behavior and whether the identity of the executor meets the specific conditions stipulated by the law. The object dimension is the object or asset involved in the sample case, that is, the object of the legal act. The object dimension helps determine whether the property or rights in the sample case meet the requirements of specific legal rules. The object dimension considers what the object of the legal act is, such as money, property or other resources. These objects may need to meet certain conditions to be considered as the object in the case. The subjective dimension is the psychological state or motivation of the subject in the sample case, that is, the intention or purpose of the actor. The subjective dimension helps determine whether the subject in the sample case intentionally violates the legal rules. The subjective dimension considers the psychological state of the actor, such as whether it is intentional or negligent. In many cases, intentional crimes and negligent crimes will have different legal responsibilities. The objective dimension is the actual behavior in the sample case, that is, the behavior carried out by the actor and its consequences. The objective dimension helps determine whether the behavior in the sample case meets the requirements of a specific legal rule. The objective dimension considers the behavior itself, including the manner, means and results of the behavior. These behaviors need to meet certain legal standards to constitute a crime or violation.

[0346] The label compliance result of the legal dimension indicates whether the sample case complies with the target legal rule in the legal dimension, including: compliance and non-compliance, which serves as a reference standard for compliance reasoning in the legal dimension and is used to evaluate the accuracy of compliance reasoning in the legal dimension. The label compliance result is annotated with whether the sample case complies with the target legal rule in the legal dimension. For example, in the legal field, whether the subject of a sample case complies with the case judgment of the subject of a certain legal rule.

[0347] For the specific method, please refer to the content of the above step 102 or step 402, which will not be repeated here.

[0348] Obtaining group legal rules and sample cases provides the basis and object of reasoning for subsequent compliance reasoning, and obtaining label compliance results provides a reference standard for subsequent evaluation of compliance reasoning.

[0349] Step 504: Using the reasoning model corresponding to each legal dimension, based on the prompt information of each legal dimension, reason whether the sample case complies with the legal rules under each legal dimension, and obtain the predicted compliance result of at least one legal dimension.

[0350] The reasoning model corresponding to the legal dimension is a deep learning model that has the function of reasoning whether a case complies with legal provisions under the legal dimension. The reasoning model sorts out the logical relationship of the case through semantic understanding, and infers whether the case complies with legal provisions based on the logical relationship, and outputs the predicted compliance result. Reasoning models include but are not limited to: large language models, models based on deep self-attention models, and models based on generative adversarial networks (GAN).

[0351] The prompt information of the legal dimension is the paradigm information that uses natural language to guide or inspire the reasoning model to perform compliance reasoning under the legal dimension, and is used to guide the reasoning model to focus on the key elements of the legal dimension, so as to more accurately reason whether the sample case complies with the established legal rules under at least one legal dimension. The prompt information may include guidance on reasoning logic, key element identification, reasoning path, etc., to ensure that the model can follow the correct reasoning path and make reasonable judgments during the reasoning process. By setting the prompt information of the legal dimension, multiple first reasoning sub-models as automatic planning agents are specifically responsible for solving the sub-tasks of compliance reasoning in the corresponding legal dimension. Optionally, the prompt information includes but is not limited to: target field, at least one legal dimension, instruction information and output format.

[0352] The predicted compliance result of the legal dimension is the result of whether the output sample case complies with the legal provisions and rules under the legal dimension, including the predicted compliance conclusion and compliance reasoning process under the legal dimension, where the predicted compliance conclusion under the legal dimension is the conclusion of whether the sample complies with the rules under the legal dimension based on the logical relationship prediction of the example. The predicted compliance results under the legal dimension include: compliance and non-compliance. The compliance reasoning process under the legal dimension is the process record of compliance reasoning before the predicted compliance conclusion is obtained, involving how the reasoning model interprets the information of the sample case under the legal dimension, extracts key elements, matches the legal provisions and rules, and forms a logically coherent reasoning chain. For example, the sample case in the legal field is: XX personnel performed ZZ operation on YY funds, which is consistent with the legal provisions and rules of A fund legal provisions under the subject dimension. Therefore, in the reasoning process, the reasoning model will extract the key element "XX personnel" and finally obtain the predicted compliance result of "compliance" (that is, it meets the standards of the legal provisions and rules of A fund legal provisions under the subject dimension).

[0353] For the specific method, please refer to the content of the embodiment of at least one dimension mentioned above, which will not be repeated here.

[0354] By guiding the reasoning model through prompt information from multiple legal dimensions to focus on key elements, compliance reasoning is performed meticulously and comprehensively, providing higher accuracy prior information for the subsequent heuristic acquisition of reasoning experience knowledge.

[0355] Step 506: Based on the label compliance result of at least one legal dimension, perform reasoning analysis on the process of obtaining the predicted compliance result of at least one legal dimension to obtain reasoning experience knowledge for legal provisions and rules.

[0356] For the specific method, please refer to the content of the embodiment of at least one dimension mentioned above, which will not be repeated here.

[0357] Compliance reasoning is broken down into sub-tasks under at least one legal dimension, and the reasoning analysis of the reasoning process is completed from at least one legal dimension. The reasoning experience knowledge for legal rules is obtained in a detailed, comprehensive and heuristic manner, providing data support for predicting compliance results.

[0358] Step 508: Integrate the reasoning experience knowledge for each legal rule to build a legal knowledge base for compliance reasoning in the legal field.

[0359] For the specific method, please refer to the content of the above step 108 or step 408, which will not be repeated here.

[0360] In the embodiments of this specification, the reasoning model corresponding to each legal dimension is used to infer whether the sample case complies with the legal rules from at least one legal dimension based on the prompt information of each legal dimension. Then, based on the label compliance result, the reasoning process is analyzed to obtain the reasoning experience knowledge for the legal rules in a detailed, comprehensive and heuristic manner. This is high-quality experience knowledge directly related to the legal rules. The knowledge base constructed by integrating the reasoning experience knowledge for each legal rule includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field, which effectively improves the accuracy of compliance reasoning in the legal field.

[0361] Figure 6 A schematic diagram showing the principle of a method for constructing a legal knowledge base provided by an embodiment of this specification is shown as follows: Figure 6 As shown:

[0362] 1. Automatically plan disassembly tasks:

[0363] Automatically plan legal rules and sample cases.

[0364] 2. Assign subtask expert roles:

[0365] The compliance reasoning task in the legal field is divided into subtask sets in four legal dimensions: subject, object, subjective aspect and objective aspect. Using the reasoning model, the sample case is reasoned whether it complies with the legal rules in at least one legal dimension, and the predicted compliance result of at least one legal dimension is obtained. The label compliance results and predicted compliance results of each legal dimension are compared to determine the result matching information of each legal dimension.

[0366] 3. Inspirational training on legal provisions and rules:

[0367] Obtain the analysis results of the reasoning process, obtain reasoning experience knowledge from the matching and non-matching result matching information, filter the reasoning experience knowledge, and build a legal knowledge base. Perform compliance reasoning in the legal field based on the reasoning experience knowledge.

[0368] Taking the legal field as an example, Figure 1 The compliance reasoning method is further illustrated by an embodiment of the present invention. Figure 7 A flowchart of a compliance reasoning method in the legal field provided by an embodiment of this specification is shown, including the following specific steps:

[0369] Step 702: Obtain target legal provisions and cases in the legal field.

[0370] The embodiments of this specification are applied to a website, application or platform with compliance reasoning in the legal field. Optionally, a reasoning model is deployed on the backend of the website, application or platform. Optionally, an application calls the application, website or platform of the reasoning model through an application programming interface (Application Programming Interface, API for short).

[0371] For target laws, rules and cases in the legal field, please refer to the above Figure 4 The specific method is shown in the above step 302, which will not be described in detail here.

[0372] Obtaining target legal provisions, rules and cases in the legal field provides a basis for reasoning and an object for reasoning for subsequent compliance reasoning in the legal field.

[0373] Step 704: Retrieve reasoning experience knowledge for target legal provisions from a knowledge base for compliance reasoning in the legal field, wherein the knowledge base is pre-constructed according to the above-mentioned legal knowledge base construction method.

[0374] For the reasoning experience knowledge of the target legal rules, see the above Figure 4 The specific method is shown in the above step 304, which will not be described here.

[0375] By retrieving the reasoning experience knowledge for the target legal provisions and rules, it provides a reference for the subsequent compliance reasoning in the legal field and improves the reasoning ability of compliance reasoning in the legal field.

[0376] Step 706: Based on the reasoning experience knowledge, reason whether the target case complies with the target legal provisions and rules, and obtain the target compliance result.

[0377] For the reasoning experience knowledge of the target legal rules, see the above Figure 4 The specific method is shown in the above step 306, which will not be described in detail here.

[0378] In the embodiments of the present specification, reasoning experience knowledge for target legal provisions and rules is retrieved from a knowledge base that includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field. Based on the reasoning experience knowledge, it is inferred whether the target case complies with the target legal provisions and rules, and the target compliance result is obtained, which effectively improves the accuracy of compliance reasoning in the legal field.

[0379] Corresponding to the above method embodiment, this specification also provides a task platform embodiment, Figure 8 FIG. 1 shows a schematic diagram of a task platform provided by an embodiment of the present specification. Figure 8 As shown, the task platform includes a first request interface 802 and a first response unit 804;

[0380] A first request interface 802 is used to receive a knowledge base construction request sent by a first terminal device, wherein the knowledge base construction request includes at least one set of target rules, sample examples, and label compliance results in a target field, and the label compliance results are marked with whether the sample examples comply with the target rules;

[0381] The first response unit 804 is used to infer whether the sample example complies with the target rule, obtain the predicted compliance result, perform reasoning analysis on the process of obtaining the predicted compliance result based on the label compliance result, obtain reasoning experience knowledge for the target rule, integrate the reasoning experience knowledge for each target rule, and build a knowledge base for compliance reasoning in the target field;

[0382] The first request interface 802 is also used to feed back the knowledge base to the first terminal device.

[0383] The first request interface 802 is an interface module in the task platform responsible for receiving a knowledge base construction request sent from the first terminal device. The interface is designed to process and parse the received request and feed back the knowledge base output by the first response unit 804.

[0384] The first response unit 804 is the core processing module in the task platform responsible for executing the knowledge base construction request. It analyzes whether the sample example complies with the target rule, compares the predicted compliance result with the label compliance result, extracts the reasoning experience knowledge from it, and integrates this knowledge to build the knowledge base.

[0385] The first terminal device is the user device that initiates the knowledge base construction request. It can be any hardware that can connect to the task platform and send data, such as a computer, smartphone, tablet computer, or dedicated workstation. The first terminal device is usually owned and operated by professionals or institutions that need to build a knowledge base. They provide the necessary data and rules to trigger the knowledge base construction process.

[0386] In the embodiments of this specification, the task platform automatically performs reasoning analysis on the reasoning process based on the label compliance results after inferring whether the sample examples comply with the target rules in an interactive manner, and heuristically obtains reasoning experience knowledge for the target rules, which is high-quality experience knowledge directly related to the target rules. The reasoning experience knowledge for each target rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field, effectively improving the accuracy of compliance reasoning in the target field and meeting the knowledge base construction needs of end users.

[0387] The above is a schematic scheme of a task platform of this embodiment. It should be noted that the technical scheme of the task platform and the technical scheme of the above-mentioned knowledge base construction method belong to the same concept, and the details of the technical scheme of the task platform that are not described in detail can be found in the description of the technical scheme of the above-mentioned knowledge base construction method.

[0388] Corresponding to the above method embodiment, this specification also provides a task platform embodiment, Fig. 9 FIG. 2 shows a schematic diagram of the structure of another task platform provided by an embodiment of this specification. Fig. 9 As shown, the task platform includes a second request interface 902 and a second response unit 904;

[0389] A second request interface 902, configured to receive a compliance reasoning request sent by a second terminal device, wherein the compliance reasoning request includes a target rule and a target example of a target domain;

[0390] The second response unit 904 is used to retrieve reasoning experience knowledge for a target rule from a knowledge base for compliance reasoning in a target field, and to reason whether a target example complies with the target rule based on the reasoning experience knowledge, so as to obtain a target compliance result, wherein the knowledge base is pre-constructed according to the above-mentioned knowledge base construction method;

[0391] The second request interface 902 is also used to feed back the target compliance result to the second terminal device.

[0392] The second request interface 902 is an interface module in the task platform responsible for receiving the compliance reasoning request sent from the second terminal device. The interface is designed to process and parse the received request and feedback the target compliance result output by the second response unit 904.

[0393] The second response unit 904 is the core processing module in the task platform responsible for executing compliance reasoning requests. It retrieves reasoning experience knowledge related to the target rule from the pre-built knowledge base, and then uses the reasoning model to evaluate whether the target example complies with the target rule based on this experience knowledge, thereby obtaining the target compliance result.

[0394] The second terminal device is a user device that sends a compliance reasoning request to the task platform. It can be any electronic device that can connect to the Internet and has the function of sending and receiving data, such as a personal computer, a smart phone, or a professional software client.

[0395] In the embodiments of the present specification, the task platform automatically retrieves reasoning experience knowledge for target rules from a knowledge base that includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field in an interactive manner, and based on the reasoning experience knowledge, it infers whether the target example complies with the target rule and obtains the target compliance result, thereby effectively improving the accuracy of compliance reasoning in the target field and meeting the compliance reasoning needs of end users.

[0396] The above is a schematic scheme of a task platform of this embodiment. It should be noted that the technical scheme of the task platform and the technical scheme of the above-mentioned compliance reasoning method belong to the same concept, and the details not described in detail in the technical scheme of the task platform can be referred to the description of the technical scheme of the above-mentioned compliance reasoning method.

[0397] Corresponding to the above method embodiment, this specification also provides a knowledge base construction device embodiment, the device comprising:

[0398] A first acquisition module is configured to acquire at least one set of target rules, sample examples, and label compliance results in a target domain, wherein the label compliance results are annotated with whether the sample examples comply with the target rules;

[0399] A first reasoning module is configured to reason whether the sample example complies with the target rule and obtain a predicted compliance result;

[0400] A first analysis module is configured to perform reasoning analysis on a process of obtaining a predicted compliance result based on the label compliance result, and obtain reasoning experience knowledge for a target rule;

[0401] The first building module is configured to integrate the reasoning experience knowledge for each target rule and build a knowledge base for compliance reasoning in the target domain.

[0402] Optionally, the label compliance result includes the label compliance result of at least one target dimension, and the label compliance result of at least one target dimension is marked with whether the sample example complies with the target rule under at least one target dimension; correspondingly, the first reasoning module is further configured to: use the first reasoning model to infer whether the sample example complies with the target rule under at least one target dimension, and obtain the predicted compliance result of at least one target dimension; correspondingly, the first analysis module is further configured to: use the second reasoning model, based on the label compliance result of at least one target dimension, to perform reasoning analysis on the process of obtaining the predicted compliance result of at least one target dimension, and obtain reasoning experience knowledge for the target rule.

[0403] Optionally, the first reasoning model includes at least one first reasoning sub-model corresponding to the target dimension; correspondingly, the first reasoning module is further configured to: use each first reasoning sub-model, based on the prompt information of each target dimension, to infer whether the sample example complies with the target rule under each target dimension, and obtain the predicted compliance result of at least one target dimension.

[0404] Optionally, the first analysis module is further configured to: in the case where the result matching information is a mismatch, use the mismatched result matching information as a negative example, perform reverse reasoning analysis on the process of obtaining the predicted compliance result, and obtain reasoning experience knowledge for the target rule.

[0405] Optionally, the first analysis module is further configured to: in the case where the result matching information is a mismatch, take the mismatched result matching information as a negative example, perform reverse reasoning analysis on the process of obtaining the predicted compliance result, and obtain the reasoning process analysis result; take the mismatched result matching information as a negative example, and based on the reasoning process analysis result, infer whether the sample example complies with the target rule to obtain an updated predicted compliance result; return to execute the step of determining the result matching information based on the label compliance result and the predicted compliance result, and in the case where the result matching information is a match, determine the reasoning experience knowledge for the target rule based on the reasoning process analysis result.

[0406] Optionally, the first analysis module is further configured to: when the result matching information is a match, use the matched result matching information as a positive example, perform forward reasoning analysis on the process of obtaining the predicted compliance result, and obtain reasoning experience knowledge for the target rule.

[0407] Optionally, the first analysis module is further configured to: use the matching result matching information as a positive example and the unmatched result matching information as a negative example, perform a bidirectional reasoning analysis on the process of obtaining the predicted compliance result, and obtain reasoning experience knowledge for the target rule.

[0408] Optionally, the device further includes: a first screening module configured to screen repeated reasoning experience knowledge for any target rule's reasoning experience knowledge.

[0409] In the embodiments of the present specification, after reasoning whether a sample example complies with the target rule, the reasoning process is analyzed based on the label compliance result, and reasoning experience knowledge for the target rule is heuristically obtained, which is high-quality experience knowledge directly related to the target rule. The reasoning experience knowledge for each target rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field, effectively improving the accuracy of compliance reasoning in the target field.

[0410] The above is a schematic scheme of a knowledge base construction device of this embodiment. It should be noted that the technical scheme of the knowledge base construction device and the technical scheme of the above-mentioned knowledge base construction method belong to the same concept, and the details not described in detail in the technical scheme of the knowledge base construction device can be referred to the description of the technical scheme of the above-mentioned knowledge base construction method.

[0411] Corresponding to the above method embodiment, this specification also provides a compliance reasoning device embodiment, which includes:

[0412] A second acquisition module is configured to acquire target rules and target examples of a target domain;

[0413] A second retrieval module is configured to retrieve reasoning experience knowledge for a target rule from a knowledge base for compliance reasoning in a target domain, wherein the knowledge base is pre-constructed according to the above-mentioned knowledge base construction method;

[0414] The second reasoning module is configured to reason whether the target example complies with the target rule based on reasoning experience knowledge, and obtain a target compliance result.

[0415] Optionally, the device also includes: a second retrieval reasoning module, configured to retrieve reasoning experience knowledge for similar rules based on the semantic similarity of the target rule when no reasoning experience knowledge for the target rule is retrieved, wherein the semantic similarity between the similar rule and the target rule exceeds a preset similarity threshold; and generate reasoning experience knowledge for the target rule based on the reasoning experience knowledge for the similar rule.

[0416] In the embodiments of the present specification, reasoning experience knowledge for target rules is retrieved from a knowledge base that includes a large amount of relevant and non-misleading experience knowledge for compliance reasoning in the target field. Based on the reasoning experience knowledge, it is inferred whether the target example complies with the target rule, and the target compliance result is obtained, which effectively improves the accuracy of compliance reasoning in the target field.

[0417] The above is a schematic scheme of a compliance reasoning device of this embodiment. It should be noted that the technical scheme of the compliance reasoning device and the technical scheme of the compliance reasoning method described above belong to the same concept, and the details of the technical scheme of the compliance reasoning device that are not described in detail can be referred to the description of the technical scheme of the compliance reasoning method described above.

[0418] Corresponding to the above method embodiment, this specification also provides a legal knowledge base construction device embodiment, the device comprising:

[0419] A third acquisition module is configured to acquire at least one set of legal provisions, sample cases, and label compliance results in the legal field, wherein the label compliance results are marked with whether the sample cases comply with the legal provisions;

[0420] The third reasoning module is configured to reason whether the sample case complies with the legal provisions and obtain a predicted compliance result;

[0421] The third analysis module is configured to perform reasoning analysis on the process of obtaining the predicted compliance result based on the label compliance result, and obtain reasoning experience knowledge for the legal rules;

[0422] The third building block is configured to integrate the reasoning experience knowledge for each legal rule and construct a legal knowledge base for compliance reasoning in the legal field.

[0423] In the embodiments of this specification, after reasoning whether a sample case complies with the legal rules, the reasoning process is analyzed based on the label compliance results, and reasoning experience knowledge for the legal rules is heuristically obtained. This is high-quality experience knowledge directly related to the legal rules. The reasoning experience knowledge for each legal rule is integrated to construct a knowledge base, which includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field, which effectively improves the accuracy of compliance reasoning in the legal field.

[0424] The above is a schematic scheme of a legal knowledge base construction device of this embodiment. It should be noted that the technical scheme of the legal knowledge base construction device and the technical scheme of the above-mentioned legal knowledge base construction method belong to the same concept, and the details not described in detail in the technical scheme of the legal knowledge base construction device can be found in the description of the technical scheme of the above-mentioned legal knowledge base construction method.

[0425] Corresponding to the above method embodiment, this specification also provides a compliance reasoning device embodiment, which includes:

[0426] A fourth acquisition module is configured to acquire at least one set of legal rules, sample cases and label compliance results of at least one legal dimension in the legal field, wherein the label compliance result of at least one legal dimension is annotated with whether the sample case complies with the legal rules under at least one legal dimension, and the legal dimension includes a subject dimension, an object dimension, a subjective aspect dimension and an objective aspect dimension;

[0427] A fourth reasoning module is configured to use the reasoning model corresponding to each legal dimension, based on the prompt information of each legal dimension, to infer whether the sample case complies with the legal rules under each legal dimension, and obtain a predicted compliance result of at least one legal dimension;

[0428] A fourth analysis module is configured to perform reasoning analysis on a process of obtaining a predicted compliance result of at least one legal dimension based on the label compliance result of at least one legal dimension, so as to obtain reasoning experience knowledge for legal provisions and rules;

[0429] The fourth building block is configured to integrate the reasoning experience knowledge for each legal provision and rule to construct a legal knowledge base for compliance reasoning in the legal field.

[0430] In the embodiments of this specification, the reasoning model corresponding to each legal dimension is used to infer whether the sample case complies with the legal rules from at least one legal dimension based on the prompt information of each legal dimension. Then, based on the label compliance result, the reasoning process is analyzed to obtain the reasoning experience knowledge for the legal rules in a detailed, comprehensive and heuristic manner. This is high-quality experience knowledge directly related to the legal rules. The knowledge base constructed by integrating the reasoning experience knowledge for each legal rule includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field, which effectively improves the accuracy of compliance reasoning in the legal field.

[0431] The above is a schematic scheme of another legal knowledge base construction device of this embodiment. It should be noted that the technical scheme of the legal knowledge base construction device and the technical scheme of the above-mentioned legal knowledge base construction method belong to the same concept, and the details not described in detail in the technical scheme of the legal knowledge base construction device can be found in the description of the technical scheme of the above-mentioned legal knowledge base construction method.

[0432] Corresponding to the above method embodiment, this specification also provides an embodiment of a compliance reasoning device in the legal field, the device comprising:

[0433] A fifth acquisition module is configured to acquire target legal provisions and target cases in the legal field;

[0434] A fifth retrieval module is configured to retrieve reasoning experience knowledge for target legal provisions from a knowledge base for compliance reasoning in the legal field, wherein the knowledge base is pre-constructed according to the above-mentioned legal knowledge base construction method;

[0435] The fifth reasoning module is configured to reason whether the target case complies with the target legal provisions based on reasoning experience knowledge and obtain the target compliance result.

[0436] In the embodiments of the present specification, reasoning experience knowledge for target legal provisions and rules is retrieved from a knowledge base that includes a large amount of relevant and non-misleading experience knowledge used for compliance reasoning in the legal field. Based on the reasoning experience knowledge, it is inferred whether the target case complies with the target legal provisions and rules, and the target compliance result is obtained, which effectively improves the accuracy of compliance reasoning in the legal field.

[0437] The above is a schematic scheme of a compliance reasoning device in the field of law of this embodiment. It should be noted that the technical scheme of the compliance reasoning device in the field of law and the technical scheme of the compliance reasoning method in the field of law mentioned above belong to the same concept, and the details of the technical scheme of the compliance reasoning device in the field of law that are not described in detail can all be referred to the description of the technical scheme of the compliance reasoning method in the field of law mentioned above.

[0438] Fig.10 The block diagram of a computing device provided by one embodiment of the present specification is shown. The components of the computing device 1000 include but are not limited to a memory 1010 and a processor 1020. The processor 1020 is connected to the memory 1010 via a bus 1030, and the database 1050 is used to store data.

[0439] The computing device 1000 also includes an access device 1040, which enables the computing device 1000 to communicate via one or more networks 1060. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 1040 may include one or more of any type of network interface (e.g., a Network Interface Controller (NIC)) of wired or wireless, such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, and a Near Field Communication (NFC).

[0440] In one embodiment of the present specification, the above components of the computing device 1000 and Fig.10 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Fig.10 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0441] The computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1000 may also be a mobile or stationary server.

[0442] Among them, the processor 1020 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0443] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method and compliance reasoning method in the legal field belong to the same concept. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical scheme of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0444] An embodiment of the present specification also provides a computer-readable storage medium storing a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0445] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method and compliance reasoning method in the legal field belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0446] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0447] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the knowledge base construction method, compliance reasoning method, legal knowledge base construction method and compliance reasoning method in the legal field belong to the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the knowledge base construction method, compliance reasoning method, legal knowledge base construction method or compliance reasoning method in the legal field.

[0448] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0449] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the contents contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0450] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0451] 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, reference can be made to the relevant descriptions of other embodiments.

[0452] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.< / conduct> < / object> < / mental> < / subject> < / signs> < / symptoms>

Claims

1. A compliance reasoning method, comprising: Acquire a target rule and a target example of a target domain, wherein the target rule and the target example are text types; Retrieve reasoning experience knowledge for the target rule from a knowledge base used for compliance reasoning in the target domain, wherein the reasoning experience knowledge is of text type, and the method for constructing the knowledge base includes: obtaining at least one set of target rules, sample examples and label compliance results in the target domain, wherein the label compliance results are annotated with whether the sample examples comply with the target rules, and the label compliance results include label compliance results of multiple target dimensions, wherein the label compliance results of the multiple target dimensions are annotated with whether the sample examples comply with the target rules under the multiple target dimensions, and the target dimensions are aspect dimensions used to reason whether the examples comply with the rules during the compliance reasoning process; reasoning whether the sample examples comply with the target rules under the multiple target dimensions, and obtaining predicted compliance results of the multiple target dimensions; based on the label compliance results of the multiple target dimensions, reasoning and analyzing the process of obtaining the predicted compliance results of the multiple target dimensions, and obtaining reasoning experience knowledge for the target rules; integrating the reasoning experience knowledge for each target rule, and constructing a knowledge base for compliance reasoning in the target domain; Based on the reasoning experience knowledge, it is inferred whether the target example complies with the target rule to obtain a target compliance result.

2. According to the method of claim 1, the reasoning whether the sample example complies with the target rule under the multiple target dimensions and obtaining the predicted compliance results of the multiple target dimensions comprises: Using the first inference model, inferring whether the sample example complies with the target rule under the multiple target dimensions, and obtaining predicted compliance results of the multiple target dimensions; The process of obtaining the predicted compliance results of the multiple target dimensions based on the label compliance results of the multiple target dimensions is subjected to reasoning analysis to obtain reasoning experience knowledge for the target rules, including: By using the second inference model, based on the label compliance results of the multiple target dimensions, an inference analysis is performed on the process of obtaining the predicted compliance results of the multiple target dimensions to obtain inference experience knowledge for the target rules.

3. The method according to claim 2, wherein the first reasoning model comprises first reasoning sub-models corresponding to the multiple target dimensions; The using the first inference model to infer whether the sample example complies with the target rule under the multiple target dimensions to obtain the predicted compliance results of the multiple target dimensions includes: By using each first reasoning sub-model, based on the prompt information of each target dimension, it is inferred whether the sample example complies with the target rule under each target dimension, so as to obtain the predicted compliance results of the multiple target dimensions.

4. The method according to any one of claims 1 to 3, wherein the step of performing reasoning analysis on the process of obtaining the predicted compliance result based on the label compliance result to obtain reasoning experience knowledge for the target rule comprises: Determining result matching information based on the label compliance result and the predicted compliance result; Based on the result matching information, a reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

5. The method according to claim 4, wherein the process of obtaining the predicted compliance result is subjected to reasoning analysis based on the result matching information to obtain reasoning experience knowledge for the target rule, including: In the case that the result matching information is not matched, the non-matching result matching information is used as a negative example to perform reverse reasoning analysis on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

6. The method according to claim 5, wherein when the result matching information is not matched, based on the result matching information, reverse reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule, including: In the case where the result matching information is not matched, taking the not matched result matching information as a negative example, performing reverse reasoning analysis on the process of obtaining the predicted compliance result to obtain a reasoning process analysis result; Taking the unmatched result matching information as a negative example, based on the analysis result of the reasoning process, inferring whether the sample example complies with the target rule, and obtaining an updated prediction compliance result; Return to the step of determining result matching information based on the label compliance result and the predicted compliance result, and when the result matching information is a match, determine the reasoning experience knowledge for the target rule based on the reasoning process analysis result.

7. The method according to claim 4, wherein the process of obtaining the predicted compliance result is subjected to reasoning analysis based on the result matching information to obtain reasoning experience knowledge for the target rule, comprising: In the case that the result matching information is a match, the matched result matching information is used as a positive example to perform forward reasoning analysis on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

8. The method according to claim 4, wherein the process of obtaining the predicted compliance result is subjected to reasoning analysis based on the result matching information to obtain reasoning experience knowledge for the target rule, comprising: The matching result information is used as a positive example, and the unmatched result information is used as a negative example. A two-way reasoning analysis is performed on the process of obtaining the predicted compliance result to obtain reasoning experience knowledge for the target rule.

9. The method according to claim 1, before integrating the reasoning experience knowledge for each target rule to construct a knowledge base for compliance reasoning in the target domain, further comprises: For the reasoning experience knowledge of any target rule, repeated reasoning experience knowledge is screened.

10. The method according to claim 1, after retrieving the reasoning experience knowledge for the target rule from the knowledge base for compliance reasoning in the target domain, further comprises: In the case where no reasoning experience knowledge for the target rule is retrieved, based on the semantic similarity of the target rule, retrieving reasoning experience knowledge for similar rules, wherein the semantic similarity between the similar rules and the target rule exceeds a preset similarity threshold; Based on the reasoning experience knowledge for similar rules, the reasoning experience knowledge for the target rule is generated.

11. A compliance reasoning method in the legal field, comprising: Obtaining target legal articles and target cases in the legal field, wherein the target legal articles and target cases are text types; Retrieve reasoning experience knowledge for the target legal article and rule from a knowledge base used for compliance reasoning in the legal field, wherein the reasoning experience knowledge is of text type, and the knowledge base construction method comprises: obtaining at least one set of legal articles and rules, sample cases and labeled compliance results in the legal field, wherein the labeled compliance results are marked with whether the sample cases comply with the legal article and rule, and the labeled compliance results include labeled compliance results of multiple legal dimensions, and the labeled compliance results of the multiple legal dimensions are marked with whether the sample cases comply with the legal article and rule under the multiple legal dimensions, and the legal dimensions are aspect dimensions used to reason whether the cases comply with the rules in the compliance reasoning process; reason whether the sample cases comply with the legal article and rule under the multiple legal dimensions, and obtain predicted compliance results of the multiple legal dimensions; based on the labeled compliance results of the multiple legal dimensions, perform reasoning analysis on the process of obtaining the predicted compliance results of the multiple legal dimensions, and obtain reasoning experience knowledge for the legal article and rule; Integrate the reasoning experience knowledge for each legal article and rule to build a legal knowledge base for compliance reasoning in the legal field; based on the reasoning experience knowledge, reason whether the target case complies with the target legal article and rule to obtain the target compliance result.

12. A task platform, comprising a second request interface and a second response unit; The second request interface is used to receive a compliance reasoning request sent by a second terminal device, wherein: The compliance reasoning request includes a target rule and a target example in a target domain, wherein the target rule and the target example are text types; The second response unit is used to retrieve reasoning experience knowledge for the target rule from the knowledge base used for compliance reasoning in the target domain, and based on the reasoning experience knowledge, infer whether the target example complies with the target rule to obtain a target compliance result, wherein the reasoning experience knowledge is of text type, and the method for constructing the knowledge base includes: obtaining at least one set of target rules, sample examples and label compliance results in the target domain, the label compliance results are annotated with whether the sample example complies with the target rule, the label compliance results include label compliance results of multiple target dimensions, the label compliance results of the multiple target dimensions are annotated with whether the sample example complies with the target rule under the multiple target dimensions, and the target dimensions are aspect dimensions used to infer whether the example complies with the rule in the compliance reasoning process; infer whether the sample example complies with the target rule under the multiple target dimensions to obtain predicted compliance results of the multiple target dimensions; based on the label compliance results of the multiple target dimensions, reasoning and analyzing the process of obtaining the predicted compliance results of the multiple target dimensions to obtain reasoning experience knowledge for the target rule; integrating the reasoning experience knowledge for each target rule to construct a knowledge base for compliance reasoning in the target domain; The second request interface is also used to feed back the target compliance result to the second terminal device.

13. A computing device comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

14. A computer-readable storage medium storing a computer program / instruction, wherein the computer program / instruction, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program / instruction, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Data matching decision method based on multi-knowledge-database inference and system

    CN110136838A

  • Model reasoning method and device based on rule accumulation and electronic equipment

    CN117057430A

  • Medical examination conclusion generation method and device based on large language model

    CN118315012A