A Coal Contract Generation System and Method Based on RETE Algorithm

By using a coal contract generation system based on the RETE algorithm, key fuel business data objects can be quickly identified, and a RETE network can be constructed for matching. This solves the problem of low efficiency in traditional methods, achieves efficient and accurate contract generation, and improves the efficiency and quality of contract management.

CN119226494BActive Publication Date: 2025-11-14华能曹妃甸港口有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411052976.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-01
Publication Date
2025-11-14
Estimated Expiration
2044-08-01

AI Technical Summary

Technical Problem

Traditional methods for generating coal contracts are inefficient and cannot meet the needs of generating complex contracts. Manual operation is prone to errors, while simple automated systems cannot meet the requirements for generating contracts quickly and accurately.

Method used

A coal contract generation system based on the RETE algorithm is adopted. By analyzing historical contracts, key fuel business data objects are quickly identified, a RETE network is constructed, and efficient management and application of rules are achieved. The system collects key business data objects required for generating target contracts and matches them through the RETE network to generate preliminary contract drafts.

Benefits of technology

It improved the accuracy and efficiency of contract generation, shortened the generation cycle, and enhanced the quality and efficiency of contract management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226494B_ABST
    Figure CN119226494B_ABST
Patent Text Reader

Abstract

This invention provides a coal contract generation system and method based on the RETE algorithm, belonging to the field of artificial intelligence information processing technology. It includes: a demand analysis module: performing object analysis on historical contracts to determine the first key fuel business data object; a network construction module: performing demand analysis on historical contracts and determining a rule base, and constructing a RETE network based on the rules in the rule base and the first key fuel business data object; a rule matching module: collecting first relevant data of the second key fuel business data object for the target contract generation, and matching the first relevant data with the RETE network; and a draft generation module: processing the matching results based on a preset algorithm, and generating a preliminary draft of the contract based on the processing results and the rule logic of the rule base. This achieves efficient and accurate coal contract generation, thereby improving the efficiency and quality of contract management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence information processing technology, and in particular to a coal contract generation system and method based on the RETE algorithm. Background Technology

[0002] The coal industry plays a vital role in the energy market, and coal contracts, as key documents in coal transactions, involve a large amount of business data and rules. With the continuous changes and increasing complexity of the coal market, traditional contract generation methods are gradually failing to meet the demand for rapid and accurate contract generation. Existing technologies typically employ contract generation methods based on manual operation or simple automation. While manual operation is flexible, it is inefficient and prone to errors, while simple automation systems often use fixed templates or simple rule matching. These systems cannot adapt to the generation needs of complex contracts.

[0003] Therefore, the present invention provides a coal contract generation system based on the RETE algorithm. Summary of the Invention

[0004] This invention provides a coal contract generation system based on the RETE algorithm. By analyzing historical contracts, it quickly identifies key fuel business data objects, improving the efficiency and accuracy of the analysis. Combining historical contracts with a defined rule base, a RETE network is constructed, enabling efficient management and application of rules. The system collects key business data objects required for contract generation and matches them through the RETE network, achieving rapid and accurate rule matching and improving contract generation accuracy. Based on a preset algorithm, the matching results are processed, and a preliminary contract draft is generated according to the rule base logic, effectively shortening the contract generation cycle. This system achieves efficient and accurate coal contract generation, thereby improving the efficiency and quality of contract management.

[0005] This invention provides a coal contract generation system based on the RETE algorithm, comprising:

[0006] Requirements Analysis Module: Performs object analysis on historical contracts to identify the primary key fuel business data objects;

[0007] Network construction module: Performs requirements analysis on historical contracts and determines the rule base, and constructs the RETE network based on the rules in the rule base and the first key fuel business data object;

[0008] Rule matching module: Collects the first relevant data of the second key fuel business data object of the target generation contract, and matches the first relevant data with the RETE network;

[0009] Draft generation module: Processes the matching results based on a preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.

[0010] This invention provides a coal contract generation system based on the RETE algorithm, including a demand analysis module:

[0011] Information extraction unit: Extracts historical contracts from the preset contract management system and extracts key information from the text of the historical contracts;

[0012] Relationship Acquisition Unit: Analyzes key information to obtain key entities involved in historical contracts, and performs correlation analysis on all key entities to determine the relationships between them;

[0013] Attribute Assignment Unit: Assigns relevant attributes to each key entity based on a preset attribute assignment model;

[0014] Object determination unit: Perform a second analysis on the relationships between key entities and the relevant attributes of key entities to determine the first key fuel business data object.

[0015] This invention provides a coal contract generation system based on the RETE algorithm, including a network construction module comprising:

[0016] Requirements gathering unit: Analyzes historical contracts to obtain the business requirements of the contracts;

[0017] Library building unit: Based on a preset conversion rule library, each business requirement of the contract is converted into rules in a preset format, and a rule library is built based on all the rules;

[0018] Network building unit: Based on the rules in the rule base, obtain several conditions in each rule and combine them with the first key fuel business data object to build the RETE network.

