A Modeling Method for Contract Event Dependence Relationships Based on Directed Acyclic Graphs

Through the contract event dependency modeling method based on directed acyclic graph, the traditional contract performance management is solved, and the problem of low efficiency and inability to respond to changes in external events in real time is realized, and the contract performance is automated and intelligent, and efficiency and flexibility are improved.

CN120047115BActive Publication Date: 2025-07-01DJL (SHANGHAI) NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510526068.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-07-01
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

Traditional contract performance management relies on manual interpretation and execution, and there are problems such as inefficient, error-prone and inability to respond to changes in external events in real time.

Method used

The contract event dependency modeling method based on directed acyclic graph is adopted. Contract events are extracted through the hybrid analysis engine, event dependencies are analyzed and directed acyclic graph is constructed, event planning time is generated, dynamic event changes are monitored in real time, and local rescheduling is performed.

Benefits of technology

The contract performance process is automated and intelligent, reducing the risk of human omissions, reducing the cost of manually tracking event nodes, and improving the efficiency and flexibility of contract performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047115B_ABST
    Figure CN120047115B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for modeling contract event dependency relationships based on directed acyclic graphs. In this method, on the basis of understanding the contract semantics, contract events are extracted and the dependency relationships between the events are analyzed to construct a contract event dependency relationship model based on directed acyclic graphs. By collaborating with external systems, the triggering and execution of contract events are driven, realizing the automation and intelligence of the contract performance process. Compared with the traditional practice that relies on manual interpretation of contracts and collaborative contract performance, it can effectively reduce the risk of human omission, reduce the cost of manually tracking event nodes, and improve the efficiency of contract performance. Further, the method also includes a local rescheduling process of the model. During the contract performance process, dynamic event changes are monitored in real time, and the affected events are rescheduled according to the dynamic event changes, further improving the flexibility and risk resistance of contract performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart contracts, and particularly to a method for modeling contract event dependency relationships based on a directed acyclic graph. Background Art

[0002] Traditional contract performance management relies on manual interpretation and execution, suffering from problems such as low efficiency, high error rates, and the inability to respond in real time to external event changes.

[0003] With the development of technology, smart contracts are being applied more and more widely. In addition to contract signing, the intelligentization of the contract performance process is also an important aspect of smart contract technology.

[0004] The intelligentization of the contract performance process requires extracting events in the contract based on contract semantics, analyzing the dependency relationships between contract events, constructing a dependency relationship model for contract events, and driving the triggering and execution of contract events based on this model.

[0005] In addition, during the performance of a contract, the internal and external states of the contract often change. For example, there may be situations such as delays in contract event execution, contract clause modifications, and changes in external states. The intelligentization of the contract performance process also needs to respond in a timely manner according to dynamic event changes and adjust the scheduling plan of contract events. Summary of the Invention

[0006] In view of the above problems, the present invention provides a method for modeling contract event dependency relationships based on a directed acyclic graph, and the technical solution is as follows.

[0007] A method for modeling contract event dependency relationships based on a directed acyclic graph, the steps are as follows:

[0008] S1. Process the contract through a hybrid parsing engine to extract the set of events in the contract. The contract events include conditional events and action events.

[0009] S2. Analyze the dependency relationships between contract events according to the semantic logic of the contract, and construct a directed acyclic graph of event dependency relationships. The nodes of the graph represent contract events, and the edges of the graph are weighted directed edges. The directed edges point from the pre-event to the post-event, indicating the dependency relationship between events. The dependency relationships are divided into strong dependency relationships and weak dependency relationships; the edge weights of the directed edges are used to represent the time constraints between the pre-event and the post-event.

[0010] S3. Generate the planned time for each event according to the event dependency relationships and time constraints. The planned time of the event, for a conditional event, is the planned condition achievement time, and for an action event, is the start time of the planned action execution.

[0011] S4. Monitor dynamic event changes during contract execution, including event delays, clause amendments, and external system status updates.

