Intelligent rule engine configuration method and system

Through technologies such as recurrent neural networks and K-mean clustering, adaptive rule sets are generated and the rule engine is optimized, which solves the flexibility and accuracy of traditional rule inference technology in dynamic data processing, and improves data analysis and system stability.

CN118536609BActive Publication Date: 2024-12-10WUHAN ZHONGDI UNIV SMART CITY RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410721002.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-12-10
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

Traditional rule reasoning techniques lack flexibility and adaptability when processing dynamic data, and lack effective time series data analysis tools, resulting in reduced data analysis accuracy, inaccurate rule management efficiency and performance evaluation, affecting system stability and reliability.

Method used

Recurrent neural networks are used to recognize dynamic data patterns, generate adaptive rules sets, use K-mean clustering algorithm to perform rule classification and cluster analysis, combine cross-validation and decision tree algorithm to optimize and refine rules, form an intelligent rule engine, and Optimized with system testing and performance monitoring tools.

Benefits of technology

It improves the accuracy and timeliness of data analysis, enhances the flexibility and adaptability of the system, improves the efficiency and execution efficiency of rule management, and ensures the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536609B_ABST
    Figure CN118536609B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of rule reasoning technology, specifically to an intelligent rule engine configuration method and system, comprising the following steps: based on real-time data streams, a recurrent neural network is used to perform dynamic data pattern recognition, capture time-related patterns and trends in data, and generate time series pattern recognition results. In the present invention, a recurrent neural network is used to perform dynamic pattern recognition on real-time data streams, capture periodic changes, trend fluctuations and abnormal points of time series, improve the accuracy and timeliness of data analysis, an online learning algorithm generates an adaptive rule set, so that the rules dynamically adapt to data changes, and enhance the flexibility and adaptability of the system, a K-means clustering algorithm optimizes the management of data patterns through cluster analysis and classification, and improves the manageability of rules, a cross-validation method enhances the performance of multiple types of rules, and improves system stability and reliability, and a decision tree algorithm provides judgment and response in terms of rule set optimization, and improves execution efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of rule reasoning technology, and in particular to an intelligent rule engine configuration method and system. Background Art

[0002] The field of rule-based reasoning technology involves using a set of predefined logical rules to simulate the human reasoning process. The rules usually appear in the form of "if-then" statements, building a decision tree or network to solve specific problems or perform tasks. In artificial intelligence, rule-based reasoning is one of the basic methods to achieve intelligent behavior and is widely used in expert systems, automatic reasoning, knowledge graph construction and other fields. The core advantage is that it can provide a transparent and explainable decision-making process, which is easy to understand and verify the application effect of the rules.

[0003] Among them, the field of rule reasoning technology involves using a set of predefined logical rules to simulate the human reasoning process. These rules usually appear in the form of "if-then" statements, building a decision tree or network to solve specific problems or perform tasks. In artificial intelligence, rule reasoning is one of the basic methods to achieve intelligent behavior and is widely used in expert systems, automatic reasoning, knowledge graph construction and other fields. The core advantage is that it can provide a transparent and explainable decision-making process, which is easy to understand and verify the application effect of the rules.

[0004] Traditional methods have obvious shortcomings when dealing with similar tasks. Reliance on static rule sets makes it difficult to adapt to rapidly changing data patterns and environments, resulting in insufficient flexibility and adaptability. The lack of effective time series data analysis tools affects the accurate capture of complex patterns in the data and reduces the accuracy of data analysis. In terms of rule classification and management, advanced clustering algorithms are not used, which limits the efficiency of rule management. The lack of precise testing and verification mechanisms in rule effectiveness evaluation leads to inaccurate rule performance evaluation, affecting the stability and reliability of the system. Overall, traditional methods have limitations in terms of dynamic data adaptability, rule management efficiency, and the accuracy of rule performance evaluation. Summary of the invention

[0005] The purpose of the present invention is to solve the shortcomings in the prior art and to propose an intelligent rule engine configuration method and system.

[0006] In order to achieve the above object, the present invention adopts the following technical solution: a method for configuring an intelligent rule engine, comprising the following steps:

[0007] S1: Based on real-time data streams, a recurrent neural network is used to perform dynamic data pattern recognition, capture time-related patterns and trends in the data, and generate time series pattern recognition results;

[0008] S2: Based on the time series pattern recognition results, an online learning algorithm is applied to automatically generate rules that can adapt to data changes and generate an adaptive rule set;

[0009] S3: performing cluster analysis using the adaptive rule set, applying a K-means clustering algorithm, identifying and classifying differentiated rule categories and patterns, and generating rule category clusters;

[0010] S4: Evaluate the effectiveness of the rule category cluster, use a cross-validation method to evaluate the performance of multiple categories of rules, and generate a rule effectiveness evaluation report;

[0011] S5: According to the rule effectiveness evaluation report, the rules are optimized and refined using a decision tree algorithm to generate an optimized rule set;

[0012] S6: Integrate the optimized rule set into the rule engine and configure it, using a rule engine configuration tool to generate a configured intelligent rule engine;

[0013] S7: Performing system testing and performance optimization on the configured intelligent rule engine, using system testing methods and performance monitoring tools to generate a system testing report and performance optimization results;

[0014] The time series pattern recognition results include periodic changes, trend fluctuations and abnormal data points, the adaptive rule set includes response rules and adjustment strategies for differentiated data patterns, the rule category cluster includes multiple rule categories based on data characteristics, the rule effectiveness evaluation report includes accuracy and efficiency indicators of multiple rule categories, the optimized rule set includes optimized condition judgments and action responses, the configured intelligent rule engine includes multiple types of rules and execution mechanisms, and the system test report and performance optimization results include stability evaluation, response speed and adaptive performance indicators.

[0015] As a further solution of the present invention, based on real-time data stream, a recurrent neural network is used to perform dynamic data pattern recognition, capture time-related patterns and trends in the data, and generate time series pattern recognition results. Specifically, the steps are as follows:

[0016] S101: using real-time data acquisition technology to capture data streams, and preprocessing through data cleaning and normalization methods to generate preprocessed data streams;