[0019] This invention provides a coal contract generation system based on the RETE algorithm, comprising a demand acquisition unit, including:

[0020] Consistency Analysis Block: Performs consistency analysis on all different types of contracts to obtain consistent clauses in different types of contracts;

[0021] First screening block: Based on the consistency analysis results, perform the first screening on the clauses in all contracts to obtain several first-difference clauses in all contracts in addition to all consistent clauses;

[0022] Second filtering block: Based on the frequency of occurrence of the first difference clause and the preset frequency threshold, perform a second filtering on all the first difference clauses to obtain a number of second difference clauses that reach the preset frequency of occurrence.

[0023] Requirements Determination Block: Identify key terms based on all consistent terms and second differing terms, and determine the business requirements of the contract based on the key terms.

[0024] This invention provides a coal contract generation system based on the RETE algorithm, comprising a network construction unit:

[0025] Condition retrieval sub-unit: Retrieves several conditions from each rule in the rule base;

[0026] Node creation of sub-units: When there is only a single condition in the corresponding rule, a first node is created for that single condition;

[0027] Parsing sub-units: When there are multiple conditions in a corresponding rule, the attribute parsing is performed on each condition in the corresponding rule to obtain the condition attributes of the corresponding condition, thereby determining the primary and secondary conditions in each rule. At the same time, the relationship between all conditions under the corresponding rule is determined based on the condition attributes of each condition.

[0028] Node creation of sub-units: Create the first node for the primary condition in each rule and create the second node for the secondary condition in each rule;

[0029] Condition chain generation sub-unit: Based on the relationship between all conditions in the corresponding rule, connect the first node and the second node under the corresponding rule to generate the first condition chain;

[0030] Association Analysis Subunit: Performs association analysis on all rules to obtain the association relationships between rules;

[0031] Connecting subunit: Based on the relationships between all rules, connect the first node of all rules to generate the second condition chain;

[0032] Network construction sub-unit: Based on the first condition chain and the second condition chain, and combined with the mapping relationship between the first key fuel business data object and each rule, the RETE network is constructed.

[0033] This invention provides a coal contract generation system based on the RETE algorithm, including a parsing subunit:

[0034] Obtain the condition attributes for the corresponding conditions, and then determine the primary and secondary conditions in each rule.

[0035] First calculation block: Calculates the individual weight value of each sub-attribute in the conditional attribute for each condition:

[0036] ;in, Let be the individual weight value of the j-th sub-attribute of the i-th condition. Score the business importance of the j-th sub-attribute for the i-th condition. The conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the i-th condition. Let be the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the transformation coefficient corresponding to the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the conversion coefficient corresponding to the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the initial attribute weight for the j-th attribute under the i-th condition. , Let be the mean and standard deviation of the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let $\frac{j}{i}$ be the combined influence adjustment factor for the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions, and $\frac{j}{i}$ be the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions. ;

[0037] Weight value retrieval block: Retrieves the attribute weight value for each condition based on all individual weight values ​​for each condition;

[0038] Second calculation block: Determine the primary and secondary conditions based on the attribute weight values ​​of each condition:

[0039] ;in, This represents the judgment result of the i-th condition in the p-th rule. Let n1 be the attribute weight value of the i-th condition in the p-th rule, and n1 be the number of conditions in the p-th rule. Let be the average of all sub-attributes in the p-th rule. Let V be the variance of all attribute weights in the p-th rule. For the p-th rule, is the variance adjustment factor for all attribute weight values. Let be the variance of all remaining attribute weights in the p-th rule, excluding the attribute weight value of the i-th condition.

[0040] A coal contract generation system based on the RETE algorithm, with preset rule logic including: legal compliance rule logic, commercial terms rule logic, risk management rule logic, language rule logic, and modification and termination rule logic.

[0041] This invention provides a method for generating coal contracts based on the RETE algorithm, comprising:

[0042] Perform object analysis on historical contracts to identify the primary key fuel business data objects;

[0043] Demand analysis is performed on historical contracts, and a rule base is determined. Based on the rules in the rule base and the first key fuel business data object, a RETE network is constructed.

[0044] Collect first relevant data of the second key fuel business data object of the target generation contract, and match the first relevant data with the RETE network;

[0045] The matching results are processed based on a preset algorithm, and a preliminary draft of the contract is generated based on the processing results and the rule logic of the rule base.

[0046] This invention provides a coal contract generation system based on the RETE algorithm. By analyzing historical contracts, it quickly identifies key fuel business data objects, improving the efficiency and accuracy of the analysis. Combining historical contracts with a defined rule base, a RETE network is constructed, enabling efficient rule management and application. The system collects key business data objects required for contract generation and matches them through the RETE network, achieving rapid and accurate rule matching and improving contract generation accuracy. Based on a preset algorithm, the matching results are processed, and a preliminary contract draft is generated according to the rule base logic, effectively shortening the contract generation cycle. This system achieves efficient and accurate coal contract generation, thereby improving the efficiency and quality of contract management. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0048] Figure 1 This is a schematic diagram of the structure of a coal contract generation system based on the RETE algorithm provided in an embodiment of the present invention;

