Contract relation graph construction method and electronic equipment
By conducting semantic analysis and graph construction of contract text, the problem of insufficient dynamic modeling and analysis capabilities of contract relationships in the existing technology is solved, and intelligent review and risk warning are realized in the management of the entire life cycle of contract.
Patent Information
- Application Number
- CN202510067829.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-30
AI Technical Summary
The existing contract management system lacks the ability to model and analyze the dynamic correlation between contracts, and it is difficult to achieve risk warning, relationship tracking and intelligent review in the entire life cycle of contract management.
By semantic segmentation, clause classification and factor extraction of the contract text to be analyzed, a contract relationship map is constructed, including determining nodes and association relationships, and updating the knowledge map according to contract changes.
It realizes efficient and intelligent management of contract data, can accurately analyze and track contract relationships, help enterprises to carry out intelligent contract management, and reflect the latest status of the contract in real time.
Smart Images

Figure CN120067292A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of contract review, and more specifically, to a method for constructing a contract relationship graph and an electronic device. Background Art
[0002] In modern enterprise contract management, a large amount of contract data exists in the form of unstructured text. These contracts involve complex factors such as multi-party relationships, clause dependencies, and performance constraints.
[0003] Existing contract management systems mostly rely on static databases or simple text retrieval functions, lacking the ability to dynamically associate and model the relationships between contracts. This limitation makes it difficult to achieve risk warning, relationship tracking, and intelligent review in the full life cycle management of contracts. Summary of the Invention
[0004] The purpose of this application is to provide a method for constructing a contract relationship graph and an electronic device to achieve efficient and intelligent management of contracts in view of the deficiencies in the above-mentioned existing technologies.
[0005] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, an embodiment of this application provides a method for constructing a contract relationship graph, and the method includes:
[0007] Performing semantic segmentation, clause classification, and element extraction on the contract text to be analyzed to obtain the attribute information of each clause paragraph, each entity, and each triple information in each clause paragraph in the contract text to be analyzed. The triple information is used to indicate the association relationship between entities, and the entities include contract subjects and / or contract elements;
[0008] Determining at least one node corresponding to the contract text to be analyzed and the association relationship between each node according to the attribute information of each clause paragraph, each entity, and the triple information. The at least one node includes: contract node, contract subject node, contract clause node, contract element node, contract event node, and contract risk node;
[0009] Constructing a knowledge graph corresponding to the contract text to be analyzed based on each node and the association relationship between each node, and updating the knowledge graph according to the change information of the contract to be analyzed.
[0010] Optionally, before performing semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, it further includes:
[0011] If the contract to be analyzed is a contract image, preprocessing the contract image to obtain a preprocessed contract image;
[0012] Perform text recognition on the preprocessed contract image to obtain the contract text;
[0013] Perform typesetting processing on the contract text to obtain a structured contract text, where the structured contract text has the same typesetting structure as that in the contract image;
[0014] Revise the structured contract text to obtain the contract text to be analyzed.
[0015] Optionally, perform semantic segmentation, clause classification, and element extraction on the contract text to be analyzed to obtain at least one clause attribute information and entity and triple information in each clause paragraph in the contract text to be analyzed, including:
[0016] Perform semantic segmentation on the contract text to be analyzed to obtain each clause paragraph, where the clause includes a main clause and a sub-clause;
[0017] Perform classification processing on each clause paragraph and each sentence in each clause paragraph to obtain the type of each clause paragraph and the type of each sentence;
[0018] Perform entity recognition and recognition of the association relationship between entities on each clause paragraph to obtain each entity and triple information in each clause paragraph.
[0019] Optionally, performing semantic segmentation on the contract text to be analyzed to obtain each clause paragraph includes:
[0020] If there are titles and the hierarchical relationship of each title in the contract text to be analyzed, perform segmentation processing on the contract text to be analyzed according to each title and the hierarchical relationship of each title to obtain each clause paragraph;
[0021] If there are no titles and the hierarchical relationship of each title in the contract text to be analyzed, segment the continuous paragraphs according to the symbol information in the continuous text to obtain each clause paragraph.
[0022] Optionally, performing classification processing on each clause paragraph and each sentence in each clause paragraph to obtain the type of each clause paragraph and the type of each sentence includes:
[0023] Classify the clause paragraph according to the keywords in the clause paragraph, the title to which the clause paragraph belongs, and the clause number to obtain the type of the clause paragraph;
[0024] Classify each sentence according to the key elements in each sentence in the clause paragraph to obtain the type of each sentence.
[0025] Optionally, the entity recognition of each of the clause paragraphs and the recognition of the association relationships between the entities to obtain the entities and triple information in each clause paragraph include:
[0026] Perform named entity recognition on the clause paragraph to extract at least one entity in the clause paragraph;
[0027] Perform triple extraction on each of the clause paragraphs to obtain the association relationships between the entities in each clause paragraph.
[0028] Optionally, the determination of at least one node corresponding to the contract text to be analyzed and the association relationships between the nodes according to the attribute information of each clause paragraph, each entity, and the triple information includes:
[0029] Determine other contract identifiers except the identifier of the contract text to be analyzed from the entities and the association relationships between the other contracts and the contract text to be analyzed, and determine contract nodes according to the contract identifiers and the association relationships between the other contracts and the contract text to be analyzed;
[0030] Determine the contract clause nodes corresponding to the clause paragraphs according to the clause types in the attribute information of the clause paragraphs;
[0031] According to the contract clause nodes, the entities in the clause paragraphs, and the triple information, determine the association relationships between the subject nodes, contract element nodes, contract event nodes, contract risk nodes in the contract corresponding to the clause paragraphs, the association relationships between the contract subject nodes, the association relationships between the contract element nodes and the contract clause nodes, the association relationships between the contract event nodes and the contract clause nodes, and the association relationships between the contract risk nodes and the contract clause nodes.
[0032] Optionally, the determination of the association relationships between the subject nodes, contract element nodes, contract event nodes, contract risk nodes in the contract corresponding to the clause paragraphs, the association relationships between the contract subject nodes, the association relationships between the contract element nodes and the contract clause nodes, the association relationships between the contract event nodes and the contract clause nodes, and the association relationships between the contract risk nodes and the contract clause nodes according to the contract clause nodes, the entities in the clause paragraphs, and the triple information includes:
[0033] Traverse the entities in the clause paragraph to find all the contract element nodes except the clause nodes and contract nodes;
[0034] Traverse each triple information, and for the currently traversed triple information, determine the association relationships among the contract event nodes, contract risk nodes, and subject nodes in each contract, the association relationships between each contract event node and contract clause nodes, the association relationships between each contract risk node and contract clauses, and the association relationships between each contract element node and contract clause nodes.
[0035] Optionally, constructing the knowledge graph corresponding to the contract to be analyzed based on each node and the association relationships between each node includes:
[0036] Create edges between each node according to the association relationships between each node;
[0037] Connect each node based on the edges between each node to obtain the knowledge graph.
[0038] In a second aspect, an embodiment of the present application further provides a contract relationship graph construction device, and the device includes:
[0039] An analysis module, configured to perform semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, and obtain the attribute information of each clause paragraph in the contract to be analyzed, each entity in each clause paragraph, and each triple information, where the triple information is used to indicate the association relationships between each entity, and the entity includes a contract subject and / or a contract element;
[0040] A determination module, configured to determine at least one node corresponding to the contract text to be analyzed and the association relationships between each node according to the attribute information of each clause paragraph, each entity, and the triple information, where the at least one node includes: a contract node, a subject node in the contract, a contract clause node, a contract element node, a contract event node, and a contract risk node;
[0041] A construction module, configured to construct a knowledge graph corresponding to the contract text to be analyzed based on each node and the association relationships between each node, and update the knowledge graph according to the change information of the contract to be analyzed.
[0042] Optionally, the analysis module is specifically configured to:
[0043] If the contract to be analyzed is a contract image, preprocess the contract image to obtain a preprocessed contract image;
[0044] Perform text recognition on the preprocessed contract image to obtain the contract text;
[0045] Perform typesetting processing on the contract text to obtain a structured contract text, where the structured contract text has the same typesetting structure as that in the contract image;
[0046] Modify the structured contract text to obtain the contract text to be analyzed.
[0047] Optionally, the analysis module is specifically configured to:
[0048] Perform semantic segmentation on the contract text to be analyzed to obtain each clause paragraph, where the clause includes a main clause and a sub-clause;
[0049] Classify each clause paragraph and each sentence in each clause paragraph to obtain the type of each clause paragraph and each sentence type;
[0050] Perform entity recognition on each clause paragraph and recognition of the association relationship between each entity to obtain each entity and triple information in each clause paragraph.
[0051] Optionally, the analysis module is specifically configured to:
[0052] If there are titles and the hierarchical relationship of each title in the contract text to be analyzed, perform segmentation processing on the contract text to be analyzed according to each title and the hierarchical relationship of each title to obtain each clause paragraph;
[0053] If there are no titles and the hierarchical relationship of each title in the contract text to be analyzed, segment the continuous paragraph according to the symbol information in the continuous text to obtain each clause paragraph.
[0054] Optionally, the analysis module is specifically configured to:
[0055] Classify the clause paragraph according to the keywords in the clause paragraph, the title to which the clause paragraph belongs, and the clause number to obtain the type of the clause paragraph;
[0056] Classify each sentence according to the key elements in each sentence in the clause paragraph to obtain the type of each sentence.
[0057] Optionally, the analysis module is specifically configured to:
[0058] Perform named entity recognition on the clause paragraph and extract at least one entity in the clause paragraph;
[0059] Perform triple extraction on each clause paragraph to obtain the association relationship between each entity in each clause paragraph.
[0060] Optionally, the determination module is specifically configured to:
[0061] Determine other contract identifiers except the identifier of the contract text to be analyzed from each entity, and the association relationship between the other contracts and the contract text to be analyzed, and determine contract nodes according to the contract identifiers and the association relationship between the other contracts and the contract text to be analyzed;
[0062] Determine the contract clause node corresponding to the clause paragraph according to the clause type in the attribute information of the clause paragraph;
[0063] Determine the association relationships between the subject nodes, contract element nodes, contract event nodes, contract risk nodes, the association relationships between each contract subject node, the association relationships between each contract element node and the contract clause node, the association relationships between each contract event node and the contract clause node, and the association relationships between each contract risk node and the contract clause node in the contract corresponding to the clause paragraph according to the contract clause node, each entity in the clause paragraph, and the triple information.
[0064] Optionally, the determining module is specifically configured to:
[0065] Traverse each entity in the clause paragraph to find all contract element nodes except clause nodes and contract nodes;
[0066] Traverse each triple information, and for the currently traversed triple information, determine the association relationships between contract event nodes, contract risk nodes, each contract subject node, the association relationships between each contract event node and the contract clause node, the association relationships between each contract risk node and the contract clause, and the association relationships between each contract element node and the contract clause node.
[0067] Optionally, the constructing module is specifically configured to:
[0068] Create edges between each node according to the association relationships between each node;
[0069] Connect each node based on the edges between each node to obtain the knowledge graph.
[0070] In a third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the application program runs, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to perform the steps of the contract relationship graph construction method described in the first aspect above.
[0071] Fourthly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is read and executes the steps of the contract relationship graph construction method described in the first aspect above.
[0072] The beneficial effects of the present application are as follows:
[0073] A contract relationship graph construction method and an electronic device provided by the present application can make the extraction and analysis of contract data more accurate and efficient by performing semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, obtaining the attribute information of each clause paragraph, each entity, and each triple information in each clause paragraph in the contract text to be analyzed. Then, according to the attribute information of each clause paragraph, each entity, and triple information, at least one node corresponding to the contract text to be analyzed and the association relationship between each node are determined. Based on the association relationship between each node and each node, a knowledge graph corresponding to the contract text to be analyzed is constructed, and the knowledge graph is updated according to the change information of the contract to be analyzed. The relationship between contracts and the relationship and dependence between clauses, elements, events, and risks within the contract can be constructed to obtain the knowledge graph of the contract, so as to accurately analyze and track the contract based on the knowledge graph of the contract subsequently, help enterprises manage contracts intelligently, and at the same time, the knowledge graph of the contract can be dynamically updated according to the change of the contract, ensuring that the knowledge graph can reflect the latest state of the contract in real time. Description of the Drawings
[0074] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0075] Figure 1 It is a schematic flowchart of a contract relationship graph construction method provided by an embodiment of the present application;
[0076] Figure 2 It is a schematic flowchart of a second contract relationship graph construction method provided by an embodiment of the present application;
[0077] Figure 3 It is a schematic flowchart of a third contract relationship graph construction method provided by an embodiment of the present application;
[0078] Figure 4 It is a schematic flowchart of a fourth contract relationship graph construction method provided by an embodiment of the present application;
[0079] Figure 5Schematic flowchart of the fifth method for constructing a contract relationship graph provided by an embodiment of the present application;
[0080] Figure 6 Schematic flowchart of the sixth method for constructing a contract relationship graph provided by an embodiment of the present application;
[0081] Figure 7 Schematic diagram of an apparatus for a method of constructing a contract relationship graph provided by an embodiment of the present application;
[0082] Figure 8 Block diagram of a structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0083] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purposes of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in the present application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0084] In addition, the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and illustrated in the accompanying drawings here may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.
[0085] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features stated hereinafter, but does not exclude the addition of other features.
[0086] Optionally, the contract relationship graph construction method provided by the embodiments of the present application is applied to an electronic device, which can be, for example, a terminal device with computing and processing capabilities and a display function such as a mobile phone, a tablet computer, a notebook computer, a handheld computer, a desktop computer, etc., or it can also be a server. Specifically, it can be applied to an application program in a terminal device, such as: an APP (application) on a mobile phone, an application system on a computer, etc.
[0087] Next, the specific implementation process of the contract relationship graph construction provided in the embodiments of the present application will be specifically explained.
[0088] Figure 1 FIG. is a schematic flowchart of a contract relationship graph construction method provided by an embodiment of the present application. The execution subject of this method is the aforementioned electronic device. As Figure 1 shown, this method includes:
[0089] S101. Perform semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, and obtain the attribute information of each clause paragraph in the contract text to be analyzed, as well as each entity and each triple information in each clause paragraph.
[0090] Among them, the triple information can be used to indicate the association relationship between entities, and the entities can include contract parties and / or contract elements.
[0091] Optionally, the contract text to be analyzed is a structured text, and the contract text to be analyzed can be any type of contract text, such as a sales contract, a gift contract, a lease contract, a technology contract, a commission contract, etc. Performing semantic segmentation on the contract text to be analyzed can divide the contract text to be analyzed into multiple clause paragraphs. Since the content contained in each clause paragraph is different, each clause paragraph can be classified through clause classification to obtain different types of clause paragraphs. Then, element extraction is performed on each clause paragraph to extract multiple entities in each clause paragraph. The entities can include contract parties and / or contract elements. Among them, contract elements can be, for example, amount, date, account information, location, etc. There is also an association relationship between the entities in each clause paragraph. Then, triple extraction can also be performed on each clause paragraph to obtain the association relationship between the entities.
[0092] Among them, the attribute information of each clause paragraph can include at least one of the following: the type of the clause paragraph, the clause number, the clause title, the clause content, etc.
[0093] S102. Determine at least one node corresponding to the contract text to be analyzed and the association relationship between the nodes according to the attribute information of each clause paragraph, each entity, and the triple information.
[0094] Among them, the at least one node may include: a contract node, a subject node in the contract, a contract clause node, a contract element node, a contract event node, and a contract risk node.
[0095] Optionally, the contract node may include a central contract node and other contract nodes. The central contract node may be the entire contract text node to be analyzed, and the other contract nodes may indicate additional contracts and sub - contracts related to the contract text to be analyzed. Each contract node includes a subject node in the contract, and each subject node in the contract may refer to the signatory in the contract, such as Party A, Party B, and the third party in the contract, etc.
[0096] Optionally, the contract clause node may refer to each clause in each contract subject. The contract element node refers to the elements in each clause paragraph, such as the amount, payment time, delivery location, performance period, etc. in the clause paragraph; the contract event node may refer to the key events occurring in each contract subject; the contract risk node may refer to the potential risks in each contract subject, such as performance risk, delay risk, etc.
[0097] Optionally, the association relationships between the nodes may include, for example, the association relationships between each subject node in the contract, the association relationship between the contract clause node and the contract subject, the association relationship between the contract element node and the contract clause node, the association relationship between the contract event node and the contract clause node, the association relationship between the contract element node and the contract subject node, the association relationship between the contract risk node and the contract clause node, etc.
[0098] S103. Based on the association relationships between the nodes, construct a knowledge graph corresponding to the contract text to be analyzed, and update the knowledge graph according to the change information of the contract to be analyzed.
[0099] Optionally, for the nodes with association relationships, use edges to connect the nodes. The attribute information of each edge may refer to the detailed information of the relationship between the nodes connected by the edge. After obtaining the knowledge graph corresponding to the contract text to be analyzed according to the contract text to be analyzed, as the contract execution progresses, the knowledge graph corresponding to the contract text to be analyzed will also be dynamically updated. For example, events such as the change of the performance status in the contract to be analyzed and the arrival of the payment time can cause the update of the knowledge graph. Specifically, the nodes or edges can be modified adaptively according to the changes of the contract to be analyzed.
[0100] In this embodiment, by performing semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, the attribute information of each clause paragraph in the contract to be analyzed, as well as each entity and each triple information in each clause paragraph, can be obtained, which can make the extraction and analysis of contract data more accurate and efficient. Then, according to the attribute information of each clause paragraph, each entity, and the triple information, at least one node corresponding to the contract text to be analyzed and the association relationship between each node are determined. Based on the association relationship between each node and each other node, a knowledge graph corresponding to the contract text to be analyzed is constructed, and the knowledge graph is updated according to the change information of the contract to be analyzed. The relationship between contracts and the relationship and dependence between clauses, elements, events, and risks within the contract can be constructed to obtain the knowledge graph of the contract, so that the contract can be accurately analyzed and traced based on the knowledge graph of the contract in the future, helping enterprises to manage contracts intelligently. At the same time, the contract knowledge graph can be dynamically updated according to the changes in the contract, ensuring that the knowledge graph can reflect the latest state of the contract in real time.
[0101] Figure 2 FIG. is a schematic flow chart of the second method for constructing a contract relationship graph provided by an embodiment of the present application. As Figure 2 shown, before performing semantic segmentation, clause classification, and element extraction on the contract text to be analyzed in S101 above, it may include:
[0102] S201. If the contract to be analyzed is a contract image, preprocess the contract image to obtain a preprocessed contract image.
[0103] If the contract to be analyzed is a traditional paper contract or a scanned contract, and what is uploaded is a contract image, then the contract image needs to be preprocessed first.
[0104] Among them, preprocessing may refer to removing noise background interference in the contract image, enhancing the image contrast, making the text in the contract image clearer, and correcting the tilted contract image to be upright to improve the character recognition rate.
[0105] S202. Perform text recognition on the preprocessed contract image to obtain a contract text.
[0106] Specifically, different text recognition tools can be used to perform text recognition on the preprocessed contract image. For example, an OCR engine (Optical Character Recognition) can be used to convert the text in the contract image into text. Among them, OCR technology can recognize and process different fonts, printed texts, and handwritten texts, etc.
[0107] S203. Perform typesetting processing on the contract text to obtain a structured contract text.
[0108] Among them, the structured contract text refers to the text with the same layout structure as that in the contract image.
[0109] Optionally, for contracts with relatively complex structures, page layout recognition is very important. There may be some differences between the contract text obtained after text recognition processing and the page layout of the contract in the contract image. Therefore, a page layout recognition tool can be used to recognize the page layout of the contract in the contract image, and the page layout of the contract text can be typeset to be the same as the recognized contract page layout. Specifically, the layout features in the contract text, such as titles, paragraphs, tables, images, etc., can be recognized, and the layout of the contract text can be typeset to be the same as the local part in the contract image, so as to ensure the semantic integrity of the contract text.
[0110] S204. Amend the structured contract text to obtain the contract text to be analyzed.
[0111] Specifically, OCR technology can be used to recognize the incorrect text in the structured contract text, such as verifying information such as amounts, dates, names, etc., so that there is no incorrect text in the obtained contract text to be analyzed, and the contract text to be analyzed is a standard editable text.
[0112] Optionally, for the contract text in the form of a word document existing in the system, the content of the Word document can be read through a built-in parsing engine (such as the python-docx library in Python, Apache POI, etc.). Not only the pure text is extracted, but also the structural hierarchy of the document, such as the title of the contract, clause numbers, clause content, etc., is recognized.
[0113] In this embodiment, contract documents from different sources and in different formats can be uniformly converted into standardized editable texts for subsequent clause parsing, information extraction, and knowledge graph construction.
[0114] Figure 3 It is a schematic flowchart of the third method for constructing a contract relationship graph provided by an embodiment of the present application. As Figure 3 shown, in the above S101, semantic segmentation, clause classification, and element extraction are performed on the contract text to be analyzed to obtain the attribute information of each clause paragraph, each entity, and each triple information in each clause paragraph in the contract to be analyzed, which may include:
[0115] S301. Perform semantic segmentation on the contract text to be analyzed to obtain each clause paragraph.
[0116] Among them, a clause may include a main clause and sub-clauses.
[0117] Optionally, the contract text to be analyzed may consist of multiple main clauses, multiple sub-clauses, paragraphs, and headings. For subsequent extraction of contract clauses, relationship analysis, and construction of knowledge graphs, it is necessary to first perform semantic-level segmentation on the contract text to be analyzed, divide the contract text to be analyzed into multiple paragraphs, and each paragraph serves as a clause paragraph.
[0118] S302. Classify the clause paragraphs and the sentences in each clause paragraph to obtain the types of each clause paragraph and the types of each sentence.
[0119] Specifically, the clause paragraphs can be classified first to obtain the types of each clause paragraph, and then each sentence in each clause paragraph can be classified to obtain the types of each sentence. Among them, the types of clause paragraphs can include: payment clauses, delivery clauses, confidentiality clauses, etc. The types of each sentence can be, for example: "Payment - Payment Time", "Payment - Total Amount", etc. By accurately classifying the clause paragraphs first and then further analyzing each sentence in each clause paragraph, the contract clauses can be subdivided into different types and contents, laying a foundation for subsequent data analysis, risk identification, performance management, etc., and realizing intelligent management and efficient extraction of contract clauses.
[0120] S303. Perform entity recognition on each clause paragraph and recognition of the association relationships between entities to obtain the entities in each clause paragraph and triple information.
[0121] Specifically, through entity recognition, key information such as the names of contract parties, different types of transaction amounts and amounts, account information, payment time, signing date, and signing location in the clause paragraphs can be recognized. When recognizing the association relationships between entities, the triple extraction method can be used to recognize the subject, predicate, and object in the clause paragraph, and generate the association relationships between entities based on the recognized subject, predicate, and object to obtain triple information. The triple information is, for example, "Party A needs to pay Party B a liquidated damages of 500,000 yuan".
[0122] Optionally, the semantic segmentation of the contract text to be analyzed in the above S301 to obtain each clause paragraph may include:
[0123] Optionally, if there are headings and the hierarchical relationships of each heading in the contract to be analyzed, the contract text to be analyzed is segmented according to each heading and the hierarchical relationships of each heading to obtain each clause paragraph.
[0124] Optionally, the title format and numbering in the contract text to be analyzed can be identified through regular expressions or rule-based parsing methods to determine the hierarchical relationship between each title. Specifically, determine the numbering of each title and determine the hierarchical relationship between each title based on the numbering of each title. For example, for the titles "Article 1" and "1.1", "Article 1" and "1.1" are divided into two different paragraphs. Specifically, the text under the title of Article 1 can be split into a clause paragraph, and then the text under the title of 1.1 can be split into a clause paragraph. In the following contract text to be analyzed, "Article 2, Delivery Time and Place" is a clause paragraph, and "2.1, Delivery Time" is a clause paragraph.
[0125] The following is a schematic of a contract text to be analyzed:
[0126] Party A: ________
[0127] Party B: ________
[0128] Article 1, Product Specifications, Quantity and Amount
[0129] Article 2, Delivery Time and Place
[0130] 2.1, Delivery Time
[0131] 2.2, Delivery Place
[0132] Article 3, Payment Method
[0133] 3.1. Party A shall pay a sum of 1 million RMB within 30 days after signing the contract.
[0134] 3.2. The remaining amount of [fill in the percentage]% shall be paid in full within [fill in the number of days] days after the goods are inspected and accepted.
[0135] Article 4, Acceptance Criteria
[0136] Article 5, Liability for Breach of Contract
[0137] Article 6, Dispute Resolution
[0138] Article 7, Other Supplementary Matters
[0139] Optionally, if there are no titles and the hierarchical relationship between each title in the contract text to be analyzed, the continuous paragraphs can be split according to the symbol information in the continuous text to obtain each clause paragraph. For example, for small clauses, a language processing model can be used to split the paragraphs according to symbol information such as line breaks and full stops in the continuous paragraphs.
[0140] Optionally, for special clauses, such as additional clauses and supplementary agreements, the paragraphs can be split according to keywords.
[0141] Figure 4 This is a schematic flowchart of the fourth method for constructing a contract relationship graph provided by an embodiment of the present application. As Figure 4 shown, in the above S302, classifying the clause paragraphs and the sentences in each clause paragraph to obtain the types of each clause paragraph and the types of each sentence may include:
[0142] S401. Classify the clause paragraphs according to the keywords in the clause paragraphs, the titles to which the clause paragraphs belong, and the clause numbers to obtain the types of the clause paragraphs.
[0143] Exemplarily, if key elements such as "payment terms", "payment conditions", and "fund flow" exist in a clause paragraph, it can be determined that the clause paragraph belongs to the "payment terms" type of paragraph; if key elements such as "delivery time", "delivery location", and "delivery standard" exist in a clause paragraph, it can be determined that the clause paragraph belongs to the "delivery terms" type of paragraph.
[0144] Optionally, a deep learning model can also be used to parse the context of the contract text to be analyzed to determine the type of the clause paragraph.
[0145] S402. Classify each sentence according to the key elements of each sentence in the clause paragraph to obtain the types of each sentence.
[0146] Specifically, the key elements in each sentence in each clause paragraph can be analyzed first. For example, in a payment terms paragraph, information related to "total amount", "payment time", "quality assurance deposit", etc. can be identified. Through natural language processing (NLP) technology, each sentence can be accurately classified into a specific category. For example, the sentence "Party A shall pay a sum of 1 million RMB within 30 days after signing the contract" is classified as "payment - total amount" and "payment - payment time".
[0147] Figure 5 This is a schematic flowchart of the fifth method for constructing a contract relationship graph provided by an embodiment of the present application. As Figure 5 shown, S302. Classify the clause paragraphs and the sentences in each clause paragraph to obtain the types of each clause paragraph and the types of each sentence, which may include:
[0148] S501. Perform named entity recognition on the clause paragraphs and extract at least one entity from the clause paragraphs.
[0149] Optionally, through named entity recognition, key information such as additional contract names, sub - contract names, subject names in the contract, various transaction amount types and amounts, account information, payment time, signing date, signing location, etc. can be extracted from each clause paragraph in the contract text to be analyzed.
[0150] For example, the UIE model of Baidu PaddlePaddle can be used. This is a general entity extraction model based on deep learning that can identify multiple entities in a contract. The UIE model combines the latest natural language processing technologies and can efficiently and accurately extract named entities from contracts. By training on a large amount of annotated contract data, the UIE model can learn to distinguish various entities in the contract and continuously optimize the recognition accuracy. During the training process, an annotated entity dataset can be used, and the model performance can be improved through multiple rounds of evaluation.
[0151] S502. Extract triples for each clause paragraph to obtain the association relationships between entities in each clause paragraph.
[0152] Optionally, SPO triple extraction refers to the process of extracting the subject, predicate, and object from the text, and these elements together form a triple. Triples are the basic building blocks of a knowledge graph and are used to represent the relationships between entities.
[0153] The UIE model can not only identify entities in the contract, but also identify the relationships between different entities, and convert the identified entities into SPO triples. The UIE model can understand the actions and events in the contract through context information, thereby extracting triples. For example, in the sentence "Party A shall pay a sum of 1 million RMB within 30 days after signing the contract", the triple is "Party A - shall pay within 30 days after signing the contract - a sum of 1 million RMB".
[0154] Figure 6 It is a schematic flowchart of the sixth method for constructing a contract relationship graph provided by an embodiment of the present application. As Figure 6 shown, in the above S102, according to the attribute information, entities, and triple information of each clause paragraph, determining at least one node corresponding to the contract text to be analyzed and the association relationships between the nodes may include:
[0155] S601. Determine other contract identifiers except the identifier of the contract text to be analyzed and the association relationships between other contracts and the contract text to be analyzed from the entities, and determine contract nodes according to the contract identifiers and the association relationships between other contracts and the contract text to be analyzed.
[0156] Exemplarily, if there are other contract identifiers and other contract attachments in the clause paragraph, determine the association relationship between the other contract and the contract text to be analyzed. The association relationship may include, for example, the relationship of an additional contract, the parent-child contract association relationship.
[0157] Specifically, the identifier of the contract text to be analyzed can be used as the identifier of the central contract node, and the attribute information of the contract text to be analyzed can be used as the attribute information of the central contract node; other contracts that have an additional contract relationship with the contract to be analyzed are used as additional contract nodes, and other contracts that have a parent-child contract relationship with the contract text to be analyzed are used as sub-contract nodes.
[0158] Among them, the additional contract association relationship can refer to the relationship between the contract text to be analyzed and the other contract as the main contract and the additional contract. Among them, the main contract is the contract text to be analyzed. For example, if the contract to be analyzed is the "Software Building Facade Renovation Construction Contract", the other additional contract is the "International Cement Market Price Fluctuation Change Contract"; the parent-child contract refers to the relationship between the other contract and the contract text to be analyzed as the parent contract and the sub-contract. Among them, the parent contract is the contract text to be analyzed. For example, the sub-contracts are the "Engineering Team Employment Labor Contract", the "Suspension Bridge Equipment Lease Contract", etc.
[0159] S602. Determine the contract clause node corresponding to the clause paragraph according to the clause type in the attribute information of the clause paragraph.
[0160] For example, if the clause type of the clause paragraph is a payment clause, the contract clause node corresponding to the clause paragraph is a payment clause node; if the clause type of the clause paragraph is a delivery clause, the contract clause node corresponding to the clause paragraph is a delivery clause node; if the clause type of the clause paragraph is a confidentiality clause, the contract clause node corresponding to the clause paragraph is a confidentiality clause node.
[0161] S603. Determine the subject node, element node, event node, risk node corresponding to the clause paragraph, the association relationship between each subject node, the association relationship between each element node and the clause node, the association between each event node and the clause node, and the association relationship between each risk node and the clause node according to the contract clause node, each entity in the clause paragraph, and the triple information.
[0162] Exemplarily, for the sentence “Party A shall pay a sum of 1 million RMB within 30 days after signing the contract” in the foregoing, this sentence is within the payment terms paragraph. The elements in this sentence include “Payment - 1 million” and “Payment - within 30 days”. Then, “Payment - 1 million” and “Payment - within 30 days” can be used as the element nodes under this payment terms node respectively. The subject node is “Party A”, the event node can be the payment event, such as “pay a sum of 1 million RMB”. The risk node refers to the potential risks in the contract text to be analyzed, such as default risk, delay risk, etc. The association relationship between each subject, for example, is the relationship between Party A and Party B. The association relationship between each element node and the terms node, for example, “Payment - 1 million” belongs to the node under the payment terms node. The relationship between each event node and the terms node means that the payment event is triggered based on the payment terms.
[0163] In S603 above, based on the contract terms node, each entity in the terms paragraph, and the triple information, determining the subject node, element node, event node, risk node corresponding to the terms paragraph, the association relationship between each subject node, the association relationship between each element node and the terms node, the association between each event node and the terms node, and the association relationship between each risk node and the terms node, may include:
[0164] Optionally, traverse each entity in each terms paragraph to find the contract element nodes other than the terms node and the contract node. For example, find other entities except those containing the contract identifier, such as entities like subject, time, place, amount, etc. The entities found can be used as the contract element nodes.
[0165] Optionally, traverse each triple information. For the traversed triple information, the contract event node and the contract risk node can be determined according to the subject, predicate, and object in the triple, and the association relationship between each subject node in the contract, the association relationship between each contract event node and the contract terms node, the association relationship between each contract risk node and the contract terms, and the association relationship between each contract element node and the contract terms node can be determined.
[0166] Optionally, in S103 above, based on the association relationship between each node, constructing a knowledge graph corresponding to the contract text to be analyzed, and updating the knowledge graph according to the change information of the contract to be analyzed, may include:
[0167] Specifically, edges between nodes can be created based on the association relationships between the nodes, and then the nodes can be connected based on the edges between the nodes to obtain a knowledge graph. For example, if the subject nodes are Party A and Party B, an edge between Party A and Party B can be created based on Party A and Party B. Specifically, the association relationship between Party A and Party B can be used as the attribute information of the edge. For example, if the relationship between Party A and Party B is a signing relationship, the attribute information of this edge is a signing relationship edge, and then Party A and Party B are connected based on this signing relationship edge.
[0168] Table 1 below shows each node and the information of each node determined by the method provided in the embodiment of the present application.
[0169]
[0170]
[0171]
[0172] Table 1 below shows each node and the information of the edges between each node determined by the method provided in the embodiment of the present application.
[0173]
[0174]
[0175]
[0176] In this embodiment, a comprehensive model of contract terms, contract subjects, and the relationships between contracts is established through a graph model to achieve dynamic management of contracts. In the prior art, clause extraction and data storage are often separated, and the clause information and their mutual relationships cannot be integrated through a knowledge graph, lacking a comprehensive understanding of the relationships and execution statuses between contracts.
[0177] Optionally, after constructing the contract knowledge graph, intelligent analysis and deduction can be performed through the nodes, edges, and edge attributes in the graph to achieve functions such as prediction, risk assessment, performance analysis, and decision support in the contract management process. Using reasoning technology, not only can contract data be understood, but also reasonable inferences can be made based on the data in the knowledge graph to provide intelligent decision support and risk warning for enterprises. Specifically, based on the information stored in the contract knowledge graph, potential contract performance risks, potential default points, payment overdue warnings, contract clause execution situations, etc. existing in the contract text to be analyzed can be obtained through reasoning and analysis. These reasoning processes can rely on technologies such as semantic analysis, rule engines, and reasoning algorithms.
[0178] Optionally, reasoning can be performed based on rules. Specifically, through a rule engine (such as Drools, Jess, etc.), reasoning can be performed based on the data in the contract graph. Conditions and constraints (such as payment time, amount limit, performance status, etc.) can be extracted from the contract clause nodes, and then the rule engine is used to automatically reason and evaluate based on the extracted condition and constraint information, generating reasoning results, such as identifying default risks, payment overdue warnings, etc.
[0179] For example: If the payment amount exceeds 1 million yuan and the payment time has exceeded 30 days, a payment overdue alarm is generated. If the delivery time stipulated in the contract clause has arrived but the delivery location has not been confirmed, a delivery overdue alarm is generated.
[0180] Optionally, semantic reasoning can be performed. Through semantic analysis of the contract clauses and contract elements, inferences can be made based on the relationship between the contract clauses and contract elements. Semantic reasoning uses natural language processing technologies (such as models like BERT, GPT, etc.) to understand the semantic content in the contract text.
[0181] Optionally, relationship reasoning can be performed. Using the node attribute information and edge attribute information in the knowledge graph, the relationships between different contract clauses, events, or contracts are reasoned. For example, by reasoning about the events generated during the contract execution process, the results of contract performance, possible risk points, and the best performance path are predicted. Graph reasoning algorithms (such as SPARQL, RDF inference engine) can also be used to query the nodes and edges in the graph to reason about the dependency relationships between contract clauses. Semantic reasoning technologies (such as deep learning-based models) are used to understand the true meaning of the contract clauses and speculate on contract performance.
[0182] For example: If there is a time dependency between the payment clause and the delivery clause in the contract (payment must precede delivery), it can be determined that payment overdue will result in delivery overdue. If the performance status of a certain contract is "default", it can be automatically identified whether all contracts related to this contract (such as supplementary contracts, parent-child contracts, etc.) are also affected.
[0183] Optionally, temporal reasoning can be performed based on the time information involved in the contract clauses to reason about the progress of contract performance, performance plans, time nodes of performance, etc. Through the contract event nodes and contract element nodes in the knowledge graph, combined with time information, dynamic reasoning is carried out. Temporal reasoning can help enterprises understand the progress of contract execution and predict the future performance status.
[0184] Specifically, based on time graph technology, the time nodes in the contract (such as payment date, delivery date, etc.) are associated with events (such as payment, delivery). The future performance situation is deduced, for example, predicting whether the delivery can be completed on time after the contract expires and whether there will be a default, etc.
[0185] For example: If the payment time stipulated in the payment terms has arrived, but the payment amount has not been paid, the inference system generates a default risk and reminds the management to take actions. If the delivery date stipulated in the delivery terms of the contract has arrived, but the delivery location has not been confirmed, the inference system speculates that the delivery may be postponed and provides solutions.
[0186] Optionally, based on graph-based reasoning, by combining the nodes and edges in the graph, the logical relationships and performance status in contract execution are inferred. Graph-based reasoning can help enterprises quickly identify the dependencies and impacts between contracts, and conduct intelligent risk assessment and performance analysis.
[0187] Specifically, a graph query language (such as SPARQL) or a graph reasoning algorithm (such as an inference engine) can be used to query and reason about the contract graph.
[0188] For example: If there is a parent-child relationship between Contract A and Contract B, and Contract A has been fully performed while Contract B has not been performed yet, the inference system will speculate that Contract B may face the risk of performance delay. If the contract terms stipulate that Party A should make a payment, but the payment time is not specified in the payment terms, the inference system will speculate that Party A may have the risk of payment delay and remind the management to confirm the payment time as early as possible.
[0189] In this embodiment, through the graph reasoning technology, the contract performance status is analyzed in real time, helping enterprises to realize functions such as risk warning, performance progress tracking, and path optimization in the contract performance process. In contrast, the existing contract management systems mainly rely on static databases and lack the ability to track the contract execution status in real time and perform intelligent reasoning. It can perform intelligent reasoning and analysis based on information such as contract terms, performance status, and payment situation, identify potential risks, and provide suggestions for optimizing the performance path for the management. The existing technologies usually do not provide in-depth reasoning and analysis, and lack intelligent risk identification and decision-making support capabilities, so enterprises cannot effectively foresee potential problems in contract execution.
[0190] This application can improve the efficiency of contract data processing: By means of the structured extraction of contract texts and the construction of an intelligent contract knowledge graph, the degree of automation of contract management is greatly enhanced. Key information in contracts (such as amounts, payment times, delivery terms, etc.) can be automatically extracted in an intelligent manner, reducing manual intervention and improving processing efficiency. Optimize contract performance management: Through knowledge reasoning based on contract relationships, enterprises can monitor the performance progress of contracts in real time, timely discover potential default risks and performance bottlenecks, and avoid financial losses or legal disputes caused by performance issues. Intelligent risk warning and decision support: Through the dynamically updated knowledge graph and reasoning analysis functions, enterprises can achieve intelligent warning and decision support during the contract performance process. For example, risks such as overdue payments and delivery delays can be automatically identified, and warning notifications and optimization suggestions can be provided in a timely manner.
[0191] Figure 7 Schematic diagram of a device for a method of constructing a contract relationship graph provided by an embodiment of this application, as Figure 7 shown, the device includes:
[0192] An analysis module 701, configured to perform semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, obtain the attribute information of each clause paragraph in the contract text to be analyzed, as well as each entity and each triple information in each clause paragraph, where the triple information is used to indicate the association relationship between entities, and the entities include contract parties and / or contract elements;
[0193] A determination module 702, configured to determine at least one node corresponding to the contract text to be analyzed and the association relationship between each node according to the attribute information of each clause paragraph, each entity, and the triple information, where the at least one node includes: a contract node, a contract party node in the contract, a contract clause node, a contract element node, a contract event node, and a contract risk node;
[0194] A construction module 703, configured to construct a knowledge graph corresponding to the contract text to be analyzed based on each node and the association relationship between each node, and update the knowledge graph according to the change information of the contract text to be analyzed.
[0195] Optionally, the analysis module 701 is specifically configured to:
[0196] If the contract text to be analyzed is a contract image, preprocess the contract image to obtain a preprocessed contract image;
[0197] Perform text recognition on the preprocessed contract image to obtain the contract text;
[0198] Perform typesetting processing on the contract text to obtain a structured contract text, where the structured contract text has the same typesetting structure as that in the contract image;
[0199] Modify the structured contract text to obtain the contract text to be analyzed.
[0200] Optionally, the analysis module 701 is specifically configured to:
[0201] Perform semantic segmentation on the contract text to be analyzed to obtain each clause paragraph, where the clause includes a main clause and a sub-clause;
[0202] Classify each clause paragraph and each sentence in each clause paragraph to obtain the type of each clause paragraph and each sentence type;
[0203] Perform entity recognition on each clause paragraph and recognition of the association relationship between entities to obtain each entity and triple information in each clause paragraph.
[0204] Optionally, the analysis module 701 is specifically configured to:
[0205] If there are titles and the hierarchical relationship of each title in the contract text to be analyzed, perform segmentation processing on the contract text to be analyzed according to each title and the hierarchical relationship of each title to obtain each clause paragraph;
[0206] If there are no titles and the hierarchical relationship of each title in the contract text to be analyzed, segment the continuous paragraph according to the symbol information in the continuous text to obtain each clause paragraph.
[0207] Optionally, the analysis module 701 is specifically configured to:
[0208] Classify the clause paragraph according to the keyword in the clause paragraph, the title to which the clause paragraph belongs, and the clause number to obtain the type of the clause paragraph;
[0209] Classify each sentence according to the key elements in each sentence in the clause paragraph to obtain the type of each sentence.
[0210] Optionally, the analysis module 701 is specifically configured to:
[0211] Perform named entity recognition on the clause paragraph and extract at least one entity in the clause paragraph;
[0212] Perform triple extraction on each clause paragraph to obtain the association relationship between entities in each clause paragraph.
[0213] Optionally, the determination module 702 is specifically configured to:
[0214] Determine other contract identifiers except the identifier of the contract text to be analyzed from each entity, and the association relationship between the other contract and the contract text to be analyzed, and determine contract nodes according to the contract identifier and the association relationship between the other contract and the contract text to be analyzed;
[0215] Determine the contract clause node corresponding to the clause paragraph according to the clause type in the attribute information of the clause paragraph;
[0216] According to the contract clause node, each entity in the clause paragraph, and the triple information, determine the subject node, the contract element node, the contract event node, the contract risk node, the association relationship between each contract subject node, the association relationship between each contract element node and the contract clause node, the association between each contract event node and the contract clause node, and the association relationship between each contract risk node and the contract clause node in the contract corresponding to the clause paragraph.
[0217] Optionally, the determining module 702 is specifically configured to:
[0218] Traverse each entity in the clause paragraph to find all contract element nodes except the clause node and the contract node;
[0219] Traverse each triple information, and for the currently traversed triple information, determine the association relationship between the contract event node, the contract risk node, and each contract subject node, the association relationship between each contract event node and the contract clause node, the association relationship between each contract risk node and the contract clause, and the association relationship between each contract element node and the contract clause node.
[0220] Optionally, the constructing module 703 is specifically configured to:
[0221] Create edges between each node according to the association relationship between each node;
[0222] Connect each node based on the edges between each node to obtain the knowledge graph.
[0223] Figure 8 It is a structural block diagram of an electronic device 900 provided by an embodiment of the present application. This electronic device can be, for example, the contract relationship graph construction described in the foregoing embodiment. As shown in FIG. 9, the electronic device may include: a processor 901 and a memory 902.
[0224] Optionally, a bus 903 may also be included. The memory 902 is used to store machine-readable instructions executable by the processor 901. When the electronic device 900 runs, the processor 901 communicates with the memory 902 via the bus 903. When the machine-readable instructions are executed by the processor 901, the method steps in the above method embodiments are executed.
[0225] An embodiment of the present application also provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the method steps in the above method embodiment for constructing a contract relationship graph are executed.
[0226] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the method embodiments, and will not be described in detail in this application. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces, and the indirect coupling or communication connection of the devices or modules may be in an electrical, mechanical, or other form.
[0227] In addition, in each embodiment of the present application, each functional unit may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0228] The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application.
Claims
1. A method for constructing a contract relationship graph, characterized in that: The method comprises: Perform semantic segmentation, clause classification, and element extraction on the contract text to be analyzed, and obtain attribute information of each clause paragraph in the contract to be analyzed, and each entity and each triplet information in each clause paragraph, wherein the triplet information is used to indicate the association relationship between each entity, and the entity includes a contract subject and / or a contract element; According to the attribute information of each clause paragraph, each entity and the triple information, at least one node corresponding to the contract text to be analyzed and the association relationship between the nodes are determined, wherein the at least one node includes: a contract node, a subject node in the contract, a contract clause node, a contract element node, a contract event node and a contract risk node; Based on each node and the relationship between each node, a knowledge graph corresponding to the contract text to be analyzed is constructed, and the knowledge graph is updated according to the change information of the contract to be analyzed.
2. The method for constructing a contract relationship map according to claim 1, characterized in that: Before the semantic segmentation, clause classification and element extraction of the contract text to be analyzed, the following steps are also included: If the contract to be analyzed is a contract image, preprocessing the contract image to obtain a preprocessed contract image; Performing text recognition on the preprocessed contract image to obtain the contract text; Performing typeset processing on the contract text to obtain a structured contract text, wherein the structured contract text has the same typeset structure as that in the contract image; The structured contract text is modified to obtain the contract text to be analyzed.
3. The method for constructing a contract relationship map according to claim 1, characterized in that: The semantic segmentation, clause classification and element extraction of the contract text to be analyzed are performed to obtain at least one clause attribute information in the contract to be analyzed and each entity and triple information in each clause paragraph, including: Performing semantic segmentation on the contract text to be analyzed to obtain clause paragraphs, wherein the clauses include main clauses and sub-clauses; Classify each clause paragraph and the sentences in each clause paragraph to obtain the type of each clause paragraph and the type of each sentence; Entity recognition is performed on each of the clause paragraphs and the association relationship between the entities is identified to obtain the entity and triple information in each clause paragraph.
4. The method for constructing a contract relationship map according to claim 3, characterized in that: The semantic segmentation of the contract text to be analyzed is performed to obtain each clause paragraph, including: If there are titles and hierarchical relationships among titles in the contract text to be analyzed, the contract text to be analyzed is segmented according to the titles and the hierarchical relationships among titles to obtain clause paragraphs; If there are no titles and hierarchical relationships between titles in the contract text to be analyzed, the continuous paragraphs are segmented according to the symbol information in the continuous text to obtain the clause paragraphs.
5. The method for constructing a contract relationship map according to claim 3, characterized in that: The classification process of each clause paragraph and the sentences in each clause paragraph to obtain the type of each clause paragraph and the type of each sentence includes: Classify the clause paragraphs according to the keywords in the clause paragraphs, the titles to which the clause paragraphs belong, and the clause numbers, and obtain the types of the clause paragraphs; Each sentence in the clause paragraph is classified according to key elements in the sentence to obtain the type of each sentence.
6. The method for constructing a contract relationship map according to claim 3, characterized in that: The entity recognition and the relationship recognition between the entities are performed on each clause paragraph to obtain the entity and triple information in each clause paragraph, including: Performing named entity recognition on the clause paragraph to extract at least one entity in the clause paragraph; Triples are extracted from each of the clause paragraphs to obtain the association relationship between entities in each clause paragraph.
7. The method for constructing a contract relationship map according to claim 1, characterized in that: The determining, according to the attribute information of each clause paragraph, each entity and the triple information, at least one node corresponding to the contract text to be analyzed and the association relationship between the nodes includes: Determine, from each entity, other contract identifiers other than the identifier of the contract text to be analyzed and the association relationship between the other contracts and the contract text to be analyzed, and determine the contract node according to the contract identifiers and the association relationship between the other contracts and the contract text to be analyzed; Determining the contract clause node corresponding to the clause paragraph according to the clause type in the attribute information of the clause paragraph; According to the contract clause node, the entities in the clause paragraph and the triple information, determine the main node in the contract corresponding to the clause paragraph, the contract element node, the contract event node, the contract risk node, the association relationship between each contract main node, the association relationship between each contract element node and the contract clause node, the association between each contract event node and the contract clause node, and the association relationship between each contract risk node and the contract clause node.
8. The method for constructing a contract relationship map according to claim 7, characterized in that: The determining, according to the contract clause node, each entity in the clause paragraph and the triple information, the subject node in the contract corresponding to the clause paragraph, the contract element node, the contract event node, the contract risk node, the association relationship between the subject nodes in each contract, the association relationship between each contract element node and the contract clause node, the association between each contract event node and the contract clause node, and the association relationship between each contract risk node and the contract clause node, includes: Traverse each entity in the clause paragraph to find all the contract element nodes except the clause node and the contract node; Traverse each triple information, and for the current triple information traversed, determine the contract event node, the contract risk node, the relationship between the subject nodes in each contract, the relationship between each contract event node and the contract clause node, the relationship between each contract risk node and the contract clause, and the relationship between each contract element node and the contract clause node.
9. The method for constructing a contract relationship map according to claim 7, characterized in that: The step of constructing a knowledge graph corresponding to the contract to be analyzed based on the nodes and the associations between the nodes includes: Create edges between nodes based on the association between nodes; The nodes are connected based on the edges between the nodes to obtain the knowledge graph.
10. An electronic device, characterized in that: It includes a memory and a processor, the memory stores a computer program executable by the processor, and the processor implements the steps of the method for constructing a contract relationship map as described in any one of claims 1 to 9 when executing the computer program.
Citation Information
Cited By
Contract text key payment index extraction method based on natural language processing
CN120523929A
Contract risk early warning method, device and equipment based on knowledge graph
CN120563280A
FIDIC contract risk identification method and system
CN120746778A
Method and device for generating contract knowledge graph
CN121119095A
Method and device for generating a contract knowledge graph
CN121119095B