Complaint element integrity detection method and system based on semantic parsing

CN122928561APending Publication Date: 2026-10-16BEIJING LUSHU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611192397.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]本发明提供了基于语义解析的诉状要素完整性检测方法及系统,用于解决现有技术无法从语义层面动态检测不同类型诉状中各要素是否真正完整,以及无法判断跨段落要素之间的逻辑是否自洽,导致审查精度低、漏检率高的问题

Benefits of technology

[0022] The technical solution of this invention first acquires the complaint text to be tested, identifies the current complaint type, and retrieves the corresponding essential element list and standard expression template from the legal element knowledge base according to the type. A pre-trained element extraction model is then used for semantic parsing and element instances are extracted. Simultaneously, the complaint text is automatically segmented into multiple functional paragraphs according to the legal chapter structure. This transforms the unstructured complaint into a structured set of elements with type labels and location information, providing a data foundation for all subsequent analyses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928561A_ABST
    Figure CN122928561A_ABST
Patent Text Reader

Abstract

The application provides a lawsuit element integrity detection method and system based on semantic analysis, and belongs to the technical field of semantic analysis. The method comprises the following steps: obtaining a lawsuit text to be detected, extracting statutory element information and segmenting; based on the list of essential elements corresponding to each lawsuit type, calculating the element missing degree of each paragraph; obtaining cross-paragraph element logic rules, and calculating the logic matching strength; calculating the logic correlation degree, fusing the logic correlation degree and the logic matching strength, and obtaining the logic coupling strength; calculating the expression specification coupling degree and correcting; based on the corrected element completeness and the logic coupling strength, calculating the comprehensive integrity index, and outputting the result when the comprehensive integrity index is lower than the integrity threshold. The application solves the problems that the prior art cannot dynamically detect whether each element in different types of lawsuits is truly complete from the semantic level, and cannot judge whether the logic between cross-paragraph elements is self-consistent, resulting in low examination accuracy and high missed detection rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semantic analysis technology, and specifically to a method and system for detecting the integrity of elements in a complaint based on semantic parsing. Background Technology

[0002] With the deepening of judicial informatization, electronic litigation platforms have been widely used nationwide, and the proportion of litigants submitting complaints online has been increasing year by year. During the case filing review stage, court staff need to conduct a formal review of the complaint to verify whether it contains the necessary elements required by law, such as party information, claims, facts and reasons, and a list of evidence. Currently, some electronic litigation systems have preliminary formal review functions, mainly using template matching or mandatory field validation to determine whether certain sections or keywords are missing from the complaint.

[0003] However, existing methods for detecting the completeness of legal complaints have significant shortcomings. On the one hand, template-matching methods rely on fixed complaint formats. If the parties do not follow the preset template or use non-standard expressions, the system cannot accurately identify the presence of each element. On the other hand, existing methods can only determine whether a field contains words, but cannot determine whether the content of that field is truly complete at the semantic level.

[0004] In summary, existing technologies suffer from problems such as weak ability to identify non-standardized complaint statements, inability to perform in-depth semantic integrity judgment, difficulty in adapting to different types of differentiated element requirements, and lack of cross-paragraph element logical consistency review. Summary of the Invention

[0005] This invention provides a method and system for detecting the completeness of elements in a complaint based on semantic parsing. It addresses the problems of existing technologies being unable to dynamically detect whether the elements in different types of complaints are truly complete at the semantic level, and being unable to determine whether the logic between elements across paragraphs is self-consistent, resulting in low examination accuracy and high false negative rate.

[0006] In view of the above problems, the present invention provides a method and system for detecting the integrity of elements in a complaint based on semantic parsing.

[0007] In a first aspect, the present invention provides a method for detecting the integrity of elements in a complaint based on semantic parsing, including:

[0008] The process involves acquiring the complaint text to be tested, extracting legal element information from the complaint text based on a pre-defined legal element knowledge base, and segmenting the complaint text to obtain multiple paragraphs.

[0009] Based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base, the element missingness of each paragraph in the complaint text is calculated.

[0010] Obtain cross-paragraph element logic rules, and calculate the logical matching strength based on the logical matching relationship between element instances extracted from each paragraph;

[0011] Logical relevance is calculated based on the element density of each paragraph, and logical coupling strength is obtained by fusing the logical relevance with the logical matching strength.

[0012] Based on the degree of matching between the description of each element instance and the standard description, the description specification coupling degree is calculated, and the element missing degree is corrected to obtain the corrected element completeness.

[0013] Based on the completeness of the modified elements and the logical coupling strength, a comprehensive integrity index is calculated. When the comprehensive integrity index is lower than the integrity threshold, the corresponding element defect location result is output.

[0014] Secondly, the present invention provides a system for detecting the integrity of elements in a complaint based on semantic parsing, comprising:

[0015] The element extraction and segmentation module is used to obtain the complaint text to be detected. Based on a preset legal element knowledge base, it extracts the legal element information in the complaint text and segments the complaint text to obtain multiple paragraphs.

[0016] The element missingness statistics module is used to calculate the element missingness of each paragraph in the complaint text based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base.

[0017] The logical matching strength calculation module is used to obtain the logical rules of cross-paragraph elements and calculate the logical matching strength based on the logical matching relationship between the element instances extracted from each paragraph.

[0018] The logical coupling strength calculation module is used to calculate the logical correlation degree based on the element density of each paragraph, and to perform a fusion calculation on the logical correlation degree and the logical matching strength to obtain the logical coupling strength.

[0019] The modified element completeness acquisition module is used to calculate the coupling degree of the expression specification based on the degree of matching between the expression method of each element instance and the standard expression, and to correct the element missingness to obtain the modified element completeness.

[0020] The integrity index calculation and defect location module is used to calculate the comprehensive integrity index based on the completeness of the modified elements and the logical coupling strength. When the comprehensive integrity index is lower than the integrity threshold, the corresponding element defect location result is output.

[0021] One or more technical solutions provided in this invention have at least the following technical effects or advantages:

[0022] The technical solution of this invention first acquires the complaint text to be tested, identifies the current complaint type, and retrieves the corresponding essential element list and standard expression template from the legal element knowledge base according to the type. A pre-trained element extraction model is then used for semantic parsing and element instances are extracted. Simultaneously, the complaint text is automatically segmented into multiple functional paragraphs according to the legal chapter structure. This transforms the unstructured complaint into a structured set of elements with type labels and location information, providing a data foundation for all subsequent analyses.

[0023] Furthermore, based on the list of essential sub-elements for each paragraph, the ratio of the actual number of element types extracted to the required number of element types for each paragraph was calculated, and the element missingness of each paragraph was determined. This quantifies the degree of deficiency in each paragraph from the perspective of element coverage completeness, providing fundamental parameters for evaluating element completeness.

[0024] Furthermore, the logical rules for cross-paragraph elements are obtained. Based on three constraint types—element consistency constraint, quantity correspondence constraint, and identity qualification correspondence constraint—the rule matching degree of element instances in each rule is calculated separately. Then, the overall logical matching strength is obtained by weighting the sum by paragraph type. Measuring the quality of the complaint from the perspective of cross-paragraph logical consistency can identify problems such as content contradictions or inconsistencies between elements.

[0025] Furthermore, the logical relevance is calculated based on the deviation between the element density of each paragraph and the historical average element density. The logical relevance is then multiplied by the logical matching strength to obtain the logical coupling strength. This organically integrates the rationality of information density within a paragraph with the logical consistency across paragraphs, making the logical evaluation more comprehensive.

[0026] Furthermore, the semantic similarity between each element instance and the standard representation template is calculated as the representation standardization degree. This is then weighted and aggregated into a coupled representation standardization degree, which is used to correct the initial element completeness degree obtained based on the overall element missingness degree, resulting in a corrected element completeness degree. This ensures that the element completeness degree reflects both coverage integrity and representation quality, preventing cases where elements exist but the representation is inadequate from being missed.

[0027] Finally, based on the element emphasis weight and logical emphasis weight corresponding to the complaint type, the completeness of the modified elements and the logical coupling strength are weighted and summed to obtain a comprehensive completeness index. When the index is lower than the completeness threshold determined based on sample statistics, the system automatically backtracks each step to locate missing elements, logical contradictions, and expression defects, and outputs structured element defect location results. This achieves completeness determination and accurate defect location.

[0028] In summary, this solution constructs a fully automated detection system from complaint text input to defect location output, effectively solving the problem that existing technologies can only perform surface format checks and cannot conduct multi-dimensional comprehensive judgments at the semantic level, significantly improving the accuracy and practicality of complaint integrity detection. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating the semantic parsing-based method for detecting the integrity of complaint elements provided by this invention.

[0030] Figure 2 This is a schematic diagram illustrating the calculation process of the comprehensive integrity index in the semantic parsing-based complaint element integrity detection method provided by the present invention.

[0031] Figure 3 This is a schematic diagram of the structure of the complaint element integrity detection system based on semantic parsing provided by the present invention.