[0012] S5. Locate the scope of affected sub-graphs based on dynamic event changes.

[0013] S6. Perform local re-scheduling on the affected sub-graphs. On the premise of meeting the contract deadline and time constraints, recalculate the planned time of nodes or update the dependency relationships of nodes to generate an adjusted contract event dependency relationship model.

[0014] S7. Output the updated contract event dependency relationship model to the contract management system to drive the triggering and execution of events.

[0015] The hybrid parsing engine includes a rule engine and a natural language processing engine. The rule engine extracts events in structured contract clauses through regular expressions and keyword matching; the natural language processing engine identifies conditional logic and fuzzy time expressions in unstructured semantics based on a pre-trained language model in the legal field and extracts corresponding events.

[0016] The strong dependency relationship between contract events means that subsequent events can only be executed after the preceding events are completed; the weak dependency relationship between contract events means that subsequent events can be executed in parallel with preceding events, but the execution results of the events ultimately need to be synchronized.

[0017] The time constraints between the preceding events and subsequent events include the earliest time constraint and the latest time constraint. The earliest time constraint is the time interval when subsequent events can start executing at the earliest after the preceding events are completed, which determines the earliest planned time of subsequent events; the latest time constraint is the time interval when subsequent events need to be completed at the latest after the preceding events are completed, which determines the latest completion time of subsequent events. There can be no time constraint between the preceding events and subsequent events, indicating that no mandatory agreement is made on the planned time of subsequent events separately.

[0018] Beneficial effects: Based on the semantic understanding of contract content, the present invention extracts relevant events during contract execution, models the dependency relationships between contract events based on a directed acyclic graph, and realizes the automation and intelligence of contract execution through cooperation with external systems. Compared with the traditional method that relies on manual interpretation of contracts and collaborative contract execution, it can effectively reduce the risk of human omission, reduce the cost of manual tracking of event nodes, and improve the efficiency of contract execution. Further, during contract execution, dynamic event changes are monitored in real time, and the affected events are re-scheduled according to the dynamic event changes, further improving the flexibility and risk resistance of contract execution. Description of the Drawings

[0019] Figure 1 This is the step flowchart of the method for modeling the contract event dependency relationship of the present invention.

[0020] Figure 2 This is the directed acyclic graph of the contract event dependency relationship generated by the embodiment of the present invention. Detailed implementation manners

[0021] The present invention will be further described in detail below in conjunction with the specific implementation manners and the legends.

[0022] As Figure 1 shown, a method for modeling the contract event dependency relationship based on a directed acyclic graph includes the following steps:

[0023] S1. Process the contract through a hybrid parsing engine to extract the event set in the contract. The contract events include conditional events and action events.

[0024] For example, "pass the acceptance" is a conditional event, and "pay the goods payment" is an action event.

[0025] The hybrid parsing engine includes a rule engine and a natural language processing engine. The rule engine extracts events in the structured contract terms through regular expressions and keyword matching, such as payment events; the natural language processing engine, in the actual implementation process, can identify the conditional logic or fuzzy time expressions in the unstructured semantics based on the Legal-BERT model and extract the corresponding events.

[0026] S2. Analyze the dependency relationship between the contract events according to the semantic logic of the contract, and construct a directed acyclic graph of the event dependency relationship, where the nodes of the graph represent the contract events, and the edges of the graph are weighted directed edges. The directed edges point from the pre-event to the post-event, indicating the dependency relationship between the events. The dependency relationship is divided into a strong dependency relationship and a weak dependency relationship; the edge weight of the directed edge is used to represent the time constraint between the pre-event and the post-event.

[0027] The strong dependency relationship between the contract events means that the post-event must be executed after the pre-event is completed; the weak dependency relationship between the contract events means that the post-event can be executed in parallel with the pre-event, but the execution results of the events need to be synchronized finally.