[0049] Figure 2 This is a flowchart illustrating a coal contract generation method based on the RETE algorithm provided in an embodiment of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0051] Example 1

[0052] like Figure 1 As shown in the figure, an embodiment of the present invention provides a coal contract generation system based on the RETE algorithm, comprising:

[0053] Requirements Analysis Module: Performs object analysis on historical contracts to identify the primary key fuel business data objects;

[0054] Network construction module: Performs requirements analysis on historical contracts and determines the rule base, and constructs the RETE network based on the rules in the rule base and the first key fuel business data object;

[0055] Rule matching module: Collects the first relevant data of the second key fuel business data object of the target generation contract, and matches the first relevant data with the RETE network;

[0056] Draft generation module: Processes the matching results based on a preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.

[0057] In this embodiment, object analysis refers to analyzing historical contracts to identify key fuel business data objects required in the coal contract generation system. These are key elements or data fields in the contract, such as coal type, quantity, price, and delivery date. For example, in historical contracts, identifying the coal type and delivery location are key data objects.

[0058] In this embodiment, the first key fuel business data object is a key data object in the contract determined through object analysis. For example, for a coal contract generation system, the first key fuel business data object could be the type of coal and the delivery location.

[0059] In this embodiment, requirements analysis refers to a detailed analysis and definition of the functions and characteristics required by the system. For example, analyzing data such as coal type, quantity, and price in historical contracts to determine system requirements;

[0060] In this embodiment, determining the rule base refers to identifying and establishing a set of rules used in the system to generate contracts based on input data. For example, this includes rules for determining prices based on different types of coal and delivery locations.

[0061] In this embodiment, the RETE network is a data structure for rule matching and reasoning. It can efficiently handle a large number of rules. Based on a defined rule base and the first key fuel business data object, the RETE network is constructed to quickly match rules and generate contracts.

[0062] In this embodiment, the target generated contract refers to the new contract that the system wants to generate. For example, the system may generate a new coal purchase contract based on the user's input requirements.

[0063] In this embodiment, the second key fuel business data object is another key data object related to the target generation contract. It is data of the same type as the second key fuel business data object. For example, in a new procurement contract, the delivery date and delivery location of coal may be the second key fuel business data object.

[0064] In this embodiment, the first relevant data is data related to the second key fuel business data object. For example, in a procurement contract, the quantity and price of coal are the first relevant data.

[0065] In this embodiment, the preset algorithm refers to a predefined algorithm used to process the matching results. For example, a weighted average algorithm is used to determine the price in the contract;

[0066] In this embodiment, the matching result refers to the result obtained after matching the first relevant data with the RETE network. For example, the system matches the corresponding price rules based on the delivery date and delivery location to obtain the price information in the contract;

[0067] In this embodiment, the preliminary draft is a preliminary version of the contract generated based on the matching results and the rule logic of the rule base. For example, the system determines information such as the quantity and price of coal based on the matching results and generates a preliminary contract draft.

[0068] The working principle and beneficial effects of the above technical solution are as follows: By analyzing historical contracts, key fuel business data objects are quickly identified, improving the efficiency and accuracy of the analysis. Combining historical contracts with a defined rule base, a RETE network is constructed, enabling efficient management and application of rules. Key business data objects required for generating target contracts are collected and matched through the RETE network, achieving rapid and accurate rule matching and improving the accuracy of contract generation. The matching results are processed based on a preset algorithm, and a preliminary contract draft is generated according to the logic of the rule base, effectively shortening the contract generation cycle. This achieves efficient and accurate generation of coal contracts, thereby improving the efficiency and quality of contract management.

[0069] Example 2

[0070] This invention provides a coal contract generation system based on the RETE algorithm, including a demand analysis module:

[0071] Information extraction unit: Extracts historical contracts from the preset contract management system and extracts key information from the text of the historical contracts;

[0072] Relationship Acquisition Unit: Analyzes key information to obtain key entities involved in historical contracts, and performs correlation analysis on all key entities to determine the relationships between them;

[0073] Attribute Assignment Unit: Assigns relevant attributes to each key entity based on a preset attribute assignment model;

[0074] Object determination unit: Perform a second analysis on the relationships between key entities and the relevant attributes of key entities to determine the first key fuel business data object.

[0075] In this embodiment, the pre-defined contract management system refers to a system for managing contracts that existed prior to the coal contract generation system. The pre-defined contract management system includes a database or software for storing historical contracts;

[0076] In this embodiment, key information extraction refers to extracting important information from historical contracts from a pre-defined contract management system. For example, key information such as coal type, quantity, price, and delivery date can be extracted from the contract text.

[0077] In this embodiment, a key entity refers to an entity that has played a significant role or function in historical contracts, such as a coal supplier, a purchaser, or a delivery location. For example, in a purchase contract, the coal supplier and the purchaser are key entities.