[0032] In the attached diagram, the labels representing each component are as follows:

[0033] 11 Element extraction and segmentation module, 12 Element missing degree statistics module, 13 Logical matching strength calculation module, 14 Logical coupling strength calculation module, 15 Corrected element completeness acquisition module, 16 Completeness index calculation and defect location module. Detailed Implementation

[0034] This invention provides a method and system for detecting the completeness of elements in a complaint based on semantic parsing. This solves the problems of existing technologies being unable to dynamically detect whether the elements in different types of complaints are truly complete at the semantic level, and being unable to determine whether the logic between elements across paragraphs is self-consistent, resulting in low review accuracy and high false negative rate.

[0035] It should be noted that the terms "comprising" and "having" are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to these processes, methods, products, or devices.

[0036] Example 1, as Figure 1 As shown, this invention provides a method for detecting the integrity of elements in a complaint based on semantic parsing, the method comprising:

[0037] S100: Obtain the complaint text to be detected, extract the legal element information from the complaint text based on the preset legal element knowledge base, and segment the complaint text to obtain multiple paragraphs.

[0038] This step transforms the original complaint text into structured, computable unit information, providing a foundation for subsequent missing information statistics and logical analysis. It primarily identifies and extracts various elements from the complaint that comply with legal regulations, and segments the linear, long text into paragraphs with independent semantic functions for more refined analysis.

[0039] Step S100 in the method provided by the present invention includes:

[0040] Obtain the complaint text and identify the current complaint type from the complaint text;

[0041] Based on the current complaint type, retrieve the corresponding list of essential elements and the standard expression templates for each element type from the legal element knowledge base;

[0042] The complaint text is input into a pre-trained feature extraction model to perform semantic parsing on the complaint text and extract feature instances belonging to the feature types covered by the essential feature list. Each feature instance includes a feature type label, feature text content, and location range. The feature extraction model is trained using a sample complaint text set and a sample annotation set.

[0043] Based on the legal element knowledge base, the complaint text is automatically segmented into multiple paragraphs, wherein the paragraph types of the multiple paragraphs include party information paragraphs, litigation request paragraphs, fact and reason paragraphs, and evidence list paragraphs.

[0044] In this step, the pre-processed complaint text, such as OCR recognition and format cleaning, is first received. Then, its type is identified using a text classification method. Specifically, the complaint title, header type declaration, or full text can be input into a text classifier to determine the specific type of the complaint, such as disputes over private lending, housing lease contracts, or disputes over the rights to life, physical integrity, and health.

[0045] The text classifier is a pre-trained text classification model. Its training process uses a large number of historical complaint texts with labeled types as training samples. Through deep learning algorithms, such as a text classification model based on the BERT architecture, it learns the differential patterns of different types of complaints in terms of text features such as title expression, type declaration, and fact description, thereby having the ability to automatically determine the type of the input complaint text.

[0046] For example, a complaint is received stating: Civil Complaint: Plaintiff A, Defendant B. Claim: Requesting a judgment ordering the defendant to repay the principal and interest of the loan. Text classification identifies the current complaint type as a private lending dispute.

[0047] Secondly, retrieve the corresponding essential element list from the legal element knowledge base. For example, the essential elements of private lending disputes include: lending agreement, payment, loan amount, loan term, interest agreement, etc., as well as standard expression templates for each element type. For example, the standard expression for payment is: The plaintiff paid the defendant [amount] yuan on a certain date by [transfer / cash].

[0048] Among them, the legal element knowledge base is a pre-built structured legal knowledge storage system. It is structured and stored by legal experts after sorting out the legally required elements, the logical relationship rules between elements, the standard expression templates, and the chapter structure norms of the complaint. It provides the basis for type determination, the list of required elements, the standard expression templates and the basis for paragraph type division, the list of required sub-elements, the logical rules of cross-paragraph elements and the qualification mapping table, the semantic benchmark for comparing the standardization of expression, as well as the element emphasis weight, the logical emphasis weight and the default completeness threshold.

[0049] For example, in the previous case, after identifying it as a private lending dispute, the system immediately retrieved a list of types from the knowledge base. Simultaneously, it retrieved a standard template for the payment of funds: The plaintiff paid the defendant [amount] yuan on [time] through [method].

[0050] Next, the complaint text is input into a pre-trained feature extraction model. Based on the aforementioned list of essential elements, semantic parsing is performed to accurately extract each text fragment belonging to an essential element, forming a feature instance. Each feature instance is represented as a structured data triple, containing: feature type label, feature text content, and its position range in the original complaint.

[0051] Pre-training involves first performing unsupervised masked language model pre-training on a large-scale general legal text corpus, such as judgments and legal provisions, to enable the model to master the basic semantic features and terminology expression rules of the legal domain. Based on this, supervised fine-tuning training is then conducted using a sample complaint text set and a sample annotation set for element extraction tasks. After these two stages of pre-training and fine-tuning, the model possesses the ability to automatically identify legal element boundaries and extract element instances from new complaint texts, outputting structured triples containing element type labels, element text content, and location intervals.

[0052] The pre-trained feature extraction model is a natural language understanding model fine-tuned on a legal domain corpus. It is trained using historical complaint texts from a sample complaint text set as input data and a sample annotation set as supervision. During training, the complaint text and the corresponding sample annotation set are input into a sequence labeling or reading comprehension model based on the BERT architecture, and the model parameters are iteratively updated through backpropagation. During the training process, if the model's loss function value on the validation set, such as the cross-entropy loss function, decreases by less than a preset convergence threshold (e.g., the change in loss value is less than 1e), the model is considered successful. -4 When the model has converged, training is stopped and the model parameters are saved.

[0053] Among them, the sample complaint text set is a pre-built reference database that collects historical complaints that have been accepted and reviewed by the court and have been labeled with completeness judgment. It is classified and stored according to complaint type and paragraph type, and various statistical indicators are pre-statistically calculated. It can provide training samples and labeled data for pre-trained feature extraction models, as well as provide historical average feature density of each paragraph type as a benchmark for deviation calculation. The qualified and unqualified sample index sets are used to statistically determine the completeness threshold, and provide historical data statistical support for the ratio of feature emphasis weight and logical emphasis weight.

[0054] The sample annotation set is a dataset formed by annotating each complaint in the sample complaint text set. The annotation content includes feature type labels, feature text content and their position range in the original complaint.

[0055] For example, the plaintiff A's complaint is input into a pre-trained feature extraction model. The model analyzes the text: "On May 10, 2022, the plaintiff paid 100,000 yuan to the defendant via bank transfer." This is extracted as a payment delivery feature instance. The information is: Feature type label: Payment delivery; Feature text content: "On May 10, 2022, the plaintiff paid 100,000 yuan to the defendant via bank transfer"; Location range: Paragraph 3, characters 120-170.

[0056] Finally, based on the legal element knowledge base and according to the standard legal document structure of a complaint, the system automatically identifies and segments functionally distinct paragraphs, forming multiple paragraph units with independent legal meanings. Common paragraph types include: party information paragraphs (i.e., the identity information of the plaintiff and defendant), litigation claims paragraphs (i.e., the list of core claims), facts and reasons paragraphs (i.e., the case process and legal basis), and evidence list paragraphs (i.e., the name of the evidence and its purpose).

[0057] For example, according to the chapter structure, the plaintiff A's complaint can be divided into four paragraphs: paragraph 1 is the party information paragraph, which contains the plaintiff and defendant's ID numbers, addresses, etc.; paragraph 2 is the litigation claim paragraph; paragraph 3 is the facts and reasons paragraph, which includes a detailed description of the loan process; and paragraph 4 is the evidence list paragraph, which lists the IOU and transfer vouchers.

[0058] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0059] In summary, this step simultaneously completes three tasks from unstructured complaints: type identification, semantic extraction and location of legal element instances, and text structure segmentation. It transforms the original complaint into structured data with type labels, element content, and location ranges, laying a unified data foundation for subsequent steps such as element missing statistics, logical consistency verification, and expression standardization evaluation.

[0060] S200: Based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base, calculate the element missingness of each paragraph in the complaint text.

[0061] This step, based on the previous steps of obtaining the complaint type and completing element extraction and paragraph segmentation, compares the essential elements that the complaint type should have in that paragraph in the knowledge base with the actual extracted element instances one by one, counts the missing information, and quantifies it as the degree of missing information.

[0062] Step S200 in the method provided by the present invention includes:

[0063] Obtain the list of essential elements corresponding to the current complaint type. The list of essential elements includes a list of essential sub-elements for each paragraph. Each list of essential sub-elements includes a set of element types that should appear in the paragraph type.

[0064] For each paragraph, the total number of element types in the corresponding list of required sub-elements is taken as the total number of elements that the paragraph should have.

[0065] Based on the element type label of each paragraph, obtain the total number of paragraph elements;

[0066] The element missing rate of the paragraph is calculated based on the ratio of the total number of elements in the paragraph to the total number of elements that the paragraph should have.

