LLM-based cross-border appeal text generation method, apparatus and device, and storage medium
By using an LLM-based method for generating cross-border appeal texts, which utilizes legal knowledge graphs and logical expressions to detect conflicts in legal provisions and automatically generate appeal texts, the method solves the problems of time-consuming, labor-intensive, and error-prone traditional methods, thereby improving the efficiency and accuracy of appeal texts.
Patent Information
- Application Number
- CN202511500763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-18
AI Technical Summary
Traditional methods for generating cross-border appeal texts rely on human experience, which is time-consuming, labor-intensive, and prone to omissions or errors, making it difficult to effectively handle complex cross-border cases.
The content of cross-border cases is extracted by LLM model and mapped to legal knowledge graph, logical expressions are generated and conflict detection is performed to identify conflicts between legal clauses and automatically generate appeal text.
It enables timely identification of logical conflicts between legal provisions, reduces legal risks caused by misunderstandings, improves the efficiency of drafting appeal documents, and ensures the accuracy and legality of appeal documents.
Smart Images

Figure CN120975984A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of LLM-based cross-border complaint text generation, in particular to an LLM-based cross-border complaint text generation method, device, equipment and storage medium. BACKGROUND
[0002] Under the background of deepening globalization, the number of cross-border cases is rising, involving the application, interpretation and dispute resolution of laws and regulations of various countries. The clauses in different legal systems may be contradictory or ambiguous, leading to increased complexity in case handling. In response to this challenge, legal practitioners need to have a lot of legal knowledge and case experience to efficiently write complaint texts that meet the requirements. However, traditional complaint text generation methods rely heavily on human experience, which is not only time-consuming and labor-intensive, but also prone to omissions or biases. SUMMARY
[0003] Therefore, it is necessary to propose an LLM-based cross-border complaint text generation method, device, electronic equipment and storage medium for the existing LLM-based cross-border complaint text generation problem.
[0004] An LLM-based cross-border complaint text generation method, the method comprising: extracting case content and associated legal clause information of a specified cross-border case; mapping the case content into a preset legal knowledge graph through an LLM model to obtain a plurality of relevant legal clause information associated with the case content; converting each of the relevant legal clause information and the associated legal clause information into a logical expression according to a preset conversion method to obtain a first logical expression corresponding to each of the relevant legal clause information and a second logical expression corresponding to the associated legal clause information; detecting whether each of the first logical expression and the second logical expression has a logical conflict through a preset logical conflict detection method; marking the relevant legal clause information corresponding to the first logical expression with a logical conflict as target legal clause information; generating a complaint text for the specified cross-border case according to the target legal clause information.
[0005] Further, before the step of mapping the case content into a preset legal knowledge graph through an LLM model to obtain a plurality of relevant legal clause information associated with the case content, the method further comprises: obtaining legal clause information data of a plurality of preset regions; extracting entities in the legal clause information data and the association between each entity; The preset legal knowledge graph is constructed based on entities and the relationships between them.
[0006] Furthermore, before the step of mapping the case content to a preset legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content, the method further includes: Obtain the target region where the specified cross-border case is located; Obtain the preset legal knowledge graph corresponding to the target region from the preset knowledge graph database; wherein, the preset knowledge graph database includes legal knowledge graphs for each region.
[0007] Furthermore, after the step of generating the appeal text for the designated cross-border case based on the target legal provisions information, the method further includes: Obtain the target region where the specified cross-border case is located; A provisional text for the designated cross-border case is generated based on the target legal provisions information; wherein the language of the provisional text is a first language; Obtain the second language of the target region, and retrieve the core terminology mapping library of the first language and the second language from a preset database; The temporary text is converted based on a preset translation system and the core terminology mapping library to obtain the appeal text.
[0008] Furthermore, the step of generating the appeal text for the designated cross-border case based on the target legal provisions information includes: Obtain the target region where the specified cross-border case is located; Obtain the appeal text template for the target area; Generate the content information of the designated cross-border case based on the target legal provisions information; Fill the content information into the corresponding position of the appeal text template to obtain the appeal text for the specified cross-border case.
[0009] Furthermore, after the step of recording the relevant legal clause information corresponding to the first logical expression with logical conflict as the target legal clause information, the method further includes: Priority information for obtaining the target legal clause information and the associated legal clause information; Determine whether the target legal clause information is superior to the associated legal clause information; If the target legal clause information is superior to the associated legal clause information, then the appeal text for the designated cross-border case is generated based on the target legal clause information.
[0010] Furthermore, after the step of generating the appeal text for the designated cross-border case based on the target legal provisions information, the method further includes: Input the appeal text and the case details into a preset simulator to obtain the appeal success rate; Determine whether the appeal success rate is greater than the preset success rate; If the appeal success rate is greater than the preset success rate, then the appeal will be initiated based on the appeal text.
[0011] A cross-border appeal text generation device based on LLM, the device comprising: The extraction module is used to extract the case content and related legal clauses of a specified cross-border case; The acquisition module is used to map the case content into a preset legal knowledge graph through an LLM model in order to obtain information on multiple related legal clauses associated with the case content; The conversion module is used to convert each of the relevant legal clauses and the associated legal clauses into logical expressions according to a preset conversion method, so as to obtain a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The detection module is used to detect whether each of the first logical expression and the second logical expression has a logical conflict by using a preset logical conflict detection method; A tagging module is used to mark the relevant legal clause information corresponding to the first logical expression that has a logical conflict as the target legal clause information; A designated module is used to generate the appeal text for the designated cross-border case based on the target legal provisions information.
[0012] An electronic device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps: Extract the case details and related legal clauses of a designated cross-border case; The case content is mapped into a pre-defined legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content. Each of the relevant legal clauses and the associated legal clauses are converted into logical expressions according to a preset conversion method, resulting in a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The first and second logical expressions are checked for logical conflicts using a preset logical conflict detection method. The relevant legal clause information corresponding to the first logical expression that has a logical conflict is recorded as the target legal clause information; The appeal text for the designated cross-border case is generated based on the target legal provisions information.
[0013] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps: Extract the case details and related legal clauses of a designated cross-border case; The case content is mapped into a pre-defined legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content. Each of the relevant legal clauses and the associated legal clauses are converted into logical expressions according to a preset conversion method, resulting in a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The first and second logical expressions are checked for logical conflicts using a preset logical conflict detection method. The relevant legal clause information corresponding to the first logical expression that has a logical conflict is recorded as the target legal clause information; The appeal text for the designated cross-border case is generated based on the target legal provisions information.
[0014] The beneficial effects of this invention are as follows: By extracting case information and mapping it to a legal knowledge graph, generating logical expressions and performing conflict detection, conflicts between legal clauses are identified, and appeal texts are generated based on the target legal clause information of the conflict. This achieves timely identification of logical conflicts between relevant legal clauses, reduces legal risks caused by misunderstandings or improper clause selection, significantly improves the efficiency of appeal text drafting, automatically extracts case information and generates corresponding appeal texts, and shortens working time. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] in: Figure 1 This is an application environment diagram of an LLM-based cross-border appeal text generation method in one embodiment; Figure 2This is a flowchart of a cross-border appeal text generation method based on LLM in one embodiment; Figure 3 This is a structural block diagram of a cross-border appeal text generation device based on LLM in one embodiment; Figure 4 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Figure 1 This is a diagram illustrating an application environment for cross-border appeal text generation based on LLM in one embodiment. (Refer to...) Figure 1 This LLM-based method for generating cross-border appeal texts is applied to an LLM-based cross-border appeal text generation system. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet, or laptop. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 is used to extract the case content and related legal clauses of a specified cross-border case, while the server 120 is used to generate the appeal text for the specified cross-border case.
[0019] like Figure 2 As shown, in one embodiment, a method for generating cross-border appeal text based on LLM is provided. This method can be applied to both terminals and servers; this embodiment illustrates its application to a terminal. The LLM-based method for generating cross-border appeal text specifically includes the following steps: S1: Extract the case details and related legal clauses of a specified cross-border case; S2: The case content is mapped into a preset legal knowledge graph using an LLM model to obtain information on multiple related legal clauses associated with the case content; S3: Convert each of the relevant legal clauses and the associated legal clauses into logical expressions according to a preset conversion method to obtain a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. S4: Detect whether each of the first logical expression and the second logical expression has a logical conflict by using a preset logical conflict detection method; S5: Record the relevant legal clause information corresponding to the first logical expression that has a logical conflict as the target legal clause information; S6: Generate the appeal text for the designated cross-border case based on the target legal provisions information.
[0020] This LLM-based method for generating cross-border complaint texts is suitable for handling cross-regional commercial disputes, but its pain points are as follows: Lagging legal provisions: Traditional systems struggle to dynamically link case law with the implementation details of regulations in various regions; Multilingual communication barriers: Enterprises face challenges in generating legal documents in less commonly spoken languages when dealing with disputes in designated regions; Risk of rigid strategies: Fixed response templates cannot adapt to emerging types of disputes.
[0021] In international cases, the complexity of regulations across different regions often leads to difficulties in filing appeals. This method efficiently extracts case details and relevant legal provisions, utilizes legal knowledge graphs and logical expressions to systematically analyze the case, and identifies potential legal conflicts. This approach not only improves the accuracy and consistency of appeal text generation but also enables rapid response to cross-border disputes, optimizes legal services, and protects clients' legitimate rights and interests.
[0022] As described in step S1 above, extract the case content and related legal clauses of the designated cross-border case. The case content includes the basic facts of the case, the focus of the dispute, the parties involved and their claims, etc. To facilitate better analysis, the case content and related legal clauses can be extracted from various sources (such as case documents, materials submitted by the parties, legal databases, etc.).
[0023] As described in step S2 above, the case content is mapped to a preset legal knowledge graph to obtain information on multiple relevant legal clauses associated with the case content. This content is mapped to a preset legal knowledge graph, which is a complex network structure containing legal concepts, clauses, and their interrelationships. The mapping process typically utilizes information retrieval and semantic matching technologies to associate the facts and points of contention in the case with nodes in the knowledge graph. Technologies involved in this process, such as named entity recognition and synonym matching, ensure that the most relevant legal clauses are found efficiently and accurately. In this way, the system can identify multiple relevant legal clauses, providing the necessary legal basis for subsequently generating the appeal text. The term "preset" in "preset legal knowledge graph" indicates that it was constructed during system initialization. The specific mapping mechanism uses technologies such as BERT, NER, and knowledge graph embedding for semantic matching or entity linking.
[0024] As described in step S3 above, the relevant legal clause information and the associated legal clause information are converted into logical expressions according to a preset conversion method, resulting in a first logical expression corresponding to each of the relevant legal clause information and a second logical expression corresponding to the associated legal clause information. A logical expression is a formalized description that clearly represents the conditions and logical relationships of legal clauses. Typically, this process involves converting the language in the legal clauses into expressions that conform to logical grammar, such as using propositional logic or predicate logic. This logical representation allows the system to more easily perform subsequent logical analysis. Syntactic parsing techniques are used to analyze the legal clauses, identifying the main structure, clauses, and their components, such as subjects, predicates, and objects. Legal clauses are often complex, and syntactic analysis helps extract important information and logical relationships. Conditional information in the legal clauses is extracted and converted into logical conditions. For example, structures such as "under this condition" or "when a certain condition is met" in the legal clauses need to be converted into corresponding logical condition expressions. Suppose a legal clause states: "If a party submits written notice, a reply shall be given within three days." Terminology standardization: "written notice" is standardized as term A. Standardize "respond" as term B. Syntactic analysis: Identify the main clause and conditional clause. The main clause is "a response should be given within three days," and the conditional clause is "if the party submits written notice." Logical symbol mapping: Convert the conditional clause into logical symbols: A→B. Where A represents "the party submits written notice," and "B" represents "respond."
[0025] As described in step S4 above, a preset logical conflict detection method is used to detect whether each of the first and second logical expressions has a logical conflict. This identifies inconsistencies or contradictions between the legal provisions of the case. The preset logical conflict detection method compares all generated logical expressions and analyzes the relationships between them using logical reasoning techniques. Generally, if two expressions cannot be logically true simultaneously, they can be considered to have a logical conflict. This detection process typically requires efficient logical solving algorithms to ensure that the system can quickly identify potential logical problems, which is a crucial step in ensuring the accuracy of legal analysis.
[0026] Specifically, in the process of generating cross-border appeal texts based on LLM (Large Language Model), LLM can be used to process clause information in legal texts. First, LLM can efficiently extract relevant and related legal clause information, including legal provisions, precedents, and other legal regulations. Then, through a pre-defined transformation method, LLM converts this legal text information into logical expressions. This transformation involves converting legal language into a form that can be used for mathematical and logical operations, making the meaning of each legal clause clearer and facilitating subsequent logical analysis. During the transformation process, LLM understands the legal logical relationships and conditions in the text, generating corresponding first logical expressions (corresponding to relevant legal clause information) and second logical expressions (corresponding to related legal clause information). These logical expressions describe the dependencies, limitations, and possible causal relationships between legal clauses, thus laying the foundation for subsequent logical conflict detection. Next, through a pre-defined logical conflict detection method, the system analyzes the relationships between these expressions to assess whether there are logical contradictions and conflicts. For example, if the first logical expression implies the existence of a certain legal right, while the second logical expression implies that the same right is excluded or limited, then the system will identify this logical conflict. This process is crucial for ensuring the legality and reasonableness of the appeal text, effectively avoiding contradictory legal arguments in the appeal, thereby increasing the success rate of the appeal and the effectiveness of legal support. Ultimately, by leveraging the capabilities of LLM, the entire process not only improves efficiency but also enhances the rigor and accuracy of legal analysis.
[0027] As described in step S5 above, the relevant legal clause information corresponding to the first logical expression with logical conflict is recorded as target legal clause information. After the logical conflict detection is completed, the system will mark those legal clauses related to the case that have logical conflicts with other clauses, which are called target legal clause information. These legal clauses are usually the focus of the dispute in the case and may have a significant impact on the case's adjudication.
[0028] As described in step S6 above, the appeal text for the designated cross-border case is generated based on the target legal clause information. The final appeal document is automatically generated based on the content of the legal clauses, the case background, and the results of logical reasoning. The generated text must conform to the format requirements stipulated by law, including necessary legal basis, presentation of case facts, claims of all parties, and analysis of the legal clauses.
[0029] In one embodiment, before step S2, which maps the case content to a preset legal knowledge graph using an LLM model to obtain information on multiple related legal clauses associated with the case content, the method further includes: S101: Obtain legal clause information data from multiple preset regions; S102: Extract the entities and the relationships between them from the legal clause information data; S103: Construct the preset legal knowledge graph based on entities and the relationships between them.
[0030] As described in step S101 above, legal clause information data from multiple preset regions is acquired. In this step, the system aims to collect data related to legal clauses from multiple preset regions (such as national, regional, or international legal systems). These regions can include different legal systems, such as domestic law, international law, commercial law, and civil law, reflecting the diversity and complexity of legal clauses under different legal jurisdictions. Acquiring this data typically requires integrating information from legal databases, legal literature, government websites, and other legal resources. This process requires utilizing web scraping technology, API interfaces, or data transmission tools to extract data from various information sources and may involve data cleaning and standardization to ensure consistency and usability. The acquisition of legal clause data not only needs to ensure the accuracy and timeliness of the information but also should consider the applicability of the legal clauses and their regional relevance.
[0031] As described in step S102 above, entities and their relationships within the legal clause information data are extracted. The collected legal clause information data is then analyzed in depth to extract key entities and their interrelationships. Key entities may include the legal clauses themselves, legal concepts, parties involved, and case facts. Natural Language Processing (NLP) technology, such as Named Entity Recognition (NER), can be used to automatically identify and extract specific terms and concepts from the text. Simultaneously, the relationships between these entities are analyzed—that is, which legal clauses are interconnected, and which legal clauses affect the application of other clauses in a particular legal issue or case. This process aims to construct a network of legal clauses to facilitate subsequent knowledge graph construction.
[0032] As described in step S103 above, the preset legal knowledge graph is constructed based on entities and the relationships between them. After entity extraction and relationship analysis are completed, this information is integrated to construct the legal knowledge graph. The legal knowledge graph is a graphical structure that intuitively displays legal provisions, concepts, and their relationships, forming a multi-dimensional legal knowledge network. The construction process typically employs a graph database or graphical structure, where nodes represent legal entities (e.g., legal provisions, concepts, cases), and edges represent the mutual influence or relationships between these entities. In this way, the knowledge graph can provide a clear knowledge framework for subsequent case analysis, enabling the system to quickly retrieve legal information related to specific case content. During the construction of the knowledge graph, the priority, applicability, and hierarchical structure of different provisions also need to be considered. Furthermore, the updability of the graph is crucial; with the release of new legal provisions and interpretations, the knowledge graph needs to be updated promptly to maintain its cutting-edge nature and effectiveness.
[0033] In one embodiment, before step S2, which maps the case content to a preset legal knowledge graph using an LLM model to obtain information on multiple related legal clauses associated with the case content, the method further includes: S111: Obtain the target area where the specified cross-border case is located; S112: Obtain the preset legal knowledge graph corresponding to the target region from the preset knowledge graph database; wherein, the preset knowledge graph database includes legal knowledge graphs for each region.
[0034] As described in step S111 above, the target region where the designated cross-border case is located is obtained. The target region may be a country, region, or international legal system, and its selection is usually based on various factors such as the nature of the case, the nationality of the parties, and their legal relationship. Basic information about the case is obtained, and its relevant legal attributes are analyzed. For example, if the case involves an international trade dispute, it may be necessary to focus on relevant provisions of the commercial law and international law of the applicable country. The process of obtaining the target region can be completed by reviewing case documents, legal instruments, or communicating with the parties. Accurately identifying the target region is crucial to the entire legal appeal process because different legal regions have different legal provisions and applicable standards, directly affecting the subsequent extraction and analysis of legal provisions. If the target region is incorrectly identified, the appeal text may be invalid or unable to obtain legal support.
[0035] As described in step S112 above, a preset legal knowledge graph corresponding to the target region is obtained from a preset knowledge graph database. The preset knowledge graph database is a systematic legal knowledge base containing legal provisions and concepts from various legal regions, organized and stored according to a specific structure. This database may include national law, regional law, international law, and the relationships between them, ensuring the comprehensiveness and accuracy of the information. Retrieving the legal knowledge graph for a specific target region from the database typically requires searching based on keywords or other identifiers. During the acquisition of these graphs, the system needs to ensure that the extracted knowledge graphs are up-to-date, reflecting currently valid legal provisions and their interpretations. Therefore, the database needs to be maintained and updated regularly, including the addition of new legal provisions, the revision of old provisions, and changes in relevant legal interpretations. Ultimately, through this step, the system can obtain comprehensive legal knowledge related to the specified region to support the subsequent mapping of case content to the knowledge graph, ensuring that the generated appeal text has a solid legal foundation.
[0036] In one embodiment, after step S6 of generating the appeal text for the designated cross-border case based on the target legal clause information, the method further includes: S701: Obtain the target area where the specified cross-border case is located; S702: Generate a provisional text for the designated cross-border case based on the target legal clause information; wherein the language of the provisional text is a first language; S703: Obtain the second language of the target region, and obtain the core terminology mapping library of the first language and the second language from a preset database; S704: The temporary text is converted based on the preset translation system and the core terminology mapping library to obtain the appeal text.
[0037] As described in step S701 above, the target region where the designated cross-border case is located is obtained. It should be noted that identifying the target region involves more than just determining its geographical location; it also includes factors such as the region's legal environment, legal system, and court jurisdiction. Since legal provisions, procedures, and enforcement principles can vary significantly across different regions, and the legal issues involved in cross-border cases are more complex, the system needs to accurately obtain the scope of application and enforcement status of legal provisions. When the language used in the target region differs from the generated appeal text (i.e., the provisional text), multilingual conversion can be performed. Multilingual conversion is merely an optional sub-step in generating the appeal text.
[0038] As described in step S702 above, a provisional text for the designated cross-border case is generated based on the target legal clause information; wherein the language of the provisional text is the first language. The process of generating the provisional text must consider the specific circumstances of the case, such as the identities of the plaintiff and defendant, the factual background of the case, and the relevant legal basis. The text structure typically includes a case introduction, legal basis, and claims, striving for logical rigor and comprehensive content. Because this is a provisional text, the system may integrate multiple information sources, including case law, legal theory, and expert opinions, to improve the quality of the text. Simultaneously, ensuring that the text conforms to the grammar and usage of the selected language is an important prerequisite for guaranteeing the validity of legal documents.
[0039] As described in step S703 above, the second language of the target region is obtained, and a core terminology mapping library for the first and second languages is retrieved from a pre-set database. After generating the temporary text, the system obtains the second language of the target region through this step. The second language is usually another official language commonly used in the region, or a language widely used in the legal profession. Simultaneously, the system retrieves a core terminology mapping library for the first and second languages from the pre-set database. This core terminology mapping library is built upon a large number of legal documents and professional knowledge, and its purpose is to ensure the use of accurate and standard legal terminology during the translation process. Appropriate terminology mapping is particularly important for maintaining the legal validity of the translated content, as a slight change in a term can completely alter its legal meaning. Therefore, the system needs to ensure that the mapping library is updated in real time to cover the latest legal provisions and professional vocabulary. By acquiring these core terms, the system lays a solid foundation for the subsequent translation process.
[0040] As described in step S704 above, the temporary text is converted based on a preset translation system and the core terminology mapping library to obtain the appeal text. Using the preset translation system and the previously obtained core terminology mapping library, the temporary text is converted to generate the formal appeal text. This process involves not only simple language translation but, more importantly, accurately conveying the meaning contained in the legal text, ensuring that the translated text complies with the legal requirements of the target region both legally and semantically. The translation system can automatically identify legal terms in the text and perform accurate translation in conjunction with the terminology mapping library, while considering changes in context, legal structure, and local legal culture to ensure the professionalism of the translation result. Crucially, the translated appeal text needs to be reviewed for both linguistic naturalness and legal compliance to ensure its effective use in legal proceedings. The translation system is a computer-based tool used to convert text from one language to another. The core terminology mapping library is a specialized database that records the correspondence between professional terms in different languages; that is, a core terminology mapping library is pre-built to facilitate the conversion of temporary text.
[0041] In one embodiment, step S6, which generates the appeal text for the designated cross-border case based on the target legal provisions information, includes: S601: Obtain the target area where the specified cross-border case is located; S602: Obtain the appeal text template for the target area; S603: Generate the content information of the designated cross-border case based on the target legal clause information; S604: Fill the content information into the corresponding position of the appeal text template to obtain the appeal text for the specified cross-border case.
[0042] As described in step S601 above, the target region where the specified cross-border case is located is obtained. The geographical and legal region of the cross-border case is identified and confirmed. The target region may be a country, region, or specific legal jurisdiction. These places typically have unique rules and procedures for the interpretation and application of legal provisions. Therefore, the system utilizes databases, legal documents, and relevant judgment materials to obtain detailed information about the case, thereby determining the applicable target legal region. Obtaining target region information includes not only the geographical location of the case but also the legal environment of the target region, such as the court system, applicable laws, and the authority to enforce judgments. Through this process, the system can ensure that the subsequently generated appeal text complies with the legal requirements and standards of the region, helping to optimize the success rate of appeals. Simultaneously, this confirmation of information has a significant impact on legal professionals' understanding of the specific provisions of applicable laws in subsequent legal operations.
[0043] As described in step S602 above, an appeal text template for the target region is obtained. This template not only forms the basic framework of the appeal text but also reflects the unique format, clauses, and requirements of the legal system of the target region. Different regions have strict regulations regarding the format, content requirements, and legal language of appeal texts.
[0044] As described in step S603 above, content information for the designated cross-border case is generated based on the target legal clause information. Utilizing the acquired target legal clause information to generate specific content information for the designated cross-border case means that the system comprehensively considers relevant details of the case, including the application of legal clauses, case facts, legal analysis, and conclusions, to form a complete, logical, and legally compliant case statement.
[0045] As described in step S604 above, the content information is filled into the corresponding position in the appeal text template to obtain the appeal text for the designated cross-border case. After generating the content information, the generated information is filled into the previously determined appeal text template. This process is not merely simple text input; it requires ensuring the accuracy and logic of the entered information, ensuring that each item corresponds to the relevant template section. When filling in the content, it is necessary to ensure that each information item conforms to the standardized format of the appeal text, especially in terms of legal terminology, format arrangement, and information clarity. After completion, it is also necessary to verify that all information is accurate and complies with the requirements of local laws and legal provisions.
[0046] In one embodiment, after step S5, which records the relevant legal clause information corresponding to the first logical expression with logical conflict as the target legal clause information, the method further includes: S611: Obtain priority information between the target legal clause information and the associated legal clause information; S612: Determine whether the target legal clause information is superior to the associated legal clause information; S613: If the target legal clause information is superior to the associated legal clause information, then generate the appeal text for the designated cross-border case based on the target legal clause information.
[0047] As described in step S611 above, priority information of the target legal clause information and the associated legal clause information is obtained. Priority information is a key factor in assessing the relative importance and applicability of these legal clauses. Because legal clauses often have complex hierarchical relationships, different legal provisions may have different impacts on the same case. Therefore, a priority ranking must be established between the two to select the most effective and applicable clause in subsequent processing. Priority determination can be based on multiple factors, including but not limited to the legal hierarchy of the legal clause (e.g., laws, administrative regulations, etc.), its relevance to the case, the applicable time standard, and possible territorial limitations. Priority is particularly important in cross-border cases because legal clauses involving multiple jurisdictions may conflict or influence each other. Understanding and applying priority information helps legal practitioners make more targeted and effective legal strategy choices when handling cases. Furthermore, this priority information can also be obtained by referring to legal databases, case law libraries, legal forums, and the opinions of legal experts.
[0048] As described in step S612 above, it is determined whether the target legal clause information is superior to the related legal clause information. To determine which of the target and related legal clause information has higher priority, the system can automatically determine which clause holds a more prominent position in the legal conflict by analyzing the information characteristics, scope of application, and positioning within the legal framework of the relevant legal clauses. This determination may involve various analytical methods, such as textual analysis of legal provisions, case studies, and the application of precedents. If the target legal clause surpasses the related legal clause in terms of applicability, clarity, and timeliness, the conclusion that the target legal clause is superior to the related legal clause can be drawn. Furthermore, the specific circumstances of the case, historical background, and relevant legal practices are also taken into consideration to ensure the comprehensiveness and accuracy of the determination results.
[0049] As described in step S613 above, if the target legal clause information is superior to the associated legal clause information, then the appeal text for the designated cross-border case is generated based on the target legal clause information. After confirming that the target legal clause information is superior to the associated legal clause information, the system will generate the appeal text for the designated cross-border case based on the target legal clause information. Target legal clauses typically represent more authoritative or practical legal standards; therefore, when drafting the appeal, the relevant legal clauses need to be incorporated into the text to fully reflect the legal logic of the appeal. When generating the appeal text, the system will organize the content according to the structure, specific wording, and applicable cases of the target legal clauses to ensure that the text effectively conveys the core demands and legal basis of the case. The generation of the text may also involve multiple checks and optimizations to ensure the accuracy of the content, legal compliance, and logical rigor.
[0050] In one embodiment, after step S6 of generating the appeal text for the designated cross-border case based on the target legal clause information, the method further includes: S711: Input the appeal text and the case content into a preset simulator to obtain the appeal success rate; S712: Determine whether the appeal success rate is greater than the preset success rate; S713: If the appeal success rate is greater than the preset success rate, then an appeal is made based on the appeal text.
[0051] As described in step S711 above, the appeal text and case details are input into a preset simulator to obtain the appeal success rate. This simulator is a tool that uses advanced algorithms and models, typically based on historical data, case analysis, and legal reasoning, to assess the probability of success for specific legal actions. By inputting the appeal text and case information, the simulator can analyze the structure, content, and legal basis of the text, while considering the specific context of the case, to predict the likelihood of a successful appeal. The simulator can cover multiple dimensions of evaluation, including the applicability of legal provisions, the similarity of cases, the historical judgment trends and ruling preferences of the corresponding courts, etc. Such analysis usually relies on big data technologies, such as machine learning and natural language processing, which can handle complex legal language and logical combinations, making the evaluation process more accurate and efficient. The construction process of the preset simulator is as follows: 1. Collect historical cases similar to the target case, including judgment results and case characteristics (such as case type, legal provisions, information of the parties involved, etc.); 2. Define key features that affect the case judgment and extract them from the dataset. For example, legal provisions, case facts, court level, and legal strategies may be considered; 3. Use regression analysis or other statistical methods to calculate the relationship between features and successful results to form a model.
[0052] As described in step S712 above, it is determined whether the appeal success rate is greater than a preset success rate. The calculated appeal success rate is compared with a pre-set "preset success rate." The preset success rate is an indicator derived from theory or experience, reflecting the minimum probability of success required to file an appeal, and is usually derived through historical data analysis. The significance of this determination is to provide the parties involved with a clear direction. If the appeal success rate is higher than the preset success rate, it means that the case has a strong chance of success, and continuing subsequent legal action may be a reasonable choice; conversely, it indicates that the case has a greater legal risk, and continuing the appeal may lead to a waste of resources or litigation failure. Therefore, this determination helps save the parties involved time and money, ensuring that they make wise decisions in legal proceedings. After this assessment, the system can provide improvement suggestions to legal professionals and parties involved, or guide them to adjust their strategies when necessary, such as adding additional evidence or reconsidering litigation strategies.
[0053] As described in step S713 above, if the success rate of the appeal is determined to be greater than the preset success rate, an appeal is initiated based on the appeal text. A formal appeal is then launched based on the generated appeal text. At this time, the relevant parties must ensure that all aspects of the appeal text meet the court's submission requirements, including format, accuracy of legal language, necessary supplementary documents, and any relevant evidentiary materials. Initiating an appeal based on an appeal text with an assessed success rate means that the parties have conducted a certain level of risk assessment during the decision-making process, thereby confirming to some extent the reasonableness of the legal claims and the legitimacy of the demands.
[0054] Reference Figure 3 The present invention also provides an LLM-based cross-border appeal text generation device, the device comprising: Extraction module 902 is used to extract the case content and related legal clause information of a specified cross-border case; The acquisition module 904 is used to map the case content into a preset legal knowledge graph through an LLM model in order to obtain information on multiple related legal clauses associated with the case content; The conversion module 906 is used to convert each of the relevant legal clause information and the associated legal clause information into logical expressions according to a preset conversion method, so as to obtain a first logical expression corresponding to each of the relevant legal clause information and a second logical expression corresponding to the associated legal clause information. The detection module 908 is used to detect whether each of the first logical expression and the second logical expression has a logical conflict by using a preset logical conflict detection method; The marking module 910 is used to mark the relevant legal clause information corresponding to the first logical expression that has a logical conflict as the target legal clause information; The designated module 912 is used to generate the appeal text for the designated cross-border case based on the target legal clause information.
[0055] In one embodiment, the LLM-based cross-border appeal text generation apparatus further includes: The legal clause information data acquisition module is used to acquire legal clause information data from multiple preset areas; The relationship extraction module is used to extract entities from the legal clause information data and the relationships between these entities. The construction module is used to construct the preset legal knowledge graph based on entities and the relationships between them.
[0056] In one embodiment, the LLM-based cross-border appeal text generation apparatus further includes: The target area acquisition module is used to acquire the target area where the specified cross-border case is located; A preset legal knowledge graph acquisition module is used to acquire the preset legal knowledge graph corresponding to the target region from a preset knowledge graph database; wherein, the preset knowledge graph database includes legal knowledge graphs for each region.
[0057] In one embodiment, the LLM-based cross-border appeal text generation apparatus further includes: The judgment target area acquisition module is used to acquire the target area where the specified cross-border case is located; A provisional text generation module is used to generate a provisional text for the designated cross-border case based on the target legal clause information; wherein the language of the provisional text is a first language; The second language acquisition module is used to acquire the second language of the target region and to acquire the core terminology mapping library of the first language and the second language from a preset database. The conversion module is used to convert the temporary text based on a preset translation system and the core terminology mapping library to obtain the appeal text.
[0058] In one embodiment, module 912 is specified, including: The target area acquisition submodule is used to acquire the target area where the specified cross-border case is located; The appeal text template acquisition submodule is used to acquire the appeal text template of the target area; The content information generation submodule is used to generate content information for the specified cross-border case based on the target legal clause information. The appeal text acquisition submodule is used to fill the content information into the corresponding position of the appeal text template to obtain the appeal text of the specified cross-border case.
[0059] In one embodiment, the LLM-based cross-border appeal text generation apparatus further includes: The priority information acquisition module is used to acquire priority information between the target legal clause information and the associated legal clause information; The first judgment module is used to determine whether the target legal clause information is superior to the associated legal clause information; The appeal text acquisition module is used to generate an appeal text for the designated cross-border case based on the target legal clause information if the target legal clause information is superior to the associated legal clause information.
[0060] In one embodiment, the LLM-based cross-border appeal text generation apparatus further includes: The appeal success rate acquisition module is used to input the appeal text and the case content into a preset simulator to obtain the appeal success rate; The first judgment module is used to determine whether the appeal success rate is greater than the preset success rate; The appeal module is used to file an appeal based on the appeal text if the appeal success rate is greater than a preset success rate.
[0061] Figure 4 An internal structural diagram of an electronic device in one embodiment is shown. This electronic device can specifically be a terminal or a server, and more specifically, a computer device. Figure 4As shown, the electronic device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement an LLM-based cross-border appeal text generation method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to execute an LLM-based cross-border appeal text generation method. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0062] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps: Extract the case details and related legal clauses of a designated cross-border case; The case content is mapped into a pre-defined legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content. Each of the relevant legal clauses and the associated legal clauses are converted into logical expressions according to a preset conversion method, resulting in a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The first and second logical expressions are checked for logical conflicts using a preset logical conflict detection method. The relevant legal clause information corresponding to the first logical expression that has a logical conflict is recorded as the target legal clause information; The appeal text for the designated cross-border case is generated based on the target legal clause information. By extracting case information and mapping it to a legal knowledge graph, generating logical expressions, and performing conflict detection, conflicts between legal clauses are identified, and the appeal text is generated based on the conflicting target legal clause information. This enables timely identification of logical conflicts between relevant legal clauses, reduces legal risks caused by misunderstandings or inappropriate clause selection, significantly improves the efficiency of appeal text drafting, automatically extracts case information and generates corresponding appeal texts, and shortens working time.
[0063] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps: Extract the case details and related legal clauses of a designated cross-border case; The case content is mapped into a pre-defined legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content. Each of the relevant legal clauses and the associated legal clauses are converted into logical expressions according to a preset conversion method, resulting in a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The first and second logical expressions are checked for logical conflicts using a preset logical conflict detection method. The relevant legal clause information corresponding to the first logical expression that has a logical conflict is recorded as the target legal clause information; The appeal text for the designated cross-border case is generated based on the target legal clause information. By extracting case information and mapping it to a legal knowledge graph, generating logical expressions, and performing conflict detection, conflicts between legal clauses are identified, and the appeal text is generated based on the conflicting target legal clause information. This enables timely identification of logical conflicts between relevant legal clauses, reduces legal risks caused by misunderstandings or inappropriate clause selection, significantly improves the efficiency of appeal text drafting, automatically extracts case information and generates corresponding appeal texts, and shortens working time.
[0064] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0065] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0066] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for generating cross-border appeal text based on LLM, characterized in that, The method includes: Extract the case details and related legal clauses of a designated cross-border case; The case content is mapped into a pre-defined legal knowledge graph using an LLM model to obtain information on multiple relevant legal clauses associated with the case content. The relevant legal clause information and the associated legal clause information are converted into logical expressions according to a preset conversion method to obtain the first logical expression corresponding to each of the relevant legal clause information and the second logical expression corresponding to the associated legal clause information. The first and second logical expressions are checked for logical conflicts using a preset logical conflict detection method. The relevant legal clause information corresponding to the first logical expression that has a logical conflict is recorded as the target legal clause information; The appeal text for the designated cross-border case is generated based on the target legal provisions information.
2. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, Before the step of mapping the case content to a preset legal knowledge graph using an LLM model to obtain information on multiple related legal clauses associated with the case content, the method further includes: Obtain legal clause information data from multiple preset regions; Extract the entities and relationships between them from the legal clause information data; The preset legal knowledge graph is constructed based on entities and the relationships between them.
3. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, Before the step of mapping the case content to a preset legal knowledge graph using an LLM model to obtain information on multiple related legal clauses associated with the case content, the method further includes: Obtain the target region where the specified cross-border case is located; Obtain the preset legal knowledge graph corresponding to the target region from the preset knowledge graph database; wherein, the preset knowledge graph database includes legal knowledge graphs for each region.
4. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, Following the step of generating the appeal text for the designated cross-border case based on the target legal provisions information, the method further includes: Obtain the target region where the specified cross-border case is located; A provisional text for the designated cross-border case is generated based on the target legal provisions information; wherein the language of the provisional text is a first language; Obtain the second language of the target region, and retrieve the core terminology mapping library of the first language and the second language from a preset database; The temporary text is converted based on a preset translation system and the core terminology mapping library to obtain the appeal text.
5. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, The step of generating the appeal text for the designated cross-border case based on the target legal provisions information includes: Obtain the target region where the specified cross-border case is located; Obtain the appeal text template for the target area; Generate the content information of the designated cross-border case based on the target legal provisions information; Fill the content information into the corresponding position of the appeal text template to obtain the appeal text for the specified cross-border case.
6. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, After the step of recording the relevant legal clause information corresponding to the first logical expression with logical conflict as the target legal clause information, the method further includes: Priority information for obtaining the target legal clause information and the associated legal clause information; Determine whether the target legal clause information is superior to the associated legal clause information; If the target legal clause information is superior to the associated legal clause information, then the appeal text for the designated cross-border case is generated based on the target legal clause information.
7. The method for generating cross-border appeal text based on LLM according to claim 1, characterized in that, Following the step of generating the appeal text for the designated cross-border case based on the target legal provisions information, the method further includes: Input the appeal text and the case details into a preset simulator to obtain the appeal success rate; Determine whether the appeal success rate is greater than the preset success rate; If the appeal success rate is greater than the preset success rate, then the appeal will be initiated based on the appeal text.
8. A cross-border appeal text generation device based on LLM, characterized in that, The device includes: The extraction module is used to extract the case content and related legal clauses of a specified cross-border case; The acquisition module is used to map the case content into a preset legal knowledge graph through an LLM model in order to obtain information on multiple related legal clauses associated with the case content; The conversion module is used to convert each of the relevant legal clauses and the associated legal clauses into logical expressions according to a preset conversion method, so as to obtain a first logical expression corresponding to each of the relevant legal clauses and a second logical expression corresponding to the associated legal clauses. The detection module is used to detect whether each of the first logical expression and the second logical expression has a logical conflict by using a preset logical conflict detection method; A tagging module is used to mark the relevant legal clause information corresponding to the first logical expression that has a logical conflict as the target legal clause information; A designated module is used to generate the appeal text for the designated cross-border case based on the target legal provisions information.
9. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, causes the processor to perform the steps of the LLM-based cross-border appeal text generation method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the LLM-based cross-border appeal text generation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Case judgment result determination method, device and equipment, and computer readable storage medium
CN110825879A
Legal document generation method and device, electronic equipment and storage medium
CN119886097A
Intelligent legal text analysis method based on legal concept pedigree
CN119990290A
Law query system based on big data
CN120448523A