Semantic-based case document cutting method and device and related equipment

By constructing a semantic tree and evaluating the completeness of subtrees through a semantic-based case document segmentation method, the problem of traditional segmentation methods destroying document logic is solved, achieving efficient and accurate document fragmentation and improving the performance of the legal case retrieval system.

CN121303136APending Publication Date: 2026-01-09BEIJING TAIXIN TIANCHENG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511444637.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Traditional case document segmentation methods disrupt the document's internal logic, leading to reduced efficiency and accuracy of the retrieval system.

Method used

The semantic-based case document segmentation method obtains and preprocesses case documents, identifies entities and entity relationships, constructs a semantic tree, uses a large language model to evaluate the completeness of subtrees, and performs document segmentation to ensure that each segment contains complete legal meaning units.

Benefits of technology

This ensures that each document fragment contains a complete legally meaningful unit, avoiding the disruption of the document's internal logic caused by traditional segmentation methods, improving retrieval efficiency and accuracy, and enhancing user experience and system usability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121303136A_ABST
    Figure CN121303136A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a case document cutting method and device based on semantics and related equipment. The method comprises the following steps: acquiring a case document, and preprocessing the case document to obtain a standard text; semantic recognition is conducted on the standard text according to the standard logic structure, and entities and entity relations in the standard text are recognized; building a semantic tree of the case document based on the entities and the entity relationship; evaluating the element integrity of each sub-tree of the semantic tree based on a pre-trained large language model, and judging whether the element integrity is greater than a preset threshold; if the element integrity of the sub-tree is greater than a threshold value, taking the document content corresponding to the sub-tree as a document fragment to perform document segmentation; if the element integrity of the sub-tree is lower than the threshold value, text length detection is conducted on the sub-tree, and the content of the sub-tree is optimized according to the text length till the element integrity of the sub-tree is larger than the integrity threshold value. According to the method, the damage of the traditional cutting mode to the internal logic of the document is avoided, and the case can be better understood and used.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of document segmentation technology, and in particular to a semantic-based case document segmentation method, apparatus and related equipment. Background Technology

[0002] In legal case retrieval systems, segmenting and storing case documents is a crucial step. Traditional methods of segmenting case documents often rely on fixed lengths or simple punctuation marks, which have significant drawbacks.

[0003] Legal case documents have a rigorous structure, containing key sections such as case background, claims, evidence, reasoning, and judgment, with each section logically interconnected. Traditional segmentation methods easily disrupt this internal logic, such as dividing complete reasoning into different parts. This makes it difficult to retrieve complete information during subsequent searches, severely impacting the understanding and use of the case, and ultimately reducing the efficiency and accuracy of legal case retrieval systems. Summary of the Invention

[0004] The embodiments of the present invention provide a semantic-based case document segmentation method, apparatus and related equipment, which aim to solve the technical problem of difficulty in reasonably segmenting case documents in traditional technologies.

[0005] In a first aspect, embodiments of the present invention provide a semantic-based case document segmentation method, which includes:

[0006] Obtain the case document and preprocess it to obtain standard text;

[0007] Based on the standard logical structure of the case document, semantic recognition is performed on the standard text to identify entities and entity relationships in the standard text. The entities are legal elements, which at least include parties, time, place of occurrence, and legal clauses. The case document is a case document in the legal field.

[0008] Based on the entities and entity relationships, the entities that serve as root nodes, child nodes, and corresponding subordinate nodes are determined, and the semantic tree of the case document is constructed according to the entity relationships.

[0009] The element completeness of each subtree in the semantic tree is evaluated based on a pre-trained large language model, and it is determined whether the element completeness is greater than a preset threshold. The subtree includes a child node and a corresponding lower-level node.

[0010] If the element completeness of the subtree is greater than the threshold, then the document content corresponding to the subtree is used as a document fragment for document segmentation.

[0011] If the element completeness of the subtree is lower than the threshold, then the text length of the subtree is detected, and the content of the subtree is optimized according to the text length until the element completeness of the subtree is greater than the completeness threshold.