[0067] In this step, the complete list of essential elements corresponding to this type is first retrieved from the legal element knowledge base. The complete list of essential elements sets up corresponding sub-lists of essential elements for the party information paragraph, the litigation claim paragraph, the fact and reason paragraph, and the evidence list paragraph, etc. Each sub-list of essential elements clearly lists the set of element types that should appear.

[0068] For example, if the current complaint is about a private lending dispute, retrieve its essential elements list. The essential sub-elements for the "Party Information" section are: [Plaintiff's name, Plaintiff's ID number, Plaintiff's address, Defendant's name, Defendant's ID number, Defendant's address]; the essential sub-elements for the "Facts and Reasons" section are: [Agreement to lend, Loan amount, Payment of funds, Loan term, Interest agreement, Repayment status].

[0069] Secondly, iterate through each paragraph, and based on its paragraph type, find the corresponding essential sub-elements from the essential element list obtained in the first step, count the number of element types included, and use this count as the total number of elements that a paragraph should have.

[0070] For example, the fact and reason paragraph of complaint A has a list of six essential sub-elements: agreement to lend, loan amount, payment, loan term, interest agreement, and repayment status. Therefore, the total number of elements should be 6.

[0071] Next, based on the output of the pre-trained feature extraction model, the number of extracted feature instances within each paragraph is counted. During the count, duplicates are deduplicated according to the feature type label; that is, even if the same feature type appears multiple times in the same paragraph, it is only counted as one, thus obtaining the total number of features in the paragraph.

[0072] For example, in the facts and reasons paragraph of complaint A, the element extraction model extracted four element instances, with element type labels of: loan agreement, loan amount, payment, and interest agreement. After deduplication, the total number of elements in the paragraph is 4. The loan term and repayment status element types were not detected.

[0073] Finally, for each paragraph, divide the total number of paragraph elements by the total number of elements the paragraph should have to obtain the element coverage rate; then subtract the element coverage rate from 1 to obtain the element missing rate. The formula for calculating the element missing rate is: Element missing rate = 1 - (Total number of paragraph elements / Total number of elements the paragraph should have). The missing rate ranges from 0 to 1, with a higher value indicating that the paragraph is missing more essential elements.

[0074] For example, in the Facts and Reasons section of Complaint A, the total number of elements in the section is 4, and the total number of elements that should be in the section is 6. Therefore, the element missingness is 1 - (4 / 6) = 0.333. This means that approximately one-third of the essential elements are not covered, specifically the missing loan term and repayment details.

[0075] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0076] In summary, this step compares the list of essential elements for the current type in the knowledge base with the actual extracted element instances, using paragraphs as the granularity. The ratio of the total number of required elements to the total number of actual elements quantifies the degree of element missing in each paragraph, providing a direct and traceable quantitative basis for subsequent element completeness correction and precise defect location.

[0077] S300: Obtain cross-paragraph element logic rules, and calculate the logical matching strength based on the logical matching relationship between element instances extracted from each paragraph.

[0078] This step utilizes predefined cross-paragraph element logic rules in the legal element knowledge base to determine whether the element instances extracted from different paragraphs support and corroborate each other in terms of content, and quantifies this degree of logical matching as logical matching strength, providing core parameters for subsequent calculation of logical coupling strength.

[0079] Step S300 in the method provided by the present invention includes:

[0080] Obtain the set of cross-paragraph element logical rules corresponding to the current complaint type, wherein each cross-paragraph element logical rule records the logical constraint relationship and constraint type between two element instances, and the constraint type includes element consistency constraint, quantity correspondence constraint and identity qualification correspondence constraint;

[0081] For each of the cross-paragraph element logic rules, extract the target element instance from the element instance to form a rule verification element group;

[0082] For each element instance in the rule verification element group, the rule matching degree of the element instance is calculated according to the constraint type. When the constraint type is an element consistency constraint, the text semantic similarity of each element instance is calculated to obtain the rule matching degree.

[0083] When the constraint type is a quantity-correspondence constraint, the numerical deviation ratio of each element instance is calculated and obtained, and the rule matching degree is calculated based on the numerical deviation ratio.

[0084] When the constraint type is an identity qualification correspondence constraint, the identity type label corresponding to each element instance is compared with the preset qualification correspondence mapping table to obtain the rule matching degree;

[0085] The rule matching degree of the paragraph is calculated by weighting the paragraph type to obtain the logical matching strength.

[0086] In this step, the first step is to retrieve the set of cross-paragraph element logical rules corresponding to the identified current complaint type from the legal element knowledge base. Each cross-paragraph element logical rule records the logical constraint relationship and constraint type between two element instances. The constraint types include element consistency constraints, quantity correspondence constraints, and identity qualification correspondence constraints.

[0087] For example, given that the current complaint type is a private lending dispute, the set of cross-paragraph element logic rules is retrieved from the legal element knowledge base. This includes three rules: Rule 1, between the [claim paragraph, loan amount] and [facts and reasons paragraph, loan amount], is an element consistency constraint, requiring that the amounts stated in both places be consistent; Rule 2, between the [claim paragraph, claimed interest amount] and [facts and reasons paragraph, agreed interest rate], is a quantity correspondence constraint, requiring that there be a calculation correspondence between the interest amount and the interest rate; and Rule 3, between the [claim paragraph, repayment request] and [party information paragraph, defendant's identity], is an identity qualification correspondence constraint, requiring that the party requesting repayment must be a qualified defendant.

[0088] Secondly, each cross-paragraph element logic rule is traversed, and a search is performed in the element instance set of each paragraph. Based on the element type specified in the rule, the corresponding element instance is extracted, and all element instances involved in the same rule are grouped together to form a rule verification element group. If any element type involved in a rule does not have a corresponding element instance in the corresponding paragraph, the rule verification element group is marked as incomplete.

[0089] For example, for Rule 1, the element instance of loan amount extracted from the claim paragraph of Complaint A is RMB 100,000, and the element instance of loan amount extracted from the facts and reasons paragraph is RMB 100,000, constituting Rule Validation Element Group 1: [RMB 100,000, RMB 100,000]. For Rule 2, the interest claim amount extracted from the claim paragraph is RMB 5,000, and the agreed interest rate in the facts and reasons paragraph is 5% per annum, constituting Rule Validation Element Group 2: [RMB 5,000, 5% per annum]. For Rule 3, the repayment request extracted from the claim paragraph is: order B to repay the loan, and the defendant's identity in the party information paragraph is: B, ID number, constituting Rule Validation Element Group 3: [order B to repay the loan, B].

[0090] Secondly, for each rule, the corresponding calculation method is adopted according to its constraint type: for element consistency constraints, the textual semantic similarity of each element instance is calculated as the rule matching degree. Specifically, a pre-trained semantic similarity model can be used to calculate the textual semantic similarity.

[0091] The pre-trained semantic similarity model is a specially trained natural language understanding model. The training process uses a large-scale legal text dataset, including pairs of synonyms, similar case descriptions, and legal citations, as training samples. Through contrastive learning or Siamese networks and other deep learning architectures, it learns the ability to map text fragments into high-dimensional semantic vectors, ensuring that semantically similar texts are close in the vector space, while semantically different texts are far apart. It can calculate the semantic similarity between two text fragments, outputting a similarity score between 0 and 1, with scores closer to 1 indicating greater semantic similarity. The text content of two element instances is encoded into vectors, and cosine similarity is calculated, with values ​​ranging from 0 to 1.

[0092] It should be noted that the aforementioned pre-trained semantic similarity model is a mature existing technology. Those skilled in the art can choose any publicly available pre-trained semantic similarity model to calculate text similarity based on the actual application scenario. This invention does not limit this.

[0093] For example, for rule verification element group 1, the semantic similarity between 100,000 yuan and RMB 100,000 yuan is calculated. The similarity model output result is 0.96, so the rule matching degree = 0.96.

[0094] To calculate the quantity corresponding to the constraint, firstly, extract the numerical values ​​from the text content of each element instance and calculate the numerical deviation ratio; then, calculate the rule matching degree based on the numerical deviation ratio. Wherein, numerical deviation ratio = |numerical value in text content - target numerical value| / |target numerical value|, and rule matching degree = max(0, 1 - numerical deviation ratio).

[0095] For example, for rule verification element group 2, the value 5000 is extracted from the interest claim amount: 5000 yuan; the interest due is calculated from the agreed interest rate: 5% per annum and the loan principal of 100,000 yuan = 100000 × 5% = 5000 yuan. Then the value deviation ratio = |5000 - 5000| / 5000 = 0, and the rule matching degree = 1 - 0 = 1.0.

[0096] The system calculates the identity qualification correspondence constraint by comparing the identity type label corresponding to each element instance with a pre-defined qualification correspondence mapping table to obtain the rule matching degree. The qualification correspondence mapping table is stored in the legal element knowledge base and defines the legal correspondence between identity types. If there is a match, the rule matching degree is 1; otherwise, it is 0.

[0097] For example, for rule verification element group 3, the identity type label of the repayment request element is extracted as defendant B. It is compared with the [private lending dispute, repayment obligor] entry in the qualification mapping table to confirm that B is a qualified defendant, and the rule matching degree = 1.0.

[0098] Finally, based on the target paragraph type involved in each cross-paragraph element logical rule, corresponding paragraph weights are assigned. In legal review practice, different paragraphs have varying degrees of influence on the determination of facts and the application of law. For example, the facts and reasons paragraph is the core basis for determining the facts of the case, the claims paragraph directly determines the scope of the trial, and is of high importance; while the party information paragraph and the list of evidence paragraph have relatively low impact on the substantive trial. Therefore, based on the relative importance of each paragraph type in legal review, differentiated weight values ​​are assigned to them. For example, the claims paragraph has a weight of 0.3, the facts and reasons paragraph has a weight of 0.4, the list of evidence paragraph has a weight of 0.2, and the party information paragraph has a weight of 0.1. Then, the rule matching degree of each rule is weighted and summed to obtain the overall logical matching strength, with a value ranging from 0 to 1.

[0099] For example, the rule matching degrees of the three rules in Complaint A are 0.96, 1.0, and 1.0, respectively. The corresponding target paragraphs are the Facts and Reasons paragraph (weight 0.4), the Facts and Reasons paragraph (weight 0.4), and the Party Information paragraph (weight 0.1). The logical matching strength is (0.96 × 0.4 + 1.0 × 0.4 + 1.0 × 0.1) = 0.884.

[0100] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0101] In summary, by introducing three types of legal logical constraints—consistency of elements, correspondence of quantities, and correspondence of identity and qualifications—the element instances between different paragraphs are matched and verified one by one. The logical self-consistency across paragraphs is quantified into a comparable matching strength index, which effectively makes up for the inadequacy of single-dimensional element statistics in discovering complete elements but contradictory content, and provides core parameters for comprehensive evaluation at the logical level.

