Intelligent rule engine system and method based on AI Agent
By introducing AI Agent and machine learning technology into the rule engine system, the automatic learning and updating of rules is solved, and the traditional rule engine lacks flexibility, intelligence and universality are improved, and the accuracy and adaptability of decisions are improved.
Patent Information
- Application Number
- CN202311422864.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2025-02-28
AI Technical Summary
The existing rule engine technology is not flexible, intelligent and versatile, and it is difficult to adapt to complex business scenarios and rapidly changing business needs.
The intelligent rule engine system based on AI Agent is adopted to realize automatic learning and update of rules through machine learning and other technologies, combining modular design and component design to improve the accuracy and flexibility of decision-making.
It improves the accuracy and flexibility of decision-making, can learn and adjust according to actual conditions, adapt to a variety of business scenarios, and reduces the time and cost of rule base updates.
Smart Images

Figure CN119539035A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer system technology, and in particular to an AI Agent-based intelligent rule engine system and method. Background Art
[0002] With the development of computer technology, rule engine technology has gradually become popular and has been widely used in various fields. It can separate business rules from application code and use predefined semantic modules to write business decisions. The rule engine can receive data input, interpret business rules, and make business decisions based on business rules. One of the most important advantages of the rule engine is that it can realize the configuration of conditions and behavior actions without having to go through the process of writing code, testing, and publishing every time the conditions or behaviors are changed.
[0003] Rule engines are used in many areas, including:
[0004] Business Process Management: Can be used to automate business processes such as order processing, customer service, and risk management.
[0005] Data Analysis: Rules engines can be used for data analysis, such as fraud detection, recommendation systems, and anomaly detection.
[0006] Artificial Intelligence: Rules engines can be used for artificial intelligence applications such as natural language processing and machine learning.
[0007] The rule engine is responsible for determining whether the conditions are met and then executing different actions based on the determination results. For example, in member marketing, if a member has logged in for more than 10 consecutive days or the order amount is more than 200 yuan (condition), the system will automatically issue a coupon to the user (action).
[0008] After massive searches, it was found that the prior art publication number is CN116048484A, which discloses a general rule engine system and a general rule engine system processing method. The engine system includes: a rule design module, which is used to define the basic information of the rule element and complete the functional design of the rule element. The rule element is a business unit with a single responsibility, and the rule element ID is called to combine different rule elements to form the required rule components, and to combine the rule components and / or rule elements into the required business rules; a data operation module, which is used to configure the data source required for the rule element entry, and save the rule element execution process data and execution results; a rule engine module, which executes the business rules, and passes the business rule execution process data and execution results to the data operation module, and sends the business rule execution results to the calling end. This application designs and assembles rule elements through a graphical operation interface, lowers the threshold for developers, and increases the reuse of rule elements.
[0009] A rule engine is a software system used to automatically execute decisions given a set of facts and rules. A rule engine consists of three parts: a rule base, an inference engine, and an action executor. The rule base stores various condition-action rules, the inference engine is responsible for matching rules and executing corresponding actions, and the action executor performs the operations defined in the rules.
[0010] The existing rule engine technologies are mainly the following:
[0011] Rule engine based on rule language: This rule engine uses a dedicated rule language to define rules. Common rule languages include Drools' DSL rule language and JRules' RuleML rule language.
[0012] Scripting language-based rule engines: This type of rule engine uses a general-purpose scripting language to define rules. Common scripting languages include JavaScript, Python, and Java.
[0013] Flowchart-based rule engines: This type of rule engine uses flowcharts to define rules.
[0014] Among the mature rule engines currently on the market, the compiled ones include DROOLS, and the interpreted ones include QLEXPRESS, GROOVY, JEXL, etc.
[0015] The shortcomings of traditional rule engines are mainly as follows:
[0016] Inflexible: The rules of traditional rule engines are static and need to be manually written and maintained. As business needs change, the rule base needs to be constantly updated, which is a time-consuming and labor-intensive task.
[0017] Not smart enough: Traditional rule engines can only make decisions based on existing rules and cannot learn and adjust according to actual conditions. In complex business scenarios, traditional rule engines may not be able to make correct decisions.
[0018] Not universal enough: The rules of traditional rule engines are based on specific business scenarios and are difficult to adapt to the needs of different business scenarios. For example, a rule engine used for financial fraud detection may not be directly used for insurance claims review.
[0019] In view of the above-mentioned defects, the designers actively carried out research and innovation in order to create an intelligent rule engine system and method based on AI Agent to make it more valuable for industrial use. Summary of the invention
[0020] In order to solve the above technical problems, the purpose of the present invention is to provide an intelligent rule engine system and method based on AI Agent.
[0021] To achieve the above object, the present invention adopts the following technical solution:
[0022] One of the purposes of the present invention:
[0023] An AI Agent-based intelligent rule engine system, comprising a rule engine unit;
[0024] Also included is an AI Agent interaction unit connected to the rule engine unit;
[0025] The rule engine unit includes:
[0026] Rule definition module: responsible for providing rule definition language and tools for business personnel to write rules;
[0027] Rule parsing module: includes a rule parser for parsing rule text into internal data structures, and a grammar validator for verifying the correctness of rule grammar to prevent users from entering incorrect rules;
[0028] Condition evaluation module: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced;
[0029] Action execution module: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed;
[0030] AI Agent interaction units include:
[0031] Data module: responsible for storing and managing rule models and rule execution results;
[0032] Training module: responsible for training and optimizing the rule model;
[0033] Inference module: responsible for loading the trained model into memory and providing a service interface for external system calls; receiving requests from external systems, using the loaded model for inference, and generating decision results; post-processing the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements;
[0034] Rule execution module: responsible for executing rules according to the rule model;
[0035] Intelligent decision-making module: responsible for processing the results returned by the AI Agent, interpreting the output of the AI Agent, converting it into executable actions or suggestions, and passing the results to the action execution module;
[0036] Self-learning and optimization module: performs adaptive learning and model optimization based on new task feedback during runtime.
[0037] As a further improvement of the present invention, the rule engine unit further includes a basic service module, and the basic service module includes:
[0038] Event Registration Center: Provides dynamic event registration capabilities to meet the needs of business system scenarios and supports new event registration into the rule engine as a new trigger opportunity;
[0039] Entity Management Center: The relationship between objects and object attributes is used as the parameters of the rule set. The rule parameters are systematically managed. The rule engine is not aware of changes in the business system field, and effective management of entities and attribute sets is achieved.
[0040] As a further improvement of the present invention, the AI Agent interaction unit also includes a monitoring and management module for automatically monitoring execution performance and decision accuracy, which can trigger an automatic adjustment strategy when performance degrades or accuracy decreases.
[0041] As a further improvement of the present invention, the AI Agent interaction unit also includes a security and privacy module.
[0042] As a further improvement of the present invention, the rule definition module specifically includes:
[0043] Rule syntax definition: defines the syntax of the rule, including but not limited to the structure of the conditional expression and the format of the action;
[0044] Rule storage format: Determine the persistence format of the rules, including but not limited to JSON and XML;
[0045] Rule version management: supports the creation, editing, deletion and rollback of rule versions.
[0046] As a further improvement of the present invention, the data module specifically includes:
[0047] Data access module: responsible for collecting data from various data sources for training and inference;
[0048] Data preprocessor: Perform preprocessing operations on the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction.
[0049] As a further improvement of the present invention, the training module specifically includes:
[0050] Feature engineering: perform feature selection, transformation, and extraction operations to extract useful features;
[0051] Model selection: Select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements;
[0052] Training algorithm: Use appropriate optimization algorithms and loss functions to train the model;
[0053] Model evaluation: Evaluate the trained model and select the model with the best performance.
[0054] The second purpose of the present invention is:
[0055] A method of an intelligent rule engine system based on AI Agent, comprising:
[0056] Rule definition steps: including rule syntax definition, rule storage format and rule version management;
[0057] Rule parsing step: including a rule parser for parsing the rule text into an internal data structure, and a grammar validator for verifying the correctness of the rule grammar to prevent users from entering incorrect rules;
[0058] Condition evaluation step: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced;
[0059] Action execution step: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed;
[0060] Data processing steps: store and manage rule models and rule execution results;
[0061] Training step: training and optimizing the rule model;
[0062] Inference step: Load the trained model into memory and provide a service interface for external system calls; receive requests from external systems, use the loaded model for inference, and generate decision results; post-process the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements;
[0063] Rule execution step: execute rules according to the rule model;
[0064] Intelligent decision-making step: Process the results returned by the AI Agent, interpret the output of the AI Agent, convert it into executable actions or suggestions, and pass the results to the action execution module;
[0065] Self-learning and optimization step: Adaptive learning and model optimization are performed based on new task feedback during runtime.
[0066] As a further improvement of the present invention, it also includes a monitoring and management step: automatically monitoring the execution performance and decision accuracy, and when the performance decreases or the accuracy decreases, the automatic adjustment strategy can be triggered.
[0067] As a further improvement of the present invention, the data processing step specifically includes:
[0068] Data access step: collect data from various data sources for training and inference;
[0069] Data preprocessing step: preprocess the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction;
[0070] The training steps specifically include:
[0071] Feature engineering steps: perform feature selection, transformation, and extraction operations to extract useful features;
[0072] Model selection step: select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements;
[0073] Training algorithm steps: Use appropriate optimization algorithms and loss functions to train the model;
[0074] Model evaluation step: Evaluate the trained model and select the model with the best performance.
[0075] By means of the above scheme, the present invention has at least the following advantages:
[0076] The present invention combines the construction of a general intelligent rule engine system with AI Agent. The intelligent rule engine can automatically learn and update rules through machine learning and other technologies, thereby improving the accuracy and flexibility of decision-making.
[0077] Flexibility: The intelligent rule engine can learn and adjust according to actual conditions, thereby improving the flexibility of decision-making.
[0078] Intelligence: The intelligent rule engine can learn from historical data to improve the accuracy of decision-making.
[0079] Versatility: Modular and component-based designs are adopted to improve the universality of coverage of multiple business scenarios.
[0080] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0082] Figure 1 It is a schematic diagram of an AI Agent-based intelligent rule engine system framework A of the present invention;
[0083] Figure 2 It is a schematic diagram of an intelligent rule engine system framework B based on AI Agent of the present invention. DETAILED DESCRIPTION
[0084] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0085] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, rather than all the embodiments. The components of the embodiment of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiment of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected embodiment of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0086] Example
[0087] like Figure 1-2 As shown,
[0088] One of the purposes of the present invention:
[0089] An AI Agent-based intelligent rule engine system, comprising a rule engine unit;
[0090] Also included is an AI Agent interaction unit connected to the rule engine unit;
[0091] The rule engine unit includes:
[0092] Rule definition module: responsible for providing rule definition language and tools for business personnel to write rules;
[0093] Rule parsing module: includes a rule parser for parsing rule text into internal data structures, and a grammar validator for verifying the correctness of rule grammar to prevent users from entering incorrect rules;
[0094] Condition evaluation module: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced;
[0095] Action execution module: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed;
[0096] AI Agent interaction units include:
[0097] Data module: responsible for storing and managing rule models and rule execution results;
[0098] Training module: responsible for training and optimizing the rule model;
[0099] Inference module: responsible for loading the trained model into memory and providing a service interface for external system calls; receiving requests from external systems, using the loaded model for inference, and generating decision results; post-processing the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements;
[0100] Rule execution module: responsible for executing rules according to the rule model;
[0101] Intelligent decision-making module: responsible for processing the results returned by the AI Agent, interpreting the output of the AI Agent, converting it into executable actions or suggestions, and passing the results to the action execution module;
[0102] Self-learning and optimization module: performs adaptive learning and model optimization based on new task feedback during runtime.
[0103] Preferably, the rule engine unit further includes a basic service module, and the basic service module includes:
[0104] Event Registration Center: Provides dynamic event registration capabilities to meet the needs of business system scenarios and supports new event registration into the rule engine as a new trigger opportunity;
[0105] Entity Management Center: The relationship between objects and object attributes is used as the parameters of the rule set. The rule parameters are systematically managed. The rule engine is not aware of changes in the business system field, and effective management of entities and attribute sets is achieved.
[0106] Preferably, the AI Agent interaction unit also includes a monitoring and management module for automatically monitoring execution performance and decision accuracy, which can trigger automatic adjustment strategies when performance degrades or accuracy decreases.
[0107] Preferably, the AI Agent interaction unit also includes a security and privacy module.
[0108] Preferably, the rule definition module specifically includes:
[0109] Rule syntax definition: defines the syntax of the rule, including but not limited to the structure of the conditional expression and the format of the action;
[0110] Rule storage format: Determine the persistence format of the rules, including but not limited to JSON and XML;
[0111] Rule version management: supports the creation, editing, deletion and rollback of rule versions.
[0112] Preferably, the data module specifically includes:
[0113] Data access module: responsible for collecting data from various data sources for training and inference;
[0114] Data preprocessor: Perform preprocessing operations on the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction.
[0115] Preferably, the training module specifically includes:
[0116] Feature engineering: perform feature selection, transformation, and extraction operations to extract useful features;
[0117] Model selection: Select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements;
[0118] Training algorithm: Use appropriate optimization algorithms and loss functions to train the model;
[0119] Model evaluation: Evaluate the trained model and select the model with the best performance.
[0120] The second purpose of the present invention is:
[0121] A method of an intelligent rule engine system based on AI Agent, comprising:
[0122] Rule definition steps: including rule syntax definition, rule storage format and rule version management;
[0123] Rule parsing step: including a rule parser for parsing the rule text into an internal data structure, and a grammar validator for verifying the correctness of the rule grammar to prevent users from entering incorrect rules;
[0124] Condition evaluation step: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced;
[0125] Action execution step: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed;
[0126] Data processing steps: store and manage rule models and rule execution results;
[0127] Training step: training and optimizing the rule model;
[0128] Inference step: Load the trained model into memory and provide a service interface for external system calls; receive requests from external systems, use the loaded model for inference, and generate decision results; post-process the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements;
[0129] Rule execution step: execute rules according to the rule model;
[0130] Intelligent decision-making step: Process the results returned by the AI Agent, interpret the output of the AI Agent, convert it into executable actions or suggestions, and pass the results to the action execution module;
[0131] Self-learning and optimization step: Adaptive learning and model optimization are performed based on new task feedback during runtime.
[0132] Preferably, it also includes a monitoring and management step: automatically monitoring the execution performance and decision accuracy, and triggering an automatic adjustment strategy when the performance degrades or the accuracy decreases.
[0133] Preferably, the data processing step specifically includes:
[0134] Data access step: collect data from various data sources for training and inference;
[0135] Data preprocessing step: preprocess the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction;
[0136] The training steps specifically include:
[0137] Feature engineering steps: perform feature selection, transformation, and extraction operations to extract useful features;
[0138] Model selection step: select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements;
[0139] Training algorithm steps: Use appropriate optimization algorithms and loss functions to train the model;
[0140] Model evaluation step: Evaluate the trained model and select the model with the best performance.
[0141] The first embodiment of the present invention:
[0142] the term:
[0143] Rule: refers to the abstraction of business logic, which becomes the standardized logic and algorithm followed by more general business operations.
[0144] Rule Engine: It refers to the core system that enables business logic programs to operate in accordance with rules. The main paradigm is to achieve xx conditions and execute xx actions.
[0145] Fact: The relationship between objects and their attributes
[0146] Rule: A reasoning statement consisting of a condition and a conclusion, generally expressed as if...then. The if part of a rule is called LHS, and the then part is called RHS.
[0147] Module: refers to the condition of the IF statement. Here, the IF condition may be a large condition composed of several smaller conditions. The module refers to the smallest atomic condition that cannot be further divided.
[0148] (I) The core of the rule engine unit
[0149] The technical solution of the present invention provides rule definition, rule parsing, condition evaluation, action execution, etc., and mainly includes the following parts:
[0150] 1. Rule definition: responsible for providing rule definition language and tools for business personnel to write rules.
[0151] Rule syntax definition: defines the syntax of the rule, such as the structure of the conditional expression and the format of the action.
[0152] Rule storage format: Determine the persistence format of the rules, which can be JSON, XML, etc.
[0153] Rule version management: supports the creation, editing, deletion and rollback of rule versions.
[0154] Implementation: Provides a visual rule editor, which is based on a web browser and has an overall modular design. The editor consists of several sub-modules: rule name, rule event trigger, trigger condition group editing area, and execution action.
[0155] 2. Rule analysis
[0156] Rule parser: Implements a parser that parses rule text into internal data structures.
[0157] Syntax validator: Verify the correctness of the rule syntax to prevent users from entering incorrect rules.
[0158] 3. Condition evaluation
[0159] Conditional interpreter: interprets conditional expressions and translates the conditions into executable code.
[0160] Data context management: Manage the data context when the rule is executed to ensure that the data in the condition can be correctly referenced.
[0161] 4. Action Execution
[0162] Action executor: executes actions that meet the conditions, which can be calling the interface of the business system, triggering events, etc.
[0163] Action parameter parsing: Parse the parameters in the action to ensure that the parameters are passed correctly when the action is executed.
[0164] 5. Basic services
[0165] Event Registration Center: Provides dynamic event registration capabilities to meet the needs of business system scenarios and supports new event registration into the rule engine as a new trigger opportunity.
[0166] Entity Management Center: The relationship between objects and object attributes. As the parameters of the rule set, the rule parameters need to be systematically managed. The rule engine should be able to be insensitive to changes in the business system and achieve effective management of entities and attribute sets.
[0167] (II) AIAgent Interactive Service
[0168] 1. AI-based rule compilation module
[0169] The connection with AIAgent service domain adds the following functions based on the original rule compilation module:
[0170] Supports serialization and deserialization of rule models to transfer rule models to large model AI Agent services.
[0171] Supports the interpretation function of the rule model so that the large model AI Agent service can understand the meaning of the rule model.
[0172] 2. AI-based rule execution module
[0173] Based on the original rule execution module, the following functions are added:
[0174] (1) Expanded Condition Assessment Services
[0175] Supports the interpretation function of rule execution results so that the large model AI Agent service can understand the rule execution results. In the condition evaluation service, an intelligent condition interpreter is introduced, which can understand more complex condition logic and interact with the AI Agent. When the rule contains complex conditions, the system will request the AI Agent to provide the evaluation results.
[0176] (2) Introducing the AI Agent interface
[0177] Design an AI Agent interface for communicating with an external big model service. Support the deserialization function of rule execution results so that the rule execution results can be returned to the big model AI Agent service. The interface should support the rule engine to provide questions to the AI Agent and receive intelligent decision results from the AI Agent.
[0178] 3. Self-learning and intelligent decision-making
[0179] (1) Data collection and feedback
[0180] The rule engine regularly transmits the execution results and user feedback to the AI Agent for training. In this way, the AI Agent can adjust its decision-making strategy based on the actual execution situation and user feedback.
[0181] (2) Intelligent decision-making module
[0182] An intelligent decision-making module is introduced to process the results returned by the AI Agent. This module can interpret the output of the AI Agent, convert it into executable actions or suggestions, and pass the results to the action execution service.
[0183] (III) AI Agent Service Core:
[0184] Framework A: AI Agent includes planning, memory, and tool use.
[0185] 1. Data module
[0186] The data module is responsible for storing and managing rule models and rule execution results. The data module can use relational databases, NoSQL databases, or cloud storage to store data.
[0187] Data access module: responsible for collecting data from various data sources (databases, files, APIs, etc.) for training and inference.
[0188] Data preprocessor: performs preprocessing operations such as cleaning, normalization, and feature extraction on the collected data to facilitate subsequent model training and inference.
[0189] 2. Training Module
[0190] The model module is responsible for training and optimizing the rule model. The model module can use machine learning, deep learning and other technologies to train the model.
[0191] Feature engineering: Perform operations such as feature selection, transformation, and extraction to extract useful features.
[0192] Model selection: Select appropriate algorithms and model structures, such as deep learning models, machine learning models, etc., according to task requirements.
[0193] Training algorithm: Use appropriate optimization algorithms and loss functions to train the model.
[0194] Model evaluation: Evaluate the trained model and select the model with the best performance.
[0195] 3. Inference module
[0196] Model loading and deployment: responsible for loading the trained model into memory and providing a service interface for external system calls.
[0197] Inference engine: receives requests from external systems, uses the loaded model for inference, and generates decision results.
[0198] Result post-processing: Post-process the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements.
[0199] 4. Execution module
[0200] The execution module is responsible for executing rules according to the rule model. The execution module can execute rules in a streaming or batch processing manner.
[0201] Timing: task reception and parsing to feature processing and input to model inference to output processing and transmission to task reception and parsing:
[0202] Task receiver: Receives task requests from the rule engine or other services.
[0203] Task Parser: Parses task requests, identifying the task type and required information.
[0204] Output processing and delivery:
[0205] Result post-processing: Post-process the inference results, which may include normalization, classification label interpretation, conversion, etc.
[0206] Result delivery: The final decision result is delivered to the action execution service or other related services of the rule engine.
[0207] AI Agent execution module capabilities:
[0208] Multi-tasking support: Ability to handle multiple task requests simultaneously, ensuring efficient concurrent processing capabilities.
[0209] Online learning: Ability to perform adaptive learning and model optimization based on new task feedback at runtime.
[0210] Explainability: Provide explanations for decisions, be able to explain the decision basis of the model, and enable users to understand the decision-making process of the AI Agent.
[0211] Persistence: It has the ability to persist models and states, ensuring the secure storage of models and historical learning data.
[0212] Self-monitoring and adjustment: It can automatically monitor execution performance and decision accuracy, and trigger automatic adjustment strategies when performance or accuracy decreases.
[0213] Handling uncertainty: Able to handle uncertainty in input data, including missing data, noisy data, etc., and able to produce robust output results.
[0214] Automatic model selection: It has the ability to automatically select the appropriate model according to the task type to meet the needs of different types of tasks.
[0215] The above are the designs and capabilities of the AI Agent execution module. These capabilities will make the AI Agent more flexible, intelligent, and reliable, able to adapt to diverse task requirements, and continuously optimize its own performance and accuracy during runtime.
[0216] Applying the above intelligent rule engine system can bring:
[0217] 1. Achieve technical upgrades and make the rule engine more intelligent. LLM brings the ability of empirical judgment and reasoning to the rule engine, which enables the rule engine to upgrade from a simple rule-driven to a certain judgment and decision-making ability in the realization of automated business processes. LLM is like the brain and the rule engine is like the limbs. It is more intelligent than the traditional rule engine.
[0218] 2. Expand the boundaries of capabilities and broaden application scenarios. The introduction of LLM enables the rule engine to gradually transition from a logical and regular repetitive capability model to an autonomous composite capability model such as logical reasoning, abstract summarization, and intent recognition. This will greatly broaden its application scenarios, going beyond traditional structured tasks and being applied to more unstructured data processing tasks, and being able to adapt to more scenarios.
[0219] The rule engine has been successfully applied in the following areas:
[0220] Through the rule engine framework, we have quickly realized the development and implementation of business scenarios such as automatic lead allocation rules, automatic lead pool entry rules, automatic labeling rules for corporate WeChat friend relationships, automatic lead labeling rules, and student service allocation rules.
[0221] Intelligent implementation scenarios:
[0222] In the work order scenario, due to the diversity and richness of user feedback issues, AI Agent is introduced to solve the problem that user problems cannot be exhaustively classified. Through self-learning capabilities, intelligent entities are connected to make intelligent judgments on work orders, identify business priorities and problem attribution, and intelligently route them to the corresponding handlers.
[0223] In addition, if Figure 2 , Framework B: AI Agent includes several parts: product model (Profile), memory (Memory), planning (Planning), and action (Action).
[0224] The intelligent rule engine system proposes a breakthrough integration of the rule engine action and the AI Agent action; emphasizes the scalability and versatility of the rule engine framework construction; and emphasizes that the rule engine supports multiple types such as rule sets, decision trees, process canvases, etc., so as to meet multi-scenario capabilities.
[0225] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and the like are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly referring to the number of technical features indicated. Thus, features defined as "first", "second", and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0226] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0227] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the technical principles of the present invention, and these improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. An intelligent rule engine system based on AIAgent, comprising a rule engine unit; Features: Also included is an AIAgent interaction unit connected to the rule engine unit; The rule engine unit comprises: Rule definition module: responsible for providing rule definition language and tools for business personnel to write rules; Rule parsing module: includes a rule parser for parsing rule text into internal data structures, and a grammar validator for verifying the correctness of rule grammar to prevent users from entering incorrect rules; Condition evaluation module: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced; Action execution module: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed; The AIAgent interaction unit includes: Data module: responsible for storing and managing rule models and rule execution results; Training module: responsible for training and optimizing the rule model; Inference module: responsible for loading the trained model into memory and providing a service interface for external system calls; receiving requests from external systems, using the loaded model for inference, and generating decision results; post-processing the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements; Rule execution module: responsible for executing rules according to the rule model; Intelligent decision-making module: responsible for processing the results returned by AIAgent, interpreting the output of AIAgent, converting it into executable actions or suggestions, and passing the results to the action execution module; Self-learning and optimization module: performs adaptive learning and model optimization based on new task feedback during runtime.
2. The intelligent rule engine system based on AIAgent according to claim 1, characterized in that: The rule engine unit further includes a basic service module, and the basic service module includes: Event Registration Center: Provides dynamic event registration capabilities to meet the needs of business system scenarios and supports new event registration into the rule engine as a new trigger opportunity; Entity Management Center: The relationship between objects and object attributes is used as the parameters of the rule set. The rule parameters are systematically managed. The rule engine is not aware of changes in the business system field, and effective management of entities and attribute sets is achieved.
3. The intelligent rule engine system based on AIAgent according to claim 1, characterized in that: The AI Agent interaction unit also includes a monitoring and management module for automatically monitoring execution performance and decision accuracy, and can trigger an automatic adjustment strategy when performance or accuracy decreases.
4. The intelligent rule engine system based on AIAgent according to claim 1, characterized in that: The AIAgent interaction unit also includes a security and privacy module.
5. The intelligent rule engine system based on AIAgent according to claim 1, characterized in that: The rule definition module specifically includes: Rule syntax definition: defines the syntax of the rule, including but not limited to the structure of the conditional expression and the format of the action; Rule storage format: Determine the persistence format of the rules, including but not limited to JSON and XML; Rule version management: supports the creation, editing, deletion and rollback of rule versions.
6. The AIAgent-based intelligent rule engine system according to claim 1, characterized in that: The data module specifically includes: Data access module: responsible for collecting data from various data sources for training and inference; Data preprocessor: Perform preprocessing operations on the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction.
7. The intelligent rule engine system based on AIAgent according to claim 1, characterized in that: The training module specifically includes: Feature engineering: perform feature selection, transformation, and extraction operations to extract useful features; Model selection: Select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements; Training algorithm: Use appropriate optimization algorithms and loss functions to train the model; Model evaluation: Evaluate the trained model and select the model with the best performance.
8. The intelligent rule engine method based on AIAgent according to claim 1, characterized in that: include: Rule definition steps: including rule syntax definition, rule storage format and rule version management; Rule parsing step: including a rule parser for parsing the rule text into an internal data structure, and a grammar validator for verifying the correctness of the rule grammar to prevent users from entering incorrect rules; Condition evaluation step: includes a condition interpreter for interpreting condition expressions and translating conditions into executable code, and a data context manager for managing the data context during rule execution to ensure that the data in the condition can be correctly referenced; Action execution step: includes an action executor for executing actions that meet the conditions, and an action parameter parser for parsing the parameters in the action to ensure that the parameters are correctly passed when the action is executed; Data processing steps: store and manage rule models and rule execution results; Training step: training and optimizing the rule model; Inference step: Load the trained model into memory and provide a service interface for external system calls; receive requests from external systems, use the loaded model for inference, and generate decision results; post-process the inference results, which may include normalization, conversion, filtering and other operations to ensure that the output meets business requirements; Rule execution step: execute rules according to the rule model; Intelligent decision-making step: Process the results returned by the AIAgent, interpret the AIAgent's output, convert it into executable actions or suggestions, and pass the results to the action execution module; Self-learning and optimization step: Adaptive learning and model optimization are performed based on new task feedback during runtime.
9. The AIAgent-based intelligent rule engine system method according to claim 8, characterized in that: It also includes monitoring and management steps: automatically monitoring execution performance and decision accuracy, and triggering automatic adjustment strategies when performance degrades or accuracy decreases.
10. The AIAgent-based intelligent rule engine system method according to claim 8, characterized in that: The data processing steps specifically include: Data access step: collect data from various data sources for training and inference; Data preprocessing step: preprocess the collected data to facilitate subsequent model training and inference. Preprocessing includes but is not limited to data cleaning, normalization, and feature extraction; The training steps specifically include: Feature engineering steps: perform feature selection, transformation, and extraction operations to extract useful features; Model selection step: select appropriate algorithms and model structures, deep learning models, and machine learning models according to task requirements; Training algorithm steps: Use appropriate optimization algorithms and loss functions to train the model; Model evaluation step: Evaluate the trained model and select the model with the best performance.
Citation Information
Patent Citations
Universal rule engine system and rule engine system processing method
CN116048484A
Cited By
Intelligent processing method and system for business process decision nodes based on AI Agent
CN119761796A
Intelligent reimbursement management and control system and method
CN122066373A