[0028] For example, the contract clause "After 50% of the module development is completed, Party B can start writing test cases, and the test execution needs to be started after all development tasks and test case writing are completed" includes three events: "module development", "writing test cases", and "test execution". Among them, the "module development" and "writing test cases" are in a weak dependency relationship, and the "test execution" and the "module development" and "writing test cases" are in a strong dependency relationship.

[0029] The time constraint between the foregoing event and the subsequent event includes the earliest time constraint and the latest time constraint. The earliest time constraint is the time interval when the subsequent event can start to be executed at the earliest after the completion of the foregoing event, which determines the earliest planned time of the subsequent event; the latest time constraint is the time interval when the subsequent event needs to be completed at the latest after the completion of the foregoing event, which determines the latest completion time of the subsequent event. There may be no time constraint between the foregoing event and the subsequent event, indicating that no mandatory agreement is made on the planned time of the subsequent event alone.

[0030] In the contract clause "Party B shall complete the installation within 30 to 50 days after Party A makes the payment", the time constraint between the event of "Party A makes the payment" and the event of "Party B completes the installation" includes the earliest time constraint and the latest time constraint, where the earliest time constraint is 30 days and the latest time constraint is 50 days.

[0031] S3. Generate the planned time for each event according to the dependency relationship and time constraint of the events. For a conditional event, the planned time is the time when the planned condition is met; for an action event, the planned time is the start time of the planned action execution.

[0032] S4. Monitor the dynamic event changes during the performance of the contract, including event delays, clause revisions, and external system status updates.

[0033] S5. Locate the affected sub - graph scope according to the dynamic event changes.

[0034] S6. Perform local re - scheduling on the affected sub - graph. On the premise of meeting the contract deadline and time constraint, recalculate the planned time of the nodes or update the dependency relationship of the nodes to generate an adjusted contract event dependency relationship model.

[0035] S7. Output the updated contract event dependency relationship model to the contract management system to drive the triggering and execution of the events.

[0036] Now, take an actual example to illustrate the specific execution process of the method.

[0037] An enterprise (Party A) entrusts a technology company (Party B) to develop an intelligent hardware device, and the contract terms include the following content.

[0038] Advance payment: Pay 20% of the amount within 5 days after signing the contract.

[0039] Prototype development: Party B needs to complete the prototype development within 60 days after receiving the advance payment, and Party A shall complete the preliminary review within 10 days after the prototype development is completed.

[0040] Stage payment: Pay 30% of the amount after the preliminary review is passed.

[0041] Prototype Modification: If the initial review is not passed, Party B shall complete the modification and resubmit it within 20 days, and Party A shall conduct a review within 5 days.

[0042] Mass Production and Delivery: Party B shall complete mass production within 90 days after the prototype passes and deliver 1,000 sets of equipment.

[0043] Acceptance and Payment: Within 30 days after mass production and delivery, Party A shall complete the product acceptance. After passing the acceptance, Party A shall pay the remaining 50% of the payment.

[0044] Intellectual Property Transfer: Within 10 days after passing the acceptance, Party B shall transfer all source codes and documents.

[0045] Liability for Breach of Contract: If Party B's delivery is delayed by more than 30 days, Party A has the right to terminate the contract and claim a compensation of 10% of the contract amount.

[0046] Regarding this commissioned development contract, the event dependency relationship modeling method based on directed acyclic graph provided by the present invention is used for processing.

[0047] First, parse the contract through a hybrid engine, which includes a rule engine and a natural language processing engine.

[0048] For the relevant events involving installment payments in the contract, they can be extracted through regular expressions.

[0049] For the nested clauses in the contract such as "If the initial review is not passed, Party B shall complete the modification and resubmit it within 20 days" and for the fuzzy date clauses in the contract such as "The delivery is delayed by more than 30 days", they can be understood and the relevant events can be extracted through the natural language processing model based on Legal-BERT.

[0050] Secondly, analyze the dependency relationship between events and construct a directed acyclic graph of the contract event dependency relationship.

[0051] As Figure 2 shown, a directed acyclic graph of the dependency relationship of the contract events corresponding to this implementation contract is given.