[0102] S400: Calculate the logical correlation degree based on the element density of each paragraph, and perform a fusion calculation on the logical correlation degree and the logical matching strength to obtain the logical coupling strength.

[0103] This step introduces element density, which measures the richness of elements within each paragraph from the perspective of information content. Integrating the two allows for a more comprehensive evaluation of the logical quality of the complaint, ensuring that elements corroborate each other and that each paragraph possesses sufficient information density to support logical reasoning.

[0104] Step S400 in the method provided by the present invention includes:

[0105] For each paragraph, the total number of extracted element instances is counted and denoted as the paragraph instance count;

[0106] The element density of the paragraph is obtained by calculating the ratio of the number of paragraph instances to the total number of text characters in the paragraph.

[0107] From the sample complaint text set, obtain the historical average feature density corresponding to the paragraph type under the current complaint type;

[0108] Calculate the deviation between the element density and the historical average element density to obtain the element density deviation.

[0109] The overall element density deviation is obtained by weighted summation of the element density deviations of all the paragraphs.

[0110] Based on the overall element density deviation, the logical correlation degree is calculated and obtained, wherein the logical correlation degree is inversely proportional to the element density deviation.

[0111] The logical coupling strength is obtained by multiplying the logical matching strength by the logical correlation degree.

[0112] In this step, each paragraph is first traversed, and the total number of extracted feature instances is counted, denoted as the paragraph instance count. Simultaneously, the total number of text characters in the paragraph is obtained, and the feature density is calculated as: paragraph instance count / total number of text characters. Feature density reflects the amount of feature information contained within a unit of text length. When the total number of text characters is zero, the feature density of that paragraph is directly set to 0, and the deviation calculation for that paragraph is skipped.

[0113] For example, if the facts and reasons paragraph of complaint A contains 6 element instances and the total number of characters in the paragraph is 200, then the element density of this paragraph is 6 / 200 = 0.03.

[0114] Secondly, based on the identified current complaint type and paragraph type, the corresponding historical average element density is retrieved from the sample complaint text set. For example, if the current complaint type is a private lending dispute and the current paragraph is a facts and reasons paragraph, the historical average element density of the facts and reasons paragraph in a private lending dispute is 0.04, as found from the sample complaint text set.

[0115] Next, for each paragraph, its actual element density is compared with the historical average element density to calculate the deviation. The calculation formula is: Element density deviation = |Actual element density - Historical average element density| / Historical average element density. This reflects the degree to which the information density of the paragraph deviates from the standard level; the smaller the value, the closer it is to the standard level. When the historical average element density is zero, if the actual element density is also zero, the deviation is set to 0; if the actual element density is greater than zero, the deviation is set to 1.

[0116] For example, if the actual element density of the facts and reasons paragraph of complaint A is 0.03 and the historical average element density is 0.04, then the element density deviation of this paragraph is |0.03-0.04| / 0.04=0.25.

[0117] Next, based on the importance of each paragraph in the legal review, a pre-set deviation weight is assigned to each paragraph type. The basis for this is that the higher the importance of a paragraph, the greater the impact of its information density anomaly on the overall evaluation, and therefore the higher its weight. For example, the weight for the "Facts and Reasons" paragraph is 0.4, the weight for the "Petition" paragraph is 0.3, the weight for the "List of Evidence" paragraph is 0.2, and the weight for the "Party Information" paragraph is 0.1. The element density deviation of each paragraph is then weighted and summed to obtain the overall element density deviation.

[0118] For example, the element density deviation and weights of each paragraph of Complaint A are as follows: The deviation of the paragraph on party information is 0.15, with a weight of 0.1; the deviation of the paragraph on claims is 0.08, with a weight of 0.3; the deviation of the paragraph on facts and reasons is 0.25, with a weight of 0.4; and the deviation of the paragraph on the list of evidence is 0.10, with a weight of 0.2. Therefore, the overall element density deviation = 0.15 × 0.1 + 0.08 × 0.3 + 0.25 × 0.4 + 0.10 × 0.2 = 0.159.

[0119] Then, based on the overall element density deviation, the logical relevance is calculated. Logical relevance is inversely proportional to element density deviation; that is, the greater the deviation, the lower the logical relevance. The calculation formula is: Logical Relevance = 1 / (1 + Overall Element Density Deviation). For example, if the overall element density deviation of complaint A is 0.159, the logical relevance = 1 / (1 + 0.159) ≈ 0.863.

[0120] Finally, the calculated logical matching strength is multiplied by the logical relevance to obtain the logical coupling strength. For example, if the calculated logical matching strength of complaint A is 0.884 and the logical relevance is 0.863, then the logical coupling strength = 0.884 × 0.863 ≈ 0.763. The results show that although the cross-paragraph logical matching of complaint A is relatively good, the overall logical coupling strength is lowered due to some deviations in the element density of some paragraphs from historical standards.

[0121] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0122] In summary, this step supplements the evaluation of the paragraph quality of the complaint from the perspective of information density. By converting the deviation of the element density of each paragraph from the historical standard sample into logical relevance, and integrating it with the cross-paragraph logical matching strength, the final generated logical coupling strength can simultaneously reflect both the reasonableness of the information content within a paragraph and the self-consistency of the logic between paragraphs. This avoids evaluation bias caused by ignoring information anomalies due to relying solely on rule matching.

[0123] S500: Based on the degree of matching between the description of each element instance and the standard description, calculate the description specification coupling degree, correct the element missing degree, and obtain the corrected element completeness.

[0124] This step calculates the degree of matching between the description of each element instance and the standard description template, generates the description specification coupling degree, and corrects the element missing degree accordingly. This corrected element completeness degree can reflect both the coverage of the elements and the description quality of the elements, avoiding the omission of cases where elements exist but the description is unqualified.

[0125] Step S500 in the method provided by the present invention includes:

[0126] For each element instance, a corresponding standard expression template is obtained from the legal element knowledge base according to the element type label. The semantic similarity between the text content of the element instance and the standard expression template is calculated as the expression standardization of the element instance.

[0127] Calculate the weighted sum of the representation normalization of all feature instances in the feature instance set, and use it as the coupling representation normalization.

[0128] The element missing degree of each paragraph is fused and calculated to obtain the overall element missing degree, and the initial element completeness is calculated based on the overall element missing degree, wherein the initial element completeness is inversely proportional to the overall element missing degree;

[0129] The initial element completeness is corrected using the coupling representation normalization degree to obtain the corrected element completeness.

[0130] In this step, each extracted element instance is first traversed, and the corresponding standard expression template is searched from the legal element knowledge base based on its element type label. The semantic similarity between the text content of the element instance and the standard expression template is calculated as the expression standardization degree. The semantic similarity calculation can employ a pre-trained semantic similarity model.

[0131] For example, in complaint A, there is an element instance with the element type label "loan amount" and the text content "RMB 100,000". The standard expression template for the loan amount obtained from the legal element knowledge base is: "Loan amount is [specific amount] yuan". Inputting both into a pre-trained semantic similarity model, the model outputs a similarity score of 0.85, indicating that the expression standardization of this element instance is 0.85.