[0012] Secondly, embodiments of the present invention provide a semantic-based case document segmentation device, comprising:

[0013] The acquisition module is used to acquire case documents and preprocess the case documents to obtain standard text;

[0014] The identification module is used to perform semantic recognition on the standard text according to the standard logical structure of the case document, and to identify entities and entity relationships in the standard text. The entities are legal elements, and the legal elements include at least parties, time, place of occurrence and legal clauses. The case document is a case document in the legal field.

[0015] The construction module is used to determine the entities as root nodes, child nodes and corresponding subordinate nodes based on the entities and entity relationships, and to construct the semantic tree of the case document according to the entity relationships;

[0016] The judgment module is used to evaluate the element completeness of each subtree in the semantic tree based on the pre-trained large language model, and to determine whether the element completeness is greater than a preset threshold. The subtree includes a child node and a corresponding lower-level node.

[0017] The cutting module is used to cut the document content corresponding to the subtree into a document slice if the element completeness of the subtree is greater than the threshold.

[0018] The detection module is used to perform text length detection on the subtree if the element completeness of the subtree is lower than the threshold, and optimize the content of the subtree according to the text length until the element completeness of the subtree is greater than the completeness threshold.

[0019] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the semantic-based case document segmentation method described in the first aspect.

[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the semantic-based case document segmentation method described in the first aspect.

[0021] This invention provides a semantic-based case document segmentation method, apparatus, and related equipment. The method acquires case documents and preprocesses them to obtain standard text; it performs semantic recognition on the standard text based on the standard logical structure of the case documents, identifying entities and entity relationships within the standard text; it determines entities as root nodes, child nodes, and corresponding lower-level nodes based on the entities and entity relationships, and constructs a semantic tree for the case documents according to the entity relationships; it evaluates the element completeness of each subtree in the semantic tree based on a pre-trained large language model, and determines whether the element completeness is greater than a preset threshold; if the element completeness of a subtree is greater than the threshold, the document content corresponding to the subtree is segmented as a document fragment; if the element completeness of a subtree is less than the threshold, the text length of the subtree is detected, and the content of the subtree is optimized according to the text length until the element completeness of the subtree is greater than the completeness threshold. This method constructs a semantic tree of case documents based on legal semantics, and segments cases according to the subtrees of the semantic tree. It can accurately identify key legal elements and logical relationships in case documents, ensuring that each document segment contains a complete legal meaning unit. This avoids the destruction of the internal logic of documents by traditional segmentation methods and helps to better understand and use cases. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating an embodiment of the semantic-based case document segmentation method provided by the present invention.

[0024] Figure 2 This is a schematic block diagram of a semantic-based case document segmentation device provided in an embodiment of the present invention. Detailed Implementation

[0025] 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, not all, of the embodiments of the present invention. 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.

[0026] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0028] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0029] Please see Figure 1 This is a flowchart illustrating a semantic-based case document segmentation method provided in an embodiment of the present invention, which includes steps S110 to S160.

[0030] Step S110: Obtain the case document and preprocess the case document to obtain standard text;

[0031] In this embodiment, case documents are obtained from sources such as the China Judgments Online API, local files (PDF / Word / TXT), and databases, covering civil, criminal, and administrative case types. The obtained case documents undergo preprocessing, including noise removal and standardization, to obtain standard text. Noise removal includes deleting meaningless content such as headers and footers, court seals, page numbers, and repeated full-text legal provisions; removing garbled characters and invisible characters (such as \r); and standardizing punctuation (e.g., standardizing commas to Chinese commas). Standardization involves converting all documents to plain text in a uniform format, splitting them into paragraphs (using blank lines as delimiters), and loading a legal dictionary (containing terms such as "apparent agency" and "bona fide acquisition"). A forward maximum matching word segmentation method is used to avoid splitting technical terms (e.g., "counterclaim plaintiff" is not split into "counterclaim" and "plaintiff").

[0032] Step S120: Perform semantic recognition on the standard text according to the standard logical structure of the case document, and identify the entities and entity relationships in the standard text;