[0017] S102: Applying a time window method and a feature vectorization technology to extract features from the preprocessed data stream to generate a data feature set;

[0018] S103: Based on the data feature set, a recurrent neural network is used to perform time series modeling to generate a time series model;

[0019] S104: Using a long short-term memory network, performing pattern recognition and analysis on the time series model to generate a time series pattern recognition result;

[0020] The data preprocessing method includes data denoising, outlier processing and data standardization, the feature extraction technology includes time-frequency conversion and statistical feature extraction, the recurrent neural network is used to identify time dependencies in data, and the pattern recognition technology includes trend analysis and cyclic pattern recognition.

[0021] As a further solution of the present invention, based on the time series pattern recognition results, an online learning algorithm is applied to automatically generate rules that can adapt to data changes. The steps of generating an adaptive rule set are specifically as follows:

[0022] S201: According to the result of the time series pattern recognition, a rule-based learning method is used to analyze the recognized pattern and generate a preliminary rule set;

[0023] S202: Applying an online support vector machine to optimize and adjust the preliminary rule set in real time to generate an online optimized rule set;

[0024] S203: Performing performance test on the online optimization rule set, using cross-validation and performance indicator evaluation to generate a rule performance test report;

[0025] S204: According to the rule effectiveness test report, make adjustments and plans to generate an adaptive rule set;

[0026] The learning method includes a decision tree and a rule-based classifier, the online support vector machine includes real-time parameter adjustment and model adaptation, and the performance test includes accuracy, recall and F1 score evaluation.

[0027] As a further solution of the present invention, cluster analysis is performed using the adaptive rule set, and the K-means clustering algorithm is applied to identify and classify differentiated rule categories and patterns, and the steps of generating rule category clusters are specifically as follows:

[0028] S301: Based on the adaptive rule set, principal component analysis is used to extract key features, optimize clustering efficiency, and generate a rule data set after feature optimization;

[0029] S302: Based on the feature-optimized rule data set, clustering is performed using a first K-means clustering algorithm to determine an optimal number of clusters;

[0030] S303: Based on the optimal number of clusters, a second K-means clustering algorithm is used to perform clustering to generate preliminary rule category clusters;

[0031] S304: Based on the preliminary rule category clusters, apply the silhouette coefficient to perform clustering effect evaluation and iterative optimization to generate optimized rule category clusters;

[0032] The principal component analysis includes covariance matrix calculation, principal component extraction, and dimensionality reduction processing. The K-means clustering algorithm includes random initial centroid selection, distance calculation, and centroid update. The K-means clustering algorithm continues to include data point allocation, centroid recalculation, and iteration until convergence. The silhouette coefficient evaluation involves clustering compactness and separation calculation.

[0033] As a further solution of the present invention, the effectiveness of the rule category cluster is evaluated, and the performance of multiple categories of rules is evaluated by using a cross-validation method. The steps of generating a rule effectiveness evaluation report are specifically as follows:

[0034] S401: Based on the optimized rule category cluster, a classification decision tree is constructed using the CART algorithm to generate a decision tree structured data set;

[0035] S402: Based on the decision tree structured data set, perform K-fold cross validation, conduct performance testing, and generate preliminary rule effectiveness evaluation data;

[0036] S403: Based on the preliminary rule effectiveness evaluation data, using variance analysis ANOVA to comprehensively evaluate rule performance and generate comprehensive performance evaluation indicators;

[0037] S404: Based on the comprehensive performance evaluation indicators, multivariate statistical analysis, machine learning models and trend prediction algorithms are used to perform in-depth quantitative analysis on the rule execution status and generate a rule effectiveness evaluation report;

[0038] The CART algorithm includes binary tree construction, Gini index feature selection, and tree pruning. The K-fold cross-validation method includes data set partitioning, subset test loop, and performance metric calculation. The variance analysis ANOVA includes multi-group sample mean difference analysis.

[0039] As a further solution of the present invention, according to the rule effectiveness evaluation report, the rules are optimized and refined using a decision tree algorithm, and the steps of generating an optimized rule set are specifically as follows:

[0040] S501: Based on the performance evaluation report, using feature selection technology, identifying and selecting key features that affect the effectiveness of the rule, and generating a key feature set;

[0041] S502: Based on the key feature set, applying a decision tree learning algorithm, constructing an initial decision tree model, and generating a preliminary decision tree model;

[0042] S503: Based on the preliminary decision tree model, perform model optimization, including pruning and parameter tuning, to generate an optimized decision tree model;

[0043] S504: Based on the optimized decision tree model, feature selection and association rule learning methods are used to extract and refine rule sets to generate optimized rule sets;

[0044] The feature selection technology specifically includes correlation analysis and information gain calculation, the decision tree learning algorithm includes classification and regression tree and ID3 algorithm, the model optimization specifically refers to the application of pruning algorithm and cross-validation technology, the feature selection specifically includes information gain ratio, Gini index and mutual information method, and the association rule learning method includes Apriori algorithm, FP-growth algorithm and Eclat algorithm.

[0045] As a further solution of the present invention, the optimized rule set is integrated into a rule engine and configured. The steps of generating a configured intelligent rule engine using a rule engine configuration tool are as follows:

[0046] S601: Based on the optimized rule set, using rule mapping and integration tools, the rules are integrated into the initial configuration of the rule engine to generate a preliminary integrated rule engine;

[0047] S602: Based on the preliminarily integrated rule engine, perform rule configuration, and generate a rule engine with optimized configuration by setting parameters and performing logic optimization;

[0048] S603: Performing testing and verification based on the configuration-optimized rule engine, maintaining the rule engine operation, and generating a rule engine after testing and verification;

[0049] S604: Based on the rule engine after the test verification, use the rule engine configuration tool to configure and generate a configured intelligent rule engine;

[0050] The rule mapping and integration tool includes a rule converter and an interface adapter, the rule configuration is specifically parameter optimization strategy and execution path optimization, the testing and verification includes performance testing and rule effect evaluation, and the rule engine configuration tool includes a configuration manager and a real-time monitoring system.

