A rule engine establishment method based on attribute identification and device thereof

By establishing a dimension table for entity numbers and attribute identifier fields, the shortcomings of the rule engine in storage and matching efficiency are resolved, achieving efficient rule matching and dynamic combination, reducing energy consumption and simplifying rule maintenance.

CN114579569BActive Publication Date: 2025-12-26SUZHOU GADUN QUANSHENG INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210184124.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2025-12-26
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

Existing rule engines have shortcomings in storage and matching efficiency, especially when dealing with multiple entity knowledge parameter data, resulting in large storage space consumption, high energy consumption, and low matching efficiency.

Method used

By establishing a dimension table for entity IDs and an attribute identifier field, link tables and characteristic tables are formed, enabling the association and dynamic combination of entity attribute information and rule parameters, thereby improving matching efficiency and data extraction efficiency.

Benefits of technology

It improves rule matching efficiency, reduces system energy consumption, simplifies rule maintenance, and enables dynamic combination and rapid response of rules.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579569B_ABST
    Figure CN114579569B_ABST
Patent Text Reader

Abstract

The application relates to a rule engine establishment method based on attribute identification, which comprises the following steps: establishing a unique number for any entity related to system operation and forming a dimension table, recording attribute information and attribute identification fields of the entity; establishing a link table to allocate a unique number for each received order and storing the unique number; establishing a characteristic table based on the unique number, which is used for storing transaction records of the order, and entities related to the order are stored as entity numbers in the characteristic table; linking the corresponding dimension table through the entity number to obtain the attribute information and the attribute identification field of the entity; combining the corresponding attribute information to form input data according to requirements; combining the attribute identification fields to make rule parameters superimposed to form a new rule parameter group; and comparing the input data with the rule parameter group to obtain a reasoning result and storing the reasoning result. According to the application, the dimension table of each entity is established in advance, and the rule parameters are recorded in the dimension table, so that the rule parameters of the entity can be automatically matched when the entity is used, and the matching efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to data processing, more particularly, to a rule engine establishment method based on attribute identification and a device thereof. BACKGROUND

[0002] A rule engine is a component embedded in an application program or implanted in a chip, which realizes the separation of business decision from application code, and the rule is realized in a configurable manner. The rule needs to be applicable to various data attributes, easy to configure, and capable of fast matching and running.

[0003] A domain event graph construction method and device fusing multi-class affair logic and entity knowledge (CN110968700A) are disclosed in the related art, which comprises: affair logic relationship extraction and instance affair element extraction are performed on a domain corpus to form an instance affair logic knowledge base; an abstract concept knowledge base with a hierarchical structure is constructed; entity word abstraction and predicate abstraction are performed on instance events in the instance affair logic knowledge base by using the abstract concept knowledge base to form an abstract affair logic graph; entity linking is performed on the instance events in the instance affair logic knowledge base by using an entity knowledge graph and adopting an entity linking technology, event knowledge and entity knowledge are fused, and an affair logic knowledge graph is formed; the abstract affair logic graph and the affair logic knowledge graph are merged to form a domain event graph.

[0004] The rule engine has the following problems:

[0005] 1. The rule storage structure needs the support of a database, and the instance affair logic knowledge base and the hierarchical abstract concept knowledge base excessively occupy storage space and increase energy consumption.

[0006] 2. The rule matching capability is low, and the rule matching efficiency is low in the case of multiple entity knowledge parameter data. SUMMARY

[0007] The present application relates to data processing, more particularly, to a rule engine establishment method based on attribute identification and a device thereof.

[0008] Another object of the present application is to provide a rule judgment device based on attribute identification.

[0009] Technical scheme: A rule engine establishment method based on attribute identification is suitable for a production operation system,

[0010] S10, establishing an entity number for any entity involved in system operation and forming a dimension table, the dimension table recording attribute information of the entity; at the same time, an attribute identification field of the entity is established, which is used to store rule parameters;