[0132] Secondly, the standardization of expression for all extracted element instances is weighted and summed. The weights are preset based on the importance of each element type in the legal review of the complaint; the higher the importance of an element type, the greater its impact on the overall evaluation. For example, core elements, such as the loan agreement and payment, have a weight of 0.3; important elements, such as the loan amount and interest agreement, have a weight of 0.2; and auxiliary elements, such as repayment status, have a weight of 0.1. The coupled standardization of expression is the sum of the standardization of expression for each element instance multiplied by its corresponding weight.

[0133] For example, complaint A extracts four element instances with the following standardization and weights: agreement to lend / borrow (0.9, weight 0.3), loan amount (0.85, weight 0.2), payment (0.95, weight 0.3), and interest agreement (0.7, weight 0.2). Therefore, the coupling standardization = 0.9 × 0.3 + 0.85 × 0.2 + 0.95 × 0.3 + 0.7 × 0.2 = 0.865.

[0134] Next, the calculated element missing degree for each paragraph is obtained, and the element missing degrees of each paragraph are weighted and merged to obtain the overall element missing degree. The merging weights are preset according to the importance of each paragraph in legal review; for example, the weight of the facts and reasons paragraph is 0.4, the weight of the claims paragraph is 0.3, the weight of the evidence list paragraph is 0.2, and the weight of the party information paragraph is 0.1. The overall element missing degree is the sum of the element missing degrees of each paragraph multiplied by their corresponding weights. The initial element completeness is inversely proportional to the overall element missing degree, and the calculation formula is: Initial element completeness = 1 - Overall element missing degree.

[0135] For example, the missing element degree and weight of each paragraph of Complaint A are as follows: Party Information paragraph 0.1, weight 0.1; Claims paragraph 0.0, weight 0.3; Facts and Reasons paragraph 0.33, weight 0.4; List of Evidence paragraph 0.2, weight 0.2. Therefore, the overall missing element degree = 0.1 × 0.1 + 0.0 × 0.3 + 0.33 × 0.4 + 0.2 × 0.2 = 0.182. The initial element completeness = 1 - 0.182 = 0.818.

[0136] Finally, the obtained coupling representation standardization is multiplied by the initial element completeness to obtain the revised element completeness. That is, revised element completeness = initial element completeness × coupling representation standardization. This shows that even if the element coverage is relatively complete, if the representation of existing elements is not standardized enough, the final completeness will still be lowered, thus more accurately reflecting the overall element quality of the complaint.

[0137] For example, the initial element completeness of complaint A is 0.818, the coupling expression standardization is 0.865, and the corrected element completeness is approximately 0.818 × 0.865 ≈ 0.708. The results show that although complaint A has 81.8% completeness in terms of element coverage, the expression of some elements is not standardized enough, thus the overall corrected element completeness drops to 70.8%.

[0138] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0139] In summary, this step generates the coupling degree of expression standard by calculating the semantic similarity between each element instance and the standard expression template, and uses this to correct the element missing degree. The corrected element completeness reflects both the coverage ratio of the necessary elements and the expression quality of the existing elements, effectively preventing the situation where elements are filled in but the expression is vague or non-standard from being misjudged as qualified.

[0140] S600: Based on the completeness of the modified elements and the logical coupling strength, calculate the comprehensive integrity index. When the comprehensive integrity index is lower than the integrity threshold, output the corresponding element defect location result.

[0141] like Figure 2 As shown, this step integrates the completeness of the corrected elements and the strength of logical coupling obtained from the previous steps to generate a unified comprehensive completeness index, which serves as the final evaluation indicator for the overall quality of the complaint. Simultaneously, a completeness threshold is set for compliance determination. When the index falls below the completeness threshold, the intermediate calculation results of each step are automatically reviewed to locate and output specific element deficiencies, providing precise correction guidance for the parties involved or reviewers.

[0142] Step S600 in the method provided by the present invention includes:

[0143] The element emphasis weight and logical emphasis weight corresponding to the current complaint type are obtained from the legal element knowledge base. The element emphasis weight and the logical emphasis weight are determined statistically based on the degree of influence of element completeness and logical coupling on the complaint quality in historical qualified complaint samples under the current complaint type. The sum of the element emphasis weight and the logical emphasis weight is 1.

[0144] Multiply the completeness of the modified element by the element emphasis weight, and the resulting product is recorded as the element weighted component. Multiply the logical coupling strength by the logical emphasis weight, and the resulting product is recorded as the logical weighted component. Add the element weighted component and the logical weighted component, and the sum is used as the comprehensive completeness index.

[0145] In this step, the element emphasis weight and logical emphasis weight corresponding to each type of complaint are first obtained from the legal element knowledge base. The weights are determined statistically based on the degree of influence of element completeness and logical coupling on the quality of the complaint in historical qualified complaint samples under the current complaint type, and the sum of the two is 1. For example, for complaint types with a wide variety of elements and strict format requirements, the element emphasis weight is higher; for complaint types with complex logical relationships that require rigorous deduction, the logical emphasis weight is higher.

[0146] For example, the current complaint type is a private lending dispute. In private lending disputes, the completeness and standardized expression of core elements such as the loan agreement and payment are crucial to the case's adjudication. At the same time, the logical correspondence between the lending relationship and interest calculation is also important. Based on statistics from historical qualified samples, the element-based weighting is 0.55, the logical weighting is 0.45, and the sum of the two is 1.

[0147] Secondly, obtain the revised element completeness score and multiply it by the obtained element emphasis weight to obtain the element weighted component. Element weighted component = revised element completeness score × element emphasis weight. For example, the revised element completeness score of complaint A is 0.708, the element emphasis weight is 0.55, and the element weighted component = 0.708 × 0.55 = 0.3894.

[0148] Next, obtain the logical coupling strength and multiply it by the logical emphasis weight to get the logical weighted component. Logical weighted component = logical coupling strength × logical emphasis weight. For example, the logical coupling strength of complaint A is 0.763, the logical emphasis weight is 0.45, and the logical weighted component = 0.763 × 0.45 = 0.34335.

[0149] Finally, the element-weighted components and the logical-weighted components are added together to obtain the comprehensive completeness index. That is, the comprehensive completeness index = element-weighted components + logical-weighted components, with a value ranging from 0 to 1. It reflects the weighted performance of the complaint in four dimensions: element coverage, expression standardization, logical consistency, and information density. For example, if the element-weighted component of complaint A is 0.3894 and the logical-weighted component is 0.34335, the comprehensive completeness index = 0.3894 + 0.34335 = 0.73275 ≈ 0.733.

[0150] After obtaining the comprehensive integrity index, it is compared with the integrity threshold. When the comprehensive integrity index is lower than the integrity threshold, the corresponding feature defect location result is output, including:

[0151] When the comprehensive integrity index is lower than the integrity threshold, each paragraph is traversed. If the missing element degree of a paragraph is greater than the preset missing element threshold, the paragraph is marked as a missing element paragraph. Based on the missing element type not extracted in the list of essential sub-elements corresponding to the paragraph, missing element location information is generated. The missing element location information includes the paragraph name and the missing element type name.

[0152] If the rule matching degree of a paragraph is less than the preset matching degree threshold, the paragraph is marked as a logically contradictory paragraph, and logically contradictory location information is generated. The logically contradictory location information includes the paragraph name, element instance content, and constraint type.

[0153] If the expression standardization degree of an element instance is less than a preset standardization degree threshold, the element instance is marked as an expression defect instance, and expression defect location information is generated. The expression defect location information includes the paragraph name where the element instance is located, the content of the element instance, and the corresponding standard expression template.

[0154] The missing element location information, the logical contradiction location information, and the expression defect location information are integrated into the element defect location result and output.

[0155] The acquisition of the complete threshold includes:

[0156] For the sample complaint text set, calculate and obtain the sample comprehensive integrity index of the sample complaint text;

[0157] The comprehensive integrity index of all sample complaint texts labeled as qualified constitutes the qualified sample index set, and the comprehensive integrity index of all sample complaint texts labeled as unqualified constitutes the unqualified sample index set.

[0158] Calculate the mean and standard deviation of the qualified sample index set, and use the difference obtained by subtracting the standard deviation by a preset multiple from the mean as the candidate lower limit threshold. Calculate the mean and standard deviation of the unqualified sample index set, and use the sum obtained by adding the standard deviation by a preset multiple to the mean as the candidate upper limit threshold.

[0159] The arithmetic mean of the candidate lower threshold and the candidate upper threshold is taken as the complete threshold.

[0160] Specifically, the comprehensive sample completeness index is first calculated for each sample complaint in the sample complaint text set. For example, the sample complaint text set contains 1000 historical complaints, and the comprehensive sample completeness index is calculated for each one. Among them, the comprehensive sample completeness index of complaint C is 0.82, and it is labeled as qualified; the comprehensive sample completeness index of complaint D is 0.45, and it is labeled as unqualified; and the comprehensive sample completeness index of complaint E is 0.68, and it is labeled as qualified.

