CN117350497A - Service decision method, device, terminal equipment and computer readable storage medium - Google Patents

Service decision method, device, terminal equipment and computer readable storage medium Download PDF

Info

Publication number
CN117350497A
CN117350497A CN202311347029.2A CN202311347029A CN117350497A CN 117350497 A CN117350497 A CN 117350497A CN 202311347029 A CN202311347029 A CN 202311347029A CN 117350497 A CN117350497 A CN 117350497A
Authority
CN
China
Prior art keywords
rule
business
service
decision
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311347029.2A
Other languages
Chinese (zh)
Inventor
陈千
黄斌杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Merchants Bank Co Ltd
Original Assignee
China Merchants Bank 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 China Merchants Bank Co Ltd filed Critical China Merchants Bank Co Ltd
Priority to CN202311347029.2A priority Critical patent/CN117350497A/en
Publication of CN117350497A publication Critical patent/CN117350497A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06315Needs-based resource requirements planning or analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0637Strategic management or analysis, e.g. setting a goal or target of an organisation; Planning actions based on goals; Analysis or evaluation of effectiveness of goals

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Educational Administration (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a business decision method, a device, a terminal device and a computer readable storage medium, which belong to the technical field of big data processing, wherein the business decision method is applied to a decision system and comprises the following steps: determining each business rule and business data corresponding to a business scene to be decided; and determining a target business rule from the business rules, and executing the target business rule to evaluate the business data to obtain a business decision result. The application provides a business decision strategy to improve the decision efficiency of a decision system.

Description

Service decision method, device, terminal equipment and computer readable storage medium
Technical Field
The application belongs to the technical field of big data processing, and particularly relates to a business decision method, a business decision device, terminal equipment and a computer readable storage medium.
Background
With the continuous development of technology, decision systems have been widely used in the fields of financial wind control, anti-fraud, marketing, compliance management, etc.
Currently, business rules for participating in business decisions in decision-making systems generally belong to common rules, which are mainly defined in the form of condition-operations (i f-then) for guiding the decision-making system to take corresponding operations in different business scenarios. Because the common rules are independent, that is, the execution result of each common rule does not affect the execution of other rules, when the decision system uses a plurality of common rules to make business decisions, all the rules are usually executed in series according to the respective priorities of the common rules to obtain a final decision result (that is, the rules are executed in sequence from high priority to low priority), and particularly when the number of rules to be executed is large, a great deal of time and system resources are required to be consumed, so that the decision efficiency is low.
In summary, how to provide a service decision strategy to improve the decision efficiency of a decision system has become a technical problem to be solved in the technical field of big data processing.
Disclosure of Invention
The main object of the present application is to provide a service decision method, a device, a terminal device and a computer readable storage medium. The aim is to increase the computational efficiency of the decision making system.
In order to achieve the above object, the present application provides a business decision method applied to an electric power system including a plurality of power modules connected in parallel, the business decision method including the steps of:
determining each business rule and business data corresponding to a business scene to be decided;
and determining a target business rule from each business rule, and executing the target business rule to evaluate the business data to obtain a business decision result.
Optionally, the step of determining a target business rule from each business rule includes:
and determining the service rule with the highest priority in the service rules as a target service rule based on the respective priority of the service rules.
Optionally, the step of determining a target business rule from each business rule includes:
Judging whether the service data meets a first rule condition defined in the first rule or not under the condition that the first rule with the rule type of fusing rule exists in each service rule;
and if the service data meets the first rule condition, determining the first rule and the service rule with the priority higher than that of the first rule in the service rules as a target service rule.
Optionally, the step of determining a target business rule from each business rule includes:
judging whether the service data meets a second rule condition defined in the second rule or not under the condition that the second rule with the rule type being the mutual exclusion rule exists in each service rule;
and if the service data meets the second rule condition, determining the second rule and a third rule with higher priority than the second rule in the service rules as a target service rule, wherein the rule type of the third rule is the mutual exclusion rule and the third rule is mutually exclusive with the second rule.
Optionally, the step of determining a target business rule from each business rule includes:
Randomly generating a random number in a first preset range under the condition that a fourth rule with a gray type exists in each business rule, and judging whether the random number is in a second preset range, wherein the second preset range is smaller than or equal to the first preset range;
and if the random number is in the second preset range, determining the fourth rule as a target business rule.
Optionally, the decision system is in communication connection with the client system, the service data includes interface data and variable data, and the step of determining each service rule and service data corresponding to the service scenario to be decided includes:
determining each business rule corresponding to a business scene in a business rule table based on the business scene to be decided;
generating an application programming interface based on the service scene, and accessing the application programming interface to acquire the interface data determined by the client system based on a preset message format from the client system;
and generating a data query command based on the variable corresponding to the business scene, and executing the data query command in batches to acquire the variable data from a remote dictionary service database.
Optionally, the method further comprises:
changing scene information, interface information, variable information and/or rule information in the decision system in response to an add-delete instruction triggered by a user to generate a deployable decision system and a version number of the deployable decision system;
when the version number is larger than the local version number of the decision system, pulling change data corresponding to the deployable decision system to perform validity check on the change data;
and when the verification result of the changed data is legal, carrying out hot updating on the decision system based on the deployable decision system.
In addition, to achieve the above object, the present application further provides a service decision device, which is applied to a decision system, and the service decision device includes the following steps:
the determining module is used for determining each business rule and business data corresponding to the business scene to be decided;
and the decision module is used for determining a target business rule from the business rules and executing the target business rule to evaluate the business data to obtain a business decision result.
In addition, to achieve the above object, the present application further provides a terminal device, including: the terminal device comprises a memory, a processor and a service decision program stored in the memory and capable of running on the processor, wherein the service decision program of the terminal device realizes the steps of the service decision method when being executed by the processor.
In addition, to achieve the above object, the present application further provides a computer-readable storage medium having stored thereon a service decision program which, when executed by a processor, implements the steps of the service decision method as described above.
The embodiment of the application is applied to a decision making system, and a final business decision result is obtained by determining each business rule and business data corresponding to a business scene to be decided, then determining a target business rule from each business rule, and executing the target business rule to evaluate the business data. Therefore, compared with the traditional decision mode of executing all rules in series according to the respective priority of each business rule, the embodiment of the application only needs to execute part of rules in each business rule, so that calculation time and system resources are saved, and the decision efficiency of a decision system is improved.
Drawings
Fig. 1 is a schematic device structure diagram of a hardware operating environment of a terminal device according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating steps of a first embodiment of a business decision method according to the present application;
FIG. 3 is a schematic diagram of a visual interface and interface field definition according to an embodiment of the business decision method of the present application;
FIG. 4 is a schematic diagram of variable query according to an embodiment of the business decision method of the present application;
FIG. 5 is a schematic diagram of a decision calculation flow according to an embodiment of the business decision method of the present application;
FIG. 6 is a schematic diagram of a visualization rule according to an embodiment of the business decision method of the present application;
FIG. 7 is a schematic diagram of a hot update flow according to an embodiment of the business decision method of the present application
Fig. 8 is a schematic diagram of functional modules of an embodiment of a service decision device of the present application.
The realization, functional characteristics and advantages of the present application will be further described with reference to the embodiments, referring to the attached drawings.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware running environment of a terminal device according to an embodiment of the present application.
It should be noted that the embodiments of the present application relate to a terminal device integrated with a decision system in the technical field of big data processing. Specifically, the terminal device may be a smart phone, a PC (PerSonal Computer ), a tablet computer, a portable computer, or the like.
As shown in fig. 1, the terminal device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a DiSplay (diselay), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above. The execution bodies of the method steps in the embodiments are omitted below for convenience of description.
It will be appreciated by those skilled in the art that the terminal device structure shown in fig. 1 is not limiting of the terminal device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a service decision program may be included in a memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client and communicating data with the client; and the processor 1001 may be configured to call a service decision program stored in the memory 1005 and perform the following operations:
determining each business rule and business data corresponding to a business scene to be decided;
and determining a target business rule from each business rule, and executing the target business rule to evaluate the business data to obtain a business decision result.
Further, the determining the target business rule from the business rules includes:
and determining the service rule with the highest priority in the service rules as a target service rule based on the respective priority of the service rules.
Further, the determining the target business rule from the business rules includes:
judging whether the service data meets a first rule condition defined in the first rule or not under the condition that the first rule with the rule type of fusing rule exists in each service rule;
and if the service data meets the first rule condition, determining the first rule and the service rule with the priority higher than that of the first rule in the service rules as a target service rule.
Further, the determining the target business rule from the business rules includes:
judging whether the service data meets a second rule condition defined in the second rule or not under the condition that the second rule with the rule type being the mutual exclusion rule exists in each service rule;
and if the service data meets the second rule condition, determining the second rule and a third rule with higher priority than the second rule in the service rules as a target service rule, wherein the rule type of the third rule is the mutual exclusion rule and the third rule is mutually exclusive with the second rule.
Further, the determining the target business rule from the business rules includes:
randomly generating a random number in a first preset range under the condition that a fourth rule with a gray type exists in each business rule, and judging whether the random number is in a second preset range, wherein the second preset range is smaller than or equal to the first preset range;
and if the random number is in the second preset range, determining the fourth rule as a target business rule.
Further, the decision system is in communication connection with the client system, the service data includes interface data and variable data, and the operation of determining each service rule and service data corresponding to the service scenario to be decided includes:
determining each business rule corresponding to a business scene in a business rule table based on the business scene to be decided;
generating an application programming interface based on the service scene, and accessing the application programming interface to acquire the interface data determined by the client system based on a preset message format from the client system;
and generating a data query command based on the variable corresponding to the business scene, and executing the data query command in batches to acquire the variable data from a remote dictionary service database.
Further, the processor 1001 may be further configured to invoke a service decision program stored in the memory 1005 to perform the following operations:
changing scene information, interface information, variable information and/or rule information in the decision system in response to an add-delete instruction triggered by a user to generate a deployable decision system and a version number of the deployable decision system;
when the version number is larger than the local version number of the decision system, pulling change data corresponding to the deployable decision system to perform validity check on the change data;
and when the verification result of the changed data is legal, carrying out hot updating on the decision system based on the deployable decision system.
Based on the above structure, various embodiments of a business decision method are presented.
Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of a business decision method of the present application. It should be noted that although a logical order is depicted in the flowchart, in some cases the business decision method of the present application may of course perform the steps depicted or described in a different order than that depicted. In this embodiment, the execution subject of the business decision method may be a personal computer, a smart phone, or other devices, which is not limited in this embodiment. The service decision method comprises S10-S20:
Step S10, determining each business rule and business data corresponding to the business scene to be decided.
A business scenario is a way to describe the decision system operating environment or a particular context. Different scenarios may require different rules and variables to adapt to a particular situation, the scenarios being stored in a decision making system, typically in a configuration file or other way. The decision system may select applicable rules and variables based on the current scenario. Business rules are a set of guidelines that define what actions or decisions should be taken under certain conditions. Rules are typically expressed in terms of condition-operations, where a condition describes a particular instance of a triggering rule, and an operation describes an operation that should be performed after the rule triggers. Rules are typically stored in a rules engine or rules repository of the decision making system. The business data may be information from a variety of sources, including data of the client system, historical data, real-time data, and the like. Such data typically includes information related to the business scenario, such as customer information, transaction details, product attributes, and the like.
In this embodiment, the business rules and business data required by the current business scenario in making the business decision are automatically determined based on the business scenario provided by the user.
It should be noted that the existing decision system has the following problems: 1. the rule content is hard coded, and the threshold of fast iteration maintenance is not high. Specifically, rule content is embedded in a background code, and data acquisition, rule definition and calculation are directly realized by using a hard coding mode. The iteration cost of the rule is high, and a small amount of rule change requires a full-scale development flow (development, test and deployment). As the number of rules increases, the maintainability of the system decreases rapidly. Meanwhile, the rule development and maintenance threshold is high, the rule is invisible to service analysis personnel, and the intervention development is required to be developed. 2. The engine logic is custom developed and has poor suitability. Specifically, the rule and engine calculation flow is developed for specific occasions, and based on a specific service model, the application range is limited, and the rule and engine calculation flow is difficult to popularize in other service scenes. 3. The rule type is single, and the rule calculation efficiency is low. Specifically, the decision system is composed of a series of rules, the precedence of rule calculation (whether fusing can be performed) and the priority of rule and parallel serial calculation can influence the calculation efficiency. The common decision system sequentially calculates all rules according to the priority, and for a large number of rules, a large amount of time is required to be consumed, system resources are wasted, the calculation efficiency is low, and the user experience is also affected. 4. Rules and decision change require restarting the system, and the risk is high. Specifically, the decision engine needs to restart the system (i.e., cold update) to change the policy, and the update is complex, which affects the online decision system.
Further, in a possible embodiment, the decision system is communicatively connected to a client system, the service data includes interface data and variable data, and the step S10 includes steps S101 to S103:
step S101, determining each business rule corresponding to a business scene in a business rule table based on the business scene to be decided.
In this embodiment, the service rule table may be a rule engine or a rule base in the decision system, and the service rules related to the current service scenario are determined in the service rule table based on the service scenario to be decided. Illustratively, the business rule associated with the current business scenario may be found in a business rule table by analyzing the context of the business scenario.
Step S102, an application programming interface is generated based on the service scene, and the application programming interface is accessed to acquire the interface data determined by the client system based on a preset message format from the client system.
The application programming interface is an API (Application Programming Interface ) interface. The service personnel determines the data type of the service data required in the current service scene according to experience in advance, and the data type is expressed in a message format to obtain the preset message format, and in the account transfer service scene, the amount is an essential data type. The data types are pre-given to the client system in the form of messages so that the client system can fill real data based on the preset message form, and therefore, when a user needs to make a service decision on the current service scene through the decision system, a return message containing the data types and the real data (namely the interface data) can be obtained from the client system in real time.
In this embodiment, an API interface is generated based on the current service scenario, and the API interface is accessed to obtain, from the upstream client system, interface data determined by the client system based on a preset message format. The present application is not limited in how to access the API interface, and in one possible embodiment, the present application may directly access the API interface through a postman interface test tool.
Illustratively, the user defines a business scenario at the interface, and the system can automatically generate an API interface according to the business scenario and generate a related default decision. Defining interface field, automatically analyzing upstream message data, extracting field required by decision. Specifically, firstly, different decision scenes (i.e. service scenes) are defined, such as scenes of mobile banking login, account transfer, binding card and the like, after the service scene to be decided is determined, an API interface is automatically generated based on the service scene, the interface can be directly accessed through postman, and the calculated scene decision is returned in real time. Different interface messages are needed in different scenes, and the automatic analysis of the messages is realized through interface fields of page configuration scenes. The message content analysis supports various formats, and can automatically analyze data in a nested json format, an array format and a common json format through json message path mapping, so that interface field configuration definition is realized. And the default setting of the field is supported, the field format is converted, and the correct operation of the subsequent calculation flow is ensured.
In a specific embodiment, as shown in fig. 3, a visualization interface and interface field definition schematic diagram are shown, which indicates a mapping relationship among an API interface, a scene and a field extracted from a current API interface, for example, when the API interface a corresponds to the scene a, the client system needs to obtain specific service data corresponding to each of the fields A1, A2 and A3 through the API interface a, and when the API interface B corresponds to the scene B, the client system needs to obtain specific service data corresponding to each of the fields B1, B2 and B3 through the API interface B. Therefore, when knowing the business scenario requiring decision, the decision system can automatically generate the corresponding API interface and determine the fields required to be obtained from the API interface.
Step S103, generating a data query command based on the variable corresponding to the business scene, and executing the data query command in batches to acquire the variable data from a remote dictionary service database.
Variables are data obtained from external or other systems for use as inputs to the decision making system. These variables typically include information related to the business scenario, such as customer information, transaction details, product attributes, and the like. The decision system uses these input variables for rule evaluation and decision making. In business rules, rule conditions typically include variables that represent data used in the decision process. Rule conditions may evaluate whether conditions of a rule are met based on these variables. For example, a rule condition may be "the credit score of a customer is greater than X", where "the credit score of a customer" is a variable. In a regular operation, variables may be used to perform operations such as assigning a value to a variable for subsequent use. These variables are typically used to calculate or generate output in a regular operation.
In this embodiment, since the variables are related to the service requirements and the service rules, which may be determined based on the current service scenario, the decision system may determine the variables corresponding to the current service scenario, thereby generating a data query command based on the variables, and executing the data query command in batch to acquire the actual data corresponding to the variables from the redis (remote dictionary service) database of the internal system or the external system.
In a specific embodiment, firstly, a variable is defined in a visual way, specifically, each decision system needs a large amount of associated data and variables, and the interface message is provided with limited fields. Additional queries for data of external systems are required. In order to improve the processing speed of the system and the calculation speed of variables, redis data are mainly queried, various types of Redis data query of page configuration customization are supported, and commands such as get, hget, hgetall, zrangezcount and the like are supported. The variable defines the redis command, default values and field types. Automatically generating a Redis query command, querying a Redis result, automatically converting types of values of different types, and assigning a default value to a variable if the query fails or the query result is null.
For example, a large amount of Redis data needs to be queried in each scene, and in the process of querying the Redis, only one variable is queried at a time to consume a large amount of time delay, so when querying a plurality of variables, the method and the device perform barrel separation operation on all the variables, the variables of the same Redis cluster fall into the same barrel, and perform pipeline query on the variables of the same barrel in batches, thereby reducing query time delay. As shown in fig. 4, a variable query schematic diagram is shown, firstly, all variables to be queried, namely, variable a, variable B, variable C, variable D and variable E, are determined based on the current service scenario, and a data query command is automatically generated based on the redis command, the variable and the database, that is, the variable A, redis and the get command can form a data query command for acquiring actual data corresponding to the variable 1 from the redis1 database, and other similar functions are available. And then carrying out barrel division operation on each variable, distributing the variable A and the variable E to the redis1 for pipeline inquiry, distributing the variable C to the redis2 for pipeline inquiry, and distributing the variable B and the variable D to the redis3 for pipeline inquiry. Therefore, low-delay data query can be realized, and the decision efficiency and performance of the decision system are improved.
As shown in fig. 5, an exemplary decision calculation flow chart is shown, firstly, an original message is sent to a client system through an interface, then, actual data (i.e. interface data) in the message is extracted according to the message returned by the client system, variable data is queried from a redis database, and the interface data and the variable data are evaluated based on rules, so that a final decision result is obtained. Therefore, the visual rule system of fusing rules, mutual exclusion rules, gray level rules and common rules is realized, and the multi-engine system realizes high availability and low delay of the system by optimizing inquiry.
And step S20, determining a target business rule from the business rules, and executing the target business rule to evaluate the business data to obtain a business decision result.
In this embodiment, a part of service rules (hereinafter referred to as target service rules are referred to as a distinction) is determined from each service rule corresponding to the current service scenario, then the target service rules are executed, that is, whether the service data meets the rule conditions defined in the target service rules is first determined, if yes, the rule operation defined in the target service rules is executed, the execution result is obtained, the final service decision result is determined based on the execution result, if not, the rule operation is not executed, and no execution result has an influence on the final service decision result. And for other rules which do not belong to the target business rule in each business rule, directly skipping, and judging the non-execution rule condition and not executing the rule operation.
Further, in a possible embodiment, the step S20 includes step S201:
step S201, determining, based on the respective priorities of the service rules, a service rule with the highest priority among the service rules as a target service rule.
The priority of each business rule is defined without limitation, and the priority of each business rule can be defined in advance according to importance and execution sequence evaluation of business personnel on the business rules used in each business scene. The performance of the decision system may also be monitored on a regular basis to ensure that the priority of the rules still meets the business requirements. And adjusting the priority of the rule in real time according to the feedback and the change.
In this embodiment, after determining the priority of each service rule, determining the service rule with the highest priority in each service rule, it should be noted that, in the decision system provided in this application, there are rules (with high priority and low influence priority) that can determine whether other rules are executed, that is, not all rules are independent, and it is understood that the service rule with the highest priority is the first service rule executed in the decision process, and there is no rule with higher priority than it to influence its execution, so the service rule with the highest priority is determined to be the target service rule.
Further, in another possible embodiment, the step S20 further includes steps S202 to S203:
step S202, when a first rule with a rule type of fusing rule exists in each service rule, determining whether the service data meets a first rule condition defined in the first rule.
The fusing rule is a rule type defined by service personnel according to actual service requirements, and the definition of the fusing rule is as follows: if the service data meets the rule condition of the fusing rule, executing the rule operation of the fusing rule, and taking the execution result directly as the decision result of the decision, namely, not calculating other subsequent rules (other rules with priority lower than that of the current fusing rule in the service rules corresponding to the current service scene).
In this embodiment, in the case where a business rule (hereinafter referred to as a first rule to show distinction) whose rule type is a fusing rule exists in each business rule corresponding to the current business scenario, it is determined whether or not the business data satisfies a rule condition (hereinafter referred to as a first rule condition to show distinction) defined in the first rule, that is, rule condition determination in the first rule is performed.
Step S203, if the service data meets the first rule condition, determining the first rule and a service rule with a priority higher than that of the first rule in the service rules as a target service rule.
In this embodiment, if it is detected that the service data satisfies the first rule condition, the first rule and other service rules with priority higher than that of the first rule in each service rule are determined to be target service rules.
Further, in another possible embodiment, the step S20 further includes steps S204 to S205:
step S204, in the case that a second rule with a rule type that is a mutually exclusive rule exists in each service rule, determining whether the service data satisfies a second rule condition defined in the second rule.
The mutual exclusion rule is a rule type defined by service personnel according to actual service requirements, and the definition of the mutual exclusion rule is as follows: the mutual exclusion rule refers to a group of business rules, and according to the respective priority of each business rule of the same group, whether the business data meets the rule condition defined in the mutual exclusion rule is judged in sequence, and when the business data meets the rule condition, other rules of the same group are skipped.
In this embodiment, in the case where a service rule (hereinafter referred to as a second rule to show distinction) whose rule type is a mutually exclusive rule exists in each service rule corresponding to the current service scenario, it is determined whether or not the service data satisfies a rule condition (hereinafter referred to as a second rule condition to show distinction) defined in the second rule. I.e. to perform rule condition judgment in the second rule.
Step S205, if the service data meets the second rule condition, determining the second rule and a third rule with a priority higher than that of the second rule in the service rules as a target service rule, where a rule type of the third rule is the mutual exclusion rule and the third rule is mutually exclusive with the second rule.
In this embodiment, if it is detected that the service data satisfies the second rule condition, the other rules of the same group having a priority lower than that of the second rule are not executed, that is, the second rule and a third rule having a priority higher than that of the second rule in each service rule are target service rules, and the rule type of the third rule is a mutually exclusive rule, and the third rule is mutually exclusive from the second rule in the same group.
Further, in another possible embodiment, the step S20 further includes steps S206 to S207:
step S206, in the case that the fourth rule with the rule type being the gray type exists in each of the service rules, randomly generating a random number in a first preset range, and judging whether the random number is in a second preset range, where the second preset range is smaller than or equal to the first preset range.
The gray rule is a rule type defined by service personnel according to actual service requirements, and the definition of the gray rule is as follows: the gray rule is based on a preset probability, and whether the gray rule is executed is judged randomly. Illustratively, when a rule is newly added to a service, the probability of the rule can be gradually increased from 0% to 100%, and the rule is a gray rule, so that the effect of the rule is observed through the completely random probability, and the fact that all service decisions are not influenced by the newly added rule is ensured.
In this embodiment, a first preset range and a second preset range are configured in advance according to the execution probability of the current gray rule, and the first preset range is greater than or equal to the second preset range. In the case that a business rule (hereinafter referred to as a fourth rule to show distinction) with a rule type of gray type exists in each business rule corresponding to the current business scene, a random number is randomly generated in a first preset range by a random number generator, and then whether the random number is in a second preset range is judged.
Step S207, if the random number is within the second preset range, determining that the fourth rule is a target business rule.
In this embodiment, if the random number is detected to be within the second preset range, the fourth rule is determined to be the target service rule, which indicates that the fourth rule is determined to be executed. And if the random number is detected not to be in the second preset range, skipping the fourth rule.
In a specific embodiment, when the execution probability of the gray rule is 60%, the first preset range is set to 1 to 100, the second preset range is set to 1 to 60, and the random number generator is set to generate a random integer (i.e., the above random number) 20 in the range of 1 to 100, then it can be determined that the current random number is in the second preset range, so it is determined that the current gray rule is executed.
As shown in fig. 6, a visual rule schematic diagram is illustrated, and a service person may configure each service rule corresponding to the scenario a according to service requirements, specifically, rule 1, rule 2, rule 3 and rule 4, where the priority of each rule may be rule 1> rule 2> rule 3> rule 4, and rule 3 is a fusing rule defined by a user, that is, when service data meets a rule condition defined by rule 3, rule 4 is skipped, so as to directly obtain a decision result; the business personnel can also configure each business rule corresponding to the scene B according to the business requirement, specifically a rule 1, a rule 2, a rule 3 and a rule 4, wherein the priority of each rule can be a rule 1> a rule 2> a rule 3> a rule 4, and the rule 2 and the rule 3 are a set of mutually exclusive rules defined by users, namely when business data meet the rule condition defined by the rule 2, the rule 3 is skipped, and a decision result is obtained based on executing the rule 4; the service personnel can also configure each service rule corresponding to the scene C according to the service requirement, specifically, rule 1, rule 2, rule 3 and rule 4, wherein the priority of each rule can be rule 1> rule 2> rule 3> rule 4, and rule 3 is a gray rule defined by a user, namely, the decision system randomly judges whether to execute rule 3 according to 50% execution probability.
Therefore, the service data is evaluated by determining each service rule and service data corresponding to the service scene to be decided, then determining the target service rule from each service rule and executing the target service rule, so that a final service decision result is obtained. Therefore, compared with the traditional decision mode of executing all rules in series according to the respective priority of each business rule, the embodiment of the application only needs to execute part of rules in each business rule, so that calculation time and system resources are saved, and the decision efficiency of a decision system is improved.
Further, based on the first embodiment of the service decision method of the present application, a second embodiment of the service decision method of the present application is provided.
In this embodiment, the service decision method further includes steps a10 to a30:
and step A10, responding to an add-delete instruction triggered by a user, and changing scene information, interface information, variable information and/or rule information in the decision system to generate a deployable decision system and a version number of the deployable decision system.
And adding, deleting and/or modifying the internal data of the decision system, wherein the instructions are triggered by a user when adding and deleting the modifying instructions. The internal data of the decision system comprises scene information, interface information, variable information and rule information. In this embodiment, after receiving an add-delete-modify instruction triggered by a user, the scene information, the interface information, the variable information and/or the rule information in the decision system are changed in response to the add-delete-modify instruction, and the changed deployable decision system and the version number of the deployable decision system are generated.
And step A20, pulling the change data corresponding to the deployable decision system to perform validity check on the change data when the version number is larger than the local version number of the decision system.
In this embodiment, the local version number is the version number of the currently used decision system, and when detecting that the version number of the deployable decision system is greater than the local version number, the method pulls the change data in the deployable decision system and performs validity check on the change data. Specifically, if the change data meets a preset validity standard, determining that the current change data is legal data.
And step A30, when the verification result of the changed data is legal, carrying out hot update on the decision system based on the deployable decision system.
In this embodiment, when the legal verification result of the changed data is legal, the current decision system is hot updated based on the deployable decision system, so that the safety of data update is ensured, and the influence of cold update on the online decision system can be avoided.
Illustratively, a scenario contains tens of rules and tens of variable computations, modifications, and very high add/delete frequencies. As shown in fig. 7, a hot update flow chart is shown, after a scene, an interface, a variable and/or a rule in the decision system are changed, the data is updated at a specific node of the zookeeper (a distributed application coordination service of a distributed, open source code), the online decision system monitors the data transformation of the zookeeper node, if the changed version is larger than the locally stored version, the latest configuration is pulled again, then whether the updated content is correct or not is checked, and the full data is updated correctly.
Therefore, when the legal verification result of the changed data is legal, the current decision system is subjected to hot update based on the deployable decision system, so that the safety of data update is ensured, and the influence of cold update on the online decision system can be avoided.
In addition, the embodiment of the application also provides a service decision device, and the service decision device is applied to a decision system.
Referring to fig. 8, fig. 8 is a schematic functional block diagram of an embodiment of a service decision device according to the present application, as shown in fig. 8, the service decision device according to the present application includes:
the determining module 10 is configured to determine each service rule and service data corresponding to a service scenario to be decided;
and the decision module 20 is configured to determine a target business rule from the business rules, and execute the target business rule to evaluate the business data to obtain a business decision result.
Further, the decision module 20 includes:
and the first execution unit is used for determining the business rule with the highest priority in the business rules as the target business rule based on the respective priority of the business rules.
Further, the decision module 20 further includes:
a first judging unit, configured to judge whether the service data satisfies a first rule condition defined in a first rule, in a case where a first rule whose rule type is a fusing rule exists in each of the service rules;
And the second execution unit is used for determining the first rule and the business rule with higher priority than the first rule in the business rules as a target business rule if the business data meets the first rule condition.
Further, the decision module 20 further includes:
a second judging unit, configured to judge whether the service data satisfies a second rule condition defined in a second rule, in a case where a second rule whose rule type is a mutually exclusive rule exists in each of the service rules;
and the third execution unit is used for determining the second rule and a third rule with higher priority than the second rule in the service rules as a target service rule if the service data meets the second rule condition, wherein the rule type of the third rule is the mutual exclusion rule and the third rule is mutually exclusive with the second rule.
Further, the decision module 20 further includes:
a third judging unit, configured to randomly generate a random number in a first preset range when a fourth rule with a rule type being a gray type exists in each service rule, and judge whether the random number is in a second preset range, where the second preset range is smaller than or equal to the first preset range;
And the fourth execution unit is used for determining the fourth rule as a target business rule if the random number is in the second preset range.
Further, the decision system is communicatively connected to the client system, the service data includes interface data and variable data, and the determining module 10 includes:
the first determining unit is used for determining each business rule corresponding to the business scene in a business rule table based on the business scene to be decided;
a second determining unit, configured to generate an application programming interface based on the service scenario, and access the application programming interface to obtain, from the client system, the interface data determined by the client system based on a preset message format;
and the third determining unit is used for generating a data query command based on the variable corresponding to the business scene and executing the data query command in batches to acquire the variable data from a remote dictionary service database.
Further, the service decision device of the present application further includes:
the change module is used for responding to an add-delete instruction triggered by a user, changing scene information, interface information, variable information and/or rule information in the decision system to generate a deployable decision system and a version number of the deployable decision system;
The verification module is used for pulling the change data corresponding to the deployable decision system to perform validity verification on the change data when the version number is larger than the local version number of the decision system;
and the updating module is used for carrying out hot updating on the decision system based on the deployable decision system when the verification result of the changed data is legal.
The present application further provides a computer storage medium having a service decision program stored thereon, which when executed by a processor implements the steps of the service decision program method according to any of the above embodiments.
The specific embodiments of the computer storage medium of the present application are substantially the same as the embodiments of the business decision program method of the present application, and are not described herein.
The present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the service decision method of the present application as described in any of the above embodiments, which is not described in detail herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. 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 system that comprises the element.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application 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 (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising several instructions for causing a terminal device (which may be a TWS headset or the like) to perform the method described in the various embodiments of the present application.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the claims, and all equivalent structures or equivalent processes using the descriptions and drawings of the present application, or direct or indirect application in other related technical fields are included in the scope of the claims of the present application.

Claims (10)

1. A business decision method, characterized in that the business decision method is applied to a decision system, the business decision method comprising the steps of:
Determining each business rule and business data corresponding to a business scene to be decided;
and determining a target business rule from each business rule, and executing the target business rule to evaluate the business data to obtain a business decision result.
2. The business decision method of claim 1 wherein said step of determining a target business rule from each of said business rules comprises:
and determining the service rule with the highest priority in the service rules as a target service rule based on the respective priority of the service rules.
3. The business decision method of claim 1 wherein said step of determining a target business rule from each of said business rules comprises:
judging whether the service data meets a first rule condition defined in the first rule or not under the condition that the first rule with the rule type of fusing rule exists in each service rule;
and if the service data meets the first rule condition, determining the first rule and the service rule with the priority higher than that of the first rule in the service rules as a target service rule.
4. The business decision method of claim 1 wherein said step of determining a target business rule from each of said business rules comprises:
Judging whether the service data meets a second rule condition defined in the second rule or not under the condition that the second rule with the rule type being the mutual exclusion rule exists in each service rule;
and if the service data meets the second rule condition, determining the second rule and a third rule with higher priority than the second rule in the service rules as a target service rule, wherein the rule type of the third rule is the mutual exclusion rule and the third rule is mutually exclusive with the second rule.
5. The business decision method of claim 1 wherein said step of determining a target business rule from each of said business rules comprises:
randomly generating a random number in a first preset range under the condition that a fourth rule with a gray type exists in each business rule, and judging whether the random number is in a second preset range, wherein the second preset range is smaller than or equal to the first preset range;
and if the random number is in the second preset range, determining the fourth rule as a target business rule.
6. The business decision method of claim 1, wherein the decision system is communicatively connected to a client system, the business data comprises interface data and variable data, and the step of determining business rules and business data corresponding to the business scenario to be decided comprises:
Determining each business rule corresponding to a business scene in a business rule table based on the business scene to be decided;
generating an application programming interface based on the service scene, and accessing the application programming interface to acquire the interface data determined by the client system based on a preset message format from the client system;
and generating a data query command based on the variable corresponding to the business scene, and executing the data query command in batches to acquire the variable data from a remote dictionary service database.
7. The service decision method according to any one of claims 1 to 6, characterized in that the method further comprises:
changing scene information, interface information, variable information and/or rule information in the decision system in response to an add-delete instruction triggered by a user to generate a deployable decision system and a version number of the deployable decision system;
when the version number is larger than the local version number of the decision system, pulling change data corresponding to the deployable decision system to perform validity check on the change data;
and when the verification result of the changed data is legal, carrying out hot updating on the decision system based on the deployable decision system.
8. A business decision device, characterized in that it is applied to a decision system, comprising the steps of:
the determining module is used for determining each business rule and business data corresponding to the business scene to be decided;
and the decision module is used for determining a target business rule from the business rules and executing the target business rule to evaluate the business data to obtain a business decision result.
9. A terminal device, characterized in that the terminal device comprises: memory, a processor storing a business decision program executable on the processor, which business decision program when executed by the processor implements the steps of the business decision method according to any of claims 1 to 7.
10. A computer readable storage medium, characterized in that it has stored thereon a service decision program, which when executed by a processor implements the steps of the service decision method according to any of claims 1 to 7.
CN202311347029.2A 2023-10-17 2023-10-17 Service decision method, device, terminal equipment and computer readable storage medium Pending CN117350497A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311347029.2A CN117350497A (en) 2023-10-17 2023-10-17 Service decision method, device, terminal equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311347029.2A CN117350497A (en) 2023-10-17 2023-10-17 Service decision method, device, terminal equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117350497A true CN117350497A (en) 2024-01-05

Family

ID=89357073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311347029.2A Pending CN117350497A (en) 2023-10-17 2023-10-17 Service decision method, device, terminal equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117350497A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118363998A (en) * 2024-06-18 2024-07-19 中邮消费金融有限公司 Service processing model configuration and execution method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118363998A (en) * 2024-06-18 2024-07-19 中邮消费金融有限公司 Service processing model configuration and execution method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US20220391771A1 (en) Method, apparatus, and computer device and storage medium for distributed training of machine learning model
CN114265979B (en) Method for determining fusion parameters, information recommendation method and model training method
CN109787882A (en) Information push method, device, computer equipment and storage medium
US10979515B1 (en) Resource discovery agent computing device, software application, and method
CN117493014A (en) Edge computing method, system, equipment and medium based on visual rule configuration
US11625737B2 (en) Contextual marketing system based on predictive modeling of users of a system and/or service
CN113850669A (en) User grouping method and device, computer equipment and computer readable storage medium
CN113791909A (en) Server capacity adjusting method and device, computer equipment and storage medium
CN116302448B (en) Task scheduling method and system
CN115412401B (en) Method and device for training virtual network embedding model and virtual network embedding
CN114841267B (en) Real-time prediction method, device, electronic equipment and computer program product
CN117350497A (en) Service decision method, device, terminal equipment and computer readable storage medium
CN114356712B (en) Data processing method, apparatus, device, readable storage medium, and program product
CN110728118A (en) Cross-data-platform data processing method, device, equipment and storage medium
CN116185578A (en) Scheduling method of computing task and executing method of computing task
CN114268625B (en) Feature selection method, device, equipment and storage medium
CN115099875A (en) Data classification method based on decision tree model and related equipment
CN112363831B (en) Wind control processing method and device, computer equipment and storage medium
CN113408641A (en) Method and device for training resource generation model and generating service resources
CN111737319A (en) User cluster prediction method and device, computer equipment and storage medium
CN118363998B (en) Service processing model configuration and execution method, device, equipment and storage medium
CN112306666B (en) Cloud resource management system and method, and non-transitory computer readable recording medium
CN117707797B (en) Task scheduling method and device based on distributed cloud platform and related equipment
US12052140B1 (en) Compliance for cloud-based applications and computer systems using machine learning
KR20240103419A (en) Electronic device for providing prediction of sales volume of item and the method thereof

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