[0011] S20, a link table is established, the link table assigns a unique number to each received order and stores the unique number;

[0012] S30, a characteristic table is established based on the order, the characteristic table is used to record transaction information of the order, entities involved in the transaction information of the order are stored as entity numbers in the characteristic table;

[0013] S40, corresponding dimension tables are linked through the entity numbers, entity attribute information and attribute identification fields are obtained;

[0014] S50, order information, transaction records and entity attribute information are combined to form input data according to user requirements, meanwhile, attribute identification fields of corresponding entities are obtained, and rule parameters in the attribute identification fields are combined to form a new rule parameter group;

[0015] S60, the input data is compared with the new rule parameter group, a reasoning result is obtained and the reasoning result is stored.

[0016] The rule parameters in step S10 are used for rule determination.

[0017] The step S30 comprises:

[0018] S31, a running scenario is preset based on any production link node involved in system running, and a characteristic table is established;

[0019] S32, a unique number is stored in the characteristic table, and the unique number is linked with the link table;

[0020] S33, entities involved in the characteristic table are recorded as entity numbers.

[0021] The step S40 comprises:

[0022] S41, the characteristic table links corresponding dimension tables through the entity numbers, and entity attribute information and attribute identification fields are obtained;

[0023] S42, the characteristic table links other characteristic tables through the unique numbers of the link table, and obtains entity attribute information and attribute identification fields of the other characteristic tables.

[0024] The step S50 comprises:

[0025] S51, a call instruction is received, order information, transaction records and entity attribute information are combined to form input data through the connection among the link table, the characteristic table and the dimension table;

[0026] S52, meanwhile, attribute identification fields of corresponding entities are indexed through the connection among the link table, the characteristic table and the dimension table, and rule parameters stored in the attribute identification fields are combined to form a new rule parameter group.

[0027] A rule judging device based on attribute identification, comprising

[0028] A combination module is configured to receive demand information, combine operation scenes according to the demand information, and obtain order information, transaction records, and entity attribute information to form input data; meanwhile, the combination module combines attribute identification fields corresponding to attribute information to superimpose rule parameters and form a new rule parameter group.

[0029] A comparison module is configured to compare the input data with the rule parameter group to obtain an inference result and store the inference result.

[0030] The device comprises a processing module configured to receive and store transaction records of orders.

[0031] The combination module comprises a data combination unit configured to combine order information, transaction records, and entity attribute information to form input data according to demand information by connecting tables, characteristic tables, and dimension tables; and the combination module comprises a rule parameter combination unit configured to combine attribute identification fields corresponding to attribute information to superimpose rule parameters and form a new rule parameter group.

[0032] The device comprises a rule unit configured to record comparison rules of the input data and the rule parameters.

[0033] A storage unit is configured to store comparison results generated based on the comparison rules according to unique numbers of orders, match corresponding characteristic table records, and store the results.

[0034] The device comprises a rule updating unit configured to change rule parameter data corresponding to entity attribute information to update rules.

[0035] Advantages: Compared with the prior art, the device has the following advantages:

[0036] 1. High matching efficiency: the device establishes a dimension table for each entity, records rule parameters in the dimension table, associates attribute information of the entity with the rule parameters, matches the entity with the rule, and improves the matching efficiency.

[0037] 2. Low system energy consumption: the device links dimension tables through entity numbers, records attribute information of the entity in the dimension tables, and automatically matches rule parameters with entity items.

[0038] 3. High data extraction efficiency: the device sets unique codes in a link table for each user demand, links a characteristic table with the link table through the unique codes, hard correlates entities with attribute information of the entities, and effectively improves the data extraction efficiency.

[0039] 4. Dynamic combination rule: the application establishes a dimension table for each entity, and the dimension table records attribute identification fields and rule parameters of the entity; meanwhile, the dimension table is linked with a characteristic table through an entity number, and when the characteristic table is combined according to requirements, the rule parameters of the entity can be directly obtained while the entity attribute information is obtained through the entity number, and each rule parameter is superimposed to form a new parameter group, so that the rule combination is fast and flexible;

