Intelligent positioning method and positioning equipment for contract key fields
By constructing a cross-document causal graph and introducing semantic equivalence analysis, the problem of inaccurate cross-document positioning in existing technologies is solved, achieving high accuracy and reliability in locating key contract fields.
Patent Information
- Application Number
- CN202511531836.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-10-24
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.
By constructing a cross-document causal graph, and using four types of nodes (entities, declarations, references, and actions) and three types of edges (references, causal relationships, and constraints), the collection of contract documents is abstracted into a semantic network with logical relationships. The positioning device traces and integrates key field information along the logical path in the graph, and semantic equivalence analysis and path authority adjudication logic are introduced to resolve conflicts.
It improves the accuracy and reliability of locating key fields in complex scenarios, simulates the principle of priority of the most effective in legal practice, and ensures that the most logically impeccable statement is selected as the accurate source.
Smart Images

Figure CN121365090A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to a method and device for intelligently positioning key fields of a contract. BACKGROUND
[0002] In modern economic activities such as finance, law and business trade, contracts, as the core legal documents for establishing the rights and obligations of each party, are numerous and diverse. Locating and extracting key field information such as contract amount, signing date and signature subject from a contract image is the basis and key link for realizing intelligent auditing, data analysis and archive management and other applications.
[0003] The contract key field positioning technology in the related art mainly adopts a sequence labeling method based on deep learning and a multi-modal fusion technology. Specifically, the method first converts a contract document into a text sequence using optical character recognition technology, then encodes the text using a pre-trained language model or a multi-modal model, and learns to identify the entity boundaries and types in the text by training a classifier or a sequence labeling model on a large amount of labeled data. In the processing process, the model mainly relies on the semantic association between the target field and its adjacent context, and realizes field positioning by analyzing the numerical patterns near keywords such as amount and total price, or the time formats near phrases such as signing date and effective date. For documents containing image elements, this kind of method usually uses an independent computer vision model to detect image objects such as signatures, and then performs post-processing fusion of the text extraction result and the image detection result.
[0004] However, since the core mechanism of the related technology is based on local context pattern recognition, when the determination of the key field needs to integrate information across multiple pages, multiple attachments or even multiple related contracts, the related technology is difficult to accurately position the key fields of the contract. SUMMARY
[0005] The present application provides a method and device for intelligently positioning key fields of a contract, to improve the reliability of positioning the key fields of the contract when the determination of the key field needs to integrate information across multiple pages, multiple attachments or even multiple related contracts.
[0006] In a first aspect, an intelligent positioning method of contract key fields is provided, applied to a positioning device, and includes: identifying, by the positioning device, entity nodes, declaration nodes, reference nodes, and action nodes from a contract document set based on preset semantic recognition rules, the contract document set including a main contract document and at least one attachment document, the entity nodes being text segments representing specific numerical values or names, the declaration nodes being text segments containing key field declaration statements, the reference nodes being text segments containing reference relationship expressions, and the action nodes being text segments representing behaviors or events; extracting, by the positioning device, reference edges, cause-effect edges, and constraint edges from the entity nodes, the declaration nodes, the reference nodes, and the action nodes based on preset relationship extraction templates, the reference edges connecting the reference nodes and the entity nodes or the declaration nodes referenced by the reference nodes, the cause-effect edges connecting nodes having time or logical dependency relationships, and the constraint edges connecting nodes requiring consistency verification; based on the entity nodes, the declaration nodes, the reference nodes, the action nodes, the reference edges, the cause-effect edges, and the constraint edges, constructing, by the positioning device, a cross-document cause-effect graph, and labeling each graph node with position information and a document identifier in the contract document set; when receiving a positioning request for a target key field, locating, by the positioning device, a query node corresponding to the target key field in the cross-document cause-effect graph; starting from the query node, traversing, by the positioning device, the cross-document cause-effect graph layer by layer according to the types of edges connected to the query node to obtain a termination node containing an actual value of the target key field; and outputting, by the positioning device, a positioning result of the target key field in the contract document set based on position coordinate information and the document identifier of the termination node.
[0007] By adopting the above 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 cause-effect graph. The graph connects isolated information points scattered in different documents and different pages into a semantic network having logical relationships through four types of nodes (entity, declaration, reference, and action) and three types of edges (reference, cause-effect, and constraint). When positioning a key field, the device can trace back from one declaration to a specific definition in another document along a logical path (such as a reference edge) in the graph, or understand the precondition of an event along a cause-effect edge. When the determination of a key field needs to integrate information across multiple pages, multiple attachments, or even multiple related contracts, the positioning device can accurately track and integrate key information that can be determined only by crossing multiple pages, multiple attachments, or even multiple related contracts, thereby improving the accuracy of positioning contract key fields.
[0008] In some embodiments of the first aspect, in some embodiments, the step of identifying the entity nodes, the statement nodes, the reference nodes and the action nodes from the contract document set based on the preset semantic recognition rules comprises: performing optical character recognition on each document in the contract document set to obtain structured document data comprising text content and position coordinates; performing vocabulary matching on the structured document data based on a preset entity recognition dictionary to obtain candidate entity segments; performing pattern matching on the structured document data based on a preset statement pattern library to obtain candidate statement segments; performing syntax analysis on the structured document data based on a preset reference relationship dictionary to obtain candidate reference segments; performing verb recognition on the structured document data based on a preset action vocabulary table to obtain candidate action segments; and determining the candidate entity segments, the candidate statement segments, the candidate reference segments and the candidate action segments that pass the semantic integrity verification as the entity nodes, the statement nodes, the reference nodes and the action nodes respectively.
[0009] By using the above technical solution, the positioning device captures the original information through optical character recognition (OCR) in the initial stage of constructing the graph, and uses the preset dictionary and pattern library to preliminarily and specifically match the text to filter out the candidate entity, statement, reference and action segments. Then the candidate entity segments, the candidate statement segments, the candidate reference segments and the candidate action segments that pass the semantic integrity verification are determined as the entity nodes, the statement nodes, the reference nodes and the action nodes respectively, thereby improving the accuracy of the nodes and further improving the quality of the cross-document causal graph determined based on the nodes and edges.
[0010] In some embodiments of the first aspect, in some embodiments, the step of determining the candidate entity segments, the candidate statement segments, the candidate reference segments and the candidate action segments that pass the semantic integrity verification as the entity nodes, the statement nodes, the reference nodes and the action nodes respectively comprises: calculating the syntactic completeness scores of the candidate segments, the syntactic completeness scores being determined based on the completeness of the subject-predicate-object structures in the candidate segments; counting the occurrence frequencies and context similarities of the candidate segments in the contract document set; calculating the semantic confidence of each candidate segment based on the syntactic completeness scores, the occurrence frequencies and the context similarities; marking the candidate segments with a semantic confidence higher than a preset confidence threshold as passing the verification; performing redundancy checking on the candidate segments that pass the verification to remove redundant segments with a content overlap degree greater than a preset overlap threshold; and classifying the candidate segments after removing the redundant segments into the entity nodes, the statement nodes, the reference nodes and the action nodes according to the types of the candidate segments.
[0011] By adopting the technical scheme, the positioning device introduces a verification mechanism based on semantic confidence, and performs a strict quality screening on the preliminary identified candidate segments. The mechanism comprehensively considers the integrity of the syntactic structure (syntactic integrity score), the importance of information in the document set (occurrence frequency), and the consistency of the context (context similarity), thereby constructing a multi-dimensional evaluation model. This enables the positioning device to reduce interference segments caused by OCR errors, incomplete syntax, or semantic isolation, thereby improving the quality of the cross-document causal graph.
[0012] In some embodiments in combination with some embodiments of the first aspect, before the step of identifying the entity nodes, the statement nodes, the reference nodes, and the action nodes from the contract document set based on the preset semantic recognition rules, the method further comprises: classifying the documents in the contract document set into main contract documents, attachment documents, supplementary agreement documents, and change notice documents based on the document title, the signing time, and the revision identifier; setting the document level weights of the documents in descending order of the supplementary agreement documents, the change notice documents, the main contract documents, and the attachment documents; classifying the clauses in each document into special agreement clauses, general clauses, and reference clauses based on a preset clause analysis template; and setting the clause authority coefficients of the clauses in descending order of the special agreement clauses, the general clauses, and the reference clauses.
[0013] By adopting the technical scheme, the positioning device introduces a preprocessing step simulating the principle of legal interpretation before processing the contract documents. By classifying the document types (such as supplementary agreement and main contract) and the clause types (such as special agreement and general clause), and assigning them with descending quantitative weights (document level weight and clause authority coefficient), the positioning device can directly make a decision based on the document level weight and the clause authority coefficient when the content of the main contract and the supplementary agreement is inconsistent in the subsequent steps, thereby improving the automation capability of handling complex contract sets and the accuracy of key field positioning when dealing with content contradictions.
[0014] In some embodiments in combination with some embodiments of the first aspect, after the step of identifying the entity nodes, the statement nodes, the reference nodes, and the action nodes from the contract document set based on the preset semantic recognition rules, the method further comprises: labeling the document level weight of the document and the clause authority coefficient of the clause to which the entity nodes, the statement nodes, the reference nodes, and the action nodes belong; and calculating the authority scores of the entity nodes, the statement nodes, the reference nodes, and the action nodes based on the document level weight and the clause authority coefficient.
[0015] By adopting the technical scheme, the positioning device transmits and solidifies the macro document level weight and the clause authority coefficient to each micro node in the graph by marking, and further calculates a unified authority score of each node. The originally homogeneous nodes become different in importance. For example, the authority score of a node from a special agreement in a supplementary agreement is much higher than that of a node from a general clause in an annex.
[0016] In combination with some embodiments of the first aspect, in some embodiments, the step of the positioning device starting from the query node, traversing the cross-document causal graph layer by layer according to the types of edges connected to the query node to obtain a terminal node containing the actual value of the target key field specifically comprises: the positioning device starting from the query node, traversing the cross-document causal graph layer by layer according to the types of edges connected to the query node to obtain a candidate path set, the candidate path set being all complete paths capable of reaching the terminal node containing the actual value of the target key field; the positioning device calculating a path authority score based on the authority scores of nodes on each candidate path in the candidate path set; the positioning device marking candidate paths with different actual values of the terminal node in the candidate path set as a conflict path combination; the positioning device performing semantic equivalence analysis on the conflict path combination; in the case of a non-equivalence semantic equivalence analysis result, the positioning device taking the path with the highest path authority score in the conflict path combination as a winning path; in the case of an equivalence semantic equivalence analysis result, the positioning device performing consistency verification based on the constraint edges of each conflict path in the conflict path combination, and taking the path passing the verification as the winning path; and the positioning device determining the terminal node of the winning path as the final terminal node.
[0017] By adopting the technical scheme, when facing multiple candidate paths pointing to different actual values, the method first qualitatively analyzes the conflicts through semantic equivalence analysis. For non-equivalent substantive conflicts, the positioning device starts the decision 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 higher effectiveness in legal practice. For equivalent surface conflicts, the device starts the consistency verification program based on the constraint edges, and evaluates which path has more rigorous and non-contradictory context logic. This ensures that even if the content is the same, the system will select the logically most impeccable expression source. Through this classification first and then decision processing, the accuracy and reliability of locating the key field in the face of information conflicts and complex scenarios are improved.
[0018] In some embodiments of the first aspect, in some embodiments, the step of performing semantic equivalence analysis on the conflict path combination by the positioning device specifically comprises: the positioning device extracts actual values of each terminal node in the candidate path set; the positioning device calculates numerical difference degrees and semantic similarities between the actual values after standardization processing; the positioning device identifies terminal nodes with numerical difference degrees greater than a preset difference threshold as terminal nodes with conflicts to obtain a conflict node combination; and the positioning device determines whether the conflict node combination points to the same concept entity through a preset equivalence relationship library; if yes, the semantic equivalence analysis result is equivalence; and if no, the semantic equivalence analysis result is non-equivalence.
[0019] By using the above technical solution, the positioning device converts original expressions such as 100 million yuan, ¥1,000,000.00 and 100 million into normalized data (such as the value 1000000) that can be directly compared mathematically through standardization processing. On this basis, the positioning device determines the conflict node combination by calculating the numerical difference degree and comparing it with the preset threshold. And whether the conflict node combination points to the same concept entity (for example, identifying that “Party A” and “A Company” defined in the contract header are the same principal) is determined by querying the preset equivalence relationship library. If yes, the semantic equivalence analysis result is equivalence. If no, the semantic equivalence analysis result is non-equivalence, which improves the accuracy of the result of semantic equivalence analysis.
[0020] In the second aspect, the embodiments of the present application provide a positioning device, comprising: 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 comprises computer instructions, and the one or more processors invoke the computer instructions to enable the positioning device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0021] In the third aspect, the embodiments of the present application provide a computer program product comprising instructions, which, when executed on a positioning device, cause the positioning device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0022] In the fourth aspect, the embodiments of the present application provide a computer readable storage medium comprising instructions, which, when executed on a positioning device, cause the positioning device to perform the method described in the first aspect and any possible implementation manner of the first aspect.
[0023] It can be understood that 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 method provided in the embodiments of the present application. Therefore, the beneficial effects that can be achieved thereby can refer to the beneficial effects in the corresponding method, which will not be described here again.
[0024] The one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 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. The graph connects the 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 (references, causality, and constraints). When positioning the key fields, the device can trace back from one statement to the specific definition in another document along the logical path in the graph (such as the reference edge), or understand the preconditions of an event along the causal edge. When the determination of the key field requires information integration across multiple pages, multiple attachments, or even multiple related contracts, the positioning device can accurately track and integrate the key information that can only be determined by crossing multiple pages, multiple attachments, or even multiple related contracts, thereby improving the accuracy of positioning the key fields of the contract.
[0025] 2. Since the positioning device first qualitatively analyzes conflicts through semantic equivalence analysis when facing multiple candidate paths pointing to different actual values. For non-equivalent substantive conflicts, the positioning device starts the arbitration logic based on path authority scores, and selects the path with the highest score as the winning path. This simulates the core principle of higher effectiveness in legal practice. For equivalent surface conflicts, the device then starts the consistency verification program based on constraint edges to evaluate which path has a more rigorous and consistent context logic. This ensures that even if the content is the same, the system will choose the most logically impeccable source of expression. Through this classification and arbitration process, the accuracy and reliability of positioning the key fields in the face of information conflicts and complex scenarios are improved.
[0026] 3. Since the positioning device converts raw expressions such as 100 million yuan, ¥1,000,000.00, and 100 million through standardization processing into normalized data that can be directly compared mathematically (such as the value 1000000). On this basis, the positioning device determines the conflict node combination by calculating the value difference and comparing it with the preset threshold. And by querying the preset equivalence relation library to determine whether the conflict node combination points to the same concept entity (for example, identifying that "Party A Company" and "A Company" defined in the contract header are the same principal). If so, the semantic equivalence analysis result is equivalent. If not, the semantic equivalence analysis result is non-equivalent, improving the accuracy of the results of semantic equivalence analysis. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 is a flowchart of an intelligent positioning method for contract key fields in the embodiments of the present application.
[0028] Figure 2 is another flowchart of a method for intelligently locating a contract key field in an embodiment of the present application.
[0029] Figure 3 is a schematic diagram of an entity device structure for locating a device in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the description of the embodiments of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include both singular and plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or", as used in the description of the embodiments of the application, signify and include any and all possible combinations of one or more of the associated listed items.
[0031] Hereinafter, the terms "first", "second", "third", etc. are used only for the purpose of description, and should not be understood as implying or indicating relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.
[0032] The present application provides a method for intelligently locating a contract key field and a locating device, to improve the accuracy of locating a contract key field when the determination of the key field requires information integration across multiple pages, multiple attachments, and even multiple related contracts.
[0033] Please refer to Figure 1 is a flowchart of a method for intelligently locating a contract key field in an embodiment of the present application.
[0034] S101, the locating device identifies entity nodes, declaration nodes, reference nodes and action nodes from the contract document set based on a preset semantic recognition rule.
[0035] Among them, the contract document set is a logical whole, not only containing the main contract document, but also including at least one attachment document and supplementary agreement associated with it. The entity node represents a specific numerical or name text segment in the contract, such as the specific amount of 100,000 yuan or the name of the signing party, A, B and C companies. The declaration node represents a text segment containing a key field declaration statement, usually used to state a fact or agreement, such as the total amount of this contract is 100,000 yuan. The reference node represents a text segment containing a reference relationship expression, used to establish the association between the internal documents or between the documents, such as the specific delivery standard is annexed to annex two. The action node represents a text segment of specific behavior or event agreed in the contract, usually with a verb as the core, such as the party A shall pay or the contract takes effect.
[0036] Specifically, in the execution of this step, the positioning device first receives the contract document set to be processed. The set may contain files in various formats, such as PDF, Word documents or image scans. Then, the positioning device scans the text content piece by piece and sentence by sentence, and matches it with the pre-set semantic recognition rules stored internally. For example, when the positioning device analyzes the text "the total contract price is 500,000 yuan, the specific payment schedule is detailed in annex three, Payment Plan", it triggers multiple recognition rules: one rule for currency and numerical value will identify "500,000 yuan" as an entity node; a pattern rule for identifying declarative sentence will identify "the total contract price is 500,000 yuan" as a whole sentence as a declaration node; at the same time, another rule for identifying cross-reference will identify "detailed in annex three, Payment Plan" as a reference node. In this way, the positioning device will deconstruct the originally continuous natural language text stream into a series of discrete nodes with clear semantic labels (i.e. entity, declaration, reference, action).
[0037] In some embodiments, the contract document content can be parsed by the positioning device to identify various types of nodes in a number of ways. Optionally, the positioning device can employ a deterministic approach based on rules and dictionaries. First, the positioning device performs optical character recognition (OCR) on each document in the contract document collection to obtain structured document data containing textual content and precise location coordinates. Next, the positioning device performs lexical matching on the structured document data based on a pre-defined entity recognition dictionary to obtain candidate entity segments, pattern matching based on a pre-defined declaration pattern library to obtain candidate declaration segments, candidate reference segments based on a pre-defined reference relationship dictionary and combined with syntactic analysis, and candidate action segments based on a pre-defined action vocabulary. Finally, the positioning device performs semantic integrity verification on all these candidate segments, such as checking whether a monetary unit exists near an amount entity, and only the candidate segments that pass the verification are finally determined as the corresponding entity nodes, declaration nodes, reference nodes, and action nodes. Optionally, the positioning device can also employ a verification approach that combines statistics and machine learning. First, the positioning device calculates the syntactic integrity scores of the candidate segments, which are determined based on the integrity of the subject-predicate-object syntactic structure in each candidate segment. At the same time, the positioning device calculates the occurrence frequency and context similarity of each candidate segment in the contract document collection. Then, the positioning device calculates the semantic confidence of each candidate segment based on the syntactic integrity scores, occurrence frequency, and context similarity. The positioning device marks the candidate segments with a semantic confidence higher than a pre-set confidence threshold as passing the verification, and performs repetitive checks on these verified segments to remove redundant segments with a content overlap degree greater than a pre-set overlap threshold, and finally classifies the de-redundant candidate segments into entity nodes, declaration nodes, reference nodes, and action nodes according to their types.
[0038] Optionally, each of the preset semantic recognition rules, the preset dictionary, the preset pattern library, the preset confidence threshold and the preset overlap threshold involved in the present step and subsequent steps can be determined by statistical analysis and machine learning on a large number of historical contract document data. For example, the preset entity recognition dictionary and the preset action vocabulary can be constructed and optimized by word frequency statistics, co-occurrence analysis and expert annotation on a large-scale, diversified contract corpus, so as to cover high-frequency and key terms in the field. The preset declaration pattern library and the preset reference relationship dictionary can be pre-defined by legal field experts according to contract writing conventions, and new and common sentence structures can be automatically discovered and induced from the corpus by natural language processing techniques (such as syntax analysis and dependency analysis), so as to be continuously expanded and improved. For the preset confidence threshold and other numerical parameters, more refined optimization methods can be used. Specifically, a verification data set annotated by human can be prepared, and then the recognition method of the present application is run, and the precision (Precision) and recall (Recall) of the recognition result are observed by adjusting the threshold. For example, the receiver operating characteristic curve (ROC) analysis or the precision-recall curve (Precision-Recall Curve) analysis method can be used, the performance curve under different thresholds is drawn, and an optimal working point (for example, the point with the highest F1 score or the point closest to (0, 1) on the curve) that balances the false alarm rate and the false alarm rate is selected, so as to determine the optimal threshold in a data-driven manner, so that the positioning device achieves the expected recognition effect in actual application.
[0039] S102, the positioning device extracts the reference edge, the cause-effect edge and the constraint edge from the entity node, the declaration node, the reference node and the action node based on the preset relationship extraction template.
[0040] Among them, the reference edge connects the reference node and the entity node or the declaration node referred to by the reference node. The cause-effect edge connects the nodes with time or logical dependency relationship. The constraint edge connects the nodes that need consistency verification.
[0041] Specifically, when performing this step, the positioning device systematically examines the potential relationships between different pairs of nodes. For example, the positioning device analyzes a reference node (e.g., "See Annex 2, Article 3.1 for specific delivery standards") and a statement node (e.g., "The product must be ISO 9001 certified" in Annex 2, Article 3.1). When the positioning device's pre-set relationship extraction template contains rules that identify referential words such as "see," "see details," "refer to," and the like, it establishes a reference edge between the two nodes, with the edge pointing from the reference node to the statement node, clearly linking the source of the information reference to the actual content. Similarly, the positioning device analyzes two action nodes, such as "Party A pays the down payment" and "Party B starts preparing materials." If the text contains a statement such as "After Party A pays the down payment, Party B can start preparing materials," the positioning device's template for identifying temporal and conditional logic (e.g., matching patterns such as "... after...,..." and "as soon as...,...") will be activated, thereby establishing a causal edge between the two action nodes, clearly expressing the premise and result relationship between the two. In addition, when the positioning device analyzes a statement node (e.g., "The contract is valid for one year") and another statement node (e.g., "But if an act of God occurs, the contract is suspended"), its built-in template for identifying transitions, exceptions, or limiting conditions (e.g., matching patterns such as "but," "except," "limited to," and the like) will establish a constraint edge between the two nodes, indicating that the latter modifies or restricts the content of the former.
[0042] S103、Based on the entity nodes, statement nodes, reference nodes, action nodes, reference edges, causal edges, and constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its location information in the contract document set and the document identifier to which it belongs.
[0043] Specifically, when performing this step, the positioning device first initializes a graph data structure. Then, it adds all the entity nodes, declaration nodes, reference nodes, and action nodes identified in S101 as the graph's vertices (Nodes). Next, the positioning device adds all the reference edges, causal edges, and constraint edges extracted in S102 as the graph's edges (Edges) 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 is created in the graph. When creating each graph node, the positioning device attaches two key metadata attributes to it: position information and the document identifier it belongs to. The position information is obtained when parsing the document in S101 and is bound to the node. It can be precise page coordinates (such as x, y coordinates and width and height in PDF documents), page numbers, and line numbers, or character offsets in text files. The document identifier explicitly indicates which specific file in the contract document set the node originates from (e.g., main contract.docx or attachment 1.pdf).
[0044] S104、When receiving a positioning request for the target key field, the positioning device locates the query node corresponding to the target key field in the cross-document causal graph.
[0045] Specifically, when performing this step, the positioning device first receives and parses the user's positioning request. The request can be a text input through a graphical user interface or a call from other application programming interfaces (APIs). The positioning device analyzes and standardizes the target key field in the request. For example, different user inputs such as "contract total price," "total price," "contract amount," etc. can be normalized by the positioning device to a standard internal identifier such as "total_contract_amount" through a pre-set synonym dictionary or semantic similarity model. Then, the positioning device searches all nodes in the cross-document causal graph to find the node that best matches the standardized target key field. The matching process can have multiple implementations. One direct way is for the positioning device to traverse all declaration nodes in the graph and check if their text content contains the target key field or its synonyms. For example, for the target key field "contract total amount," the positioning device finds a declaration node with the text content "The total amount of this contract is 100,000 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 the semantics of multiple nodes need to be combined to fully express it. In this case, the positioning device may locate a set of nodes as the query node collection.
[0046] S105. The positioning device starts from the query node and performs a layer-by-layer traversal along the cross-document causal graph according to the types of edges connected to the query node, to obtain a termination node containing the actual value of the target key field.
[0047] 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 types of edges. The positioning device will check all outgoing edges from the current node and decide the next action according to the type of edge (reference edge, causal edge, constraint edge).
[0048] When encountering a reference edge: This usually means that the content of the current node points to a detailed description of another location. For example, the query node may be "See Attachment One for Specific Delivery Date", which is connected to a statement node "Delivery Date is December 31, 2024" in Attachment One through a reference edge. The positioning device will move along this reference edge.
[0049] When encountering a causal edge: This indicates that the current node is a prerequisite or result of some action or state. For example, if the user query is "When can production begin?", the query node may be "Party B begins production", which has a causal edge from the "Party A pays down payment" node. The positioning device can trace back along this causal chain to find all prerequisite conditions for starting production. Conversely, it can also traverse forward to explore which subsequent actions will be triggered by "starting production".
[0050] When encountering a constraint edge: This indicates that the content of the current node is subject to the limitations or modifications of another node. For example, the query node is "Contract validity period is three years", but it has a constraint edge from the "If one party seriously breaches the contract, this contract will immediately terminate" node. When answering the question about the contract validity period, the positioning device must consider this constraint condition to provide a more complete and accurate answer.
[0051] The positioning device performs such traversal layer by layer, i.e., starting from the query node, visiting all directly connected nodes (first layer), and then from the nodes of the first layer, visiting the unvisited nodes connected by them (second layer), and so on. The termination condition of the traversal is to find one or more termination nodes. A node is determined as a termination node usually based on one or more of the following preset rules: 1) the node itself is an entity node containing specific numerical values, dates, names, etc. (for example, an entity node with a content of "1,000,000 Yuan"); 2) the node is a declaration node, but it has no outgoing reference edge, meaning that 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 that the final information source containing the actual value of the target key field has been found.
[0052] S106, based on the position coordinate information of the termination node and the document identification to which it belongs, the positioning device outputs the positioning result of the target key field in the contract document set.
[0053] 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 position coordinate information and document identification. The positioning device extracts these metadata. For example, a termination node may carry metadata: the document identification is "Attachment 2: Technical Specification.pdf", and the position coordinate information is "{page number: 5, coordinates: [102.5, 340.8, 450.2, 360.1]}". The positioning device outputs the positioning result of the target key field in the contract document set based on the metadata.
[0054] In the above embodiment, the present application organizes the discrete information points in the contract document set into a mutually related semantic network by constructing a cross-document causal graph. When a key field needs to be located, the positioning device can start from the query node representing the field and intelligently traverse along the reference, causal, and constraint relationship edges in the graph. This process simulates the logical chain of human experts reading and understanding contracts, and finally finds the termination node containing the specific value and outputs its position by tracing the reference and analyzing the cause and effect. Thus, when the determination of a key field needs to cross multiple pages, multiple attachments, or even multiple related contracts for information integration, the accuracy of locating the key field in the contract is improved.
[0055] However, due to contract amendments, supplementary agreements, or drafting negligence, the same key field can be defined multiple times in different locations of the contract document set, and the values of these definitions can conflict. For example, the total amount agreed in the main contract is 1 million yuan, while the subsequent supplementary agreement may change it to 1.2 million yuan. Or, the delivery date is mentioned in both the main contract and the annex, but the expressions are not the same. In the above examples, although the path to these different values can be found, there is no explicit mechanism to determine which one should be used when the actual values of these terminal nodes conflict. This potential ambiguity can lead to uncertainty or even errors in the positioning results. To solve this problem, another embodiment of the present application introduces deeper analysis and decision logic.
[0056] Referring to Figure 2 , another flowchart of the intelligent positioning method of a contract key field in an embodiment of the present application.
[0057] S201, the positioning device sets the document level weight of each type of document in descending order of supplementary agreement documents, change notice documents, main contract documents, and annex documents.
[0058] Specifically, in performing this step, the positioning device first needs to classify each document in the contract document set, and identify whether it belongs to a supplementary agreement document, a change notice document, a main contract document, or an annex document by analyzing the document title, the signing time, or a specific identifier. After classification is completed, the positioning device sets the document level weight of each type of document in descending order of supplementary agreement documents, change notice documents, main contract documents, and annex documents. For example, the weight of the most effective supplementary agreement document can be set to 1.0, the weight of the change notice document to 0.8, the weight of the main contract document to 0.6, and the weight of the least effective annex document to 0.4.
[0059] In this way, the present application converts the legal effectiveness hierarchy relationship between contract files into a quantifiable index that can be calculated. The document level weight will be one of the key inputs for calculating the "authoritative score" of each node in the graph in the subsequent step (e.g., S205). When the positioning device encounters conflicting information from different documents in subsequent processing, for example, the total price of the contract agreed in the main contract and the supplementary agreement is inconsistent, this weight value provides an objective and explicit basis for decision-making. This enables the positioning device to simulate the judgment logic of legal professionals, giving priority to the information in the document with higher effectiveness hierarchy, thereby improving the accuracy and reliability of key field positioning in complex cross-document information integration scenarios.
[0060] S202, the positioning device sets the clause authority coefficient of each type of clause in descending order of special provisions, general provisions, and reference provisions.
[0061] Specifically, in performing this step, the positioning device has divided the textual content within each document into different clause units based on the pre-set clause analysis template, and identified the type of each clause. Subsequently, the positioning device assigns a pre-set and numerically decreasing clause authority coefficient to the three types of clauses according to the legal interpretation principle that special provisions have higher authority than general provisions. For example, the coefficient for special provision clauses can be set to 1.0, the coefficient for general provision clauses can be set to 0.7, and the coefficient for reference clauses can be set to 0.3. This coefficient value sets a numerical code for the relative importance of a clause within a document. When seemingly contradictory expressions appear in the same document, for example, a general provision clause and a special provision clause both involve the delivery date, the coefficient will provide a quantitative basis for the system to determine which expression is more decisive.
[0062] S203, the positioning device identifies entity nodes, statement nodes, reference nodes, and action nodes from the contract document set based on pre-set semantic recognition rules.
[0063] Step S203 is similar to step S101, which will not be described here.
[0064] S204, the positioning device labels the document-level weight of the document and the clause authority coefficient of the clause to which the entity node, the statement node, the reference node, and the action node belong.
[0065] Specifically, in performing this step, the positioning device traverses all the nodes generated in step S203. For each node, the positioning device first queries and obtains the document-level weight of the document to which the node belongs, which is set in step S201. At the same time, the positioning device queries and obtains the clause authority coefficient of the clause in which the node is located, which is set in step S202. Subsequently, the positioning device binds the document-level weight and the clause authority coefficient as metadata attributes to the node, i.e., stores them as part of the node data structure.
[0066] By performing this step, the present application transmits and solidifies the macro-level document authority level and the micro-level clause interpretation priority to each independent semantic information unit (i.e., node).
[0067] S205, the positioning device calculates the authority score of the entity node, the statement node, the reference node, and the action node based on the document-level weight and the clause authority coefficient.
[0068] Specifically, in performing this step, the positioning device traverses all the nodes identified in step S203 again. Since each node has been labeled with its document hierarchy weight and clause authority coefficient in step S204, the positioning device, for each node, invokes a pre-set calculation function to combine these two input values into an authority score. The calculation function can be a simple weighted sum, e.g., authority score = a * document hierarchy weight + b * clause authority coefficient, where a and b are pre-set hyperparameters for adjusting the relative importance of the two dimensions. In another implementation, the function can also be a multiplication of the two, i.e., authority score = document hierarchy weight * clause authority coefficient, which better reflects the joint effect of the two factors, i.e., only when a node comes from both a high-weight document and a high-authority clause, its overall score will be the highest.
[0069] By performing this step, the present application integrates the two originally separate authority dimensions 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 a “special provision clause” in a “supplementary agreement” will have a significantly higher authority score than a node originating from a “general clause” in an “annex”.
[0070] S206, the positioning device extracts the reference edges, causal edges and constraint edges from the entity nodes, statement nodes, reference nodes and action nodes based on pre-set relationships.
[0071] S207, based on the entity nodes, statement nodes, reference nodes, action nodes, reference edges, causal edges and constraint edges, the positioning device constructs a cross-document causal graph and labels each graph node with its location information in the contract document set and the document identifier to which it belongs.
[0072] S208, when receiving a positioning request for a target key field, the positioning device locates the query node corresponding to the target key field in the cross-document causal graph.
[0073] Step S206 is similar to step S102, step S207 is similar to step S103, and step S208 is similar to step S104, which will not be repeated here.
[0074] S209, the positioning device starts from the query node and traverses the cross-document causal graph layer by layer according to the type of the edge connected to the query node to obtain a set of candidate paths.
[0075] Specifically, in performing this step, the locating device will start from the query node as the starting point of traversal, and use a graph search algorithm (e.g., a variant of depth-first search or breadth-first search) to explore the entire graph. The goal of traversal is to exhaust all possibilities, rather than stopping at the first path that meets the conditions. The traversal process follows the semantics of the edges: when encountering a reference edge, the traversal continues to trace the referenced content along the edge; when encountering a causal edge, the cause or result is explored; when encountering a constraint edge, the node imposing the constraint is accessed. The termination condition of traversal is when the current node of the path meets the pre-set termination criteria, the path is considered a complete candidate path and is recorded. The termination criteria usually include: 1) the current node is an entity node, which directly contains specific numerical values, dates or names; 2) the current node is a declaration node, but it has no outgoing reference edge, meaning its information is self-contained and does not need further tracing. The locating device will continue this process until all paths from the query node to the termination node are discovered and added to the candidate path set.
[0076] By performing this step, the present application 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 co-existing interpretation paths. This step ensures that the locating device does not ignore other potentially more important or accurate information sources by prematurely choosing a path.
[0077] S210, the locating device calculates a path authority score based on the authority scores of the nodes in each candidate path in the candidate path set.
[0078] Specifically, in performing this step, the locating device will traverse each candidate path in the candidate path set. For any path, it consists of a series of ordered nodes (from the query node to the termination node). Since each node has been calculated and assigned an authority score in step S205, the locating device will extract the authority scores of all nodes in the path. Subsequently, the locating device uses a pre-set aggregation function to combine these individual node scores into a path authority score representing the entire path. The aggregation function can have multiple implementations. One simple way is to calculate the average or weighted average of the authority scores of all nodes in the path, which reflects the overall quality of the path.
[0079] By performing this step, the present application assigns a quantitative indicator to each logical path from the question to the answer. This path authority score is a comprehensive evaluation of the quality of the path, which enables the locating device to choose among multiple possible interpretations based on a multi-dimensional information evaluation system (document level, clause type) rather than randomly or based on a single factor.
[0080] 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.
[0081] 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 difference 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 grouped together because of different literal values.
[0082] By executing this step, the positioning device sorts all the paths that may have conflicts into independent conflict paths.
[0083] S212. The positioning device performs semantic equivalence analysis on the conflict path combination.
[0084] 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 unify various different writing formats 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. Based on the standardization, the positioning device then performs analysis, including: 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.
[0085] Semantic Similarity Analysis: For non-numeric types of text, such as institutional names or technical terms, the positioning device determines whether they refer to the same conceptual entity by means of a pre-defined equivalence relation library. For example, the library defines that "Party A" and "A Company" refer to the same entity.
[0086] Finally, the positioning device synthesizes the above analyses to obtain the result of semantic equivalence analysis. If all actual values that exist in literal differences are determined to refer to the same numerical value or the same conceptual entity after standardization and analysis, the analysis result is equivalent. Otherwise, if at least one pair of actual values still has an irreconcilable substantial difference after standardization (for example, "100 million yuan" and "120 million yuan"), the analysis result is non-equivalent.
[0087] S213 is executed when the result of semantic equivalence analysis is non-equivalent, and S214 is executed when the result of semantic equivalence analysis is equivalent.
[0088] S213, when the result of semantic equivalence analysis is non-equivalent, the positioning device combines the path with the highest path authority score in the conflict path combination as the winning path.
[0089] Specifically, when this step is executed, the positioning device starts a preference strategy based on path authority scores. The positioning device traverses each candidate path in the conflict path combination and obtains the path authority score calculated for each path in step S210. This score is a comprehensive quantitative indicator that combines the legal effectiveness level of the information source document (such as a supplementary agreement higher than a main contract) and the binding priority of the clause (such as a special agreement higher than a general agreement). Subsequently, the positioning device compares these path authority scores and finds a highest score from them. The candidate path with this highest score is determined as the winning path. This decision logic simulates the interpretation principle in legal practice, that is, when there are contradictions in contract documents, the clause with higher effectiveness or more explicit agreement should be given priority. For example, if the path derived from the supplementary agreement (high document level weight) has a path authority score of 0.9, and the path derived from the main contract (lower document level weight) has a score of 0.7, even if both point to different amounts, the positioning device will adopt the former with a higher score.
[0090] S214, when the result of semantic equivalence analysis is equivalent, the positioning device performs consistency verification based on the constraint edges of each conflict path in the conflict path combination, and takes the path that passes the verification as the winning path.
[0091] Specifically, when performing this step, the positioning device no longer relies on the path authority score to make a decision, because the answers pointed to by each path are essentially the same. Instead, it initiates a consistency verification procedure to assess which path's context is more robust and free of contradictions. The positioning device focuses on the nodes on each candidate path in the conflicting path combination, especially the constraint edges connected to these nodes. As defined in step S102 of this application, a constraint edge connects nodes that need to be verified for consistency, usually indicating a limiting, exceptional, or modifying relationship. For example, a statement node "the total contract price is 100 million yuan" can be connected to another node "the above price does not include tax" by a constraint edge. When performing consistency verification, the positioning device checks whether these constraint relationships on the path are satisfied or whether there are internal contradictions. For example, if the terminal node of a path is "100 million", and there is a constraint node on this path indicating that "the total price must not be less than 110 million", then this path has a logical inconsistency and the verification will not pass. Conversely, if the terminal node of another path is also "100 million", and all the constraint conditions on its path (e.g. "the price includes tax", "the price does not change within the validity period", etc.) are not in conflict with this value, then this path is considered to be "verified". Finally, the positioning device determines all the verified paths as "winning paths". In most cases, after consistency verification, only one or a few of the semantically equivalent paths may fully satisfy all the context constraints. If there are multiple paths that pass the verification, the application can be designed to select any one of them (as they point to the same actual value), or to select the one with the highest authority score as the representative.
[0092] S215, the positioning device determines the terminal node of the winning path as the final terminal node.
[0093] Specifically, the terminal node obtained in S213 or S214 is determined as the final terminal node.
[0094] S216, based on the position coordinate information of the terminal node and the document identifier to which it belongs, the positioning device outputs the positioning result of the target key field in the contract document set.
[0095] Step S216 is similar to step S106, which will not be described here.
[0096] In the above embodiments, on the basis of constructing the cross-document causal graph, a quantitative evaluation and conflict resolution method based on authority is further introduced. The method first digitizes the legal interpretation principles by setting weights for documents of different effectiveness (such as supplementary agreements, main contracts) and clauses (such as special provisions, general provisions), and calculates the authority score of each node and even each information path in the graph. When facing multiple possible results, the method no longer simply selects one, but judges the nature of the conflict through semantic equivalence analysis. For substantive content contradictions, the path result with the highest authority score is adopted. For equivalent content that is only different in expression, logical consistency verification is performed through the context constraint edge to ensure the rigor of the positioning result. Through this method, the accuracy and intelligent level of key field positioning are improved.
[0097] The above describes a kind of intelligent positioning method of contract key field in the embodiments of the present application, and the following introduces the exemplary positioning equipment 300 provided in the embodiments of the present application.
[0098] Figure 3 It is the exemplary hardware structure schematic diagram of the positioning equipment 300 provided in the embodiments of the present application. In some embodiments, the positioning equipment 300 is a kind of computer equipment. The computer equipment includes processor, memory and network interface connected by system bus. Wherein, the processor of the computer equipment is used to provide calculation and control capability. The memory of the computer equipment includes nonvolatile storage medium, internal memory. The nonvolatile storage medium stores operating system, computer program and database. The internal memory provides environment for the running of operating system and computer program in nonvolatile storage medium. The database of the computer equipment is used to store data. The network interface of the computer equipment is used to communicate with other terminals or servers outside through network connection. In some embodiments, the network interface can be wired network interface, and in some embodiments, the network interface can also be wireless network interface. The computer program is executed by processor to implement the intelligent positioning method of a kind of contract key field in the embodiments of the present application.
[0099] Those skilled in the art can understand that, Figure 3 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer equipment to which the scheme of the present application is applied. The specific computer equipment can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.
[0100] In some embodiments of the present application, a computer readable storage medium is also provided, which includes instructions that, when executed on the positioning equipment 300, can cause the positioning equipment 300 to perform the intelligent positioning method of a kind of contract key field in the embodiments of the present application.
[0101] The above-described embodiments are merely intended to illustrate the technical solutions of the present application, but not to limit the present application; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still make modifications to the technical solutions recorded in the foregoing embodiments, or make equivalent replacements to some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0102] In the above-described embodiments, the term "when" can be interpreted as meaning "if" or "after" or "in response to determining" or "in response to detecting" according to the context. Similarly, the phrase "upon determining" or "if detecting (the stated condition or event)" can be interpreted as meaning "if determining" or "in response to determining" or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)" according to the context.
[0103] In the above-described embodiments, all or some of the processes can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, the processes can be implemented 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 into and executed by a computer, all or some of the processes described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing one or more available media. The available media can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state disk), etc.
[0104] Those skilled in the art can understand that all or part of the processes in the above-described embodiments can be implemented by a computer program instructing relevant hardware, and the program can be stored in a computer-readable storage medium, and when executed, the program can include the processes of the above-described embodiments. The aforementioned storage medium includes ROM or random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
Claims
1. A method for intelligent positioning of contract key fields, characterized in that, The method is applied to a positioning device, and comprises the following steps: The positioning device identifies entity nodes, declaration nodes, reference nodes and action nodes from a contract document set based on preset semantic recognition rules, the contract document set comprising a main contract document and at least one attachment document, the entity nodes being text segments representing specific numerical values or names, the declaration nodes being text segments containing key field declaration statements, the reference nodes being text segments containing reference relationship expressions, and the action nodes being text segments representing behaviors or events; The positioning device extracts reference edges, cause-effect edges and constraint edges from the entity nodes, the declaration nodes, the reference nodes and the action nodes based on preset relationship extraction templates, the reference edges connecting the reference nodes and the entity nodes or the declaration nodes referenced by the reference nodes, the cause-effect edges connecting nodes having time or logical dependency relationships, and the constraint edges connecting nodes requiring consistency verification; Based on the entity nodes, the declaration nodes, the reference nodes, the action nodes, the reference edges, the cause-effect edges and the constraint edges, the positioning device constructs a cross-document cause-effect graph and labels each graph node with its location information and document identity in the contract document set; When a positioning request for a target key field is received, the positioning device locates a query node corresponding to the target key field in the cross-document cause-effect graph; The positioning device performs layer-by-layer traversal along the cross-document cause-effect graph from the query node according to the types of edges connected to the query node, to obtain a terminal node containing an actual value of the target key field; Based on the location coordinate information and the document identity of the terminal node, the positioning device outputs a positioning result of the target key field in the contract document set.
2. The method of claim 1, wherein, The step of identifying entity nodes, declaration nodes, reference nodes and action nodes from a contract document set based on preset semantic recognition rules comprises the following steps: 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 vocabulary matching on the structured document data based on a preset entity recognition dictionary to obtain candidate entity segments; The positioning device performs pattern matching on the structured document data based on a preset declaration pattern library to obtain candidate declaration segments; The positioning device performs syntax analysis on the structured document data based on a preset reference relationship dictionary to obtain candidate reference segments; The positioning device performs verb recognition on the structured document data based on a preset action vocabulary table to obtain candidate action segments; The positioning device determines the candidate entity segments, the candidate declaration segments, the candidate reference segments and the candidate action segments that pass semantic integrity verification as the entity nodes, the declaration nodes, the reference nodes and the action nodes, respectively.
3. The method of claim 2, wherein, The step of determining the candidate entity segment, the candidate statement segment, the candidate reference segment and the candidate action segment that pass the semantic integrity verification as the entity node, the statement node, the reference node and the action node respectively by the positioning device specifically includes: The positioning device calculates the syntactic integrity score of each candidate segment, which is determined based on the integrity of the subject-predicate-object structure in each candidate segment; The positioning device counts the occurrence frequency and context 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 integrity score, the occurrence frequency and the context similarity; The positioning device marks the candidate segment with a semantic confidence higher than a preset confidence threshold as passing the verification; The positioning device performs a redundancy check on the candidate segments that pass the verification, and removes redundant segments with a content overlap degree greater than a preset overlap threshold; The positioning device classifies the candidate segments after removing the redundant segments into the entity node, the statement node, the reference node and the action node according to the type of the candidate segment.
4. The method of claim 1, wherein, Before the step of identifying the entity node, the statement node, the reference node and the action node from the contract document set based on the preset semantic recognition rule by the positioning device, the method further includes: The positioning device classifies the documents in the contract document set into main contract documents, attachment documents, supplementary agreement documents and change notice documents based on the document title, the signing time and the revision identifier; The positioning device sets the document level 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 classifies the clauses in each document into special agreement clauses, general clauses and reference clauses based on a preset clause analysis template; The positioning device sets the clause authority coefficient of each type of clause in descending order of special agreement clauses, general clauses and reference clauses.
5. The method of claim 4, wherein, After the step of identifying the entity node, the statement node, the reference node and the action node from the contract document set based on the preset semantic recognition rule by the positioning device, the method further includes: The positioning device labels the document level weight of the document and the clause authority coefficient of the clause to which the entity node, the statement node, the reference node and the action node belong; The positioning device calculates the authority score of the entity node, the statement node, the reference node and the action node based on the document level weight and the clause authority coefficient.
6. The method of claim 5, wherein, The step of the positioning device starting from the query node and performing layer-by-layer traversal along the cross-document causal graph according to the type of the edge connected to the query node to obtain the terminal node containing the actual value of the target key field specifically includes: The positioning device starts from the query node and performs layer-by-layer traversal along the cross-document causal graph according to the type of the edge connected to the query node to obtain a candidate path set, which is a complete path that can reach the terminal node containing the actual value of the target key field; The positioning device calculates a path authority score based on the authority scores of the nodes on each candidate path in the candidate path set; The positioning device marks candidate paths in the candidate path set that differ in actual values of terminal nodes as a conflict path combination; The positioning device performs semantic equivalence analysis on the conflict path combination; In the case of a non-equivalence semantic equivalence analysis result, the positioning device takes the path with the highest path authority score in the conflict path combination as the winning path; In the case of an equivalence semantic equivalence analysis result, the positioning device performs consistency verification based on the constraint edges of each conflict path in the conflict path combination, and takes the path that passes the verification as the winning path; The positioning device determines the terminal node of the winning path as the final terminal node.
7. The method of claim 6, wherein, The step of performing semantic equivalence analysis on the conflict path combination by the positioning device specifically includes: The positioning device extracts actual values of each terminal node in the candidate path set; The positioning device calculates numerical difference degrees and semantic similarities between the actual values after standardization processing; The positioning device identifies terminal nodes with numerical difference degrees greater than a preset difference threshold as terminal nodes with conflicts, obtaining a conflict node combination; The positioning device determines whether the conflict node combination points to the same concept entity through a preset equivalence relation library; If yes, the semantic equivalence analysis result is equivalence; If no, the semantic equivalence analysis result is non-equivalence.
8. A positioning device, characterized by The positioning device comprises 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 comprises computer instructions, and the one or more processors invoke the computer instructions to cause the positioning device to perform the method according to any one of claims 1-7.
9. A computer program product comprising instructions, characterized in that, When the computer program product runs on the positioning device, the positioning device performs the method according to any one of claims 1-7.
10. A computer-readable storage medium comprising instructions, characterized in that, When the instructions run on the positioning device, the positioning device performs the method according to any one of claims 1-7.
Citation Information
Patent Citations
Knowledge graph construction method and device and law and regulation retrieval method and device
CN115905577A
Clinical test item change contract generation method and system
CN118520863A
Contract relation graph construction method and electronic equipment
CN120067292A
Contract text structured processing method and device, equipment and storage medium
CN120492608A
Contract text key payment index extraction method based on natural language processing
CN120523929A
Cited By
An insurance field intelligent question and answer method and device based on incremental training and a medium
CN122196129A