Decision tree model processing method, device, terminal equipment and storage medium

By locking the training-free nodes in the decision tree model and recalculating the splitting rules for the unlocked nodes, the inefficiency and resource waste caused by the overall retraining of the decision tree model in the existing technology are solved, and a more efficient modeling process is achieved. .

CN110796264BActive Publication Date: 2025-01-14WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911035707.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-29
Publication Date
2025-01-14
Estimated Expiration
2039-10-29

AI Technical Summary

Technical Problem

The existing machine learning modeling training methods can only overall retrain the decision tree model, resulting in inefficient modeling and waste of computing resources.

Method used

By obtaining retraining operation instructions, detecting and locking preset training nodes in the decision tree model, only retraining the unlocked nodes, extracting node information and recalculating the splitting rules, realizing local retraining of the decision tree model .

Benefits of technology

It saves time and computing resources for retraining decision tree models in interactive modeling, and improves modeling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110796264B_ABST
    Figure CN110796264B_ABST
Patent Text Reader

Abstract

The present invention discloses a processing method, device, terminal device and computer-readable storage medium for a decision tree model, which obtains an operation instruction for retraining a decision tree model; detects whether the model to be trained specified by the operation instruction contains a preset free-training node; when the preset free-training node is detected, the preset free-training node is locked; and in the model to be trained, the unlocked nodes are retrained. The present invention achieves locking of a local model that does not need to be changed in a decision tree model, and only retraining operations are performed on some nodes that need to be changed or retrained, which saves time and training computing resources for retraining the decision tree model in interactive modeling, and improves modeling efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Fintech (financial technology), and in particular to a processing method, device, terminal equipment and computer-readable storage medium for a decision tree model. Background Art

[0002] Since the existing machine learning modeling training method can only retrain the decision tree model as a whole, even though the modeler needs to keep some models in the original decision tree model unchanged (i.e., no retraining operation is required), the existing machine learning modeling training method will still train the original decision tree model as a whole. This not only consumes a lot of modeling training time, but also causes a waste of computing resources, seriously affecting the modeling efficiency of interactive modeling. Summary of the invention

[0003] The main purpose of the present invention is to provide a decision tree model processing method, device, terminal device and computer-readable storage medium, aiming to solve the technical problem that the existing interactive modeling method of retraining the model can only train the model as a whole, resulting in low modeling efficiency.

[0004] To achieve the above object, the present invention provides a method for processing a decision tree model, the method comprising:

[0005] Get the operation instructions for retraining the decision tree model;

[0006] Detecting whether the model to be trained specified by the operation instruction contains a preset training-free node;

[0007] When the preset training-free node is detected, the preset training-free node is locked;

[0008] In the model to be trained, the unlocked nodes are retrained.

[0009] Furthermore, before the step of retraining the unlocked nodes in the model to be trained, the method further includes:

[0010] In the to-be-trained model, each predecessor node of the preset training-free node is detected, and each predecessor node is locked.

[0011] Furthermore, the step of retraining the unlocked nodes in the model to be trained includes:

[0012] Extracting node information of each node in the model to be trained, wherein the node information at least includes: a splitting rule;

[0013] According to the hierarchical relationship between the nodes of the model to be trained, the splitting rules of the unlocked nodes in the model to be trained are recalculated in turn.

[0014] Furthermore, the step of detecting whether the model to be trained specified by the operation instruction contains a preset training-free node includes:

[0015] Detecting a training node specified by the operation instruction in the decision tree model;

[0016] In the decision tree model, extracting a sub-decision tree model with the training node as the root node as the model to be trained specified by the operation instruction;

[0017] Detect whether all nodes of the extracted sub-decision tree model contain the preset training-free node.

[0018] Furthermore, before the step of obtaining the operation instruction for retraining the decision tree model, it also includes:

[0019] The selected and locked nodes in the decision tree model are marked as the preset training-free nodes and the difference is visualized and output.

[0020] Furthermore, the step of marking the selected and locked nodes in the decision tree model as the preset training-free nodes and performing difference visualization output includes:

[0021] Identifying a node locking operation performed on the decision tree model;

[0022] Marking the node corresponding to the node locking operation as a preset training-free node;

[0023] The preset training-free node differences are visualized and outputted to an interactive operation interface for the decision tree model.

[0024] Furthermore, the step of obtaining an operation instruction for retraining the decision tree model includes:

[0025] Identifying a node training operation performed on the decision tree model;

[0026] Based on the node training operation, trigger the generation of an operation instruction for retraining the decision tree model.

[0027] In addition, to achieve the above object, the present invention also provides a processing device for a decision tree model, the processing device for the decision tree model comprising:

[0028] An acquisition module, used to obtain operation instructions for retraining a decision tree model;

[0029] A detection module, used to detect whether the model to be trained specified by the operation instruction contains a preset training-free node;

[0030] A locking module, used for locking the preset training-free node when the preset training-free node is detected;

[0031] The execution module is used to retrain the unlocked nodes in the model to be trained.

[0032] The present invention also provides a terminal device, which includes: a memory, a processor, and a processing program for a decision tree model stored in the memory and executable on the processor, wherein the processing program for the decision tree model, when executed by the processor, implements the steps of the processing method for the decision tree model as described above.

[0033] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the processing method of the decision tree model as described above are implemented.

[0034] The processing method, device, terminal device and computer-readable storage medium of the decision tree model proposed in the present invention obtain an operation instruction for retraining the decision tree model; detect whether the model to be trained specified by the operation instruction contains a preset free-training node; when the preset free-training node is detected, the preset free-training node is locked; and the unlocked nodes in the model to be trained are retrained. In the process of interactive modeling by modelers, the present invention locks the pre-selected free-training nodes in the decision tree model, and then retrains the other unlocked partial nodes in the decision tree model that need to be retrained, thereby locking the local model that does not need to be changed in the decision tree model, and only retraining operations are performed on the partial nodes that need to be changed or retrained, saving the time and training computing resources for retraining the decision tree model in interactive modeling, and improving modeling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a schematic diagram of the structure of the hardware operation involved in the embodiment of the present invention;

[0036] Figure 2 It is a flowchart of a first embodiment of a method for processing a decision tree model of the present invention;

[0037] Figure 3 1 is a detailed flow chart of step S200 in an embodiment of a processing method of a decision tree model of the present invention;

[0038] Figure 4It is a detailed flow chart of step S400 in an embodiment of a processing method of a decision tree model of the present invention;

[0039] Figure 5 It is a schematic diagram of an application scenario of an embodiment of a processing method of a decision tree model of the present invention;

[0040] Figure 6 It is a structural schematic diagram of a processing device for a decision tree model of the present invention.

[0041] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0042] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0043] like Figure 1 As shown, Figure 1 It is a structural diagram of the hardware operating environment involved in the embodiment of the present invention.

[0044] It should be noted that Figure 1 That is, it is a schematic diagram of the structure of the hardware operating environment of the terminal device. The terminal device in the embodiment of the present invention can be a PC, a portable computer and other terminal devices.

[0045] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a 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 be a storage device independent of the aforementioned processor 1001.

[0046] Those skilled in the art will understand that Figure 1 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0047] like Figure 1As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a distributed task processing program. The operating system is a program that manages and controls the hardware and software resources of the sample terminal device, and supports the operation of the distributed task processing program and other software or programs.

[0048] exist Figure 1 In the terminal device shown, the user interface 1003 is mainly used to communicate data with each terminal; the network interface 1004 is mainly used to connect to the backend server and communicate data with the backend server; and the processor 1001 can be used to call the processing program of the decision tree model stored in the memory 1005 and perform the following operations:

[0049] Get the operation instructions for retraining the decision tree model;

[0050] Detecting whether the model to be trained specified by the operation instruction contains a preset training-free node;

[0051] When the preset training-free node is detected, the preset training-free node is locked;

[0052] In the model to be trained, the unlocked nodes are retrained.

[0053] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and before executing the step of retraining the unlocked nodes in the model to be trained, further perform the following operations:

[0054] In the to-be-trained model, each predecessor node of the preset training-free node is detected, and each predecessor node is locked.

[0055] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and further perform the following operations:

[0056] Extracting node information of each node in the model to be trained, wherein the node information at least includes: a splitting rule;

[0057] According to the hierarchical relationship between the nodes of the model to be trained, the splitting rules of the unlocked nodes in the model to be trained are recalculated in turn.

[0058] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and further perform the following operations:

[0059] Detecting a training node specified by the operation instruction in the decision tree model;

[0060] In the decision tree model, extracting a sub-decision tree model with the training node as the root node as the model to be trained specified by the operation instruction;