[0033] In this embodiment, the standard logical structure of a pre-defined legal case is "Case Background → Claims → Evidence → Points of Contention → Reasoning for Judgment → Court's Opinion → Judgment". Using a large-scale model and its semantic understanding capabilities of legal texts, entity information within the document is identified, including:

[0034] Subject entities: Parties to the case (distinguishing between "plaintiff / defendant in the original suit" and "plaintiff / defendant in the counterclaim"), agents, and the judicial panel, etc.

[0035] Factual entities: Time of the incident (e.g., "Contract signing date 2023.5.10"), Place of the incident (e.g., "Rental address XX Road XX No.", Note: In online cases, the place of the incident is the IP address), Core facts (e.g., "Party B did not pay the rent for October-December 2023");

[0036] Legal entities: cited legal provisions (including their numbers and contents, such as "Article 577 of the Civil Code: If one party fails to perform its contractual obligations..."), and legal characterizations (such as "liability for breach of contract" or "liability for tort").

[0037] Structural entities: case background, litigation claims (e.g., "termination of contract"), evidentiary materials (e.g., "lease contract (No. HT-2023-0510)"), points of contention (e.g., "whether the liquidated damages are excessive"), reasoning of the judgment, and judgment result, etc.;

[0038] Based on the identified entity information, structured tags are used to clarify their attribution relationships and logical functions. For example: housing rental contract → [Attribution element: evidence material] → [Function: support] → termination of contract.

[0039] Identify the legal logical relationships between elements and generate triples (entity 1, relation, entity 2):

[0040] Supporting relationship: Evidence materials → Supporting evidence → Claims;

[0041] Correspondence: Point of contention → Corresponding factor → Reasoning of the judgment;

[0042] Based on the following relationship: Reasoning for the judgment → Basis → Legal provisions;

[0043] Derivational relationship: The court holds → Derivation → Judgment result.

[0044] Step S130: Based on the entities and entity relationships, determine the entities that serve as the root node, child nodes, and corresponding lower-level nodes, and construct the semantic tree of the case document according to the entity relationships;

[0045] In this embodiment, based on the identified elements and combined with the logical chain analysis capabilities of the large model, a hierarchical semantic tree for case documents is constructed. The case background is used as the root node of the semantic tree, containing basic case information such as cause of action and case type. Sub-nodes are divided according to the logical structure of legal case documents, such as party information, claims, points of contention, court opinion, and judgment. Lower-level nodes are the element breakdowns of sub-nodes; for example, claims are broken down into contract termination, liquidated damages, and payment of due remuneration. Nodes are connected using tags based on the logical relationships analyzed by the large model (e.g., claims – evidence – reasoning – judgment), such as evidence → supporting evidence → claims, points of contention → corresponding evidence → reasoning. This tree structure clearly presents the internal logic of the case document. For example:

[0046] Root node: Case background (including cause of action, such as "House rental contract dispute: Party B failed to pay rent for October-December 2023");

[0047] Sub-nodes: Claims, Evidence, Points of Contention, Reasoning, Court Opinion, Judgment;

[0048] Sub-nodes: Sub-elements of each sub-node (such as "Contract Termination" and "Payment of Rent of 15,000 Yuan" under "Litigation Claim");

[0049] Sub-sub-nodes: The specific content of the sub-nodes (e.g., "contract number, signing time" corresponding to "contract termination").

[0050] Step S140: Evaluate the element completeness of each subtree in the semantic tree based on the pre-trained large language model, and determine whether the element completeness is greater than a preset threshold.

[0051] Step S150: If the element completeness of the subtree is greater than the threshold, then the document content corresponding to the subtree is used as a document fragment for document segmentation.

[0052] Step S160: If the element completeness of the subtree is lower than the threshold, then the text length of the subtree is detected, and the content of the subtree is optimized according to the text length until the element completeness of the subtree is greater than the completeness threshold.

[0053] In this embodiment, an LLaMA model fine-tuned based on legal domain corpus is selected. The legal semantic understanding capability of the LLaMA model is used to evaluate the element completeness of the subtrees of the semantic tree, and the element completeness of the subtree is input. A subtree includes a child node and its corresponding subordinate nodes. For example:

