Rule data processing method and system, electronic equipment and storage medium

By introducing a caching mechanism and rule base storage into the insurance claims processing process, the problems of time-consuming loading and management complexity of the Drools rule engine are solved, enabling flexible and efficient rule processing and improving system response speed and the convenience of rule management.

CN120873027APending Publication Date: 2025-10-31CHINA CONTINENT PROPERTY & CASUALTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511039185.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In the current insurance claims processing, the Drools rule engine's rule file loading and parsing process is time-consuming, resource-intensive, and cannot be updated in a timely manner. Furthermore, the file storage mode is highly complex in terms of rule modification and management, which affects system efficiency and flexibility.

Method used

By employing a caching mechanism, the rules of the Drools rule engine are reloaded into the cache at preset intervals or when business rules change. When a business request is received, the rules are loaded and executed on demand. Through rule base storage and Drools engine parsing, flexible and efficient rule processing is achieved.

Benefits of technology

It improves the timeliness and smoothness of rule execution, reduces rule reading time, enhances the convenience and flexibility of rule management, and ensures the efficient execution of the Drools engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873027A_ABST
    Figure CN120873027A_ABST
Patent Text Reader

Abstract

The invention discloses a rule data processing method and system, electronic equipment and a storage medium, and the method comprises the steps: loading a business rule which is newly deployed and published by a rule engine into a cache when a preset time interval or a business rule changes; wherein the rule engine is a Drools rule engine; after service rules are configured and stored in a rule base, a rule engine is deployed and published; when a service request is received, sending a processing request to the rule engine according to the service request; analyzing information in the processing request through a rule engine and constructing a temporary container; loading a plurality of current service rules from the cache; converting each current service rule into a file format which can be identified by a rule engine; and storing each current service rule in a temporary container, and carrying out operation and matching on information in the processing request by each current service rule, and determining and feeding back each current service rule meeting a corresponding condition and corresponding action information or decision result thereof.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of business rule processing technology, and in particular to a rule data processing method and system, electronic device, and storage medium. Background Technology

[0002] The Drools rule engine, a highly configurable decision management system, plays a crucial role in the insurance claims processing workflow. It liberates the rules for sending and returning accident vehicles for repair from hard-coding, storing them as rule scripts in files. The Drools rule engine executes these rule files to achieve rule execution. Modifying rules only requires changing the rule files, thus enabling flexible rule changes and avoiding frequent code deployments.

[0003] Therefore, the corresponding rule files are configured and stored for the current rules. Then, during the system initialization phase, the Drools engine needs to fully load and parse all the stored rule files in order to execute the rules using the results of the loaded and parsed rules.

[0004] However, this approach requires the Drools engine to fully load and parse a large number of rule files during system initialization, a process that is time-consuming. This is especially true when the rule set is large or the file structure is complex, significantly increasing resource consumption and time consumption during loading, extending startup time and execution time, making efficient processing impossible. Furthermore, new rules can only be loaded during initialization, hindering timely rule updates. On the other hand, compared to embedding rules directly into the database or managing them using in-memory data structures, file-based rule storage is more complex in terms of rule modification, querying, and version control, making it very inconvenient to manage. Therefore, while the current approach ensures business flexibility, it cannot operate conveniently and efficiently. Summary of the Invention

[0005] In view of the shortcomings of the prior art, this application provides a rule data processing method and system, electronic device and storage medium to solve the problem that the prior art cannot process rules conveniently and efficiently while ensuring flexibility.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] The first aspect of this application provides a rule data processing method, including:

[0008] Whenever a preset time interval or a business rule changes, the latest deployed and published business rules of the Drools rule engine are reloaded into the cache; wherein, after the business rules are configured and stored in the rule base, they are deployed in the Drools rule engine and published.

[0009] Whenever a business request is received, a processing request is sent to the Drools rule engine according to the current business request;

[0010] The Drools rule engine parses the information in the processing request and constructs a temporary container.

[0011] Based on the information in the processing request, multiple current business rules are loaded from the business rules in the cache; wherein, the current business rules refer to the business rules that need to be executed at present.

[0012] Convert each of the currently loaded business rules into a file format recognizable by the Drools rule engine;

[0013] Each of the current business rules converted into a file format is stored in the temporary container. Based on each of the current business rules in the temporary container, the information in the processing request is calculated and matched to determine each of the current business rules that meet the corresponding conditions and its corresponding action information or decision result.