[0051] As a further solution of the present invention, the steps of performing system testing and performance optimization on the configured intelligent rule engine, using system testing methods and performance monitoring tools, and generating system testing reports and performance optimization results are specifically as follows:

[0052] S701: Based on the configured intelligent rule engine, a software testing method is used to perform functionality and stability testing, and a functionality and stability test report is generated;

[0053] S702: Based on the functionality and stability test report, use a performance evaluation tool to evaluate the running performance of the rule engine, identify performance bottlenecks, and generate a preliminary performance analysis report;

[0054] S703: Based on the preliminary performance analysis report, the rule engine is optimized by applying a performance optimization technology to generate an optimized rule engine;

[0055] S704: Based on the optimized rule engine, the system testing method and performance monitoring tool are used again to perform testing and performance evaluation, verify the effectiveness of all optimization measures, and generate a system test report and performance optimization results;

[0056] The software testing method includes boundary value analysis, equivalence class partitioning and error guessing technology, the performance evaluation tool includes CPU and memory usage monitoring, process tracking and resource allocation analysis, the performance optimization technology includes algorithm complexity analysis, code optimization techniques and data structure selection, and the testing and evaluation includes regression testing and system load testing.

[0057] An intelligent rule engine configuration system is used to execute the above-mentioned intelligent rule engine configuration method. The system includes a data acquisition and preprocessing module, a feature extraction and modeling module, a rule generation and optimization module, a rule clustering and evaluation module, a decision tree optimization module, and a system testing and performance optimization module.

[0058] The data acquisition and preprocessing module is based on real-time data stream, adopts stream data processing technology and performs data preprocessing through Gaussian filtering denoising, Z-Score outlier processing and Min-Max data standardization to generate a preprocessed data stream;

[0059] The feature extraction and modeling module uses fast Fourier transform and autoregressive model to extract features based on the preprocessed data stream, and then applies recurrent neural network to perform time series modeling to generate a time series model;

[0060] The rule generation and optimization module is based on a time series model and uses online logistic regression and incremental learning algorithms to generate rules and perform real-time optimization to generate an adaptive rule set;

[0061] The rule clustering and evaluation module is based on an adaptive rule set, uses principal component analysis and the Elbow method to determine the optimal K value for K-means clustering, applies the silhouette coefficient to evaluate the clustering effect, and generates rule category clusters;

[0062] The decision tree optimization module uses the C4.5 algorithm to construct a decision tree based on rule category clusters and applies α-pruning to perform model optimization to generate an optimized rule set;

[0063] The system testing and performance optimization module performs system testing based on the optimized rule set using black box testing and load testing, and optimizes performance using CPU cache optimization and memory management technology to generate system testing reports and performance optimization results.

[0064] Compared with the prior art, the advantages and positive effects of the present invention are:

[0065] In the present invention, dynamic pattern recognition is performed on real-time data streams through a recurrent neural network, which effectively captures periodic changes, trend fluctuations and abnormal data points in time series, thereby improving the accuracy and timeliness of data analysis. The adaptive rule set automatically generated by the online learning algorithm enables the rules to dynamically adapt to data changes, thereby enhancing the flexibility and adaptability of the system. The clustering analysis and classification of the rules by the K-means clustering algorithm optimizes the understanding and management of complex data patterns and improves the manageability of the rules. The application of the cross-validation method enhances the stability and reliability of the system in ensuring the performance of multiple types of rules. The decision tree algorithm provides accurate conditional judgment and action response in optimizing the rule set, thereby improving execution efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 It is a schematic diagram of the workflow of the present invention;

[0067] Figure 2 This is a detailed flow chart of S1 of the present invention;

[0068] Figure 3 This is a detailed flow chart of S2 of the present invention;

[0069] Figure 4 This is a detailed flow chart of S3 of the present invention;

[0070] Figure 5 This is a detailed flow chart of S4 of the present invention;

[0071] Figure 6 This is a detailed flow chart of S5 of the present invention;

[0072] Figure 7 This is a detailed flow chart of S6 of the present invention;

[0073] Figure 8 This is a detailed flow chart of S7 of the present invention;

[0074] Fig. 9 It is a system flow chart of the present invention. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0076] In the description of the present invention, it should be understood that the terms "length", "width", "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 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, in the description of the present invention, "multiple" means two or more, unless otherwise clearly and specifically defined.

[0077] Embodiment 1

[0078] See also Figure 1 The present invention provides a technical solution: a method for configuring an intelligent rule engine, comprising the following steps:

[0079] S1: Based on real-time data streams, a recurrent neural network is used to perform dynamic data pattern recognition, capture time-related patterns and trends in the data, and generate time series pattern recognition results;

[0080] S2: Based on the time series pattern recognition results, online learning algorithms are applied to automatically generate rules that can adapt to data changes and generate adaptive rule sets;

[0081] S3: Perform cluster analysis using adaptive rule sets and apply K-means clustering algorithm to identify and classify differentiated rule categories and patterns and generate rule category clusters;

[0082] S4: Evaluate the effectiveness of rule category clusters, use cross-validation methods to evaluate the performance of multiple categories of rules, and generate a rule effectiveness evaluation report;

[0083] S5: Based on the rule effectiveness evaluation report, the decision tree algorithm is used to optimize and refine the rules to generate an optimized rule set;

[0084] S6: Integrate the optimized rule set into the rule engine and configure it, using the rule engine configuration tool to generate a configured intelligent rule engine;

[0085] S7: Perform system testing and performance optimization on the configured intelligent rule engine, use system testing methods and performance monitoring tools to generate system testing reports and performance optimization results;

[0086] The results of time series pattern recognition include periodic changes, trend fluctuations and abnormal data points. The adaptive rule set includes response rules and adjustment strategies for differentiated data patterns. The rule category cluster includes multiple rule categories based on data characteristics. The rule effectiveness evaluation report includes accuracy and efficiency indicators of multiple rule categories. The optimized rule set includes optimized condition judgment and action response. The configured intelligent rule engine includes multiple types of rules and execution mechanisms. The system test report and performance optimization results include stability evaluation, response speed and adaptation performance indicators.