[0078] In this embodiment, the relationship between key entities refers to the connection or dependency between them. For example, in a contract, there is a supply relationship between the coal supplier and the purchaser, and a delivery relationship between the delivery location and the purchaser; these are the relationships between key entities.

[0079] In this embodiment, the preset attribute assignment model refers to a method or algorithm that assigns relevant attributes to each key entity according to a predefined model or rule. For example, based on the text content and grammatical structure in the contract management system, the preset attribute assignment model can identify a coal supplier as an entity and assign it attributes such as name, address, and contact information.

[0080] In this embodiment, relevant attributes refer to attributes or characteristics associated with each key entity. For example, relevant attributes of a coal supplier might include its company size, creditworthiness, and historical transaction records.

[0081] In this embodiment, the second analysis refers to the process of further analyzing and organizing the relationships and related attributes between key entities in the object determination unit. During this process, the system may determine the first key fuel business data object, i.e., the important data object that the system needs to process, based on the relationships and attributes between the key entities.

[0082] The working principle and beneficial effects of the above technical solution are as follows: By extracting historical contracts from the preset contract management system and extracting key information from the text of these contracts, a foundation is provided for subsequent analysis and processing. By analyzing the key information, key entities involved in the historical contracts are identified, and the relationships between these entities are analyzed, providing key information for subsequent data processing and object identification. Each key entity is assigned relevant attributes, and through further analysis of the relationships and relevant attributes between key entities, the system can identify the first key fuel business data object, providing a clear data object model for subsequent contract generation and processing.

[0083] Example 3

[0084] This invention provides a coal contract generation system based on the RETE algorithm, including a network construction module comprising:

[0085] Requirements gathering unit: Analyzes historical contracts to obtain the business requirements of the contracts;

[0086] Library building unit: Based on a preset conversion rule library, each business requirement of the contract is converted into rules in a preset format, and a rule library is built based on all the rules;

[0087] Network building unit: Based on the rules in the rule base, obtain several conditions in each rule and combine them with the first key fuel business data object to build the RETE network.

[0088] In this embodiment, demand analysis refers to analyzing historical contracts to determine the business requirements contained in the contracts. For example, in a coal contract, business requirements may include coal type, delivery date, delivery location, quantity, price, etc.

[0089] In this embodiment, the business requirements of a contract refer to the specific business requirements or conditions involved in the contract. For example, the business requirements of a coal purchase contract might be to purchase X tons of coal, with a delivery date of XX year XX month, a price of XX yuan per ton, and a delivery location of XX location, etc.

[0090] In this embodiment, the preset conversion rule library refers to a predefined library used to convert contract business requirements into a rule format that the system can process. For example, converting contract business requirements into logical conditions, such as "if the coal type is A, the delivery date is B, and the delivery location is C, then the price is D";

[0091] In this embodiment, the preset format rule refers to a fixed-format rule defined in the rule base, used to describe the contractual business requirements that the system can understand and process. For example, the rule format may include a condition section and an action section. In payment terms, the action might be to impose a penalty on the payer. In payment terms, the condition might be that payment should be completed by a specific date. Rule format: Condition--Action, using "if" in the condition section and "then" in the action section. The resulting rule is: If payment is not completed by the specified date, a penalty will be imposed on the payer;

[0092] In this embodiment, the rule base is where preset format rules are stored, and the system generates and processes contracts based on these rules. For example, the rule base may contain a series of rules for different business needs, such as price calculation rules, delivery date rules, etc.

[0093] The working principle and beneficial effects of the above technical solution are as follows: by conducting demand analysis on historical contracts, the business requirements of each contract are accurately obtained. Based on the preset conversion rule base, the business requirements of each contract are converted into rules in a preset format. A rule base is built based on these rules, which improves the flexibility and scalability of the system. The conditions in each rule are obtained according to the rules in the rule base, and the RETE network is built in combination with the first key fuel business data object, which improves the system's response speed and processing capacity, and improves the efficiency and accuracy of contract generation.

[0094] Example 4

[0095] This invention provides a coal contract generation system based on the RETE algorithm, comprising a demand acquisition unit, including:

[0096] Consistency Analysis Block: Performs consistency analysis on all different types of contracts to obtain consistent clauses in different types of contracts;

[0097] First screening block: Based on the consistency analysis results, perform the first screening on the clauses in all contracts to obtain several first-difference clauses in all contracts in addition to all consistent clauses;

[0098] Second filtering block: Based on the frequency of occurrence of the first difference clause and the preset frequency threshold, perform a second filtering on all the first difference clauses to obtain a number of second difference clauses that reach the preset frequency of occurrence.

[0099] Requirements Determination Block: Identify key terms based on all consistent terms and second differing terms, and determine the business requirements of the contract based on the key terms.

[0100] In this embodiment, "different types" refers to the various categories or types of contracts that may exist in the contract generation system. For example, in the coal industry, different types of contracts may include purchase contracts, sales contracts, transportation contracts, etc.

[0101] In this embodiment, consistency analysis involves analyzing all different types of contracts to identify commonalities or consistent clauses among them. Consistency analysis aims to identify clauses that appear frequently and are similar in content across various contracts.

[0102] In this embodiment, a consistency clause refers to a clause that has the same content or similar expression in different types of contracts. For example, in a coal contract, consistency clauses may include price, quantity, delivery date, etc.

[0103] In this embodiment, the first difference clause refers to the remaining clauses after the consistency analysis, excluding the consistency clauses. These clauses appear in various contracts but may differ in content or be more unique. For example, in a purchase contract, in addition to the common price and delivery date, a particular supplier may have special payment methods or return policies.

[0104] In this embodiment, the second discrepancy clause refers to clauses that, after the first screening, have a certain frequency of occurrence but are insufficient to be categorized as consistent clauses. Through the second screening, the system can more accurately identify discrepancy clauses in various contracts. For example, in a sales contract, warranty clauses for certain specific products may appear frequently but are not included in all contracts.

[0105] The working principle and beneficial effects of the above technical solution are as follows: Based on the consistency analysis results, the system performs a first screening of all contract clauses, filtering out the first discrepancy clauses besides the consistent clauses. By analyzing the frequency of occurrence of the first discrepancy clauses and performing a second screening based on a preset frequency threshold, the system can obtain the second discrepancy clauses that reach the preset frequency. This helps the system identify and focus on discrepancy clauses with high frequency. Based on all consistent clauses and the second discrepancy clauses, the system can determine the key clauses and determine the business requirements of the contract based on these key clauses. This helps the system accurately capture the key content and requirements of the contract, providing an important basis for subsequent processing and generation.

[0106] Example 5

[0107] This invention provides a coal contract generation system based on the RETE algorithm, comprising a network construction unit:

[0108] Condition retrieval sub-unit: Retrieves several conditions from each rule in the rule base;

[0109] Node creation of sub-units: When there is only a single condition in the corresponding rule, a first node is created for that single condition;

[0110] Parsing sub-units: When there are multiple conditions in a corresponding rule, the attribute parsing is performed on each condition in the corresponding rule to obtain the condition attributes of the corresponding condition, thereby determining the primary and secondary conditions in each rule. At the same time, the relationship between all conditions under the corresponding rule is determined based on the condition attributes of each condition.

[0111] Node creation of sub-units: Create the first node for the primary condition in each rule and create the second node for the secondary condition in each rule;

[0112] Condition chain generation sub-unit: Based on the relationship between all conditions in the corresponding rule, connect the first node and the second node under the corresponding rule to generate the first condition chain;

[0113] Association Analysis Subunit: Performs association analysis on all rules to obtain the association relationships between rules;

[0114] Connecting subunit: Based on the relationships between all rules, connect the first node of all rules to generate the second condition chain;

[0115] Network construction sub-unit: Based on the first condition chain and the second condition chain, and combined with the mapping relationship between the first key fuel business data object and each rule, the RETE network is constructed.

[0116] In this embodiment, the first node is in the RETE network. The first node refers to the initial node of the network, which is used to match the first condition in the rule. For example, for a rule, if the condition is "purchase quantity is greater than 1000 tons", the first node will match the "purchase quantity" in this condition. Here, it refers to the Alpha node: used for testing a single condition. They are the most basic tests in the rule.

[0117] In this embodiment, the attribute of a condition refers to the characteristics or attributes of the object or event described by the condition. For example, in a rule, the condition is "purchase quantity greater than 1000 tons", where the attribute is "purchase quantity" and its attribute value is "greater than 1000 tons".

[0118] In this embodiment, the primary condition refers to the most important condition in the rule, which is usually the core condition that triggers the execution of the rule; the secondary condition refers to the auxiliary condition in the rule, which is used to further limit the execution conditions of the rule. For example, in a rule, if the conditions are "purchase quantity greater than 1,000 tons" and "delivery location is China", then "purchase quantity" may be the primary condition and "delivery location" may be the secondary condition.

[0119] In this embodiment, the second node is a node connected to the first node in the RETE network. It is used to match the second condition in the rule, and here it is a beta node. Beta nodes are used to connect multiple conditions, such as logical relationships like AND and OR. When a rule has multiple conditions, these conditions can be connected to form a condition chain through beta nodes. For example, for the condition "if the order amount is greater than $1000 and the customer is a VIP," a beta node needs to be created connecting "order amount greater than $1000" and "customer is a VIP."

[0120] In this embodiment, the second parsing refers to analyzing the relationships between multiple conditions in a rule to determine their logical relationships, such as AND, OR, etc. Example: In a rule, if the condition is "purchase quantity greater than 1000 tons and delivery location is China", the second parsing might determine that the relationship between these two conditions is AND.

[0121] In this embodiment, the first condition chain refers to the path from the first node to the second node in the RETE network, which is used to match the first condition in the rule. For example, for a rule, if the condition is "purchase quantity greater than 1000 tons", then the first condition chain may be the path from the first node to the node that matches "purchase quantity greater than 1000 tons".