[0161] The aforementioned "qualified" labels are based on the actual review results of historical complaints by the court's case filing division. For example, complaints that pass review and are filed are marked as qualified, while complaints that are returned for correction or not filed are marked as unqualified. Alternatively, legal experts may manually review each complaint for completeness based on relevant litigation laws. Specific standards include: whether the complaint contains all the legally required elements for that type of complaint; whether the expression of each element is clear and unambiguous; and whether there are logical contradictions between elements across paragraphs. Compliance with all requirements results in a qualified complaint, while incomplete or contradictory complaints are marked as unqualified.

[0162] Secondly, based on the integrity assessment label attached to each sample complaint, the calculated comprehensive sample integrity index is divided into two groups: the index of sample complaints labeled as qualified constitutes the qualified sample index set, and the index of sample complaints labeled as unqualified constitutes the unqualified sample index set. For example, after division, the qualified sample index set contains 700 index values, and the unqualified sample index set contains 300 index values.

[0163] Next, for the qualified sample index set, calculate its mean and standard deviation. Subtract a preset multiple from the standard deviation of the mean as the candidate lower threshold, i.e., candidate lower threshold = mean - preset multiple × standard deviation. For the unqualified sample index set, calculate its mean and standard deviation. Add a preset multiple to the standard deviation of the mean as the candidate upper threshold, i.e., candidate upper threshold = mean + preset multiple × standard deviation.

[0164] If the sample size of a set is too small or empty, the statistical mean and standard deviation will not be representative. Therefore, a minimum sample size threshold is added. When the size of any sample set is below the threshold, such as 30, a manually preset default complete threshold is used instead of statistical calculation. The rule for setting the default complete threshold is as follows: legal experts determine a general judgment threshold as a fallback parameter based on their experience in case filing review and considering various types of review standards. The typical value range of the default complete threshold is between 0.6 and 0.8, for example, it can be preset to 0.65. When the sample data is sufficient, it automatically switches back to the calculation method based on statistical distribution, ensuring that the complete threshold has both statistical reliability and practical operability.

[0165] The preset multiple is used to control the confidence boundary range of the full threshold. The setting rule is: the larger the preset multiple, the further the full threshold moves towards the tail of the distribution, and the more lenient the judgment criteria; the smaller the preset multiple, the further the full threshold moves towards the center of the distribution, and the more stringent the judgment criteria. The typical value range is 1 to 3, and a preset multiple of 2 is usually chosen to achieve approximately 95% confidence interval coverage.

[0166] For example, let's set a preset multiplier of 2. If the mean of the qualified sample index set is 0.80 and the standard deviation is 0.10, then the candidate lower threshold is 0.80 - 2 × 0.10 = 0.60. If the mean of the unqualified sample index set is 0.50 and the standard deviation is 0.08, then the candidate upper threshold is 0.50 + 2 × 0.08 = 0.66.

[0167] Finally, the arithmetic mean of the candidate lower threshold and candidate upper threshold calculated above is taken as the final complete threshold. That is, complete threshold = (candidate lower threshold + candidate upper threshold) / 2. This ensures that the threshold lies between the low-tail boundary of the acceptable sample distribution and the high-tail boundary of the unacceptable sample distribution, effectively balancing the false rejection rate and the false acceptance rate.

[0168] For example, if the lower threshold for candidates is 0.60 and the upper threshold for candidates is 0.66, then the completeness threshold = (0.60 + 0.66) / 2 = 0.63. This is used to determine whether the completeness of the complaint is satisfactory. For a new complaint, if its overall completeness index is lower than 0.63, it is deemed unsatisfactory and the defect location result is output.

[0169] In this step, when the overall completeness index is lower than the completeness threshold, for example, the completeness threshold is 0.63. The overall completeness index of complaint B is 0.52. First, we traverse each paragraph of complaint B and check whether the element missingness of each paragraph is greater than the preset missingness threshold.

[0170] The preset missing element threshold is a pre-defined threshold for judgment. Its setting rule is as follows: based on the statistical distribution of missing elements in each paragraph of qualified complaints in historical samples, the upper quantile value of the missing element value in the qualified samples is taken, such as the 90th percentile. If it exceeds this value, the missing element is considered unacceptable. For example, the preset missing element threshold can be set to 0.3. When the missing element value of a paragraph is greater than the threshold, it is marked as a paragraph with missing elements. Based on the corresponding list of required sub-elements, the missing element types are listed, generating missing element location information. The format of the missing element location information is: [Paragraph Name, List of Missing Element Type Names].

[0171] For example, the missing element score of the facts and reasons paragraph in complaint B is 0.5, which is greater than the preset missing element score threshold of 0.3. Therefore, this paragraph is marked as a missing element paragraph. The list of required sub-elements includes [loan agreement, loan amount, payment, loan term, interest agreement, repayment status]. The actual extracted element types are [loan amount, payment, interest agreement], and the missing element types are [loan agreement, loan term, repayment status]. Therefore, the missing element location information is generated as follows: [Element Missing], Facts and Reasons paragraph, missing elements: loan agreement, loan term, repayment status.

[0172] Secondly, iterate through the verified cross-paragraph element logic rules and check whether the rule matching degree of each rule is less than the preset matching degree threshold.

[0173] The preset matching degree threshold is a pre-defined judgment threshold. Its setting rule is: based on the statistical distribution of rule matching degrees, if the degree is below the threshold, the logical relationship between elements is considered invalid or contradictory. For example, the preset matching degree threshold can be set to 0.5. When the rule matching degree of a rule is below the threshold, the target paragraph involved in that rule is marked as a logically contradictory paragraph, and logical contradiction location information is generated. The format of the logical contradiction location information is: [Paragraph Name, Source Element Instance Content, Target Element Instance Content, Constraint Type].

[0174] For example, in Complaint B, the rule matching degree between the rule [Paragraph of Claim, Interest Claim] and the rule [Paragraph of Facts and Reasons, Interest Agreement] which is a quantity correspondence constraint is 0.3, which is less than the preset matching degree threshold of 0.5. Therefore, the paragraph of Facts and Reasons is marked as a logical contradiction paragraph. The source element instance content is a request for a judgment ordering payment of interest of 8,000 yuan, and the target element instance content is an agreed interest rate of 3% per annum, which means that based on the loan principal of 100,000 yuan and the loan term of 1 year, the interest payable should be 3,000 yuan, which is inconsistent with the claimed 8,000 yuan. Therefore, the logical contradiction location information is generated as follows: [Logical Contradiction], paragraph of Facts and Reasons, the amount of interest claimed of 8,000 yuan does not correspond to the agreed annual interest rate of 3%, constraint type: quantity correspondence constraint.

[0175] Next, iterate through each element instance whose expression normalization has been calculated and check whether its expression normalization is less than the preset normalization threshold.

[0176] The preset standardization threshold is a pre-defined judgment threshold. Its setting rule is as follows: based on the statistical distribution of the standardization of each element instance in the qualified complaint sample, if the standardization is below the threshold, the expression is considered non-standard and may affect the review and understanding. For example, the preset standardization threshold can be set to 0.6. When the standardization of an element instance is below the threshold, it is marked as an instance of expression defect, and expression defect location information is generated. The format of the expression defect location information is: [paragraph name, element instance content, standard expression template].

[0177] For example, if the standardization score of the interest agreement element instance in Complaint B is 0.45, which is less than the preset standardization score threshold of 0.6, then this element instance is marked as a statement defect instance. The element instance is located in the Facts and Reasons paragraph, and its content is "Interest is calculated as agreed." The corresponding standard statement template is: "Agreed interest is an annual interest rate [specific interest rate]." Therefore, the statement defect location information is generated as follows: [Statement Defect], Facts and Reasons paragraph, Interest Agreement element content: "Interest is calculated as agreed" is not standard, and it is recommended to modify it to: "Agreed interest is an annual interest rate [specific interest rate]."

[0178] Finally, all generated missing element location information, logical contradiction location information, and description defect location information are integrated to form a complete element defect location result, which is then output. The output format can be organized according to problem type, making it convenient for reviewers or parties involved to process each item by type.

[0179] It should be noted that the above examples and figures are for illustrative purposes only and do not constitute a limitation on the present invention.

[0180] In summary, this step generates a unified comprehensive integrity index as the final measure of the quality of the complaint, and determines its compliance based on a completeness threshold determined by historical sample statistics. When the index fails to meet the standard, the system automatically backtracks to the intermediate results of each stage, accurately locating the specific location and content of missing elements, logical contradictions, and expression defects. This achieves a one-stop closed-loop detection from overall scoring to specific defects, providing clear guidance for parties to amend their complaints.

[0181] In summary, this invention constructs a fully automated detection system from complaint text input to defect location output, effectively solving the problem that existing technologies can only perform surface format checks and cannot conduct multi-dimensional comprehensive judgments at the semantic level, significantly improving the accuracy and practicality of complaint integrity detection.

