CN113220738A - Business rule generation method, device, equipment and storage medium - Google Patents

Business rule generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113220738A
CN113220738A CN202110602677.2A CN202110602677A CN113220738A CN 113220738 A CN113220738 A CN 113220738A CN 202110602677 A CN202110602677 A CN 202110602677A CN 113220738 A CN113220738 A CN 113220738A
Authority
CN
China
Prior art keywords
rule
tag
business
sequence
name
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
CN202110602677.2A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202110602677.2A priority Critical patent/CN113220738A/en
Publication of CN113220738A publication Critical patent/CN113220738A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24573Query processing with adaptation to user needs using data annotations, e.g. user-defined metadata
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/26Visual data mining; Browsing structured data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Library & Information Science (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to the technical field of information processing, and discloses a method, a device, a medium and equipment for generating business rules, wherein the method comprises the following steps: responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of a business rule; identifying the currently selected rule label and the rule sequence of the rule label on a label selection interface; combining the attribute labels and the logic labels according to the rule sequence to form a business rule corresponding to the rule name of the business rule; respectively reading the functional components corresponding to the rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules; and issuing the execution codes to the business system so that the business system executes the business rules according to the execution codes. Therefore, the error probability in the modification process of the business rules is reduced, the modification flexibility is improved, and the labor cost and the time cost are reduced.

Description

Business rule generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method, an apparatus, a medium, and a device for generating business rules.
Background
At present, a business rule applied to a business scenario is described in a manner that a business logic required by system processing is extracted from a program code, the business logic is converted into structured business rule data to represent business behaviors, and then the business rule data is described by using a natural language-like language and is stored in a rule database in a centralized manner.
In the prior art, a business rule is usually a rule diagram that needs to be implemented by a business person first, and then a system developer redefines the rule diagram into a program code that can be recognized and executed by a system. Therefore, when the business rules need to be modified, the corresponding program codes are modified by the system developers, and the code versions are re-issued.
However, the description method in the prior art needs to modify and update the program code every time the business rule is modified, has high requirements on the quality of development personnel, has high error probability in the modification process, and has poor modification flexibility, thereby increasing the labor cost and the time cost.
Disclosure of Invention
The application mainly aims to provide a method, a device, a medium and equipment for generating a business rule, and aims to solve the technical problems that in the prior art, the error probability is high, the modification flexibility is poor, and the labor cost and the time cost are high in the modification process of the business rule.
In order to achieve the above object, the present application provides a method for generating a business rule, where the method includes:
responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of the business rule;
identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component;
combining the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to the rule name, wherein at least one logic tag is arranged between every two adjacent attribute tags in the service rule;
respectively reading functional components corresponding to rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules;
and issuing the execution code to a service system so that the service system executes the service rule according to the execution code.
Further, before the step of generating an instruction in response to the business rule, the method further includes:
receiving a rule tag generation instruction;
recognizing text information in a label name input box, and taking the text information in the label name input box as a label name of a new rule label;
identifying code information in a functional component input box, and generating a new functional component according to the code information in the functional component input box;
establishing a mapping relation between the new rule label and the new functional component;
adding the new rule tab to the tab selection interface.
Further, before the step of generating an instruction in response to the business rule, the method further includes:
responding to a rule tag modification instruction, taking a rule tag pointed by the rule tag modification instruction as a first editing tag, and displaying a tag name of the first editing tag in a rule tag editing frame so that a user edits the tag name;
and responding to a rule tag modification completion instruction, identifying the tag name edited in the rule tag edit box, and taking the tag name edited in the rule tag edit box as the tag name of the first edit tag.
Further, the step of identifying the rule order of the rule labels on the label selection interface includes:
responding to a rule tag selection instruction of a rule tag in the tag selection interface, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and taking the selected time sequence of each rule label as the rule sequence of the rule label.
Further, the step of identifying the currently selected rule tag and the rule sequence of the rule tag at the tag selection interface includes:
responding to a pull-down selection instruction through a pull-down control of the label selection interface, and displaying a rule label menu on the label selection interface after receiving the pull-down selection instruction, wherein the rule label menu displays a plurality of rule labels according to a preset arrangement sequence;
responding to a rule tag selection instruction of a rule tag in the rule tag menu, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and identifying the rule sequence of the currently selected rule label on a label selection interface.
Further, the step of identifying the rule order of the currently selected rule tab on the tab selection interface includes:
responding to a sequence editing instruction through a sequence editing control of the label selection interface, and editing the arrangement sequence of the currently selected rule label according to the sequence editing instruction when the sequence editing instruction is received;
and taking the arrangement sequence of the currently selected rule labels as the rule sequence of the currently selected rule labels.
Further, after the step of forming the business rule corresponding to the rule name of the business rule, the method further includes:
and storing the business rules and the mapping relation between the rule names and the business rules into a business rule database, wherein one rule name corresponds to one business rule, and one business rule corresponds to at least one business name.
The present application further provides a device for generating business rules, including:
the rule name identification module is used for responding to a business rule generation instruction, identifying text information in a rule name input box and taking the text information in the rule name input box as a rule name of the business rule;
the rule tag identification module is used for identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component;
a service rule generating module, configured to combine the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to a rule name of the service rule, where in the service rule, at least one logic tag is spaced between every two adjacent attribute tags;
the execution code generation module is used for respectively reading the functional components corresponding to the rule tags forming the business rules and combining the functional components according to the rule sequence to form the execution codes corresponding to the business rules;
and the business rule execution module is used for issuing the execution code to a business system so that the business system executes the business rule according to the execution code.
The present application further proposes a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of any of the above methods when executing the computer program.
The present application also proposes a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any of the above.
According to the business rule generating method, the business rule generating device, the business rule generating medium and the business rule generating equipment, the text information in the rule name input box is identified according to the business rule generating instruction, and the text information in the rule name input box is used as the rule name of the business rule, so that each business rule at least has one rule name, and the searching and distinguishing are convenient; by identifying at least two attribute tags, at least one logic tag and a rule sequence thereof which are selected currently on a tag selection interface, business personnel can randomly combine the rule tags according to the requirements of the current business rules, and each rule tag is provided with a corresponding functional component, so that the program code which cannot be changed randomly originally is divided into a plurality of independent functional modules, a user can form a new business rule by arranging and combining the rule tags, and the flexibility of generating the business rule is improved; the attribute tags and the logic tags are combined through the rule sequence to form the business rules corresponding to the rule names of the business rules, and the functional components corresponding to the rule tags are combined in a module form to form new execution codes so as to be convenient for the business system to execute, thereby reducing the error probability of the business rules in the modification process and reducing the labor cost and the time cost.
Drawings
Fig. 1 is a schematic flow chart of a business rule generating method according to an embodiment of the present application;
fig. 2 is a schematic block diagram of a structure of a business rule generating device according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Referring to fig. 1, in an embodiment of the present application, in order to achieve the above object, the present application provides a method for generating a business rule, where the method includes:
s1: responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of the business rule;
s2: identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component;
s3: combining the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to a rule name of the service rule, wherein at least one logic tag is arranged between every two adjacent attribute tags in the service rule;
s4: respectively reading functional components corresponding to rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules;
s5: and issuing the execution code to a service system so that the service system executes the service rule according to the execution code.
In the embodiment, the text information in the rule name input box is identified by generating the instruction according to the business rule, and the text information in the rule name input box is used as the rule name of the business rule, so that each business rule has at least one rule name, and the searching and distinguishing are convenient; by identifying at least two attribute tags, at least one logic tag and a rule sequence thereof which are selected currently on a tag selection interface, business personnel can randomly combine the rule tags according to the requirements of the current business rules, and each rule tag is provided with a corresponding functional component, so that the program code which cannot be changed randomly originally is divided into a plurality of independent functional modules, a user can form a new business rule by arranging and combining the rule tags, and the flexibility of generating the business rule is improved; the attribute tags and the logic tags are combined through the rule sequence to form the business rules corresponding to the rule names of the business rules, and the functional components corresponding to the rule tags are combined in a module form to form new execution codes so as to be convenient for the business system to execute, thereby reducing the error probability of the business rules in the modification process and reducing the labor cost and the time cost.
For step S1, when receiving the business rule generation instruction, it is determined that a new business rule needs to be generated currently, and at this time, the name of the business rule that needs to be generated is identified first, that is, the text information input by the user in the rule name input box, for example, "long-term rating of bond is greater than AA and short-term rating is greater than B", so as to facilitate the user to search and identify.
For step S2, the label selection interface is a system interface displayed to the user, and the label selection interface is displayed on a computer, a smart phone, a smart tablet, or other terminals used by the user; based on the label selection interface, the user can observe and select the required rule labels, wherein the currently selected rule labels comprise at least two attribute labels and at least one logic label so as to form a complete logic relationship; the attribute tags comprise different business requirements and business standards, such as business object attributes of long-term bond rating, short-term bond rating, industry to which the bond belongs, whether the bond is due, long-term subject rating, short-term subject rating and the like, or value ranges of AAA level, AA + level, AA level, A + level, A-level, B level, C level, yes, no, 10, 100, 10000 and the like; the logical labels comprise operators and inter-object relations, wherein the operators comprise greater than, equal to, less than, greater than or equal to, less than or equal to, containing, not equal to and the like, and the inter-object relations comprise where, where (, and, or, and (, or (, end), end, expect and the like.
For step S3, the rule sequence may be an arrangement sequence set by the user, where the arrangement sequence may be a sequence in which the user selects the rule tags, a display sequence of the selected rule tags on the tag selection interface, a connection sequence of the user, and the like, so as to form the service rule corresponding to the rule name according to the rule sequence selected by the user.
The functional components are generally components formed by compiling and packaging preset program codes, and are used for representing an attribute function or a logic function, such as an industry name, a money transfer list, an "expect" or an "end", and the like, so as to realize modularization of the program codes.
It should be noted that, the generation of the business rule may be from scratch, or a new business rule may be generated based on an existing business rule; in a specific implementation manner, in response to the service rule modification instruction, the rule name of the service rule corresponding to the rule modification instruction may be identified, the corresponding service rule may be read according to the rule name, and the read service rule may be displayed on a display interface of a terminal of a user, so that the user may modify the display interface, for example, delete or add a rule tag, modify a rule sequence, modify a rule name, and the like; and after the user finishes modifying, storing the modified business rule into a new address according to the storage instruction of the user, or covering the modified business rule with the original business rule to form a new business rule.
For step S4, after a service rule is formed according to the sequence rule, that is, the sequence of the service rule is the correct sequence, at this time, the functional components corresponding to the rule tags that constitute the service rule are read and then combined according to the rule sequence, or the functional components corresponding to the rule tags that constitute the service rule are read sequentially and combined sequentially, so that a complete execution code with the correct sequence can be formed.
For the rule order, the attribute tags and the logic tags, for example, if it is required to generate a logical business rule that "the long-term rating of the bond is greater than AA and the short-term rating of the bond is greater than B", the business rule can be regarded as that "the long-term rating of the bond is greater than AA" and "the short-term rating of the bond is greater than B", the user can select the attribute tags as "long-term rating of the bond" (business object attribute), "short-term rating of the bond" (business object attribute), "AA" (value range) and "B" (value range), the logic tags are "where between objects are related)," greater than "(operator)," and "(inter-object relation)," less than "(operator) and" end "(inter-object relation), and the tags are ordered in the order of" where "long-term rating of the bond" - "is greater than" - "AA" - "and" - "short-term rating of the bond" - "is less than" - "B" - "end", forming a business rule for the logic "bond long term rating is greater than AA and short term rating is greater than B".
In actual logic, the logic tags are necessarily required to be complemented logically between the two attribute tags, for example, the "long-term bond rating AA and short-term bond rating B" is obviously not logic of a complete business rule, so that in order to avoid a user generating incomplete logic such as the "long-term bond rating AA and short-term bond rating B" in the system, the business rule needs to satisfy at least one logic tag spaced between the two attribute tags, and the business rule database is prevented from being polluted by a business rule with abnormal logic. In a specific implementation, if the condition that at least one logic tag is spaced between two attribute tags is not met, the user can be prompted to re-edit the rule sequence and the rule tags by sending an abnormal signal to the user until the correct service logic is met. The abnormal signal can be a popup displayed on a display interface of the user terminal or an abnormal prompt tone sent by a loudspeaker of the user terminal, so that a user can edit the label again according to the abnormal signal.
In a specific embodiment, the business rule may set a rule name of the business rule having a long-term bond rating greater than AA and a short-term bond rating greater than B as its logic, that is, the business rule having a long-term bond rating greater than AA and a short-term bond rating greater than B, or may set a rule name of the business rule as its business function, for example, a "rule for rating bonds" or the like.
For step S5, when the business rule is correct and the execution code is formed, the execution code may be issued to the business system, so that the business system runs the execution code, and taking the business rule "long-term rating of the bond is greater than AA and short-term rating is greater than B" as an example, after the business system executes the business rule, the bond information satisfying that the long-term rating of the bond is greater than AA and the short-term rating is greater than B may be output.
In one embodiment, before the step S1 of responding to the business rule generating instruction, the method further includes:
s101: receiving a rule tag generation instruction;
s102: recognizing text information in a label name input box, and taking the text information in the label name input box as a label name of a new rule label;
s103: identifying code information in a functional component input box, and generating a new functional component according to the code information in the functional component input box;
s104: establishing a mapping relation between the new rule label and the new functional component;
s105: adding the new rule tag to the tag selection interface
In the embodiment, the rule tag and the corresponding functional component are generated according to the rule tag generation instruction of the user before the business rule generation instruction is responded, so that the user can conveniently create a new business logic, and the new business logic can be created by creating the mapping relation between the new rule tag and the new functional component, so that the rule tag can be directly selected when the business logic is needed next time, and the business rule modification efficiency and flexibility are improved.
In step S102, the text information in the tag name input box is the name of the rule tag, and in order to facilitate the identification of the function of each rule tag, the name of the rule tag may be named as the function content of the rule tag, such as "greater than", "and", etc.
In step S103, after the code information in the functional component input box, i.e. the program code capable of implementing the function of the rule tag, is identified as the packaging instruction, the code information in the functional component input box is compiled and packaged to generate a new functional component.
For step S104, a mapping relationship between the new rule tag and the new functional component is established, so that the mapped functional component can be directly called when the rule tag is selected.
In one embodiment, before the step S1 of responding to the business rule generating instruction, the method further includes:
s105: responding to a rule tag modification instruction, taking a rule tag pointed by the rule tag modification instruction as a first editing tag, and displaying a tag name of the first editing tag in a rule tag editing frame so that a user edits the tag name;
s106: and responding to a rule tag modification completion instruction, identifying the tag name edited in the rule tag edit box, and taking the tag name edited in the rule tag edit box as the tag name of the first edit tag.
In the embodiment, by responding to the rule tag modification instruction, the tag to be modified is used as the first editing tag according to the rule tag modification instruction of the user before the business rule generation instruction, and the tag name of the first editing tag is displayed in the rule tag editing frame, so that the user can edit the old business tag, a new business logic is introduced, the problem that program codes need to be modified every time of modification is avoided, and the business rule modification efficiency and flexibility are improved.
For step S105, a rule label modification instruction may be corresponded to a label editing control of a display interface of a terminal of a user, a total editing control in the label editing controls may be set near a display position of the rule label, sub editing controls in the label editing controls are respectively set at the display position of the rule label, in a specific implementation manner, the user clicks the display position of the total editing control first, so that the total editing control switches a display icon of each rule label into an "editable mode" according to a touch instruction of the user, and sets each sub editing control into a triggerable mode, so that the user clicks the display position of a rule label according to the display icon to trigger a sub editing control of the position, the sub editing controls switch the display position of the rule label into the rule label editing frame, and display a name of the rule label in the rule label editing frame, to facilitate editing by the user.
For step S106, after the user finishes modifying, the general editing control may be clicked again, so that the general editing control switches the display icon of each rule label to the "non-editable mode" according to the touch instruction of the user, and sets each sub editing control to the non-triggerable mode, thereby ending the editing, obtaining the label name input by the user in the rule label editing frame, and modifying the original label name of the rule label to the label name input in the rule label editing frame.
In one embodiment, the step S2 of identifying the rule order of the rule tags in the tag selection interface includes:
s201: responding to a rule tag selection instruction of a rule tag in the tag selection interface, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
s202: and taking the selected time sequence of each rule label as the rule sequence of the rule label.
According to the embodiment, the selection time of the rule tags is used as the rule sequence of each rule tag, so that the writing habit of a user is better met, and the friendliness of the generation of the business rules is improved.
For step S202, the time sequence of the rule tags selected by the user is used as the rule sequence, that is, the rule tag selected first is arranged in front of the rule tag selected later, and the writing habit of the user is more easily adapted, that is, the written character is displayed at the front end of the sentence.
In one embodiment, the step S2 of identifying the currently selected rule tag and the rule sequence of the rule tag in the tag selection interface includes:
s203: responding to a pull-down selection instruction through a pull-down control of the label selection interface, and displaying a rule label menu on the label selection interface after receiving the pull-down selection instruction, wherein the rule label menu displays a plurality of rule labels according to a preset arrangement sequence;
s204: responding to a rule tag selection instruction of a rule tag in the rule tag menu, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
s205: and identifying the rule sequence of the currently selected rule label on a label selection interface.
According to the method and the device for displaying the business rule, the rule labels are arranged in the pull-down menu to be displayed, the problem that the label selection interface is complicated due to the fact that the rule labels are too many can be avoided, a visual configuration interface is provided, and the friendliness of business rule generation is improved.
For step S203, in the rule tag menu, the rule tags may be arranged sequentially from top to bottom according to the first letter of the pinyin or the first letter of the word, so that the user can search for the tag according to the first letter after pulling down the menu; or, the rule tags may be sequentially displayed in the pull-down menu according to the number of times the rule tag is called, so that the user can more quickly find the rule tag with the highest calling probability.
In a specific embodiment, multiple rule tag menus may be set, where a rule tag menu corresponds to a type of rule tag, such as a business object attribute, a value range, an inter-object relationship, an operator, and the like, so as to facilitate searching by a user.
In one embodiment, the step S203 of identifying the rule order of the currently selected rule tab on the tab selection interface includes:
s213: responding to a sequence editing instruction through a sequence editing control of the label selection interface, and editing the arrangement sequence of the currently selected rule label according to the sequence editing instruction when the sequence editing instruction is received;
s223: and taking the arrangement sequence of the currently selected rule labels as the rule sequence of the currently selected rule labels.
According to the method and the device, the sequence editing command is responded through the sequence editing control of the label selection interface, and when the sequence editing command is received, the arrangement sequence of the currently selected rule labels is edited according to the sequence editing command, so that a user can conveniently adjust the rule sequence of the rule labels, the problem that the rule labels need to be reselected when the rule label sequence is adjusted every time is solved, and the total generation efficiency of the business rules is improved.
In step S213, position adjustment controls, such as "move up control" and "move down control", may be set at positions near the rule tag in the display interface of the user terminal, where one "move up control" and one "move down control" correspond to one rule tag respectively, and when the user touches the above controls, the corresponding rule tag is moved up and down respectively.
In a specific implementation manner, the method may further include "delete controls" respectively arranged near each rule tag, where a "delete control" corresponds to a rule tag, and when a user touches the control, the rule tag corresponding to the control is deleted
In a specific embodiment, in addition to the position adjustment control for each rule tag, the position adjustment may be performed on a combination of several rule tags, for example, for a business rule in which "the long-term rating of the bond is greater than AA and the short-term rating of the bond is greater than B", a combination of three rule tags in which "the long-term rating of the bond is greater than AA", "and" the short-term rating of the bond is greater than B "may be included, and when the position adjustment is directly performed on the combination of the rule tags, the editing efficiency of the business rule may be further improved, so that the comprehensive efficiency of generating the business rule is improved.
In one embodiment, after the step S3 of forming the business rule corresponding to the rule name of the business rule, the method further includes:
s4: and storing the business rules and the mapping relation between the rule names and the business rules into a business rule database, wherein one rule name corresponds to one business rule, and one business rule corresponds to at least one business name.
In this embodiment, the service rule and the mapping relationship between the rule name and the service rule are stored in a service rule database, so that a user can search and invoke a formed service rule from the database, and the problem that the rule tag needs to be edited again during each generation is avoided.
For step S4, in a specific embodiment, still taking "long-term rating of bond is greater than AA and short-term rating is greater than B" as an example, after storing the business rules in the business rules database, if the next time the user needs to generate a business rule with business logic "long-term rating of bond is greater than AA and less than AAA and short-term rating is greater than B", the business rules "long-term rating of bond is greater than AA and short-term rating is greater than B" stored in the business rules database may be called and the rule labels "long-term rating of bond", "less than", "AAA", "and", that is, the order of "long-term rating of bond is greater than AA and short-term rating is greater than B" - "long-term rating of bond" - "AAA" is less than "-" AAA ", may indicate that long-term rating of bond is greater than AA and less than AAA and short-term rating is greater than B", the efficiency and flexibility of generating the business rules by the user are improved.
Referring to fig. 2, the present application further provides a business rule generating apparatus, including:
a rule name identification module 100, configured to respond to a service rule generation instruction, identify text information in a rule name input box, and use the text information in the rule name input box as a rule name of the service rule;
a rule tag identification module 200, configured to identify a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, where the rule tag includes at least two attribute tags and at least one logic tag, and one rule tag corresponds to a functional component;
a service rule generating module 300, configured to combine the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to a rule name of the service rule, where in the service rule, at least one logic tag is spaced between every two adjacent attribute tags;
an execution code generation module 400, configured to read the functional components corresponding to the rule tags forming the business rule, respectively, and combine the functional components according to the rule sequence to form an execution code corresponding to the business rule;
the business rule executing module 500 is configured to issue the execution code to a business system, so that the business system executes the business rule according to the execution code.
In the embodiment, the text information in the rule name input box is identified by generating the instruction according to the business rule, and the text information in the rule name input box is used as the rule name of the business rule, so that each business rule has at least one rule name, and the searching and distinguishing are convenient; by identifying at least two attribute tags, at least one logic tag and a rule sequence thereof which are selected currently on a tag selection interface, business personnel can carry out any combination of the rule tags according to the requirements of the current business rules, and the business rules defined by program codes which cannot be changed randomly are divided into a plurality of independent functional modules, so that the flexibility of generating the business rules is improved; the attribute tags and the logic tags are combined through the rule sequence to form the business rules corresponding to the rule names of the business rules, and the business rules are combined in a module mode, so that the error probability of the business rules in the modification process is reduced, and the labor cost and the time cost are reduced.
In one embodiment, further comprising: a rule tag generation module 101;
the rule tag generation module 101 is configured to respond to a rule tag generation instruction, identify text information in a tag name input box, and add the text information in the tag name input box to the tag selection interface as a new rule tag.
In one embodiment, further comprising: a rule tag modification module 102;
the rule tag modification module 102 is configured to, in response to a rule tag modification instruction, use a rule tag pointed by the rule tag modification instruction as a first editing tag, and display tag content of the first editing tag in a rule tag editing frame, so that a user edits the tag content;
and responding to a rule tag modification completion instruction, identifying the tag content edited in the rule tag edit box, and taking the tag content edited in the rule tag edit box as the tag name of the first edit tag.
In one embodiment, the rule tag identification module 200 is further configured to:
responding to a rule tag selection instruction of a rule tag in the tag selection interface, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and taking the selected time sequence of each rule label as the rule sequence of the rule label.
In one embodiment, the rule tag identification module 200 is further configured to:
responding to a pull-down selection instruction through a pull-down control of the label selection interface, and displaying a rule label menu on the label selection interface after receiving the pull-down selection instruction, wherein the rule label menu displays a plurality of rule labels according to a preset arrangement sequence;
responding to a rule tag selection instruction of a rule tag in the rule tag menu, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and identifying the rule sequence of the currently selected rule label on a label selection interface.
In one embodiment, the rule tag identification module 200 is further configured to:
responding to a sequence editing instruction through a sequence editing control of the label selection interface, and editing the arrangement sequence of the currently selected rule label according to the sequence editing instruction when the sequence editing instruction is received;
and taking the arrangement sequence of the currently selected rule labels as the rule sequence of the currently selected rule labels.
In one embodiment, further comprising: a business rule storage module 400;
a service rule storage module 400, configured to store the service rule and a mapping relationship between the rule name and the service rule in a service rule database, where one rule name corresponds to one service rule and one service rule corresponds to at least one service name.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the computer designed processor is used to provide computational and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for storing data such as a business rule generation method and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a business rule generation method. The business rule generation method comprises the following steps: responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of the business rule; identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component; combining the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to the rule name, wherein at least one logic tag is arranged between every two adjacent attribute tags in the service rule; respectively reading functional components corresponding to rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules; and issuing the execution code to a service system so that the service system executes the service rule according to the execution code.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements a business rule generating method, including the steps of: responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of the business rule; identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component; combining the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to the rule name, wherein at least one logic tag is arranged between every two adjacent attribute tags in the service rule; sequentially reading functional components corresponding to rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules; and issuing the execution code to a service system so that the service system executes the service rule according to the execution code.
In the method for generating the executed service rule, the text information in the rule name input box is identified according to the command generated by the service rule, and the text information in the rule name input box is used as the rule name of the service rule, so that each service rule has at least one rule name, and the search and the resolution are convenient; by identifying at least two attribute tags, at least one logic tag and a rule sequence thereof which are selected currently on a tag selection interface, business personnel can randomly combine the rule tags according to the requirements of the current business rules, and each rule tag is provided with a corresponding functional component, so that the program code which cannot be changed randomly originally is divided into a plurality of independent functional modules, a user can form a new business rule by arranging and combining the rule tags, and the flexibility of generating the business rule is improved; the attribute tags and the logic tags are combined through the rule sequence to form the business rules corresponding to the rule names of the business rules, and the functional components corresponding to the rule tags are combined in a module form to form new execution codes so as to be convenient for the business system to execute, thereby reducing the error probability of the business rules in the modification process and reducing the labor cost and the time cost.
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 hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A method for generating business rules, the method comprising:
responding to a business rule generating instruction, identifying text information in a rule name input box, and taking the text information in the rule name input box as a rule name of the business rule;
identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component;
combining the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to the rule name, wherein at least one logic tag is arranged between every two adjacent attribute tags in the service rule;
respectively reading functional components corresponding to rule tags forming the business rules, and combining the functional components according to the rule sequence to form execution codes corresponding to the business rules;
and issuing the execution code to a service system so that the service system executes the service rule according to the execution code.
2. The business rule generating method of claim 1, wherein the step of responding to the business rule generating instruction is preceded by the step of:
receiving a rule tag generation instruction;
recognizing text information in a label name input box, and taking the text information in the label name input box as a label name of a new rule label;
identifying code information in a functional component input box, and generating a new functional component according to the code information in the functional component input box;
establishing a mapping relation between the new rule label and the new functional component;
adding the new rule tab to the tab selection interface.
3. The business rule generating method of claim 1, wherein the step of responding to the business rule generating instruction is preceded by the step of:
responding to a rule tag modification instruction, taking a rule tag pointed by the rule tag modification instruction as a first editing tag, and displaying a tag name of the first editing tag in a rule tag editing frame so that a user edits the tag name;
and responding to a rule tag modification completion instruction, identifying the tag name edited in the rule tag edit box, and taking the tag name edited in the rule tag edit box as the tag name of the first edit tag.
4. The business rule generating method of claim 1, wherein the step of identifying a rule order of the rule labels at a label selection interface comprises:
responding to a rule tag selection instruction of a rule tag in the tag selection interface, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and taking the selected time sequence of each rule label as the rule sequence of the rule label.
5. The business rule generating method according to claim 1, wherein the step of identifying a currently selected rule tag and a rule sequence of the rule tag in a tag selection interface comprises:
responding to a pull-down selection instruction through a pull-down control of the label selection interface, and displaying a rule label menu on the label selection interface after receiving the pull-down selection instruction, wherein the rule label menu displays a plurality of rule labels according to a preset arrangement sequence;
responding to a rule tag selection instruction of a rule tag in the rule tag menu, and taking the rule tag pointed by the rule tag selection instruction as the currently selected rule tag;
and identifying the rule sequence of the currently selected rule label on a label selection interface.
6. The business rule generating method of claim 5 wherein the step of identifying a rule order of the currently selected rule tab at a tab selection interface comprises:
responding to a sequence editing instruction through a sequence editing control of the label selection interface, and editing the arrangement sequence of the currently selected rule label according to the sequence editing instruction when the sequence editing instruction is received;
and taking the arrangement sequence of the currently selected rule labels as the rule sequence of the currently selected rule labels.
7. The method according to claim 1, wherein the step of forming the business rule corresponding to the rule name of the business rule further comprises:
and storing the business rules and the mapping relation between the rule names and the business rules into a business rule database, wherein one rule name corresponds to one business rule, and one business rule corresponds to at least one business name.
8. A business rule generating apparatus, comprising:
the rule name identification module is used for responding to a business rule generation instruction, identifying text information in a rule name input box and taking the text information in the rule name input box as a rule name of the business rule;
the rule tag identification module is used for identifying a currently selected rule tag and a rule sequence of the rule tag on a tag selection interface, wherein the rule tag comprises at least two attribute tags and at least one logic tag, and one rule tag corresponds to one functional component;
a service rule generating module, configured to combine the attribute tags and the logic tags according to the rule sequence to form a service rule corresponding to a rule name of the service rule, where in the service rule, at least one logic tag is spaced between every two adjacent attribute tags;
the execution code generation module is used for respectively reading the functional components corresponding to the rule tags forming the business rules and combining the functional components according to the rule sequence to form the execution codes corresponding to the business rules;
and the business rule execution module is used for issuing the execution code to a business system so that the business system executes the business rule according to the execution code.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110602677.2A 2021-05-31 2021-05-31 Business rule generation method, device, equipment and storage medium Pending CN113220738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110602677.2A CN113220738A (en) 2021-05-31 2021-05-31 Business rule generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110602677.2A CN113220738A (en) 2021-05-31 2021-05-31 Business rule generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113220738A true CN113220738A (en) 2021-08-06

Family

ID=77081808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110602677.2A Pending CN113220738A (en) 2021-05-31 2021-05-31 Business rule generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113220738A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836146A (en) * 2021-09-29 2021-12-24 五八同城信息技术有限公司 Feature tag generation method and device, electronic equipment and storage medium
CN115052035A (en) * 2022-05-13 2022-09-13 北京大豪工缝智控科技有限公司 Message pushing method, device and storage medium
CN115052035B (en) * 2022-05-13 2024-05-31 北京大豪工缝智控科技有限公司 Message pushing method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088197A1 (en) * 2002-10-31 2004-05-06 Childress Allen B. Method of generating a graphical display of a business rule with a translation
CN109445842A (en) * 2018-09-26 2019-03-08 中国平安人寿保险股份有限公司 Rule generating method, device, computer equipment and storage medium
CN110045953A (en) * 2019-04-22 2019-07-23 第四范式(北京)技术有限公司 Generate the method and computing device of business rule expression formula
CN112148343A (en) * 2020-09-02 2020-12-29 广州市双照电子科技有限公司 Rule issuing method and device and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040088197A1 (en) * 2002-10-31 2004-05-06 Childress Allen B. Method of generating a graphical display of a business rule with a translation
CN109445842A (en) * 2018-09-26 2019-03-08 中国平安人寿保险股份有限公司 Rule generating method, device, computer equipment and storage medium
CN110045953A (en) * 2019-04-22 2019-07-23 第四范式(北京)技术有限公司 Generate the method and computing device of business rule expression formula
CN112148343A (en) * 2020-09-02 2020-12-29 广州市双照电子科技有限公司 Rule issuing method and device and terminal equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113836146A (en) * 2021-09-29 2021-12-24 五八同城信息技术有限公司 Feature tag generation method and device, electronic equipment and storage medium
CN113836146B (en) * 2021-09-29 2024-04-26 五八同城信息技术有限公司 Feature tag generation method and device, electronic equipment and storage medium
CN115052035A (en) * 2022-05-13 2022-09-13 北京大豪工缝智控科技有限公司 Message pushing method, device and storage medium
CN115052035B (en) * 2022-05-13 2024-05-31 北京大豪工缝智控科技有限公司 Message pushing method, device and storage medium

Similar Documents

Publication Publication Date Title
US7032170B2 (en) Creating data structures from a form file and creating a web page in conjunction with corresponding data structures
CN108170809B (en) Table building script generation method, device, equipment and computer readable storage medium
US5041967A (en) Methods and apparatus for dynamic menu generation in a menu driven computer system
KR101312867B1 (en) Markup based extensibility for user interfaces
CN102096588B (en) Control-containing page establishing method
US10565282B1 (en) Automatic entry of suggested translated terms in an online application program
US20070240057A1 (en) User interface element for displaying contextual information
US9280327B2 (en) Simplifying development of user interfaces of applications
WO2009007181A1 (en) A method, system and computer program for intelligent text annotation
CN102693127B (en) Data-driven schema for describing and executing management tasks in a graphical user interface
CN105824787A (en) Control method and system for dynamic configuration of HTML template
CN110705237B (en) Automatic document generation method, data processing device and storage medium
CN110297636A (en) A kind of automatic production of HTML page and parameter management method based on page configuration file, system and device
US20140089841A1 (en) Device and method for providing application interface based on writing input
CN111159982B (en) Document editing method, device, electronic equipment and computer readable storage medium
CN101561725B (en) Method and system of fast handwriting input
CN112528619A (en) Page template file generation method and device, electronic equipment and storage medium
US20200285810A1 (en) System and method for extracting information from unstructured or semi-structured textual sources
CN112799718A (en) Enumerated document generation method and device, electronic equipment and storage medium
CN113220738A (en) Business rule generation method, device, equipment and storage medium
CN110413931A (en) Data load method, device, computer equipment and storage medium
US20040205612A1 (en) Programmatically generating a presentation style for legacy host data
CN109992759B (en) Table object editing method and device, electronic equipment and storage medium
CN111459351A (en) Quick search method and device for terminal and computer storage medium
CN113741900B (en) Development method and device of front-end page application and related equipment

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