CN111242164A - Decision result determination method, device and equipment - Google Patents

Decision result determination method, device and equipment Download PDF

Info

Publication number
CN111242164A
CN111242164A CN201911387328.2A CN201911387328A CN111242164A CN 111242164 A CN111242164 A CN 111242164A CN 201911387328 A CN201911387328 A CN 201911387328A CN 111242164 A CN111242164 A CN 111242164A
Authority
CN
China
Prior art keywords
data
decided
rule
decision
determining
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
CN201911387328.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.)
Beijing Yiyiyun Technology Co ltd
Original Assignee
Tianjin Happiness Life 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 Tianjin Happiness Life Technology Co ltd filed Critical Tianjin Happiness Life Technology Co ltd
Priority to CN201911387328.2A priority Critical patent/CN111242164A/en
Publication of CN111242164A publication Critical patent/CN111242164A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • 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
    • 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/10Office automation; Time management
    • G06Q10/109Time management, e.g. calendars, reminders, meetings or time accounting
    • G06Q10/1093Calendar-based scheduling for persons or groups
    • G06Q10/1097Task assignment
    • 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • Development Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Operations Research (AREA)
  • Finance (AREA)
  • Educational Administration (AREA)
  • Accounting & Taxation (AREA)
  • Quality & Reliability (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Technology Law (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method, a device and equipment for determining a decision result, wherein the method comprises the following steps: acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships; determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation; and determining a decision result of the data to be decided according to the decision tree and the data to be decided. The method and the device realize the logic relation among the rules in a dynamic decision tree generating mode, even if the rules are updated, program codes do not need to be modified, and the flexibility is strong.

Description

Decision result determination method, device and equipment
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to a method, a device and equipment for determining a decision result.
Background
The decision result is a result finally output by the data to be decided through matching with various preset rules. Then, how to determine the decision result for the data to be decided is a problem that can be faced by various industries. For example, how to schedule work for workers in an aviation system, how to recommend financial products for users in a financial system, and the like.
In the current decision result determination method, the logic relationship between the rules is usually written by using program codes. Specifically, in the process of running the program code, corresponding rules are continuously called from the database based on the logical relationship realized by the program code, and after matching is performed respectively, the decision result is finally output.
However, since the logical relationship between the rules is implemented by the program code, once the rule is updated, the program code needs to be written again, which is poor in flexibility.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, and a device for determining a decision result, which implement a logical relationship between rules by dynamically generating a decision tree, and even if there is an update of a rule, the program code does not need to be modified, so that the flexibility is strong.
In a first aspect, the present application provides a method for determining a decision result, where the method includes:
acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships;
determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation;
and determining a decision result of the data to be decided according to the decision tree and the data to be decided.
In a second aspect, the present application provides an apparatus for determining a decision result, the apparatus comprising:
the acquisition module is used for acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships;
the first determining module is used for determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation;
and the second determining module is used for determining a decision result of the data to be decided according to the decision tree and the data to be decided.
In a third aspect, the present application further provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described above when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is configured to implement the method of any one of the above when executed by a processor.
Compared with the prior art, the embodiment of the invention has the following beneficial effects: according to the method for determining the decision result, firstly, data to be decided and a rule set corresponding to the data to be decided are obtained, wherein the rule set comprises rules with preset logical relations, and secondly, a decision tree corresponding to the data to be decided is determined according to the rules with the preset logical relations in the rule set. And finally, determining a decision result of the data to be decided according to the decision tree and the data to be decided. According to the method and the device, the logic relation among the rules is realized in a mode of dynamically generating the decision tree corresponding to the data to be decided, so that program codes do not need to be modified even if the rules are updated, and the flexibility is high.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed for the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart of a method for determining a decision result according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a decision tree according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a specific method for determining a decision result of data to be decided based on a decision tree according to an embodiment of the present application;
fig. 4 is a flowchart of another decision result determination method provided in the embodiment of the present application;
fig. 5 is a flowchart of a method for determining a decision result according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a device for determining a decision result according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of a terminal device for determining a decision result according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
In order to facilitate understanding of the technical solutions, before describing the technical solutions provided in the present application, a few concepts related to the technical solutions in the present application are briefly described:
decision Tree (English, Decision Tree) is a Decision analysis method which is used for obtaining the probability that the expected value of the net present value is greater than or equal to zero by forming the Decision Tree on the basis of the known occurrence probability of various conditions, evaluating the risk of a project and judging the feasibility of the project, and is a graphical method for intuitively applying probability analysis. This decision branch is called a decision tree because it is drawn to resemble a branch of a tree.
The decision tree is provided with a plurality of nodes, wherein the nodes comprise a root node positioned at the top end, a leaf node positioned at the tail end and other nodes in the middle, and if an edge exists between two adjacent layers of nodes, two nodes connected by the edge have a parent-child relationship and are parent-child nodes.
The decision result is a result finally output by the data to be decided through matching various preset rules.
In order to improve the flexibility of a system and avoid modifying a program code when a rule is updated, the application provides a method for determining a decision result, specifically, firstly, data to be decided and a rule set corresponding to the data to be decided are obtained, wherein the rule set comprises rules with preset logical relations, and secondly, a decision tree corresponding to the data to be decided is determined according to the rules with the preset logical relations in the rule set. And finally, determining a decision result of the data to be decided according to the decision tree and the data to be decided. According to the method and the device, the logic relation among the rules is realized in a mode of dynamically generating the decision tree corresponding to the data to be decided, so that program codes do not need to be modified even if the rules are updated, and the flexibility is high.
The following is a method for determining a decision result provided in an embodiment of the present application, and with reference to fig. 1, is a flowchart of a method for determining a decision result provided in an embodiment of the present application. The method specifically comprises the following steps:
s101: acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set includes rules having a preset logical relationship.
In the embodiment of the application, each rule and the preset logical relationship between the rules are defined for the data to be decided in advance, and the predefined rules with the preset logical relationship are stored in the rule set. Generally, the preset logical relationship between the rules may refer to that the rule 2 is triggered to be executed when the rule 1 is successfully matched, and the rule 3 is triggered to be executed when the rule 1 is failed to be matched; and outputting a corresponding decision result when the rule 4 is successfully matched, and triggering and executing a rule 5 when the rule 4 is failed to be matched.
In practical applications, the data to be decided refers to data that needs to determine a decision result and is input in advance, for example, when it is determined that a purchaser purchases a certain product, the data to be decided may include basic information of the purchaser and detailed information of the purchased product.
In practical application, before a rule set corresponding to data to be decided is obtained, the rule set needs to be predefined according to actual business requirements, and after each rule in the defined rule set is logically carded and abstracted, the rules are stored in a database through an interface provided by a program and are used as basic data for determining a subsequent decision result.
S102: determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; and the leaf nodes of the decision tree have a corresponding relation with the decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation.
In the embodiment of the application, the rule set comprises rules with a preset logical relationship, and in the process of generating the decision tree, the rules in the rule set are in correspondence with the non-leaf nodes of the decision tree, and the preset decision result is in correspondence with the leaf nodes.
In an optional implementation manner, a non-leaf node having a corresponding relationship with a rule of a preset logical relationship in the rule set and a leaf node having a corresponding relationship with a decision result are respectively constructed. Then, a decision tree is constructed based on the non-leaf nodes and the leaf nodes.
S103: and determining a decision result of the data to be decided according to the decision tree and the data to be decided.
In the embodiment of the application, after the decision tree is generated according to the rule in the rule set corresponding to the data to be decided, the decision result of the data to be decided is determined based on the decision tree.
Taking the decision tree shown in fig. 2 as an example, fig. 2 is a schematic diagram of a decision tree provided in the embodiment of the present application. The node 1 serving as the root node and the rule 1 have a corresponding relation, the rule 2 corresponding to the node 2 is executed after the rule 1 is successfully matched, and the rule 3 corresponding to the node 3 is executed after the rule 1 is unsuccessfully matched. The rule 2 corresponding to the node 2 is, for example, to determine whether the age information is greater than 40, and to output a decision result corresponding to the node 4 if the age information is greater than 40, and to output a decision result corresponding to the node 5 if the age information is equal to or less than 40. The node 3, the node 4 and the node 5 are leaf nodes, and therefore, the node 3, the node 4 and the node 5 have corresponding relations with the decision result respectively.
Referring to fig. 3, a flowchart of a specific method for determining a decision result of data to be decided based on a decision tree is provided in an embodiment of the present application, where the method includes:
s301: the root node of the decision tree is initialized as the target node.
When determining a decision result based on the decision tree, starting from the root node of the decision tree, determining the root node of the decision tree as a target node.
S302: and receiving information to be matched of a rule corresponding to the target node, wherein the information to be matched is auxiliary decision information of the data to be decided.
In the embodiment of the application, after the target node is determined, information to be matched of the rule corresponding to the target node is received and is used for being matched with the corresponding rule. The information to be matched is auxiliary decision information of the data to be decided, and may be information related to a corresponding rule input by a user, for example.
In an optional implementation manner, in the process of matching the rule corresponding to the target node, question information related to the rule may be displayed to the user through a preset interactive interface, for example, the question information may be "please input age information", and after answer information corresponding to the question information input by the user is received, the answer information is used as information to be matched of the rule.
S303: and matching the information to be matched with the rule to obtain a matching result.
And after receiving the information to be matched of the rule, matching the information to be matched with the rule to obtain a matching result. Taking the policy tree in fig. 2 as an example, if the information to be matched is "age 45", then "age 45" and rule "are executed to rule 4 if the age is greater than 40, and after matching is performed to rule 5" if the age is less than or equal to 40, it is determined that the matching result is "age greater than 40", then rule 4 is executed.
S304: and re-determining the next node corresponding to the matching result as the target node, and continuing to execute the step S302 until the target node is a leaf node.
In the embodiment of the present application, after determining the matching result of the rule corresponding to the target node, it is determined whether the node corresponding to the matching result is a leaf node, if the node is a leaf node, a decision result corresponding to the leaf node is output as a decision result of the data to be decided, otherwise, the node is determined again as the target node, and S302 is continuously performed.
For example, taking the policy tree in fig. 2 as an example, if the matching result is "age is greater than 40", the node 4 corresponding to the matching result determines whether the node 4 is a leaf node of the policy tree, and obviously, if the node 4 is a leaf node, the decision result corresponding to the node 4 is used as the decision result of the data to be decided.
In practical application, leaf nodes of the decision tree have a corresponding relationship with the decision result, and the decision result of the data to be decided can be output only when the target node is the leaf node.
S305: and determining the decision result corresponding to the leaf node as the decision result of the data to be decided.
In the embodiment of the application, after the target node is determined to be the leaf node, the decision result corresponding to the leaf node is determined to be the decision result of the data to be decided.
Taking the policy tree in fig. 2 as an example, when the target node is the leaf node 4, the decision result corresponding to the leaf node 4 is determined as the decision result of the data to be decided, for example, the decision result corresponding to the node 4 may be "purchase risk is 80%", and the decision result of the data to be decided is "purchase risk is 80%".
In addition, in an alternative implementation, a plurality of decision trees may be generated based on a rule having a preset logical relationship in a rule set corresponding to the data to be decided. Wherein, the plurality of decision trees can have a preset priority matching order. In this case, after the decision result corresponding to the leaf node on one decision tree is determined, the decision result determining method provided in the embodiment of the present application is used to sequentially perform the matching of the rules corresponding to the nodes on the subsequent decision trees according to the preset priority matching sequence until the policy result corresponding to each decision tree is determined, and at this time, the decision result corresponding to each decision tree can be used as the decision result of the data to be decided.
In practical application, after the decision result corresponding to the leaf node on one of the decision trees is determined, the next decision tree is determined according to the preset priority matching sequence, the rule corresponding to each node is still matched from the root node entry of the next decision tree, and finally the decision result corresponding to the determined leaf node is determined as the decision result of the decision tree corresponding to the data to be decided.
In the embodiment of the application, the decision result of the data to be decided includes a decision result corresponding to a leaf node determined in each decision tree, in an alternative implementation, each decision result may be displayed to a user, and in another alternative implementation, the decision result displayed for the user may also be obtained by sorting each decision result.
In the method for determining the decision result provided by the embodiment of the application, firstly, data to be decided and a rule set corresponding to the data to be decided are obtained, wherein the rule set comprises rules with a preset logical relationship, and secondly, a decision tree corresponding to the data to be decided is determined according to the rules with the preset logical relationship in the rule set. And finally, determining a decision result of the data to be decided according to the decision tree and the data to be decided. According to the method and the device, the logic relation among the rules is realized in a mode of dynamically generating the decision tree corresponding to the data to be decided, so that program codes do not need to be modified even if the rules are updated, and the flexibility is high.
In addition, in order to improve the determination efficiency of the decision result of the data to be decided, an embodiment of the present application further provides a method for determining the decision result, and with reference to fig. 4, a flowchart of another method for determining the decision result is provided in the embodiment of the present application, where the method includes:
s401: acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set includes rules having a preset logical relationship.
S402: and determining a decision tree corresponding to the data to be decided according to rules of preset logical relations in the rule set.
And the leaf nodes of the decision tree have a corresponding relation with the decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation.
S403: and determining a root node of the decision tree as a target node.
S404: inquiring whether the information to be matched of the rule corresponding to the target node exists in the stored information; and if the information to be matched of the rule corresponding to the target node does not exist in the stored information, executing S405.
In the embodiment of the application, after the data to be decided is received, the data to be decided can be stored, in addition, the received information to be matched can also be stored, and the stored information is finally obtained. The stored information may include the data to be decided and the inputted information to be matched, or may include only one of the data to be decided and the inputted information to be matched.
In an optional implementation manner, the input information to be matched and the received data to be decided may be converted into data in a preset format, for example, data in a JSON format, and then the information to be matched and the data to be decided, which are converted into the JSON format, are stored in a key value pair form to obtain stored information. For example, key-value pairs in the key-value pairs are respectively used for storing the corresponding relationship between question information and answer information extracted from each piece of input information to be matched or information to be decided, and if the input information to be matched is "age 45", the key-value pairs can respectively store the corresponding relationship between question information "how big the age" and answer information "45".
In practical application, in order to improve the determination efficiency of the decision result, after the target node of the decision tree is determined, the embodiment of the application firstly queries whether the information to be matched of the rule corresponding to the target node exists in the stored information, and if the information to be matched exists, the information to be matched is directly obtained from the stored information, the information to be matched of the rule corresponding to the target node does not need to be received in a preset interactive interface or other manners, for example, the information to be matched does not need to be obtained through interaction with a user through the interactive interface, so that the efficiency of determining the policy result is improved.
If the information to be matched of the rule corresponding to the target node does not exist in the stored information, S405 is executed.
S405: and receiving the information to be matched of the rule corresponding to the target node.
S406: and matching the information to be matched with the rule to obtain a matching result.
S407: re-determining the next node corresponding to the matching result as a target node, and continuing to execute S404 until the target node is a leaf node;
s408: and determining the decision result corresponding to the leaf node as the decision result of the data to be decided.
The above-mentioned S401-S403 and S405-S408 can be understood by referring to the above-mentioned embodiments, and are not described herein again.
In the method for determining the decision result provided by the embodiment of the application, the time for receiving the information to be matched is saved by querying the information to be matched of the rule corresponding to the target node from the stored information, for example, the rule matching of the target node can be completed under the condition that a user feels nothing, the number of times of interaction with the user through the preset interaction interface is reduced, and the determination efficiency of the decision result can be improved to a certain extent.
Based on the introduction of the foregoing embodiment, the present application further provides a method for determining a decision result when a user purchases a certain product, and with reference to fig. 5, a flowchart of the method for determining a decision result is provided for the embodiment of the present application, where the method includes:
s501: and receiving basic information of purchasers and detailed information of purchased products as data to be decided.
In the embodiment of the present application, before a purchaser purchases a certain product, from the perspective of a product company, it is necessary to determine a matching relationship between the certain product and the purchaser, how to provide the certain product to a user, and the like.
Therefore, the embodiment of the application takes the basic information of the purchasers and the detailed information of the products as the data to be decided, and determines the corresponding decision results for the purchasers or the product companies to make decisions based on the decision result determination method provided by the application.
S502: and determining a corresponding rule set based on the disease type information in the basic information of the purchaser.
In the embodiment of the present application, the basic information of the purchaser includes information about disease types, such as diabetes, hypertension, and the like. In practical application, the rule may be defined in advance based on the disease type information, and after determining the disease type information in the basic information of the purchaser, the corresponding rule set is determined.
S503: and determining a decision tree corresponding to the data to be decided based on the rules with the preset logical relationship in the rule set.
In the embodiment of the application, after the rule set is determined, the decision tree corresponding to the data to be decided is determined based on the rule with the preset logical relationship in the rule set. For example, assuming that the disease type information of the basic information of the purchaser includes diabetes and hypertension, rule sets corresponding to the diabetes and the hypertension are determined, and two decision trees are generated based on the rule sets corresponding to the diabetes and the hypertension respectively and are used for determining a decision result of the data to be decided.
S504: and determining a decision result of the data to be decided according to the decision tree and the data to be decided.
In the embodiment of the application, the decision result of the data to be decided is determined based on the decision trees respectively corresponding to diabetes and hypertension. For example, the decision result determined for the data to be decided based on the decision tree corresponding to diabetes is "60% at risk"; and the decision result determined for the data to be decided based on the decision tree corresponding to the hypertension is 'risk 80%'.
In practical applications, the decision result of the determined data to be decided may be directly displayed to the user, or the decision result of the determined data to be decided may be arranged and displayed to the user, for example, by arranging "60% of risk" of the decision result determined for the data to be decided based on the decision tree corresponding to diabetes and "80% of risk" of the decision result determined for the data to be decided based on the decision tree corresponding to hypertension, the relationship between the product and the purchaser may be determined, so as to provide the purchaser and the company staff with reference.
In the method for determining the decision result provided by the embodiment of the application, the logic relationship among the rules is realized by dynamically generating the decision tree based on the rule set corresponding to the disease type information of the purchaser in the data to be decided, and even if the rules are updated, the program codes do not need to be modified, so that the flexibility is strong.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Based on the foregoing method embodiment, the present application further provides a device for determining a decision result, and with reference to fig. 6, a schematic structural diagram of the device for determining a decision result provided in the present application embodiment is shown, where the device includes:
an obtaining module 601, configured to obtain data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships;
a first determining module 602, configured to determine, according to a rule of a preset logical relationship in the rule set, a decision tree corresponding to the data to be decided; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation;
a second determining module 603, configured to determine a decision result of the data to be decided according to the decision tree and the data to be decided.
In an optional implementation, the second determining module 603 includes:
the initialization submodule is used for initializing a root node of the decision tree into a target node; the decision tree comprises a root node and a plurality of leaf nodes, and the plurality of leaf nodes are connected with the root node through the preset logical relationship;
the receiving submodule is used for receiving the information to be matched of the rule corresponding to the target node; the information to be matched is auxiliary decision information of the data to be decided;
the matching submodule is used for matching the information to be matched with the rule to obtain a matching result;
the triggering submodule is used for triggering the receiving submodule until the target node is a leaf node after the next node corresponding to the matching result is determined as the target node again;
and the determining submodule is used for determining the decision result corresponding to the leaf node as the decision result of the data to be decided.
In the device for determining a decision result provided by the embodiment of the application, firstly, data to be decided and a rule set corresponding to the data to be decided are obtained, wherein the rule set includes rules with a preset logical relationship, and secondly, a decision tree corresponding to the data to be decided is determined according to the rules with the preset logical relationship in the rule set. And finally, determining a decision result of the data to be decided according to the decision tree and the data to be decided. According to the method and the device, the logic relation among the rules is realized in a mode of dynamically generating the decision tree corresponding to the data to be decided, so that program codes do not need to be modified even if the rules are updated, and the flexibility is high.
Based on the foregoing embodiment, the present application further provides a device for determining a decision result, and refer to fig. 7, which is a schematic diagram of a terminal device for determining a decision result provided in the embodiment of the present application. As shown in fig. 7, the terminal device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. The processor 70, when executing the computer program 72, implements the steps in the above-described method for determining the decision result, such as the steps S101 to S103 shown in fig. 1.
Illustratively, the computer program 72 may be divided into one or more modules/units, which are stored in the memory 71 and executed by the processor 70 to carry out the invention. One or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 72 in the terminal device 7.
The terminal device 7 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device 7 may include, but is not limited to, a processor 70, a memory 71. It will be appreciated by those skilled in the art that fig. 7 is merely an example of a terminal device 7 and does not constitute a limitation of the terminal device 7 and may include more or less components than those shown, or combine certain components, or different components, e.g. the terminal device 7 may also include input output devices, network access devices, buses, etc.
The Processor 70 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 71 may be an internal storage unit of the terminal device 7, such as a hard disk or a memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk provided on the terminal device 7, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 71 may also include both an internal storage unit of the terminal device 7 and an external storage device. The memory 71 is used for storing computer programs and other programs and data required by the terminal device 7. The memory 71 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above-described embodiments of the method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for determining a decision result, the method comprising:
acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships;
determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation;
and determining a decision result of the data to be decided according to the decision tree and the data to be decided.
2. The method of claim 1, wherein the determining a decision result of the data to be decided according to the decision tree and the data to be decided comprises:
initializing a root node of the decision tree as a target node; the decision tree comprises a root node and a plurality of leaf nodes, and the plurality of leaf nodes are connected with the root node through the preset logical relationship;
receiving information to be matched of a rule corresponding to the target node; the information to be matched is auxiliary decision information of the data to be decided;
matching the information to be matched with the rule to obtain a matching result;
re-determining the next node corresponding to the matching result as a target node, and continuing to execute the step of receiving the information to be matched of the rule corresponding to the target node until the target node is a leaf node;
and determining the decision result corresponding to the leaf node as the decision result of the data to be decided.
3. The method of claim 2, further comprising:
converting the information to be matched and/or the data to be decided into data in a preset format;
and storing the information to be matched and/or the data to be decided, which are converted into the preset format, in a key value pair mode to serve as stored information.
4. The method according to claim 3, wherein before receiving the information to be matched of the rule corresponding to the target node, the method further comprises:
inquiring whether the information to be matched of the rule corresponding to the target node exists in the stored information;
the receiving of the information to be matched of the rule corresponding to the target node includes:
and if the stored information does not have the information to be matched of the rule corresponding to the target node, receiving the information to be matched of the rule corresponding to the target node.
5. The method according to claim 1, wherein after determining the decision tree corresponding to the data to be decided according to the rule of the preset logical relationship in the rule set, the method further comprises:
storing the decision tree in a list form of key value pairs;
the determining a decision result of the data to be decided according to the decision tree and the data to be decided comprises:
determining a decision result of the data to be decided based on the policy tree and the data to be decided, which are stored in a list form of key value pairs.
6. The method according to claim 1, wherein the determining a decision tree corresponding to the data to be decided according to the rule of the preset logical relationship in the rule set comprises:
respectively constructing non-leaf nodes which have corresponding relations with rules of preset logic relations in the rule set and leaf nodes which have corresponding relations with decision results;
and constructing a decision tree based on the non-leaf nodes and the leaf nodes.
7. An apparatus for determining a decision result, the apparatus comprising:
the acquisition module is used for acquiring data to be decided and a rule set corresponding to the data to be decided; wherein the rule set comprises rules with preset logical relationships;
the first determining module is used for determining a decision tree corresponding to the data to be decided according to rules of a preset logical relationship in the rule set; the leaf nodes of the decision tree have a corresponding relation with a decision result, and the non-leaf nodes have a corresponding relation with the rule of the preset logic relation;
and the second determining module is used for determining a decision result of the data to be decided according to the decision tree and the data to be decided.
8. The apparatus of claim 7, wherein the second determining module comprises:
the initialization submodule is used for initializing a root node of the decision tree into a target node; the decision tree comprises a root node and a plurality of leaf nodes, and the plurality of leaf nodes are connected with the root node through the preset logical relationship;
the receiving submodule is used for receiving the information to be matched of the rule corresponding to the target node; the information to be matched is auxiliary decision information of the data to be decided;
the matching submodule is used for matching the information to be matched with the rule to obtain a matching result;
the triggering submodule is used for triggering the receiving submodule until the target node is a leaf node after the next node corresponding to the matching result is determined as the target node again;
and the determining submodule is used for determining the decision result corresponding to the leaf node as the decision result of the data to be decided.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
CN201911387328.2A 2019-12-27 2019-12-27 Decision result determination method, device and equipment Pending CN111242164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911387328.2A CN111242164A (en) 2019-12-27 2019-12-27 Decision result determination method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911387328.2A CN111242164A (en) 2019-12-27 2019-12-27 Decision result determination method, device and equipment

Publications (1)

Publication Number Publication Date
CN111242164A true CN111242164A (en) 2020-06-05

Family

ID=70865874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911387328.2A Pending CN111242164A (en) 2019-12-27 2019-12-27 Decision result determination method, device and equipment

Country Status (1)

Country Link
CN (1) CN111242164A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768290A (en) * 2020-06-23 2020-10-13 中国工商银行股份有限公司 Method and device for determining risk weight coefficient of service
CN112818228A (en) * 2021-01-29 2021-05-18 北京百度网讯科技有限公司 Method, device, equipment and medium for recommending object to user
CN113177212A (en) * 2021-04-25 2021-07-27 支付宝(杭州)信息技术有限公司 Joint prediction method and device
CN113268409A (en) * 2021-02-19 2021-08-17 南京苏宁软件技术有限公司 Method, apparatus, device and medium for tracking logical nodes during automated testing
CN116883175A (en) * 2023-07-10 2023-10-13 青岛闪收付信息技术有限公司 Investment and financing activity decision generation method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281196A (en) * 2011-08-11 2011-12-14 中兴通讯股份有限公司 Decision tree generating method and equipment, decision-tree-based message classification method and equipment
CN104506340A (en) * 2014-11-21 2015-04-08 河南中烟工业有限责任公司 Creation method of decision tree in industrial Ethernet fault diagnosis method
CN104798043A (en) * 2014-06-27 2015-07-22 华为技术有限公司 Data processing method and computer system
CN108632235A (en) * 2017-08-31 2018-10-09 新华三技术有限公司 A kind of net packet categorised decision tree method for building up and device
US20180365578A1 (en) * 2017-06-16 2018-12-20 Fair Ip, Llc Computer system decision engine
CN109273101A (en) * 2018-09-05 2019-01-25 百度在线网络技术(北京)有限公司 Man-machine interaction method, device, computer equipment and medium based on decision tree
CN109711424A (en) * 2018-11-12 2019-05-03 平安科技(深圳)有限公司 A kind of rule of conduct acquisition methods, device and equipment based on decision tree
US20190197141A1 (en) * 2017-12-22 2019-06-27 International Business Machines Corporation Interactive adjustment of decision rules

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102281196A (en) * 2011-08-11 2011-12-14 中兴通讯股份有限公司 Decision tree generating method and equipment, decision-tree-based message classification method and equipment
CN104798043A (en) * 2014-06-27 2015-07-22 华为技术有限公司 Data processing method and computer system
CN104506340A (en) * 2014-11-21 2015-04-08 河南中烟工业有限责任公司 Creation method of decision tree in industrial Ethernet fault diagnosis method
US20180365578A1 (en) * 2017-06-16 2018-12-20 Fair Ip, Llc Computer system decision engine
CN108632235A (en) * 2017-08-31 2018-10-09 新华三技术有限公司 A kind of net packet categorised decision tree method for building up and device
US20190197141A1 (en) * 2017-12-22 2019-06-27 International Business Machines Corporation Interactive adjustment of decision rules
CN109273101A (en) * 2018-09-05 2019-01-25 百度在线网络技术(北京)有限公司 Man-machine interaction method, device, computer equipment and medium based on decision tree
CN109711424A (en) * 2018-11-12 2019-05-03 平安科技(深圳)有限公司 A kind of rule of conduct acquisition methods, device and equipment based on decision tree

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何田中 等: "基于双属性节点部分匹配的决策树改进算法" *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768290A (en) * 2020-06-23 2020-10-13 中国工商银行股份有限公司 Method and device for determining risk weight coefficient of service
CN112818228A (en) * 2021-01-29 2021-05-18 北京百度网讯科技有限公司 Method, device, equipment and medium for recommending object to user
CN112818228B (en) * 2021-01-29 2023-08-04 北京百度网讯科技有限公司 Method, device, equipment and medium for recommending object to user
CN113268409A (en) * 2021-02-19 2021-08-17 南京苏宁软件技术有限公司 Method, apparatus, device and medium for tracking logical nodes during automated testing
CN113268409B (en) * 2021-02-19 2022-11-15 南京苏宁软件技术有限公司 Method, apparatus, device and medium for tracking logical nodes during automated testing
CN113177212A (en) * 2021-04-25 2021-07-27 支付宝(杭州)信息技术有限公司 Joint prediction method and device
CN113177212B (en) * 2021-04-25 2022-07-19 支付宝(杭州)信息技术有限公司 Joint prediction method and device
CN116883175A (en) * 2023-07-10 2023-10-13 青岛闪收付信息技术有限公司 Investment and financing activity decision generation method and device

Similar Documents

Publication Publication Date Title
CN111242164A (en) Decision result determination method, device and equipment
US11030521B2 (en) Estimating cardinality selectivity utilizing artificial neural networks
CN108376364B (en) Payment system account checking method and device and terminal device
CN111177231A (en) Report generation method and report generation device
CN107784063B (en) Algorithm generation method and terminal equipment
CN109739873A (en) A kind of business datum querying method, device, equipment and readable storage medium storing program for executing
CN113342345A (en) Operator fusion method and device of deep learning framework
CN111427971B (en) Business modeling method, device, system and medium for computer system
CN109491857B (en) Data monitoring method and system based on rule engine and terminal equipment
WO2022134583A1 (en) Insurance data information generation method, apparatus, server, and storage medium
CN111159329A (en) Sensitive word detection method and device, terminal equipment and computer-readable storage medium
CN112559301A (en) Service processing method, storage medium, processor and electronic device
CN110335070B (en) WIFI-based user group extension method and device and electronic equipment
CN113987152B (en) Knowledge graph extraction method, system, electronic equipment and medium
CN111612616A (en) Block chain account evaluation method and device, terminal device and computer readable medium
CN109542398B (en) Business system generation method and device and computer readable storage medium
CN117093619A (en) Rule engine processing method and device, electronic equipment and storage medium
CN107169115A (en) Add the method and device of self-defined participle
CN107589965A (en) A kind of software development methodology and device
CN108255549B (en) Server program visual control method and device
CN110991088A (en) Cable model construction method and system, terminal device and storage medium
US20210026610A1 (en) Method, device and terminal apparatus for code execution and computer readable storage medium
CN114385540A (en) Data unit conversion method and device
CN109670980B (en) Method, system and equipment for processing charging service data
CN110795424B (en) Characteristic engineering variable data request processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230222

Address after: Room 304, Unit 1, Floor 4, Building 9, West District, No. 9 Courtyard, Linglong Road, Haidian District, Beijing, 100089

Applicant after: BEIJING YIYIYUN TECHNOLOGY Co.,Ltd.

Address before: 301800 220-41, customs building, energy saving and environmental protection industrial zone, Baodi District, Tianjin

Applicant before: TIANJIN HAPPINESS LIFE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right