[0014] The identified current business rules and their corresponding action information or decision results will be fed back.

[0015] Optionally, the above-mentioned rule data processing method further includes:

[0016] In response to the user's rule configuration operation on the tool interface, each of the business rules configured through the rule configuration center that conforms to the specified target syntax supported by the Drools rule engine is executed.

[0017] Each of the aforementioned business rules is converted into a table structure in the rule base and stored in the rule base;

[0018] Each of the business rules in the rule base is deployed to the Drools rule engine, and the deployed business rules are published through the Drools rule engine.

[0019] Optionally, in the above rule data processing method, after converting each of the business rules into a table structure in the rule base for storage in the rule base, the method further includes:

[0020] The rule configuration center records the current status and modification information of the rules.

[0021] Optionally, in the above rule data processing method, the step of deploying each of the business rules in the rule base to the Drools rule engine, and publishing each of the deployed business rules through the Drools rule engine, includes:

[0022] Package each of the business rules in the rule base into a format recognizable by the Drools rule engine;

[0023] By invoking the Drools rule engine or executing a specific deployment command, each packaged business rule is deployed to the Drools rule engine;

[0024] The Drools rule engine is used to publish each of the deployed business rules.

[0025] Optionally, in the above rule data processing method, sending a processing request to the Drools rule engine based on the current business request includes:

[0026] Based on the rule information and context information in the current business request, a processing request is sent to the Drools rule engine.

[0027] The step of parsing the information in the processing request and constructing a temporary container through the Drools rule engine includes:

[0028] The Drools rule engine parses the rule information and context information in the processing request and constructs a temporary container.

[0029] Optionally, in the above rule data processing method, loading multiple current business rules from the cached business rules based on the information in the processing request includes:

[0030] Based on the rule information in the processing request, each business rule corresponding to the rule information is loaded from each business rule in the cache and used as the current business rule.

[0031] Optionally, in the above rule data processing method, the step of performing calculations and matching on the information in the processing request based on each of the current business rules in the temporary container, and determining each of the current business rules that meet the corresponding conditions and their corresponding action information or decision results, includes:

[0032] Within the temporary container, the context information is calculated based on each of the current business rules to determine the current business rules that satisfy its conditions.

[0033] Obtain the action information or decision results corresponding to each of the current business rules that meet the conditions.

[0034] A second aspect of this application provides a rule-based data processing system, comprising:

[0035] The caching unit is used to reload the latest deployed and published business rules of the Drools rule engine into the cache whenever there is a preset interval or when the business rules change; wherein, after the business rules are configured and stored in the rule base, they are deployed and published in the Drools rule engine.

[0036] The request unit is used to send a processing request to the Drools rule engine whenever a business request is received, based on the current business request.

[0037] The parsing unit is used to parse the information in the processing request and construct a temporary container through the Drools rule engine.

[0038] The loading unit is used to load multiple current business rules from the business rules in the cache based on the information in the processing request; wherein, the current business rules refer to the business rules that need to be executed at present;

[0039] The first conversion unit is used to convert each of the loaded current business rules into a file format that the Drools rule engine can recognize;

[0040] An execution unit is used to store each of the current business rules converted into a file format into the temporary container, and to perform calculations and matching on the information in the processing request based on each of the current business rules in the temporary container, to determine each of the current business rules that meet the corresponding conditions and their corresponding action information or decision results;

[0041] The feedback unit is used to provide feedback on each of the determined current business rules and their corresponding action information or decision results.

[0042] Optionally, the above-mentioned rule data processing system also includes:

[0043] The configuration unit is used to respond to the user's rule configuration operation on the tool interface, and to configure each of the business rules that conform to the specified target syntax supported by the Drools rule engine through the rule configuration center;

[0044] A storage unit is used to convert each of the aforementioned business rules into a table structure in the rule base for storage in the rule base;

[0045] The deployment unit is used to deploy each of the business rules in the rule base to the Drools rule engine, and publish each of the deployed business rules through the Drools rule engine.

[0046] Optionally, the above-mentioned rule data processing system also includes:

[0047] The recording unit is used to record the current status and modification information of the rules through the rule configuration center.

[0048] Optionally, in the above-described rule-based data processing system, the deployment unit includes:

[0049] The packaging unit is used to package each of the business rules in the rule base into a format recognizable by the Drools rule engine;

[0050] The deployment subunit is used to deploy the packaged business rules to the Drools rule engine by invoking the Drools rule engine or executing a specific deployment command;

[0051] The publishing unit is used to publish each of the deployed business rules through the Drools rule engine.

[0052] Optionally, in the above-described rule data processing system, the request unit includes:

[0053] The request subunit is used to send a processing request to the Drools rule engine based on the rule information and context information in the current business request.

[0054] The parsing unit includes:

[0055] The parsing subunit is used to parse the rule information and context information in the processing request through the Drools rule engine, and to construct a temporary container.

[0056] Optionally, in the above-described rule data processing system, the loading unit includes:

[0057] The rule loading unit is used to load each business rule corresponding to the rule information from each business rule in the cache based on the rule information in the processing request, and use it as the current business rule.

[0058] Optionally, in the above-described rule data processing system, the execution unit includes:

[0059] The determining unit is configured to perform calculations on the context information based on each of the current business rules within the temporary container, and determine each of the current business rules that satisfy its conditions.

[0060] The acquisition unit is used to acquire action information or decision results corresponding to each of the current business rules that meet its conditions.

[0061] A third aspect of this application provides an electronic device, comprising:

[0062] Memory and processor;

[0063] The memory is used to store programs;

[0064] The processor is used to execute the program, which, when executed, is specifically used to implement the rule data processing method as described in any of the above.

[0065] A fourth aspect of this application provides a computer storage medium for storing a computer program, which, when executed by a processor, is used to implement the rule data processing method as described in any of the preceding claims.

[0066] This application provides a rule data processing method that directly stores configured business rules in a rule base, eliminating the need for file storage and thus facilitating rule management. After the business rules are configured and stored in the rule base, they are deployed and published to the Drools rule engine, enabling the Drools rule engine to execute the configured business rules. Then, whenever a preset interval is reached or a business rule changes, the latest deployed and published business rules from the Drools rule engine are reloaded into the cache. This allows for timely updates to business rules, eliminating the need for initialization and effectively reducing rule read time, thus improving the timeliness and smoothness of rule execution. When a business request is received, a processing request is sent to the Drools rule engine based on the current business request. The Drools rule engine parses the information in the processing request and constructs a temporary container. Based on the information in the processing request, multiple current business rules are loaded from the cached business rules. Here, "current business rules" refers to the business rules that need to be executed at the moment. By adding relevant information to the processing request, on-demand loading is achieved, eliminating the need to load all rules and further improving the efficiency of rule execution. Then, each loaded current business rule is converted into a file format recognizable by the Drools rule engine, ensuring it can still be executed by the Drools rule engine. The converted current business rules are then stored in a temporary container. Within this temporary container, based on these rules, the information in the processing request is calculated and matched to determine the current business rules that meet the corresponding conditions, along with their corresponding action information or decision results. The determined current business rules and their corresponding action information or decision results are then fed back. This ensures that the Drools rule engine can still be relied upon to execute rules, maintaining rule flexibility and effectively improving the immediacy of rule execution and the convenience of rule management. Attached Figure Description

[0067] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0068] Figure 1 A flowchart illustrating a rule data processing method provided in an embodiment of this application;

[0069] Figure 2 A flowchart illustrating a method for configuring business rules as provided in an embodiment of this application;

[0070] Figure 3 A flowchart illustrating a method for deploying and publishing business rules as provided in an embodiment of this application;

[0071] Figure 4 This application provides an embodiment of a rule-based data processing system architecture diagram.

[0072] Figure 5 This is a schematic diagram of the architecture of an electronic device provided in an embodiment of this application. Detailed Implementation

[0073] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0074] In this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0075] This application provides a rule-based data processing method, such as... Figure 1 As shown, it includes the following steps:

[0076] S101. Whenever the preset interval or business rules change, reload the latest deployed and published business rules of the Drools rule engine into the cache.

[0077] After the business rules are configured and stored in the rule base, they are deployed in the Drools rule engine and published. Optionally, the rule base can use a relational database, such as MySQL or PostgreSQL, as the underlying storage.

[0078] It should be noted that, because rule configuration and storage are done via files, quickly locating and accurately modifying specific rules becomes particularly challenging when the rule set is large and has complex dependencies. This not only prolongs problem-solving time but may also lead to system instability or logical errors due to misoperation, making it very inconvenient to manage. Therefore, in this embodiment, the configured rules are directly embedded in the database, that is, the rules are directly stored as data in the database instead of being stored via files, thus making rule management and updates much easier.

[0079] To fundamentally address the performance bottleneck caused by frequent rule file reads and improve rule execution efficiency, this application innovatively introduces a caching mechanism. By pre-loading rules into memory, the read time required for each system run is significantly reduced, thereby ensuring the immediacy and smoothness of system response.

[0080] Therefore, after the configured business rules are deployed to the Drools rule engine and published, the published business rules will be loaded into the cache.

[0081] Furthermore, to ensure timely updates to business rules and the prompt implementation of new rules, this embodiment reloads the latest deployed and published business rules of the Drools rule engine into the cache whenever a preset time interval or a change in business rules occurs. In other words, every preset time interval or when the Drools rule engine publishes a new business rule, an update mechanism is triggered to load the currently published business rules from the Drools rule engine into the cache.

[0082] Optionally, in another embodiment of this application, a method for configuring business rules is provided, such as... Figure 2 As shown, it includes:

[0083] S201. Respond to the user's rule configuration operation on the tool interface, and configure various business rules that conform to the specified target syntax supported by the Drools rule engine through the rule configuration center.

[0084] Specifically, users can configure business rules using a tool interface on a dedicated workbench page. The configuration center will then respond to the user's configuration, ensuring that each business rule conforms to the specified target syntax supported by the Drools rule engine. This facilitates the subsequent execution of the business rule through the Drools rule engine. Optionally, the specified target syntax can be DRL syntax.

[0085] S202. Convert each business rule into a table structure in the rule base and store it in the rule base.

[0086] Since the rules need to be stored in the rule base, each business rule needs to be converted into a table structure in the rule base and then stored in the rule base.

[0087] Optionally, in another embodiment of this application, a trajectory recording mechanism is also established to facilitate the management of business rules. Therefore, after executing step S202, the following is further executed:

[0088] The rule configuration center records the current status and modification information of the rules.

[0089] Therefore, by recording the currently configured rules, the status of previous rules, and the current modification information of the rules, the rule trajectory is recorded. This not only provides strong support for rule backtracking and change history tracking, but also greatly improves the flexibility and security of rule management.

[0090] S203. Deploy each business rule in the rule base to the Drools rule engine, and publish each deployed business rule through the Drools rule engine.

[0091] In order for the Drools rule engine to accurately execute the currently configured business rules, it is also necessary to deploy each of the currently configured business rules in the rule base to the Drools rule engine and publish them through the Drools rule engine.

[0092] Optionally, in another embodiment of this application, one specific implementation of step S203 is as follows: Figure 3 As shown, it includes the following steps:

[0093] S301. Package each business rule in the rule base into a format recognizable by the Drools rule engine.

[0094] Specifically, it packages each currently configured business rule in the rule base into a format recognizable by the Drools rule engine. This can be done by pre-specifying a format recognizable by the Drools rule engine and packaging the rules according to that format.

[0095] S302. By calling the Drools rule engine or executing a specific deployment command, deploy each packaged business rule to the Drools rule engine.

[0096] Specifically, by using the Drools rule engine's API or executing pre-defined deployment commands, the packaged business rules can be deployed to the Drools rule engine.

[0097] S303. Publish each deployed business rule using the Drools rule engine.

[0098] S102. Whenever a business request is received, a processing request is sent to the Drools rule engine according to the current business request.

[0099] It should be noted that the Drools rule engine can be integrated into the return and repair system by introducing the Drools rule engine dependency library, so that the Drools rule engine API can be called in real time to execute rules during the return and repair modification.

[0100] Therefore, whenever a repair request is received from a user, it will send a processing request to the Drools rule engine based on the information in the request, thereby invoking the Drools rule engine to execute the rules.

[0101] Optionally, in another embodiment of this application, one specific implementation of step S102 includes:

[0102] Based on the rule information and context information in the current business request, a processing request is sent to the Drools rule engine.

[0103] In other words, in this embodiment, the business request mainly includes rule information and context information. The rule information indicates which business rules need to be executed. This means that different business rules may need to be executed depending on the current business requirements. To enable the Drools rule engine to execute rules on demand and improve rule processing efficiency, rule information is added to the request. The context information refers to the current business information that is required when executing rules, thereby determining which business rules match the current business needs.

