Coal contract generation system and method based on RETE algorithm
Through the coal contract generation system based on the RETE algorithm, the problem of inefficient traditional contract generation is solved by using object analysis and RETE network matching technology, rapid and accurate contract generation is achieved, and the efficiency and quality of contract management are improved.
Patent Information
- Application Number
- CN202411052976.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-08-01
AI Technical Summary
The traditional coal contract generation method is inefficient and error-prone, and cannot adapt to the generation needs of complex contracts. The existing simple automation system cannot achieve fast and accurate contract generation.
Using the coal contract generation system based on the RETE algorithm, determine the key business data objects by object analysis of historical contracts, build a RETE network, realize efficient management and application of rules, collect the key data objects required for target generation contracts, and use the RETE network Make a match and generate a preliminary contract draft.
It improves the accuracy and efficiency of contract generation, shortens the contract generation cycle, and improves the quality and efficiency of contract management.
Smart Images

Figure CN119226494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence information processing technology, and in particular to a coal contract generation system and method based on RETE algorithm. Background Art
[0002] The coal industry plays an important role in the energy market, and coal contracts, as key documents for coal transactions, involve a large amount of business data and rules. As the coal market continues to change and become more complex, traditional contract generation methods are gradually unable to meet the needs of generating contracts quickly and accurately. In the prior art, contract generation methods based on manual operation or simple automation are usually used. Although manual operation is flexible, it is inefficient and prone to errors. Simple automation systems mostly use fixed templates or simple rule matching, which cannot meet the needs of generating complex contracts.
[0003] Therefore, the present invention provides a coal contract generation system based on RETE algorithm. Summary of the invention
[0004] The present invention provides a coal contract generation system based on RETE algorithm, which analyzes historical contracts, quickly determines key fuel business data objects, improves the efficiency and accuracy of analysis, combines historical contracts and determined rule bases, builds RETE network, realizes efficient management and application of rules, collects key business data objects required for target generation contracts, and matches them through RETE network, thereby realizing fast and accurate matching of rules, improving the accuracy of contract generation, processing matching results based on preset algorithms, and generating preliminary contract drafts according to the logic of rule bases, effectively shortening the contract generation cycle. Efficient and accurate generation of coal contracts is realized, thereby improving the efficiency and quality of contract management.
[0005] The present invention provides a coal contract generation system based on RETE algorithm, comprising: Demand analysis module: Analyze historical contracts to determine the first key fuel business data object; Network construction module: Analyze the needs of historical contracts and determine the rule base, and build the RETE network based on the rules in the rule base and the first key fuel business data object; Rule matching module: collects 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 the preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.
[0006] The present invention provides a coal contract generation system based on RETE algorithm, a demand analysis module, comprising: Information extraction unit: extracts historical contracts from the preset contract management system and extracts key information from the texts in the historical contracts; Relationship acquisition unit: Analyze key information to obtain key entities involved in historical contracts, and perform association analysis on all key entities to determine the association relationship between key entities; Attribute assignment unit: assigns relevant attributes to each key entity based on a preset attribute assignment model; Object determination unit: performs a second analysis on the association relationship between key entities and related attributes of the key entities to determine the first key fuel business data object.
[0007] The present invention provides a coal contract generation system based on RETE algorithm, a network construction module, including: Demand acquisition unit: Analyze historical contracts and obtain business requirements of contracts; Library construction unit: based on the preset conversion rule library, each business requirement of the contract is converted into a rule in a preset format, and a rule library is constructed based on all the rules; Network construction unit: based on the rules in the rule base, obtains several conditions in each rule, and constructs a RETE network in combination with the first key fuel business data object.
[0008] The present invention provides a coal contract generation system based on RETE algorithm, a demand acquisition unit, comprising: Consistent analysis block: performs consistent analysis on all different types of contracts to obtain consistent clauses in different types of contracts; First screening block: based on the consistency analysis results, the clauses in all contracts are screened first, and several first difference clauses in all contracts except all consistent clauses are obtained; The 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, and obtaining a number of second difference clauses reaching the preset occurrence frequency; Requirements determination block: Determine key terms based on all consistent terms and second difference terms, and determine the business requirements of the contract based on the key terms.
[0009] The present invention provides a coal contract generation system based on RETE algorithm, a network construction unit, comprising: Condition acquisition subunit: obtains several conditions in each rule in the rule base; Node creation subunit: when there is only a single condition in the corresponding rule, a first node is created for the single condition; Parsing subunit: When there are multiple conditions in the corresponding rule, perform attribute parsing on each condition in the corresponding rule, obtain the condition attributes of the corresponding condition, and then determine the primary and secondary conditions in each rule. At the same time, determine the relationship between all conditions under the corresponding rule according to the condition attributes of each condition; Node creation subunit: creates a first node for each primary condition in a rule and a second node for each secondary condition in a rule; The condition chain generation subunit: based on the relationship between all conditions in the corresponding rule, connects the first node and the second node under the corresponding rule to generate a first condition chain; Association analysis subunit: performs association analysis on all rules to obtain the association relationship between the rules; Connecting subunit: connecting the first nodes of all rules based on the association relationship between all rules, thereby generating a second condition chain; Network construction subunit: Based on the first condition chain and the second condition chain, and in combination with the mapping relationship between the first key fuel business data object and each rule, a RETE network is constructed.
[0010] The present invention provides a coal contract generation system based on RETE algorithm, a parsing subunit, comprising: Get the condition attributes of the corresponding conditions, and then determine the primary and secondary conditions in each rule. The first calculation block: Calculate the individual weight values of each sub-attribute in the condition attribute of each condition: ;in, is the individual weight value of the jth sub-attribute of the ith condition, Score the business importance of the jth sub-attribute of the ith condition, is the conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the ith condition, is the preset variation value of the j-th sub-attribute of the ith condition in the data, is the conversion coefficient corresponding to the preset variation value of the j-th sub-attribute of the ith condition in the data, is the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, is the conversion coefficient corresponding to the frequency of the jth sub-attribute of the ith condition in all conditions, is the initial attribute weight of the jth attribute of the ith condition, , are the mean and standard deviation of the frequency of the jth sub-attribute of the ith condition in all conditions, is the comprehensive impact adjustment factor of the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, and ; Weight value acquisition block: obtains the attribute weight value of the corresponding condition based on all the individual weight values of each condition; The second calculation block: Determine the priority of each condition based on the attribute weight value of each condition: ;in, is the judgment result of the i-th condition in the p-th rule, is the attribute weight value of the i-th condition in the p-th rule, n1 is the number of conditions in the p-th rule, is the average value of all sub-attributes in the pth rule, is the variance of all attribute weight values in the pth rule, is the variance adjustment coefficient of all attribute weight values in the pth rule, is the variance of all remaining attribute weight values in the p-th rule except the attribute weight value of the i-th condition.
[0011] A coal contract generation system based on 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.
[0012] The present invention provides a coal contract generation method based on RETE algorithm, comprising: Conduct object analysis on historical contracts to determine the first key fuel business data object; Conduct demand analysis on historical contracts and determine the rule base, and build a RETE network based on the rules in the rule base and in combination with the first key fuel business data object; Collecting first relevant data of a second key fuel business data object of a target generation contract, and matching 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.
[0013] The invention provides a coal contract generation system based on RETE algorithm, which analyzes historical contracts, quickly determines key fuel business data objects, improves the efficiency and accuracy of analysis, combines historical contracts and determined rule bases, builds RETE network, realizes efficient management and application of rules, collects key business data objects required for target generation contracts, and matches them through RETE network, thereby realizing fast and accurate matching of rules, improving the accuracy of contract generation, processing matching results based on preset algorithms, and generating preliminary contract drafts according to the logic of rule bases, effectively shortening the contract generation cycle. Efficient and accurate generation of coal contracts is achieved, thereby improving the efficiency and quality of contract management. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] Figure 1 It is a structural schematic diagram of a coal contract generation system based on RETE algorithm provided by an embodiment of the present invention; Figure 2 It is a flow chart of a coal contract generation method based on RETE algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] Example 1 like Figure 1 As shown, a coal contract generation system based on RETE algorithm provided by an embodiment of the present invention includes: Demand analysis module: Analyze historical contracts to determine the first key fuel business data object; Network construction module: Analyze the needs of historical contracts and determine the rule base, and build the RETE network based on the rules in the rule base and the first key fuel business data object; Rule matching module: collects 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 the preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.
[0018] In this embodiment, object analysis refers to analyzing historical contracts to determine the key fuel business data objects required in the coal contract generation system, which are key elements or data fields in the contract, such as coal type, quantity, price, delivery date, etc. For example, in the historical contract, it is determined that the coal type and delivery location are key data objects; In this embodiment, the first key fuel business data object is a key data object in the contract determined by object analysis. For example, for a coal contract generation system, the first key fuel business data object may be the type of coal and the place of delivery.
[0019] In this embodiment, demand analysis refers to a detailed analysis and definition of the functions and features required by the system. For example, the data such as coal type, quantity, price, etc. in the historical contracts are analyzed to determine the system requirements; In this embodiment, determining the rule base refers to identifying and establishing a set of rules used in the system, which are used to generate contracts based on input data. For example, it includes rules for determining prices based on different types of coal and delivery locations; In this embodiment, the RETE network is a data structure for rule matching and reasoning, which can effectively process a large number of rules. Based on a determined rule base and a first key fuel business data object, a RETE network is constructed to quickly match rules and generate contracts.
[0020] In this embodiment, the target generated contract refers to a new contract to be generated by the system. For example, the system may generate a new coal purchase contract according to the requirements input by the user; In this embodiment, the second key fuel business data object is another key data object related to the target generation contract, and is data of the same type as the second key fuel business data object. For example, in a new purchase contract, the delivery date and delivery location of coal may be the second key fuel business data object; In this embodiment, the first relevant data is data related to the second key fuel business data object. For example, in a purchase contract, the quantity and price of coal are the first relevant data.
[0021] In this embodiment, the preset algorithm refers to a predefined algorithm for processing matching results. For example, a weighted average algorithm is used to determine the price in the contract; 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 according to the delivery date and delivery location, and obtains the price information in the contract; 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 the quantity, price and other information of the coal based on the matching results and generates a preliminary contract draft.
[0022] The working principle and beneficial effects of the above technical solution are: by object analysis of historical contracts, key fuel business data objects are quickly determined, the efficiency and accuracy of analysis are improved, and the RETE network is constructed in combination with historical contracts and determined rule bases to achieve efficient management and application of rules, collect key business data objects required for target generation contracts, and match them through the RETE network, thereby achieving fast and accurate matching of rules, improving the accuracy of contract generation, processing matching results based on preset algorithms, and generating preliminary contract drafts according to the logic of the rule base, effectively shortening the contract generation cycle. Efficient and accurate generation of coal contracts is achieved, thereby improving the efficiency and quality of contract management.
[0023] Example 2 The embodiment of the present invention provides a coal contract generation system based on RETE algorithm, and a demand analysis module, including: Information extraction unit: extracts historical contracts from the preset contract management system and extracts key information from the texts in the historical contracts; Relationship acquisition unit: Analyze key information to obtain key entities involved in historical contracts, and perform association analysis on all key entities to determine the association relationship between key entities; Attribute assignment unit: assigns relevant attributes to each key entity based on a preset attribute assignment model; Object determination unit: performs a second analysis on the association relationship between key entities and related attributes of the key entities to determine the first key fuel business data object.
[0024] In this embodiment, the preset contract management system refers to a system for managing contracts that already exists before the coal contract generation system. The preset contract management system includes a database or software for storing historical contracts; In this embodiment, key information extraction refers to extracting important information in historical contracts from a preset contract management system, for example, extracting key information such as coal type, quantity, price, and delivery date from the contract text.
[0025] In this embodiment, the key entity refers to an entity that has an important position or role in the historical contract, such as the coal supplier, the purchaser, the delivery location, etc. For example, in a purchase contract, the coal supplier and the purchaser are key entities; In this embodiment, the association relationship between key entities refers to the mutual connection or dependency relationship between key entities. For example, in a contract, there is a supply relationship between the coal supplier and the purchaser, and there is a delivery relationship between the delivery location and the purchaser. These are the association relationships between key entities.
[0026] In this embodiment, the preset attribute assignment model refers to a method or algorithm for assigning 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 the coal supplier as an entity and assign attributes such as name, address, contact information, etc. to it; In this embodiment, the relevant attributes refer to the attributes or characteristics associated with each key entity. For example, the relevant attributes of a coal supplier may include its company size, reputation, historical transaction records, etc.
[0027] In this embodiment, the second analysis refers to the process of further analyzing and sorting the association relationship and related attributes between key entities in the object determination unit. In this process, the system may determine the first key fuel business data object, that is, the important data object that the system needs to process, based on the relationship and attributes between the key entities.
[0028] The working principle and beneficial effects of the above technical solution are: by extracting historical contracts from a preset contract management system and extracting key information from the texts of these contracts, a basis is provided for subsequent analysis and processing; by analyzing key information, key entities involved in historical contracts are determined, and the associations between these entities are analyzed, providing key information for subsequent data processing and object determination; by assigning relevant attributes to each key entity, and through further analysis of the associations and related attributes between key entities, the system can determine the first key fuel business data object, providing a clear data object model for subsequent contract generation and processing.
[0029] Example 3 The embodiment of the present invention provides a coal contract generation system based on RETE algorithm, a network construction module, including: Demand acquisition unit: Analyze historical contracts and obtain business requirements of contracts; Library construction unit: based on the preset conversion rule library, each business requirement of the contract is converted into a rule in a preset format, and a rule library is constructed based on all the rules; Network construction unit: based on the rules in the rule base, obtains several conditions in each rule, and constructs a RETE network in combination with the first key fuel business data object.
[0030] 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, the business requirements may include coal type, delivery date, delivery location, quantity, price, etc.; In this embodiment, the business requirements of a contract refer to specific business requirements or conditions involved in the contract. For example, the business requirements of a coal purchase contract may be to purchase X tons of coal, with a delivery date of XX year and XX month, a price of XX yuan per ton, and a delivery location of XX place.
[0031] In this embodiment, the preset conversion rule library refers to a predefined library for converting contract business requirements into a rule format that can be processed by the system. For example, converting contract business requirements into logical conditions, such as "coal type is A, delivery date is B, delivery location is C, then price is D"; In this embodiment, the rules in the preset format refer to the rules in the fixed format defined in the rule base, which are used to describe the contract business requirements that the system can understand and process. For example, the format of the rule may include a condition part and an action part. In the payment terms, the action may be to impose a fine on the payer. In the payment terms, the condition may be that the payment should be completed on a specific date. The rule format is: condition-action, using "if" in the condition part and "then" in the action part. The following rule is obtained: If the payment is not completed on the specified date, the payer will be fined; In this embodiment, the rule base is a place to store preset format rules, and the system generates and processes contracts according to 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.
[0032] The working principle and beneficial effects of the above technical solution are: by conducting demand analysis on historical contracts, the business requirements of each contract are accurately obtained, and based on the preset conversion rule library, the business requirements of each contract are converted into rules in a preset format, and a rule library is constructed based on these rules, which improves the flexibility and scalability of the system, obtains the conditions in each rule according to the rules in the rule library, and builds a RETE network in combination with the first key fuel business data object, which improves the response speed and processing capacity of the system, and improves the efficiency and accuracy of contract generation.
[0033] Example 4 The embodiment of the present invention provides a coal contract generation system based on RETE algorithm, and a demand acquisition unit, including: Consistent analysis block: performs consistent analysis on all different types of contracts to obtain consistent clauses in different types of contracts; First screening block: based on the consistency analysis results, the clauses in all contracts are screened first, and several first difference clauses in all contracts except all consistent clauses are obtained; The 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, and obtaining a number of second difference clauses reaching the preset occurrence frequency; Requirements determination block: Determine key terms based on all consistent terms and second difference terms, and determine the business requirements of the contract based on the key terms.
[0034] In this embodiment, different types refer to multiple different 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.; In this embodiment, consistency analysis is to analyze all different types of contracts to determine the commonalities or consistent clauses between them. Consistency analysis aims to identify clauses that appear frequently and have similar contents in various contracts; In this embodiment, consistent terms refer to terms with the same content or similar expressions in different types of contracts. For example, in a coal contract, consistent terms may include price, quantity, delivery date, etc.
[0035] In this embodiment, the first difference clause refers to the remaining clauses other than the consistent clauses after the consistency analysis, which appear in various contracts but may have different or more special contents. For example, in a purchase contract, in addition to the common price and delivery date, a specific supplier may have a special payment method or return policy; In this embodiment, the second difference clause refers to the clauses that are further screened out after the first screening, which have a certain frequency of occurrence but are not enough to be classified as consistent clauses. Through the second screening, the system can more accurately determine the difference clauses in various contracts. For example, in a sales contract, the warranty clauses of certain specific products may appear frequently but are not included in all contracts.
[0036] The working principle and beneficial effects of the above technical solution are as follows: based on the consistent analysis results, the system first screens the clauses in all contracts, filters out the first difference clauses except the consistent clauses, analyzes the frequency of occurrence of the first difference clauses, and performs a second screening based on a preset frequency threshold. The system can obtain the second difference clauses that reach the preset frequency, which helps the system identify and focus on the difference clauses with a higher frequency. Based on all consistent clauses and second difference clauses, the system can determine the key clauses and determine the business needs of the contract based on these key clauses. This helps the system accurately capture the key content and requirements of the contract, and provides an important basis for subsequent processing and generation.
[0037] Example 5 The embodiment of the present invention provides a coal contract generation system based on RETE algorithm, a network construction unit, including: Condition acquisition subunit: obtains several conditions in each rule in the rule base; Node creation subunit: when there is only a single condition in the corresponding rule, a first node is created for the single condition; Parsing subunit: When there are multiple conditions in the corresponding rule, perform attribute parsing on each condition in the corresponding rule, obtain the condition attributes of the corresponding condition, and then determine the primary and secondary conditions in each rule. At the same time, determine the relationship between all conditions under the corresponding rule according to the condition attributes of each condition; Node creation subunit: creates a first node for each primary condition in a rule and a second node for each secondary condition in a rule; The condition chain generation subunit: based on the relationship between all conditions in the corresponding rule, connects the first node and the second node under the corresponding rule to generate a first condition chain; Association analysis subunit: performs association analysis on all rules to obtain the association relationship between the rules; Connecting subunit: connecting the first nodes of all rules based on the association relationship between all rules, thereby generating a second condition chain; Network construction subunit: Based on the first condition chain and the second condition chain, and in combination with the mapping relationship between the first key fuel business data object and each rule, a RETE network is constructed.
[0038] 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 "the purchase quantity is greater than 1,000 tons", the first node will match the "purchase quantity" in this condition, which refers to the Alpha node here: used for testing a single condition, which is the most basic test in the rule.
[0039] In this embodiment, the attribute of the condition refers to the characteristics or properties of the object or event described by the condition. For example, in a rule, the condition is "the purchase quantity is greater than 1,000 tons", the attribute is "the purchase quantity", and its attribute value is "greater than 1,000 tons".
[0040] 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 condition of the rule. For example, in a rule, if the conditions are "the purchase quantity is greater than 1,000 tons" and "the delivery location is China", then "the purchase quantity" may be the primary condition and "the delivery location" may be the secondary condition.
[0041] In this embodiment, the second node is in the RETE network. The second node refers to a node connected to the first node, which is used to match the second condition in the rule. Here, it is a beta node: used for the relationship between multiple conditions, such as logical relationships such as AND and OR. When there are multiple conditions in a rule, these conditions can be connected through the Beta node to form a condition chain. For example, for the condition "if the order amount is greater than 1,000 US dollars and the customer is a VIP" in the rule, it is necessary to create a Beta node that connects the order amount greater than 1,000 US dollars and the customer is a VIP.
[0042] In this embodiment, the second analysis refers to analyzing the relationship between multiple conditions in the rule to determine the logical relationship between them, such as AND, OR, etc. Example: In a rule, if the condition is "the purchase quantity is greater than 1,000 tons and the delivery location is China", the second analysis may determine that the relationship between the two conditions is AND.
[0043] 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 "the purchase quantity is greater than 1,000 tons", the first condition chain may be the path from the first node to the node matching "the purchase quantity is greater than 1,000 tons"; In this embodiment, the second condition chain refers to the path from the second node to the subsequent node in the RETE network, which is used to match the second condition and subsequent conditions in the rule. For example, for a rule, if the condition is "the purchase quantity is greater than 1,000 tons and the delivery location is China", the second condition chain may be the path from the second node to the node matching "the delivery location is China".
[0044] The working principle and beneficial effects of the above technical solution are: by obtaining the conditions in each rule from the rule base and parsing the attributes of each condition, it is ensured that the system can fully understand the conditions in each rule, and 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 relationship of the conditions, corresponding nodes are created and condition chains are generated, which helps the system to quickly locate relevant conditions when matching rules and improves matching efficiency. By performing association analysis on all rules to understand the relationship between the rules, the nodes of all rules are connected based on these association relationships to build a RETE network, so that the system can better manage and organize the rules and optimize the efficiency of the condition matching process.
[0045] Example 6 The embodiment of the present invention provides a coal contract generation system based on RETE algorithm, wherein the condition determination subunit includes: Get the condition attributes of the corresponding conditions, and then determine the primary and secondary conditions in each rule. The first calculation block: Calculate the individual weight values of each sub-attribute in the condition attribute of each condition: ; in, is the individual weight value of the jth sub-attribute of the ith condition, Score the business importance of the jth sub-attribute of the ith condition, is the conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the ith condition, is the preset variation value of the j-th sub-attribute of the ith condition in the data, is the conversion coefficient corresponding to the preset variation value of the j-th sub-attribute of the ith condition in the data, is the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, is the conversion coefficient corresponding to the frequency of the jth sub-attribute of the ith condition in all conditions, is the initial attribute weight of the jth attribute of the ith condition, , are the mean and standard deviation of the frequency of the jth sub-attribute of the ith condition in all conditions, is the comprehensive impact adjustment factor of the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, and ; Weight value acquisition block: obtains the attribute weight value of the corresponding condition based on all the individual weight values of each condition; The second calculation block: Determine the priority of each condition based on the attribute weight value of each condition: ; in, is the judgment result of the i-th condition in the p-th rule, is the attribute weight value of the i-th condition in the p-th rule, n1 is the number of conditions in the p-th rule, is the average value of all sub-attributes in the pth rule, is the variance of all attribute weight values in the pth rule, is the variance adjustment coefficient of all attribute weight values in the pth rule, is the variance of all remaining attribute weight values in the p-th rule except the attribute weight value of the i-th condition.
[0046] 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 a decision or result. Example: In a coal contract generation system, a business importance score may be given to the condition "purchase quantity" based on market demand, supply conditions, and other factors, such as 10 points for very important, 5 points for moderately important, and so on; In this embodiment, the preset variation value refers to the setting of the variation degree of the attribute value based on historical data or professional knowledge. It is used to measure the volatility or difference of the attribute value. For example: for the condition "delivery location", if the historical data shows that the attribute value changes little, a lower preset variation coefficient can be set; if the attribute value changes greatly, a higher preset variation coefficient can be set.
[0047] The working principle and beneficial effects of the above technical solution are: 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, which enables the system to evaluate the importance of the attributes more objectively, obtain the comprehensive attribute weight value of all attributes of each condition, and calculate the attribute weight value of each condition accordingly, ensuring 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 generating more realistic coal contracts.
[0048] Example 7 An embodiment of the present 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.
[0049] 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 formulating a labor contract, ensure that the contract contains the minimum wage standard and working hours stipulated by local laws; In this embodiment, the business terms rule logic is: determining the business terms involved in the contract, such as payment terms, service delivery terms, etc. For example, when formulating a sales contract, determining business terms such as payment method, time and place of delivery of goods.
[0050] In this embodiment, the risk management rule logic is: identify and manage potential risks in the contract to reduce disputes and legal liabilities. For example, in a lease contract, the maintenance responsibility and damage compensation liability of the leased property are clearly defined to reduce the risks that the lessee may face.
[0051] In this embodiment, the language and expression rule logic: 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.
[0052] In this embodiment, the change and termination rule logic: specifies the conditions and procedures for contract change and termination, as well as the corresponding rights and obligations. For example, in a supply contract, specifies the procedures for changing an order and the additional costs involved in the change, as well as the conditions and notice period for both parties to terminate the contract.
[0053] The working principle and beneficial effects of the above technical solution are: through different rule logics, adjustments and modifications are made according to specific contract types, industry needs and legal requirements to ensure that the generated draft contract meets the expectations of both parties and is legal and enforceable. This reduces the probability of contract risks and disputes, and enhances the reliability and practicality of the contract generation system.
[0054] Example 8 like Figure 2 As shown, a coal contract generation method based on RETE algorithm provided by an embodiment of the present invention includes: Conduct object analysis on historical contracts to determine the first key fuel business data object; Conduct demand analysis on historical contracts and determine the rule base, and build a RETE network based on the rules in the rule base and in combination with the first key fuel business data object; Collecting first relevant data of a second key fuel business data object of a target generation contract, and matching 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.
[0055] The working principle and beneficial effects of the above technical solution are: by object analysis of historical contracts, key fuel business data objects are quickly determined, the efficiency and accuracy of analysis are improved, and the RETE network is constructed in combination with historical contracts and determined rule bases to achieve efficient management and application of rules, collect key business data objects required for target generation contracts, and match them through the RETE network, thereby achieving fast and accurate matching of rules, improving the accuracy of contract generation, processing matching results based on preset algorithms, and generating preliminary contract drafts according to the logic of the rule base, effectively shortening the contract generation cycle. Efficient and accurate generation of coal contracts is achieved, thereby improving the efficiency and quality of contract management.
[0056] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions 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 RETE algorithm, characterized in that: include: Demand analysis module: Analyze historical contracts to determine the first key fuel business data object; Network construction module: Analyze the needs of historical contracts and determine the rule base, and build the RETE network based on the rules in the rule base and the first key fuel business data object; Rule matching module: collects 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 the preset algorithm, and generates a preliminary draft of the contract based on the processing results and the rule logic of the rule base.
2. A coal contract generation system based on RETE algorithm according to claim 1, characterized in that: Requirements analysis module, including: Information extraction unit: extracts historical contracts from the preset contract management system and extracts key information from the texts in the historical contracts; Relationship acquisition unit: Analyze key information to obtain key entities involved in historical contracts, and perform association analysis on all key entities to determine the association relationship between key entities; Attribute assignment unit: assigns relevant attributes to each key entity based on a preset attribute assignment model; Object determination unit: performs a second analysis on the association relationship between key entities and related attributes of the key entities to determine the first key fuel business data object.
3. A coal contract generation system based on RETE algorithm according to claim 1, characterized in that: Network building blocks, including: Demand acquisition unit: Analyze historical contracts and obtain business requirements of contracts; Library construction unit: based on the preset conversion rule library, each business requirement of the contract is converted into a rule in a preset format, and a rule library is constructed based on all the rules; Network construction unit: based on the rules in the rule base, obtains several conditions in each rule, and constructs a RETE network in combination with the first key fuel business data object.
4. A coal contract generation system based on RETE algorithm according to claim 3, characterized in that: Demand acquisition unit, including: Consistent analysis block: performs consistent analysis on all different types of contracts to obtain consistent clauses in different types of contracts; First screening block: based on the consistency analysis results, the clauses in all contracts are screened first, and several first difference clauses in all contracts except all consistent clauses are obtained; The 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, and obtaining a number of second difference clauses reaching the preset occurrence frequency; Requirements determination block: Determine key terms based on all consistent terms and second difference terms, and determine the business requirements of the contract based on the key terms.
5. A coal contract generation system based on RETE algorithm according to claim 3, characterized in that: Network building blocks, including: Condition acquisition subunit: obtains several conditions in each rule in the rule base; Node creation subunit: when there is only a single condition in the corresponding rule, a first node is created for the single condition; Parsing subunit: When there are multiple conditions in the corresponding rule, perform attribute parsing on each condition in the corresponding rule, obtain the condition attributes of the corresponding condition, and then determine the primary and secondary conditions in each rule. At the same time, determine the relationship between all conditions under the corresponding rule according to the condition attributes of each condition; Node creation subunit: creates a first node for each primary condition in a rule and a second node for each secondary condition in a rule; The condition chain generation subunit: based on the relationship between all conditions in the corresponding rule, connects the first node and the second node under the corresponding rule to generate a first condition chain; Association analysis subunit: performs association analysis on all rules to obtain the association relationship between the rules; Connecting subunit: connecting the first nodes of all rules based on the association relationship between all rules, thereby generating a second condition chain; Network construction subunit: Based on the first condition chain and the second condition chain, and in combination with the mapping relationship between the first key fuel business data object and each rule, a RETE network is constructed.
6. A coal contract generation system based on RETE algorithm according to claim 5, characterized in that: Parsing subunit, including: Get the condition attributes of the corresponding conditions, and then determine the primary and secondary conditions in each rule. The first calculation block: Calculate the individual weight values of each sub-attribute in the condition attribute of each condition: ;in, is the individual weight value of the jth sub-attribute of the ith condition, Score the business importance of the jth sub-attribute of the ith condition, is the conversion coefficient corresponding to the business importance score of the j-th sub-attribute of the ith condition, is the preset variation value of the j-th sub-attribute of the ith condition in the data, is the conversion coefficient corresponding to the preset variation value of the j-th sub-attribute of the ith condition in the data, is the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, is the conversion coefficient corresponding to the frequency of the jth sub-attribute of the ith condition in all conditions, is the initial attribute weight of the jth attribute of the ith condition, , are the mean and standard deviation of the frequency of the jth sub-attribute of the ith condition in all conditions, is the comprehensive impact adjustment factor of the frequency of occurrence of the jth sub-attribute of the ith condition in all conditions, and ; Weight value acquisition block: obtains the attribute weight value of the corresponding condition based on all the individual weight values of each condition; The second calculation block: Determine the priority of each condition based on the attribute weight value of each condition: ;in, is the judgment result of the i-th condition in the p-th rule, is the attribute weight value of the i-th condition in the p-th rule, n1 is the number of conditions in the p-th rule, is the average value of all sub-attributes in the pth rule, is the variance of all attribute weight values in the pth rule, is the variance adjustment coefficient of all attribute weight values in the pth rule, is the variance of all remaining attribute weight values in the p-th rule except the attribute weight value of the i-th condition.
7. A coal contract generation system based on RETE algorithm according to claim 1, characterized in that: The preset rule logic includes: legal compliance rule logic, commercial terms rule logic, risk management rule logic, language rule logic, and change and termination rule logic.
8. A coal contract generation method based on RETE algorithm, characterized in that: include: Conduct object analysis on historical contracts to determine the first key fuel business data object; Conduct demand analysis on historical contracts and determine the rule base, and build a RETE network based on the rules in the rule base and in combination with the first key fuel business data object; Collecting first relevant data of a second key fuel business data object of a target generation contract, and matching 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
Method for determining and analyzing impact severity of event on a network
CN107077652A
Contract file analysis method and device, computer equipment and storage medium
CN110084105A
Contract grassing and revising method and device, storage medium and equipment
CN111932412A
