CN112148343A - Rule issuing method and device and terminal equipment - Google Patents

Rule issuing method and device and terminal equipment Download PDF

Info

Publication number
CN112148343A
CN112148343A CN202010913904.9A CN202010913904A CN112148343A CN 112148343 A CN112148343 A CN 112148343A CN 202010913904 A CN202010913904 A CN 202010913904A CN 112148343 A CN112148343 A CN 112148343A
Authority
CN
China
Prior art keywords
rule
component
data
business
data packet
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.)
Granted
Application number
CN202010913904.9A
Other languages
Chinese (zh)
Other versions
CN112148343B (en
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.)
Guangzhou Shuangzhao Electronic Technology Co ltd
Original Assignee
Guangzhou Shuangzhao Electronic Technology Co 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 Guangzhou Shuangzhao Electronic Technology Co ltd filed Critical Guangzhou Shuangzhao Electronic Technology Co ltd
Priority to CN202010913904.9A priority Critical patent/CN112148343B/en
Publication of CN112148343A publication Critical patent/CN112148343A/en
Application granted granted Critical
Publication of CN112148343B publication Critical patent/CN112148343B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a rule issuing method, a rule issuing device and terminal equipment, wherein the method comprises the following steps: acquiring a selection instruction of a target business rule, and selecting a corresponding business rule component in a business rule configuration area according to the selection instruction; acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction; responding to the editing ending instruction, generating a rule data packet according to each service rule component in the service rule configuration area and the data source of each service rule component, and issuing the rule data packet to a decision engine for the decision engine to analyze the rule data packet; the rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.

Description

Rule issuing method and device and terminal equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for rule issuing, and a terminal device.
Background
At present, in an IT business system, a large number of business rules are configured, and when a decision of a user changes, the business rules also change accordingly. To accommodate the changing needs of decision management, IT business systems need to be updated quickly and at low cost. Therefore, in the prior art, the configuration of the business rules is extracted independently, when the business rules need to be issued, the relevant codes of the business rules are compiled and then issued to the decision engine, and the decision engine executes decision judgment according to the corresponding business rules.
Because the existing business rules need to be described by directly writing corresponding codes, if a change request based on user decision is generated in the application process, the codes of the business rules need to be modified greatly to regenerate the rules, which brings a lot of labor cost and time cost and affects the publishing efficiency.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present application is to solve the technical problem of low business rule issuing efficiency in a business rule issuing process.
In order to solve the above problem, an embodiment of the present application provides a rule issuing method, which is suitable for being executed in a computing device, and includes at least the following steps:
acquiring a selection instruction of a target business rule, and selecting a corresponding business rule component in a business rule configuration area according to the selection instruction;
acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction;
responding to an editing ending instruction, generating a rule data packet according to each business rule component in the business rule configuration area and the data source of each business rule component, and issuing the rule data packet to a decision engine for the decision engine to analyze the rule data packet; the rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
Further, the generating a rule data packet according to each service rule component in the service rule configuration region and a data source of each service rule component includes:
and extracting each business rule component generation component set with different component types from the business rule configuration area, and generating rule data packets according to each business rule component in the component set and the data source of each business rule component.
Further, the business rule component has component labels, and the component labels of the business rule components of different component types are different;
the parsing, by the decision engine, the rule data packet includes:
and providing the rule data packet for the decision engine so that the decision engine calls a corresponding analysis method to analyze the rule data packet according to the component label of the business rule component corresponding to each rule data in the rule data packet.
Further, the method also comprises the following steps:
the method comprises the steps of obtaining analysis data of each rule data in the rule data packet by the decision engine, detecting whether stored data corresponding to the analysis data exist in a cache or not according to the identification of the rule data corresponding to the analysis data, and replacing the storage data with the analysis data when the stored data exist in the cache is detected.
Further, the component types include a rule set component, a decision table component, a score card component, and a decision flow component.
Further, the issuing the rule data packet to a decision engine includes:
obtaining each DSL template corresponding to each service rule component in the component set one to one, and generating a DSL fragment of each rule data according to each DSL template, so as to issue the rule data packet in which the DSL fragment of each rule data is packed to the decision engine; wherein the DSL templates corresponding to the business rule components of different component types are different.
Further, the issuing the rule data packet to a decision engine includes:
and sending the rule data packet to a user terminal, and issuing the rule data packet to a decision engine when a submission instruction returned by the user terminal according to the rule data packet is received.
Further, a rule issuing device is provided, which includes:
the component configuration module is used for acquiring a selection instruction of a target business rule and selecting a corresponding business rule component in a business rule configuration area according to the selection instruction;
the component editing module is used for acquiring an editing instruction of the business rule component and selecting a data source of the business rule component according to the editing instruction;
a rule issuing module, configured to respond to an edit ending instruction, generate a rule data packet according to each service rule component in the service rule configuration area and a data source of each service rule component, so as to issue the rule data packet to a decision engine, where the decision engine analyzes the rule data packet; the rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
Further, the rule issuing module is specifically configured to:
and extracting each business rule component generation component set with different component types from the business rule configuration area, and generating rule data packets according to each business rule component in the component set and the data source of each business rule component.
Further, a terminal device is provided, which includes a memory and a processor, the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the steps of the rule issuing method according to the embodiment.
Compared with the prior art, the embodiment has the advantages that the data source of the service rule component is set, the rule data corresponding to the data setting is directly pulled from the server when the rule data packet is formed, programming work in the rule issuing process can be reduced, dynamic updating of the service rule is realized under the condition that relevant codes of the service rule are not modified as far as possible, online service is not required to be interrupted, coding and modifying costs existing in the rule issuing process are reduced, and the service rule issuing efficiency is effectively improved.
Drawings
FIG. 1 is a schematic diagram of an exemplary system architecture for a rule issuing method provided by an embodiment;
FIG. 2 is a flowchart illustrating a method for rule issuance according to an embodiment;
FIG. 3 is a flowchart illustrating a rule issuing method according to another embodiment;
FIG. 4 is a schematic diagram of the tag content of the rule data;
FIG. 5 is a schematic diagram of the tag contents of a rule set;
FIG. 6 is a schematic view of the tag contents of a decision table;
FIG. 7 is a schematic view of the tag contents of a scorecard;
FIG. 8 is a label content diagram of a decision flow;
FIG. 9 is a flowchart illustrating a method for rule publication according to yet another embodiment;
FIG. 10 is a block diagram of a rule issuing device according to an embodiment;
fig. 11 is a schematic structural diagram of a terminal device according to an embodiment.
Detailed Description
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 a part of the embodiments of the present application, and not all of the 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.
In the conventional rule issuing mode, relevant codes of a service rule are written and then issued to a decision engine, and the decision engine executes decision judgment according to the corresponding service rule. However, in the existing business rules, the rules are described by directly writing corresponding codes, so that in the application process, if a change request based on a user decision is generated, the codes of the business rules are often required to be modified in a large amount to regenerate the rules, which brings a large amount of labor cost and time cost and affects the publishing efficiency, and the related codes of the business rules published to the decision engine are required to be modified, so that the online business needs to be interrupted, which results in low decision efficiency of the whole business system.
To solve the above problem, as shown in fig. 1, it is a schematic diagram of an exemplary system architecture of a rule issuing method provided by an embodiment. The system architecture 100 may include a terminal 110, a decision engine 120, and a server 130. The terminal 110 is communicatively coupled to the decision engine 120 and the server 130 such that the terminal 110 can send information to the decision engine 120 and the server 130 or receive information sent by the decision engine 120 and the server 130. The communication connections may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 130 may be a stand-alone server or a server cluster composed of a plurality of servers. The terminal 110 receives a selection instruction of a target business rule sent by a user, selects a business rule component according to the selection instruction, responds to an edit instruction of the business rule component sent by the user, selects a data source of the business rule component, pulls corresponding rule data according to the data source of each selected business rule component, pushes each rule data to the server 130 to form a rule data packet, sends the rule data packet to the decision engine 120 through the server 130, and analyzes the rule data packet in the decision engine 120 to generate a computer executable code.
By setting the data source of the service rule component, the rule data corresponding to the data setting is directly pulled from the server when the rule data packet is formed, programming work in the rule issuing process can be reduced, dynamic updating of the service rule is realized under the condition that relevant codes of the service rule are not modified as far as possible, online service is not required to be interrupted, coding and modifying cost existing in the rule issuing process is reduced, and service rule issuing efficiency is effectively improved.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
In one embodiment, as shown in FIG. 2, a rule issuing method is provided. The embodiment is mainly exemplified by applying the method to a computer device, where the computer device may specifically be the terminal 110 in fig. 1, and specifically includes the following steps:
step S11, obtaining a selection instruction of the target business rule, and selecting a corresponding business rule component in the business rule configuration area according to the selection instruction.
In one embodiment, the business rule component is developed by a developer through componentizing functions of products in a statistical group and is stored on a server for a user to call. The function of the business rule comprises defining the logic relation of rule conditions, relation operators, the parameters of the conditions, the output result after the conditions are matched and the like. Each business rule component is provided with a corresponding data source, the data source comprises a configured interface and a storage address of the rule data of the business rule component, such as the address of a conditional expression and an assignment expression of the business rule component, and the configured interface comprises an interface link and an interface parameter. In the rule data storage and server, the service rule component may be added in a manner of selecting the service rule component, not only by dragging the service rule component in the component editing area, but also by clicking, pressing a key, setting a coordinate, and the like, which is not limited herein.
And step S12, acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction.
In one embodiment, a property edit box may be presented in response to a property edit instruction, the property edit box including data source entry fields for adding, modifying, and deleting data sources. Wherein, the data sources can be exposed in the form of sliding, scrolling, paging, etc. within the business rule component, which is not limited herein.
The rule data of each service rule component is stored on the server, so that when the service data of the service rule component is read, the service rule data can be pulled from the server in real time according to the data source, when the instances of the service rule component need to be updated in large scale in batch, the terminal selecting the same service rule component can update the service rule data of the service rule component only by modifying the data source of the service rule component or modifying the service rule data corresponding to the data source without modifying codes, and the service rule data is pushed to the decision engine through the server, and the cached service rule data is analyzed and replaced in real time, so that the dynamic update of the service rule is realized, the update workload is greatly reduced, and the development efficiency is improved.
Step S13, responding to the edit end instruction, generating a rule data packet according to each service rule component in the service rule configuration area and the data source of each service rule component, so as to issue the rule data packet to a decision engine for the decision engine to analyze the rule data packet. The rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
In one embodiment, when the rule data packet needs to be generated, the business rule data is pulled from the server in real time according to the data source, so that each business rule component and the business rule data are packaged to form the rule data packet without writing, the workload of developers is greatly reduced, and the rule issuing efficiency is improved.
In an embodiment, before the rule data packet is issued to the decision engine, the rule data packet is sent to a user terminal with an audit authority for the user with the audit authority to audit, after the audit is completed, the user terminal returns a submission instruction, and when the submission instruction returned by the user terminal according to the rule data packet is received, the rule data packet is issued to the decision engine. And the decision engine analyzes the rule data in sequence according to the arrangement sequence of each rule data in the rule data packet.
Compared with the prior art, the embodiment has the advantages that the data source of the service rule component is set, the rule data corresponding to the data setting is directly pulled from the server when the rule data packet is formed, programming work in the rule issuing process can be reduced, dynamic updating of the service rule is realized under the condition that relevant codes of the service rule are not modified as far as possible, online service is not required to be interrupted, coding and modifying costs existing in the rule issuing process are reduced, and the service rule issuing efficiency is effectively improved.
Different use scenes may be faced in the IT service system, and a single service rule type cannot be well suitable for different use scenes. Therefore, referring to fig. 3, it is a schematic flow chart of a rule issuing method according to another embodiment of the present application, including:
step S21, obtaining a selection instruction of the target business rule, and selecting a corresponding business rule component in the business rule configuration area according to the selection instruction.
In this embodiment, the operation process of step S21 is similar to that of step S11 in the above embodiment, and is not repeated here.
And step S22, acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction.
In this embodiment, the operation process of step S22 is similar to that of step S12 in the above embodiment, and is not repeated here.
Step S23, extracting each service rule component generation component set with different component types from the service rule configuration area, generating a rule data packet according to each service rule component in the component set and the data source of each service rule component, and issuing the rule data packet to a decision engine for the decision engine to analyze the rule data packet. The rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
In one embodiment, the component types of the business rule component include a rule set component, a decision table component, a score card component and a decision flow component, wherein the rule set component is used for grouping the same class of rules together to match each rule in sequence, and can be divided into two strategies, namely, after one rule is matched, the rest of rules are not executed and all the rules are executed by neglecting matching; the decision table component is used for showing rules in a table form, and comprises row conditions, column conditions and output results after the conditions corresponding to the rows and the columns are matched at the same time; the scoring card component is used for carrying out multiple condition judgment on a condition parameter, each condition corresponds to a score, and the final score is weighted by different algorithms to obtain and output a total score; the decision flow component is used for arranging the execution sequence of the existing rules, rule set components, decision table components, score card components and the like, is of a tree structure, and tree nodes can be condition nodes, branch nodes, assignment nodes and rule nodes, wherein the rule nodes are the different types of rule components.
The combination of rule data and the result to be output after rule matching can be clearly seen through rows and columns by different rule components aiming at different use scenes, such as that a decision table is similar to an Excel table format, the flow direction of a decision and the execution sequence arrangement of the rule components can be clearly seen in the same way that a decision flow is in a flow chart mode, the management effect that rule configuration is more visual and flexible is achieved, and follow-up better effectiveness analysis can be conveniently carried out on each type of rule respectively.
In one embodiment, the business rule component has a component tag, and the business rule components of different component types have different component tags, so as to better identify the component type of the business rule component corresponding to each rule data in the rule data packet, so as to better analyze the rule data packet. And after the rule data packet is issued to the decision engine, the decision engine calls a corresponding analysis method to analyze the rule data packet according to the component label of the business rule component corresponding to each rule data in the rule data packet, so that the rule data packet is analyzed into a computer executable code.
As a preferable example of this embodiment, the rule data is provided with a label "rule", and the content under the label includes basic information, a conditional expression and an assignment expression, where the conditional expression takes "filter" as the label and the assignment expression takes "assign" as the label, as shown in fig. 4; the rule set component is provided with a label "rule set", and the content under the label comprises a plurality of "rule" labels, as shown in fig. 5; the decision table component is provided with a label "ruleTable", the label includes row content, column content and assignment content, the row takes "row" as the label, the content is a conditional expression, the column takes "column" as the label, the content is also a conditional expression, the assignment takes "assign" as the label, the content is a two-dimensional array, the two-dimensional array corresponds to the indexes of the row and the column respectively, that is, if the conditions of the row and the column are satisfied at the same time, the assignment expression in the two-dimensional array corresponding to the row index and the column index is executed, as shown in FIG. 6; the scoring card component is provided with a label 'rulCard', the content under the label comprises a plurality of scoring items, each scoring item takes 'propertyScore' as a label, the content under the label comprises scoring item weight, scoring value and conditional expression, namely, the scoring of the scoring value is obtained after the conditional expression of the scoring item is met, as shown in FIG. 7; the decision flow component is provided with a label 'rulFlow', the content under the label is a binary tree structure, tree nodes comprise a conditional expression, a left node and a right node, the left node is executed when the conditional expression is met, and the right node is executed otherwise, as shown in FIG. 8.
The decision engine selects different analysis methods according to the tags, when a 'rule' tag is read, the rule analysis method is entered, a 'rule executable code object' is dynamically created and given a unique mark, meanwhile, the analyzer of the decision engine continuously reads downwards, and when the 'filter' tag or the 'assign' is read, the expressions in the 'filter' tag and the 'assign' tag are compiled into an 'expression executable code object' through the expression engine of the analyzer and are embedded into the 'rule executable code object'; similarly, when different rule type tags are read, such as the tags "ruleSet", "ruleTable", "ruleCard", and "ruleFlow", different rule parsing methods are entered, and different "rule executable code objects" are generated.
In order to facilitate subsequent invocation, after parsing each rule data in the rule data packet into an executable code, the executable code is stored on the terminal for subsequent invocation, and in order to reduce the cache pressure of the terminal, in an embodiment, the method further includes:
the method comprises the steps of obtaining analysis data of each rule data in a rule data packet by a decision engine, detecting whether storage data corresponding to the analysis data exist in a cache of the decision engine or not according to an identification of the rule data corresponding to the analysis data, and replacing the storage data with the analysis data when the storage data exist in the cache is detected. As an example of this embodiment, after completing parsing of rule data and obtaining a rule executable code object, the rule in the cache is queried according to a unique identifier of the rule data corresponding to the rule executable code object, and whether an old "rule executable code object" exists in the computer cache is searched, if so, the old object is removed, and the new object is stored, otherwise, the new object is directly stored.
It should be noted that, when the rule package is issued to the decision engine for analysis, the rule package is first converted into a DSL text for network transmission and for analysis by the decision engine, where the DSL includes a unique identifier, a component tag, a relational operator, an arithmetic operator, a logical operator, and the like.
As shown in fig. 9, it is a schematic flow chart of a rule issuing method according to another embodiment of the present application, and the method includes:
step S31, obtaining a selection instruction of the target business rule, and selecting a corresponding business rule component in the business rule configuration area according to the selection instruction.
In this embodiment, the operation process of step S31 is similar to that of step S11 in the above embodiment, and is not repeated here.
And step S32, acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction.
In this embodiment, the operation process of step S32 is similar to that of step S12 in the above embodiment, and is not repeated here.
Step S33, in response to the edit end instruction, extracting, from the business rule configuration area, each business rule component having a different component type to generate a component set, obtaining each DSL template corresponding to each business rule component in the component set one to one, and generating, according to each DSL template, a DSL fragment of each rule data, so as to issue, to the decision engine, a rule data packet of the DSL fragment in which each rule data is packaged. The DSL templates corresponding to the business rule components of different component types are different. Different DSL segments can be generated by the text generator FreeMarker according to different types of DSL templates.
Different DSL templates are set for the service rule components of different component types, so that the DSL templates of the rule components can be mutually nested for use, for example, a rule set supports nested rule data, and a decision flow can nest all the rule components, thereby achieving the effect of recycling after one component is configured, and different parsing methods can be more quickly and clearly compiled for a parser according to different DSL templates, then different types of executable code objects are generated to process decision judgment events for a decision engine, and the decision efficiency is improved. Meanwhile, different from the existing mode of global modification, when the service requirement changes, the template of some service rule components can be modified more specifically, and then the resolution code corresponding to the resolver is modified, so that the DSL readability is higher, and a programmer can maintain the code more easily.
In one embodiment, a rule issuing apparatus is provided. As shown in fig. 10, includes:
the component configuration module 101 is configured to obtain a selection instruction of a target business rule, and select a corresponding business rule component in a business rule configuration area according to the selection instruction.
And the component editing module 102 is configured to obtain an editing instruction of the business rule component, and select a data source of the business rule component according to the editing instruction.
And the rule issuing module 103 is configured to respond to the edit ending instruction, generate a rule data packet according to each service rule component in the service rule configuration area and the data source of each service rule component, and issue the rule data packet to the decision engine, so that the decision engine analyzes the rule data packet.
The rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
In an embodiment, the rule issuing module 103 is further configured to extract service rule components with different component types from the service rule configuration area to generate a component set, and generate a rule data packet according to the service rule components in the component set and the data sources of the service rule components. The component types comprise a rule set component, a decision table component, a score card component and a decision flow component.
In an embodiment, the rule issuing module 103 is further configured to provide the rule data packet to the decision engine, so that the decision engine invokes a corresponding parsing method to parse the rule data packet according to the component tag of the business rule component corresponding to each rule data in the rule data packet. Wherein, the business rule component has component labels, and the component labels of the business rule components of different component types are different.
In an embodiment, the rule issuing module 103 is further configured to obtain analysis data of each rule data in the rule data packet by the decision engine, detect whether there is storage data corresponding to the analysis data in the cache according to a component tag of a business rule component corresponding to the analysis data, and replace the storage data with the analysis data when it is detected that there is storage data in the cache.
In an embodiment, the rule issuing module 103 is further configured to obtain DSL templates corresponding to the service rule components in the component set one to one, and generate DSL segments of each rule data according to the DSL templates, so as to issue the rule data packet of the DSL segment in which each rule data is packaged to the decision engine. The DSL templates corresponding to the business rule components of different component types are different.
In an embodiment, the rule issuing module 103 is further configured to send the rule data packet to the user terminal, and issue the rule data packet to the decision engine when receiving a submission instruction returned by the user terminal according to the rule data packet.
In one embodiment, a schematic structural diagram of a terminal device is provided. As shown in fig. 11, the terminal device includes a processor, a memory, an input/output interface, and a cache connected by a system bus. Wherein the processor of the terminal device is configured to provide computing and control capabilities. The memory of the terminal equipment comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a cache. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the terminal equipment is used for being connected with an external cache so as to receive the component data in the cache. The terminal device implements the rule issuing method described in the above embodiment when executed by the processor. Those skilled in the art will appreciate that the structure shown in fig. 11 is a block diagram of only a portion of the structure relevant to the present application, and does not constitute a limitation on the terminal device to which the present application is applied, and a particular terminal device may include more or less components than those shown in the drawings, or combine some components, or have a different arrangement of components.
The foregoing is a preferred embodiment of the present application, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present application, and these modifications and decorations are also regarded as the protection scope of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.