[0104] S103. The information in the request is parsed and processed through the Drools rule engine, and a temporary container is built.

[0105] It should be noted that because the Drools rule engine relies on information from the current processing request when executing rules, it needs to parse that information. Furthermore, a temporary container needs to be built to store and execute the rules.

[0106] Optionally, in another embodiment of this application, when the processing request includes rule information and context information, a specific implementation of step S103 includes:

[0107] The Drools rule engine parses and processes the rule and context information in the request, and builds a temporary container.

[0108] S104. Based on the information in the processing request, load multiple current business rules from the cached business rules.

[0109] Here, "current business rules" refers to the various business rules that need to be executed at present. That is, in this embodiment of the application, the various business rules that need to be executed at present are determined based on the information in the processing request, i.e., the various current business rules are determined and loaded from the cache for processing.

[0110] Therefore, in this embodiment of the application, in order to address the inefficient method of loading all rule files step by step in the past, relevant information is added to the request, so that the rule data that meets the conditions can be intelligently filtered and loaded based on the relevant information in the request, thereby effectively avoiding unnecessary loading and calculation and significantly improving the utilization efficiency of system resources.

[0111] Optionally, in another embodiment of this application, the processing request includes rule information, so one specific implementation of step S104 includes:

[0112] Based on the rule information in the processing request, the corresponding business rules are loaded from the cached business rules and used as the current business rules.

[0113] S105. Convert each loaded current business rule into a file format recognizable by the Drools rule engine.

[0114] It should be noted that since the Drools rule engine needs to execute rule files when executing rules, it is necessary to convert each current business rule to a file format that the Drools rule engine can recognize. Optionally, it can be converted to a DRL file format that the Drools engine can recognize.

[0115] S106. Store each current business rule converted to file format in a temporary container, and perform calculations and matching on the information in the processing request based on each current business rule in the temporary container to determine each current business rule that meets the corresponding conditions and its corresponding action information or decision result.

[0116] It should be noted that different actions or decisions are pre-set for different business rules and different requests. For example, if the "no repair" rule is triggered, a "no repair" flag will be returned. If the "vehicle model recommendation" rule is triggered first, multiple repair shops in the corresponding solution will be calculated according to the recommendation strategy in the solution, and the optimal repair shop will be returned as the second recommendation. If the "model-specific recommendation" rule is triggered, all repair shops will be returned after being sorted according to the recommendation strategy.

[0117] Therefore, in the temporary container, the rule engine performs calculations and matching on the data in the request based on the loaded and transformed DRL file, obtains the current business rules that meet the conditions, and then determines the actions or decision results corresponding to these current business rules and feeds them back.

[0118] Optionally, in another embodiment of this application, when the request includes context information, a specific matching method for the current business rule includes:

[0119] Within the temporary container, the context information is processed based on each current business rule to determine the current business rules that meet the conditions, and the action information or decision results corresponding to each current business rule that meets the conditions are obtained.

[0120] S107. Feedback the identified current business rules and their corresponding action information or decision results.

[0121] This application provides a rule data processing method that directly stores configured business rules in a rule base, eliminating the need for file storage and thus facilitating rule management. After the business rules are configured and stored in the rule base, they are deployed and published to the Drools rule engine, enabling the Drools rule engine to execute the configured business rules. Then, whenever a preset interval is reached or a business rule changes, the latest deployed and published business rules from the Drools rule engine are reloaded into the cache. This allows for timely updates to business rules, eliminating the need for initialization and effectively reducing rule read time, thus improving the timeliness and smoothness of rule execution. When a business request is received, a processing request is sent to the Drools rule engine based on the current business request. The Drools rule engine parses the information in the processing request and constructs a temporary container. Based on the information in the processing request, multiple current business rules are loaded from the cached business rules. Here, "current business rules" refers to the business rules that need to be executed at the moment. By adding relevant information to the processing request, on-demand loading is achieved, eliminating the need to load all rules and further improving the efficiency of rule execution. Then, each loaded current business rule is converted into a file format recognizable by the Drools rule engine, ensuring it can still be executed by the Drools rule engine. The converted current business rules are then stored in a temporary container. Within this temporary container, based on these rules, the information in the processing request is calculated and matched to determine the current business rules that meet the corresponding conditions, along with their corresponding action information or decision results. The determined current business rules and their corresponding action information or decision results are then fed back. This ensures that the Drools rule engine can still be relied upon to execute rules, maintaining rule flexibility and effectively improving the immediacy of rule execution and the convenience of rule management.

