Rule configuration method and device
By obtaining and matching rule input items, configuring and sorting rule sets, the problem of flexibility and efficiency of rule configuration in the financial market valet business is solved, the friendliness of rule calculation and result display is achieved, and the manual workload is reduced.
Patent Information
- Application Number
- CN202011043604.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-09-28
AI Technical Summary
In the financial market valet business, there are many problems with the rule configuration of conditional parameters, including that conditional values and conditional results only support input, the number of rule attribute fields is limited, priority configuration is not supported, and result display is unfriendly, etc., resulting in manual workload. Large and error-prone.
Provide a rule configuration method that obtains the rule input items input by the caller, including conditional attribute names and attribute values, determines the grouping module to which the business belongs, configures the rule set, and sets priority ordering based on the conditional attribute name and attribute value matching rules. Generate a priority sequence, select the rule with the highest priority, and support rule expression configuration and dynamic display of results.
It greatly reduces manpower and material resources, supports rule calculation, improves the flexibility and efficiency of rule configuration, can return multiple matching results or the highest-priority result set according to input conditions, and displays results more friendly.
Smart Images

Figure CN112114970B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rule configuration, and more specifically, to a rule configuration method and device. Background Art
[0002] The following shortcomings exist in the condition parameters of the financial market agency business: condition values and condition results only support input. For rules that need to save code values, business personnel need to find the corresponding code values based on the business meaning, which requires a lot of manual work and is prone to errors. In addition, the attribute fields contained in the rules are at most 10, which is not easy to expand. It does not support configuration priority. When multiple rules are met at the same time, only one of the matching results can be returned randomly. The rules only support equality, not expressions. The displayed results are not user-friendly enough. Summary of the invention
[0003] In order to solve at least one of the above problems, an embodiment of the present invention provides a rule configuration method, including:
[0004] Obtaining a rule input item input by the caller, wherein the rule input item includes a condition attribute name and an attribute value;
[0005] Obtain the business key value input by the caller to determine the group module to which the business belongs;
[0006] A rule set is configured according to the grouping module to which the service belongs, and at least one matching rule is obtained from the rule set based on the condition attribute name and attribute value.
[0007] In some embodiments, it also includes:
[0008] Setting the priority of each rule in the rule set;
[0009] Sort the rules according to the priority to generate a priority sequence;
[0010] A rule with the highest priority is selected from the at least one matching rule.
[0011] In some embodiments, the rule includes a condition item and a result item, and correspondingly, the rule set includes: a condition set and a corresponding result set.
[0012] In some embodiments, the condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
[0013] In some embodiments, it also includes:
[0014] Inserting the conditional attribute name and attribute value into a preconfigured rule expression;
[0015] Obtain the business key value input by the caller to determine the group module to which the business belongs, including:
[0016] A set of field objects is determined based on a rule expression inserted after the conditional attribute name and attribute value.
[0017] In some embodiments, it also includes:
[0018] Configure the rule expression.
[0019] In some embodiments, the operators include greater than, less than, not equal to, in, and not in.
[0020] The embodiment of the present invention further provides a rule configuration device, including:
[0021] An acquisition module is used to acquire a rule input item input by a caller, wherein the rule input item includes a condition attribute name and an attribute value;
[0022] The field object collection determines the module, obtains the business key value input by the caller to determine the grouping module to which the business belongs;
[0023] The matching module configures a rule set according to the grouping module to which the service belongs, and obtains at least one matching rule from the rule set based on the condition attribute name and attribute value.
[0024] In some embodiments, it also includes:
[0025] A setting module, for setting each specific rule in the rule set;
[0026] A sorting module, which sorts the rules according to the priority and generates a priority sequence;
[0027] A selection module selects a rule with the highest priority from the at least one matching rule.
[0028] In some embodiments, the rule includes a condition item and a result item, and correspondingly, the rule set includes: a condition set and a corresponding result set.
[0029] In some embodiments, the condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
[0030] In some embodiments, it also includes:
[0031] Insertion module, the condition attribute name and attribute value are inserted into a preconfigured rule expression;
[0032] The field object set determination module is specifically used to determine the field object set according to the rule expression inserted after the condition attribute name and attribute value.
[0033] In some embodiments, it also includes:
[0034] Expression configuration module, configure rule expressions.
[0035] In some embodiments, the operators include greater than, less than, not equal to, in, and not in.
[0036] The present invention also provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.
[0037] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described above are implemented.
[0038] The present invention has the following beneficial effects:
[0039] The present invention provides a rule configuration method and device, which first obtains the rule input items input by the caller, and the rule input items include condition attribute names and attribute values; then obtains the business key values input by the caller to determine the grouping module to which the business belongs; then configures the rule set according to the grouping module to which the business belongs, and matches at least one matching rule from the rule set based on the condition attribute name and attribute value; the present invention can support the calculation of rules, and specific users only need to input conditions to obtain return results, which greatly reduces manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of a rule configuration method provided by the present invention is shown.
[0042] Figure 2 A schematic structural diagram of a rule configuration device provided by the present invention is shown.
[0043] Figure 3 A schematic diagram showing the structure of a computer device suitable for implementing an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] The following shortcomings exist in the condition parameters of the financial market agency business: condition values and condition results only support input. For rules that need to save code values, business personnel need to find the corresponding code values based on the business meaning, which requires a lot of manual work and is prone to errors. In addition, the attribute fields contained in the rules are at most 10, which is not easy to expand. It does not support configuration priority. When multiple rules are met at the same time, only one of the matching results can be returned randomly. The rules only support equality, not expressions. The displayed results are not user-friendly enough.
[0046] In view of this, an embodiment of the present invention provides a rule configuration method, such as Figure 1 As shown, including:
[0047] S1: Obtaining rule input items input by the caller, wherein the rule input items include condition attribute names and attribute values.
[0048] S2: Obtain the business key value input by the caller to determine the group module to which the business belongs.
[0049] S3: Obtain the conditional attribute name and attribute value of the input party and match them in the corresponding rule group, and match 0, 1 or more rules according to the actual situation.
[0050] The present invention provides a rule configuration method, which first obtains the rule input items input by the caller, and the rule input items include condition attribute names and attribute values; then obtains the business key values input by the caller to determine the grouping module to which the business belongs; then configures the rule set according to the grouping module to which the business belongs, and matches at least one matching rule from the rule set based on the condition attribute name and attribute value; the present invention can support the calculation of rules, and specific users only need to input conditions to obtain return results, which greatly reduces manpower and material resources.
[0051] Specifically, in step S1, the caller can input the rule input items by way of field input or drop-down options.
[0052] In some embodiments, the rule input items include conditional attribute names and attribute values. The conditional attribute names are selected from pre-bound objects, an operator is selected, and the conditional attribute values support input or drop-down.
[0053] Specifically, users can combine input through operators and conditional attribute values.
[0054] The rule includes condition items and result items. Correspondingly, the rule set includes: a condition set and a corresponding result set. For each rule set, there are corresponding conditions and results. Field attributes belong to different objects according to business meanings. Rules and pairs are bound. A set of rules selects condition attributes and result attributes from pre-bound objects.
[0055] In some embodiments, it also includes:
[0056] S01: Setting the conditions and result set in the rule set;
[0057] S02: Sort the rules according to the priority to generate a priority sequence;
[0058] S03: Select a rule with the highest priority from the at least one matching rule.
[0059] In this embodiment, there is usually no level distinction between rules. When a set of conditions is input from the outside, if multiple rules are satisfied at the same time, which set of results will be returned? If the priority is not specified, the result will be random. The result obtained may deviate from the expected result. By setting the priority of the rule, the result can be returned according to the established requirements.
[0060] In some embodiments, the condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value. Specifically, the operator includes greater than, less than, not equal to, in, and not in.
[0061] In some embodiments, it also includes:
[0062] Inserting the conditional attribute name and attribute value into a preconfigured rule expression;
[0063] Obtain the business key value input by the caller to determine the group module to which the business belongs, including:
[0064] A set of field objects is determined based on a rule expression inserted after the conditional attribute name and attribute value.
[0065] In this embodiment, some pre-defined specific characters and the combination of these specific characters are used to form a "regular string", and this "regular string" is used to express a filtering logic for the string.
[0066] In some embodiments, it also includes:
[0067] Configure the rule expression.
[0068] In some embodiments, the operators include greater than, less than, not equal to, in, and not in.
[0069] The embodiment of the present invention further provides a rule configuration device, including:
[0070] An acquisition module is used to acquire a rule input item input by a caller, wherein the rule input item includes a condition attribute name and an attribute value;
[0071] The field object collection determines the module, obtains the business key value input by the caller to determine the grouping module to which the business belongs;
[0072] The matching module configures a rule set according to the grouping module to which the service belongs, and obtains at least one matching rule from the rule set based on the condition attribute name and attribute value.
[0073] In some embodiments, it also includes:
[0074] A setting module, for setting each specific rule in the rule set;
[0075] A sorting module, which sorts the rules according to the priority and generates a priority sequence;
[0076] A selection module selects a rule with the highest priority from the at least one matching rule.
[0077] In some embodiments, the rule includes a condition item and a result item, and correspondingly, the rule set includes: a condition set and a corresponding result set.
[0078] In some embodiments, the condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
[0079] In some embodiments, it also includes:
[0080] Insertion module, the condition attribute name and attribute value are inserted into a preconfigured rule expression;
[0081] The field object set determination module is specifically used to determine the field object set according to the rule expression inserted after the condition attribute name and attribute value.
[0082] In some embodiments, it also includes:
[0083] Expression configuration module, configure rule expressions.
[0084] In some embodiments, the operators include greater than, less than, not equal to, in, and not in.
[0085] In some embodiments, the following steps may be performed:
[0086] 1. Select a specific group. The rule set can be divided into different groups according to the saleable products or other business elements.
[0087] 2. Set the condition set of the rule. Select the condition attribute name from the pre-bound object, select the operator, and the condition attribute value supports input or drop-down.
[0088] 3. Set the result set of the rule. The result set also consists of two parts: result attribute name and result attribute value.
[0089] 4. Priority sorting. After adding, modifying, or deleting a rule, you can re-sort the priority of the rule set within the group. Reset the priority of each rule. This prevents the output result from being uncontrollable when the condition set entered by the user satisfies multiple rules at the same time.
[0090] 5. Rule calculation: Match the condition attribute name and attribute value entered by the caller to the rule set, and determine whether the condition entered by the caller satisfies one or more rules according to the operator configured in the rule set.
[0091] 6. Support returning multiple matching result sets based on input conditions.
[0092] 7. Support returning the result set with the highest priority based on input conditions.
[0093] It can be understood that the present invention supports flexible selection of fields by rules and automatically displays them according to the field type (input, drop-down box, etc.). For the drop-down box, it supports obtaining values according to the data dictionary or custom method. Supports calculation of rules: according to the value of external input, calculate whether each condition value is met in the rule set. Supports priority sorting of rules. There may be multiple rules that meet the conditions at the same time, and they are matched in order from high to low according to the pre-set priority. When a result is matched, the corresponding result is returned. Supports dynamic display of rule conditions and results. The condition fields and result fields used for each group of parameters are uncertain. The traditional display rules according to fixed fields are not applicable. The present invention breaks the traditional limitations. The displayed title header and content are dynamically displayed according to the grouping conditions and results. At the same time, the interface of the present invention is universal. It can support rule configuration or result calculation in different scenarios. The output result title bar and attributes support dynamic display, that is, different title bars and result fields are displayed according to different rules; support rule calculation, dynamically match the value passed in by the caller with the condition expression configured in the rule set, and obtain a result set that meets the conditions. Supports prioritization of rules. Users can return all result sets that meet the conditions or the result set with the highest priority as needed. The conditions and result fields of each rule can be added or reduced at will, with no limit on the number.
[0094] Based on the same inventive concept, the embodiment of the present invention also provides a rule configuration device, such as Figure 2As shown, it includes: an acquisition module 1, which acquires a rule input item input by a caller, wherein the rule input item includes a condition attribute name and an attribute value;
[0095] Field object set determination module 2, obtains the business key value input by the caller to determine the grouping module to which the business belongs;
[0096] The matching module 3 configures a rule set according to the grouping module to which the service belongs, and obtains at least one matching rule from the rule set based on the condition attribute name and attribute value.
[0097] In some embodiments, it also includes:
[0098] A setting module, which sets the priority of each rule in the rule set;
[0099] A sorting module, which sorts the rules according to the priority and generates a priority sequence;
[0100] A selection module selects a rule with the highest priority from the at least one matching rule.
[0101] In some embodiments, the rule includes a condition item and a result item, and correspondingly, the rule set includes: a condition set and a corresponding result set.
[0102] In some embodiments, the condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
[0103] In some embodiments, it also includes:
[0104] Insertion module, the condition attribute name and attribute value are inserted into a preconfigured rule expression;
[0105] The field object set determination module is specifically used to determine the field object set according to the rule expression inserted after the condition attribute name and attribute value.
[0106] In some embodiments, it also includes:
[0107] Expression configuration module, configure rule expressions.
[0108] In some embodiments, the operators include greater than, less than, not equal to, in, and not in.
[0109] It can be understood that a rule configuration device provided by the present invention first obtains the rule input items input by the caller, and the rule input items include condition attribute names and attribute values; then obtains the business key values input by the caller to determine the grouping module to which the business belongs; then configures the rule set according to the grouping module to which the business belongs, and matches at least one matching rule from the rule set based on the condition attribute name and attribute value; the present invention can support the calculation of rules, and specific users only need to input conditions to obtain return results, which greatly reduces manpower and material resources.
[0110] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer device, and specifically, the computer device may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0111] In a typical example, a computer device specifically includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the method described above is implemented when the processor executes the program.
[0112] Reference below Figure 3 , which shows a schematic diagram of the structure of a computer device 600 suitable for implementing an embodiment of the present invention.
[0113] like Figure 3 As shown, the computer device includes a central processing unit (CPU) 601, which can perform various appropriate operations and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0114] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed as needed as the storage section 608.
[0115] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from the removable medium 611.
[0116] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0117] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0118] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0119] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0121] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0122] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0123] The present invention may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0124] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0125] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A rule configuration method, characterized in that: include: Obtaining a rule input item input by the caller, wherein the rule input item includes a condition attribute name and an attribute value; Obtain the business key value input by the caller to determine the group module to which the business belongs; A rule set is configured according to the grouping module to which the service belongs, and at least one matching rule is obtained from the rule set based on the condition attribute name and attribute value; Also includes: Setting the priority of each rule in the rule set; Sort the rules according to the priority to generate a priority sequence; Selecting a rule with the highest priority from the at least one matching rule; Also includes: Inserting the conditional attribute name and attribute value into a preconfigured rule expression; Obtain the business key value input by the caller to determine the group module to which the business belongs, including: A set of field objects is determined based on the rule expression inserted after the conditional attribute name and attribute value.
2. The rule configuration method according to claim 1, characterized in that: The rule includes a condition item and a result item. Correspondingly, the rule set includes: a condition set and a corresponding result set.
3. The rule configuration method according to claim 2, characterized in that: The condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
4. The rule configuration method according to claim 1, characterized in that: Also includes: Configure the rule expression.
5. The rule configuration method according to claim 3, characterized in that: The operators include greater than, less than, not equal to, in, and not in.
6. A rule configuration device, characterized in that: include: Obtaining the rule input items input by the caller and confirming the grouping module, wherein the rule input items include the condition attribute name and attribute value and other key information; The field object collection determines the module, obtains the business key value input by the caller to determine the grouping module to which the business belongs; A matching module, configured with a rule set according to the grouping module to which the service belongs, and matching at least one matching rule from the rule set based on the condition attribute name and attribute value; Also includes: A setting module, which sets the priority of each rule in the rule set; A sorting module, which sorts the rules according to the priority and generates a priority sequence; A selection module selects a rule with the highest priority from the at least one matching rule; Also includes: Insertion module, the condition attribute name and attribute value are inserted into a preconfigured rule expression; The field object set determination module is specifically used to determine the field object set according to the rule expression inserted after the condition attribute name and attribute value.
7. The rule configuration device according to claim 6, characterized in that: The rule includes a condition item and a result item. Correspondingly, the rule set includes: a condition set and a corresponding result set.
8. The rule configuration device according to claim 7, characterized in that: The condition item includes a condition attribute name and an operator, and the result item includes a result attribute name and a result attribute value.
9. The rule configuration device according to claim 6, characterized in that: Also includes: Expression configuration module, configure rule expressions.
10. The rule configuration device according to claim 8, characterized in that: The operators include greater than, less than, not equal to, in, and not in.
11. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 5 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