[0061] Detect whether all nodes of the extracted sub-decision tree model contain the preset training-free node.

[0062] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and before executing the step of obtaining an operation instruction for retraining the decision tree model, further perform the following operations:

[0063] The selected and locked nodes in the decision tree model are marked as the preset training-free nodes and the difference is visualized and output.

[0064] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and further perform the following operations:

[0065] Identifying a node locking operation performed on the decision tree model;

[0066] The node corresponding to the node locking operation is marked as a preset training-free node; and the difference of the preset training-free node is visually output to an interactive operation interface for the decision tree model.

[0067] Further, the processor 1001 may call a processing program of the decision tree model stored in the memory 1005, and further perform the following operations:

[0068] Identifying a node training operation performed on the decision tree model;

[0069] Based on the node training operation, trigger the generation of an operation instruction for retraining the decision tree model.

[0070] Based on the above structure, various embodiments of the processing method of the decision tree model of the present invention are proposed.

[0071] Please refer to Figure 2 , Figure 2 It is a flowchart diagram of the first embodiment of the processing method of the decision tree model of the present invention.

[0072] The embodiment of the present invention provides an embodiment of a method for processing a decision tree model. It should be noted that although a logical order is shown in the flow chart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0073] The processing method of the decision tree model in the embodiment of the present invention is applied to the above-mentioned terminal device. The terminal device in the embodiment of the present invention can be a PC, a portable computer or other terminal device, and no specific limitation is made here.

[0074] The processing method of the decision tree model in this embodiment includes:

[0075] Step S100, obtaining an operation instruction for retraining the decision tree model.

[0076] In the process of modeling personnel building a decision tree model based on interactive operations, if new sample data needs to be modeled, the modeling personnel often modify and optimize the original decision tree model based on interactive operations on the old sample data set or a data set related to the current sample data, thereby obtaining the new decision tree model that needs to be built.

[0077] For example, if a data set with 1000 columns of features has now been increased to 1005 columns, the modeler will retrain the decision tree model originally built based on the 1000 columns of features to build a decision tree model with 1005 columns of features. In this case, the modeler will hope that the original decision tree model built on the 1000 columns of features does not need to be changed, and only the model with the newly added 5 columns needs to be trained.

[0078] For another example, if 80% of the columns in dataset A and dataset B are the same fields, when the modeler migrates the decision tree model built based on dataset A to the decision tree model built based on dataset B, there is no need to retrain some nodes that use the same fields in the two decision tree models. Instead, only the other parts of the two decision tree models that have different fields need to be retrained.

[0079] Based on the modeling needs of the above-mentioned modelers to interactively establish a decision tree model, when the modelers perform interactive operations based on a visual operation interface to establish a decision tree model, a series of front-end operations performed by the modelers for interactive operations on the decision tree model are monitored, and when it is detected that in the front-end operations performed by the modelers, an instruction control for starting retraining is clicked, the operation instructions for retraining the decision tree model mapped by the instruction control are obtained.

[0080] Furthermore, in another embodiment, before step S100, the processing method of the decision tree model of the present invention further includes:

[0081] Step S500, marking the selected and locked nodes in the decision tree model as the preset training-free nodes and performing difference visualization output.

[0082] In a series of front-end operations performed by the modeler for interactive operations on the decision tree model, based on identifying the operation type of the current front-end operation, it is determined that the modeler needs to lock the target node selected by the front-end operation, then the display style of the target node is changed to mark it as a preset training-free node, and the difference of the marked preset training-free node is visualized and output in real time to the operation interface for the modeler to perform interactive operations, so that the modeler can view and confirm it.

[0083] Furthermore, step S500 includes:

[0084] Step S501: identifying a node locking operation performed on the decision tree model.

[0085] It should be noted that, in this embodiment, the types of front-end operations that need to be identified include but are not limited to: node locking. It should be understood that the processing method of the decision tree model of the present invention does not limit the types and quantities of front-end operations that need to be identified.

[0086] Step S502: Mark the node corresponding to the node locking operation as a preset training-free node.

[0087] Step S503: Visually output the preset training-free node differences to an interactive operation interface for the decision tree model.