[0087] Dynamic data pattern recognition through recurrent neural networks significantly improves the ability to capture time-related patterns and trends, enhances the accuracy of data analysis and the ability to predict future changes. The adaptive rule set generated by the online learning algorithm provides an effective response to differentiated data patterns, ensuring the real-time and accuracy of the decision-making process. The application of the K-means clustering algorithm in cluster analysis deeply explores the inherent structure of the data and provides a scientific basis for rule optimization and application. The effectiveness of the rules is comprehensively evaluated through the cross-validation method to ensure the efficient operation of the rule set. According to the performance evaluation report, the optimization and refinement of the rules through the decision tree algorithm further improves the applicability of conditional judgment and action response. The integration and configuration of the rule engine not only enhances its functionality, but also improves the convenience of operation and user experience. The system testing and performance optimization ensure the stability, response speed and adaptability of the intelligent rule engine to meet the needs of different application scenarios.

[0088] See also Figure 2 ,Based on real-time data streams, a recurrent neural network is used to perform dynamic data pattern recognition,capture time-related patterns and trends in the data, and generate time series pattern recognition results.,Specific steps are as follows:

[0089] S101: using real-time data acquisition technology to capture data streams, and preprocessing through data cleaning and normalization methods to generate preprocessed data streams;

[0090] S102: Apply the time window method and feature vectorization technology to extract features from the preprocessed data stream and generate a data feature set;

[0091] S103: Based on the data feature set, a recurrent neural network is used to perform time series modeling and generate a time series model;

[0092] S104: Using the long short-term memory network, pattern recognition and analysis are performed on the time series model to generate a time series pattern recognition result;

[0093] Data preprocessing methods include data denoising, outlier processing and data standardization. Feature extraction techniques include time-frequency conversion and statistical feature extraction. Recurrent neural networks are used to identify time dependencies in data. Pattern recognition techniques include trend analysis and cyclic pattern recognition.

[0094] In step S101, the data stream is captured by real-time data acquisition technology. This step includes continuous monitoring and recording of data to ensure the integrity and real-time nature of the information. The captured data is preprocessed using data cleaning and normalization methods, including removing noise, handling missing values, correcting erroneous data, and converting the data into a standard format to ensure data consistency and comparability. These steps together generate a preprocessed data stream, which lays the foundation for subsequent analysis and pattern recognition.

[0095] In step S102, the time window method and feature vectorization technology are used to extract features from the preprocessed data stream. The time window method selects data within a specific time period for analysis, which helps to capture the local characteristics of time series data. Feature vectorization technology, including time-frequency conversion and statistical feature extraction, such as calculating the mean and variance, converts data into a format suitable for model processing. The data feature set generated in the step provides the necessary input for time series modeling.

[0096] In step S103, based on the data feature set, a recurrent neural network (RNN) is used to perform time series modeling. RNN specializes in processing sequence data and effectively identifies and learns the time dependency in the data. The step involves designing and training an RNN model so that it can predict future trends based on historical data and generate a time series model.

[0097] In step S104, the long short-term memory network (LSTM) is used to perform in-depth pattern recognition and analysis on the time series model. LSTM is suitable for processing long sequence data and effectively avoids the gradient vanishing problem in traditional RNN. Through the application of LSTM network, complex patterns in time series, such as periodic changes, trend fluctuations and abnormal data points, are accurately identified to generate time series pattern recognition results.

[0098] See also Figure 3 Based on the time series pattern recognition results, online learning algorithms are applied to automatically generate rules that can adapt to data changes. The specific steps for generating adaptive rule sets are:

[0099] S201: According to the result of time series pattern recognition, a rule-based learning method is used to analyze the recognized pattern and generate a preliminary rule set;

[0100] S202: Applying an online support vector machine to optimize and adjust the preliminary rule set in real time to generate an online optimized rule set;

[0101] S203: Performing performance test on the online optimization rule set, using cross-validation and performance indicator evaluation, and generating a rule performance test report;

[0102] S204: According to the rule effectiveness test report, make adjustments and plans to generate an adaptive rule set;

[0103] Learning methods include decision trees and rule-based classifiers, online support vector machines include real-time parameter adjustment and model adaptation, and performance tests include accuracy, recall, and F1 score evaluation.

[0104] In step S201, adaptive rules are initially generated based on the time series pattern recognition results through rule-based learning methods. This step involves applying learning methods such as decision trees and rule-based classifiers, which can extract key patterns from time series data and convert them into preliminary rule sets. These rules reflect the time-dependent characteristics and change trends of the data, laying the foundation for subsequent optimization and adjustment.

[0105] In step S202, an online support vector machine (SVM) is used to optimize and adjust the preliminary rule set in real time. The core of online SVM lies in its real-time parameter adjustment and model self-adaptation capabilities, which enable the rule set to be continuously updated and improved according to new data streams. In this way, the generated online optimization rule set is more accurate and flexible, and can cope with dynamic changes in data.

[0106] In step S203, the online optimization rule set is tested for performance, using cross-validation and performance indicator evaluation. The performance indicators in this step include accuracy, recall, and F1 score, which comprehensively evaluate the performance of the rule set, including its adaptability to new data and prediction accuracy. Through this performance test, a rule performance test report can be generated, providing a detailed basis for subsequent adjustments.

[0107] In step S204, adjustments and planning are made according to the rule effectiveness test report to generate the final adaptive rule set. The steps are adjusted according to the problems and deficiencies found in the performance test to ensure that the rule set can effectively adapt to data changes. The final adaptive rule set not only takes into account the pattern of historical data, but also can flexibly respond to changes in future data streams.

[0108] See also Figure 4 , cluster analysis is performed using adaptive rule sets, and K-means clustering algorithm is applied to identify and classify differentiated rule categories and patterns. The specific steps for generating rule category clusters are:

[0109] S301: Based on the adaptive rule set, principal component analysis is used to extract key features, optimize clustering efficiency, and generate a rule data set after feature optimization;

[0110] S302: Based on the feature-optimized rule data set, clustering is performed using a first K-means clustering algorithm to determine an optimal number of clusters;