[0182] Example 2, as Figure 3 As shown, this invention provides a semantic parsing-based system for detecting the integrity of elements in a complaint, the system comprising:

[0183] The element extraction and segmentation module 11 is used to obtain the complaint text to be detected, extract the legal element information in the complaint text based on the preset legal element knowledge base, and segment the complaint text to obtain multiple paragraphs.

[0184] The process of obtaining the complaint text to be detected involves extracting legal element information from the complaint text based on a preset legal element knowledge base, and segmenting the complaint text to obtain multiple paragraphs, including:

[0185] Obtain the complaint text and identify the current complaint type from the complaint text;

[0186] Based on the current complaint type, retrieve the corresponding list of essential elements and the standard expression templates for each element type from the legal element knowledge base;

[0187] The complaint text is input into a pre-trained feature extraction model to perform semantic parsing on the complaint text and extract feature instances belonging to the feature types covered by the essential feature list. Each feature instance includes a feature type label, feature text content, and location range. The feature extraction model is trained using a sample complaint text set and a sample annotation set.

[0188] Based on the legal element knowledge base, the complaint text is automatically segmented into multiple paragraphs, wherein the paragraph types of the multiple paragraphs include party information paragraphs, litigation request paragraphs, fact and reason paragraphs, and evidence list paragraphs.

[0189] The element missingness statistics module 12 is used to calculate the element missingness of each paragraph in the complaint text based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base.

[0190] Specifically, the step of calculating the element missingness of each paragraph in the complaint text based on the essential element list corresponding to each type of complaint in the legal element knowledge base includes:

[0191] Obtain the list of essential elements corresponding to the current complaint type. The list of essential elements includes a list of essential sub-elements for each paragraph. Each list of essential sub-elements includes a set of element types that should appear in the paragraph type.

[0192] For each paragraph, the total number of element types in the corresponding list of required sub-elements is taken as the total number of elements that the paragraph should have.

[0193] Based on the element type label of each paragraph, obtain the total number of paragraph elements;

[0194] The element missing rate of the paragraph is calculated based on the ratio of the total number of elements in the paragraph to the total number of elements that the paragraph should have.

[0195] The logical matching strength calculation module 13 is used to obtain cross-paragraph element logical rules and calculate the logical matching strength based on the logical matching relationship between the element instances extracted from each paragraph.

[0196] The step of obtaining cross-paragraph element logic rules, based on the logical matching relationship between element instances extracted from each paragraph, and calculating the logical matching strength, includes:

[0197] Obtain the set of cross-paragraph element logical rules corresponding to the current complaint type, wherein each cross-paragraph element logical rule records the logical constraint relationship and constraint type between two element instances, and the constraint type includes element consistency constraint, quantity correspondence constraint and identity qualification correspondence constraint;

[0198] For each of the cross-paragraph element logic rules, extract the target element instance from the element instance to form a rule verification element group;

[0199] For each element instance in the rule verification element group, the rule matching degree of the element instance is calculated according to the constraint type. When the constraint type is an element consistency constraint, the text semantic similarity of each element instance is calculated to obtain the rule matching degree.

[0200] When the constraint type is a quantity-correspondence constraint, the numerical deviation ratio of each element instance is calculated and obtained, and the rule matching degree is calculated based on the numerical deviation ratio.

[0201] When the constraint type is an identity qualification correspondence constraint, the identity type label corresponding to each element instance is compared with the preset qualification correspondence mapping table to obtain the rule matching degree;

[0202] The rule matching degree of the paragraph is calculated by weighting the paragraph type to obtain the logical matching strength.

[0203] The logical coupling strength calculation module 14 is used to calculate the logical correlation degree based on the element density of each paragraph, and to perform a fusion calculation on the logical correlation degree and the logical matching strength to obtain the logical coupling strength.

[0204] The step of calculating the logical relevance based on the element density of each paragraph, and then fusing the logical relevance with the logical matching strength to obtain the logical coupling strength, includes:

[0205] For each paragraph, the total number of extracted element instances is counted and denoted as the paragraph instance count;

[0206] The element density of the paragraph is obtained by calculating the ratio of the number of paragraph instances to the total number of text characters in the paragraph.

[0207] From the sample complaint text set, obtain the historical average feature density corresponding to the paragraph type under the current complaint type;

[0208] Calculate the deviation between the element density and the historical average element density to obtain the element density deviation.

[0209] The overall element density deviation is obtained by weighted summation of the element density deviations of all the paragraphs.

[0210] Based on the overall element density deviation, the logical correlation degree is calculated and obtained, wherein the logical correlation degree is inversely proportional to the element density deviation.

[0211] The logical coupling strength is obtained by multiplying the logical matching strength by the logical correlation degree.

[0212] The modified element completeness acquisition module 15 is used to calculate the expression specification coupling degree based on the matching degree between the expression method of each element instance and the standard expression, and to correct the element missing degree to obtain the modified element completeness.

[0213] The process of calculating the coupling degree of the expression specification based on the degree of matching between the expression method of each element instance and the standard expression, and correcting the element missingness to obtain the corrected element completeness includes:

[0214] For each element instance, a corresponding standard expression template is obtained from the legal element knowledge base according to the element type label. The semantic similarity between the text content of the element instance and the standard expression template is calculated as the expression standardization of the element instance.

[0215] Calculate the weighted sum of the representation normalization of all feature instances in the feature instance set, and use it as the coupling representation normalization.

[0216] The element missing degree of each paragraph is fused and calculated to obtain the overall element missing degree, and the initial element completeness is calculated based on the overall element missing degree, wherein the initial element completeness is inversely proportional to the overall element missing degree;

[0217] The initial element completeness is corrected using the coupling representation normalization degree to obtain the corrected element completeness.

[0218] The integrity index calculation and defect location module 16 is used to calculate the comprehensive integrity index based on the completeness of the modified element and the logical coupling strength. When the comprehensive integrity index is lower than the integrity threshold, the corresponding element defect location result is output.

[0219] The calculation of the comprehensive completeness index based on the completeness of the modified elements and the logical coupling strength includes:

[0220] The element emphasis weight and logical emphasis weight corresponding to the current complaint type are obtained from the legal element knowledge base. The element emphasis weight and the logical emphasis weight are determined statistically based on the degree of influence of element completeness and logical coupling on the complaint quality in historical qualified complaint samples under the current complaint type. The sum of the element emphasis weight and the logical emphasis weight is 1.

[0221] Multiply the completeness of the modified element by the element emphasis weight, and the resulting product is recorded as the element weighted component. Multiply the logical coupling strength by the logical emphasis weight, and the resulting product is recorded as the logical weighted component. Add the element weighted component and the logical weighted component, and the sum is used as the comprehensive completeness index.

[0222] When the comprehensive integrity index is lower than the integrity threshold, the corresponding feature defect location result is output, including:

[0223] When the comprehensive integrity index is lower than the integrity threshold, each paragraph is traversed. If the missing element degree of a paragraph is greater than the preset missing element threshold, the paragraph is marked as a missing element paragraph. Based on the missing element type not extracted in the list of essential sub-elements corresponding to the paragraph, missing element location information is generated. The missing element location information includes the paragraph name and the missing element type name.

[0224] If the rule matching degree of a paragraph is less than the preset matching degree threshold, the paragraph is marked as a logically contradictory paragraph, and logically contradictory location information is generated. The logically contradictory location information includes the paragraph name, element instance content, and constraint type.

[0225] If the expression standardization degree of an element instance is less than a preset standardization degree threshold, the element instance is marked as an expression defect instance, and expression defect location information is generated. The expression defect location information includes the paragraph name where the element instance is located, the content of the element instance, and the corresponding standard expression template.

[0226] The missing element location information, the logical contradiction location information, and the expression defect location information are integrated into the element defect location result and output.

[0227] The acquisition of the complete threshold includes:

[0228] For the sample complaint text set, calculate and obtain the sample comprehensive integrity index of the sample complaint text;

[0229] The comprehensive integrity index of all sample complaint texts labeled as qualified constitutes the qualified sample index set, and the comprehensive integrity index of all sample complaint texts labeled as unqualified constitutes the unqualified sample index set.

[0230] Calculate the mean and standard deviation of the qualified sample index set, and use the difference obtained by subtracting the standard deviation by a preset multiple from the mean as the candidate lower limit threshold. Calculate the mean and standard deviation of the unqualified sample index set, and use the sum obtained by adding the standard deviation by a preset multiple to the mean as the candidate upper limit threshold.

[0231] The arithmetic mean of the candidate lower threshold and the candidate upper threshold is taken as the complete threshold.

[0232] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0233] This specification and accompanying drawings are merely illustrative examples of the invention and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its scope. Therefore, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is intended to include these modifications and modifications.

Claims

