CN110187874B - Rule configuration method and device executed in computer equipment - Google Patents

Rule configuration method and device executed in computer equipment Download PDF

Info

Publication number
CN110187874B
CN110187874B CN201910394017.2A CN201910394017A CN110187874B CN 110187874 B CN110187874 B CN 110187874B CN 201910394017 A CN201910394017 A CN 201910394017A CN 110187874 B CN110187874 B CN 110187874B
Authority
CN
China
Prior art keywords
rule
user
card
configuration interface
condition
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.)
Active
Application number
CN201910394017.2A
Other languages
Chinese (zh)
Other versions
CN110187874A (en
Inventor
李琦
徐昀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
4Paradigm Beijing Technology Co Ltd
Original Assignee
4Paradigm Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 4Paradigm Beijing Technology Co Ltd filed Critical 4Paradigm Beijing Technology Co Ltd
Priority to CN201910394017.2A priority Critical patent/CN110187874B/en
Publication of CN110187874A publication Critical patent/CN110187874A/en
Application granted granted Critical
Publication of CN110187874B publication Critical patent/CN110187874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

The embodiment of the invention provides a rule configuration method and a device executed in computer equipment, wherein the method comprises the following steps: displaying a configuration interface for configuring rules; acquiring rule elements set by a user through the configuration interface, wherein the rule elements are used for composing and/or connecting one or more conditions for composing a rule; based on the rule elements, corresponding rules are generated. Therefore, the user can conveniently configure the custom rule by setting the rule elements required by the rule generation through the configuration interface, and the rule configuration efficiency is improved.

Description

Rule configuration method and device executed in computer equipment
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a rule configuration method and device executed in computer equipment.
Background
With the rapid development of computer application technology, computer devices have become an indispensable tool in daily work and life for many people. In order to facilitate smooth expansion of services, a certain rule is often configured for each decision node in a service decision flow, so that a computer device can perform service decision according to the rule.
Currently, a developer manually writes codes according to different business decision requirements to configure rules, for example, the developer uses a structured query language (Structured Query Language, SQL) to write out complex SQL statements to implement corresponding business rules. On the one hand, the rule configuration mode needs that a user knows a certain computer programming language, and on the other hand, for non-technical personnel who do not know the computer programming language, such as business personnel, the rule configuration cannot be carried out, so that the configuration is very inconvenient. On the other hand, when configuring a relatively complex rule, the rule includes a large number of logical relationships between conditions, such as a logical relationship representing an "and" relationship, a logical relationship representing an "or" relationship, and the like, which results in a relatively large code amount to be written, and more time consumption, and further lower configuration efficiency.
Therefore, the method of writing code configuration rules at present has the problems of inconvenient configuration process and lower configuration efficiency.
Disclosure of Invention
In view of this, the embodiment of the invention provides a rule configuration method and device executed in a computer device, which can set rule elements required by a rule generation by a user through a configuration interface, can conveniently configure custom rules, and improves rule configuration efficiency.
In order to solve the technical problems, the embodiment of the invention provides the following technical scheme:
in a first aspect, an embodiment of the present invention provides a rule configuration method performed in a computer device, the method including: displaying a configuration interface for configuring rules; acquiring rule elements set by a user through the configuration interface, wherein the rule elements are used for composing and/or connecting one or more conditions for composing a rule; based on the rule elements, corresponding rules are generated.
In an embodiment of the present invention, the rule elements include at least one of variables, constants, brackets, arithmetic operators, relational operators, and logical operators.
In the embodiment of the present invention, the obtaining rule elements set by the user through the configuration interface includes: and acquiring rule elements set by a user through input operation and/or selection operation on the configuration interface.
In an embodiment of the invention, the configuration interface is presented as being capable of setting rule elements in a condition-by-condition manner.
In the embodiment of the present invention, the obtaining rule elements set by the user through the configuration interface includes: and acquiring rule elements respectively set by a user for each condition on the configuration interface, wherein each condition is displayed in the configuration interface in the form of a card.
In an embodiment of the present invention, the card includes: controls for setting the relational operator, controls for setting the rule elements to the left of the relational operator, and/or controls for setting the rule elements to the right of the relational operator.
In the embodiment of the invention, the control used for setting the relation operator is a selection control; and/or, the control used for setting the rule element positioned at the left side of the relation operator is a selection control; and/or the control used for setting the rule element positioned on the right side of the relation operator is an input control.
In an embodiment of the present invention, if the rule is composed of a plurality of conditions, the configuration interface further includes: controls for setting logical operators.
In the embodiment of the present invention, the obtaining rule elements set by the user through the configuration interface includes: responding to the operation of a user on the configuration interface for adding at least one condition, and displaying a card corresponding to each condition on the configuration interface; and responding to the input operation and/or the selection operation of the user on each control displayed in each card, acquiring rule elements which are set by the user for each condition and are used for composing each condition.
In the embodiment of the present invention, the obtaining rule elements set by the user through the configuration interface further includes: if the rule is composed of a plurality of conditions, responding to the combination operation of a user on a plurality of cards, displaying a composite card obtained by combining the plurality of cards on the configuration interface, and displaying a control for setting a logic operator on the composite card; and responding to the operation of the user on the control for setting the logical operator, and acquiring the logical operator set by the user as a rule element for connecting the plurality of conditions.
In the embodiment of the invention, the composite card is provided with a frame which wraps the combined card, and the control for setting the logic operator is positioned on the frame.
In the embodiment of the invention, the control used for setting the logical operator is a switch button, wherein the switch state of the switch button corresponds to the logical operator used for representing the AND relationship or the logical operator used for representing the OR relationship respectively; or, the control for setting the logical operator is a switch button, and the switch state of the switch button corresponds to the logical operator for representing the AND relationship, the logical operator for representing the OR relationship or the logical operator for representing the NOT relationship respectively.
In an embodiment of the present invention, the method further includes: when the composite card is in a selected state, responding to the operation of a user on the configuration interface for adding conditions, generating a new card, and displaying the new card and the combined card in the composite card on the composite card in parallel; and responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions.
In an embodiment of the present invention, the method further includes: when the composite card is in an unselected state, responding to the operation of a user on the configuration interface for adding conditions, generating a new card, and displaying the new card and the composite card on the configuration interface in parallel; responding to the combination operation of a user on the composite card and the new card, displaying a new composite card obtained by combining the composite card and the new card on the configuration interface, and displaying a control for setting a logic operator on the new composite card; responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions; and responding to the input operation and/or the selection operation of the control for setting the logical operator by the user, and acquiring the logical operator set by the user.
In an embodiment of the present invention, the method further includes: when the composite card is in an unselected state, deleting the combined card in the composite card in response to the deleting operation of a user on the combined card in the selected state; and deleting the condition corresponding to the combined card in the generated rule.
In an embodiment of the present invention, the method further includes: when the composite card is in a selected state, responding to the deleting operation of a user on the composite card, and deleting the composite card in the configuration interface; and deleting a plurality of conditions corresponding to the composite card in the generated rule.
In an embodiment of the present invention, the method further includes: and under the condition that the composite card is in a selected state, responding to the separation operation of a user on the composite card, and separating and displaying the combined card in the composite card in the configuration interface.
In an embodiment of the present invention, the generating, based on the rule element, a corresponding rule includes: generating an atomic expression corresponding to each condition according to the rule elements for composing each condition; the rule is determined based on the atomic expression.
In an embodiment of the present invention, the determining the rule based on the atomic expression includes: if the rule is composed of one condition, determining an atomic expression corresponding to the one condition as the rule.
In an embodiment of the present invention, the determining the rule based on the atomic expression includes: if the rule is composed of a plurality of conditions, generating a composite expression for representing the logic combination of the plurality of conditions according to a plurality of atomic expressions corresponding to the plurality of conditions and rule elements for connecting the plurality of conditions; the composite expression is determined as the rule.
In an embodiment of the present invention, the method further includes: and sending the rule to a service processing platform and/or a service decision node so that the service processing platform and/or the service decision node processes the service to be processed based on the rule.
In an embodiment of the present invention, the method further includes: acquiring service data corresponding to a target service to be judged; and judging the service data through the rule, and generating a decision result corresponding to the target service.
In the embodiment of the present invention, the obtaining service data corresponding to the target service to be determined includes: and if the rule is a rule for judging whether the user is a loanable user, and the target service to be judged is a request for applying for loan, which is input by the target user, and based on the request, acquiring the personal information of the target user from a service system or a database as the service data.
In the embodiment of the present invention, the determining the service data according to the rule and generating the decision result corresponding to the target service includes: matching the personal information of the target user with the rule; if the matching is successful, judging the target user as a loanable user, and generating a decision result for indicating a loan application through the target user; otherwise, generating a decision result for indicating refusal of the loan application of the target user.
In a second aspect, an embodiment of the present invention provides a rule configuration apparatus executed in a computer device, the apparatus including: the display unit is used for displaying a configuration interface for configuring rules; a first obtaining unit, configured to obtain rule elements set by a user through the configuration interface, where the rule elements are used to compose and/or connect one or more conditions used to compose a rule; and the rule generating unit is used for generating a corresponding rule based on the rule element.
In a third aspect, an embodiment of the present invention provides a computer readable storage medium, where the storage medium includes a stored program, where the program when executed controls a computer device where the storage medium is located to execute the steps of the rule configuration method executed in the computer device.
In a fourth aspect, an embodiment of the present invention provides a computer apparatus, including: at least one processor; and at least one memory, bus connected to the processor; the processor and the memory complete communication with each other through the bus; the processor is configured to invoke the program instructions in the memory to perform the steps of the rule configuration method described above as being performed in the computer device.
According to the rule configuration method and device executed in the computer equipment, when a user needs to configure the rule, a configuration interface for configuring the rule can be displayed to the user, so that the user can set rule elements through the configuration interface, wherein the rule elements are used for forming and/or connecting one or more conditions for forming the rule. Next, after acquiring the rule elements set by the user through the configuration interface, the computer device may generate corresponding rules according to the acquired rule elements. Therefore, the user does not need to understand a certain computer programming language, and can conveniently and fast configure the rules by only setting rule elements required by the rule generation through the configuration interface, so that the configuration is very convenient, and the rule configuration efficiency is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a rule configuration method executed in a computer device in an embodiment of the invention;
FIGS. 2-1 to 2-9 are schematic views of configuration interfaces according to embodiments of the present invention;
fig. 3 is a schematic structural diagram of a rule configuration apparatus executed in a computer device in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a rule configuration method executed in computer equipment. In practical application, the rule configuration method executed in the computer device can be applied to various occasions needing to conveniently and rapidly configure rules. For example, in the case where the user is not familiar with the computer programming language used to configure the rules, the rules need to be configured for a certain decision node, or the rules that the user needs to configure are complex.
Fig. 1 is a flowchart of a rule configuration method executed in a computer device according to an embodiment of the present invention, and referring to fig. 1, the rule configuration method executed in the computer device may include:
s101: displaying a configuration interface for configuring rules;
here, the above rule may be constituted by one or more conditions.
As an example, when a user desires to configure a rule, the computer device may present the configuration interface to the user so that the user may conveniently configure the desired rule through the configuration interface. It should be noted that, a person skilled in the art may set a display manner of the configuration interface according to an actual situation, where the display manner of the configuration interface is not specifically limited in the embodiment of the present invention.
In practical applications, a more complex rule is often formed by a plurality of conditions and includes a logical relationship between the plurality of conditions, so, in order to facilitate a user to more conveniently set the more complex rule and improve the efficiency of configuring the rule by the user, the configuration interface may be illustrated as being capable of setting rule elements in a condition-by-condition manner, for example.
In other embodiments of the invention, to implement a configuration interface that is illustrated as being capable of setting rule elements in a condition-by-condition manner, one or more conditions for composing a rule may be presented in the configuration interface in the form of one or more cards, as examples. When the user needs to configure the rule, the user can set corresponding rule elements for each condition respectively by operating the card on the configuration interface. Of course, in practical application, the configuration interface may also be displayed in other display modes capable of setting rule elements in a condition-by-condition manner. Here, the embodiment of the present invention is not particularly limited to an implementation in which the configuration interface is shown as being capable of setting rule elements in a condition-by-condition manner.
In practical application, the types of rule elements required to be set by the user are different according to the different numbers of conditions for composing the rule, and then the card may exist, but is not limited to, the following two implementation cases.
In the first case, if a rule is composed of one condition, a user needs to configure rule elements for composing one condition through a card. At this time, the card may include a control capable of setting a rule element for composing one condition.
As an example, when a rule element for composing a condition is implemented by one or more of a relationship operator, a rule element located on the left side of the relationship operator, a rule element located on the right side of the relationship operator, in order to facilitate the user to set the rule element, in the implementation, the card may include: one or more combinations of controls for setting the relational operator, controls for setting the rule elements to the left of the relational operator, controls for setting the rule elements to the right of the relational operator.
In practical applications, the control for setting the relational operator may be implemented by a selection control capable of displaying a selection list for selecting the relational operator, or may be implemented by an input control capable of inputting the relational operator, or may be implemented by other types of operable controls capable of setting the relational operator, where embodiments of the present invention are not limited specifically.
In practical applications, the control for setting the rule element located on the left/right side of the relational operator may be implemented by a selection control capable of selecting the rule element located on the left/right side of the relational operator, or may be implemented by an input control capable of inputting the rule element located on the left/right side of the relational operator, or may be implemented by other types of operable controls capable of setting the rule element located on the left/right side of the relational operator, where embodiments of the present invention are not limited specifically.
Illustratively, in the above card, the control for setting the relational operator is a selection control; and/or a control used for setting a rule element positioned at the left side of the relation operator as a selection control; and/or a control for setting a rule element positioned on the right side of the relation operator is an input control.
The candidate variables in the selection control described above as selectable rule elements may be fields imported in advance from a certain table, i.e., fields in which rule setting is possible, for example. For example, if the control for setting the relationship operator is a selection control, the selectable candidate variables may be fields related to "equal" relationships, fields related to "unequal" relationships, fields related to "greater than" relationships, fields related to "less than" relationships, and so forth.
In the second case, if the rule is composed of a plurality of conditions, the user needs to configure rule elements for connecting the plurality of conditions by the card in addition to rule elements for composing the plurality of conditions by the card. At this time, the card may include a control capable of setting a rule element for connecting a plurality of conditions, in addition to a control capable of setting a rule element for composing each condition.
As an example, when the rule elements for connecting the plurality of conditions are implemented by logical operators, in order to facilitate the user to set the rule elements for connecting the plurality of conditions, the configuration interface may further include: controls for setting logical operators.
In practical applications, the control for setting a logical operator may be implemented by a selection control capable of displaying a selection list for selecting a logical operator, or may be implemented by an input control capable of inputting a logical operator, or of course, may be implemented by another type of operable control capable of setting a logical operator, for example, the control for setting a logical operator may be a switch button, where a switch state of the switch button may correspond to a logical operator for characterizing an and relationship or a logical operator for characterizing an or relationship, respectively. For another example, the control for setting a logical operator may be a toggle button whose toggle state corresponds to a logical operator for characterizing an and relationship, a logical operator for characterizing an or relationship, or a logical operator for characterizing a not relationship, respectively. Here, the embodiment of the present invention is not particularly limited.
Of course, the implementation of the card may be other than the two cases listed above, and the embodiment of the present invention is not specifically limited herein.
S102: acquiring rule elements set by a user through a configuration interface;
wherein the rule elements are used to compose and/or connect one or more conditions used to compose the rule.
As an example, when a user needs to configure a rule, after the computer device presents the configuration interface to the user, the user may configure a rule element for generating the rule through the configuration interface, so that the computer device generates a corresponding rule according to the rule element.
In practical application, according to different occasions where the user needs to conveniently and rapidly configure the rules, rule elements set by the user through the configuration interface are different. Illustratively, when a rule that a user needs to configure is made up of one condition, the user can set rule elements for composing one condition through a configuration interface; when the rule that the user needs to configure is made up of a plurality of conditions, the user can set a rule element for composing each condition and a rule element for connecting the plurality of conditions through the configuration interface; when a user needs to change a configured rule, the user may set rule elements for composing one or more conditions through the configuration interface, or the user may set rule elements for connecting a plurality of conditions through the configuration interface. Here, the embodiment of the present invention is not particularly limited.
In practical applications, the rule elements may be variables, constants, and operators such as relational operators and logical operators, and of course, other elements that may perform rule setting, such as brackets, may be used. Here, the embodiment of the present invention is not particularly limited.
As an example, the rule element may include at least one of a variable, a constant, a bracket, an arithmetic operator, a relational operator, and a logical operator. Further, rule elements for composing one or more conditions may be implemented by one or more combinations of variables, constants, brackets, arithmetic operators, relational operators, and rule elements for concatenating a plurality of conditions may be implemented by logical operators.
S103: based on the rule elements, a corresponding rule is generated.
Specifically, after the computer device obtains the rule element through the configuration interface, the computer device may generate a corresponding rule according to the rule element.
In practical application, the rule may be composed of one condition or multiple conditions according to the complexity of the rule.
In the embodiment of the present invention, in order to generate the corresponding rule according to the rule element configured by the user through the configuration interface, the step S103 may include the following steps 1031 to 1032:
Step 1031: generating an atomic expression corresponding to each condition according to the rule elements for composing each condition;
step 1032: rules are determined based on the atomic expressions.
In practical applications, the above step 1032 may be implemented by, but not limited to, the following two methods according to the number of conditions constituting the rule.
In a first implementation, if the rule is composed of a condition, the step 1032 may include, as an example: an atomic expression corresponding to a condition is determined as a rule.
In practical applications, if the rule is simpler, the rule may be composed of a condition, and thus, the rule may be an atomic expression.
For example, assume that rule elements set by a user through a configuration interface for composing a condition include: the method comprises the steps of a relation operator, a rule element positioned on the left side of the relation operator and a rule element positioned on the right side of the relation operator, wherein the relation operator is ">", the rule element positioned on the left side of the relation operator is "age", the rule element positioned on the right side of the relation operator is "18 years", and then one atomic expression generated according to the rule element is "age >18 years", so that a rule configured by a user can be obtained, namely "age >18 years".
In a second implementation, if the rule is made up of a plurality of conditions, then, by way of example, step 1032 may include: generating a composite expression for representing the logic combination of the plurality of conditions according to the plurality of atomic expressions corresponding to the plurality of conditions and the rule elements for connecting the plurality of conditions; the composite expression is determined as a rule.
Here, the above atomic expression may characterize one condition, including only rule elements for composing one condition; the above composite expression may characterize a combination of conditions, including not only rule elements for composing the conditions, but also rule elements for concatenating the conditions. For example, assume that a rule element for connecting multiple conditions is implemented by a logical operator, which may be, for example, AND, OR, or the like. Then, the above-described atomic expression may refer to an expression that does not contain a logical operator, such as "age >30 years", "graduation school is school a", etc., and correspondingly, the above-described compound expression may refer to an expression that contains a logical operator, such as "[ graduation school is school a ] or [ graduation school is school B ]", "[ age >30 years ] and [ graduation school is school a or graduation school is school B ]", etc.
In practical application, if the rule that the user needs to configure is complex, the rule may be composed of a plurality of conditions, and thus, the rule may be a composite expression that is obtained by combining a plurality of atomic expressions corresponding to the plurality of conditions. As an example, the compound expression may be a logical combination of at least two atomic expressions, such as [ graduation school is school a ] or [ graduation school is school B ] ", or may be a logical combination of at least two compound expressions, such as" [ age >30 years old and age <50 years old ] and [ graduation school is school a or graduation school is school B ] "of course, or may be other combinations, such as a logical combination of at least one atomic expression and at least one compound expression, such as" [ age >30 years old ] and [ graduation school is school a or graduation school is school B ] ", or the like. Here, the embodiment of the present invention is not particularly limited.
The process of rule configuration performed in the computer device is thus completed.
As can be seen from the foregoing, in the rule configuration method performed in the computer device according to the embodiment of the present invention, when a user needs to configure a rule, a configuration interface for configuring the rule may be presented to the user, so that the user may set rule elements through the configuration interface, where the rule elements are used to compose and/or connect one or more conditions for composing the rule. Next, after acquiring the rule elements set by the user through the configuration interface, the computer device may generate corresponding rules according to the acquired rule elements. Therefore, the user does not need to understand a certain computer programming language, and can conveniently and fast configure the rules by only setting rule elements required by the rule generation through the configuration interface, so that the configuration is very convenient, and the rule configuration efficiency is improved.
Based on the foregoing embodiments, in another embodiment of the present invention, the types of operations performed by the user to set the rule elements through the configuration interface are different according to the different types of the operable controls presented to the user on the configuration interface for setting the rule elements. Further, the above S102 may exist and is not limited to include the following implementations depending on the type of operation employed by the user setting rule element.
In one manner, the operable control for setting the rule element may be implemented by an input control, and at this time, the user may set the rule element through an input operation on the configuration interface, and then S102 may include: acquiring rule elements set by a user through input operation on a configuration interface;
in a second manner, the operable control for setting the rule element may also be implemented by a selection control, where the user may set the rule element through a selection operation on the configuration interface, and then S102 may include: and acquiring rule elements set by a user through selection operation on a configuration interface.
Of course, in addition to the implementations listed above, the S102 may be other implementations, for example, if the operable control for setting the rule element is implemented by a combination of an input control and a selection control, the S102 may include: and acquiring rule elements set by a user through input operation and selection operation on a configuration interface. Here, the operation type of the rule element set by the user in the embodiment of the present invention is not particularly limited.
Based on the foregoing embodiments, the embodiments of the present invention further provide a rule configuration method executed in a computer device, which may be applied in the following scenarios: to facilitate a user to conveniently set more complex rules through a configuration interface and to improve the efficiency of the user's configuration of rules, the configuration interface may be presented to enable rule elements to be set in a condition-by-condition manner.
Then, in the implementation process, the step S102 may include: and acquiring rule elements respectively set by a user for each condition on the configuration interface, wherein each condition is displayed in the configuration interface in the form of a card.
The following describes in detail how rules are set up in card form through a configuration interface with specific examples.
First, a description will be given of how rule elements for composing one or more conditions are set through a configuration interface.
In the embodiment of the present invention, the S102 may include: responding to the operation of a user on a configuration interface for adding at least one condition, and displaying a card corresponding to each condition on the configuration interface; and responding to the input operation and/or the selection operation of the user on each control displayed in each card, acquiring rule elements which are set by the user for each condition and are used for composing each condition.
As an example, referring to fig. 2-1, when the user wants to configure the rule, the user may perform an operation for adding at least one condition on the configuration interface shown in fig. 2-1, for example, when the user needs to add one condition, the user may click the one-time button 201, so that the configuration interface shown in fig. 2-2 may be obtained, and the card 202a corresponding to one condition is displayed on the configuration interface; alternatively, when the user needs to add two conditions, the user may click the button 201 twice, so that a configuration interface as shown in fig. 2-3 may be obtained, and the card 202a and the card 202b corresponding to the two conditions are displayed on the configuration interface. Next, in order to configure the corresponding rule elements for each condition, the user may perform a setting operation corresponding to the controls displayed in the cards 202a, 202b, and the like on the configuration interface, for example, the user may perform an input operation and/or a selection operation on each control in the cards. Thus, rule elements set by the user for each condition to compose each condition can be acquired.
Next, description will be made on how to set a rule element for connecting a plurality of conditions through a configuration interface.
In the embodiment of the present invention, the step S102 may further include: if the rule is composed of a plurality of conditions, responding to the combination operation of a user on a plurality of cards, displaying a composite card obtained by combining the plurality of cards on a configuration interface, and displaying a control for setting a logic operator on the composite card; in response to a user operation on a control for setting a logical operator, the logical operator set by the user is acquired as a rule element for connecting a plurality of conditions.
Here, the composite card is obtained by combining at least two different cards, and the type of the combined card constituting the composite card may be a base card or a composite card.
As an example, to facilitate a user setting a rule element for connecting a plurality of conditions, the above-described composite card has a frame surrounding the combined card, and a control for setting a logical operator is located on the frame.
In practical applications, when a rule that a user needs to configure is a logical combination of a plurality of conditions, the user needs to configure rule elements for connecting the plurality of conditions. Then, assuming that the rule elements for connecting the plurality of conditions are implemented by the logical operator, the user can set the logical operator capable of characterizing the combination relationship of the plurality of conditions by performing the combination operation on the cards corresponding to the plurality of conditions. As an example, referring to fig. 2-3, both card 202a and card 202b are in an unselected state. Next, the user can perform a combination operation on the card 202a and the card 202b, for example, the user can simultaneously select the card 202a and the card 202b and click the button 203. Then, in response to the user's combining operation between the cards 202a and 202b, a configuration interface as shown in fig. 2-4 is obtained, at this time, the composite card 202 obtained by combining the cards 202a and 202b is displayed on the configuration interface, and the control 202c for setting the logical operator is displayed on the composite card 202. Thus, the user can set the combination relationship for connecting the card 202a and the card 202b by performing a setting operation, such as an input operation or a selection operation, on the control 202c. Thus, the control 202c can obtain the logical operator set by the user and used for connecting the two conditions corresponding to the card 202a and the card 202 b.
Finally, a description is given of how the rule is modified by the configuration interface.
In practical application, the following methods can be used but not limited to, through configuration interfaces to implement modification rules according to different operations performed on the card by the user.
In the first method, the modification of the rule by increasing the number of conditions for constructing the rule is realized by adding the combined card to the composite card. In an embodiment of the present invention, the method may further include: when the composite card is in a selected state, responding to the operation of a user on a configuration interface for adding conditions, generating a new card, and displaying the new card and the combined card in the composite card in parallel on the composite card; and responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions.
As an example, in configuring rules, referring to fig. 2-4, a composite card 202 is composed of combined cards: the card 202a and the card 202b are combined, and at this time, the composite card 202 is in an unselected state. Then, after the user selects the composite card 202, a configuration interface as shown in fig. 2-5 is available, and at this time, the composite card 202 is in the selected state. Next, the user performs an operation on the configuration interface that can be used to add the condition, for example, the user can click on the button 201 on the configuration interface. Then, in response to the user's operation for adding conditions to the configuration interface, the configuration interface shown in fig. 2-6 is obtained when the composite card 202 is in the selected state, and the new card 204 is generated and displayed on the composite card 202 in parallel with the cards 202a and 202 b. In this way, the user can add rule elements for composing new conditions by performing a setting operation on a new card. In this way, modification of the rules is achieved.
Here, according to the difference of the types of the operable controls for setting the rule elements on the card, in order to set the new rule elements by the new card, the setting operation of the new card by the user may be an input operation or a selection operation, and of course, may be other operations, such as a combination of the input operation and the selection operation, etc., and the embodiment of the present invention is not limited specifically herein.
And secondly, modifying the rule by increasing the number of conditions for constructing the rule by adding a new card to the outside of the composite card and combining the composite card and the new card. In an embodiment of the present invention, the method may further include: when the composite card is in an unselected state, responding to the operation of a user on a configuration interface for adding conditions, generating a new card, and displaying the new card and the composite card in parallel on the configuration interface; responding to the combination operation of the user on the composite card and the new card, displaying a new composite card obtained by combining the composite card and the new card on a configuration interface, and displaying a control for setting a logic operator on the new composite card; responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions; responsive to an input operation and/or a selection operation of a control for setting a logical operator by a user, the logical operator set by the user is acquired.
As an example, in configuring rules, referring to fig. 2-4, a composite card 202 is composed of combined cards: the card 202a and the card 202b are combined, and at this time, the composite card 202 is in an unselected state. The user may then perform an operation for adding a condition on the configuration interface, for example, the user may click on the button 201 on the configuration interface. Then, in response to the user's operation for adding a condition on the configuration interface, the configuration interface as shown in fig. 2-7 may be obtained with the composite card 202 in the unselected state, and at this time, the generated new card 205 is displayed in parallel with the composite card 202 on the configuration interface. Next, the user may perform a combination operation between the composite card 202 and the new card 205, for example, the user may simultaneously select the composite card 202 and the new card 205 and click the button 203. Then, in response to the user's combining operation between the composite card 202 and the new card 205, a configuration interface as shown in fig. 2-8 is obtained, at this time, a new composite card 206 obtained by combining the composite card 202 and the new card 205 is displayed on the configuration interface, and a control 207 for setting a logical operator is displayed on the new composite card 206. In this way, the user can add rule elements for composing new conditions by performing a setting operation on the new card 205, and can set a combination relationship between the composite card and the new card by operating the control 207. In this way, modification of the rules is achieved.
In the third method, by deleting the combined cards in the composite card, the rule is modified by reducing the number of conditions for constructing the rule. In an embodiment of the present invention, the method may further include: when the composite card is in an unselected state, deleting the combined card in the composite card in response to the deleting operation of the user on the combined card in the selected state; conditions corresponding to the combined card are deleted in the generated rule.
As an example, in configuring rules, referring to fig. 2-4, a composite card 202 is composed of combined cards: the card 202a and the card 202b are combined, and at this time, the composite card 202 is in an unselected state. Then, the user may select the card 202b and perform a delete operation on it, for example, selecting the card 202b from the composite card 202 and pressing a preset shortcut key such as delete key, backspace key, or the like. Then, in response to the user deleting the card 202b in the selected state in the composite card 202, a configuration interface as shown in fig. 2-2 is obtained, where the cards are combined on the composite card 202: card 202b has been deleted. Here, since the composite card 202 is originally obtained by combining two cards, that is, the card 202a and the card 202b, the composite card 202 is changed to the normal card 202a at this time. Further, the condition corresponding to the combined card 208 can be deleted from the generated rule, and thus, modification of the rule is realized.
As an example, in configuring rules, as shown in fig. 2-8, a new composite card 206 is composed of combined cards: the composite card 202 and the new card 205 are combined, and at this time, the new composite card 206 is in an unselected state. Then, the user may select the composite card 202 and perform a delete operation on the composite card 202, for example, the user may select the composite card 202 and press a preset shortcut key such as a delete key, a backspace key, etc., and then, in response to the delete operation of the composite card 202 by the user, a configuration interface similar to that shown in fig. 2-2 may be obtained, where the composite card 202 is deleted on the configuration interface similar to that shown in fig. 2-2, and only the new card 205 is displayed; alternatively, the user may also select the new card 205 and perform a delete operation on the new card 205, for example, the user may select the new card 205 and press a preset shortcut key, such as a delete key, a backspace key, etc., so that, in response to the delete operation of the new card 205 by the user, a configuration interface similar to that shown in fig. 2-4 may be obtained, where the new card 205 is deleted, and only the composite card 202 is displayed on the configuration interface similar to that shown in fig. 2-4, so that modification of the rule is implemented.
In the fourth method, by deleting the composite card, the rule is modified by reducing the number of conditions for constructing the rule. In an embodiment of the present invention, the method may further include: when the composite card is in a selected state, deleting the composite card in the configuration interface in response to the deleting operation of the user on the composite card; and deleting a plurality of conditions corresponding to the composite card in the generated rule.
As an example, in configuring rules, referring to fig. 2-4, the composite card 202 is now in an unselected state. Then, the user may select the composite card 202 and perform a delete operation on the composite card 202, for example, pressing a preset shortcut key such as a delete key, a backspace key, or the like. Then, in response to the user deleting the composite card 202, a configuration interface as shown in fig. 2-1 may be obtained, at which point the composite card 202 may be deleted on the configuration interface. In this way, modification of the rules is achieved.
And fifthly, modifying the rule by canceling the combination relation among different conditions in a mode of separating the composite cards. In an embodiment of the present invention, the method may further include: and under the condition that the composite card is in a selected state, responding to the separation operation of the user on the composite card, and separating and displaying the combined card in the composite card in a configuration interface. Accordingly, the logical relationships between the combined cards are deleted from the rules.
In practical application, according to the difference of the layers of the combination relationship contained in the composite card, the user performs the separation operation on the composite card, and the implementation mode of separating and displaying the combined card in the composite card in the configuration interface exists and is not limited to the following two cases.
In the first case, when the composite card includes a layer of composition relationship, the user performs a separation operation on the composite card, and the layer of composition relationship is cancelled, so that the combined cards, which are wrapped in the composite card and are connected by the layer of composition relationship, are all separately displayed in the configuration interface.
As an example, referring to fig. 2-4, the composite card 202 is composed of combined cards: the cards 202a and 202b are combined and the composite card 202 contains only one layer of the combined relationship, at which time the composite card 202 is in an unselected state. The user may then select the composite card 202 and perform a separation operation on the composite card 202, e.g., the user may click the button 208. Then, in response to a user separating operation of the composite card 202, the combined card: the combination of cards 202a and 202b is canceled so that cards 202a and 202b can be displayed separately in the configuration interface, thereby providing the configuration interface shown in fig. 2-3. In this way, modification of the rules is achieved.
In the second case, when the composite card includes a plurality of layer combination relationships, the user performs a separation operation on the composite card, and only the outermost layer combination relationship in the plurality of layer combination relationships is cancelled, so that the combined cards connected by the outermost layer combination relationship wrapped in the composite card are displayed in the configuration interface in a separated manner, and the combined cards connected by other layer combination relationships in the plurality of layer combination relationships are still in a combined state.
As an example, referring to fig. 2-8, a new composite card 206 is composed of the combined cards: the composite card 202 and the new card 205 are combined, the combination relationship connecting the composite card 202 and the new card 205 is the outermost combination relationship, and the composite card 202 is composed of the combined cards: the combination of the cards 202a and 202b results in the combination of the connecting card 202a and the card 202b being an inner layer combination, at which time the new composite card 206 is in an unselected state. The user may then select a new composite card 206 and perform a disassociation operation on the new composite card 206, e.g., the user may click on button 208. Then, in response to the separation operation of the user on the compounded card 206, the combination relationship between the compounded card 202 and the new card 205 is cancelled, so that the compounded card 202 and the new card 205 can be separately displayed in the configuration interface, at this time, the combination relationship between the card 202a and the card 202b is not cancelled, and the card 202a and the card 202b are still in the combined state, so that the configuration interface as shown in fig. 2-7 can be obtained. In this way, modification of the rules is achieved.
The method six is to modify rules by modifying the combination relation among different cards in a mode of operating the control for setting logical operators displayed on the composite card. In an embodiment of the present invention, the method may further include: and under the condition that the composite card is in the selected state, responding to the operation of the user on the control which is displayed on the composite card and is used for setting the logic operator, and acquiring the new logic operator set by the user.
As an example, in the process of configuring the rule, referring to fig. 2-4, a control 202c for setting a logical operator is displayed on the composite card 202, at this time, the composite card 202 is in an unselected state, and a new logical operator set by the user is shown in the control 202 c: a field "AND" representing a logical relationship with "AND". The user may then operate control 202c, e.g., the user may click on control 202c. Then, in response to the user's operation on the control 202c, a configuration interface as shown in fig. 2-9 may be obtained, where the control 202c has a new logical operator set by the user displayed therein: a field "OR" representing a logical relationship with "and". In this way, modification of the rules is achieved.
Of course, other implementation methods may be used to set rules besides the six implementation methods listed above, for example, a combination of the above methods, and embodiments of the present invention are not limited in detail herein.
Based on the foregoing embodiments, the embodiments of the present invention further provide a rule configuration method executed in a computer device, which may be applied in the following scenarios: after the computer device generates the corresponding rule according to the rule elements set by the user through the configuration interface, the rule may be used for business processing.
In practical application, the following method can be used, but is not limited to, to implement the process of performing service processing by the generated rule according to whether the device for generating the rule and the module for performing service device by the rule are logically or physically combined.
In the first implementation manner, the computer device for generating the rule is physically separated from the service processing platform and/or the service decision node for performing service processing through the rule, so that in order to facilitate the service processing platform and/or the service decision node to perform service processing according to the rule configured by the user, after the computer device generates the corresponding rule according to the rule element set by the user through the configuration interface, the computer device is required to send the generated rule to the service processing platform and/or the service decision node. Then, in the embodiment of the present invention, after S103, the method may further include step 104: and sending the rule to the service processing platform and/or the service decision node so that the service processing platform and/or the service decision node processes the service to be processed based on the rule.
In the second implementation manner, the computer device for generating the rule is physically integrated with the service processing platform and/or the service decision node for performing service processing through the rule, so that after the computer device generates the corresponding rule according to the rule element set by the user through the configuration interface, the service processing can be performed directly according to the rule configured by the user. Then, in the embodiment of the present invention, after S103, the above method may further include the following steps 105 to 106:
step 105: acquiring service data corresponding to a target service to be judged;
step 106: and judging the service data through the rules, and generating a decision result corresponding to the target service.
As an example, if the target business is a loan application, the step 105 may include: when the rule is a rule for determining whether the user is a loanable user, and the target service to be determined is a request for making a loan application input by the target user, based on the request, personal information of the target user is acquired from the service system or database as service data.
As an example, if the target business is a loan application, the step 106 may include: matching the personal information of the target user with the rule; if the matching is successful, judging the target user as a loanable user, and generating a decision result for indicating a loan application through the target user; otherwise, a decision result indicating rejection of the target user's loan application is generated.
For example, assume that the rule is "age >30 years old and age <50 years old", and that the personal information of the target user includes: age XX years. If "XX >30" and "XX <50", then the personal information indicating the target user is successfully matched with the rules, at which point the target user may be determined to be a loanable user and a decision result indicating a loan application by the target user may be generated. Otherwise, the personal information representing the target user fails to match with the rule, at this time, it can be determined that the target user is a non-loanable user, and a decision result for indicating to reject the loan application of the target user is generated.
Based on the same inventive concept, as an implementation of the above method, an embodiment of the present invention provides a rule configuration apparatus executed in a computer device.
Fig. 3 is a schematic structural diagram of a rule configuration apparatus executed in a computer device in an embodiment of the present invention, and referring to fig. 3, the rule configuration apparatus 30 may include: a display unit 301, configured to display a configuration interface for configuring a rule; a first obtaining unit 302, configured to obtain rule elements set by a user through a configuration interface, where the rule elements are used to compose and/or connect one or more conditions used to compose a rule; the rule generating unit 303 is configured to generate a corresponding rule based on the rule element.
In an embodiment of the present invention, the rule element includes at least one of a variable, a constant, a bracket, an arithmetic operator, a relational operator, and a logical operator.
In the embodiment of the present invention, the first obtaining unit is configured to obtain rule elements set by a user through an input operation and/or a selection operation on a configuration interface.
In the embodiment of the present invention, the configuration interface is shown as being capable of setting rule elements in a condition-by-condition manner.
In an embodiment of the present invention, the first obtaining unit is configured to obtain rule elements set by a user for each condition on a configuration interface, where each condition is presented in a card form in the configuration interface.
In an embodiment of the present invention, the card includes: controls for setting the relational operator, controls for setting the rule elements to the left of the relational operator, and/or controls for setting the rule elements to the right of the relational operator.
In the embodiment of the invention, the control used for setting the relation operator is a selection control; and/or, the control used for setting the rule element positioned at the left side of the relation operator is a selection control; and/or, the control used for setting the rule element positioned on the right side of the relation operator is an input control.
In an embodiment of the present invention, if the rule is composed of a plurality of conditions, the configuration interface further includes: controls for setting logical operators.
In the embodiment of the present invention, the first obtaining unit is configured to respond to an operation of adding at least one condition on a configuration interface by a user, and display, on the configuration interface, a card corresponding to each condition; and responding to the input operation and/or the selection operation of the user on each control displayed in each card, acquiring rule elements which are set by the user for each condition and are used for composing each condition.
In the embodiment of the present invention, if the rule is formed by a plurality of conditions, the first obtaining unit is configured to respond to a combination operation of a user on a plurality of cards, display a composite card obtained by combining the plurality of cards on a configuration interface, and display a control for setting a logical operator on the composite card; in response to a user operation on a control for setting a logical operator, the logical operator set by the user is acquired as a rule element for connecting a plurality of conditions.
In the embodiment of the invention, the composite card is provided with a frame for wrapping the combined card, and the control for setting the logical operator is positioned on the frame.
In the embodiment of the present invention, the control for setting a logical operator is a switch button, where a switch state of the switch button corresponds to a logical operator for representing an and relationship or a logical operator for representing an or relationship, respectively; or, the control for setting the logical operator is a switch button, and the switch state of the switch button corresponds to the logical operator for representing the AND relationship, the logical operator for representing the OR relationship or the logical operator for representing the NOT relationship respectively.
In an embodiment of the present invention, the rule configuration apparatus may further include: the first card adding unit is used for responding to the operation of a user on the configuration interface for adding conditions when the composite card is in a selected state, generating a new card and displaying the new card and the combined card in the composite card in parallel on the composite card; a first obtaining unit for obtaining rule elements set by the user for composing new conditions in response to a setting operation of the new card by the user.
In an embodiment of the present invention, the rule configuration apparatus may further include: the second card adding unit is used for responding to the operation of a user on the configuration interface for adding conditions when the composite card is in an unselected state, generating a new card and displaying the new card and the composite card on the configuration interface in parallel; the combined display unit is used for responding to the combined operation of the user on the composite card and the new card, displaying the new composite card obtained by combining the composite card and the new card on the configuration interface, and displaying a control for setting a logic operator on the new composite card; a second obtaining unit for obtaining rule elements set by the user for composing new conditions in response to a setting operation of the new card by the user; and the second acquisition unit is used for responding to the input operation and/or the selection operation of the control for setting the logical operator by the user and acquiring the logical operator set by the user.
In an embodiment of the present invention, the rule configuration apparatus may further include: the first card deleting unit is used for responding to the deleting operation of the user on the combined card in the selected state in the composite card when the composite card is in the unselected state, and deleting the combined card on the composite card; and the first condition deleting unit is used for deleting the condition corresponding to the combined card in the generated rule.
In an embodiment of the present invention, the rule configuration apparatus may further include: the second card deleting unit is used for responding to the deleting operation of the user on the composite card when the composite card is in the selected state, and deleting the composite card in the configuration interface; and the second condition deleting unit is used for deleting a plurality of conditions corresponding to the composite card in the generated rule.
In an embodiment of the present invention, the rule configuration apparatus may further include: and the card separation unit is used for responding to the separation operation of the user on the composite card when the composite card is in the selected state, and separating and displaying the combined card in the composite card in the configuration interface.
In an embodiment of the present invention, the rule generating unit is configured to generate an atomic expression corresponding to each condition according to rule elements for composing each condition; rules are determined based on the atomic expressions.
In an embodiment of the present invention, the rule generating unit is configured to determine, as the rule, an atomic expression corresponding to one condition if the rule is formed by one condition.
In an embodiment of the present invention, the rule generating unit is configured to generate, if the rule is configured by a plurality of conditions, a composite expression for characterizing a logical combination of the plurality of conditions according to a plurality of atomic expressions corresponding to the plurality of conditions and rule elements for connecting the plurality of conditions; the composite expression is determined as a rule.
In an embodiment of the present invention, the rule configuration apparatus may further include: and the sending unit is used for sending the rule to the service processing platform and/or the service decision node so that the service processing platform and/or the service decision node processes the service to be processed based on the rule.
In an embodiment of the present invention, the rule configuration apparatus may further include: the third acquisition unit is used for acquiring service data corresponding to the target service to be judged; and the decision unit is used for judging the service data through the rule and generating a decision result corresponding to the target service.
In the embodiment of the present invention, the third obtaining unit is configured to obtain, if the rule is a rule for determining whether the user is a loanable user, and the target service to be determined is a request for applying for a loan, which is input by the target user, and obtain, based on the request, personal information of the target user from the service system or the database as service data.
In the embodiment of the invention, the decision unit is used for matching the personal information of the target user with the rule; if the matching is successful, judging the target user as a loanable user, and generating a decision result for indicating a loan application through the target user; otherwise, a decision result indicating rejection of the target user's loan application is generated.
Based on the same inventive concept, the embodiment of the invention provides a computer device. Fig. 4 is a schematic structural diagram of a computer device in an embodiment of the present invention, and referring to fig. 4, the computer device 40 includes: at least one processor 401; and at least one memory 402, bus 403 connected to processor 401; wherein, the processor 401 and the memory 402 complete the communication with each other through the bus 403; the processor 401 is operative to invoke program instructions in the memory 402 to perform the steps of the rule configuration method performed in the computer device in one or more of the embodiments described above.
For example, the computer device described in the embodiments of the present invention may be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm computer, a portable computer, or a fixed terminal such as a smart television, a desktop computer, a server, or the like. Here, the embodiment of the present invention is not particularly limited.
Accordingly, based on the same inventive concept, the embodiments of the present invention also provide a processor for running a program, wherein the program runs to execute the steps of the rule configuration method executed in the computer device in one or more embodiments described above.
The processor may be implemented by a central processing unit (Central Processing Unit, CPU), a microprocessor (Micro Processor Unit, MPU), a digital signal processor (Digital Signal Processor, DSP), or a field programmable gate array (Field Programmable Gate Array, FPGA), or the like. The Memory may include non-volatile Memory in a computer readable medium, random access Memory (Random Access Memory, RAM) and/or non-volatile Memory, etc., such as Read Only Memory (ROM) or Flash Memory (Flash RAM), the Memory including at least one Memory chip.
It should be noted that, in the embodiment of the present invention, if the rule configuration method performed in the computer device in one or more embodiments described above is implemented in the form of a software functional module, and sold or used as a separate product, the rule configuration method may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the methods of the embodiments of the present invention.
Accordingly, based on the same inventive concept, an embodiment of the present invention further provides a computer readable storage medium, where the computer readable storage medium includes a stored program, where when the program runs, the computer device where the storage medium is controlled to execute the steps of the rule configuration method executed in the computer device in one or more embodiments described above.
It should be noted here that: the description of the foregoing apparatus, computer device, or computer readable storage medium embodiment is similar to the description of the foregoing method embodiment, and has similar advantages as the method embodiment, and for the technical details not disclosed in the apparatus, computer device, or computer readable storage medium embodiment of the present invention, please refer to the description of the method embodiment of the present invention, for convenience of reading, details in the foregoing method embodiment are not described in detail one by one, but it should be clear that the foregoing apparatus, computer device, or computer readable storage medium can correspondingly implement all the details in the foregoing method embodiment.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM (Compact Disc Read-Only Memory), optical storage, etc.) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include non-volatile memory in a computer-readable medium, RAM and/or non-volatile memory, etc., such as ROM or Flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. The computer readable storage medium may be a ROM, a programmable read-Only Memory (PROM), an erasable programmable read-Only Memory (EPROM), an electrically erasable programmable read-Only Memory (EEPROM), a magnetic random access Memory (Ferromagnetic Random Access Memory, FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a read-Only optical disk; but also flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information which can be accessed by a computing device; but may also be various electronic devices such as mobile phones, computers, tablet devices, personal digital assistants, etc., that include one or any combination of the above-mentioned memories. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The foregoing is merely exemplary of the present invention and is not intended to limit the present invention. Various modifications and variations of the present invention will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are to be included in the scope of the claims of the present invention.

Claims (22)

1. A rule configuration method implemented in a computer device, the method comprising:
displaying a configuration interface for configuring rules;
acquiring rule elements set by a user through the configuration interface, wherein the rule elements are used for composing and/or connecting one or more conditions for composing a rule;
generating a corresponding rule based on the rule element;
the obtaining rule elements set by the user through the configuration interface comprises the following steps:
acquiring rule elements set by a user through input operation and/or selection operation on the configuration interface, wherein the configuration interface is displayed so as to be capable of setting the rule elements in a condition-by-condition manner; the obtaining rule elements set by the user through the configuration interface comprises the following steps: acquiring rule elements respectively set by a user for each condition on the configuration interface, wherein each condition is displayed in the configuration interface in the form of a card; the obtaining rule elements set by the user through the configuration interface comprises the following steps: responding to the operation of a user on the configuration interface for adding at least one condition, and displaying a card corresponding to each condition on the configuration interface; responding to input operation and/or selection operation of a user on each control displayed in each card, and acquiring rule elements which are set by the user for each condition and are used for composing each condition;
Further comprises:
if the rule is composed of a plurality of conditions, responding to the combination operation of a user on a plurality of cards, displaying a composite card obtained by combining the plurality of cards on the configuration interface, and displaying a control for setting a logic operator on the composite card;
and responding to the operation of the user on the control for setting the logical operator, and acquiring the logical operator set by the user as a rule element for connecting the plurality of conditions.
2. The method of claim 1, wherein the rule elements include at least one of variables, constants, brackets, arithmetic operators, relational operators, and logical operators.
3. The method of claim 1, wherein the card comprises: controls for setting the relational operator, controls for setting the rule elements to the left of the relational operator, and/or controls for setting the rule elements to the right of the relational operator.
4. The method of claim 3, wherein the control for setting a relational operator is a selection control; and/or, the control used for setting the rule element positioned at the left side of the relation operator is a selection control; and/or the control used for setting the rule element positioned on the right side of the relation operator is an input control.
5. A method according to claim 3, wherein if the rule is made up of a plurality of conditions, the configuration interface further comprises: controls for setting logical operators.
6. The method of claim 1, wherein the composite card has a frame surrounding the combined card, and wherein the control for setting logical operators is located on the frame.
7. The method of claim 5 or 6, wherein the control for setting a logical operator is a switch button, wherein a switch state of the switch button corresponds to a logical operator for characterizing an and relationship or a logical operator for characterizing an or relationship, respectively; or, the control for setting the logical operator is a switch button, and the switch state of the switch button corresponds to the logical operator for representing the AND relationship, the logical operator for representing the OR relationship or the logical operator for representing the NOT relationship respectively.
8. The method according to claim 1, wherein the method further comprises:
when the composite card is in a selected state, responding to the operation of a user on the configuration interface for adding conditions, generating a new card, and displaying the new card and the combined card in the composite card on the composite card in parallel;
And responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions.
9. The method according to claim 1, wherein the method further comprises:
when the composite card is in an unselected state, responding to the operation of a user on the configuration interface for adding conditions, generating a new card, and displaying the new card and the composite card on the configuration interface in parallel;
responding to the combination operation of a user on the composite card and the new card, displaying a new composite card obtained by combining the composite card and the new card on the configuration interface, and displaying a control for setting a logic operator on the new composite card;
responding to the setting operation of the user on the new card, and obtaining rule elements set by the user and used for forming new conditions;
and responding to the input operation and/or the selection operation of the control for setting the logical operator by the user, and acquiring the logical operator set by the user.
10. The method according to claim 1, wherein the method further comprises:
when the composite card is in an unselected state, deleting the combined card in the composite card in response to the deleting operation of a user on the combined card in the selected state;
And deleting the condition corresponding to the combined card in the generated rule.
11. The method according to claim 1, wherein the method further comprises:
when the composite card is in a selected state, responding to the deleting operation of a user on the composite card, and deleting the composite card in the configuration interface;
and deleting a plurality of conditions corresponding to the composite card in the generated rule.
12. The method according to claim 1, wherein the method further comprises:
and under the condition that the composite card is in a selected state, responding to the separation operation of a user on the composite card, and separating and displaying the combined card in the composite card in the configuration interface.
13. The method of claim 1, wherein the generating the corresponding rule based on the rule element comprises:
generating an atomic expression corresponding to each condition according to the rule elements for composing each condition;
the rule is determined based on the atomic expression.
14. The method of claim 13, wherein the determining the rule based on the atomic expression comprises:
If the rule is composed of one condition, determining an atomic expression corresponding to the one condition as the rule.
15. The method of claim 13, wherein the determining the rule based on the atomic expression comprises:
if the rule is composed of a plurality of conditions, generating a composite expression for representing the logic combination of the plurality of conditions according to a plurality of atomic expressions corresponding to the plurality of conditions and rule elements for connecting the plurality of conditions;
the composite expression is determined as the rule.
16. The method according to claim 1, wherein the method further comprises:
and sending the rule to a service processing platform and/or a service decision node so that the service processing platform and/or the service decision node processes the service to be processed based on the rule.
17. The method according to claim 1, wherein the method further comprises:
acquiring service data corresponding to a target service to be judged;
and judging the service data through the rule, and generating a decision result corresponding to the target service.
18. The method of claim 17, wherein the obtaining service data corresponding to the target service to be determined includes:
And if the rule is a rule for judging whether the user is a loanable user, and the target service to be judged is a request for applying for loan, which is input by the target user, and based on the request, acquiring the personal information of the target user from a service system or a database as the service data.
19. The method of claim 18, wherein determining the service data by the rule and generating a decision result corresponding to the target service comprises:
matching the personal information of the target user with the rule; if the matching is successful, judging the target user as a loanable user, and generating a decision result for indicating a loan application through the target user; otherwise, generating a decision result for indicating refusal of the loan application of the target user.
20. A rule configuration apparatus for execution in a computer device, the apparatus comprising:
the display unit is used for displaying a configuration interface for configuring rules;
a first obtaining unit, configured to obtain rule elements set by a user through the configuration interface, where the rule elements are used to compose and/or connect one or more conditions used to compose a rule;
A rule generating unit, configured to generate a corresponding rule based on the rule element;
the first obtaining unit is used for obtaining rule elements set by a user through input operation and/or selection operation on a configuration interface, and the configuration interface is displayed to be capable of setting the rule elements in a condition-by-condition mode; the first obtaining unit is used for obtaining rule elements respectively set by a user for each condition on a configuration interface, wherein each condition is displayed in the configuration interface in the form of a card; the first acquisition unit is used for responding to the operation of a user on the configuration interface for adding at least one condition, and displaying the card corresponding to each condition on the configuration interface; responding to input operation and/or selection operation of a user on each control displayed in each card, and acquiring rule elements which are set by the user for each condition and are used for composing each condition;
the first acquisition unit is used for responding to the combination operation of a user on a plurality of cards if the rule is formed by a plurality of conditions, displaying a composite card obtained by combining the plurality of cards on a configuration interface, and displaying a control for setting a logic operator on the composite card; in response to a user operation on a control for setting a logical operator, the logical operator set by the user is acquired as a rule element for connecting a plurality of conditions.
21. A computer-readable storage medium, characterized in that the storage medium comprises a stored program, wherein the program, when run, controls a computer device on which the storage medium is located to perform the steps of the rule configuration method performed in the computer device according to any one of claims 1 to 19.
22. A computer device, the computer device comprising: at least one processor; and at least one memory, bus connected to the processor;
the processor and the memory complete communication with each other through the bus; the processor is configured to invoke program instructions in the memory to perform the steps of the rule configuration method performed in a computer device as claimed in any of claims 1 to 19.
CN201910394017.2A 2019-05-13 2019-05-13 Rule configuration method and device executed in computer equipment Active CN110187874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910394017.2A CN110187874B (en) 2019-05-13 2019-05-13 Rule configuration method and device executed in computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910394017.2A CN110187874B (en) 2019-05-13 2019-05-13 Rule configuration method and device executed in computer equipment

Publications (2)

Publication Number Publication Date
CN110187874A CN110187874A (en) 2019-08-30
CN110187874B true CN110187874B (en) 2023-12-15

Family

ID=67716074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910394017.2A Active CN110187874B (en) 2019-05-13 2019-05-13 Rule configuration method and device executed in computer equipment

Country Status (1)

Country Link
CN (1) CN110187874B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395268A (en) * 2020-11-12 2021-02-23 中国人寿保险股份有限公司 Visual configuration method and device for complex condition rules
CN113625930B (en) * 2021-10-11 2022-01-18 统信软件技术有限公司 Data display method, computing device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577174A (en) * 2012-08-01 2014-02-12 北京奥鹏远程教育中心有限公司 Visualized generation method and system of calculation rule scripts
CN106126215A (en) * 2016-06-17 2016-11-16 深圳市麦斯杰网络有限公司 Business rule scenario generation method and device
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN109445842A (en) * 2018-09-26 2019-03-08 中国平安人寿保险股份有限公司 Rule generating method, device, computer equipment and storage medium
CN109445797A (en) * 2018-10-24 2019-03-08 北京奇虎科技有限公司 Handle task executing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7613671B2 (en) * 2005-02-15 2009-11-03 Fair Isaac Corporation Approach for re-using business rules
US8370352B2 (en) * 2007-10-18 2013-02-05 Siemens Medical Solutions Usa, Inc. Contextual searching of electronic records and visual rule construction
US8712990B2 (en) * 2009-10-09 2014-04-29 Sap Ag Methods and systems for providing a business repository
US9460409B2 (en) * 2010-05-10 2016-10-04 Accenture Global Services Limited Process modeling rule validation system and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103577174A (en) * 2012-08-01 2014-02-12 北京奥鹏远程教育中心有限公司 Visualized generation method and system of calculation rule scripts
CN106933889A (en) * 2015-12-31 2017-07-07 华为技术有限公司 For regular collocation method, display methods and the client screened
CN106126215A (en) * 2016-06-17 2016-11-16 深圳市麦斯杰网络有限公司 Business rule scenario generation method and device
CN109086031A (en) * 2018-06-28 2018-12-25 阿里巴巴集团控股有限公司 A kind of operational decision making method and apparatus of rule-based engine
CN109445842A (en) * 2018-09-26 2019-03-08 中国平安人寿保险股份有限公司 Rule generating method, device, computer equipment and storage medium
CN109445797A (en) * 2018-10-24 2019-03-08 北京奇虎科技有限公司 Handle task executing method and device

Also Published As

Publication number Publication date
CN110187874A (en) 2019-08-30

Similar Documents

Publication Publication Date Title
US10817263B2 (en) Workflow development system with ease-of-use features
CN109154935B (en) Method, system and readable storage device for analyzing captured information for task completion
WO2021008334A1 (en) Data binding method, apparatus, and device of mini program, and storage medium
US10936609B2 (en) Presenting user information suggestions
CN111461623B (en) Block chain-based warehouse bill creating method, device and equipment
US20170337560A1 (en) System for providing and employing recommended resolution paths
CN110187874B (en) Rule configuration method and device executed in computer equipment
CN106991179A (en) Data-erasure method, device and mobile terminal
US20220004404A1 (en) Application processing method and apparatus
CN113467669A (en) Information processing method and device, electronic equipment and readable medium
CN113298343A (en) Task generation method, task execution method and device
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
WO2024041316A1 (en) Payment processing method and apparatus
CN110968311B (en) Front-end page construction method and device and electronic equipment
CN113434063B (en) Information display method, device and equipment
CN113296906B (en) Task configuration method and device
CN110865853B (en) Intelligent operation method and device of cloud service and electronic equipment
CN111932192A (en) Decision flow configuration method executed in computer equipment and decision flow engine
CN113900725A (en) Interface configuration method and device, computer equipment and storage medium
US10614104B2 (en) Processing of data relating to entities
CN112749159A (en) Form generation method and device, electronic equipment and storage medium
CN112307305B (en) Service component pre-processing method, device and equipment
CN116301758B (en) Rule editing method, device, equipment and medium based on event time points
CN117112654B (en) City data display method, device, computer equipment and storage medium
CN115904380B (en) Page field creation and assembly method, electronic device and computer readable storage medium

Legal Events

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