[0111] S303: Based on the optimal number of clusters, a second K-means clustering algorithm is used to perform clustering to generate preliminary rule category clusters;

[0112] S304: Based on the preliminary rule category clusters, the silhouette coefficient is applied to perform clustering effect evaluation and iterative optimization to generate optimized rule category clusters;

[0113] Principal component analysis includes covariance matrix calculation, principal component extraction, and dimensionality reduction. The K-means clustering algorithm includes random initial centroid selection, distance calculation, and centroid update. The K-means clustering algorithm continues to include data point allocation, centroid recalculation, and iteration until convergence. The silhouette coefficient evaluation involves clustering tightness and separation calculation.

[0114] In S301, feature optimization is performed using principal component analysis (PCA) to optimize clustering efficiency.

[0115] Sample code:

[0116] from sklearn.decomposition import PCA

[0117] from sklearn.preprocessing import StandardScaler

[0118] #Assume X is the original data set

[0119] #First standardize the data

[0120] X_std=StandardScaler().fit_transform(X)

[0121] # Apply PCA

[0122] pca=PCA(n_components=2)#The number of components can be adjusted according to needs

[0123] X_pca=pca.fit_transform(X_std)

[0124] #X_pca is now a feature-optimized dataset

[0125] In S302, the optimal number of clusters is determined, and the optimal number of clusters of K-means clustering is determined using the elbow method.

[0126] Sample code:

[0127]

[0128] In S303, K-means clustering is performed based on the determined optimal number of clusters.

[0129] Sample code:

[0130] #Assume that the optimal number of clusters is k_opt

[0131] k_opt=3#Example

[0132] kmeans=KMeans(n_clusters=k_opt)

[0133] clusters=kmeans.fit_predict(X_pca)

[0134] #clusters now contains the cluster label for each data point

[0135] In S304, clustering effect evaluation and optimization are performed. The silhouette coefficient is used to evaluate the clustering effect and perform iterative optimization.

[0136] Sample code:

[0137] from sklearn.metrics import silhouette_score

[0138] # Calculate the silhouette coefficient

[0139] silhouette_avg=silhouette_score(X_pca,clusters)

[0140] print("Silhouette coefficient:",silhouette_avg)

[0141] #Evaluate the clustering effect based on the silhouette coefficient. If you are not satisfied, you can adjust the parameters or methods to optimize again

[0142] See also Figure 5 , evaluate the effectiveness of rule category clusters, use cross-validation methods to evaluate the performance of multiple categories of rules, and generate rule effectiveness evaluation reports in the following steps:

[0143] S401: Based on the optimized rule category cluster, a classification decision tree is constructed using the CART algorithm to generate a decision tree structured data set;

[0144] S402: Based on the decision tree structured data set, K-fold cross validation is implemented to perform performance testing and generate preliminary rule effectiveness evaluation data;

[0145] S403: Based on the preliminary rule effectiveness evaluation data, variance analysis ANOVA is used to comprehensively evaluate the rule performance and generate comprehensive performance evaluation indicators;

[0146] S404: Based on the comprehensive performance evaluation indicators, multivariate statistical analysis, machine learning models and trend prediction algorithms are used to conduct in-depth quantitative analysis of rule execution and generate a rule effectiveness evaluation report;

[0147] The CART algorithm includes binary tree construction, Gini index feature selection, and tree pruning. The K-fold cross-validation method includes data set partitioning, subset testing cycle, and performance metric calculation. The variance analysis ANOVA includes analysis of mean differences among multiple groups of samples.

[0148] In step S401, a classification decision tree is constructed by the CART (Classification and Regression Trees) algorithm, which is based on the optimized rule category clusters. The CART algorithm involves binary tree construction, Gini index for feature selection, and tree pruning to avoid overfitting. The decision tree structured data set generated in this step provides a clear and structured analysis framework for subsequent performance testing.

[0149] In step S402, based on the decision tree structured data set, K-fold cross validation is implemented to perform performance testing. The K-fold cross validation method includes dividing the data set into K subsets, each subset is used as a test set in turn, and the rest are used as training sets. In each round, the test set is used to evaluate the performance of the model, and through the cyclic process, the average value of the performance metric can be calculated. The preliminary rule effectiveness evaluation data generated in this step provides a basis for comprehensive evaluation.

[0150] In step S403, based on the preliminary rule effectiveness evaluation data, variance analysis ANOVA is used to comprehensively evaluate the rule performance. ANOVA is used to analyze the differences between the means of multiple groups of samples to determine whether the performance of different rule categories is significantly different. The comprehensive performance evaluation index generated in this step provides a detailed basis for the final rule effectiveness evaluation.

[0151] In step S404, based on comprehensive performance evaluation indicators, multivariate statistical analysis, machine learning models and trend prediction algorithms are used for in-depth quantitative analysis. The analysis methods in the step include model performance evaluation, future effectiveness prediction, etc., aiming to fully understand and predict the actual application effect of the rule set. Through these analyses, the generated rule effectiveness evaluation report reflects the performance and application potential of different rule categories in detail.

[0152] See also Figure 6 ,According to the rule effectiveness evaluation report, the decision tree algorithm is used to optimize and refine the rules. The specific steps for generating the optimized rule set are:

[0153] S501: Based on the performance evaluation report, feature selection technology is used to identify and select key features that affect the effectiveness of the rules and generate a key feature set;

[0154] S502: Based on the key feature set, applying the decision tree learning algorithm, constructing an initial decision tree model, and generating a preliminary decision tree model;

[0155] S503: Based on the preliminary decision tree model, perform model optimization, including pruning and parameter tuning, to generate an optimized decision tree model;

[0156] S504: Based on the optimized decision tree model, feature selection and association rule learning methods are used to extract and refine the rule set to generate an optimized rule set;

[0157] Feature selection techniques include correlation analysis and information gain calculation. Decision tree learning algorithms include classification and regression trees and ID3 algorithms. Model optimization refers to the application of pruning algorithms and cross-validation techniques. Feature selection includes information gain ratio, Gini index and mutual information method. Association rule learning methods include Apriori algorithm, FP-growth algorithm and Eclat algorithm.