[0088] Specifically, for example, in the interactive visualization interface, the entire operation process of the modeler's interactive operation on the current decision tree model is monitored, and when it is detected that the modeler first selects any node in the current decision tree model based on the cursor in the visualization interface, then clicks to call out the function menu, and then clicks on any command control in the function menu based on the cursor selection, in a series of front-end operations, according to the "lock" command control selected by the modeler, the "lock node" operation instruction generated by the mapping of the "lock" command control is obtained, the node specified by the operation instruction is marked as a training-free node and the visual display style of the node is changed, such as Figure 5 As shown, a "lock node" logo is added to the target operation node specified by the obtained "lock node" operation instruction (i.e., the node selected by the modeler in the current decision tree model) to mark the node as a training-free node, and the display color is changed to black (the original display color is white) to form a difference display effect from other nodes that need to be retrained by modelers. Finally, the visualization is output to the visualization interaction interface for the modeler to perform interactive operations on the current decision tree model, so that the modeler can intuitively view and confirm it.

[0089] It should be noted that, in the present embodiment, when changing the visual display style of the node specified by the "lock node" operation instruction, the change can also be made in the form of changing other display colors or display shapes. It should be understood that the processing method of the decision tree model of the present invention does not limit how to mark the "preset training-free node" and how to differentiate the visual output display style of the "preset training-free node".

[0090] Further, in this embodiment, step S100, obtaining an operation instruction for retraining the decision tree model, includes:

[0091] Step S101, identifying a node training operation performed on the decision tree model.

[0092] Step S102: Based on the node training operation, trigger the generation of an operation instruction for retraining the decision tree model.

[0093] Specifically, for example, in an interactive visual operation interface, when monitoring a modeler, based on the cursor in the visual interface, firstly selects any node in the current decision tree model, then clicks to call out a function menu, and then clicks any command control in the function menu based on the cursor selection, in a series of front-end operations, according to the "node training" command control selected by the monitored modeler, the operation instructions for retraining the node selected by the current modeler in the decision tree model mapped by the "node training" command control are generated and obtained in real time.

[0094] Step S200, detecting whether the model to be trained specified by the operation instruction contains a preset training-free node.

[0095] After obtaining the operation instruction for retraining the decision tree model generated by the instruction control that the modeler clicks to start retraining, it is automatically detected whether there are preset training-free nodes selected in advance by the modeler in the to-be-trained model where some nodes that the modeler needs to retrain specified by the operation instruction in the decision tree model are located.

[0096] Step S300: When it is detected that the preset training-free node is present, the preset training-free node is locked.

[0097] When it is detected that the modeler clicks on the instruction control to start retraining and generates an operation instruction for retraining the decision tree model, if there are preset training-free nodes selected in advance by the modeler in the to-be-trained model where some nodes specified by the modeler in the decision tree model need to perform retraining operations, the node information on the detected preset training-free nodes is extracted and the node information is retained, thereby avoiding changes or repeated calculations of the node information on the preset training-free nodes when performing the retraining operation on the to-be-trained model where some nodes specified by the modeler need to perform retraining operations are located.

[0098] It should be noted that, in this embodiment, the node information on the preset training-free nodes that is extracted and retained includes but is not limited to the node splitting rules of the preset training-free nodes. It should be understood that based on the needs of the modeler to build the model, the modeler can independently choose in advance to retain or retrain part of the node information or all of the node information in the training-free nodes. The processing method of the decision tree model of the present invention does not limit the node information on the training-free nodes that the modeler needs to retain or retrain.

[0099] Step S400: retraining the unlocked nodes in the model to be trained.

[0100] In the model to be trained where some nodes that the modeler needs to retrain are located, after retaining the node information of the preset non-training nodes selected in advance by the modeler, starting from the root node of the model to be trained (the node selected in the decision tree model when the modeler clicks the instruction control to start retraining to generate the operation instruction to retrain the decision tree model), the node information of all other nodes in the model to be trained whose node information is not retained is recalculated layer by layer, thereby updating the node information of all other nodes.

[0101] In this embodiment, based on the modeling needs of the modeling personnel to interactively establish a decision tree model, when the modeling personnel performs interactive operations based on a visual operation interface, a series of front-end operations of the modeling personnel are monitored, and when it is detected that the instruction control for starting retraining is selected in the front-end operation performed by the modeling personnel, the operation instruction for retraining the decision tree model mapped by the instruction control is obtained, and the operation instruction for retraining the decision tree model is automatically detected in the to-be-trained model where the part of the nodes that the modeling personnel need to retrain specified by the operation instruction in the decision tree model are located. Whether there is a preset free-training node pre-selected by the modeling personnel, the node information on the detected preset free-training node is extracted and the node information is retained, and then, starting from the root node of the to-be-trained model, the node information of all other nodes in the to-be-trained model where the node information is not retained is recalculated layer by layer, thereby updating the node information of all other nodes to complete the retraining of the decision tree model.