[0122] In this embodiment, the second condition chain refers to the path from the second node to subsequent nodes in the RETE network, used to match the second condition and subsequent conditions in the rule. For example, for a rule, if the condition is "purchase quantity greater than 1000 tons and delivery location is China", then the second condition chain may be the path from the second node to the node that matches "delivery location is China".

[0123] The working principle and beneficial effects of the above technical solution are as follows: By obtaining the conditions in each rule from the rule base and parsing the attributes of each condition, the system can fully understand the conditions in each rule. Based on the attributes of each condition, the primary and secondary conditions in each rule are determined, thereby optimizing the condition matching process. According to the primary and secondary relationships of the conditions, corresponding nodes are created and condition chains are generated, which helps the system to quickly locate relevant conditions when matching rules, thus improving matching efficiency. By performing correlation analysis on all rules to understand the relationships between rules, and connecting the nodes of all rules based on these correlations to build a RETE network, the system can better manage and organize rules, thus optimizing the efficiency of the condition matching process.

[0124] Example 6

[0125] This invention provides a coal contract generation system based on the RETE algorithm, comprising a condition determination subunit, including:

[0126] Obtain the condition attributes for the corresponding conditions, and then determine the primary and secondary conditions in each rule.

[0127] First calculation block: Calculates the individual weight value of each sub-attribute in the conditional attribute for each condition:

[0128] ;

[0129] in, Let be the individual weight value of the j-th sub-attribute of the i-th condition. Score the business importance of the j-th sub-attribute for the i-th condition. The conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the i-th condition. Let be the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the transformation coefficient corresponding to the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the conversion coefficient corresponding to the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the initial attribute weight for the j-th attribute under the i-th condition. , Let be the mean and standard deviation of the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let $\frac{j}{i}$ be the combined influence adjustment factor for the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions, and $\frac{j}{i}$ be the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions. ;

[0130] Weight value retrieval block: Retrieves the attribute weight value for each condition based on all individual weight values ​​for each condition;

[0131] Second calculation block: Determine the primary and secondary conditions based on the attribute weight values ​​of each condition:

[0132] ;

[0133] in, This represents the judgment result of the i-th condition in the p-th rule. Let n1 be the attribute weight value of the i-th condition in the p-th rule, and n1 be the number of conditions in the p-th rule. Let be the average of all sub-attributes in the p-th rule. Let V be the variance of all attribute weights in the p-th rule. For the p-th rule, is the variance adjustment factor for all attribute weight values. Let be the variance of all remaining attribute weights in the p-th rule, excluding the attribute weight value of the i-th condition.

[0134] In this embodiment, the business importance score of an attribute refers to a quantitative assessment of the importance of an attribute in a specific business scenario. It reflects the relative importance of the attribute in decision-making or outcomes. Example: In a coal contract generation system, for the condition "purchase quantity," a business importance score may be given based on factors such as market demand and supply, such as 10 points indicating very important, 5 points indicating moderately important, etc.

[0135] In this embodiment, the preset coefficient of variation refers to the setting of the degree of variation of the attribute value based on historical data or professional knowledge. It is used to measure the volatility or variability of the attribute value. Example: For the condition "delivery location", if historical data shows that the attribute value changes little, a lower preset coefficient of variation can be set; if the attribute value changes significantly, a higher preset coefficient of variation can be set.

[0136] The working principle and beneficial effects of the above technical solution are as follows: By considering factors such as the business importance score of each attribute of each condition and the preset coefficient of variation, the weight value of each attribute of each condition is comprehensively calculated. This enables the system to more objectively assess the importance of attributes, obtain the comprehensive attribute weight value of all attributes of each condition, and calculate the attribute weight value of each condition accordingly. This ensures that the system can accurately capture the attribute weight of each condition, providing basic data for the subsequent determination of the priority of conditions, improving the system's understanding and utilization of condition attributes, and enhancing the accuracy and efficiency of the system in the condition matching process, thereby making the generation of coal contracts more realistic.

[0137] Example 7

[0138] This invention provides a coal contract generation system based on the RETE algorithm, with preset rule logic including: legal compliance rule logic, commercial terms rule logic, risk management rule logic, language rule logic, and change and termination rule logic, etc.

[0139] In this embodiment, the legal compliance rule logic refers to ensuring that the content of the contract complies with the requirements of local laws and regulations, including but not limited to the logic of contract form and legality of clauses. For example, when drafting an employment contract, ensure that the contract includes the minimum wage standard and working hours provisions stipulated by local laws.

[0140] In this embodiment, the business terms rule logic is as follows: determine the business terms involved in the contract, such as payment terms, service delivery terms, etc. For example, when formulating a sales contract, determine the payment method, delivery time and place of goods, and other business terms.

[0141] In this embodiment, the risk management rule logic is to identify and manage potential risks in contracts to reduce disputes and legal liabilities. For example, in a lease contract, the responsibility for maintaining the leased property and the responsibility for compensating for damages are clearly defined to reduce the risks that the lessor may face.

[0142] In this embodiment, the language and expression rules are logical: to ensure that the contract terms are clear and unambiguous, avoid ambiguity, and improve the enforceability of the contract. For example, use concise and clear language to express contract terms and avoid using vague or ambiguous words.

[0143] In this embodiment, the logic for modification and termination rules is as follows: it stipulates the conditions and procedures for contract modification and termination, as well as the corresponding rights and obligations. For example, in a supply contract, it stipulates the procedures for changing orders and the additional costs involved in the modification, as well as the conditions and notification period for both parties to terminate the contract.

[0144] The working principle and beneficial effects of the above technical solution are as follows: By adjusting and modifying different rule logics according to specific contract types, industry needs, and legal requirements, the generated draft contract ensures that it meets the expectations of both parties and possesses legality and enforceability. This reduces the probability of contract risks and disputes, and enhances the reliability and practicality of the contract generation system.

[0145] Example 8

[0146] like Figure 2 As shown in the figure, an embodiment of the present invention provides a method for generating coal contracts based on the RETE algorithm, comprising:

[0147] Perform object analysis on historical contracts to identify the primary key fuel business data objects;

[0148] Demand analysis is performed on historical contracts, and a rule base is determined. Based on the rules in the rule base and the first key fuel business data object, a RETE network is constructed.

[0149] Collect first relevant data of the second key fuel business data object of the target generation contract, and match the first relevant data with the RETE network;

[0150] The matching results are processed based on a preset algorithm, and a preliminary draft of the contract is generated based on the processing results and the rule logic of the rule base.

[0151] The working principle and beneficial effects of the above technical solution are as follows: By analyzing historical contracts, key fuel business data objects are quickly identified, improving the efficiency and accuracy of the analysis. Combining historical contracts with a defined rule base, a RETE network is constructed, enabling efficient management and application of rules. Key business data objects required for generating target contracts are collected and matched through the RETE network, achieving rapid and accurate rule matching and improving the accuracy of contract generation. The matching results are processed based on a preset algorithm, and a preliminary contract draft is generated according to the logic of the rule base, effectively shortening the contract generation cycle. This achieves efficient and accurate generation of coal contracts, thereby improving the efficiency and quality of contract management.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A coal contract generation system based on the RETE algorithm, characterized in that, include: Requirements Analysis Module: Performs object analysis on historical contracts to identify the primary key fuel business data objects; The network construction module includes a requirements gathering unit, a library construction unit, and a network construction unit; The requirement acquisition unit includes: a consistency analysis block: performing consistency analysis on all different types of contracts to obtain consistent clauses in different types of contracts; a first screening block: performing a first screening on the clauses in all contracts based on the consistency analysis results to obtain several first difference clauses in all contracts other than all consistent clauses; a second screening block: performing a second screening on all first difference clauses based on the occurrence frequency of the first difference clauses and a preset occurrence frequency threshold to obtain several second difference clauses that reach the preset occurrence frequency; and a requirement determination block: determining key clauses based on all consistent clauses and second difference clauses, and determining the business requirements of the contract based on the key clauses. The library construction unit: Based on a preset conversion rule library, it converts each business requirement of the contract into rules in a preset format, and builds a rule library based on all the rules; The network construction unit includes a condition acquisition subunit: acquiring several conditions from each rule in the rule base; and a node creation subunit: creating a first node for the single condition when the corresponding rule has only a single condition. Parsing Subunit: When a rule has multiple conditions, each condition in the rule is parsed to obtain its condition attributes, thereby determining the primary and secondary conditions in each rule. Simultaneously, the relationships between all conditions under the corresponding rule are determined based on the condition attributes of each condition. The parsing subunit includes: First calculation block: Calculates the individual weight value of each sub-attribute in the conditional attribute for each condition: ;in, Let be the individual weight value of the j-th sub-attribute of the i-th condition. Score the business importance of the j-th sub-attribute for the i-th condition. The conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the i-th condition. Let be the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the transformation coefficient corresponding to the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the conversion coefficient corresponding to the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the initial attribute weight for the j-th attribute under the i-th condition. , Let be the mean and standard deviation of the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let $\frac{j}{i}$ be the combined influence adjustment factor for the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions, and $\frac{j}{i}$ be the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions. ; Weight value retrieval block: Retrieves the attribute weight value for each condition based on all individual weight values ​​for each condition; Second calculation block: Determine the primary and secondary conditions based on the attribute weight values ​​of each condition: ;in, This represents the judgment result of the i-th condition in the p-th rule. Let n1 be the attribute weight value of the i-th condition in the p-th rule, and n1 be the number of conditions in the p-th rule. Let be the average of all sub-attributes in the p-th rule. Let V be the variance of all attribute weights in the p-th rule. For the p-th rule, is the variance adjustment factor for all attribute weight values. Create sub-cells for the variance nodes of all remaining attribute weight values ​​in the p-th rule, excluding the attribute weight value of the i-th condition: create a first node for the primary condition in each rule and a second node for the secondary condition in each rule; Condition chain generation sub-unit: Based on the relationship between all conditions in the corresponding rule, connect the first node and the second node under the corresponding rule to generate the first condition chain; Association Analysis Subunit: Performs association analysis on all rules to obtain the association relationships between rules; Connecting subunit: Based on the relationships between all rules, connect the first node of all rules to generate the second condition chain; Network construction subunit: Based on the first condition chain and the second condition chain, and combined with the mapping relationship between the first key fuel business data object and each rule, construct the RETE network; Rule matching module: Collects the first relevant data of the second key fuel business data object of the target generation contract, and matches the first relevant data with the RETE network; Draft generation module: Processes the matching results based on a preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.

