A method and system for parsing and archiving unstructured legal documents
By adjusting the confidence level and hierarchical architecture of the parsing engine, the problems of missing sparse blocks and noise in dense blocks in unstructured legal documents were solved, enabling efficient parsing and archiving of legal documents and ensuring data integrity and traceability.
Patent Information
- Application Number
- CN202611335019.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies, when processing unstructured legal documents, employ a uniform processing strategy that leads to the omission of sparse blocks and the inclusion of noise in dense blocks. Furthermore, the parsing results are disconnected from business forms, failing to meet the stringent requirements of judicial file management.
By acquiring the original text fragments and business type identifiers of unstructured legal documents, calculating the element density and text structure variation frequency, adjusting the confidence level and hierarchical architecture of the parsing engine, and performing source tracing and association to generate element parsing archive records.
It improves the parsing capabilities of unstructured legal documents, ensures the integrity, accuracy, and traceability of archived data, and meets the needs of judicial record management.
Smart Images

Figure CN123068633A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of document archiving technology, and more specifically, to a method and system for parsing and archiving unstructured legal documents. Background Technology
[0002] Business scenarios such as judicial and litigation liability insurance accumulate a large number of legal documents such as judgments and contracts. These documents are unstructured documents without a fixed format. When using them, a natural language processing parsing engine is needed to extract elements such as parties, amounts, and dates and archive them.
[0003] Conventional parsing engines operate with a fixed hierarchical architecture and a uniform confidence threshold. However, the distribution of elements in legal documents varies significantly. Under a uniform strategy, elements in sparse blocks are missed due to low confidence, while dense blocks are mixed with noisy elements. When dense blocks are concentrated, some parsing levels are overloaded and congested, while other levels are idle. Furthermore, the parsing results are disconnected from the form system of specific business operations, and the original source of the data cannot be traced back to the database. The integrity, balance, and traceability of the archives are difficult to guarantee, and the strict requirements of judicial file management cannot be met. Summary of the Invention
[0004] In view of this, the present invention proposes a method and system for element parsing and archiving of unstructured legal documents, aiming to solve the problems of existing legal document parsing and archiving methods, such as the uniform processing strategy, the coexistence of sparse block omissions and dense block noise, duplicate element entry, and the disconnect between the archiving results and business forms, making them untraceable.
[0005] This invention proposes a method for parsing and archiving elements of unstructured legal documents, including: Obtain the original text fragments, business type identifiers, and block extraction results of unstructured legal documents from the parsing engine; A preset element extraction benchmark threshold is determined based on the business type identifier, and the element density of each document block in the unstructured legal document is calculated based on the original text fragment. The element density is compared with the preset element extraction benchmark threshold to obtain the element distribution state of each document block. The element distribution state includes a sparse element state and a dense element state. Obtain the frequency of text structure variation in the unstructured legal document, and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements; If the feature is sparse, the extraction results of each block of the parsing engine are adjusted based on the confidence adjustment factor and the preset feature calibration module; if the feature is dense, the hierarchical architecture and feature allocation of the parsing engine are adjusted according to the feature distribution imbalance and the confidence adjustment factor. After adjusting for sparse or dense features, the extraction results of each block from the parsing engine are traced and associated according to the document block identifier. Based on the business type identifier and the traceability association, feature parsing archive records are generated and stored in a preset archive library.
[0006] Further, determining the preset element extraction benchmark threshold based on the business type identifier includes: Multiple document type identifier data are obtained, and the initial feature extraction benchmark threshold is adjusted based on the business type identifier and the multiple document type identifier data to obtain the adjusted preset feature extraction benchmark threshold.
[0007] Further, the frequency of text structure variation in the unstructured legal document is obtained, and a confidence adjustment factor is determined based on the frequency of text structure variation and the distribution status of elements, including: The original text segment is structurally segmented to determine the number of text structural changes between adjacent document blocks, and the text structural variation frequency is calculated based on the number of text structural changes. A benchmark adjustment coefficient is determined based on the distribution state of the elements. The benchmark adjustment coefficient takes a first benchmark value when the elements are sparse and a second benchmark value when the elements are dense. A mutation penalty term is determined based on the frequency of text structure mutations, and the mutation penalty term is positively correlated with the frequency of text structure mutations; The confidence adjustment factor is determined based on the product of the baseline adjustment coefficient and the variation penalty term.
[0008] Furthermore, if the feature is sparse, the extraction results of each block of the parsing engine are adjusted based on the confidence adjustment factor and the preset feature calibration module, including: The initial element determination confidence limit of the parsing engine is corrected based on the confidence adjustment factor to obtain the corrected effective confidence limit. From the extraction results of each block of the parsing engine, candidate element instances with a confidence level lower than the initial element judgment confidence level limit and greater than or equal to the effective confidence level limit are selected. The selected candidate element instances are added to the extraction results of the corresponding document blocks.
[0009] Furthermore, if the element density is high, the hierarchical architecture and element allocation of the parsing engine are adjusted according to the element distribution imbalance and the confidence adjustment factor, including: The initial element determination confidence limit of the parsing engine is corrected according to the confidence adjustment factor to obtain the corrected second effective confidence limit. The parsing engine filters the feature instances extracted in the current document block based on the second effective confidence limit, retaining the effective feature instances; The initial load index of each extraction level is determined based on the ratio of the number of effective element instances corresponding to each extraction level to the standard element capacity of the corresponding level. Based on the aforementioned imbalance in the distribution of elements, the initial load index of each extraction level is compensated for to obtain the element load saturation of each extraction level. Identify the overloaded levels of elements whose element load saturation exceeds the preset upper limit, and the underloaded levels of elements whose load saturation is below the preset lower limit; In the overload level of the elements, the overload level is determined according to the uneven distribution of the elements. The single-channel serial extraction architecture of the overload level of the elements is reconstructed into a multi-channel parallel extraction architecture with a number of channels corresponding to the overload level. The sequence of elements to be processed in the overload level of the elements is divided according to semantic boundaries and then distributed to each parallel extraction channel. The idle extraction resources of the underloaded element level are reallocated to the multi-channel parallel extraction architecture.
[0010] Further, the sequence of elements to be processed at the element overload level is segmented according to semantic boundaries and then distributed to each parallel extraction channel, including: Based on the strength of the contextual semantic association between adjacent element instances in the sequence of elements to be processed at the overloaded level of the elements, determine the semantic boundary cutting point; The sequence of elements to be processed is divided into multiple semantically coherent subsequences based on the semantic boundary cutting points. Obtain the channel processing capacity of each of the parallel extraction channels, and allocate each of the semantically coherent subsequences to the corresponding parallel extraction channels according to the channel processing capacity. When the number of element instances of the semantically coherent subsequence exceeds the channel processing capacity, the semantically coherent subsequence is re-segmented according to the layout label boundary before being re-allocated.
[0011] Furthermore, before tracing and associating the extraction results of each block from the parsing engine according to the document block identifier, and generating the element parsing archive record based on the business type identifier and the tracing association, the process further includes: Based on the preset target business legal entity identification rule tag library, structured fields related to the target business risk assessment are extracted from the results of each block of the adjusted parsing engine. The structured fields are coupled and matched with preset target business rules to generate legal entity-specific mapping classification results corresponding to the structured fields; The structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form to build the digital archiving capability for the target business.
[0012] Furthermore, based on a pre-defined target business legal entity identification rule tag library, structured fields related to the target business risk assessment are extracted from the results of each block extraction of the adjusted parsing engine, including: Based on the target business legal entity identification rule tag library, determine the set of target legal entity types related to the target business risk assessment; From the extracted results of each block of the adjusted parsing engine, candidate element instances belonging to the target legal entity type set are selected; The candidate element instances are filtered by confidence level, and the candidate element instances with confidence levels higher than the preset target business element confidence threshold are determined as the structured fields.
[0013] Furthermore, the structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form, including: Based on the legal entity-specific mapping classification results, determine the target filling position of the structured field in the standardized element form; Based on the document block identifier corresponding to the structured field, establish a source association between the target filling position and the original text fragment in the unstructured legal document; The structured fields, the legal entity-specific mapping classification results, and the source association are filled into the standardized element form, and the filled element form is stored in the archive as an element parsing archive record.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: The system acquires the original text fragments, business type identifiers, and extraction results of each block from unstructured legal documents; determines the preset element extraction benchmark threshold based on the business type identifier, calculates the element density based on the original text fragments, and obtains the element distribution status; determines the confidence adjustment factor based on the frequency of text structure variation and the element distribution status; if the element is sparse, adjusts the extraction results of each block based on the preset element calibration module; if the element is dense, adjusts the hierarchical architecture and element allocation based on the element distribution imbalance; and traces and associates the extraction results of each block of the parsing engine according to the document block identifier to generate element parsing archive records, thereby improving the parsing capability of legal documents with significant differences in element distribution and ensuring the integrity and accuracy of the archived data.
[0015] On the other hand, this application also provides an element parsing and archiving system for unstructured legal documents, including: The results extraction module is used to obtain the original text fragments, business type identifiers, and the extraction results of each block from the parsing engine of unstructured legal documents; The density judgment module is used to determine a preset element extraction benchmark threshold based on the business type identifier, calculate the element density of each document block in the unstructured legal document based on the original text fragment, compare the element density with the preset element extraction benchmark threshold, and obtain the element distribution state of each document block, wherein the element distribution state includes a sparse element state and a dense element state. The confidence determination module is used to obtain the frequency of text structure variation of the unstructured legal document and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements. The feature adjustment module is used to adjust the extraction results of each block of the parsing engine based on the confidence adjustment factor and the preset feature calibration module if the feature is sparse; and to adjust the hierarchical architecture and feature allocation of the parsing engine according to the feature distribution imbalance and the confidence adjustment factor if the feature is dense. The document archiving module is used to trace and associate the extraction results of each block of the parsing engine according to the document block identifier after the adjustment of the sparse or dense state of the elements, and generate element parsing archive records based on the business type identifier and the traceability association, and store them in the preset archive library. Attached Figure Description
[0016] The accompanying drawings are used to illustrate the technical solutions of the present invention and do not constitute a limitation on the scope of protection of the present invention. The process nodes, regional relationships, and functional block diagrams in the drawings are used to illustrate the implementation methods of the embodiments of the present invention. In the drawings: Figure 1 A flowchart illustrating a method for parsing and archiving unstructured legal documents, provided as an embodiment of the present invention; Figure 2 This is a functional block diagram of an element parsing and archiving system for unstructured legal documents provided in an embodiment of the present invention. Detailed Implementation
[0017] The specific embodiments of the present invention will now be described with reference to the accompanying drawings. These embodiments are used to illustrate the technical solutions of the present invention and do not limit the scope of protection of the present invention. Unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0018] In some embodiments of this application, see Figure 1 As shown, this application proposes a method for parsing and archiving unstructured legal documents, including: S110: Obtain the original text fragments, business type identifiers, and block extraction results of unstructured legal documents from the parsing engine; S120: Determine a preset element extraction benchmark threshold based on the business type identifier, and calculate the element density of each document block in the unstructured legal document based on the original text fragment. Compare the element density with the preset element extraction benchmark threshold to obtain the element distribution state of each document block. The element distribution state includes a sparse element state and a dense element state. S130: Obtain the frequency of text structure variation of the unstructured legal document, and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements; S140: If the feature is sparse, adjust the extraction results of each block of the parsing engine based on the confidence adjustment factor and the preset feature calibration module; if the feature is dense, adjust the hierarchical architecture and feature allocation of the parsing engine according to the feature distribution imbalance and the confidence adjustment factor. S150: After completing the adjustment of the sparse or dense state of the elements, the extraction results of each block of the parsing engine are traced and associated according to the document block identifier, and the element parsing archive record is generated based on the business type identifier and the traceability association and stored in the preset archive library.
[0019] Specifically, unstructured legal documents refer to legal documents that lack a fixed format and fields and are primarily composed of free text. Original text fragments refer to the plain text content obtained after text recognition and layout reconstruction of the legal document. Business type identifiers are carried by the work order information of the business system and are used to indicate the business line served by the legal document, such as the business type identifier for litigation liability insurance. The parsing engine refers to the natural language processing engine that undertakes the task of extracting elements. Internally, the parsing engine consists of three extraction layers: a layout analysis layer, an entity recognition layer, and a relationship extraction layer. The extraction results for each block refer to the element instances and their confidence levels output by the parsing engine for each document block. Element instances include, for example, the party's name, case number, preservation amount, and judgment date.
[0020] Specifically, a document block refers to a local unit of a document that is divided according to layout and semantics, and each document block is assigned a unique document block identifier.
[0021] Specifically, the element density is equal to the number of element instances identified in a document block divided by the number of characters in the block and then multiplied by 100. For example, if a document block has 200 characters and contains 3 element instances, the element density is 1.5 per 100 characters. The sparse state is used to indicate that the element density of each document block is less than or equal to the preset element extraction benchmark threshold, while the dense state is used to indicate that the element density of each document block is greater than the preset element extraction benchmark threshold.
[0022] In some embodiments of this application, determining a preset element extraction benchmark threshold based on the business type identifier includes: Multiple document type identifier data are obtained, and the initial feature extraction benchmark threshold is adjusted based on the business type identifier and the multiple document type identifier data to obtain the adjusted preset feature extraction benchmark threshold.
[0023] Specifically, document type identifier data is used to identify the specific document type of unstructured legal documents, such as judgments, complaints, mediation agreements, guarantee contracts, and lists of evidence. This is a different dimension of classification information from business type identifiers: business type identifiers determine the overall rigor of element extraction, while document type identifier data determines the threshold adaptation method under a specific document structure.
[0024] Different business operations have different requirements for element completeness; therefore, the initial threshold should be set separately for each business type. In this embodiment, the initial threshold for litigation liability insurance is 1.0 per 100 characters, which is the number of element instances identified per 100 characters. The initial threshold adjustment rule is as follows: a correction coefficient is set according to the structural complexity of the document type, and the initial threshold is corrected using the correction coefficient. The correction coefficient is set based on the natural density differences in element distribution among different document types. For example, judgments have a standardized structure and relatively uniform element distribution, so the correction coefficient is 1.0; guarantee contracts have dense clauses and concentrated element occurrences, so the correction coefficient is 1.2. The product of the initial element extraction benchmark threshold and the correction coefficient is used as the adjusted preset element extraction benchmark threshold.
[0025] The beneficial effects of the above technical solution are: the baseline threshold is first determined according to the business type, and then adjusted according to the document type, so that different businesses and different document structures have appropriate element density boundary standards. The threshold is no longer determined by a single fixed value, but adapts to the differences in business requirements and document structure, which can significantly improve the accuracy of element distribution status determination.
[0026] In some embodiments of this application, obtaining the frequency of text structure variations in the unstructured legal document, and determining a confidence adjustment factor based on the frequency of text structure variations and the distribution status of elements, includes: The original text segment is structurally segmented to determine the number of text structural changes between adjacent document blocks, and the text structural variation frequency is calculated based on the number of text structural changes. A benchmark adjustment coefficient is determined based on the distribution state of the elements. The benchmark adjustment coefficient takes a first benchmark value when the elements are sparse and a second benchmark value when the elements are dense. A mutation penalty term is determined based on the frequency of text structure mutations, and the mutation penalty term is positively correlated with the frequency of text structure mutations; The confidence adjustment factor is determined based on the product of the baseline adjustment coefficient and the variation penalty term.
[0027] Specifically, structural segmentation refers to dividing the original text fragment into consecutively arranged document blocks according to layout tags. Layout tags are divided into four categories: headings, body text, tables, and lists. The number of text structure changes is counted as follows: traversing adjacent document block pairs sequentially, if the layout tags of two adjacent document blocks are different, it is counted as one text structure change. For example, a heading followed by body text counts as one change, and body text followed by a table counts as another change. The text structure variation frequency is equal to the number of text structure changes divided by the total number of adjacent block pairs. For example, if 7 changes occur in 20 adjacent block pairs, the text structure variation frequency is 0.35. The higher the text structure variation frequency, the more frequently the document layout changes, and the less stable the structure.
[0028] In the sparse feature state, fewer feature instances are identified in the document block, indicating a possible omission. The confidence level needs to be relaxed, and the content with low confidence but which is indeed a feature needs to be adjusted back. Therefore, the first baseline value is 0.8, which is less than 1. In the dense feature state, more feature instances are identified in the document block, indicating a possible mixing of noisy features. The confidence level needs to be tightened to suppress false positives. Therefore, the second baseline value is 1.2, which is greater than 1.
[0029] The mutation penalty term is positively correlated with the frequency of text structure mutations. In this embodiment, the mutation penalty term is determined by the following formula: Mutation penalty term = 0.5 + frequency of text structure mutations; The base penalty constant is 0.5, which ensures that even when the document structure is completely stable and the text structure variation frequency is 0, a certain level of basic adjustment capability is still maintained to prevent the adjustment from failing due to an excessively small confidence adjustment factor. The higher the text structure variation frequency, the larger the variation penalty term, indicating that the reliability of the parsing engine's confidence output in documents with chaotic layouts is lower, requiring greater adjustment intervention for correction.
[0030] The confidence adjustment factor is equal to the product of the baseline adjustment coefficient and the variance penalty term.
[0031] The beneficial effects of the above technical solution are: the confidence adjustment factor is synthesized by multiplying the state-related baseline adjustment coefficient and the variation penalty term related to layout disorder. Both the element distribution state and document structure variation factors enter the adjustment decision at the same time. The adjustment intensity adapts to the document quality, avoiding the failure of a single fixed threshold to adapt to documents of different quality.
[0032] In some embodiments of this application, if the feature is sparse, the extraction results of each block of the parsing engine are adjusted based on the confidence adjustment factor and the preset feature calibration module, including: The initial element determination confidence limit of the parsing engine is corrected based on the confidence adjustment factor to obtain the corrected effective confidence limit. From the extraction results of each block of the parsing engine, candidate element instances with a confidence level lower than the initial element judgment confidence level limit and greater than or equal to the effective confidence level limit are selected. The selected candidate element instances are added to the extraction results of the corresponding document blocks.
[0033] Specifically, the preset feature calibration module is used to perform retrospective calibration on the extraction results of each block of the parsing engine under feature sparsity conditions. The feature calibration module reads the confidence adjustment factor corresponding to the document block. The confidence adjustment factor under feature sparsity conditions is a value less than 1, such as 0.8. The initial feature judgment confidence limit of the parsing engine is multiplied by this confidence adjustment factor to obtain the corrected effective confidence limit.
[0034] From the results extracted from each block of the parsing engine, candidate element instances corresponding to the document block are re-screened, provided their confidence level is lower than the initial element judgment confidence limit but greater than or equal to the revised effective confidence limit. These candidate element instances were excluded due to insufficient confidence under the original judgment criteria, but when the document block is in an element-sparse state, their low confidence level may still correspond to real legal elements. For example, a candidate element instance in a document block has a confidence level of 0.65. Under the initial element judgment confidence limit of 0.9, this candidate element instance is filtered out due to insufficient confidence; however, with the revised effective confidence limit of 0.61, the candidate element instance's confidence level is greater than 0.61 and is retained.
[0035] The beneficial effects of the above technical solution are: in the case of sparse elements, by dynamically lowering the effective confidence limit through the confidence adjustment factor, the content with low confidence but which is indeed a legal element is retrieved and supplemented into the corresponding document block, thereby matching the element extraction needs of sparse blocks, reducing omissions, and improving the completeness of subsequent element parsing and archiving.
[0036] In some embodiments of this application, if the feature density is high, adjusting the hierarchical architecture and feature allocation of the parsing engine based on the feature distribution imbalance and the confidence adjustment factor includes: The initial element determination confidence limit of the parsing engine is corrected according to the confidence adjustment factor to obtain the corrected second effective confidence limit. The parsing engine filters the feature instances extracted in the current document block based on the second effective confidence limit, retaining the effective feature instances; The initial load index of each extraction level is determined based on the ratio of the number of effective element instances corresponding to each extraction level to the standard element capacity of the corresponding level. Based on the aforementioned imbalance in the distribution of elements, the initial load index of each extraction level is compensated for to obtain the element load saturation of each extraction level. Identify the overloaded levels of elements whose element load saturation exceeds the preset upper limit, and the underloaded levels of elements whose load saturation is below the preset lower limit; In the overload level of the elements, the overload level is determined according to the uneven distribution of the elements. The single-channel serial extraction architecture of the overload level of the elements is reconstructed into a multi-channel parallel extraction architecture with a number of channels corresponding to the overload level. The sequence of elements to be processed in the overload level of the elements is divided according to semantic boundaries and then distributed to each parallel extraction channel. The idle extraction resources of the underloaded element level are reallocated to the multi-channel parallel extraction architecture.
[0037] Specifically, in a dense feature state, the number of extracted feature instances in a document block is excessive, which may include noisy feature instances or lead to overload on some extraction levels. The initial feature judgment confidence limit of the parsing engine is adjusted based on a confidence adjustment factor; that is, the product of the two is calculated to obtain a second effective confidence limit. The confidence adjustment factor in a dense feature state is a value greater than 1, such as 1.2.
[0038] Feature instances with a confidence level greater than or equal to the second effective confidence level limit are retained as valid feature instances. Feature instances with a confidence level lower than the second effective confidence level limit are identified as noisy feature instances and are removed.
[0039] Standard feature capacity refers to the baseline number of features that an extraction layer can process within a single processing cycle. For example, if the standard feature capacity of the entity recognition layer is 400 feature instances, and the number of valid feature instances corresponding to the entity recognition layer in the current document block is 360, then the initial load index is 0.9.
[0040] The element distribution imbalance measure is used to assess the unevenness of element distribution among document blocks in an unstructured legal document. A larger value indicates that elements are concentrated in a few blocks; a smaller value indicates a more even distribution. In this embodiment, the element distribution imbalance measure is the root mean square of the difference between the element density of each document block and the average element density. For example, if the element densities of three document blocks are 3.0, 0.2, and 0.8 per 100 characters, respectively, and the average density is approximately 1.33, then the element distribution imbalance measure is 1.2. The initial load index of each extraction level is compensated for the imbalance based on the element distribution imbalance measure to obtain the element load saturation. The compensation method can be: the larger the element distribution imbalance measure, the more significant the upward correction to the initial load index. For example, when the element distribution imbalance measure is 0.9, the initial load index can be multiplied by a compensation coefficient of 1.1, resulting in the element load saturation of the entity recognition layer being the product of these two factors, 0.99.
[0041] The system identifies overloaded levels where the element load saturation exceeds a preset upper limit, and underloaded levels where the element load saturation falls below a preset lower limit. In this embodiment, the preset upper limit is set to 0.85, and the preset lower limit is set to 0.3. The element load saturation of the aforementioned entity identification layer is 0.99, which falls under the overloaded level.
[0042] In the feature overload hierarchy, the overload level is determined based on the amount of feature distribution imbalance. Overload levels are categorized as mild overload, moderate overload, and severe overload. For example, a feature distribution imbalance of less than 0.5 indicates mild overload, 0.5 to 0.8 indicates moderate overload, and greater than 0.8 indicates severe overload. Different overload levels correspond to different numbers of parallel channels; for example, mild overload corresponds to 2 parallel channels, moderate overload to 3, and severe overload to 4. The single-channel serial extraction architecture of the feature overload hierarchy is reconstructed into a multi-channel parallel extraction architecture with the number of channels corresponding to the overload level. For example, the entity recognition layer, originally a single-channel serial extraction, is reconstructed into a 4-channel parallel extraction architecture due to severe overload.
[0043] Idle extraction resources at the underloaded level, such as idle inference threads, memory quotas, or computing units, are reallocated to the multi-channel parallel extraction architecture to further alleviate overload pressure.
[0044] The beneficial effects of the above technical solution are as follows: In the case of dense elements, noisy element instances are first filtered out using a second effective confidence limit to ensure that subsequent load calculations are based on effective elements; then, the element load saturation is calculated using the initial load index and the element distribution imbalance to accurately identify overload and underload levels. Overload levels are reconstructed into a multi-channel parallel extraction architecture according to the degree of overload, and tasks are divided according to semantic boundaries. Underload levels are simultaneously supplemented with resources, ultimately achieving balanced and efficient parsing of dense element documents.
[0045] In some embodiments of this application, the sequence of elements to be processed at the element overload level is segmented according to semantic boundaries and then distributed to each parallel extraction channel, including: Based on the strength of the contextual semantic association between adjacent element instances in the sequence of elements to be processed at the overloaded level of the elements, determine the semantic boundary cutting point; The sequence of elements to be processed is divided into multiple semantically coherent subsequences based on the semantic boundary cutting points. Obtain the channel processing capacity of each of the parallel extraction channels, and allocate each of the semantically coherent subsequences to the corresponding parallel extraction channels according to the channel processing capacity. When the number of element instances of the semantically coherent subsequence exceeds the channel processing capacity, the semantically coherent subsequence is re-segmented according to the layout label boundary before being re-allocated.
[0046] Specifically, the semantic contextual association strength is used to measure whether two adjacent element instances semantically belong to the same coherent segment. Its calculation methods can include: the cosine similarity of the semantic vectors of adjacent element instances, whether they belong to the same contract clause or court document paragraph, and whether there are syntactic dependencies such as subject-verb or object-complement relationships between them. A higher semantic contextual association strength indicates that adjacent element instances should not be separated. When the semantic contextual association strength between two adjacent element instances is lower than a preset semantic association threshold, that location is determined as a semantic boundary cutting point. For example, if two adjacent element instances belong to different clauses and have low semantic similarity, a cutting point is set between them.
[0047] Based on semantic boundary cutting points, the sequence of features to be processed is divided into multiple semantically coherent subsequences. The semantic relationships between feature instances within each semantically coherent subsequence are close, making them suitable for continuous processing within the same parallel extraction channel, thus avoiding the loss of relationships between features due to improper segmentation.
[0048] Obtain the channel processing capacity of each parallel extraction channel. Channel processing capacity refers to the maximum number of feature instances a single parallel extraction channel can process within one processing cycle. Based on the channel processing capacity, assign each semantically coherent subsequence to its corresponding parallel extraction channel. When the number of feature instances in a semantically coherent subsequence exceeds the channel processing capacity, it indicates that the subsequence cannot be processed by a single channel in one operation. In this case, perform a secondary segmentation of the semantically coherent subsequence based on layout label boundaries. Layout label boundaries include layout transition positions such as titles, body text, tables, and lists. The subsequences after secondary segmentation are then assigned to different parallel extraction channels to ensure that no single channel is overloaded.
[0049] The beneficial effects of the above technical solution are: semantic boundary segmentation ensures semantic continuity between feature instances and reduces the negative impact of parallel processing on feature relationship extraction; channel capacity judgment prevents single-channel overload; and secondary segmentation of layout label boundaries solves the allocation problem when semantic subsequences are too long. This makes the parallel processing of the feature overload level both efficient and stable, which is conducive to improving the quality of feature extraction.
[0050] In some embodiments of this application, before tracing and associating the extraction results of each block of the parsing engine according to the document block identifier, and generating the element parsing archive record based on the business type identifier and the tracing association, the method further includes: Based on the preset target business legal entity identification rule tag library, structured fields related to the target business risk assessment are extracted from the results of each block of the adjusted parsing engine. The structured fields are coupled and matched with preset target business rules to generate legal entity-specific mapping classification results corresponding to the structured fields; The structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form to build the digital archiving capability for the target business.
[0051] Specifically, coupling matching refers to substituting structured fields one by one into preset target business rules for conditional judgment and overlaying business tags. Target business rules are pre-configured business judgment logics; for example, when the amount to be preserved exceeds a preset amount, a manual review tag is triggered; when the respondent is an individual, a high moral hazard category is assigned; and when the subject matter of preservation is real estate, a low liquidity risk category is assigned. The output of coupling matching is a legal entity-specific mapping classification result, which contains the category attribution and disposal tags of the structured fields within the target business risk system.
[0052] In some embodiments of this application, based on a preset target business legal entity identification rule tag library, structured fields related to the target business risk assessment are selectively extracted from the results of each block extraction of the adjusted parsing engine, including: Based on the target business legal entity identification rule tag library, determine the set of target legal entity types related to the target business risk assessment; From the extracted results of each block of the adjusted parsing engine, candidate element instances belonging to the target legal entity type set are selected; The candidate element instances are filtered by confidence level, and the candidate element instances with confidence levels higher than the preset target business element confidence threshold are determined as the structured fields.
[0053] Specifically, the target business legal entity identification rule tag library is a pre-built rule base. Each tag in the tag library corresponds to a type of legal entity related to the risk assessment of the target business and its identification rules. For example, in litigation preservation business, tags may include applicant, respondent, subject matter of preservation, amount of preservation, case number, court of jurisdiction, and guarantee method. Traversing the tag library, each tag in the library has a flag indicating whether it is associated with risk assessment. The legal entity types corresponding to tags with true flags are aggregated into a target legal entity type set. For example, in a certain target business, the tag library includes types such as applicant, respondent, amount of preservation, subject matter of preservation, court of jurisdiction, case number, and judgment date, but only five types—applicant, respondent, amount of preservation, subject matter of preservation, and court of jurisdiction—are marked as related to risk assessment. In this case, the target legal entity type set consists of these five types.
[0054] From the results extracted by the adjusted parsing engine for each block, candidate element instances belonging to the target legal entity type set are selected. Specifically, element instances in the extraction results of each block are read one by one, and the type labels of the element instances are compared with the target legal entity type set. Element instances belonging to types within the set are retained as candidate element instances, while element instances not belonging to types within the set are filtered out. For example, a preservation amount of 5 million yuan is retained, while the judgment date is filtered out.
[0055] Confidence-based filtering is applied to candidate feature instances. The preset confidence threshold for target business features is a pre-defined baseline threshold, such as 0.85. Candidate feature instances with a confidence level higher than this threshold are identified as structured fields; those with a confidence level lower than or equal to this threshold are discarded.
[0056] The beneficial effects of the above technical solution are: the target legal entity type set has a clear extraction boundary, and confidence filtering ensures the reliability of structured fields. Pre-setting a confidence threshold for target business elements prevents recalled elements in sparse documents from being filtered out again during the business extraction stage, ensuring that structured fields are both complete and reliable.
[0057] In some embodiments of this application, the structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form, including: Based on the legal entity-specific mapping classification results, determine the target filling position of the structured field in the standardized element form; Based on the document block identifier corresponding to the structured field, establish a source association between the target filling position and the original text fragment in the unstructured legal document; The structured fields, the legal entity-specific mapping classification results, and the source association are filled into the standardized element form, and the filled element form is stored in the archive as an element parsing archive record.
[0058] Specifically, in the standardized element form, each form field has a pre-defined field code and an applicable legal entity category label. The target fill location is determined by reading the entity category classification result recorded in the legal entity-specific mapping classification results. For example, if a structured field is classified as the respondent and marked as a high moral hazard category, then the form field code with the entity category of respondent is retrieved in the element form, and the form field corresponding to that field code is determined as the target fill location.
[0059] The source tracing association is established as follows: each structured field carries a document block identifier from its source document block from the moment it is generated. During the layout restoration stage, the document block identifier registers the page number and character offset range of the corresponding original text fragment in the document. Through the intermediary connection of the document block identifier, a three-level source tracing chain is formed between the target fill position and the original text fragment, i.e., form field, document block, and original text position can be traced back step by step. The fill operation specifically involves: writing the value of the structured field into the target fill position; writing the legal entity-specific mapping classification result into the risk label bar attached to the target fill position; and writing the source tracing association into the source tracing bar attached to the target fill position. Business personnel can click on the source tracing bar to jump to the corresponding position in the original text for review. The completed element form is treated as an element parsing archive record, written to a preset archive library, and interfaced with the corresponding program programming interface, allowing data interaction and communication between different software applications.
[0060] The beneficial effects of the above technical solution are: the form fill position is automatically located by the mapping classification result, and the three-level traceability chain allows each form data to be traced back to its original position. Filling, classification, and traceability are completed in one go and archived as a whole, making business review verifiable and reducing the risk of automatic filling of incorrect columns and archiving of data with untraceable sources.
[0061] Based on another preferred embodiment described above, see [link to preferred embodiment]. Figure 2 As shown, this embodiment provides an element parsing and archiving system for unstructured legal documents, including: The results extraction module is used to obtain the original text fragments, business type identifiers, and the extraction results of each block from the parsing engine of unstructured legal documents; The density judgment module is used to determine a preset element extraction benchmark threshold based on the business type identifier, calculate the element density of each document block in the unstructured legal document based on the original text fragment, compare the element density with the preset element extraction benchmark threshold, and obtain the element distribution state of each document block, wherein the element distribution state includes a sparse element state and a dense element state. The confidence determination module is used to obtain the frequency of text structure variation of the unstructured legal document and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements. The feature adjustment module is used to adjust the extraction results of each block of the parsing engine based on the confidence adjustment factor and the preset feature calibration module if the feature is sparse; and to adjust the hierarchical architecture and feature allocation of the parsing engine according to the feature distribution imbalance and the confidence adjustment factor if the feature is dense. The document archiving module is used to trace and associate the extraction results of each block of the parsing engine according to the document block identifier after the adjustment of the sparse or dense state of the elements, and generate element parsing archive records based on the business type identifier and the traceability association, and store them in the preset archive library.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for parsing and archiving elements of unstructured legal documents, characterized in that, include: Obtain the original text fragments, business type identifiers, and block extraction results of unstructured legal documents from the parsing engine; A preset element extraction benchmark threshold is determined based on the business type identifier, and the element density of each document block in the unstructured legal document is calculated based on the original text fragment. The element density is compared with the preset element extraction benchmark threshold to obtain the element distribution state of each document block. The element distribution state includes a sparse element state and a dense element state. Obtain the frequency of text structure variation in the unstructured legal document, and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements; If the feature is sparse, the extraction results of each block of the parsing engine are adjusted based on the confidence adjustment factor and the preset feature calibration module; if the feature is dense, the hierarchical architecture and feature allocation of the parsing engine are adjusted according to the feature distribution imbalance and the confidence adjustment factor. After adjusting for sparse or dense features, the extraction results of each block from the parsing engine are traced and associated according to the document block identifier. Based on the business type identifier and the traceability association, feature parsing archive records are generated and stored in a preset archive library.
2. The method for element parsing and archiving of unstructured legal documents according to claim 1, characterized in that, Determining the preset element extraction benchmark threshold based on the business type identifier includes: Multiple document type identifier data are obtained, and the initial feature extraction benchmark threshold is adjusted based on the business type identifier and the multiple document type identifier data to obtain the adjusted preset feature extraction benchmark threshold.
3. The method for element parsing and archiving of unstructured legal documents according to claim 1, characterized in that, Obtain the frequency of text structure variation in the unstructured legal document, and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements, including: The original text segment is structurally segmented to determine the number of text structural changes between adjacent document blocks, and the text structural variation frequency is calculated based on the number of text structural changes. A benchmark adjustment coefficient is determined based on the distribution state of the elements. The benchmark adjustment coefficient takes a first benchmark value when the elements are sparse and a second benchmark value when the elements are dense. A mutation penalty term is determined based on the frequency of text structure mutations, and the mutation penalty term is positively correlated with the frequency of text structure mutations; The confidence adjustment factor is determined based on the product of the baseline adjustment coefficient and the variation penalty term.
4. The method for element parsing and archiving of unstructured legal documents according to claim 1, characterized in that, If the feature is sparse, the extraction results of each block of the parsing engine are adjusted based on the confidence adjustment factor and the preset feature calibration module, including: The initial element determination confidence limit of the parsing engine is corrected based on the confidence adjustment factor to obtain the corrected effective confidence limit. From the extraction results of each block of the parsing engine, candidate element instances with a confidence level lower than the initial element judgment confidence level limit and greater than or equal to the effective confidence level limit are selected. The selected candidate element instances are added to the extraction results of the corresponding document blocks.
5. The method for element parsing and archiving of unstructured legal documents according to claim 1, characterized in that, If the feature density is high, the hierarchical architecture and feature allocation of the parsing engine are adjusted according to the feature distribution imbalance and the confidence adjustment factor, including: The initial element determination confidence limit of the parsing engine is corrected according to the confidence adjustment factor to obtain the corrected second effective confidence limit. The parsing engine filters the feature instances extracted in the current document block based on the second effective confidence limit, retaining the effective feature instances; The initial load index of each extraction level is determined based on the ratio of the number of effective element instances corresponding to each extraction level to the standard element capacity of the corresponding level. Based on the aforementioned imbalance in the distribution of elements, the initial load index of each extraction level is compensated for to obtain the element load saturation of each extraction level. Identify the overloaded levels of elements whose element load saturation exceeds the preset upper limit, and the underloaded levels of elements whose load saturation is below the preset lower limit; In the overload level of the elements, the overload level is determined according to the uneven distribution of the elements. The single-channel serial extraction architecture of the overload level of the elements is reconstructed into a multi-channel parallel extraction architecture with a number of channels corresponding to the overload level. The sequence of elements to be processed in the overload level of the elements is divided according to semantic boundaries and then distributed to each parallel extraction channel. The idle extraction resources at the underloaded element level are reallocated to the multi-channel parallel extraction architecture.
6. The method for element parsing and archiving of unstructured legal documents according to claim 5, characterized in that, The sequence of elements to be processed at the overloaded level is segmented according to semantic boundaries and then distributed to each parallel extraction channel, including: Based on the strength of the contextual semantic association between adjacent element instances in the sequence of elements to be processed at the overloaded level of the elements, determine the semantic boundary cutting point; The sequence of elements to be processed is divided into multiple semantically coherent subsequences based on the semantic boundary cutting points. Obtain the channel processing capacity of each of the parallel extraction channels, and allocate each of the semantically coherent subsequences to the corresponding parallel extraction channels according to the channel processing capacity. When the number of element instances of the semantically coherent subsequence exceeds the channel processing capacity, the semantically coherent subsequence is re-segmented according to the layout label boundary before being re-allocated.
7. The method for element parsing and archiving of unstructured legal documents according to claim 1, characterized in that, Before generating element parsing archive records based on the business type identifier and the source association of the extracted block results of the parsing engine, the process further includes: Based on the preset target business legal entity identification rule tag library, structured fields related to the target business risk assessment are extracted from the results of each block of the adjusted parsing engine. The structured fields are coupled and matched with preset target business rules to generate legal entity-specific mapping classification results corresponding to the structured fields; The structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form to build the digital archiving capability for the target business.
8. The method for parsing and archiving unstructured legal documents according to claim 7, characterized in that, Based on a pre-defined target business legal entity identification rule tag library, structured fields related to the target business risk assessment are extracted from the results of each block of the adjusted parsing engine, including: Based on the target business legal entity identification rule tag library, determine the set of target legal entity types related to the target business risk assessment; From the extracted results of each block of the adjusted parsing engine, candidate element instances belonging to the target legal entity type set are selected; The candidate element instances are filtered by confidence level, and the candidate element instances with confidence levels higher than the preset target business element confidence threshold are determined as the structured fields.
9. The method for element parsing and archiving of unstructured legal documents according to claim 7, characterized in that, The structured fields and the legal entity-specific mapping classification results are automatically populated into a standardized element form, including: Based on the legal entity-specific mapping classification results, determine the target filling position of the structured field in the standardized element form; Based on the document block identifier corresponding to the structured field, establish a source association between the target filling position and the original text fragment in the unstructured legal document; The structured fields, the legal entity-specific mapping classification results, and the source association are filled into the standardized element form, and the filled element form is stored in the archive as an element parsing archive record.
10. A system for parsing and archiving unstructured legal documents, applied to the method for parsing and archiving unstructured legal documents as described in any one of claims 1-9, characterized in that, include: The results extraction module is used to obtain the original text fragments, business type identifiers, and the extraction results of each block from the parsing engine of unstructured legal documents; The density judgment module is used to determine a preset element extraction benchmark threshold based on the business type identifier, calculate the element density of each document block in the unstructured legal document based on the original text fragment, compare the element density with the preset element extraction benchmark threshold, and obtain the element distribution state of each document block, wherein the element distribution state includes a sparse element state and a dense element state. The confidence determination module is used to obtain the frequency of text structure variation of the unstructured legal document and determine the confidence adjustment factor based on the frequency of text structure variation and the distribution status of elements. The feature adjustment module is used to adjust the extraction results of each block of the parsing engine based on the confidence adjustment factor and the preset feature calibration module if the feature is sparse; and to adjust the hierarchical architecture and feature allocation of the parsing engine according to the feature distribution imbalance and the confidence adjustment factor if the feature is dense. The document archiving module is used to trace and associate the extraction results of each block of the parsing engine according to the document block identifier after the adjustment of the sparse or dense state of the elements, and generate element parsing archive records based on the business type identifier and the traceability association, and store them in the preset archive library.