[0122] Another embodiment of this application provides a rule-based data processing system, such as... Figure 4 As shown, it includes:

[0123] Cache unit 401 is used to reload the latest deployed and published business rules of the Drools rule engine into the cache whenever there is a preset interval or when the business rules change. Specifically, after the business rules are configured and stored in the rule base, they are deployed and published in the Drools rule engine.

[0124] Request unit 402 is used to send a processing request to the Drools rule engine whenever a business request is received, based on the current business request.

[0125] Parsing unit 403 is used to parse and process information in the request and build a temporary container through the Drools rule engine.

[0126] Loading unit 404 is used to load multiple current business rules from the cached business rules based on the information in the processing request. Here, "current business rules" refers to the business rules that need to be executed currently.

[0127] The first conversion unit 405 is used to convert each loaded current business rule into a file format that the Drools rule engine can recognize.

[0128] The execution unit 406 is used to store each current business rule converted into a file format into a temporary container, and to perform calculations and matching on the information in the processing request based on each current business rule in the temporary container, and to determine each current business rule that meets the corresponding conditions and its corresponding action information or decision result.

[0129] Feedback unit 407 is used to provide feedback on each determined current business rule and its corresponding action information or decision result.

[0130] Optionally, in another embodiment of the rule data processing system provided in this application, the system further includes:

[0131] The configuration unit is used to respond to the user's rule configuration operations on the tool interface, and to configure various business rules that conform to the specified target syntax supported by the Drools rule engine through the rule configuration center.

[0132] The storage unit is used to convert each business rule into a table structure in the rule base for storage.

[0133] The deployment unit is used to deploy each business rule in the rule base to the Drools rule engine, and publish each deployed business rule through the Drools rule engine.

[0134] Optionally, in another embodiment of the rule data processing system provided in this application, the system further includes:

[0135] The recording unit is used to record the current status and modification information of rules through the rule configuration center.

[0136] Optionally, in another embodiment of the rule data processing system provided in this application, the deployment unit includes:

[0137] The packaging unit is used to package the various business rules in the rule base into a format that the Drools rule engine can recognize.

[0138] The deployment subunit is used to deploy the packaged business rules to the Drools rule engine by calling the Drools rule engine or executing specific deployment commands.

[0139] The publishing unit is used to publish the deployed business rules through the Drools rule engine.

[0140] Optionally, in a rule data processing system provided in another embodiment of this application, the requesting unit includes:

[0141] The request subunit is used to send a processing request to the Drools rule engine based on the rule information and context information in the current business request.

[0142] The parsing unit in this embodiment includes:

[0143] The parsing subunit is used to parse and process rule information and context information in the request through the Drools rule engine, as well as to build a temporary container.

[0144] Optionally, in another embodiment of the rule data processing system provided in this application, the loading unit includes:

[0145] The rule loading unit is used to load the corresponding business rules from the cached business rules based on the rule information in the processing request, and use them as the current business rules.

[0146] Optionally, in another embodiment of the rule data processing system provided in this application, the execution unit includes:

[0147] The determination unit is used to perform calculations on context information based on each current business rule within a temporary container, and to determine each current business rule that meets its conditions.

[0148] The acquisition unit is used to acquire action information or decision results corresponding to each current business rule that meets its conditions.

[0149] It should be noted that the specific working process of each unit provided in the above embodiments of this application can be referred to the specific implementation process of the corresponding steps in the above method embodiments, and will not be repeated here.

[0150] Another embodiment of this application provides an electronic device, such as... Figure 5 As shown, it includes:

[0151] Memory 501 and processor 502.

[0152] The memory 501 is used to store the program.

[0153] The processor 502 is used to execute the program stored in the memory 501. When the program is executed, it is specifically used to implement the rule data processing method provided in any of the above embodiments.

[0154] Another embodiment of this application provides a computer storage medium for storing a computer program, which, when executed by a processor, implements the rule data processing method provided in any of the above embodiments.

