CN114841797A - Method and device for determining business processing rule based on Drools rule engine - Google Patents

Method and device for determining business processing rule based on Drools rule engine Download PDF

Info

Publication number
CN114841797A
CN114841797A CN202210530922.8A CN202210530922A CN114841797A CN 114841797 A CN114841797 A CN 114841797A CN 202210530922 A CN202210530922 A CN 202210530922A CN 114841797 A CN114841797 A CN 114841797A
Authority
CN
China
Prior art keywords
service
rule
business
parameter
parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210530922.8A
Other languages
Chinese (zh)
Inventor
陈晖萌
段永政
潘海涛
翟昶亮
刘慧敏
黄福成
李晓波
闫晓婧
何红高
孙艳丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Postal Savings Bank of China Ltd
Original Assignee
Postal Savings Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Postal Savings Bank of China Ltd filed Critical Postal Savings Bank of China Ltd
Priority to CN202210530922.8A priority Critical patent/CN114841797A/en
Publication of CN114841797A publication Critical patent/CN114841797A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Technology Law (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for determining a business processing rule based on a Drools rule engine. The invention comprises the following steps: receiving a service application sent by a client, and determining service parameters corresponding to the service application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters. The invention solves the problems of incomplete business control rules, inflexible business control rules and great difficulty in rule change in the traditional bank business control method in the related technology.

Description

Method and device for determining business processing rule based on Drools rule engine
Technical Field
The present application relates to the field of business processing, and in particular, to a method and an apparatus for determining a business processing rule based on a Drools rule engine.
Background
In the related art, in banking business management, the traditional limit management and control method has the following problems:
(1) the limit control rule is not comprehensive: traditional credit line control does not cover all-line products, all-line customers and all-line mechanisms (such as a company and a subsidiary company and an overseas branch mechanism), and further does not realize the management and control of the whole life cycle of the line. The conditions that the control coverage of credit authorization is incomplete, the real-time control strength is insufficient, and even multi-head credit authorization can occur easily.
(2) The rules of credit control are inflexible: the traditional credit line control is simple in classification and few in elements, only a small number of control parameters including a single client credit scheme configuration rule, a group client credit scheme configuration rule and an amount use control rule are included, and only the requirements of a bank system on credit risk control elements such as organization levels, authorities and the like cannot be met.
(3) The difficulty of rule change is large: most of traditional credit line control is realized in a hard coding mode, the realization of a common credit line control rule needs to go through five stages of requirement analysis, design, development, internal test and service test, and more than one month is needed from requirement proposing to online.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The application provides a method and a device for determining a business processing rule based on a Drools rule engine, which solve the problems of incomplete business control rule, inflexible business control rule and high rule change difficulty in the traditional bank business control method in the related art.
According to one aspect of the present application, a method of determining business process rules based on a Drools rules engine is provided. The method comprises the following steps: receiving a service application sent by a client, and determining service parameters corresponding to the service application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters.
Further, before inputting the business parameters into the Drools rule engine and matching the business parameters with the plurality of business rule files in the Drools rule engine, the method includes: determining a plurality of services; respectively extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in the system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter; determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter; and storing the business rule file in Redis corresponding to the Drools rule engine.
Further, determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter includes: acquiring a service rule template corresponding to a service; determining a service requirement corresponding to a service, and sequencing a first parameter, a second parameter and a third parameter according to the service requirement to obtain sequenced parameters; and generating a service rule file corresponding to the service according to the service rule template and the sequenced template.
Further, inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine, including: reflecting a plurality of business rule files stored in Redis into a plurality of JAVA objects; determining a parameter attribute and a rule attribute corresponding to the service parameter; and matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
Further, after the business rule file is saved in Redis corresponding to the Drools rule engine, the method further includes: and issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
Further, under the condition that the service parameter matching is successful, after determining the processing rule and the processing flow corresponding to the service application according to the target service rule file, the method comprises the following steps: and sending the file number corresponding to the target service rule file and the approval level information corresponding to the service application to the client.
Further, in case of failure of service parameter matching, the method further comprises: and generating a preset signal and sending the preset signal to the client, wherein the preset signal is a signal indicating that the service parameter matching fails.
According to another aspect of the present application, there is provided an apparatus for determining business process rules based on a Drools rules engine. The device includes: the first determining unit is used for receiving the service application sent by the client and determining the service parameters corresponding to the service application; the matching unit is used for inputting the business parameters into the Drools rule engine and matching the business parameters with a plurality of business rule files in the Drools rule engine; and the second determining unit is used for determining a processing rule and a processing flow corresponding to the service application according to the target service rule file under the condition that the service parameter is successfully matched, wherein the target service rule file is the service rule file successfully matched with the service parameter.
To achieve the above object, according to another aspect of the present application, there is provided a computer-readable storage medium including a stored program, wherein the program performs a method of determining a business process rule based on a Drools rule engine of any one of the above.
To achieve the above object, according to another aspect of the present application, there is provided a processor for executing a program, wherein the program performs any one of the above methods for determining business process rules based on a Drools rules engine.
Through the application, the following steps are adopted: receiving a service application sent by a client, and determining service parameters corresponding to the service application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters. The method solves the problems of incomplete business control rules, inflexible business control rules and high rule change difficulty in the traditional banking business control method in the related technology, and further achieves the effects of improving the intelligent degree of parameter management and improving the business handling efficiency.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for determining business process rules based on a Drools rules engine according to an embodiment of the present application;
fig. 2 is a schematic diagram of a rule warehousing and publishing process based on a Drool rule engine according to an embodiment of the present application;
fig. 3 is a schematic diagram of an apparatus for determining a business process rule based on a Drools rule engine according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, some terms or expressions referring to the embodiments of the present invention are explained below:
drools: the open source business rule engine is based on the RETE algorithm, easy to access enterprise strategies, easy to adjust and easy to manage, realizes separation of business decisions from application programs, meets the standards in the industry, and is high in speed and efficiency. The business analyst or auditor can use it to easily view the business rules to verify whether the encoded rules implement the desired business rules. Drools is divided into two main parts: compiled and run-time. The compilation is to parse the rule description file according to ANTLR 3 syntax, check the syntax for correctness, and then generate an intermediate structure "descr" which describes the rule with AST. At present, Drools supports four rule description files, respectively: drl files, xls files, brl files and dsl files, wherein the commonly used description files are drl files and xls files, and the xls files are easier to maintain, more intuitive and more understandable by business personnel. The runtime passes the AST to the packagBuilder, which generates RuleBase, which contains one or more Package objects.
Managing and controlling the limit: according to the new Basel agreement requirements, the capital conditions and system requirements of the bank are combined, the risk limit accounting, the credit issuing control, the credit business state monitoring and the like of the bank client are managed, the credit risk monitoring and management of the bank are realized, the credit asset quality is improved, and the competitiveness of the bank in the industry is improved.
According to an embodiment of the present application, a method for determining business process rules based on a Drools rules engine is provided.
Fig. 1 is a flowchart of a method for determining a business process rule based on a Drools rule engine according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, receiving a service application sent by a client, and determining service parameters corresponding to the service application;
step S102, inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine;
and step S103, under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters.
In the method, the parameters corresponding to the service application are summarized into three major types and thirty-three minor types of parameters, and the quota control rule is innovatively designed into two types of rigid control and flexible control, so that the flexibility of quota control is greatly increased, and the application range of the parameters is widened. And determining a processing flow and a rule corresponding to the service through the matched service parameters.
The method and the system have the advantages that the service is parameterized and configured through the rule engine, and the whole configuration only undergoes three stages of requirement analysis, parameter configuration and service test. The time required from the requirement proposal to the function realization is within one week, and the function realization can be configured through a front-end page, without on-line upgrading, with low risk and high efficiency.
The method for determining the business processing rule based on the Drools rule engine provided by the embodiment of the application comprises the steps of receiving a business application sent by a client and determining a business parameter corresponding to the business application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters. The method solves the problems of incomplete business control rules, inflexible business control rules and high rule change difficulty in the traditional banking business control method in the related technology, and further achieves the effects of improving the intelligent degree of parameter management and improving the business handling efficiency.
In an alternative embodiment, before inputting the business parameters into the Drools rule engine and matching the business parameters with the plurality of business rule files in the Drools rule engine, the method includes: determining a plurality of services; respectively extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in the system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter; determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter; and storing the business rule file in Redis corresponding to the Drools rule engine.
In the method, the business is subjected to regularized parameter configuration, and the business used in the management of the quota full life cycle is analyzed and classified through rules to form parameters of three major classes and thirty-three minor classes. The three major parameters include basic parameters, control parameters and other parameters.
The basic parameters are basic data necessary for system operation, and include: setting parameters of rating level, configuration parameters of rating control rules, maintenance parameters of business varieties, mapping of business systems and business varieties of the system, credit line trees, corresponding parameters of business varieties and lines, parameters of occupied objects and the like.
The control class parameters include: the system comprises a single customer credit scheme configuration rule, a group customer credit scheme configuration rule, an amount use control rule, a temporary unlocking control parameter and the like, wherein the parameters comprise a configuration object, a specific configuration rule, a rule applicable configuration element and control intensity; the configuration object and the specific configuration rule have different configuration contents due to different parameters; the rule applicable configuration elements comprise applicable client classification, service properties, mechanisms, service varieties and process links; the management and control strength comprises rigid management and control and flexible management and control, when the rigid management and control is met, the rule is not verified and the service cannot be continued, when the flexible management and control is met, the rule is not verified and the service cannot be continued without forcibly interrupting the service, and whether the service is continued or not is judged by a service worker; the configuration mode not only meets the requirements of different control strengths of the same rule under the condition that the rule is applicable to different configuration elements, but also meets the requirements of different control strengths of different configuration rules under the condition that the rule is applicable to the same configuration elements.
In a specific embodiment, by implementing rule parameterization, parameterization configuration is adopted for the credit granting scheme control rule, the limit use control rule, the limit occupation opportunity and the limit occupation calculation rule, and the unified calling rule of the service system is supported, so that the unified credit granting rule is unified.
In the above-mentioned specific embodiment corresponding to the credit granting scheme, the third parameter is another parameter, which includes parameters such as credit granting policy maintenance, product basic information identifier, industry basic information identifier, area basic information identifier, customer basic information identifier, and local financing platform directory.
In an optional embodiment, determining, according to the first parameter, the second parameter, and the third parameter, a service rule file corresponding to each service includes: acquiring a service rule template corresponding to a service; determining a service requirement corresponding to a service, and sequencing a first parameter, a second parameter and a third parameter according to the service requirement to obtain sequenced parameters; and generating a service rule file corresponding to the service according to the service rule template and the sequenced template.
In an alternative embodiment, inputting the business parameters into the Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine includes: reflecting a plurality of business rule files stored in Redis into a plurality of JAVA objects; determining a parameter attribute and a rule attribute corresponding to the service parameter; and matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
In an optional embodiment, after the business rule file is stored in Redis corresponding to the Drools rule engine, the method further includes: and issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
In an optional embodiment, in the case that the service parameter matching is successful, after determining the processing rule and the processing flow corresponding to the service application according to the target service rule file, the method includes: and sending the file number corresponding to the target service rule file and the approval level information corresponding to the service application to the client.
Specifically, differential rule configuration of different mechanisms, different client types and different services is supported simultaneously, and flexible rule configuration is achieved. Specifically, rule parameterization analyzes and classifies rules used in the management of the quota full life cycle into basic parameters, control class parameters and other parameters.
Specifically, as shown in fig. 2, fig. 2 is a rule warehousing process based on a Drool rule engine, which specifically includes the following processes:
s201: configuring and storing the extracted service rule types in a warehouse;
s202: acquiring the information of the rule template from the static table;
20S 3: sorting the rule types according to the service requirements, wherein the rating rule is arranged according to a descending order, and the rest are arranged according to an ascending order;
s204: the Drools rule engine generates a rule package;
s205: storing the generated rule packet into Redis;
s206: after the Redis storage rule package is successful, an update notification is issued to the rule execution application service;
s207: and after receiving the rule parameters of the client, the rule execution service reflects the rule file in the memory into a JAVA object, and performs matching according to the attributes of the parameters and the rule attributes, wherein the matching is successful if all the attributes are hit, and the matching is unsuccessful if not.
S208: and returning the hit rule number and the approval authority level, and returning a 'miss rule' if the rule in the mismatch is not matched.
Specifically, the parameter manager can modify the parameters by logging in a system parameter management page, pulling down an option box or an input box, and then publish the parameters by one key to take effect in real time.
In an optional embodiment, in case of a failure of service parameter matching, the method further comprises: and generating a preset signal, and sending the preset signal to the client, wherein the preset signal is a signal indicating that the service parameter matching fails.
In the above, when the service matching rule fails, a signal indicating that the matching fails is generated and sent to the client to remind the client that the service matching fails.
The embodiment of the present application further provides a device for determining a business processing rule based on a Drools rule engine, and it should be noted that the device for determining a business processing rule based on a Drools rule engine according to the embodiment of the present application may be used to execute the method for determining a business processing rule based on a Drools rule engine provided in the embodiment of the present application. The following describes an apparatus for determining a business processing rule based on a Drools rule engine according to an embodiment of the present application.
Fig. 3 is a schematic diagram of an apparatus for determining a business process rule based on a Drools rule engine according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: a first determining unit 301, configured to receive a service application sent by a client, and determine a service parameter corresponding to the service application; a matching unit 302, configured to input the business parameters into a Drools rule engine, and match the business parameters with multiple business rule files in the Drools rule engine; the second determining unit 303 is configured to determine, according to a target service rule file, a processing rule and a processing flow corresponding to the service application under the condition that the service parameter matching is successful, where the target service rule file is a service rule file successfully matched with the service parameter.
In an optional embodiment, the third determining unit is configured to determine multiple businesses before inputting the business parameters into the Drools rule engine and matching the business parameters with multiple business rule files in the Drools rule engine; the extraction unit is used for extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in the system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter; the fourth determining unit is used for determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter; and the storage unit is used for storing the business rule file in Redis corresponding to the Drools rule engine.
In an alternative embodiment, the fourth determining unit includes: the acquiring subunit is used for acquiring a service rule template corresponding to the service; the first determining subunit is configured to determine a service requirement corresponding to the service, and sort the first parameter, the second parameter, and the third parameter according to the service requirement to obtain sorted parameters; and the generating subunit is used for generating a service rule file corresponding to the service according to the service rule template and the sequenced template.
In an alternative embodiment, the third determining unit includes: a reflection subunit, configured to reflect the plurality of business rule files stored in the Redis into a plurality of JAVA objects; the second determining subunit is used for determining the parameter attribute and the rule attribute corresponding to the service parameter; and the matching subunit is used for matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
In an alternative embodiment, the holding unit comprises: and the issuing subunit is used for issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
In an alternative embodiment, the apparatus further comprises: a fifth determining unit, configured to determine, according to the target service rule file, a processing rule and a processing flow corresponding to the service application under the condition that the service parameter matching is successful; and the sending subunit is used for sending the file number corresponding to the target service rule file and the approval level information corresponding to the service application to the client.
In an alternative embodiment, the apparatus further comprises: and the generating unit is used for generating a preset signal under the condition that the service parameter matching fails and sending the preset signal to the client, wherein the preset signal is a signal indicating the service parameter matching failure.
The device for determining the service processing rule based on the Drools rule engine provided by the embodiment of the application is used for receiving a service application sent by a client and determining a service parameter corresponding to the service application through a first determining unit 401; a matching unit 402, configured to input the business parameters into the Drools rule engine, and match the business parameters with multiple business rule files in the Drools rule engine; a second determining unit 403, configured to determine, according to a target business rule file, a processing rule and a processing flow corresponding to the business application under the condition that the matching of the business parameters is successful, where the target business rule file is a business rule file successfully matched with the business parameters. The method solves the problems of incomplete business control rules, inflexible business control rules and high rule change difficulty in the traditional banking business control method in the related technology, and further achieves the effects of improving the intelligent degree of parameter management and improving the business handling efficiency.
The device for determining the business processing rule based on the Drools rule engine comprises a processor and a memory, wherein the first determining unit 401 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, and the problems of incomplete business control rules, inflexible business control rules and high rule change difficulty in the traditional banking business control method in the related art are solved by adjusting kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium, on which a program is stored, which, when executed by a processor, implements a method for determining business process rules based on a Drools rules engine.
The embodiment of the invention provides a processor, which is used for running a program, wherein the method for determining a business processing rule based on a Drools rule engine is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: receiving a service application sent by a client, and determining service parameters corresponding to the service application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters.
Optionally, before inputting the business parameters into the Drools rule engine and matching the business parameters with the plurality of business rule files in the Drools rule engine, the method includes: determining a plurality of services; respectively extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in the system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter; determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter; and storing the business rule file in Redis corresponding to the Drools rule engine.
Optionally, determining a service rule file corresponding to each service according to the first parameter, the second parameter, and the third parameter includes: acquiring a service rule template corresponding to a service; determining a service requirement corresponding to a service, and sequencing a first parameter, a second parameter and a third parameter according to the service requirement to obtain sequenced parameters; and generating a service rule file corresponding to the service according to the service rule template and the sequenced template.
Optionally, inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine, including: reflecting a plurality of business rule files stored in Redis into a plurality of JAVA objects; determining a parameter attribute and a rule attribute corresponding to the service parameter; and matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
Optionally, after saving the business rule file in Redis corresponding to the Drools rule engine, the method further includes: and issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
Optionally, in the case that the service parameter matching is successful, after determining the processing rule and the processing flow corresponding to the service application according to the target service rule file, the method includes: and sending the file number corresponding to the target service rule file and the approval level information corresponding to the service application to the client.
Optionally, in case of a failure of service parameter matching, the method further includes: and generating a preset signal and sending the preset signal to the client, wherein the preset signal is a signal indicating that the service parameter matching fails.
The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
The invention also provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: receiving a service application sent by a client, and determining service parameters corresponding to the service application; inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine; and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters.
Optionally, before inputting the business parameters into the Drools rule engine and matching the business parameters with the plurality of business rule files in the Drools rule engine, the method includes: determining a plurality of services; respectively extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in the system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter; determining a service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter; and storing the business rule file in Redis corresponding to the Drools rule engine.
Optionally, determining a service rule file corresponding to each service according to the first parameter, the second parameter, and the third parameter includes: acquiring a service rule template corresponding to a service; determining a service requirement corresponding to a service, and sequencing a first parameter, a second parameter and a third parameter according to the service requirement to obtain sequenced parameters; and generating a service rule file corresponding to the service according to the service rule template and the sequenced template.
Optionally, inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine, including: reflecting a plurality of business rule files stored in Redis into a plurality of JAVA objects; determining a parameter attribute and a rule attribute corresponding to the service parameter; and matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
Optionally, after saving the business rule file in Redis corresponding to the Drools rule engine, the method further includes: and issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
Optionally, in a case that the service parameter matching is successful, after determining a processing rule and a processing flow corresponding to the service application according to the target service rule file, the method includes: and sending the file number corresponding to the target service rule file and the approval level information corresponding to the service application to the client.
Optionally, in case of a failure of service parameter matching, the method further includes: and generating a preset signal and sending the preset signal to the client, wherein the preset signal is a signal indicating that the service parameter matching fails.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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 technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present invention, and are not intended to limit the present invention. Various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (10)

1. A method for determining a business process rule based on a Drools rule engine, comprising:
receiving a service application sent by a client, and determining service parameters corresponding to the service application;
inputting the business parameters into a Drools rule engine, and matching the business parameters with a plurality of business rule files in the Drools rule engine;
and under the condition that the service parameters are successfully matched, determining a processing rule and a processing flow corresponding to the service application according to a target service rule file, wherein the target service rule file is the service rule file successfully matched with the service parameters.
2. The method of claim 1, prior to inputting the business parameters to a Drools rules engine and matching the business parameters to a plurality of business rules files in the Drools rules engine, the method comprising:
determining a plurality of services;
respectively extracting a first parameter, a second parameter and a third parameter corresponding to each service according to each service, wherein the first parameter is a service rule control parameter corresponding to the service, the second parameter is a necessary parameter corresponding to the service running in a system, and the third parameter is a parameter corresponding to the service except the first parameter and the second parameter;
determining the service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter;
and storing the business rule file in Redis corresponding to the Drools rule engine.
3. The method of claim 2, wherein determining the service rule file corresponding to each service according to the first parameter, the second parameter and the third parameter comprises:
acquiring a service rule template corresponding to the service;
determining a service requirement corresponding to the service, and sequencing the first parameter, the second parameter and the third parameter according to the service requirement to obtain sequenced parameters;
and generating a business rule file corresponding to the business according to the business rule template and the sequenced template.
4. The method of claim 2, wherein inputting the business parameters to a Drools rules engine and matching the business parameters to a plurality of business rules files in the Drools rules engine comprises:
reflecting a plurality of business rule files stored in the Redis into a plurality of JAVA objects;
determining a parameter attribute and a rule attribute corresponding to the service parameter;
and matching the service parameters with the plurality of JAVA objects according to the parameter attributes and the rule attributes.
5. The method according to claim 1, wherein after saving the business rule file in Redis corresponding to the Drools rule engine, the method further comprises:
and issuing a service rule file updating notice to at least one rule execution application according to the stored service rule file.
6. The method according to claim 1, wherein after determining the processing rule and the processing flow corresponding to the service application according to a target service rule file if the service parameter matching is successful, the method comprises:
and sending the file number corresponding to the target business rule file and the approval level information corresponding to the business application to the client.
7. The method according to claim 1, wherein in case of failure of matching of the traffic parameters, the method further comprises:
and generating a preset signal and sending the preset signal to the client, wherein the preset signal is a signal indicating that the service parameter matching fails.
8. An apparatus for determining business process rules based on a Drools rules engine, comprising:
the first determining unit is used for receiving a service application sent by a client and determining a service parameter corresponding to the service application;
the matching unit is used for inputting the business parameters into a Drools rule engine and matching the business parameters with a plurality of business rule files in the Drools rule engine;
and a second determining unit, configured to determine, according to a target business rule file, a processing rule and a processing flow corresponding to the business application under the condition that the business parameter is successfully matched, where the target business rule file is the business rule file successfully matched with the business parameter.
9. A computer-readable storage medium, comprising a stored program, wherein the program, when executed, controls an apparatus on which the computer-readable storage medium resides to perform a method for determining business process rules based on a Drools rules engine as claimed in any one of claims 1 to 7.
10. A processor, wherein the processor is configured to run a program, wherein the program when running performs a method of determining a business process rule based on a Drools rules engine as claimed in any one of claims 1 to 7.
CN202210530922.8A 2022-05-16 2022-05-16 Method and device for determining business processing rule based on Drools rule engine Pending CN114841797A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210530922.8A CN114841797A (en) 2022-05-16 2022-05-16 Method and device for determining business processing rule based on Drools rule engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210530922.8A CN114841797A (en) 2022-05-16 2022-05-16 Method and device for determining business processing rule based on Drools rule engine

Publications (1)

Publication Number Publication Date
CN114841797A true CN114841797A (en) 2022-08-02

Family

ID=82570949

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210530922.8A Pending CN114841797A (en) 2022-05-16 2022-05-16 Method and device for determining business processing rule based on Drools rule engine

Country Status (1)

Country Link
CN (1) CN114841797A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115953146A (en) * 2022-12-07 2023-04-11 国家电网有限公司 Power distribution network fault processing aid decision system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115953146A (en) * 2022-12-07 2023-04-11 国家电网有限公司 Power distribution network fault processing aid decision system
CN115953146B (en) * 2022-12-07 2024-02-13 国家电网有限公司 Auxiliary decision-making system for fault treatment of power distribution network

Similar Documents

Publication Publication Date Title
CN108595157B (en) Block chain data processing method, device, equipment and storage medium
US7957994B2 (en) Defining service funding for a service oriented architecture
US20080208661A1 (en) Method and system of using anrtifacts to identify elements of a component business model
US20050246350A1 (en) System and method for classifying and normalizing structured data
US9589242B2 (en) Integrating custom policy rules with policy validation process
CN108491254A (en) A kind of dispatching method and device of data warehouse
US10009227B2 (en) Network service provisioning tool and method
CN105095970A (en) Execution method and system of third-party application
US20060184995A1 (en) Creating a privacy policy from a process model and verifying the compliance
CN108305012A (en) A kind of air control regulation obtaining method and device
CN114723543B (en) Financial archive big data management system and method for cross-border e-commerce
CN114841797A (en) Method and device for determining business processing rule based on Drools rule engine
CN108804685B (en) Asset hosting and monitoring task processing method and device
CN111161052B (en) Bank operation data processing method and device
CN115641166A (en) Virtual resource allocation strategy creation method and system
US10936958B2 (en) Sequencing of input prompts for data structure completion
CN115485662A (en) Quota request resolution on a computing platform
CN113849579A (en) Knowledge graph data processing method and system based on knowledge view
CN112085461A (en) Cross-sale-oriented commission settlement method, device and storage medium
CN111008078A (en) Batch processing method, device and equipment of data and computer storage medium
CN117236804B (en) Financial enterprise performance identification method, equipment and medium
CN116862408A (en) Scenic spot tourist year card verification method based on strategy mode
Tang Blockchain-Driven Supply Chain’s Financing and Coordination Strategy under Nash Bargaining Scheme
CN116362857A (en) Automatic account spending method and device for internal account
CN115293638A (en) Method and device for determining production process, storage medium and processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination