A rule engine positioning method combined with AI intelligence
By integrating AI models in the rules engine to process and identify rule conditions, the performance bottlenecks, accuracy and flexibility problems of traditional rules engines when dealing with complex business rules are solved, and efficient, accurate and flexible rule processing is achieved.
Patent Information
- Application Number
- CN202411942288.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional rule engines face performance bottlenecks, accuracy issues and insufficient flexibility when dealing with complex business rules.
Using the rule engine positioning method combined with AI intelligence, by building and integrating AI models into the rule engine, as a pre-step of rule matching, the AI model is used to pre-process and identify rule conditions, so as to achieve rapid search of matches, and continuous improvement through result feedback and optimization.
It significantly improves the efficiency and accuracy of rule processing, enhances the flexibility and scalability of the system, improves the stability and reliability of the system, and reduces labor costs and maintenance costs.
Smart Images

Figure CN119782370A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of positioning engine technology, and in particular to a rule engine positioning method combined with AI intelligence. Background Art
[0002] In today's information age, the complexity of business logic and system rules is growing, and enterprises often need to rely on rule engines to manage and execute these rules. As a software component that efficiently processes business logic, rule engines can respond to complex and changing business needs by defining and managing business rules without modifying the underlying code.
[0003] However, with the expansion of business scale and the surge in the number of rules, traditional rule engines have gradually exposed performance bottlenecks and inefficiencies during execution. When performing rule matching, traditional rule engines usually need to traverse the entire rule base and compare the conditions of each rule one by one. This process is time-consuming and error-prone. Especially when the rule conditions involve complex logical operations, pattern matching, or data associations, the performance bottleneck of the rule engine is more obvious. In addition, as the business environment changes, the rule set needs to be manually updated and the rule engine needs to be redeployed, which increases maintenance costs and time costs. Summary of the invention
[0004] The purpose of the present invention is to propose a rule engine positioning method combined with AI intelligence to address the performance bottlenecks, accuracy issues and lack of flexibility faced by existing rule engines in the background technology when processing complex business rules.
[0005] The technical solution of the present invention is a rule engine positioning method combined with AI intelligence, comprising the following steps:
[0006] S1. Build an AI model and deploy it on the server or cloud platform where the existing rule engine is located;
[0007] S2. Preprocess the rule conditions to adapt them to the requirements of the AI model;
[0008] S3. Integrate the AI model into the rule engine as a pre-step for rule matching;
[0009] S4. After processing the rule conditions through the AI model, a quick search and match is performed in the rule library of the rule engine to complete positioning and matching;
[0010] S5. Result feedback and optimization: Feedback the rule execution results to the AI model and continuously optimize the AI model.
[0011] Preferably, in S1, building an AI model specifically includes the following steps: S11, model selection and architecture design: model selection, selecting a machine learning or deep learning model according to the complexity and diversity of the rule conditions; architecture design, designing the architecture of the AI model, including an input layer, a hidden layer and an output layer, the input layer receives the preprocessed rule condition features, the hidden layer extracts high-level features through multi-layer nonlinear transformations, and the output layer outputs the recognition results or probability distribution of the rule conditions; S12, data preparation and preprocessing: data collection, collecting historical data containing rule conditions and corresponding execution results from the business system; data cleaning, removing duplicate, erroneous or irrelevant data, processing missing values, and ensuring data quality; feature engineering, extracting effective features according to the characteristics of the rule conditions; data partitioning, dividing the cleaned data into training sets, validation sets and test sets for model training, verification and evaluation; S13, model training and optimization; S14, model deployment and monitoring: model deployment, deploying the trained AI model to the server or cloud platform where the rule engine is located to ensure its smooth interaction with the rule engine; performance monitoring, real-time monitoring of the performance of the AI model, and timely discovery and resolution of problems.
[0012] Preferably, S13 includes a training process, using training set data to train the AI model, adjusting model parameters through a back-propagation algorithm to minimize the loss function; hyperparameter tuning, adjusting model hyperparameters through grid search, random search or Bayesian optimization methods to improve model performance; verification and evaluation, using verification set data to evaluate model performance, and adjusting model structure and parameters based on the evaluation results.
[0013] Preferably, in S2, preprocessing the rule conditions includes the following steps: S21, text cleaning: removing noise and irrelevant information in the rule conditions, correcting spelling errors and grammatical errors, and improving text quality; S22, feature extraction: extracting key features of keywords, phrases, and sentence structures in the rule conditions, and for structured data, extracting numerical ranges and timestamp features; S23, formatting: formatting the extracted features according to the format required by the AI model.
[0014] Preferably, in S3, integrating the AI model into the rule engine includes the following steps: S31, interface design: designing the interface protocol between the AI model and the rule engine, implementing the interface code, ensuring that the AI model can receive the rule condition data sent by the rule engine and return the recognition result; S32, integration implementation: integrating the trained AI model into the rule engine as a prerequisite for rule matching, modifying the code of the rule engine so that when it receives a rule execution request, it first calls the AI model to identify the rule condition; S33, rule library construction: building a rule library containing all business rules, and using data structures for storage and organization, assigning a unique identifier and priority to each rule so that it can be quickly located and executed when matching; S34, rule matching and execution: based on the recognition results of the AI model, quickly find matching rules in the rule library, sort and execute them according to the priority and execution logic of the rules, and ensure the correctness and sequentiality of the rules.
[0015] Preferably, in S4, rapid positioning and matching include the following steps: S41, fuzzy matching and context dependency: implementing a fuzzy matching algorithm to handle uncertainty and ambiguity in rule conditions, considering context dependencies, and ensuring the accuracy and consistency of rule matching; S42, real-time performance optimization: optimizing the performance of AI models and rule engines, monitoring the response time and throughput of the system, and ensuring stable performance in high-concurrency scenarios.
[0016] Preferably, in S5, result feedback and optimization include the following steps: S51, execution result feedback: feedback the results of rule execution to the AI model, including successfully executed rules, unmatched rules, and errors or abnormal situations; S52, continuous model optimization: based on the feedback of execution results and new business data, regularly retrain and optimize the AI model to improve its recognition accuracy and generalization ability, introduce an online learning mechanism to enable the AI model to update and optimize its own parameters in real time; S53, rule adjustment and update: according to changes in business needs and the optimization results of the AI model, adjust and update the rules in the rule base, introduce a version control mechanism to ensure the traceability and manageability of rule changes.
[0017] Compared with the prior art, the present invention has the following beneficial technical effects:
[0018] 1. Significantly improve the efficiency and accuracy of rule processing
[0019] Intelligent recognition and understanding: By integrating AI technology, it can intelligently recognize and understand complex rule conditions, and can efficiently process text, numerical or structured data. This intelligent recognition capability significantly improves the accuracy and speed of rule matching.
[0020] Automated processing: The introduction of AI models makes the rule processing process more automated, reducing manual intervention and errors. The system can automatically pre-process, extract features and identify rule conditions, so as to quickly locate and execute rules that meet the conditions.
[0021] 2. Enhance system flexibility and scalability
[0022] Modular design: With modular design, each module is relatively independent and easy to maintain and upgrade. Users can customize and expand AI models, rule bases, and matching algorithms according to their business needs without making large-scale changes to the entire system.
[0023] Dynamic adjustment: The system supports dynamic adjustment and updating of rules. As business needs change and AI models are optimized, users can adjust and update the rules in the rule base at any time to adapt to new business scenarios.
[0024] 3. Improve system stability and reliability
[0025] Real-time performance optimization: By real-time monitoring of the system's response time and throughput, potential performance bottlenecks can be discovered and resolved in a timely manner. At the same time, the introduction of caching mechanisms, parallel processing, asynchronous calls and other technical means improves the system's real-time processing capabilities and stability.
[0026] Error handling and feedback: The system has a complete error handling mechanism that can promptly detect and handle abnormal situations during rule execution. At the same time, the execution results are fed back to the AI model for continuous optimization, forming a closed-loop feedback mechanism to improve the reliability of the system.
[0027] 4. Reduce labor costs and maintenance costs
[0028] Automated process: Due to the automation and intelligence of the rule processing process, the need for human participation and intervention is greatly reduced. This not only reduces labor costs, but also improves work efficiency.
[0029] Simplified maintenance: The modular design makes system maintenance easier and more convenient. When a module has a problem, it can be repaired and upgraded separately without affecting the normal operation of the entire system.
[0030] 5. Support complex business scenarios
[0031] Fuzzy matching and context dependency: Supports complex situations such as fuzzy matching and context dependency, and can handle rule conditions with uncertainty and ambiguity. This enables the system to better adapt to complex and changing business scenarios.
[0032] Multi-dimensional rule matching: The system supports matching and screening of rule conditions from multiple dimensions to ensure the comprehensiveness and accuracy of rule execution. This multi-dimensional matching capability enables the system to cope with more complex and sophisticated business needs.
[0033] In summary, the present invention significantly improves the efficiency and accuracy of rule processing, enhances the flexibility and scalability of the system, improves the stability and reliability of the system, and reduces labor costs and maintenance costs by integrating AI technology, adopting modular design, and realizing real-time performance optimization and dynamic adjustment. At the same time, it also supports the needs of multi-dimensional rule matching and fuzzy matching in complex business scenarios, providing users with a more comprehensive, efficient, and intelligent rule processing solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The present invention is a flowchart of an embodiment of the present invention. DETAILED DESCRIPTION
[0035] Embodiment 1
[0036] like Figure 1 As shown, the present invention proposes a rule engine positioning method combined with AI intelligence, comprising the following steps:
[0037] S1. Build an AI model and deploy it on the server or cloud platform where the existing rule engine is located;
[0038] S2. Preprocess the rule conditions to adapt them to the requirements of the AI model;
[0039] S3. Integrate the AI model into the rule engine as a pre-step for rule matching;
[0040] S4. After processing the rule conditions through the AI model, a quick search and match is performed in the rule library of the rule engine to complete positioning and matching;
[0041] S5. Result feedback and optimization: Feedback the rule execution results to the AI model and continuously optimize the AI model.
[0042] Embodiment 2
[0043] The present invention proposes a positioning method combining a rule engine with AI intelligence. Compared with the first embodiment, this embodiment introduces the specific steps of S1 in detail.
[0044] In S1, building an AI model specifically includes the following steps: S11, model selection and architecture design: Model selection, select a suitable machine learning or deep learning model according to the complexity and diversity of the rule conditions. For example, for text-type rule conditions, you can choose a natural language processing (NLP) model, such as BERT, GPT and other pre-trained models for fine-tuning; for numerical or structured data, you can consider using models such as logistic regression, decision tree, random forest or neural network; Architecture design, design the architecture of the AI model, including input layer, hidden layer and output layer, the input layer receives the pre-processed rule condition features, the hidden layer extracts high-level features through multi-layer nonlinear transformation, and the output layer outputs the recognition results or probability distribution of the rule conditions; S12, data preparation and preprocessing: data collection, collect historical data containing rule conditions and corresponding execution results from the business system; data cleaning, remove duplicate, erroneous or irrelevant data, process missing values, and ensure data quality; feature engineering, extract effective features such as keywords, phrases, numerical ranges, timestamps, etc. according to the characteristics of the rule conditions. For text data, it may also be necessary to perform word segmentation, stop word removal, stem extraction, etc.; data partitioning, divide the cleaned data into training set, validation set, and test set for model training, validation, and evaluation; S13, model training and optimization: training process, use the training set data to train the AI model, adjust the model parameters through the back propagation algorithm, and minimize the loss function; hyperparameter tuning, adjust the model hyperparameters such as learning rate, batch size, number of iterations, etc. through grid search, random search, or Bayesian optimization to improve model performance; validation and evaluation, use validation set data to evaluate model performance, such as accuracy, recall, F1 score, etc. Adjust the model structure and parameters according to the evaluation results; S14, model deployment and monitoring: model deployment, deploy the trained AI model to the server or cloud platform where the rule engine is located to ensure its smooth interaction with the rule engine; performance monitoring, real-time monitoring of the performance of the AI model, including indicators such as response time and accuracy, to promptly discover and solve problems.
[0045] Embodiment 3
[0046] The present invention proposes a rule engine positioning method combined with AI intelligence. Compared with the first embodiment, this embodiment introduces the specific steps of S2 and S3 in detail.
[0047] In S2, preprocessing of rule conditions includes the following steps: S21, text cleaning: remove noise and irrelevant information in rule conditions, such as punctuation, special characters, HTML tags, etc., correct spelling errors and grammatical errors, and improve text quality; S22, feature extraction: extract key features such as keywords, phrases, sentence structures, etc. in rule conditions, and for structured data, extract features such as numerical ranges and timestamps; S23, formatting: format the extracted features according to the format required by the AI model, such as converting them into vectors, matrices, or data structures in a specific format.
[0048] In S3, integrating the AI model into the rule engine includes the following steps: S31. Interface design: design the interface protocol between the AI model and the rule engine, including data exchange format, calling method, error handling, etc., implement the interface code, and ensure that the AI model can receive the rule condition data sent by the rule engine and return the recognition result; S32. Integration implementation: integrate the trained AI model into the rule engine as a prerequisite for rule matching, modify the code of the rule engine so that when it receives a rule execution request, it first calls the AI model to identify the rule conditions; S33. Rule library construction: build a rule library containing all business rules, and use appropriate data structures to store and organize them, assign a unique identifier and priority to each rule, so that it can be quickly located and executed when matching; S34. Rule matching and execution: based on the recognition results of the AI model, quickly find matching rules in the rule library, sort and execute them according to the priority and execution logic of the rules, and ensure the correctness and sequence of the rules.
[0049] Embodiment 4
[0050] The present invention proposes a rule engine positioning method combined with AI intelligence. Compared with the first embodiment, this embodiment introduces the specific steps of S4 and S5 in detail.
[0051] In S4, fast positioning and matching include the following steps: S41, fuzzy matching and context dependency: implement fuzzy matching algorithm to deal with uncertainty and ambiguity in rule conditions, consider context dependency, and ensure the accuracy and consistency of rule matching; S42, real-time performance optimization: optimize the performance of AI models and rule engines, such as caching mechanism, parallel processing, asynchronous calls, etc., to improve real-time processing capabilities, monitor the response time and throughput of the system, and ensure stable performance in high concurrency scenarios.
[0052] In S5, result feedback and optimization include the following steps: S51, execution result feedback: feeding back the results of rule execution to the AI model, including successfully executed rules, unmatched rules, and errors or abnormal situations;
[0053] S52. Continuous model optimization: Based on the feedback of execution results and new business data, the AI model is regularly retrained and optimized to improve its recognition accuracy and generalization ability. An online learning mechanism is introduced to enable the AI model to update and optimize its own parameters in real time. S53. Rule adjustment and update: Based on changes in business needs and the optimization results of the AI model, the rules in the rule library are adjusted and updated. A version control mechanism is introduced to ensure the traceability and manageability of rule changes.
[0054] The key points of the present invention are embodied in the following aspects:
[0055] 1. Deep integration of AI technology and rule engine
[0056] Key point analysis: The core of this invention is to deeply integrate artificial intelligence technology into the traditional rule engine, and use AI's intelligent recognition, understanding and learning capabilities to improve the efficiency and accuracy of rule matching and execution. This deep integration is not limited to simple interface calls, but through AI models to pre-process, feature extract and identify rule conditions, providing intelligent input for the rule engine.
[0057] 2. Efficient rule condition processing and identification
[0058] Key point analysis: By building a professional AI model, the present invention can efficiently process and identify rule conditions, whether text, numerical or structured data. The AI model uses machine learning or deep learning algorithms to extract key features from rule conditions and accurately identify and understand them, thereby providing accurate matching basis for the rule engine.
[0059] 3. Flexible rule matching and execution mechanism
[0060] Key point analysis: The present invention designs a flexible rule matching and execution mechanism, supports complex situations such as fuzzy matching and context dependency, and ensures the accuracy and consistency of rule matching. At the same time, by assigning priorities and execution logic to rules, the orderly execution of rules is achieved, improving the stability and reliability of the system.
[0061] 4. Real-time performance optimization and monitoring
[0062] Key point analysis: In order to ensure stable performance in high-concurrency scenarios, the present invention optimizes the performance of AI models and rule engines, such as introducing caching mechanisms, parallel processing, asynchronous calls and other technical means. At the same time, by real-time monitoring of the system's response time and throughput, potential performance bottlenecks can be discovered and resolved in a timely manner.
[0063] 5. Continuous model optimization and rule adjustment
[0064] Key point analysis: This invention focuses on continuous optimization of the model and dynamic adjustment of the rules. Through feedback from execution results and new business data, the AI model is regularly retrained and optimized to improve its recognition accuracy and generalization ability. At the same time, according to changes in business needs and the optimization results of the AI model, the rules in the rule base are adjusted and updated to ensure the adaptability and flexibility of the system.
[0065] 6. Highly customizable and scalable
[0066] Key point analysis: The design of the present invention fully considers the needs of customizability and scalability. Through the modular design concept, users can customize and expand the AI model, rule base and matching algorithm according to their own business needs. This high degree of customizability and scalability enables the present invention to be widely used in different fields and scenarios.
[0067] In summary, the key points of the present invention are the deep integration of AI technology and rule engine, efficient rule condition processing and identification, flexible rule matching and execution mechanism, real-time performance optimization and monitoring, continuous model optimization and rule adjustment, and high customizability and scalability. These key points provide users with a more efficient, intelligent and flexible rule processing solution.
[0068] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited thereto, and various changes can be made within the knowledge scope of technicians in the relevant technical field without departing from the purpose of the present invention.
Claims
1. A rule engine positioning method combined with AI intelligence, characterized in that: The following steps are involved: S1. Build an AI model and deploy it on the server or cloud platform where the existing rule engine is located; S2. Preprocess the rule conditions to adapt them to the requirements of the AI model; S3. Integrate the AI model into the rule engine as a pre-step for rule matching; S4. After processing the rule conditions through the AI model, a quick search and match is performed in the rule library of the rule engine to complete positioning and matching; S5. Result feedback and optimization: Feedback the rule execution results to the AI model and continuously optimize the AI model.
2. The rule engine positioning method combined with AI intelligence according to claim 1 is characterized in that: In S1, building the AI model specifically includes the following steps: S11. Model selection and architecture design: Model selection, choose machine learning or deep learning models according to the complexity and diversity of rule conditions; Architecture design, design the architecture of the AI model, including the input layer, hidden layer and output layer. The input layer receives the pre-processed rule condition features, the hidden layer extracts high-level features through multi-layer nonlinear transformation, and the output layer outputs the recognition results or probability distribution of the rule conditions; S12, data preparation and preprocessing: data collection, collect historical data containing rule conditions and corresponding execution results from the business system; data cleaning, remove duplicate, erroneous or irrelevant data, process missing values, and ensure data quality; Feature engineering, extracting effective features according to the characteristics of the rule conditions; data partitioning, dividing the cleaned data into training sets, validation sets and test sets for model training, verification and evaluation; S13, model training and optimization; S14, model deployment and monitoring: model deployment, deploying the trained AI model to the server or cloud platform where the rule engine is located to ensure its smooth interaction with the rule engine; performance monitoring, real-time monitoring of the performance of the AI model, timely detection and resolution of problems.
3. The rule engine positioning method combined with AI intelligence according to claim 2 is characterized in that: S13 includes the training process, which uses the training set data to train the AI model, adjusts the model parameters through the back-propagation algorithm, and minimizes the loss function; hyperparameter tuning, which adjusts the model hyperparameters through grid search, random search, or Bayesian optimization methods to improve model performance; verification and evaluation, which uses the verification set data to evaluate the model performance and adjusts the model structure and parameters based on the evaluation results.
4. The rule engine positioning method combined with AI intelligence according to claim 1 is characterized in that: In S2, preprocessing of rule conditions includes the following steps: S21, text cleaning: remove noise and irrelevant information in rule conditions, correct spelling errors and grammatical errors, and improve text quality; S22, feature extraction: extract key features of keywords, phrases, and sentence structures in rule conditions, and for structured data, extract numerical ranges and timestamp features; S23, formatting: format the extracted features according to the format required by the AI model.
5. The rule engine positioning method combined with AI intelligence according to claim 1 is characterized in that: Integrate AI models into the rules engine in S3 The process includes the following steps: S31, interface design: design the interface protocol between the AI model and the rule engine, implement the interface code, ensure that the AI model can receive the rule condition data sent by the rule engine, and return the recognition result; S32, integration implementation: integrate the trained AI model into the rule engine as a prerequisite for rule matching, modify the code of the rule engine so that when it receives a rule execution request, it first calls the AI model to identify the rule conditions; S33, rule library construction: build a rule library containing all business rules, and use data structures to store and organize them, assign a unique identifier and priority to each rule, so that it can be quickly located and executed when matching; S34, rule matching and execution: based on the recognition results of the AI model, quickly find matching rules in the rule library, sort and execute them according to the priority and execution logic of the rules, and ensure the correctness and order of the rules.
6. The rule engine positioning method combined with AI intelligence according to claim 1 is characterized in that: In S4, fast positioning and matching includes the following steps: S41, Fuzzy Matching and Context Dependence: Implement fuzzy matching algorithms to handle uncertainty and ambiguity in rule conditions, consider context dependencies, and ensure accuracy and consistency of rule matching; S42. Real-time performance optimization: Optimize the performance of AI models and rule engines, monitor the response time and throughput of the system, and ensure stable performance in high-concurrency scenarios.
7. The rule engine positioning method combined with AI intelligence according to claim 1 is characterized in that: In S5, result feedback and optimization include the following steps: S51. Execution result feedback: Feedback the results of rule execution to the AI model, including successfully executed rules, unmatched rules, and errors or abnormal situations; S52. Continuous model optimization: Based on the feedback of execution results and new business data, regularly retrain and optimize the AI model to improve its recognition accuracy and generalization ability, introduce an online learning mechanism so that the AI model can update and optimize its own parameters in real time; S53. Rule adjustment and update: According to changes in business needs and the optimization results of the AI model, adjust and update the rules in the rule library, introduce a version control mechanism to ensure the traceability and manageability of rule changes.
Citation Information
Cited By
Efficient man-machine interaction method and system combining rule engine and real-time stream processing technology
CN120335620A
An efficient human-computer interaction method and system combining a rule engine with real-time stream processing technology
CN120335620B