[0040] 5. Simple rule maintenance: the application designs the rule parameters corresponding to the entity attributes as records in the dimension table, and the user can maintain the rules by adjusting the data in the corresponding records, which greatly simplifies the rule maintenance work. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 A flowchart of a rule engine establishment method based on attribute identification according to the application;

[0042] Figure 2 A structural schematic diagram according to the application;

[0043] Figure 3 A flowchart of step S30 in an embodiment of the application;

[0044] Figure 4 A flowchart of step S40 in an embodiment of the application;

[0045] Figure 5 A flowchart of step S50 in an embodiment of the application;

[0046] Figure 6 A structural schematic diagram of a rule judgment device based on attribute identification according to the application. DETAILED DESCRIPTION

[0047] Preferred embodiments of the present disclosure will be described in greater detail below with reference to the accompanying drawings. Although preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.

[0048] In order to better understand the present application, the meanings of the terms appearing in the text will be explained before the present application is described.

[0049] A rule engine is developed from an inference engine, and is a component embedded in an application program, which realizes separation of business decisions from application program codes, and writes business decisions using predefined semantic modules. Data input is accepted, business rules are interpreted, and business decisions are made according to business rules.

[0050] Currently, some risk control systems also separate the rule engine from the code of the application, but they are static rule engines and only adjust the switch or threshold value of the strategy, such as the switch of the verification code and the threshold value of the number of events in a certain time period. If a new strategy is added, it needs to be redesigned and developed from the code and configuration perspectives. The flexibility is still insufficient, and the static rule engine focuses on feature types and structures. Each feature and strategy needs to be specified separately in the configuration format, and future extended features also need to redesign the configuration format.

[0051] As Figure 1 shown, to solve the above problems, the embodiment of the present application provides a rule engine establishment method based on attribute identification,

[0052] S10, establishing an entity number for any entity involved in system operation and forming a dimension table, the dimension table recording attribute information of the entity; at the same time, establishing an attribute identification field of the entity, which is used to store rule parameters;

[0053] The running system, also known as the production system, refers to the information system supporting the daily business operation of the unit under normal circumstances. It includes production data, production data processing system and production network.

[0054] Establishing an entity number for any entity involved in system operation and forming a dimension table, the dimension table recording attribute information of the entity; making the production data, production data processing system and other data recorded by the system more perfect and comprehensive.

[0055] Regarding the rule parameters, the relationship between the system operation and the entity elements is extracted to form entity-relationship logic knowledge;

[0056] Based on the above entity-relationship logic knowledge, rule parameters are set for each entity to make it comply with the relationship logic, and the rule parameters are stored in the dimension table corresponding to the entity.

[0057] S20, establishing a link table, the link table allocating a unique number to each order received and storing it;

[0058] S30, establishing a feature table based on the unique number, the feature table being used to record transaction information of the order, the entity involved in the order transaction information being stored as an entity number in the feature table; as Figure 3 shown, specifically

[0059] The step S30 includes:

[0060] S31, based on any production link node involved in system operation, presetting a running scenario and establishing a feature table;

[0061] S32, the unique number is stored in the characteristic table, and the unique number is linked with the link table;

[0062] S33, the entity record involved in the characteristic table is an entity number.

[0063] S40, link the corresponding dimension table through the entity number to obtain entity attribute information and attribute identification field; as Figure 4 shown, step S40 is specifically:

[0064] S41, the characteristic table links the corresponding dimension table through the entity number; attribute information and attribute identification field of the entity are obtained;

[0065] S42, the characteristic table links other characteristic tables through the unique number of the link table to obtain entity attribute information and attribute identification field linked with other characteristic tables.

[0066] S50, according to user demand, combine order information, transaction record and entity attribute information to form input data; at the same time, the attribute identification field of the corresponding entity is obtained, and the rule parameters in it are combined to form new rule parameter group; as Figure 5 shown, specifically:

[0067] S51, receive the call instruction, combine order information, transaction record and entity attribute information to form input data through the connection among the link table, the characteristic table and the dimension table; specifically, receive user demand, determine the required order information according to the demand, the order information includes the unique number of the order, the unique number corresponding to the characteristic table, and the entity attribute information of the dimension table linked with the characteristic table; through the connection among the link table, the characteristic table and the dimension table, the required order information, transaction record and entity attribute information are combined to form input data.

[0068] S52, at the same time, through the connection index among the link table, the characteristic table and the dimension table to the attribute identification field of the corresponding entity, the rule parameters stored therein are combined to form a new rule parameter group. Specifically: the attribute identification field of the entity is obtained at the same time as the corresponding entity attribute information, so that the rule parameters stored therein are obtained; the rule parameters of multiple entities are combined to form a new rule parameter group, realizing the dynamic change of the rule.

[0069] S60, compare the input data with the new rule parameter group to obtain the reasoning result and store the result to the characteristic table or the link table.

[0070] as Figure 6 shown, a rule judgment device based on attribute identification, comprising

[0071] The combination module is configured to receive demand information, combine operation scenarios according to the demand information, obtain corresponding order information, transaction records and entity attribute information to form input data, and combine attribute identification fields corresponding to the entity attribute information to form a new rule parameter group.

[0072] Specifically, the method comprises the following steps:

[0073] a. presetting operation scenarios based on the field of the production operation system;

[0074] b. receiving orders and storing unique numbers thereof, expanding corresponding operation scenarios for the orders, and linking dimension tables corresponding to entities according to the scenarios;

[0075] c. receiving user demand, combining corresponding operation scenarios according to the user demand, and obtaining corresponding order information, transaction records and entity attribute information to form input data;

[0076] d. simultaneously, combining attribute identification fields corresponding to the entity attribute information to form a new rule parameter group.

[0077] The comparison module is configured to compare the input data with the new rule parameter group, obtain a reasoning result and store the reasoning result.

[0078] The rule judgment device comprises a processing module configured to receive and store transaction records of orders.

[0079] The combination module comprises a data combination unit configured to combine order information, transaction records and entity attribute information to form input data according to demand information by connecting tables, characteristic tables and dimension tables.

[0080] The combination module comprises a rule parameter combination unit configured to combine attribute identification fields corresponding to the entity attribute information to form a new rule parameter group.

[0081] The storage unit is configured to store a comparison result generated based on a comparison rule according to a unique number of an order, match a corresponding characteristic table record and store the result.

[0082] The rule unit is configured to record a comparison rule of input data and a rule parameter.

[0083] The storage unit is configured to store a comparison result generated based on a comparison rule according to a unique number of an order, match a corresponding characteristic table record and store the result.

[0084] The rule updating unit is configured to change rule parameter data corresponding to entity attribute information to update the rule.

[0085] Regarding the rule library:

[0086] Extracting the entity elements and the logic relationship of the system field to form the entity-logic knowledge;

[0087] 1. Extracting the relevant transaction records from the link table based on the executed transaction;

[0088] 2. Based on the link (matching attribute rules) of the characteristic table and the link table, obtaining the entity elements in the characteristic table required by the rules through the relevant transaction records extracted in step 1;

[0089] 3. Based on the link (matching reasoning rules) of the dimension table and the characteristic table, obtaining the attribute data of the related entity corresponding to the entity elements through the entity coding link dimension table through the entity elements corresponding to the characteristic table extracted in step 2;

[0090] 4. Establishing data combination rules, combining the transaction records corresponding to the transaction, the entity elements in the characteristic table, and the entity attribute data in the dimension table to form the input (data combination unit) of the reasoning rule, combining the corresponding attribute identification data content in the dimension table to form the rule parameter (parameter combination unit), and reasoning based on the input data and the rule parameter by the reasoning rule; forming the reasoning result;

[0091] 5. Based on the operation of the rules, storing the reasoning result in the relevant characteristic table or transaction link table to form the element transmission and the overall transition of the executed transaction state.

[0092] Embodiment 1

[0093] Taking the settlement of the order completed in the production system in the system as an example, according to the rules of the production system operation, the order completed in the production system needs to be settled, including the delivery settlement scene, and the delivery settlement scene should include order information, delivery information, customer information, consignee information, and product information;

[0094] According to the entities involved in the above content, a dimension table is established for each entity, and a customer information dimension table, a consignee information dimension table, and a product information dimension table (including purchase price and selling price) are established. A logistics information dimension table is also established, and the customer name, consignee name, and product name are linked with the order information characteristic table. The logistics number is linked with the delivery information characteristic table. At the same time, the attribute identification field and the rule parameter of the above-mentioned entities are recorded;

[0095] A link table is established to receive order information, and a unique number is established for each order to mark the order settlement state;

[0096] An order information characteristic table is established to store order-related information, including customer name, consignee name, product name, order quantity, and order unique number. The order information characteristic table is linked with the link table through the order unique number;

[0097] The order information characteristic table is linked with the customer information dimension table, the consignee information dimension table and the product information dimension table respectively through the customer name, the consignee name and the product name, and the attribute information of the entity is obtained.

[0098] An out-of-stock information characteristic table is established to store the out-of-stock related information, including the order unique number, the out-of-stock quantity, the logistics information and the like; the out-of-stock information is linked with the linking table through the unique number of the order;

[0099] The out-of-stock information characteristic table is linked with the out-of-stock information characteristic table through the logistics number;

[0100] When the cumulative out-of-stock quantity comparison is equal to the order quantity, a settlement operation is performed, and a settlement operation rule is established based on this scenario:

[0101] The order record in which the cumulative out-of-stock quantity comparison is equal to the order quantity and the settlement state is not settled is extracted from the system;

[0102] The order record in the order information characteristic table and the out-of-stock record in the out-of-stock information characteristic table are extracted through the unique order number in the corresponding order record;

[0103] The relevant attribute data is extracted through the customer information dimension table, the consignee information dimension table, the product information dimension table and the logistics information dimension table linked by the order information characteristic table and the out-of-stock information characteristic table, and the input data of the settlement rule is formed by combination;

[0104] The rule parameters of the customer settlement mode in the customer information dimension table, the consignee address rule parameters in the consignee information dimension table, the product price rule parameters in the product information dimension table and the logistics cost rule parameters in the logistics information dimension table are combined to form a settlement rule parameter group, and the settlement rule is based on the input data and the rule parameters to perform settlement; the settlement result is formed;

[0105] The settlement result includes the settlement state of the completed order and the order settlement amount (purchase price, selling price),

[0106] The order settlement state is used to update the settlement state in the linking table,

[0107] The order settlement amount is output as a purchase statement and an out-of-stock statement.

[0108] Rule update: change the data corresponding to the attribute, and then update the rule.

[0109] Through the above description of the embodiments, those skilled in the art can clearly understand that the present application can be realized by means of software and necessary universal hardware, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the form of a part of the prior art that makes a contribution. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disk, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application.

[0110] It is worth noting that in the above embodiments, each unit and module included is only divided according to functional logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy mutual differentiation, and do not limit the protection scope of the present application.

[0111] The above are only preferred embodiments of the present application and the technical principles applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A rule engine establishment method based on attribute identification, suitable for a production operation system, characterized in that: S10, an entity number is established for any entity involved in system operation, and a dimension table is formed, which records attribute information of the entity; at the same time, an attribute identification field of the entity is established, which is used to store rule parameters; S20, a link table is established, which assigns a unique number to each order received and stores it; S30, a feature table is established based on the order, which is used to record transaction information of the order, and entities involved in the transaction information of the order are stored as entity numbers in the feature table; S40, the corresponding dimension table is linked through the entity number to obtain entity attribute information and attribute identification field; S50, according to user demand, order information, transaction record and entity attribute information are combined to form input data; at the same time, the attribute identification field of the corresponding entity is obtained, and the rule parameters in it are combined to form a new rule parameter group, specifically: S51, a call instruction is received, and order information, transaction record and entity attribute information are combined to form input data through the connection among the link table, the feature table and the dimension table; S52, at the same time, the attribute identification field of the corresponding entity is indexed through the connection among the link table, the feature table and the dimension table, and the rule parameters stored therein are combined to form a new rule parameter group; S60, the input data is compared with the new rule parameter group to obtain a reasoning result and store the result.

2. The method of claim 1, wherein: The rule parameters in step S10 are used for rule determination.

3. The method of claim 1, wherein the method further comprises: The step S30 includes: S31, based on any production link node involved in system operation, a preset running scenario is established, and a feature table is established; S32, a unique number is stored in the feature table, and the unique number is linked with the link table; S33, the entity involved in the feature table is recorded as an entity number.

4. The method of claim 1 or 3, wherein: The step S40 includes: S41, the feature table links the corresponding dimension table through the entity number to obtain entity attribute information and attribute identification field; S42, the feature table links other feature tables through the unique number of the link table to obtain entity attribute information and attribute identification field linked with other feature tables.

5. An attribute-based identification rule judging apparatus, characterized by comprising: It includes A combination module: an entity number is established for any entity involved in system operation, and a dimension table is formed, which records attribute information of the entity; at the same time, an attribute identification field of the entity is established, which is used to store rule parameters; A link table is established, which assigns a unique number to each order received and stores it; A feature table is established based on the order, which is used to record transaction information of the order, and entities involved in the transaction information of the order are stored as entity numbers in the feature table; The corresponding dimension table is linked through the entity number to obtain entity attribute information and attribute identification field; According to user demand, order information, transaction record and entity attribute information are combined to form input data; at the same time, the attribute identification field of the corresponding entity is obtained, and the rule parameters in it are combined to form a new rule parameter group, specifically: A call instruction is received, and order information, transaction record and entity attribute information are combined to form input data through the connection among the link table, the feature table and the dimension table; Meanwhile, the rule parameters stored in the linking table, the characteristic table and the dimension table are combined to form a new rule parameter group by linking indexes to the attribute identification fields of the corresponding entities; The input data is compared with the new rule parameter group to obtain a reasoning result and store the result; The demand information is received, and a running scene is combined according to the demand information to obtain order information, transaction records and entity attribute information, which are combined to form input data; meanwhile, the attribute identification fields corresponding to the attribute information are combined to make the rule parameters superimposed, thereby forming a new rule parameter group; A comparison module is configured to compare the input data with the rule parameter group to obtain a reasoning result and store the result.

6. The attribute-based identification rule judging apparatus according to claim 5, characterized in that: The processing module is configured to receive and store transaction records of orders.

7. The attribute-based identification rule judging apparatus according to claim 5, characterized in that: The rule unit is configured to record comparison rules of the input data and the rule parameters; and the storage unit is configured to store comparison results generated based on the comparison rules, match corresponding characteristic table records according to unique numbers of the orders, and store the results.

8. The attribute-based identification rule judging apparatus according to claim 5, characterized in that: The rule updating unit is configured to change rule parameter data corresponding to the entity attribute information to update the rules.

Citation Information

Patent Citations

  • Domain event graph construction method and device fusing multiple types of facts and entity knowledge

    CN110968700A

  • Query implementation method based on a business entity

    CN109840256A

  • Account statement generation method and processing device based on business process management (BPM)

    CN111382928A