Intelligent positioning method and positioning device for contract key fields
By constructing a cross-document cause-effect graph and introducing adjudication logic based on document hierarchy weights and clause authority coefficients, the problem of inaccurate location of key fields across documents in existing technologies is solved, achieving high accuracy and reliability in locating complex contract sets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies struggle to accurately locate key contract fields that span multiple pages, attachments, or even related contracts, leading to inaccurate positioning.
A cross-document causal graph is constructed, and the collection of contract documents is abstracted into a semantic network with logical relationships through four types of nodes: entity, declaration, reference, and action, and three types of edges: reference, causality, and constraint. Key fields are extracted using preset semantic recognition rules and relation extraction templates, and document level weights and clause authority coefficients are introduced for adjudication.
It improves the accuracy and reliability of locating key fields across documents, enabling accurate tracking and integration of key information in complex scenarios, simulating the principle of priority of the most effective in legal practice, and ensuring the most logically sound source of expression.
Smart Images

Figure CN121365090B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an intelligent positioning method and positioning device for key fields in a contract. Background Technology
[0002] In modern economic activities such as finance, law, and commerce, contracts, as core legal documents establishing the rights and obligations of all parties, are numerous and diverse. Locating and extracting key fields such as contract amount, signing date, and signatories from contract images is a fundamental and crucial step in realizing applications such as intelligent review, data analysis, and document management.
[0003] Key contract field localization techniques in related technologies primarily employ deep learning-based sequence labeling methods and multimodal fusion techniques. Specifically, this method first uses optical character recognition (OCR) to convert the contract document into a text sequence. Then, it encodes the text using a pre-trained language model or multimodal model, training a classifier or sequence labeling model on a large amount of labeled data to learn and identify entity boundaries and types within the text. During processing, the model mainly relies on the semantic relationships between the target field and its surrounding context, achieving field localization by analyzing numerical patterns near keywords such as amount and total price, or time formats near phrases such as signing date and effective date. For documents containing image elements, these methods typically employ independent computer vision models to detect image objects such as signatures, and then post-process and fuse the text extraction results with the image detection results.
[0004] However, since the core mechanism of the relevant technology is based on pattern recognition in local context, when the determination of key fields requires information integration across multiple pages, multiple attachments, or even multiple related contracts, the relevant technology has difficulty accurately locating key fields in the contract. Summary of the Invention
[0005] This application provides an intelligent positioning method and positioning device for key fields in a contract, which improves the reliability of locating key fields in a contract when the determination of key fields requires information integration across multiple pages, multiple attachments, or even multiple related contracts.
[0006] Firstly, a method for intelligently locating key fields in a contract is provided, applied to a positioning device. This method includes: the positioning device identifying entity nodes, declaration nodes, reference nodes, and action nodes from a set of contract documents based on preset semantic recognition rules. The contract document set includes a main contract document and at least one attachment document. Entity nodes are text fragments representing specific values or names; declaration nodes are text fragments containing declaration statements of key fields; reference nodes are text fragments containing expressions of referential relationships; and action nodes are text fragments representing actions or events. The positioning device extracts referential edges, causal edges, and constraint edges from the entity nodes, declaration nodes, reference nodes, and action nodes based on a preset relationship extraction template. Referential edges connect reference nodes to the entity nodes or declaration nodes they refer to; causal edges connect… Nodes with temporal or logical dependencies are connected by constraint edges, which in turn connect nodes requiring consistency verification. Based on entity nodes, declaration nodes, referencing nodes, action nodes, referential edges, causal edges, and constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its location information and the document identifier it belongs to within the contract document set. When a positioning request for a target key field is received, the positioning device locates the query node corresponding to the target key field in the cross-document causal graph. Starting from the query node, the positioning device traverses the cross-document causal graph layer by layer according to the type of edge connected to the query node, obtaining the terminating node containing the actual value of the target key field. Based on the location coordinates and the document identifier of the terminating node, the positioning device outputs the positioning result of the target key field in the contract document set.
[0007] By employing the aforementioned technical solution, the positioning device abstracts and constructs the entire contract document set (including the main contract and all attachments) into a global cross-document causal graph. This graph connects isolated information points scattered across different documents and pages into a semantic network with logical relationships, using four types of nodes (entities, declarations, references, and actions) and three types of edges (references, causality, and constraints). When locating key fields, the device can trace from a declaration to its specific definition in another document along logical paths in the graph (such as reference edges), or understand the preconditions of an event along causal edges. When determining key fields requires information integration across multiple pages, attachments, or even related contracts, the positioning device can accurately track and integrate the key information that requires traversing multiple pages, attachments, or even related contracts, thereby improving the accuracy of locating key contract fields.
[0008] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the positioning device identifying entity nodes, declaration nodes, reference nodes, and action nodes from a collection of contract documents based on preset semantic recognition rules specifically includes: the positioning device performing optical character recognition processing on each document in the contract document collection to obtain structured document data containing text content and location coordinates; the positioning device performing lexical matching on the structured document data based on a preset entity recognition dictionary to obtain candidate entity fragments; the positioning device performing pattern matching on the structured document data based on a preset declaration pattern library to obtain candidate declaration fragments; the positioning device performing syntactic analysis on the structured document data based on a preset reference relationship dictionary to obtain candidate reference fragments; the positioning device performing verb recognition on the structured document data based on a preset action vocabulary to obtain candidate action fragments; and the positioning device determining the candidate entity fragments, candidate declaration fragments, candidate reference fragments, and candidate action fragments that have passed semantic integrity verification as entity nodes, declaration nodes, reference nodes, and action nodes, respectively.
[0009] By adopting the above technical solution, the positioning device captures raw information through optical character recognition (OCR) in the initial stage of graph construction, and uses a pre-set dictionary and pattern library to perform preliminary and targeted matching of the text, filtering out candidate entities, declarations, references, and action fragments respectively. Then, the candidate entity fragments, candidate declaration fragments, candidate reference fragments, and candidate action fragments that have passed semantic integrity verification are determined as entity nodes, declaration nodes, reference nodes, and action nodes, respectively, thereby improving the accuracy of nodes and thus improving the quality of cross-document causal graphs determined based on nodes and edges.
[0010] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the positioning device determining candidate entity fragments, candidate declaration fragments, candidate reference fragments, and candidate action fragments that have passed semantic integrity verification as entity nodes, declaration nodes, reference nodes, and action nodes, respectively, specifically includes: the positioning device calculating the syntactic completeness score of each candidate fragment, the syntactic completeness score being determined based on the completeness of the subject-verb-object structure in each candidate fragment; the positioning device statistically analyzing the frequency of occurrence and contextual similarity of each candidate fragment in the contract document set; the positioning device calculating the semantic confidence of each candidate fragment based on the syntactic completeness score, frequency of occurrence, and contextual similarity; the positioning device marking candidate fragments with semantic confidence scores higher than a preset confidence threshold as verified; the positioning device performing a duplication check on the verified candidate fragments, removing redundant fragments with content overlap greater than a preset overlap threshold; and the positioning device classifying the candidate fragments after removing redundant fragments into entity nodes, declaration nodes, reference nodes, and action nodes according to the candidate fragment type.
[0011] By adopting the above technical solution, the localization device introduces a semantic confidence-based verification mechanism to conduct a rigorous quality screening of the initially identified candidate segments. This mechanism comprehensively considers the completeness of the syntactic structure (syntactic completeness score), the importance of information in the document set (frequency of occurrence), and the consistency of the context (contextual similarity), thus constructing a multi-dimensional evaluation model. This enables the localization device to reduce interfering segments caused by OCR errors, syntactic incompleteness, or semantic isolation, thereby improving the quality of cross-document causal graphs.
[0012] In conjunction with some embodiments of the first aspect, in some embodiments, before the step of the positioning device identifying entity nodes, declaration nodes, reference nodes, and action nodes from the contract document set based on preset semantic recognition rules, the method further includes: the positioning device classifying the documents in the contract document set into main contract documents, attachment documents, supplementary agreement documents, and change notice documents based on document titles, signing times, and revision identifiers; the positioning device setting the document hierarchy weight of each type of document in descending order of supplementary agreement documents, change notice documents, main contract documents, and attachment documents; the positioning device classifying the clauses in each document into special agreement clauses, general clauses, and reference clauses based on a preset clause analysis template; and the positioning device setting the clause authority coefficient of each type of clause in descending order of special agreement clauses, general clauses, and reference clauses.
[0013] By adopting the above technical solution, the positioning device introduces a preprocessing step that simulates legal interpretation principles before processing contract documents. This involves classifying document types (such as supplementary agreements and main contracts) and clause types (such as special agreements and general clauses) and assigning them decreasing quantitative weights (document hierarchy weight and clause authority coefficient). This allows the positioning device to directly adjudicate discrepancies between the main contract and supplementary agreements in subsequent steps, based on the document hierarchy weight and clause authority coefficient. This improves the automation capability for handling content contradictions in complex contract sets and enhances the accuracy of locating key fields.
[0014] In conjunction with some embodiments of the first aspect, in some embodiments, after the step of the positioning device identifying entity nodes, declaration nodes, reference nodes, and action nodes from the contract document set based on preset semantic recognition rules, the method further includes: the positioning device labeling the entity nodes, declaration nodes, reference nodes, and action nodes with the document level weight of the document to which they belong and the clause authority coefficient of the clause in which they are located; the positioning device calculating the authority score of the entity nodes, declaration nodes, reference nodes, and action nodes based on the document level weight and the clause authority coefficient.
[0015] By adopting the above technical solution, the positioning device transmits and solidifies the macro-level document hierarchy weights and clause authority coefficients to each micro-node in the graph through annotation, and further calculates a uniform authority score for each node. This makes previously homogeneous nodes differentiate in weight. For example, a node from a supplementary agreement with a specific stipulation will have a much higher authority score than a node from a general clause in an appendix.
[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the positioning device starting from the query node and traversing the cross-document causal graph layer by layer according to the type of edges connected to the query node to obtain the terminating node containing the actual value of the target key field specifically includes: the positioning device starting from the query node and traversing the cross-document causal graph layer by layer according to the type of edges connected to the query node to obtain a candidate path set, the candidate path set being all complete paths that can reach the terminating node containing the actual value of the target key field; the positioning device calculating the path authority score based on the authority score of each node on each candidate path in the candidate path set; the positioning device marking candidate paths in the candidate path set where the actual values of the terminating nodes differ as conflicting path combinations; the positioning device performing semantic equivalence analysis on the conflicting path combinations; if the semantic equivalence analysis result is non-equivalent, the positioning device taking the path with the highest path authority score in the conflicting path combination as the winning path; if the semantic equivalence analysis result is equivalent, the positioning device performing consistency verification based on the constraint edges of each conflicting path in the conflicting path combination, and taking the verified path as the winning path; the positioning device determining the terminating node of the winning path as the final terminating node.
[0017] By employing the above technical solution, when faced with multiple candidate paths pointing to different actual values, this method first qualitatively classifies the conflict through semantic equivalence analysis. For non-equivalent substantive conflicts, the positioning device initiates an adjudication logic based on path authority scores, selecting the path with the highest score as the winning path. This simulates the core principle of prioritizing the most effective path in legal practice. For equivalent superficial conflicts, the device then initiates a consistency verification procedure based on constraint edges to evaluate which path has a more rigorous and consistent contextual logic. This ensures that even if the content is identical, the system will choose the logically most irrefutable source of expression. Through this process of classification followed by adjudication, the accuracy and reliability of positioning key fields are improved when facing information contradictions and complex scenarios.
[0018] In conjunction with some embodiments of the first aspect, in some embodiments, the step of the positioning device performing semantic equivalence analysis on the combination of conflicting paths specifically includes: the positioning device extracting the actual values of each termination node in the candidate path set; the positioning device calculating the numerical difference and semantic similarity between the actual values after standardization; the positioning device identifying termination nodes with numerical differences greater than a preset difference threshold as conflicting termination nodes, thus obtaining a combination of conflicting nodes; the positioning device determining whether the combination of conflicting nodes points to the same conceptual entity through a preset equivalence relation library; if so, the semantic equivalence analysis result is equivalent; if not, the semantic equivalence analysis result is non-equivalent.
[0019] By adopting the above technical solution, the positioning device standardizes the original expressions such as "One Million Yuan," "¥1,000,000.00," and "1,000,000," converting them into standardized data (such as the value 1,000,000) that can be directly compared mathematically. Based on this, the positioning device determines conflicting node combinations by calculating the numerical difference degree and comparing it with a preset threshold. It then queries a preset equivalence relation database to determine whether the conflicting node combinations point to the same conceptual entity (for example, identifying "Party A Company" and "Company A" defined in the contract header as the same entity). If so, the semantic equivalence analysis result is equivalent; otherwise, it is not, thus improving the accuracy of the semantic equivalence analysis results.
[0020] In a second aspect, embodiments of this application provide a positioning device, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the positioning device to perform the method described in the first aspect and any possible implementation thereof.
[0021] Thirdly, embodiments of this application provide a computer program product containing instructions that, when the computer program product is run on a positioning device, cause the positioning device to perform the method described in the first aspect and any possible implementation thereof.
[0022] Fourthly, embodiments of this application provide a computer-readable storage medium including instructions that, when executed on a positioning device, cause the positioning device to perform the method described in the first aspect and any possible implementation thereof.
[0023] Understandably, the positioning device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the methods provided in the embodiments of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods, and will not be repeated here.
[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
[0025] 1. Since the positioning device abstracts and constructs the entire contract document set (including the main contract and all attachments) into a global cross-document causal graph. This graph connects isolated information points scattered in different documents and different pages into a semantic network with logical relationships through four types of nodes: entities, statements, references, and actions, and three types of edges: reference, causality, and constraint. When locating keyword fields, the device can trace from one statement along the logical path in the graph (such as a reference edge) to the specific definition in another document, or understand the preconditions of an event along the causality edge. When the determination of keyword fields requires information integration across multiple pages, multiple attachments, or even multiple related contracts, the positioning device can accurately track and integrate key information that requires information integration across multiple pages, multiple attachments, or even multiple related contracts to be determined, thereby improving the accuracy of locating contract keyword fields.
[0026] 2. When the positioning device faces multiple candidate paths pointing to different actual values, it first qualitatively analyzes the conflicts through semantic equivalence analysis. For non-equivalent substantial conflicts, the positioning device activates the adjudication logic based on the path authority score and selects the path with the highest score as the winning path. This simulates the core principle of "the higher the validity, the priority" in legal practice. For equivalent superficial conflicts, the device then activates the consistency verification program based on the constraint edge to evaluate which path has a more rigorous and non-contradictory context logic. This ensures that even if the content is the same, the system will select the source of the most logically impeccable expression. Through this processing of classification first and then adjudication, the accuracy and reliability of locating keyword fields in the face of information contradictions and complex scenarios are improved.
[0027] 3. Since the positioning device, through standardization processing, uniformly converts original expressions such as "One million yuan in full", "¥1,000,000.00", and "1 million" into normalized data that can be directly compared mathematically (such as the numerical value 1000000). On this basis, the positioning device determines the conflict node combination by calculating the numerical difference degree and comparing it with a preset threshold. And it determines whether the conflict node combination points to the same conceptual entity by querying the preset equivalence relationship library (for example, identifying that "Party A Company" and "Company A" defined at the beginning of the contract are the same entity). If so, the result of the semantic equivalence analysis is equivalent. If not, the result of the semantic equivalence analysis is non-equivalent, improving the accuracy of the result of the semantic equivalence analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a schematic flowchart of a method for intelligent location of contract keyword fields in the embodiments of the present application.
[0029] Figure 2 This is another flowchart illustrating a method for intelligently locating key contract fields in an embodiment of this application.
[0030] Figure 3 This is a schematic diagram of the physical device structure of a positioning device in the embodiments of this application. Detailed Implementation
[0031] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0032] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0033] This application provides an intelligent positioning method and positioning device for key fields in a contract, which improves the accuracy of locating key fields in a contract when the determination of key fields requires information integration across multiple pages, multiple attachments, or even multiple related contracts.
[0034] Please see Figure 1 This is a flowchart illustrating a method for intelligently locating key contract fields in an embodiment of this application.
[0035] S101, The positioning device identifies entity nodes, declaration nodes, reference nodes and action nodes from the contract document set based on preset semantic recognition rules.
[0036] The contract document collection is a logical whole, encompassing not only the main contract document but also at least one associated appendix document and supplementary agreement. Entity nodes represent text fragments containing specific numerical values or names within the contract, such as the specific amount of one million yuan or the names of the contracting parties, Company A, Company B, and Company C. Declaration nodes represent text fragments containing declarations of key fields, typically used to state a fact or agreement, such as the total amount of this contract being one million yuan. Reference nodes represent text fragments containing expressions of referential relationships, used to establish connections within or between documents, such as "Specific delivery standards are detailed in Appendix II." Action nodes represent text fragments representing specific actions or events stipulated in the contract, typically centered around verbs, such as "Party A shall pay" or "The contract shall take effect."
[0037] Specifically, in performing this step, the positioning device first receives a set of contract documents to be processed. This set may contain files in various formats, such as PDFs, Word documents, or scanned images. Next, the positioning device scans the text content segment by segment and sentence by sentence, matching it against internally stored preset semantic recognition rules. For example, when the positioning device analyzes the text "The total price of this contract is RMB 500,000, and the specific payment schedule is detailed in Appendix 3, 'Payment Plan'," it triggers multiple recognition rules: one rule for currency and numerical values identifies "RMB 500,000" as an entity node; a pattern rule for recognizing declarative sentences identifies the entire sentence "The total price of this contract is RMB 500,000" as a declaration node; and another rule for recognizing cross-references identifies "See Appendix 3, 'Payment Plan'" as a reference node. In this way, the positioning device deconstructs the originally continuous natural language text stream into a series of discrete nodes with clear semantic labels (i.e., entities, declarations, references, and actions).
[0038] In some embodiments, the positioning device can parse contract document content to identify various nodes in multiple ways: Optionally, the positioning device can employ a rule-based and dictionary-based deterministic method. First, the positioning device performs optical character recognition (OCR) processing on each document in the contract document set to obtain structured document data containing text content and precise location coordinates. Next, the positioning device performs lexical matching on the structured document data based on a preset entity recognition dictionary to obtain candidate entity fragments; performs pattern matching based on a preset declaration pattern library to obtain candidate declaration fragments; performs candidate citation fragments based on a preset citation relation dictionary combined with syntactic analysis; and performs verb recognition based on a preset action vocabulary to obtain candidate action fragments. Finally, the positioning device performs semantic integrity verification on all these candidate fragments, such as checking whether there are currency units near a monetary entity. Only candidate fragments that pass the verification are ultimately determined as the corresponding entity node, declaration node, citation node, and action node. Optionally, the positioning device can also employ a verification method combining statistics and machine learning. First, the positioning device calculates the syntactic completeness score of each candidate fragment, which is determined based on the completeness of the subject-verb-object and other syntactic structures in each candidate fragment. Simultaneously, the positioning device statistically analyzes the frequency of occurrence and contextual similarity of each candidate segment within the contract document set. Then, based on the aforementioned syntactic completeness score, frequency of occurrence, and contextual similarity, the positioning device comprehensively calculates the semantic confidence of each candidate segment. The positioning device marks candidate segments with semantic confidence scores higher than a preset confidence threshold as verified, and performs a duplicate check on these verified segments, removing redundant segments with content overlap exceeding a preset overlap threshold. Finally, the deduplicated candidate segments are categorized according to their type as entity nodes, declaration nodes, reference nodes, and action nodes.
[0039] Optionally, the preset semantic recognition rules, preset dictionaries, preset pattern libraries, preset reliability thresholds, and preset overlap thresholds involved in this step and subsequent steps can all be determined through statistical analysis and machine learning on a large amount of historical contract document data. For example, the preset entity recognition dictionary and preset action vocabulary can be constructed and optimized by performing word frequency statistics, co-occurrence analysis, and expert annotation on a large-scale, diverse contract corpus, thereby covering high-frequency and key terms in the field. The preset declaration pattern library and preset citation relationship dictionary can be predefined by legal experts based on contract drafting conventions, and then new and common sentence structures can be automatically discovered and summarized from the corpus through natural language processing technologies (such as syntactic analysis and dependency analysis), continuously expanding and improving them. For numerical parameters such as preset reliability thresholds, more refined optimization methods can be used. Specifically, a verification dataset that has been precisely annotated by humans can be prepared, and then the recognition method of this invention can be run. The precision and recall of the recognition results can be observed by adjusting the thresholds. For example, receiver operating characteristic (ROC) curve analysis or precision-recall curve analysis can be used to plot performance curves at different thresholds and select an optimal operating point that balances the false alarm rate and false alarm rate (e.g., the highest F1 score or the point on the curve closest to (0,1)). This data-driven approach determines the optimal threshold, enabling the positioning device to achieve the expected recognition effect in practical applications.
[0040] S102, The positioning device extracts referential edges, causal edges, and constraint edges from entity nodes, declaration nodes, reference nodes, and action nodes based on a preset relationship extraction template.
[0041] Here, a referential edge connects a reference node to the entity node or declaration node that the reference node refers to. A causal edge connects nodes with temporal or logical dependencies. A constraint edge connects nodes that require consistency verification.
[0042] Specifically, when performing this step, the positioning device systematically examines the potential relationships between different node pairs. For example, the positioning device analyzes a referencing node (such as "Specific delivery standards are detailed in Appendix II, Section 3.1") and a declaration node (such as "The product must pass ISO9001 certification" in Appendix II, Section 3.1). When the positioning device's preset relationship extraction template contains rules that identify referential words such as "see," "see details," and "refer to," it establishes a referential edge between these two nodes. This edge points from the referencing node to the declaration node, clarifying the link between the source of the information and the actual content. Similarly, the positioning device analyzes two action nodes, such as "Party A pays the initial payment" and "Party B begins material preparation." If the text contains the statement "Party B can only begin material preparation after Party A pays the initial payment," the templates in the positioning device used to identify temporal and conditional logic (such as matching patterns like "...after,..." and "once..., then...") will be activated, thereby establishing a causal edge between these two action nodes, clearly expressing the premise-result relationship between them. In addition, when the positioning device analyzes a declaration node (such as "This contract is valid for one year") and another declaration node (such as "But the contract shall be terminated in the event of force majeure"), its built-in template for identifying transitions, exceptions or restrictive conditions (such as matching patterns such as "but", "except", "subject to") will establish a constraint edge between the two nodes to indicate that the latter constitutes a limitation or modification of the content of the former.
[0043] S103. Based on entity nodes, declaration nodes, reference nodes, action nodes, referential edges, causal edges, and constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its position information and the document identifier it belongs to in the contract document set.
[0044] Specifically, when performing this step, the positioning device first initializes a graph data structure. Then, it adds all entity nodes, declaration nodes, referencing nodes, and action nodes identified in S101 as vertices (Nodes) of the graph. Next, the positioning device adds all referential edges, causal edges, and constraint edges extracted in S102 as edges of the graph, connecting the corresponding vertices. For example, if S102 extracts a causal edge between node A and node B, a directed edge from vertex A to vertex B will be created in the graph. When creating each graph node, the positioning device attaches two key metadata attributes: location information and the document identifier. The location information is obtained and bound to the node during document parsing in S101; it can be precise page coordinates (such as x, y coordinates and width / height in a PDF document), page numbers and line numbers, or character offsets in a text file. The document identifier specifies which specific file in the contract document set the node originates from (e.g., main contract.docx or appendix 1.pdf).
[0045] S104. When a location request for the target key field is received, the location device locates the query node corresponding to the target key field in the cross-document cause-effect graph.
[0046] Specifically, when performing this step, the positioning device first receives and parses the user's positioning request. This request can be a piece of text entered through a graphical user interface or a call from another application programming interface (API). The positioning device analyzes and standardizes the target key field in the request. For example, different expressions entered by the user, such as "total contract price," "total amount," or "contract amount," can be normalized by the positioning device into a standard internal identifier, such as "total_contract_amount," using a pre-defined thesaurus or semantic similarity model. Next, the positioning device searches all nodes across the document causal graph to find the node that best matches this standardized target key field. The matching process can be implemented in several ways. One direct approach is for the positioning device to traverse all declaration nodes in the graph and check whether their text content contains the target key field or its synonyms. For example, for the target key field "total contract amount," the positioning device finds a declaration node with the text content "The total amount of this contract is one million yuan" and selects it as the query node. In more complex scenarios, a target key field may correspond to multiple nodes in the graph, or it may require combining the semantics of multiple nodes to fully express it. In this case, the positioning device may locate a set of nodes as a set of query nodes.
[0047] S105. Starting from the query node, the positioning device traverses the cross-document cause-effect graph layer by layer according to the type of edge connected to the query node, and obtains the terminating node containing the actual value of the target key field.
[0048] Specifically, when performing this step, the positioning device will start a graph traversal algorithm from one or more query nodes located in S104. This traversal process is not a blind breadth-first or depth-first search, but an intelligent traversal that makes decisions based on the type of edge. The positioning device will check all outgoing edges originating from the current node and determine the next action based on the edge type (referential edge, causal edge, constraint edge).
[0049] When a referential edge is encountered: This typically means that the current node's content points to a detailed description of another location. For example, a query node might say "See Annex 1 for the specific delivery date," which is connected via a referential edge to a declaration node in Annex 1 that says "Delivery date is December 31, 2024." The positioning device will move along this referential edge.
[0050] When a causal edge is encountered: This indicates that the current node is a prerequisite or result of a certain action or state. For example, if a user queries "When can production begin?", the query node might be "Party B begins production," which has a causal edge from the node "Party A pays the advance payment." The positioning device can trace backwards along this causal chain to find all the prerequisites for starting production. Conversely, it can also traverse forwards to explore what subsequent actions "starting production" will trigger.
[0051] When a constraint edge is encountered: This indicates that the content of the current node is restricted or modified by another node. For example, the query node is "Contract validity period is three years," but it has a constraint edge from the node "If one party seriously breaches the contract, this contract shall terminate immediately." When answering questions about the contract validity period, the positioning device must consider this constraint to provide a more complete and accurate answer.
[0052] The positioning device traverses layer by layer, starting from the query node and visiting all directly connected nodes (first layer). Then, it visits the unvisited nodes connected to the nodes in the first layer (second layer), and so on. The traversal terminates when one or more termination nodes are found. A node is determined to be a termination node based on one or more of the following preset rules: 1) The node itself is an entity node, containing specific values, dates, names, etc. (e.g., an entity node with the content "1,000,000 yuan"); 2) The node is a declaration node, but it has no outgoing referential edges, meaning its information is self-contained; 3) The traversal reaches a preset maximum depth to prevent infinite loops in complex graphs. Once such a termination node is found, the positioning device considers it to have found the final source of information containing the actual values of the target key fields.
[0053] S106. Based on the location coordinates of the termination node and the document identifier, the positioning device outputs the location results of the target key fields in the contract document set.
[0054] Specifically, when performing this step, the positioning device first acquires one or more termination nodes determined in S105. As described in S103, each node is pre-labeled with its location coordinates and the identifier of its associated document. The positioning device extracts this metadata. For example, the metadata carried by a termination node might be: the associated document identifier is "Appendix 2: Technical Specifications.pdf", and the location coordinates are "{page number: 5, coordinates: [102.5, 340.8, 450.2, 360.1]}". Based on this metadata, the positioning device outputs the location result of the target key field in the contract document set.
[0055] In the above embodiments, the present invention organizes discrete information points in a collection of contract documents into an interconnected semantic network by constructing a cross-document causal graph. When it is necessary to locate a key field, the locating device can start from the query node representing that field and intelligently traverse along the edges of referential, causal, and constraint relationships in the graph. This process simulates the logical chain of human experts reading and understanding contracts, tracing references and analyzing causality to ultimately find the terminal node containing the specific value and output its location. Therefore, when determining key fields requires information integration across multiple pages, attachments, or even multiple related contracts, the accuracy of locating key contract fields is improved.
[0056] However, due to oversights in contract revisions, the signing or drafting of supplementary agreements, the same key field may be defined multiple times in different locations within the contract document set, and these defined values may conflict. For example, the total amount stipulated in the main contract is 1 million yuan, while a subsequent supplementary agreement may change it to 1.2 million yuan. Or, the delivery date may be mentioned in both the main text and the appendices, but the wording may differ. In the above embodiments, although paths to these different values can be found, no clear mechanism is provided to determine which value should prevail when the actual values of these termination nodes conflict. This potential ambiguity may lead to uncertainty or even errors in the positioning results. To address this issue, another embodiment of this application introduces a deeper level of analysis and decision-making logic.
[0057] Please see Figure 2 This is another flowchart illustrating a method for intelligently locating key contract fields in an embodiment of this application.
[0058] S201. The positioning device sets the document hierarchy weight of each type of document in descending order of supplementary agreement document, change notice document, main contract document, and attachment document.
[0059] Specifically, in performing this step, the positioning device first needs to classify the documents in the contract document set. By analyzing the document title, signing time, or specific identifiers, it identifies whether the document belongs to a supplementary agreement document, a change notice document, the main contract document, or an attachment document. After completing the classification, the positioning device sets the document hierarchy weight of each type of document in descending order of importance: supplementary agreement document, change notice document, main contract document, and attachment document. For example, the supplementary agreement document, which has the highest legal force, can be assigned a weight of 1.0; the change notice document, 0.8; the main contract document, 0.6; and the attachment document, which has the lowest legal force, 0.4.
[0060] In this way, the present invention transforms the hierarchical relationship of legal validity between contract documents into a calculable quantitative indicator. This document hierarchy weight serves as one of the key inputs for calculating the "authority score" of each node in the graph in subsequent steps (such as S205). When the positioning device encounters conflicting information from different documents in subsequent processing, for example, if the agreement on the total contract price is inconsistent between the main contract and the supplementary agreement, this weight value provides an objective and clear basis for adjudication. This enables the positioning device to simulate the judgment logic of legal professionals, prioritizing information from documents with higher legal validity, thereby improving the accuracy and reliability of key field positioning in complex cross-document information integration scenarios.
[0061] S202. The authority coefficient of each type of clause shall be set in descending order of special agreement clause, general clause, and reference clause for positioning equipment.
[0062] Specifically, during this step, the positioning device has already divided the text content of each document into different clause units based on a preset clause analysis template and identified the type of each clause. Subsequently, according to the legal interpretation principle that special agreements have higher validity than general agreements, the positioning device assigns a preset, decreasing coefficient of authority to each of the three types of clauses. For example, a coefficient of 1.0 can be set for special agreement clauses, 0.7 for general clauses, and 0.3 for cited clauses. This coefficient setting digitally encodes the relative importance of clauses within the document. When seemingly contradictory statements appear in the same document, such as a general clause and a special agreement clause both involving the delivery date, this coefficient provides a quantitative basis for the system to determine which statement is more decisive.
[0063] S203. The positioning device identifies entity nodes, declaration nodes, reference nodes, and action nodes from the contract document set based on preset semantic recognition rules.
[0064] Step S203 is similar to step S101, and will not be described again here.
[0065] S204. The positioning device marks the document hierarchy weight of the document to which the entity node, declaration node, reference node and action node belong and the clause authority coefficient of the clause to which it belongs.
[0066] Specifically, during this step, the positioning device traverses all nodes generated in step S203. For each node, the positioning device first queries and obtains the document hierarchy weight set in step S201 based on the identifier of its document. Simultaneously, based on the type of the clause to which the node belongs, the positioning device queries and obtains the clause authority coefficient set in step S202. Subsequently, the positioning device binds the document hierarchy weight and clause authority coefficient as metadata attributes to the node, storing them as part of the node's data structure.
[0067] By performing this step, the present invention transmits and solidifies the document validity hierarchy at the macro level and the clause interpretation priority at the micro level to each independent semantic information unit (i.e., node).
[0068] S205. The positioning device calculates the authority scores of entity nodes, declaration nodes, reference nodes, and action nodes based on document hierarchy weight and clause authority coefficient.
[0069] Specifically, during this step, the positioning device will again traverse all the nodes identified in step S203. Since each node has been labeled with its document level weight and clause authority coefficient in step S204, the positioning device will call a preset calculation function for each node to combine these two input values into an authority score. This calculation function can be a simple weighted sum, for example: Authority Score = α * Document Level Weight + β * Clause Authority Coefficient, where α and β are preset hyperparameters used to adjust the relative importance of the two dimensions. In another implementation, the function can also be the product of the two, i.e.: Authority Score = Document Level Weight * Clause Authority Coefficient. This method better reflects the combined effect of the two factors; that is, only when a node comes from both a high-weight document and a high-authority clause will its comprehensive score be the highest.
[0070] By performing this step, the present invention integrates the two previously separate dimensions of authority into a unified scalar value. This authority score intuitively reflects the credibility and legal strength of the information carried by each node. For example, a node originating from the "Special Provisions" in the "Supplementary Agreement" will have a significantly higher authority score than a node originating from the "General Provisions" in the "Annex".
[0071] S206. The positioning device extracts referential edges, causal edges, and constraint edges from entity nodes, declaration nodes, reference nodes, and action nodes based on a preset relationship extraction template.
[0072] S207. Based on entity nodes, declaration nodes, reference nodes, action nodes, referential edges, causal edges, and constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its position information and the document identifier it belongs to in the contract document set.
[0073] S208. When a location request for the target key field is received, the location device locates the query node corresponding to the target key field in the cross-document cause-effect graph.
[0074] Step S206 is similar to step S102, step S207 is similar to step S103, and step S208 is similar to step S104, so they will not be described again here.
[0075] S209. Starting from the query node, the positioning device traverses the cross-document cause-effect graph layer by layer according to the type of edge connected to the query node to obtain a set of candidate paths.
[0076] Specifically, in this step, the positioning device uses the query node as the starting point for traversal and employs a graph search algorithm (e.g., a variant of depth-first search or breadth-first search) to explore the entire graph. The goal of the traversal is to exhaust all possibilities, not to stop after finding the first path that satisfies the conditions. The traversal process follows the semantics of the edges: when a referential edge is encountered, the traversal continues along that edge to the content it refers to; when a causal edge is encountered, its cause or effect is explored; when a constraint edge is encountered, the node that imposed the constraint is visited. The traversal terminates when the current node of a path meets a preset termination criterion; in this case, the path is considered a complete candidate path and is recorded. Termination criteria typically include: 1) the current node is an entity node that directly contains a specific value, date, or name; 2) the current node is a declaration node, but it has no outgoing referential edges, meaning its information is self-contained and requires no further tracing. The positioning device continues this process until all paths from the query node to the termination node have been discovered and added to the candidate path set.
[0077] By performing this step, the present invention can comprehensively capture all possible information sources related to the target key field in the contract document set. In complex contract scenarios, the value of a key field may be mentioned, defined, or modified in multiple places, forming multiple concurrent interpretation paths. This step ensures that the positioning device does not prematurely select a particular path and ignore other potentially more important or accurate information sources.
[0078] S210. The positioning device calculates the path authority score based on the authority scores of each node on each candidate path in the candidate path set.
[0079] Specifically, during this step, the positioning device iterates through each candidate path in the candidate path set. For any given path, it consists of an ordered series of nodes (from the query node to the termination node). Since each node has already been calculated and assigned an authority score in step S205, the positioning device extracts the authority scores of all nodes on that path. Subsequently, the positioning device uses a preset aggregation function to combine the scores of these individual nodes into a path authority score representing the entire path. This aggregation function can be implemented in several ways. A simple approach is to calculate the average or weighted average of the authority scores of all nodes on the path, which reflects the overall quality of the path.
[0080] By performing this step, the present invention assigns a quantitative index to each logical path from question to answer. This path authority score is a comprehensive evaluation of path quality, enabling the positioning device to no longer randomly select or judge based on a single factor when faced with multiple possible interpretations, but rather to use an evaluation system based on multi-dimensional information (document level, clause type).
[0081] S211. The positioning device marks the candidate paths with different actual values of the termination nodes in the candidate path set as a conflict path combination.
[0082] Specifically, when executing this step, the positioning device checks each candidate path in the candidate path set, and extracts the actual value contained in the termination node of each path, that is, the text content of this node in the original document. Subsequently, the positioning device makes pairwise or grouped comparisons of these actual values. The determination of differences here is a direct comparison based on literal values, that is, to determine whether the strings of the two actual values are exactly the same. For example, if there are two paths in the candidate path set, the actual value of the termination node of path A is "One million yuan in full", and the actual value of the termination node of path B is "RMB 1,000,000.00", since these two strings are not equal literally, the positioning device will mark these two paths and classify them into a newly created or existing conflict path combination. Similarly, if the actual value of the termination node of path C is "1 million", and the actual value of the termination node of path D is "1.2 million", they will also be marked and combined together due to different literal values.
[0083] By executing this step, the positioning device sorts all the paths that may have conflicts into individual conflict paths.
[0084] S212. The positioning device performs semantic equivalence analysis on the conflict path combination.
[0085] Specifically, semantic equivalence analysis is a multi-stage processing process. When executing this step, the positioning device first performs standardization processing on the actual values of the termination nodes of each path in the conflict path combination. This standardization process aims to统一各种不同的书写格式 into a standardized internal representation that can be compared by machines. For example, for amounts, "One million yuan in full", "¥1,000,000.00" and "1 million" will all be converted to the unified numerical value 1000000. For dates, "December 31, 2024" and "2024 / 12 / 31" will both be converted to a standard date object. On the basis of standardization, the positioning device then performs analysis, which includes:
[0086] Calculation of numerical difference degree: For the actual values that are numerical or dates after standardization, the positioning device calculates the numerical difference degree between them. For example, the difference degree between 1000000 and 1000000 is 0, while the difference degree between 1000000 and 1200000 is 200000. Subsequently, the positioning device compares this difference degree with a preset difference threshold. If the difference degree does not exceed the threshold (for example, for integer amounts, the threshold can be set to 0), it indicates that they are numerically equivalent. It should be noted that there is an unclear part in the original text "统一各种不同的书写格式", which is translated as "统一各种不同的书写格式" for the time. It may need to be further clarified according to the specific context for a more accurate translation.
[0087] Semantic similarity analysis: For non-numerical text, such as organization names or proper nouns, the positioning device uses a pre-defined equivalence relation library to determine whether they refer to the same conceptual entity. For example, this library defines "Company A" and "Company B" as referring to the same entity.
[0088] Ultimately, the positioning device synthesizes the above analysis to arrive at the results of semantic equivalence analysis. If all actual values with literal differences are determined to point to the same numerical value or the same conceptual entity after standardization and analysis, the analysis result is equivalent. Conversely, if at least one pair of actual values still has irreconcilable substantial differences after standardization (e.g., "1 million yuan" and "1.2 million yuan"), the analysis result is not equivalent.
[0089] If the semantic equivalence analysis result is non-equivalent, proceed to step S213; if the semantic equivalence analysis result is equivalent, proceed to step S214.
[0090] S213. If the semantic equivalence analysis result is not equivalent, the positioning device will take the path with the highest path authority score among the conflicting path combinations as the winning path.
[0091] Specifically, during this step, the positioning device initiates a selection strategy based on path authority scores. The device iterates through each candidate path in the conflicting path combinations and obtains the path authority score calculated for each path in step S210. This score is a comprehensive quantitative indicator that integrates the legal validity hierarchy of the source document (e.g., a supplementary agreement is higher than the main contract) and the stipulation priority of the clause (e.g., special stipulations are higher than general stipulations). The positioning device then compares these path authority scores and identifies the highest score. The candidate path with this highest score is determined as the winning path. This adjudication logic simulates the principle of interpretation in legal practice, namely, when contract documents conflict, the clause with higher validity or more explicit stipulation should take precedence. For example, if a path originating from a supplementary agreement (higher document level weight) has a path authority score of 0.9, while a path originating from the main contract (lower document level weight) has a score of 0.7, then even if both point to different amounts, the positioning device will accept the former with the higher score.
[0092] S214. If the semantic equivalence analysis result is equivalent, the positioning device performs consistency verification based on the constraint edges of each conflicting path in the conflicting path combination, and takes the path that passes the verification as the winning path.
[0093] Specifically, in performing this step, the positioning device no longer relies on path authority scores for adjudication, since the answers pointed to by all paths are essentially the same. Instead, it initiates a consistency verification procedure to assess which path's context is more robust and consistent. The positioning device focuses on examining the nodes on each candidate path in the conflicting path combination, particularly the constraint edges connected to these nodes. As defined in step S102 of this application, constraint edges connect nodes that require consistency verification and typically represent a restriction, exception, or modification relationship. For example, a statement node "the total contract price is 1 million yuan" might be connected to another node "the above price excludes tax" via a constraint edge. During consistency verification, the positioning device checks whether these constraints on the path are satisfied or whether there are internal contradictions. For example, if the terminating node of a path is "1 million," and there is a constraint node on that path stating "the total price shall not be less than 1.1 million yuan," then this path has a logical inconsistency, and the verification will fail. Conversely, if another path also terminates at "1 million," and all constraints on that path (e.g., "price includes tax," "price remains unchanged during validity period") do not conflict with that value, then this path is considered "verified." Ultimately, the positioning device will determine all verified paths as the "winning path." In most cases, after consistency verification, only one or a few semantically equivalent paths may fully satisfy all contextual constraints. If multiple paths have passed verification, this invention can be designed to select any one of them (because they point to the same actual value), or select the one with the highest authority score as the representative.
[0094] S215. The positioning device determines the termination node of the winning path as the final termination node.
[0095] Specifically, the termination node obtained in S213 or S214 is determined as the final termination node.
[0096] S216. Based on the location coordinates of the termination node and the document identifier, the positioning device outputs the location results of the target key fields in the contract document set.
[0097] Step S216 is similar to step S106, and will not be described again here.
[0098] In the above embodiments, based on the construction of a cross-document causal graph, a quantitative assessment and conflict resolution method based on authority is further introduced. This method first digitizes the principles of legal interpretation by assigning weights to documents (such as supplementary agreements and main contracts) and clauses (such as special agreements and general agreements) with different effects, and calculates the authority score of each node and even each information path in the graph. When faced with multiple possible outcomes, this method no longer simply selects one, but determines the nature of the conflict through semantic equivalence analysis. For substantial content contradictions, the path with the highest authority score is adopted. For equivalent content that only differs in expression, logical consistency verification is performed through contextual constraint edges to ensure the rigor of the location results. Through this method, the present invention improves the accuracy and intelligence level of key field location.
[0099] The above describes a method for intelligently locating key contract fields in the embodiments of this application. The following describes an exemplary positioning device 300 provided in the embodiments of this application.
[0100] Figure 3 This is a schematic diagram of an exemplary hardware structure of the positioning device 300 provided in an embodiment of this application. In some embodiments, the positioning device 300 is a computer device. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers via a network connection. In some embodiments, the network interface can be a wired network interface; in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, it implements a method for intelligently locating key contract fields according to an embodiment of this application.
[0101] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0102] In some embodiments of this application, a computer-readable storage medium is also provided, including instructions that, when executed on the positioning device 300, cause the positioning device 300 to perform an intelligent positioning method for a key contract field according to an embodiment of this application.
[0103] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0104] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0105] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0106] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for intelligently locating key fields in a contract, characterized in that, Applied to a positioning device, the method includes: The positioning device categorizes the documents in the contract document set into main contract documents, attachment documents, supplementary agreement documents, and change notice documents based on document title, signing time, and revision identifier. The positioning device sets the document hierarchy weight of each type of document in descending order of supplementary agreement document, change notice document, main contract document, and attachment document; The positioning device categorizes the clauses in each document into special clauses, general clauses, and cited clauses based on a preset clause analysis template. The positioning device sets the authority coefficient of each type of clause in descending order of special agreement clauses, general clauses, and cited clauses; The positioning device identifies entity nodes, declaration nodes, reference nodes, and action nodes from the contract document set based on preset semantic recognition rules. The contract document set includes a main contract document and at least one attachment document. The entity node is a text fragment representing a specific value or name. The declaration node is a text fragment containing key field declaration statements. The reference node is a text fragment containing a description of a referential relationship. The action node is a text fragment representing an action or event. The positioning device marks the document hierarchy weight of the document to which the entity node, the declaration node, the reference node, and the action node belong, as well as the clause authority coefficient of the clause to which it belongs. The positioning device calculates the authority scores of the entity node, the declaration node, the reference node, and the action node based on the document hierarchy weight and the clause authority coefficient; The positioning device extracts referential edges, causal edges, and constraint edges from the entity node, the declaration node, the reference node, and the action node based on a preset relationship extraction template. The referential edges connect the reference node to the entity node or the declaration node that the reference node refers to. The causal edges connect nodes that have a temporal or logical dependency relationship. The constraint edges connect nodes that require consistency verification. Based on the entity nodes, the declaration nodes, the reference nodes, the action nodes, the referencing edges, the causal edges, and the constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its position information and the document identifier it belongs to in the contract document set. When a location request for a target key field is received, the location device locates the query node corresponding to the target key field in the cross-document cause-effect graph; The positioning device starts from the query node and traverses the cross-document cause-effect graph layer by layer according to the type of the edge connected to the query node to obtain the terminating node containing the actual value of the target key field. The step of the positioning device starting from the query node and traversing the cross-document cause-effect graph layer by layer according to the type of edges connected to the query node to obtain the terminating node containing the actual value of the target key field specifically includes: the positioning device starting from the query node and traversing the cross-document cause-effect graph layer by layer according to the type of edges connected to the query node to obtain a candidate path set, the candidate path set being all complete paths that can reach the terminating node containing the actual value of the target key field; the positioning device calculating a path authority score based on the authority score of each node on each candidate path in the candidate path set; The positioning device marks candidate paths in the candidate path set whose actual values of the termination nodes differ as conflicting path combinations; the positioning device performs semantic equivalence analysis on the conflicting path combinations; if the semantic equivalence analysis result is not equivalent, the positioning device selects the path with the highest path authority score in the conflicting path combinations as the winning path; if the semantic equivalence analysis result is equivalent, the positioning device performs consistency verification based on the constraint edges of each conflicting path in the conflicting path combinations, and selects the path that passes the verification as the winning path; the positioning device determines the termination node of the winning path as the final termination node. Based on the location coordinates of the termination node and the document identifier to which it belongs, the positioning device outputs the location result of the target key field in the contract document set.
2. The method according to claim 1, characterized in that, The steps by which the positioning device identifies entity nodes, declaration nodes, reference nodes, and action nodes from the contract document set based on preset semantic recognition rules specifically include: The positioning device performs optical character recognition processing on each document in the contract document set to obtain structured document data containing text content and location coordinates; The positioning device performs word matching on the structured document data based on a preset entity recognition dictionary to obtain candidate entity fragments; The positioning device performs pattern matching on the structured document data based on a preset declaration pattern library to obtain candidate declaration fragments; The positioning device performs syntactic analysis on the structured document data based on a preset reference relationship dictionary to obtain candidate reference fragments; The positioning device performs verb recognition on the structured document data based on a preset action vocabulary to obtain candidate action fragments; The positioning device identifies the candidate entity fragment, the candidate declaration fragment, the candidate reference fragment, and the candidate action fragment that have passed semantic integrity verification as the entity node, the declaration node, the reference node, and the action node, respectively.
3. The method according to claim 2, characterized in that, The step of the positioning device determining the candidate entity fragment, the candidate declaration fragment, the candidate reference fragment, and the candidate action fragment that have passed semantic integrity verification as the entity node, the declaration node, the reference node, and the action node, respectively, specifically includes: The positioning device calculates the syntactic completeness score for each candidate segment, and the syntactic completeness score is determined based on the completeness of the subject-verb-object structure in each candidate segment; The positioning device counts the frequency of occurrence and contextual similarity of each candidate segment in the contract document set; The positioning device calculates the semantic confidence of each candidate segment based on the syntactic completeness score, the frequency of occurrence, and the contextual similarity. The positioning device marks candidate segments whose semantic confidence scores are higher than a preset confidence threshold as verified. The positioning device performs a repeatability check on the verified candidate segments and removes redundant segments with a content overlap greater than a preset overlap threshold. The positioning device categorizes the candidate fragments after removing redundant fragments into entity nodes, declaration nodes, reference nodes, and action nodes according to their type.
4. The method according to claim 1, characterized in that, The step of the positioning device performing semantic equivalence analysis on the conflicting path combinations specifically includes: The positioning device extracts the actual value of each termination node in the candidate path set; The positioning device calculates the numerical difference and semantic similarity between the actual values after standardization. The positioning device identifies the termination nodes whose numerical difference is greater than a preset difference threshold as conflicting termination nodes, thus obtaining a combination of conflicting nodes. The positioning device determines whether the conflicting node combination points to the same conceptual entity by using a preset equivalence relation database. If so, then the semantic equivalence analysis result is equivalent; If not, the semantic equivalence analysis result is non-equivalent.
5. A positioning device, characterized in that, The positioning device includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code including computer instructions, and the one or more processors call the computer instructions to cause the positioning device to perform the method as described in any one of claims 1-4.
6. A computer program product containing instructions, characterized in that, When the computer program product is run on the positioning device, the positioning device performs the method as described in any one of claims 1-4.
7. A computer-readable storage medium comprising instructions, characterized in that, When the instruction is executed on the positioning device, the positioning device performs the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Contract relation graph construction method and electronic equipment
CN120067292A
Contract text key payment index extraction method based on natural language processing
CN120523929A