[0158] In step S501, based on the performance evaluation report, feature selection technology is used, including correlation analysis and information gain calculation. The purpose is to identify and select key features that have a significant impact on the effectiveness of the rules, so as to generate a key feature set. The key to this step is to accurately identify which features have a significant impact on the effectiveness of the rules, thereby laying the foundation for building a more effective decision tree model.

[0159] In step S502, based on the key feature set, a decision tree learning algorithm, such as classification and regression tree (CART) and ID3 algorithm, is applied to construct an initial decision tree model. This step involves taking the key feature set as input and using a learning algorithm to construct a tree structure that can describe the data classification or regression relationship, thereby generating a preliminary decision tree model.

[0160] In step S503, based on the preliminary decision tree model, model optimization is performed. This includes pruning and parameter tuning, the purpose of which is to prevent the model from overfitting and improve its generalization ability. The pruning algorithm simplifies the model by removing certain branches in the decision tree, while parameter tuning involves adjusting the model parameters to achieve optimal performance. The step generates an optimized decision tree model.

[0161] In step S504, based on the optimized decision tree model, feature selection and association rule learning methods are adopted, including Apriori algorithm, FP-growth algorithm and Eclat algorithm. These methods are used to extract and refine rule sets, that is, to extract specific rules from the decision tree model to generate an optimized rule set. The key step is to transform a complex model into a practically applicable rule set, thereby improving the practicality and execution efficiency of the rule set.

[0162] See also Figure 7 , integrate the optimized rule set into the rule engine and configure it. Use the rule engine configuration tool to generate a configured intelligent rule engine. The specific steps are as follows:

[0163] S601: Based on the optimized rule set, using rule mapping and integration tools, the rules are integrated into the initial configuration of the rule engine to generate a preliminary integrated rule engine;

[0164] S602: Based on the preliminarily integrated rule engine, perform rule configuration, and generate a configuration-optimized rule engine by setting parameters and performing logic optimization;

[0165] S603: Perform testing and verification based on the configuration optimized rule engine, maintain the rule engine operation, and generate a rule engine after testing and verification;

[0166] S604: Based on the rule engine after the test verification, use the rule engine configuration tool to configure and generate a configured intelligent rule engine;

[0167] Rule mapping and integration tools include rule converters and interface adapters. Rule configuration includes parameter optimization strategies and execution path optimization. Testing and verification include performance testing and rule effect evaluation. Rule engine configuration tools include configuration managers and real-time monitoring systems.

[0168] In step S601, the optimized rule set is integrated into the initial configuration of the rule engine through rule mapping and integration tools. The specific operation includes using rule converters and interface adapters, which help convert existing rules into a format recognizable by the rule engine and ensure compatibility with the initial configuration of the engine, thereby creating a preliminary integrated rule engine.

[0169] In step S602, in-depth configuration is performed based on the initially integrated rule engine. The operation includes the application of optimization strategies for parameter settings and the optimization of execution logic to improve the efficiency and accuracy of the rule engine. The step focuses on fine-tuning the rule engine to ensure its effective operation in different scenarios.

[0170] In step S603, the optimized rule engine is thoroughly tested and verified. This includes performance testing and rule effect evaluation to verify whether the rule engine can operate efficiently and accurately in actual scenarios. The key to this step is to ensure the reliability and stability of the rule engine.

[0171] In step S604, the configuration tool is used to perform final configuration on the rule engine that has passed the test verification. This includes applying the configuration manager to refine the settings and implementing a real-time monitoring system to monitor performance. This step is the final stage of generating a configured intelligent rule engine to ensure its stable operation in actual deployment.

[0172] See also Figure 8 , perform system testing and performance optimization on the configured intelligent rule engine, use system testing methods and performance monitoring tools, and generate system testing reports and performance optimization results in the following steps:

[0173] S701: Based on the configured intelligent rule engine, use software testing methods to perform functionality and stability testing and generate functionality and stability test reports;

[0174] S702: Based on the functional and stability test reports, use performance evaluation tools to evaluate the running performance of the rule engine, identify performance bottlenecks, and generate a preliminary performance analysis report;

[0175] S703: Based on the preliminary performance analysis report, the rule engine is optimized by applying performance optimization technology to generate an optimized rule engine;

[0176] S704: Based on the optimized rule engine, the system testing method and performance monitoring tool are used again to perform testing and performance evaluation, verify the effectiveness of all optimization measures, and generate a system test report and performance optimization results;

[0177] Software testing methods include boundary value analysis, equivalence class partitioning and error guessing techniques; performance evaluation tools include CPU and memory usage monitoring, process tracking and resource allocation analysis; performance optimization techniques include algorithm complexity analysis, code optimization techniques and data structure selection; testing and evaluation include regression testing and system load testing.

[0178] In step S701, the configured intelligent rule engine is tested for functionality and stability through software testing methods. The operations include boundary value analysis, equivalence class partitioning, and error guessing techniques, which are designed to ensure the accuracy and stability of the rule engine in various edge cases. The result of this step is the generation of a functional and stability test report, which provides a basis for subsequent performance evaluation.

[0179] In step S702, based on the functional and stability test reports, the performance of the rule engine is evaluated through a performance evaluation tool. The operation includes monitoring CPU and memory usage, process tracking, and resource allocation analysis to identify performance bottlenecks. The result of this step is the generation of a preliminary performance analysis report that points out the key areas for performance optimization.

[0180] In step S703, based on the preliminary performance analysis report, the rule engine is optimized by applying performance optimization technology. This includes algorithm complexity analysis, code optimization techniques and data structure selection to improve the operating efficiency of the rule engine. After this step is completed, an optimized rule engine is generated.

[0181] In step S704, based on the optimized rule engine, the system testing method and performance monitoring tools are used again for testing and performance evaluation. Step testing includes regression testing and system load testing to verify the effectiveness of all optimization measures. Generate system test reports and performance optimization results to ensure that the rule engine reaches the best performance state before final deployment.