2. The coal contract generation system based on the RETE algorithm according to claim 1, characterized in that, The requirements analysis module includes: Information extraction unit: Extracts historical contracts from the preset contract management system and extracts key information from the text of the historical contracts; Relationship Acquisition Unit: Analyzes key information to obtain key entities involved in historical contracts, and performs correlation analysis on all key entities to determine the relationships between them; Attribute Assignment Unit: Assigns relevant attributes to each key entity based on a preset attribute assignment model; Object determination unit: Perform a second analysis on the relationships between key entities and the relevant attributes of key entities to determine the first key fuel business data object.

3. The coal contract generation system based on the RETE algorithm according to claim 1, characterized in that, The pre-defined rule logic includes: legal compliance rule logic, business terms rule logic, risk management rule logic, language rule logic, and change and termination rule logic.

4. A method for generating coal contracts based on the RETE algorithm, characterized in that, include: Perform object analysis on historical contracts to identify the primary key fuel business data objects; The system performs a consistency analysis on all different types of contracts to identify consistent clauses across different contract types. The first filtering block filters all contract clauses based on the consistency analysis results, identifying several first-difference clauses in all contracts, excluding all consistent clauses. The second filtering block filters all first-difference clauses based on their frequency of occurrence and a preset frequency threshold, identifying several second-difference clauses that reach the preset frequency. The requirements determination block identifies key clauses based on all consistent and second-difference clauses, and then determines the business requirements of the contract based on these key clauses. Based on a pre-defined conversion rule base, each business requirement of the contract is converted into a rule in a pre-defined format, and a rule base is built based on all the rules; Retrieve several conditions from each rule in the rule base; Create sub-units for nodes: When the corresponding rule has only a single condition, create the first node for that single condition; When a rule contains multiple conditions, attribute parsing is performed on each condition to obtain its condition attributes, thereby determining the primary and secondary conditions within each rule. Simultaneously, the relationships between all conditions under a given rule are determined based on the condition attributes of each condition. Specifically, the individual weight value of each sub-attribute within the condition attributes of each condition is calculated. ;in, Let be the individual weight value of the j-th sub-attribute of the i-th condition. Score the business importance of the j-th sub-attribute for the i-th condition. The conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the i-th condition. Let be the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the transformation coefficient corresponding to the preset mutation value of the j-th sub-attribute of the i-th condition in the data. Let be the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the conversion coefficient corresponding to the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let be the initial attribute weight for the j-th attribute under the i-th condition. , Let be the mean and standard deviation of the frequency of the j-th sub-attribute of the i-th condition across all conditions. Let $\frac{j}{i}$ be the combined influence adjustment factor for the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions, and $\frac{j}{i}$ be the frequency of the $j$-th sub-attribute of the $i$-th condition across all conditions. ; Obtain the attribute weight value for each condition based on all individual weight values ​​for each condition; Second calculation block: Determine the primary and secondary conditions based on the attribute weight values ​​of each condition: ;in, This represents the judgment result of the i-th condition in the p-th rule. Let n1 be the attribute weight value of the i-th condition in the p-th rule, and n1 be the number of conditions in the p-th rule. Let be the average of all sub-attributes in the p-th rule. Let V be the variance of all attribute weights in the p-th rule. For the p-th rule, is the variance adjustment factor for all attribute weight values. Create sub-cells for the variance nodes of all remaining attribute weight values ​​in the p-th rule, excluding the attribute weight value of the i-th condition: create a first node for the primary condition in each rule and a second node for the secondary condition in each rule; Based on the relationship between all conditions in the corresponding rule, the first node and the second node under the corresponding rule are connected to generate the first condition chain; Perform correlation analysis on all rules to obtain the relationships between them; Connecting subunit: Based on the relationships between all rules, connect the first node of all rules to generate the second condition chain; Based on the first and second condition chains, and combined with the mapping relationship between the first key fuel business data object and each rule, a RETE network is constructed. Collect first relevant data of the second key fuel business data object of the target generation contract, and match the first relevant data with the RETE network; The matching results are processed based on a preset algorithm, and a preliminary draft of the contract is generated based on the processing results and the rule logic of the rule base.

Citation Information

Patent Citations

  • Electronic commerce system, method and apparatus

    CN101180645A

  • Stainless steel order grouping method and system based on rules

    CN103810304A