[0054] Complete subtree: "Litigation claim (contract termination) + Evidence (lease contract stipulates termination upon expiration) + Related relationships (supporting evidence)" → Score 9.2;

[0055] Incomplete subtree: "Litigation request (contract termination)" (no supporting evidence) → Score 5.6.

[0056] For subtrees with element completeness greater than the threshold, they are cut as independent document fragments, generating "semantic tags" (such as "contract termination - evidence support"), and marking their path in the semantic tree (such as "root node → litigation request → contract termination").

[0057] For subtrees with element completeness below the threshold, the text length of the subtree is checked. If the text length of the subtree is greater than the preset upper limit (>6000 characters), the logical breakpoints of the subtree are identified (i.e., the completeness of the logical chain of the subtree is checked), and the subtree is split according to the logical breakpoints until the element completeness of the split subtree is greater than the completeness threshold. If the text length of the subtree is less than the preset lower limit (<300 characters), the subtree is merged with the corresponding parent node according to the entity relationship (e.g., "Payment Rent Request" and its parent node "Payment Reminder SMS Record"). The merged subtrees are re-evaluated. If the score is still below the completeness threshold, the next higher-level subtrees are merged until the element completeness of the merged subtree exceeds the completeness threshold. For example, merging "Payment reminder SMS record" + "Request to pay rent of 15,000 yuan" → generating a new segment (score 8.5)). If the text length of a subtree is less than the preset upper length limit but greater than the preset lower length limit, the elements of the current subtree are determined to be incomplete. Subtrees with related relationships to the current subtree are identified using a large language model and merged until the element completeness of the current subtree exceeds the completeness threshold. The upper and lower length limits are defined by the user based on the details of the case document.

[0058] Furthermore, the identification of logical breakpoints specifically includes: constructing a separate "logical breakpoint sample set" to train a large language model, enabling the large language model to learn to recognize "semantic coherence strength," for example:

[0059] Positive samples (high scores): Subtrees containing complete logical steps (e.g., "fact determination → legal citation → conclusion");

[0060] Negative samples (low scores): truncated logical chains (e.g., only "factual findings" are present, but lack "legal citation" and "conclusion").

[0061] This segmentation, where each fragment possesses independent and complete legal significance, allows for more precise indexing based on the fragment's content. When users perform searches, they can quickly locate the document fragment containing the required information, improving retrieval efficiency. Simultaneously, it avoids interference from irrelevant information caused by logically confused document segmentation, enhancing the accuracy of search results. Furthermore, well-organized document segmentation makes case document management more convenient, allowing users to quickly locate the desired case section based on the document fragment's content, improving the user experience. In addition, accurate document segmentation provides a reliable data foundation for case analysis, statistics, and other applications, enhancing the overall usability of the legal case retrieval system.

[0062] Furthermore, in practical applications, the results after segmentation can be verified as needed. The verification process includes: randomly selecting 10% of document fragments for manual review to check for "logical breaks" (such as the separation of "legal citation" and "fact determination" after segmentation); and optimizing the scoring parameters of the large language model in reverse based on the detection results (such as adjusting the weight of "logical closure").

[0063] This method acquires case documents and preprocesses them to obtain standard text. It then performs semantic recognition on the standard text based on the standard logical structure of the case documents, identifying entities and entity relationships within them. Based on these entities and relationships, it determines the entities that serve as root nodes, child nodes, and corresponding lower-level nodes, constructing a semantic tree for the case documents according to these entity relationships. A pre-trained large language model is used to evaluate the element completeness of each subtree in the semantic tree, determining whether the element completeness exceeds a preset threshold. If the element completeness of a subtree exceeds the threshold, the document content corresponding to that subtree is treated as a document fragment for document segmentation. If the element completeness of a subtree is below the threshold, the text length of the subtree is detected, and the content of the subtree is optimized based on the text length until the element completeness of the subtree exceeds the completeness threshold. This method constructs a semantic tree for case documents based on legal semantics and segments cases according to the subtrees of the semantic tree. This accurately identifies key legal elements and logical relationships in the case documents, ensuring that each document fragment contains complete legal meaning units. This avoids the destruction of the document's internal logic caused by traditional segmentation methods, facilitating better understanding and use of the cases.