[0182] See also Fig. 9 , an intelligent rule engine configuration system, the intelligent rule engine configuration system is used to execute the above-mentioned intelligent rule engine configuration method, the system includes a data acquisition and preprocessing module, a feature extraction and modeling module, a rule generation and optimization module, a rule clustering and evaluation module, a decision tree optimization module, and a system testing and performance optimization module.

[0183] The data acquisition and preprocessing module is based on real-time data streams, uses stream data processing technology, and performs data preprocessing through Gaussian filtering denoising, Z-Score outlier processing, and Min-Max data standardization to generate preprocessed data streams;

[0184] The feature extraction and modeling module uses fast Fourier transform and autoregressive model to extract features based on the preprocessed data stream, and then applies recurrent neural network to perform time series modeling to generate a time series model;

[0185] The rule generation and optimization module is based on the time series model and uses online logistic regression and incremental learning algorithms to generate rules and real-time optimization to generate adaptive rule sets;

[0186] The rule clustering and evaluation module is based on an adaptive rule set, uses principal component analysis and the Elbow method to determine the optimal K value for K-means clustering, applies the silhouette coefficient to evaluate the clustering effect, and generates rule category clusters;

[0187] The decision tree optimization module uses the C4.5 algorithm to build a decision tree based on rule category clusters and applies α-pruning to optimize the model to generate an optimized rule set;

[0188] The system testing and performance optimization module uses black box testing and load testing to perform system testing based on the optimized rule set, and uses CPU cache optimization and memory management technology to optimize performance, generating system test reports and performance optimization results.

[0189] The data acquisition and preprocessing module ensures the high quality and reliability of input data through advanced stream data processing technology and data preprocessing methods, providing a solid foundation for subsequent analysis and decision-making. Secondly, the application of the feature extraction and modeling module, especially the combination of fast Fourier transform and recurrent neural network, improves the ability to extract key features from complex data and build accurate models, thereby enhancing the accuracy of prediction and decision-making. The rule generation and optimization module realizes real-time update and adaptive optimization of rule sets through online logistic regression and incremental learning algorithms, increasing the system's adaptability to the ever-changing data environment. The rule clustering and evaluation module improves the organization and effectiveness of the rule set through efficient clustering algorithms and evaluation indicators, making the rules more orderly and easy to manage. The decision tree optimization module improves the efficiency and accuracy of the decision tree model and reduces the risk of overfitting through the C4.5 algorithm and α-pruning technology. The system testing and performance optimization module ensures the stable operation and high performance of the system. Through comprehensive testing and optimization techniques, it improves the system's response speed and processing capacity, while ensuring stability and reliability under high load conditions.

[0190] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for configuring an intelligent rule engine, characterized in that: The following steps are involved: Based on real-time data streams, recurrent neural networks are used to perform dynamic data pattern recognition, capture time-related patterns and trends in data, and generate time series pattern recognition results; Based on the time series pattern recognition results, an online learning algorithm is applied to automatically generate rules that can adapt to data changes and generate an adaptive rule set; The steps of the adaptive rule set are specifically as follows: According to the results of the time series pattern recognition, a rule-based learning method is used to analyze the identified patterns and generate a preliminary rule set; Applying an online support vector machine to optimize and adjust the preliminary rule set in real time to generate an online optimized rule set; Conducting performance testing on the online optimization rule set, using cross-validation and performance indicator evaluation to generate a rule performance test report; According to the rule effectiveness test report, make adjustments and plans to generate an adaptive rule set; The learning method includes decision trees and rule-based classifiers, the online support vector machine includes real-time parameter adjustment and model adaptation, and the performance test includes accuracy, recall and F1 score evaluation; Performing cluster analysis using the adaptive rule set, applying a K-means clustering algorithm, identifying and classifying differentiated rule categories and patterns, and generating rule category clusters; Conducting performance evaluation on the rule category clusters, using cross-validation methods to evaluate the performance of multiple categories of rules, and generating a rule performance evaluation report; The steps of the rule effectiveness evaluation report are specifically as follows: Based on the optimized rule category clusters, the CART algorithm is used to build a classification decision tree and generate a decision tree structured data set; Based on the decision tree structured data set, K-fold cross validation is implemented to perform performance testing and generate preliminary rule effectiveness evaluation data; Based on the preliminary rule effectiveness evaluation data, variance analysis ANOVA is used to comprehensively evaluate the rule performance and generate comprehensive performance evaluation indicators; Based on the comprehensive performance evaluation indicators, multivariate statistical analysis, machine learning models and trend prediction algorithms are used to conduct in-depth quantitative analysis of rule execution and generate a rule effectiveness evaluation report; The CART algorithm includes binary tree construction, Gini index feature selection, and tree pruning; the K-fold cross validation method includes data set partitioning, subset test loop, and performance metric calculation; and the variance analysis ANOVA includes multi-group sample mean difference analysis; According to the rule effectiveness evaluation report, the rules are optimized and refined using a decision tree algorithm to generate an optimized rule set; The steps of the optimized rule set are specifically as follows: Based on the effectiveness evaluation report, feature selection technology is used to identify and select key features that affect the effectiveness of the rules, and a key feature set is generated; Based on the key feature set, applying a decision tree learning algorithm, constructing an initial decision tree model, and generating a preliminary decision tree model; Based on the preliminary decision tree model, perform model optimization, including pruning and parameter tuning, to generate an optimized decision tree model; Based on the optimized decision tree model, feature selection and association rule learning methods are used to extract and refine rule sets to generate optimized rule sets; The feature selection technology specifically includes correlation analysis and information gain calculation, the decision tree learning algorithm includes classification and regression tree and ID3 algorithm, the model optimization specifically refers to the application of pruning algorithm and cross-validation technology, the feature selection specifically includes information gain ratio, Gini index and mutual information method, and the association rule learning method includes Apriori algorithm, FP-growth algorithm and Eclat algorithm; Integrate the optimized rule set into the rule engine, configure it, and use the rule engine configuration tool to generate a configured intelligent rule engine; Perform system testing and performance optimization on the configured intelligent rule engine, and use system testing methods and performance monitoring tools to generate system testing reports and performance optimization results; The time series pattern recognition results include periodic changes, trend fluctuations and abnormal data points, the adaptive rule set includes response rules and adjustment strategies for differentiated data patterns, the rule category cluster includes multiple rule categories based on data characteristics, the rule effectiveness evaluation report includes accuracy and efficiency indicators of multiple rule categories, the optimized rule set includes optimized condition judgments and action responses, the configured intelligent rule engine includes multiple types of rules and execution mechanisms, and the system test report and performance optimization results include stability evaluation, response speed and adaptive performance indicators.