[0102] It is achieved that, during the interactive modeling process of modelers, by locking the pre-selected nodes that do not need to be trained in the decision tree model, and then retraining the other unlocked nodes in the decision tree model that need to be retrained, the local model that does not need to be changed in the decision tree model is locked, and only the nodes that need to be changed or retrained are retrained, which saves the time and training computing resources for retraining the decision tree model in interactive modeling and improves the modeling efficiency.

[0103] Furthermore, based on the first embodiment of the method for processing a decision tree model, a second embodiment of the method for processing a decision tree model of the present invention is proposed.

[0104] In a second embodiment of the method for processing a decision tree model of the present invention, in the above step S400, before retraining the unlocked nodes in the model to be trained, the method for processing a decision tree model of the present invention further includes:

[0105] Step S600: Detect each predecessor node of the preset training-free node in the to-be-trained model, and lock each predecessor node.

[0106] After detecting that the modeler clicks on the command control to start retraining, an operation instruction for retraining the decision tree model is generated. In the decision, there is a preset free-training node selected by the modeler in advance, and the node information on the detected preset free-training node is extracted and retained. Then, all the predecessor nodes of the preset free-training node in the model to be trained are further automatically detected and locked, and then the difference is visually output and displayed (such as Figure 5As shown, the original white display color is changed into gray for display output for identification and confirmation by the modeler) on the visual operation interface for the modeler to perform interactive operations, and when the model to be trained is subsequently trained on some nodes that the modeler needs to retrain, the node information on all the predecessor nodes is also extracted and retained, so as to avoid changes or repeated calculations on the node information on the predecessor nodes on the preset training-free node when performing the retraining operation on some nodes that the modeler needs to retrain.

[0107] It should be noted that, in this embodiment, when any node in the decision tree is locked and does not participate in training, since the survival of the current node is completely dependent on its parent node at the previous level (i.e., the predecessor node), in order to ensure that its splitting rules and other node information will not change, it is necessary to lock all the predecessor nodes in the decision tree model at the current points, that is, all of its predecessor nodes cannot be retrained. Therefore, it is necessary to retain the node information of all predecessor nodes of the preset training-free nodes in the training model to be trained, so as to avoid the node information of any predecessor node changing. The node information of the preset training-free node selected by the modeler will also change accordingly, or even the preset training-free node will no longer exist.

[0108] In this embodiment, by locking all predecessor nodes of the non-training nodes independently selected by the modeler in the to-be-trained model where some nodes that the modeler needs to retrain are located in the to-be-trained model specified in the decision tree model, it is ensured that the non-training nodes are not affected when the to-be-trained model is retrained. The modeler only needs to manually select some important non-training nodes independently, and in the process of retraining the decision tree model to establish a new model, it is ensured that only some nodes that need to be retrained are operated, thereby saving the time and a large amount of manual resources consumed by the modeler's manual operation, and improving the flexibility and efficiency of modeling.

[0109] Furthermore, based on the first embodiment of the method for processing a decision tree model, a third embodiment of the method for processing a decision tree model of the present invention is proposed.

[0110] Please refer to Figure 3 , Figure 3 The detailed flow chart of step S200 in the first embodiment of the processing method of the decision tree model of the present invention is as follows. In this embodiment, the above step S200 detects whether the model to be trained specified by the operation instruction contains a preset training-free node, including:

[0111] Step S201, detecting a training node specified by the operation instruction in the decision tree model.

[0112] Specifically, for example, in a visual interactive operation interface for interactive operations, the entire operation process of the modeler performing interactive operations on the current decision tree model is monitored, and when it is detected that the modeler first selects any node in the current decision tree model based on the cursor in the visual interface, then clicks to call up a function menu, and then selects and clicks any command control in the function menu based on the cursor, in a series of front-end operations, the modeler generates and obtains the operation instruction for retraining the decision tree model mapped by the command control based on clicking the command control to start retraining, the training node selected by the modeler in the decision tree model.

[0113] Step S202: extracting, from the decision tree model, a sub-decision tree model with the training node as a root node as a model to be trained specified by the operation instruction.

[0114] Specifically, for example, in the current decision tree model on which the modeler performs retraining based on interactive operations to build a new decision tree model, the training node specified by the operation instruction for retraining the decision tree model is used as the root node, and the sub-decision tree model of all branches and nodes below the root node in the current decision tree model is intercepted as the model to be trained on which the modeler needs to perform retraining operations.

[0115] Step S203, detecting whether all nodes of the extracted sub-decision tree model contain the preset training-free node.

[0116] Specifically, for example, in the sub-decision tree model with the training node specified by the operation instruction for retraining the decision tree model as the root node in the intercepted current decision tree model, each node in the sub-decision tree is traversed in turn in a pre-order traversal manner to detect and determine whether all the nodes of the sub-decision tree model contain the preset training-free nodes independently selected by the modeling personnel.

[0117] It should be noted that, in this embodiment, other traversal methods (such as in-order traversal, post-order traversal, etc.) can also be used to traverse and detect all nodes in the sub-decision tree model to determine whether a preset training-free model is contained.

[0118] For further information, please refer to Figure 4 , Figure 4 This is a detailed flow chart of step S400 in the first embodiment of the processing method of the decision tree model of the present invention. In this embodiment, the above step S400, in the model to be trained, retrains the unlocked nodes, including:

[0119] Step S401, extracting node information of each node in the model to be trained, wherein the node information at least includes: a splitting rule.

[0120] Step S402, according to the hierarchical relationship between the nodes of the model to be trained, the splitting rules of the unlocked nodes in the model to be trained are recalculated in sequence.

[0121] Specifically, for example, after obtaining the operation instruction for retraining the decision tree model mapped by the instruction control generated by the modeling personnel based on the interactive operation to click on the instruction control to start retraining, in the sub-decision tree model with the training node specified by the operation instruction as the root node, all branches and nodes below the root node in the current decision tree model are intercepted, and starting from the root node, according to the hierarchical relationship of parent node-child node-leaf node, all nodes in the sub-decision tree model that do not retain node information (i.e., node splitting rules) are retrained in turn, that is, the node rules of each node that does not retain the node splitting rules are recalculated and updated.

[0122] In this embodiment, in the original decision tree model based on which the modeler performs modeling based on interactive operations, the training node specified in the original decision tree model by the operation instruction triggered by the modeler to start retraining is detected, and a sub-decision tree model is extracted from the original decision tree model with the training node as the model to be trained specified by the retraining operation instruction, and then the preset training-free nodes in all the nodes of the extracted sub-decision tree model are detected, and finally the node information of each node in the model to be trained is extracted, and according to the hierarchical relationship between the nodes of the model to be trained, the node information of the unlocked nodes in the model to be trained is recalculated in turn, so as to retrain the original decision tree model and then construct a new decision tree model, so that when the original decision tree model is retrained, only the nodes that need to be trained in some sub-decision tree models are trained, which saves the time wasted in training overlapping feature nodes when the original decision tree model is trained as a whole, and further improves the efficiency of interactive modeling.

[0123] In addition, please refer to Figure 6 The embodiment of the present invention further provides a processing device for a decision tree model. The processing device for a decision tree model of the present invention comprises:

[0124] An acquisition module, used to obtain operation instructions for retraining a decision tree model;

[0125] A detection module, used to detect whether the model to be trained specified by the operation instruction contains a preset training-free node;

[0126] A locking module, used for locking the preset training-free node when the preset training-free node is detected;

[0127] The execution module is used to retrain the unlocked nodes in the model to be trained.

[0128] Preferably, the locking module of the processing device of the decision tree model of the present invention is also used to detect each predecessor node of the preset training-free node in the model to be trained, and lock each of the predecessor nodes.

[0129] Preferably, the execution module includes:

[0130] A first extraction unit is used to extract node information of each node in the model to be trained, wherein the node information at least includes: a splitting rule;

[0131] The training calculation unit is used to recalculate the splitting rules of the unlocked nodes in the model to be trained in turn according to the hierarchical relationship between the nodes of the model to be trained.

[0132] Preferably, the detection module comprises:

[0133] A first detection unit, used to detect a training node specified by the operation instruction in the decision tree model;

[0134] A second extraction unit is used to extract, from the decision tree model, a sub-decision tree model with the training node as a root node as a model to be trained specified by the operation instruction;

[0135] The second detection unit is used to detect whether all the nodes of the extracted sub-decision tree model contain the preset training-free node.