Claims (10)

1. A method for rule issuance, comprising:
acquiring a selection instruction of a target business rule, and selecting a corresponding business rule component in a business rule configuration area according to the selection instruction;
acquiring an editing instruction of the business rule component, and selecting a data source of the business rule component according to the editing instruction;
responding to an editing ending instruction, generating a rule data packet according to each business rule component in the business rule configuration area and the data source of each business rule component, and issuing the rule data packet to a decision engine for the decision engine to analyze the rule data packet; the rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
2. The method of claim 1, wherein the generating a rule packet according to each business rule component in the business rule configuration area and a data source of each business rule component comprises:
and extracting each business rule component generation component set with different component types from the business rule configuration area, and generating rule data packets according to each business rule component in the component set and the data source of each business rule component.
3. The rule issuing method according to claim 2, wherein the business rule component has a component tag, and component tags of the business rule components of different component types are different;
the parsing, by the decision engine, the rule data packet includes:
and providing the rule data packet for the decision engine so that the decision engine calls a corresponding analysis method to analyze the rule data packet according to the component label of the business rule component corresponding to each rule data in the rule data packet.
4. The rule issuing method according to claim 1, further comprising:
the method comprises the steps of obtaining analysis data of each rule data in the rule data packet by the decision engine, detecting whether stored data corresponding to the analysis data exist in a cache or not according to the identification of the rule data corresponding to the analysis data, and replacing the storage data with the analysis data when the stored data exist in the cache is detected.
5. The method of any of claims 2-4, wherein the component types include a rule set component, a decision table component, a score card component, and a decision flow component.
6. The method of claim 2, wherein the publishing the rule packet to a decision engine comprises:
obtaining each DSL template corresponding to each service rule component in the component set one to one, and generating a DSL fragment of each rule data according to each DSL template, so as to issue the rule data packet in which the DSL fragment of each rule data is packed to the decision engine; wherein the DSL templates corresponding to the business rule components of different component types are different.
7. The method according to claim 1 or 6, wherein the issuing the rule data packet to a decision engine comprises:
and sending the rule data packet to a user terminal, and issuing the rule data packet to a decision engine when a submission instruction returned by the user terminal according to the rule data packet is received.
8. A rule issuing apparatus characterized by comprising:
the component configuration module is used for acquiring a selection instruction of a target business rule and selecting a corresponding business rule component in a business rule configuration area according to the selection instruction;
the component editing module is used for acquiring an editing instruction of the business rule component and selecting a data source of the business rule component according to the editing instruction;
a rule issuing module, configured to respond to an edit ending instruction, generate a rule data packet according to each service rule component in the service rule configuration area and a data source of each service rule component, so as to issue the rule data packet to a decision engine, where the decision engine analyzes the rule data packet; the rule data packet comprises a plurality of rule data, and the rule data are generated according to the data source.
9. The rule issuing device according to claim 8, wherein the rule issuing module is specifically configured to:
and extracting each business rule component generation component set with different component types from the business rule configuration area, and generating rule data packets according to each business rule component in the component set and the data source of each business rule component.
10. A terminal device, characterized in that it comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the rule issuing method according to any one of claims 1 to 7.
CN202010913904.9A 2020-09-02 2020-09-02 Rule issuing method and device and terminal equipment Active CN112148343B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010913904.9A CN112148343B (en) 2020-09-02 2020-09-02 Rule issuing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010913904.9A CN112148343B (en) 2020-09-02 2020-09-02 Rule issuing method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN112148343A true CN112148343A (en) 2020-12-29
CN112148343B CN112148343B (en) 2022-05-27