[0052] Each node in the graph gives the node ID, the content of the node event, and the type of the node event. For example, "A, Sign the contract | Action type" means that the event ID is A, the event content is "Sign the contract", and the event type is "Action event".

[0053] The directed edges in the graph give the direction of the directed edge, the association type, and the corresponding time constraint.

[0054] The extracted events and dependency relationships are shown in the following table:

[0055]

[0056] As shown in the table, a total of 17 contract events are extracted from the contract in this embodiment, including 12 action events and 5 conditional events.

[0057] The dependency relationships between events are mainly strong dependency relationships. For two events with a strong dependency relationship, the subsequent event can only proceed after the preceding event is completed. For example, the event "B pays 20% of the amount" can only proceed after "A signs the contract" is completed; the events "P transfers the code and documents" and "Q pays 50% of the amount" have a weak dependency relationship, that is, after the condition of the event "Q passes the acceptance" is met, these two events can be executed in parallel, but the performance of the contract will only end after both events are completed.

[0058] In terms of the time constraints of the directed edges, since the contract mainly stipulates the latest completion time of the events, such as "pay 20% of the amount within 5 days after signing the contract", the time constraints between events are mainly the latest time constraints, that is, the latest completion time of the subsequent event is after the completion of the preceding event days, where is the edge weight of the directed edge connecting the preceding event and the subsequent event; in this implementation contract, it is also stipulated that "if the delivery delay exceeds 30 days", then the liability for breach of contract is triggered. Therefore, the time constraint of the directed edge connecting the events "G pays 30% of the amount" and "L fails to deliver on schedule" is the earliest time constraint, and the edge weight is 120 days, that is, the 120th day after the completion of "G pays 30% of the amount" is the earliest time to meet the condition of the event "L fails to deliver on schedule".

[0059] According to the event dependency relationship model, the planned time of the events is generated, and the planned time of the event nodes is set according to the planned time of the preceding nodes and the edge weights of the directed edges: , where represents the planned time of the current time node, represents the planned time of the preceding event, is the edge weight of the directed edge connecting the preceding event and the current event. In this embodiment, the planned time of "A signs the contract" can be set to the 0th day of the contract performance, then the planned time of "B pays 20% of the amount" is the 5th day, and the planned time of "C submits the prototype" is the 65th day.

[0060] In the specific implementation process, tasks triggered by time can be set according to the planned time of the nodes. When the planned time arrives, it is judged whether the preceding action event of the node is executed or the preceding conditional event meets the conditions. If so, the node event is started.

[0061] If there is a delay in the execution of the node event, a contract change, or a change in the external state, then the local rescheduling process of the event dependency relationship model is triggered.

[0062] If Party B's delay in submitting the prototype due to technical problems is 15 days, that is, from the 65th day after the original planned contract signing to the 80th day, it is necessary to conduct incremental analysis of the impact on subsequent events. The process is as follows:

[0063] Traverse the nodes backward from the event node of "C submits the prototype" to obtain the affected subgraph. In this embodiment, the affected subgraph includes all nodes from event node D to node Q.

[0064] Recalculate the planned time for the node events in the affected subgraph. The calculation of the planned time needs to meet the contract deadline and time constraints. In actual implementation, a greedy algorithm or a genetic algorithm can be used to calculate the new planned time for the events in the affected subgraph.

[0065] In this embodiment, a greedy algorithm is used to calculate the new planned time for the events. Since the submission of "C prototype" is postponed by 15 days, from the original 65th day to the 80th day, the planned time for its subsequent node "D preliminary review" is postponed from the original 75th day to the 90th day. The time of "K mass production and delivery" after the preliminary review is passed is postponed from the 165th day to the 180th day, and the planned time of "N acceptance" is postponed to the 210th day, and so on.