[0136] Preferably, the processing device of the decision tree model of the present invention further includes:

[0137] The marking module is used to mark the selected and locked nodes in the decision tree model as the preset training-free nodes and perform difference visualization output.

[0138] Preferably, the marking module comprises:

[0139] A first identification unit, used to identify a node locking operation performed on the decision tree model;

[0140] A marking unit, used to mark the node corresponding to the node locking operation as a preset training-free node;

[0141] A display unit is used to visualize and output the preset training-free node differences to an interactive operation interface for the decision tree model.

[0142] Preferably, the acquisition module includes:

[0143] A second identification unit, used to identify a node training operation performed on the decision tree model;

[0144] An instruction generation unit is used to trigger the generation of an operation instruction for retraining the decision tree model based on the node training operation.

[0145] In addition, an embodiment of the present invention also proposes a computer-readable storage medium, which is applied to a computer. The computer-readable storage medium may be a non-volatile computer-readable storage medium, on which a processing program for a decision tree model is stored. When the processing program for the decision tree model is executed by a processor, the steps of the processing method for the decision tree model as described above are implemented.

[0146] Among them, the steps implemented when the processing program of the decision tree model running on the processor is executed can refer to the various embodiments of the processing method of the decision tree model of the present invention, and will not be repeated here.

[0147] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0148] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0149] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0150] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for processing a decision tree model, characterized in that: The processing method of the decision tree model comprises: Get the operation instructions for retraining the decision tree model; Detecting whether the model to be trained specified by the operation instruction contains a preset training-free node; When the preset training-free node is detected, the preset training-free node is locked; In the to-be-trained model, retraining the unlocked nodes; Before the step of obtaining the operation instruction for retraining the decision tree model, the method further includes: Identifying a node locking operation performed on the decision tree model; Marking the node corresponding to the node locking operation as a preset training-free node; Outputting the preset training-free node differences visually to an interactive operation interface for the decision tree model; In the model to be trained, before the step of retraining the unlocked nodes, the method further includes: In the to-be-trained model, each predecessor node of the preset training-free node is detected, and each predecessor node is locked.

2. The processing method of the decision tree model according to claim 1, characterized in that: The step of retraining the unlocked nodes in the model to be trained comprises: Extracting node information of each node in the model to be trained, wherein the node information at least includes: a splitting rule; According to the hierarchical relationship between the nodes of the model to be trained, the splitting rules of the unlocked nodes in the model to be trained are recalculated in turn.

3. The processing method of the decision tree model according to claim 1, characterized in that: The step of detecting whether the model to be trained specified by the operation instruction contains a preset training-free node includes: Detecting a training node specified by the operation instruction in the decision tree model; In the decision tree model, extracting a sub-decision tree model with the training node as the root node as the model to be trained specified by the operation instruction; Detect whether all nodes of the extracted sub-decision tree model contain the preset training-free node.

4. The method for processing a decision tree model according to claim 1, characterized in that: The step of obtaining an operation instruction for retraining the decision tree model includes: Identifying a node training operation performed on the decision tree model; Based on the node training operation, trigger the generation of an operation instruction for retraining the decision tree model.

5. A processing device for a decision tree model, characterized in that: The processing device of the decision tree model comprises: An acquisition module, used to obtain operation instructions for retraining a decision tree model; A detection module, used to detect whether the model to be trained specified by the operation instruction contains a preset training-free node; A locking module, used for locking the preset free-training node when the preset free-training node is detected; the locking module is also used for detecting each predecessor node of the preset free-training node in the model to be trained, and locking each predecessor node; An execution module, used for retraining the unlocked nodes in the model to be trained; A marking module, used for marking the selected and locked nodes in the decision tree model as the preset training-free nodes and performing a difference visualization output; The marking module comprises: A first identification unit, used to identify a node locking operation performed on the decision tree model; A marking unit, used to mark the node corresponding to the node locking operation as a preset training-free node; A display unit is used to visualize and output the preset training-free node differences to an interactive operation interface for the decision tree model.

6. A terminal device, characterized in that: The terminal device includes: a memory, a processor, and a processing program of a decision tree model stored in the memory and executable on the processor. When the processing program of the decision tree model is executed by the processor, the steps of the processing method of the decision tree model as described in any one of claims 1 to 4 are implemented.

7. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for processing a decision tree model according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Media information classification method, method and apparatus for training picture classification model

    CN109344884A