1. A method for detecting the completeness of elements in a complaint based on semantic parsing, characterized in that, include: The process involves acquiring the complaint text to be tested, extracting legal element information from the complaint text based on a pre-defined legal element knowledge base, and segmenting the complaint text to obtain multiple paragraphs. Based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base, the element missingness of each paragraph in the complaint text is calculated. Obtain cross-paragraph element logic rules, and calculate the logical matching strength based on the logical matching relationship between element instances extracted from each paragraph; Logical relevance is calculated based on the element density of each paragraph, and logical coupling strength is obtained by fusing the logical relevance with the logical matching strength. Based on the degree of matching between the description of each element instance and the standard description, the description specification coupling degree is calculated, and the element missing degree is corrected to obtain the corrected element completeness. Based on the completeness of the modified elements and the logical coupling strength, a comprehensive integrity index is calculated. When the comprehensive integrity index is lower than the integrity threshold, the corresponding element defect location result is output.

2. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, The process of obtaining the complaint text to be detected involves extracting legal element information from the complaint text based on a preset legal element knowledge base, and segmenting the complaint text to obtain multiple paragraphs, including: Obtain the complaint text and identify the current complaint type from the complaint text; Based on the current complaint type, retrieve the corresponding list of essential elements and the standard expression templates for each element type from the legal element knowledge base; The complaint text is input into a pre-trained feature extraction model to perform semantic parsing on the complaint text and extract feature instances belonging to the feature types covered by the essential feature list. Each feature instance includes a feature type label, feature text content, and location range. The feature extraction model is trained using a sample complaint text set and a sample annotation set. Based on the legal element knowledge base, the complaint text is automatically segmented into multiple paragraphs, wherein the paragraph types of the multiple paragraphs include party information paragraphs, litigation request paragraphs, fact and reason paragraphs, and evidence list paragraphs.

3. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 2, characterized in that, The method of calculating the missing element degree of each paragraph in the complaint text based on the essential element list corresponding to each type of complaint in the legal element knowledge base includes: Obtain the list of essential elements corresponding to the current complaint type. The list of essential elements includes a list of essential sub-elements for each paragraph. Each list of essential sub-elements includes a set of element types that should appear in the paragraph type. For each paragraph, the total number of element types in the corresponding list of required sub-elements is taken as the total number of elements that the paragraph should have. Based on the element type label of each paragraph, obtain the total number of paragraph elements; The element missing rate of the paragraph is calculated based on the ratio of the total number of elements in the paragraph to the total number of elements that the paragraph should have.

4. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, The method for obtaining cross-paragraph element logic rules, based on the logical matching relationship between element instances extracted from each paragraph, calculates the logical matching strength, including: Obtain the set of cross-paragraph element logical rules corresponding to the current complaint type, wherein each cross-paragraph element logical rule records the logical constraint relationship and constraint type between two element instances, and the constraint type includes element consistency constraint, quantity correspondence constraint and identity qualification correspondence constraint; For each of the cross-paragraph element logic rules, extract the target element instance from the element instance to form a rule verification element group; For each element instance in the rule verification element group, the rule matching degree of the element instance is calculated according to the constraint type. When the constraint type is an element consistency constraint, the text semantic similarity of each element instance is calculated to obtain the rule matching degree. When the constraint type is a quantity-correspondence constraint, the numerical deviation ratio of each element instance is calculated and obtained, and the rule matching degree is calculated based on the numerical deviation ratio. When the constraint type is an identity qualification correspondence constraint, the identity type label corresponding to each element instance is compared with the preset qualification correspondence mapping table to obtain the rule matching degree; The rule matching degree of the paragraph is calculated by weighting the paragraph type to obtain the logical matching strength.

5. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, The step of calculating the logical relevance based on the element density of each paragraph, and then fusing the logical relevance with the logical matching strength to obtain the logical coupling strength, includes: For each paragraph, the total number of extracted element instances is counted and denoted as the paragraph instance count; The element density of the paragraph is obtained by calculating the ratio of the number of paragraph instances to the total number of text characters in the paragraph. From the sample complaint text set, obtain the historical average feature density corresponding to the paragraph type under the current complaint type; Calculate the deviation between the element density and the historical average element density to obtain the element density deviation. The overall element density deviation is obtained by weighted summation of the element density deviations of all the paragraphs. Based on the overall element density deviation, the logical correlation degree is calculated and obtained, wherein the logical correlation degree is inversely proportional to the element density deviation. The logical coupling strength is obtained by multiplying the logical matching strength by the logical correlation degree.

6. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, The process of calculating the coupling degree of the expression specification based on the matching degree between the expression method of each element instance and the standard expression, and correcting the element missingness to obtain the corrected element completeness includes: For each element instance, a corresponding standard expression template is obtained from the legal element knowledge base according to the element type label. The semantic similarity between the text content of the element instance and the standard expression template is calculated as the expression standardization of the element instance. Calculate the weighted sum of the representation normalization of all feature instances in the feature instance set, and use it as the coupling representation normalization. The element missing degree of each paragraph is fused and calculated to obtain the overall element missing degree, and the initial element completeness is calculated based on the overall element missing degree, wherein the initial element completeness is inversely proportional to the overall element missing degree; The initial element completeness is corrected using the coupling representation normalization degree to obtain the corrected element completeness.

7. The method for detecting the completeness of complaint elements based on semantic parsing according to claim 1, characterized in that, The calculation of the comprehensive completeness index based on the completeness of the modified elements and the logical coupling strength includes: The element emphasis weight and logical emphasis weight corresponding to the current complaint type are obtained from the legal element knowledge base. The element emphasis weight and the logical emphasis weight are determined statistically based on the degree of influence of element completeness and logical coupling on the complaint quality in historical qualified complaint samples under the current complaint type. The sum of the element emphasis weight and the logical emphasis weight is 1. Multiply the completeness of the modified element by the element emphasis weight, and the resulting product is recorded as the element weighted component. Multiply the logical coupling strength by the logical emphasis weight, and the resulting product is recorded as the logical weighted component. Add the element weighted component and the logical weighted component, and the sum is used as the comprehensive completeness index.

8. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, When the comprehensive integrity index is lower than the integrity threshold, the corresponding feature defect location result is output, including: When the comprehensive integrity index is lower than the integrity threshold, each paragraph is traversed. If the missing element degree of a paragraph is greater than the preset missing element threshold, the paragraph is marked as a missing element paragraph. Based on the missing element type not extracted in the list of essential sub-elements corresponding to the paragraph, missing element location information is generated. The missing element location information includes the paragraph name and the missing element type name. If the rule matching degree of a paragraph is less than the preset matching degree threshold, the paragraph is marked as a logically contradictory paragraph, and logically contradictory location information is generated. The logically contradictory location information includes the paragraph name, element instance content, and constraint type. If the expression standardization degree of an element instance is less than a preset standardization degree threshold, the element instance is marked as an expression defect instance, and expression defect location information is generated. The expression defect location information includes the paragraph name where the element instance is located, the content of the element instance, and the corresponding standard expression template. The missing element location information, the logical contradiction location information, and the expression defect location information are integrated into the element defect location result and output.

9. The method for detecting the integrity of complaint elements based on semantic parsing according to claim 1, characterized in that, Obtaining the complete threshold includes: For the sample complaint text set, calculate and obtain the sample comprehensive integrity index of the sample complaint text; The comprehensive integrity index of all sample complaint texts labeled as qualified constitutes the qualified sample index set, and the comprehensive integrity index of all sample complaint texts labeled as unqualified constitutes the unqualified sample index set. Calculate the mean and standard deviation of the qualified sample index set, and use the difference obtained by subtracting the standard deviation by a preset multiple from the mean as the candidate lower limit threshold. Calculate the mean and standard deviation of the unqualified sample index set, and use the sum obtained by adding the standard deviation by a preset multiple to the mean as the candidate upper limit threshold. The arithmetic mean of the candidate lower threshold and the candidate upper threshold is taken as the complete threshold.

10. A system for detecting the completeness of elements in a complaint based on semantic parsing, characterized in that, The method for performing the semantic parsing-based completeness detection of complaint elements according to any one of claims 1-9 includes: The element extraction and segmentation module is used to obtain the complaint text to be detected. Based on a preset legal element knowledge base, it extracts the legal element information in the complaint text and segments the complaint text to obtain multiple paragraphs. The element missingness statistics module is used to calculate the element missingness of each paragraph in the complaint text based on the list of essential elements corresponding to each type of complaint in the legal element knowledge base. The logical matching strength calculation module is used to obtain the logical rules of cross-paragraph elements and calculate the logical matching strength based on the logical matching relationship between the element instances extracted from each paragraph. The logical coupling strength calculation module is used to calculate the logical correlation degree based on the element density of each paragraph, and to perform a fusion calculation on the logical correlation degree and the logical matching strength to obtain the logical coupling strength. The modified element completeness acquisition module is used to calculate the coupling degree of the expression specification based on the degree of matching between the expression method of each element instance and the standard expression, and to correct the element missingness to obtain the modified element completeness. The integrity index calculation and defect location module is used to calculate the comprehensive integrity index based on the completeness of the modified elements and the logical coupling strength. When the comprehensive integrity index is lower than the integrity threshold, the corresponding element defect location result is output.