[0066] In this embodiment, the deadline for "K mass production and delivery" stipulated in the contract is the 195th day after the contract signing. Otherwise, it will trigger liability for breach of contract. The updated planned time for "K mass production and delivery" is the 180th day, which meets the condition of the contract deadline. At the same time, in the above rescheduling process, the adjustment of the node planned time also meets the time constraints between nodes. Therefore, the contract event dependency relationship model updated using the greedy algorithm can be directly output to the contract management system to drive the triggering and execution of events.

[0067] If the deadline for "K mass production and delivery" stipulated in the contract is the 175th day after the contract signing, that is, a 10-day delay in mass production and delivery will trigger liability for breach of contract, then it is necessary to backtrack and readjust the planned time of some nodes. For example, advance the planned time of "D preliminary review time" to the 85th day and advance the time of "K mass production and delivery" to 170 days to meet the contract deadline by adjusting the planned time of the events.

[0068] It should be understood that the above specific embodiments of the present invention are only used for exemplary illustration or explanation of the principle of the present invention, and do not constitute a limitation to the present invention. Therefore, any modifications, equivalent replacements, improvements, etc. made without departing from the spirit and scope of the present invention shall be included within the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modification examples that fall within the scope and boundaries of the appended claims or equivalent forms of such scope and boundaries.

Claims

1. A contract event dependency modeling method based on directed acyclic graph, characterized in that: The following steps are included: Step 1: Process the contract through the hybrid parsing engine to extract the event set in the contract, where the contract event includes conditional events and action events; Step 2: According to the semantic logic of the contract, the dependency relationship between contract events is analyzed, and a directed acyclic graph of event dependency relationships is constructed, wherein the nodes of the graph represent contract events, and the edges of the graph are weighted directed edges, which point from the predecessor event to the subsequent event, representing the dependency relationship between events. The dependency relationship is divided into strong dependency relationship and weak dependency relationship; the edge weight of the directed edge is used to represent the time constraint between the predecessor event and the subsequent event; Step 3: Generate a planned time for each event based on the event dependencies and time constraints. For conditional events, the planned time for each event is the planned condition fulfillment time. For action-type events, it is the start time of the planned action execution; Step 4: Monitor dynamic event changes during contract performance, including event delays, clause revisions, and external system status updates; Step 5: Locate the affected sub-graph range according to the dynamic event change; Step 6: Perform local rescheduling on the affected subgraphs, recalculate the planned time of the nodes or update the dependencies of the nodes under the premise of meeting the contract deadline and time constraints, and generate an adjusted contract event dependency model; Step 7: Output the updated contract event dependency model to the contract management system to drive the triggering and execution of events.

2. A contract event dependency modeling method based on a directed acyclic graph as claimed in claim 1, characterized in that: The hybrid parsing engine in step 1 includes a rule engine and a natural language processing engine; the rule engine extracts events in structured contract terms through regular expressions and keyword matching; The natural language processing engine recognizes conditional logic and fuzzy time expressions in unstructured semantics based on a pre-trained language model in the legal field, and extracts corresponding events.

3. A contract event dependency modeling method based on a directed acyclic graph as claimed in claim 1, characterized in that: The strong dependency between the contract events in step 2 means that the subsequent event can only be executed after the predecessor event is completed; the weak dependency between the contract events in step 2 means that the subsequent event can be executed in parallel with the predecessor event, but the execution results of the events ultimately need to be synchronized.

4. A contract event dependency modeling method based on a directed acyclic graph as claimed in claim 1, characterized in that: The time constraint between the predecessor event and the subsequent event in step 2 includes an earliest time constraint and a latest time constraint. The earliest time constraint is the time interval at which the subsequent event can be started after the predecessor event is completed, which determines the earliest planned time of the subsequent event; the latest time constraint is the time interval at which the subsequent event needs to be completed at the latest after the predecessor event is completed, which determines the latest completion time of the subsequent event. There may be no time constraint between the predecessor event and the subsequent event, indicating that no mandatory agreement is made on the planned time of the subsequent event.

Citation Information

Patent Citations

  • User customization contract generation method based on risks and system

    CN106372798A

  • Contract fulfillment term automatic extraction method and system

    CN106815213A