Family

ID=73889246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010913904.9A Active CN112148343B (en) 2020-09-02 2020-09-02 Rule issuing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN112148343B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905422A (en) * 2021-03-22 2021-06-04 上海联蔚盘云科技有限公司 Alarm rule management method and equipment based on search server
CN113220738A (en) * 2021-05-31 2021-08-06 平安科技(深圳)有限公司 Business rule generation method, device, equipment and storage medium
CN113778386A (en) * 2021-09-16 2021-12-10 Oppo广东移动通信有限公司 Component generation method and device, storage medium and electronic equipment
CN116032768A (en) * 2023-01-06 2023-04-28 阳光财产保险股份有限公司 Method, device and server for associating decision and rule
CN116360797A (en) * 2023-06-02 2023-06-30 北京长亭科技有限公司 DSL-based security baseline creation method, system, device and medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120209800A1 (en) * 2011-02-11 2012-08-16 Microsoft Corporation Business rules
US20140081897A1 (en) * 2012-09-16 2014-03-20 International Business Machines Corporation Utilizing a dynamic data source to affect business rule management
CN107085415A (en) * 2016-02-12 2017-08-22 费希尔-罗斯蒙特系统公司 Regular composer in process control network
CN107632842A (en) * 2017-09-26 2018-01-26 携程旅游信息技术(上海)有限公司 Rule configuration and dissemination method, system, equipment and storage medium
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN109144374A (en) * 2018-09-27 2019-01-04 范若愚 Method for processing business, system and relevant device based on visualization regulation engine
CN109299150A (en) * 2018-10-24 2019-02-01 万惠投资管理有限公司 A kind of configurable multi-data source adaptation rule engine solution
CN111273891A (en) * 2020-01-19 2020-06-12 中国平安人寿保险股份有限公司 Business decision method and device based on rule engine and terminal equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120209800A1 (en) * 2011-02-11 2012-08-16 Microsoft Corporation Business rules
US20140081897A1 (en) * 2012-09-16 2014-03-20 International Business Machines Corporation Utilizing a dynamic data source to affect business rule management
CN107085415A (en) * 2016-02-12 2017-08-22 费希尔-罗斯蒙特系统公司 Regular composer in process control network
CN107632842A (en) * 2017-09-26 2018-01-26 携程旅游信息技术(上海)有限公司 Rule configuration and dissemination method, system, equipment and storage medium
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN109144374A (en) * 2018-09-27 2019-01-04 范若愚 Method for processing business, system and relevant device based on visualization regulation engine
CN109299150A (en) * 2018-10-24 2019-02-01 万惠投资管理有限公司 A kind of configurable multi-data source adaptation rule engine solution
CN111273891A (en) * 2020-01-19 2020-06-12 中国平安人寿保险股份有限公司 Business decision method and device based on rule engine and terminal equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112905422A (en) * 2021-03-22 2021-06-04 上海联蔚盘云科技有限公司 Alarm rule management method and equipment based on search server
CN113220738A (en) * 2021-05-31 2021-08-06 平安科技(深圳)有限公司 Business rule generation method, device, equipment and storage medium
CN113220738B (en) * 2021-05-31 2024-07-16 平安科技(深圳)有限公司 Business rule generation method, device, equipment and storage medium
CN113778386A (en) * 2021-09-16 2021-12-10 Oppo广东移动通信有限公司 Component generation method and device, storage medium and electronic equipment
CN113778386B (en) * 2021-09-16 2024-06-07 Oppo广东移动通信有限公司 Component generation method and device, storage medium and electronic equipment
CN116032768A (en) * 2023-01-06 2023-04-28 阳光财产保险股份有限公司 Method, device and server for associating decision and rule
CN116360797A (en) * 2023-06-02 2023-06-30 北京长亭科技有限公司 DSL-based security baseline creation method, system, device and medium
CN116360797B (en) * 2023-06-02 2023-10-27 北京长亭科技有限公司 DSL-based security baseline creation method, system, device and medium

Also Published As

Publication number Publication date
CN112148343B (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN112148343B (en) Rule issuing method and device and terminal equipment
CN100470480C (en) Hardware accelerator personality compiler
CN112882974B (en) JSON data conversion method and device, computer equipment and storage medium
CN110609852A (en) Streaming data processing method and device, computer equipment and storage medium
CN106293891B (en) Multidimensional investment index monitoring method
CN108369591A (en) System and method for caching and parameterizing ir
CN110866029A (en) sql statement construction method, device, server and readable storage medium
CN116628066B (en) Data transmission method, device, computer equipment and storage medium
CN114707474A (en) Report generation method and device, electronic equipment and computer readable storage medium
CN107562429A (en) A kind of android system static division method based on compiling rule
CN111240772B (en) Block chain-based data processing method, device and storage medium
WO2023087721A1 (en) Service processing model generation method and apparatus, and electronic device and storage medium
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN113687827A (en) Data list generation method, device and equipment based on widget and storage medium
US11841837B2 (en) Computer-based systems and methods for risk detection, visualization, and resolution using modular chainable algorithms
CN112835901A (en) File storage method and device, computer equipment and computer readable storage medium
CN108874395A (en) Hard Compilation Method and device during a kind of modularization stream process
CN102486731B (en) Strengthen the visualization method of the call stack of software of software, equipment and system
CN113641523B (en) Log processing method and device
US7085759B2 (en) System and method for communicating data to a process
CN115186214A (en) Page configuration method and device, computer equipment and computer readable storage medium
CN114968350A (en) Searching method, device and equipment for code method call chain
CN113326407A (en) Data processing method and device
CN111443906A (en) Application access method and device
EP3921731A1 (en) Method and system for efficient multi agent computer simulation

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
GR01 Patent grant
GR01 Patent grant