Drools rule generation device for car owner member management and car owner member management system
By designing a Drools rule generation device managed by car owner members, the problem of serious coupling between rules and business systems in the existing system is solved, and the simplification of rule updates and improvement of system flexibility is achieved.
Patent Information
- Application Number
- CN202210156357.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-02-21
AI Technical Summary
In the existing car owner member management system, the rules are seriously coupled with the business system, resulting in frequent rule updates requiring a large number of R&D personnel to participate, which is inefficient.
A Drools rule generation device managed by car owner members is designed, including a scene model construction module, a scene management module, a condition management module, an action management module, a rule management module and a variable management module. Through the combination of these modules, Drools rule files are generated and managed to reduce the coupling between rules and business systems.
It realizes the decoupling of rules and business systems, simplifies the rule update process, reduces the need for R&D personnel to participate, and improves the flexibility and efficiency of the system.
Smart Images

Figure CN114518869B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of member management, and provides a drools rule generating device for car owner member management and a car owner member management system. Background Art
[0002] In order to enhance the user stickiness of car owners, promote better communication between users and the auto industry, increase platform usage rate, establish a better brand image, and build a successful membership system, the problems faced are frequent updates of member usage scenarios, the use of traditional methods, and the serious coupling of rules and business systems. Any changes require system upgrades, which require the participation of a large number of R&D personnel. Summary of the invention
[0003] The present invention provides a drools rule strategy platform for a car owner membership system, aiming to reduce the coupling between rules and business systems.
[0004] The present invention is implemented as follows: a drools rule generation device for car owner member management, the device comprising:
[0005] Scenario model building module, scenario management module, condition management module, action management module, rule management module and variable management module, among which,
[0006] The scene management module is used to record the scene name, scene identifier and entity corresponding to each scene. The scene identifier is used for external calls, and the entity corresponding to the scene is the description field of the scene;
[0007] The scene model building module builds scene models for various scenes and defines scene model properties, including: model variables;
[0008] Action management module, which configures the actions of model variables in each scenario;
[0009] Condition management module, configures the triggering conditions of actions in each scenario;
[0010] The rule management module matches the trigger conditions in the condition management module with the actions in the action management module to form rules;
[0011] The rule file classifies the rules in the rule management module according to the scenario, that is, the Drools rule file for each scenario.
[0012] Furthermore, the device also includes:
[0013] The variable management module manages the variables in each scene and updates the variable values of related variables in the scene based on variable change notifications.
[0014] Furthermore, the device also includes:
[0015] The notification module sends a scenario rule file change notification when the rule file of the specified scenario changes, and sends a variable change notification when the variable in the variable management module changes.
[0016] The present invention is implemented as follows: a car owner membership management system, the system comprising:
[0017] A plurality of terminal devices, wherein the plurality of terminal devices are in communication connection with a server, and the server stores various scenario rule files generated by a drools rule generation device based on the car owner member management;
[0018] The terminal device includes: loading module and rule executor,
[0019] When the relevant scenario is triggered, it is detected whether there is a Drools rule file of the relevant scenario in the terminal device. If the detection result is no, the loading module loads the Drools rule file of the relevant scenario and the relevant variables in the variable management module to the terminal device;
[0020] The rule executor, when the trigger conditions of the relevant variables in the current scenario are met, executes the actions corresponding to the trigger conditions, locally updates the variable values of the relevant variables, and issues a variable change notification.
[0021] Furthermore, the terminal device includes:
[0022] The rule recording module generates an execution record after the action is successfully executed, including the action execution time and execution result, and uploads it to the server for storage.
[0023] Furthermore, the terminal device includes:
[0024] The update module updates the Drools rule files of local related scenarios based on rule file change notifications.
[0025] Abstract the entire rule file into one, call a unified rule generation engine, parse the MySQL table into a Drools rule file, and store it in the Redis cache;
[0026] The present invention forms Drools rule files for various scenarios through a combination of trigger conditions and actions, which facilitates the updating of scenario rules and reduces the coupling between rules and business systems. The scenario rule files are stored in a redis cluster to achieve rule consistency between clusters and complete a dynamic rule engine solution in a distributed environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of the structure of a drools rule generation device for car owner member management provided by an embodiment of the present invention;
[0028] Figure 2 A schematic diagram of the structure of a car owner membership management system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0029] The specific implementation of the present invention will be further explained in detail below by describing the optimal embodiment with reference to the accompanying drawings.
[0030] Figure 1 A schematic diagram of the structure of a drools rule generation device for car owner member management provided by an embodiment of the present invention. For ease of description, only the part related to the embodiment of the present invention is shown. The device includes:
[0031] Scenario model building module, scenario management module, condition management module, action management module, rule management module and variable management module.
[0032] The scene management module is used to record the scene name, scene identifier and entity corresponding to each scene. The scene identifier is used for external calls, and the entity corresponding to the scene is the description field of the scene.
[0033] The scene model construction module builds scene models for various scenes and defines scene model attributes. The scene model attributes include: login, registration, likes, and model variables;
[0034] The action management module configures the actions of model variables in each scenario, such as sending points. The focus here is still on the configuration of actions, that is, the actions performed for points, such as the action of sending points.
[0035] The condition management module configures the triggering conditions for actions in each scenario. For example, the condition for sending points is the consumption amount.
[0036] The rule management module matches the trigger conditions in the condition management module with the actions in the action management module to form the rules in the rule management module;
[0037] Rule files: classify the rules in the rule management module by scenario, that is, store the Drools rule files for each scenario in the Redis cache;
[0038] The variable management module manages the variables in each scenario, including the update of variables. The variable management module includes: static variables and dynamic variables. Static variables have fixed variable values. The values of static variables include character type, numeric type, and date type. Dynamic variables are determined based on model (entity) attributes, that is, the source of dynamic variables is the scene model attributes.
[0039] In an embodiment of the present invention, the drools rule generation device for car owner member management further includes:
[0040] The notification module issues a rule file change notification for the corresponding scenario when the rule file of the specified scenario changes, so that all terminal devices can update the Drools rule file of the relevant scenario based on the rule file change notification. At the same time, when the variables in the variable management module change, a variable change notification is issued, so that all terminal devices can update the variable values of the relevant variables based on the variable change notification.
[0041] Figure 2 The schematic diagram of the structure of the car owner membership management system provided by the embodiment of the present invention, for the convenience of explanation, only the part related to the embodiment of the present invention is shown, the system includes:
[0042] Multiple terminal devices, multiple terminal devices are connected to the server for communication, and the relational database in the server stores the rule files of each scenario;
[0043] The terminal device includes: loading module and rule executor,
[0044] When the relevant scenario is triggered, it is detected whether the Drools rule file of the relevant scenario and the relevant variables in the variable management module exist in the terminal device. If the detection result is no, the loading module loads the Drools rule file of the relevant scenario and the relevant variables to the terminal device. If the detection result is yes, no loading is required;
[0045] The rule executor, when the trigger conditions of the relevant variables in the current scenario are met, executes the actions corresponding to the trigger conditions, updates the relevant variables locally, and issues variable change notifications.
[0046] In an embodiment of the present invention, the terminal device further includes:
[0047] The update module updates the Drools rule files of relevant scenarios in all terminal devices based on rule file change notifications.
[0048] In an embodiment of the present invention, the terminal device further includes:
[0049] The rule recording module generates an execution record after the action is successfully executed, including the execution time and execution result of the action, and uploads it to the server for storage.
[0050] Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, they are all within the protection scope of the present invention.
Claims
1. A drools rule generation device for car owner member management, characterized in that: The device comprises: Scenario model building module, scenario management module, condition management module, action management module, rule management module and variable management module, among which, The scene management module is used to record the scene name, scene identifier and entity corresponding to each scene. The scene identifier is used for external calls, and the entity corresponding to the scene is the description field of the scene; The scene model building module builds scene models of various scenes and defines scene model properties. The scene model properties include: model variables; Action management module, which configures the actions of model variables in each scenario; Condition management module, configures the triggering conditions of actions in each scenario; The rule management module matches the trigger conditions in the condition management module with the actions in the action management module to form rules; Rule files, which classify the rules in the rule management module by scenario, that is, Drools rule files for each scenario; The device also includes: The variable management module manages the variables in each scene and updates the variable values of related variables in the scene based on variable change notifications.
2. The drools rule generation device for car owner member management as claimed in claim 1, characterized in that: The device also includes: The notification module sends a scenario rule file change notification when the rule file of the specified scenario changes, and sends a variable change notification when the variable in the variable management module changes.
3. A car owner membership management system, characterized in that: The system comprises: A plurality of terminal devices, wherein the plurality of terminal devices are communicatively connected to a server, and the server stores various scenario rule files formed by the drools rule generation device for car owner member management according to any one of claims 1 or 2; The terminal device includes: loading module and rule executor, When a relevant scenario is triggered, it is detected whether there is a Drools rule file of the relevant scenario in the terminal device. If the detection result is no, the loading module loads the Drools rule file of the relevant scenario and the relevant variables in the variable management module to the terminal device; The rule executor, when the trigger conditions of the relevant variables in the current scenario are met, executes the actions corresponding to the trigger conditions, locally updates the variable values of the relevant variables, and issues a variable change notification.
4. The car owner membership management system as claimed in claim 3, characterized in that: The terminal device comprises: The rule recording module generates an execution record after the action is successfully executed, including the action execution time and execution result, and uploads it to the server for storage.
5. The car owner membership management system as claimed in claim 3, characterized in that: The terminal device comprises: The update module updates the Drools rule files of local related scenarios based on rule file change notifications.
Citation Information
Patent Citations
Network event correlation analysis method and device
CN103795565A