[0155] Computer storage media, including both permanent and non-permanent, removable and non-removable media, can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0156] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0157] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing rule-based data, characterized in that, include: Whenever a preset time interval or a business rule changes, the latest deployed and published business rules of the Drools rule engine are reloaded into the cache; wherein, after the business rules are configured and stored in the rule base, they are deployed in the Drools rule engine and published. Whenever a business request is received, a processing request is sent to the Drools rule engine according to the current business request; The Drools rule engine parses the information in the processing request and constructs a temporary container. Based on the information in the processing request, multiple current business rules are loaded from the business rules in the cache; wherein, the current business rules refer to the business rules that need to be executed at present. Convert each of the currently loaded business rules into a file format recognizable by the Drools rule engine; Each of the current business rules converted into a file format is stored in the temporary container. Based on each of the current business rules in the temporary container, the information in the processing request is calculated and matched to determine each of the current business rules that meet the corresponding conditions and its corresponding action information or decision result. The identified current business rules and their corresponding action information or decision results will be fed back.

2. The method according to claim 1, characterized in that, Also includes: In response to the user's rule configuration operation on the tool interface, each of the business rules configured through the rule configuration center that conforms to the specified target syntax supported by the Drools rule engine is executed. Each of the aforementioned business rules is converted into a table structure in the rule base and stored in the rule base; Each of the business rules in the rule base is deployed to the Drools rule engine, and the deployed business rules are published through the Drools rule engine.

3. The method according to claim 2, characterized in that, After converting each of the aforementioned business rules into a table structure in the rule base for storage, the method further includes: The rule configuration center records the current status and modification information of the rules.

4. The method according to claim 2, characterized in that, The step of deploying each of the business rules in the rule base to the Drools rule engine, and then publishing the deployed business rules through the Drools rule engine, includes: Package each of the business rules in the rule base into a format recognizable by the Drools rule engine; By invoking the Drools rule engine or executing a specific deployment command, each packaged business rule is deployed to the Drools rule engine; The Drools rule engine is used to publish each of the deployed business rules.

5. The method according to claim 1, characterized in that, Sending a processing request to the Drools rules engine based on the current business request includes: Based on the rule information and context information in the current business request, a processing request is sent to the Drools rule engine. The step of parsing the information in the processing request and constructing a temporary container through the Drools rule engine includes: The Drools rule engine parses the rule information and context information in the processing request and constructs a temporary container.

6. The method according to claim 5, characterized in that, The process of loading multiple current business rules from the cache based on the information in the processing request includes: Based on the rule information in the processing request, each business rule corresponding to the rule information is loaded from each business rule in the cache and used as the current business rule.

7. The method according to claim 5, characterized in that, The process involves calculating and matching information in the processing request based on each of the current business rules within the temporary container to determine each current business rule that satisfies the corresponding conditions, along with its corresponding action information or decision result. Within the temporary container, the context information is calculated based on each of the current business rules to determine the current business rules that satisfy its conditions. Obtain the action information or decision results corresponding to each of the current business rules that meet the conditions.

8. A rule-based data processing system, characterized in that, include: The caching unit is used to reload the latest deployed and published business rules of the Drools rule engine into the cache whenever there is a preset interval or when the business rules change; wherein, after the business rules are configured and stored in the rule base, they are deployed and published in the Drools rule engine. The request unit is used to send a processing request to the Drools rule engine whenever a business request is received, based on the current business request. The parsing unit is used to parse the information in the processing request and construct a temporary container through the Drools rule engine. The loading unit is used to load multiple current business rules from the business rules in the cache based on the information in the processing request; wherein, the current business rules refer to the business rules that need to be executed at present; The first conversion unit is used to convert each of the loaded current business rules into a file format that the Drools rule engine can recognize; An execution unit is used to store each of the current business rules converted into a file format into the temporary container, and to perform calculations and matching on the information in the processing request based on each of the current business rules in the temporary container, to determine each of the current business rules that meet the corresponding conditions and their corresponding action information or decision results; The feedback unit is used to provide feedback on each of the determined current business rules and their corresponding action information or decision results.

9. An electronic device, characterized in that, include: Memory and processor; The memory is used to store programs; The processor is used to execute the program, which, when executed, is specifically used to implement the rule data processing method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, is used to implement the rule data processing method as described in any one of claims 1 to 7.