[0064] This invention also provides a semantic-based case document segmentation apparatus, which is used to execute any of the aforementioned semantic-based case document segmentation methods. Specifically, please refer to... Figure 2 , Figure 2 This is a schematic block diagram of a semantic-based case document segmentation device provided in an embodiment of the present invention. The semantic-based case document segmentation device 100 can be configured in a server.

[0065] like Figure 2 As shown, the semantic-based case document segmentation device 100 includes an acquisition module 110, an identification module 120, a construction module 130, a judgment module 140, a segmentation module 150, and a detection module 160.

[0066] The acquisition module 110 is used to acquire case documents and preprocess the case documents to obtain standard text;

[0067] The identification module 120 is used to perform semantic recognition on the standard text according to the standard logical structure of the case document, and to identify entities and entity relationships in the standard text. The entities are legal elements, and the legal elements include at least parties, time, place of occurrence and legal clauses.

[0068] The construction module 130 is used to determine the entities as root nodes, child nodes and corresponding lower-level nodes based on the entities and entity relationships, and to construct the semantic tree of the case document according to the entity relationships, wherein the case background of the case document is used as the root node, each legal element and its sub-elements are used as child nodes, and the specific content of each legal element is used as the corresponding lower-level node of the child node.

[0069] The judgment module 140 is used to evaluate the element completeness of each subtree in the semantic tree based on the pre-trained large language model, and to determine whether the element completeness is greater than a preset threshold. The subtree includes a child node and a corresponding lower-level node.

[0070] The cutting module 150 is used to cut the document content corresponding to the subtree into a document slice if the element completeness of the subtree is greater than the threshold.

[0071] The detection module 160 is used to perform text length detection on the subtree if the element completeness of the subtree is lower than the threshold, and optimize the content of the subtree according to the text length until the element completeness of the subtree is greater than the completeness threshold.

[0072] In one embodiment, the detection module 160 includes:

[0073] The splitting unit is used to identify logical breakpoints in the subtree according to legal argumentation steps if the text length of the subtree is greater than a preset length limit, and to split the subtree according to the logical breakpoints until the element completeness of the split subtree is greater than the completeness threshold. The logical breakpoints are:

[0074] The merging unit is used to merge the subtree with the corresponding parent node according to the entity relationship if the text length of the subtree is less than a preset lower length limit, until the element completeness of the merged subtree is greater than the completeness threshold.

[0075] In one embodiment, the construction module 130 includes:

[0076] The first extraction unit is used to extract the case background of the case document and use the case background as the root node of the semantic tree;

[0077] The second extraction unit is used to extract the corresponding entities from the case document as child nodes of the case document according to a preset legal logic chain, wherein the legal logic chain is: litigation claim -- evidence materials -- disputed issues -- reasoning for judgment -- judgment result;

[0078] The third extraction unit is used to extract the corresponding entities from the case document as the corresponding lower-level nodes according to the topic corresponding to the entity of each child node.

[0079] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the semantic-based case document segmentation method described above.

[0080] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be a non-volatile computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the semantic-based case document segmentation method as described above.

[0081] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0082] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0084] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0085] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.

[0086] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A semantic-based case document segmentation method, characterized in that, include: Obtain the case document and preprocess it to obtain standard text; Based on the standard logical structure of the case document, semantic recognition is performed on the standard text to identify entities and entity relationships in the standard text. The entities are legal elements, which at least include parties, time, place of occurrence, and legal clauses. The case document is a case document in the legal field. Based on the entities and entity relationships, the entities that serve as root nodes, child nodes, and corresponding subordinate nodes are determined, and the semantic tree of the case document is constructed according to the entity relationships. The element completeness of each subtree in the semantic tree is evaluated based on a pre-trained large language model, and it is determined whether the element completeness is greater than a preset threshold. The subtree includes a child node and a corresponding lower-level node. If the element completeness of the subtree is greater than the threshold, then the document content corresponding to the subtree is used as a document fragment for document segmentation. If the element completeness of the subtree is lower than the threshold, then the text length of the subtree is detected, and the content of the subtree is optimized according to the text length until the element completeness of the subtree is greater than the completeness threshold.

2. The semantic-based case document segmentation method as described in claim 1, characterized in that, The step of performing text length detection on the subtree and optimizing the content of the subtree based on the text length until the element completeness of the subtree is greater than the completeness threshold includes: If the text length of the subtree is greater than the preset length limit, then the logical breakpoint of the subtree is identified according to the legal argumentation steps, and the subtree is split according to the logical breakpoint until the element completeness of the split subtree is greater than the completeness threshold. If the text length of the subtree is less than the preset minimum length, the subtree is merged with the corresponding parent node according to the entity relationship until the element completeness of the merged subtree is greater than the completeness threshold. If the text length of a subtree is less than the preset upper limit but greater than the preset lower limit, then the subtrees that are related to the current subtree are identified by the large language model and merged until the element completeness of the current subtree is greater than the completeness threshold.

3. The semantic-based case document segmentation method as described in claim 1, characterized in that, The step of determining the entities as root nodes, child nodes, and corresponding subordinate nodes based on the entities and entity relationships, and constructing the semantic tree of the case document according to the entity relationships, includes: Extract the cause of action from the case document and use the cause of action as the root node of the semantic tree; According to a preset legal logic chain, the corresponding entities are extracted from the case document as child nodes of the case document. The legal logic chain is: litigation claim -- evidence materials -- reasoning for judgment -- judgment result. Extract the corresponding entities from the case document as the corresponding sub-nodes based on the topic of each sub-node's entity.

4. A semantic-based case document segmentation device, characterized in that, include: The acquisition module is used to acquire case documents and preprocess the case documents to obtain standard text; The identification module is used to perform semantic recognition on the standard text according to the standard logical structure of the case document, and to identify entities and entity relationships in the standard text. The entities are legal elements, and the legal elements include at least parties, time, place of occurrence and legal clauses. The case document is a case document in the legal field. The construction module is used to determine the entities as root nodes, child nodes and corresponding subordinate nodes based on the entities and entity relationships, and to construct the semantic tree of the case document according to the entity relationships; The judgment module is used to evaluate the element completeness of each subtree in the semantic tree based on the pre-trained large language model, and to determine whether the element completeness is greater than a preset threshold. The subtree includes a child node and a corresponding lower-level node. The cutting module is used to cut the document content corresponding to the subtree into a document slice if the element completeness of the subtree is greater than the threshold. The detection module is used to perform text length detection on the subtree if the element completeness of the subtree is lower than the threshold, and optimize the content of the subtree according to the text length until the element completeness of the subtree is greater than the completeness threshold.

5. The semantic-based case document segmentation device as described in claim 1, characterized in that, The detection module includes: The splitting unit is used to identify logical breakpoints in the subtree according to legal argumentation steps if the text length of the subtree is greater than a preset length limit, and to split the subtree according to the logical breakpoints until the element completeness of the split subtree is greater than the completeness threshold. The logical breakpoints are: The merging unit is used to merge the subtree with the corresponding parent node according to the entity relationship if the text length of the subtree is less than a preset lower length limit, until the element completeness of the merged subtree is greater than the completeness threshold.

6. The semantic-based case document segmentation device as described in claim 1, characterized in that, The building module includes: The first extraction unit is used to extract the case background of the case document and use the case background as the root node of the semantic tree; The second extraction unit is used to extract the corresponding entities from the case document as child nodes of the case document according to a preset legal logic chain, wherein the legal logic chain is: litigation claim -- evidence materials -- disputed issues -- reasoning for judgment -- judgment result; The third extraction unit is used to extract the corresponding entities from the case document as the corresponding lower-level nodes according to the topic corresponding to the entity of each child node.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the semantic-based case document segmentation method as described in any one of claims 1 to 3.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the semantic-based case document segmentation method as described in any one of claims 1 to 3.