2. The intelligent rule engine configuration method according to claim 1, characterized in that: Based on real-time data streams, recurrent neural networks are used to perform dynamic data pattern recognition, capture time-related patterns and trends in data, and generate time series pattern recognition results. The specific steps are as follows: Real-time data acquisition technology is used to capture data streams, and preprocess them through data cleaning and normalization methods to generate preprocessed data streams; Applying a time window method and feature vectorization technology to extract features from the preprocessed data stream and generate a data feature set; Based on the data feature set, a recurrent neural network is used to perform time series modeling to generate a time series model; Using a long short-term memory network, pattern recognition and analysis are performed on the time series model to generate a time series pattern recognition result; The preprocessing includes data denoising, outlier processing and data standardization, the feature extraction includes time-frequency conversion and statistical feature extraction, the recurrent neural network is used to identify time dependencies in data, and the pattern recognition includes trend analysis and cyclic pattern recognition.

3. The intelligent rule engine configuration method according to claim 1, characterized in that: The steps of performing cluster analysis using the adaptive rule set and applying the K-means clustering algorithm to identify and classify differentiated rule categories and patterns and generate rule category clusters are as follows: Based on the adaptive rule set, principal component analysis is used to extract key features, optimize clustering efficiency, and generate a rule data set with optimized features; Based on the feature-optimized rule data set, clustering is performed using a first K-means clustering algorithm to determine an optimal number of clusters; Based on the optimal number of clusters, clustering is performed using a second K-means clustering algorithm to generate preliminary rule category clusters; Based on the preliminary rule category clusters, applying silhouette coefficient to perform clustering effect evaluation and iterative optimization to generate optimized rule category clusters; The principal component analysis includes covariance matrix calculation, principal component extraction, and dimensionality reduction processing. The first K-means clustering algorithm includes random initial centroid selection, distance calculation, and centroid update. The second K-means clustering algorithm continues to include data point allocation, centroid recalculation, and iteration until convergence. The silhouette coefficient evaluation involves clustering compactness and separation calculation.

4. The intelligent rule engine configuration method according to claim 1, characterized in that: The optimized rule set is integrated into the rule engine and configured. The steps of generating a configured intelligent rule engine using a rule engine configuration tool are as follows: Based on the optimized rule set, using rule mapping and integration tools, the rules are integrated into the initial configuration of the rule engine to generate a preliminary integrated rule engine; Based on the preliminarily integrated rule engine, rule configuration is performed, and a configuration-optimized rule engine is generated by parameter setting and execution logic optimization; Based on the rule engine optimized by the configuration, test and verify, maintain the operation of the rule engine, and generate a rule engine after testing and verification; Based on the rule engine that has been tested and verified, use the rule engine configuration tool to configure and generate a configured intelligent rule engine; The rule mapping and integration tool includes a rule converter and an interface adapter, the rule configuration is specifically parameter optimization strategy and execution path optimization, the testing and verification includes performance testing and rule effect evaluation, and the rule engine configuration tool includes a configuration manager and a real-time monitoring system.

5. The intelligent rule engine configuration method according to claim 1, characterized in that: The steps of performing system testing and performance optimization on the configured intelligent rule engine, using system testing methods and performance monitoring tools, and generating system testing reports and performance optimization results are as follows: Based on the configured intelligent rule engine, a software testing method is used to perform functionality and stability testing, and a functionality and stability test report is generated; Based on the functional and stability test reports, use performance evaluation tools to evaluate the operational performance of the rule engine, identify performance bottlenecks, and generate a preliminary performance analysis report; Based on the preliminary performance analysis report, applying performance optimization technology to optimize the rule engine to generate an optimized rule engine; Based on the optimized rule engine, the system testing method and performance monitoring tool are used again to perform testing and performance evaluation, verify the effectiveness of all optimization measures, and generate a system test report and performance optimization results; The software testing method includes boundary value analysis, equivalence class partitioning and error guessing technology, the performance evaluation tool includes CPU and memory usage monitoring, process tracking and resource allocation analysis, the performance optimization technology includes algorithm complexity analysis, code optimization techniques and data structure selection, and the testing and evaluation includes regression testing and system load testing.

6. An intelligent rule engine configuration system, characterized in that: According to the intelligent rule engine configuration method according to any one of claims 1 to 5, the system includes a data acquisition and preprocessing module, a feature extraction and modeling module, a rule generation and optimization module, a rule clustering and evaluation module, a decision tree optimization module, and a system testing and performance optimization module; The data acquisition and preprocessing module is based on real-time data stream, adopts stream data processing technology and performs data preprocessing through Gaussian filtering denoising, Z-Score outlier processing and Min-Max data standardization to generate a preprocessed data stream; The feature extraction and modeling module uses fast Fourier transform and autoregressive model to extract features based on the preprocessed data stream, and then applies recurrent neural network to perform time series modeling to generate a time series model; The rule generation and optimization module is based on a time series model and uses online logistic regression and incremental learning algorithms to generate rules and perform real-time optimization to generate an adaptive rule set; The rule clustering and evaluation module is based on an adaptive rule set, uses principal component analysis and the Elbow method to determine the optimal K value for K-means clustering, applies the silhouette coefficient to evaluate the clustering effect, and generates rule category clusters; The decision tree optimization module uses the C4.5 algorithm to construct a decision tree based on rule category clusters and applies α-pruning to perform model optimization to generate an optimized rule set; The system testing and performance optimization module performs system testing based on the optimized rule set using black box testing and load testing, and optimizes performance using CPU cache optimization and memory management technology to generate system testing reports and performance optimization results.