Method for generating decision tree model, terminal device, service device and system

By generating and interactively tuning decision tree models in a distributed cluster, the problem of limited single-machine performance is solved, realizing an efficient method for generating decision tree models that utilizes massive amounts of data and is user-friendly, thereby improving model performance and user experience.

CN117312994BActive Publication Date: 2026-02-06DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311277844.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2026-02-06
Estimated Expiration
2043-09-28

AI Technical Summary

Technical Problem

Existing interactive decision tree models suffer from poor performance due to limited single-machine performance and inability to utilize massive amounts of data.

Method used

By sending instructions to service devices to generate a decision tree model using a distributed cluster, and allowing users to interactively adjust it until the requirements are met, the decision tree model can be updated and adjusted by combining the resource scheduling of the distributed cluster and the operation information input by the user.

Benefits of technology

It improves the performance of decision tree models, supports interactive adjustments of massive amounts of data, increases operational efficiency and resource utilization, meets the parallel development needs of multiple users and multiple tasks, and enhances user experience and model interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117312994B_ABST
    Figure CN117312994B_ABST
Patent Text Reader

Abstract

The application provides a decision tree model generation method, a terminal device, a service device and a system. The method is applied to the terminal device, and the method comprises the following steps: sending a first instruction corresponding to input parameter data to the service device, so that the service device determines a current decision tree model based on a distributed cluster, and sends a decision tree structure of the current decision tree model to the terminal device; outputting decision tree information; obtaining operation information input by a user for the decision tree information; if the operation information indicates that adjustment is not completed, sending a second instruction corresponding to the operation information to the service device, so that the service device updates the current decision tree model according to the second instruction, and sends a decision tree structure of the updated current decision tree model to the terminal device; and if the operation information indicates that adjustment is completed, obtaining a target decision tree model corresponding to the decision tree information which is adjusted and completed. The application can improve the performance of the decision tree model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular to a decision tree model generation method, a terminal device, a service device and a system. BACKGROUND

[0002] Since the decision tree model has good interpretability, the decision tree model is widely used in many fields. At present, the commonly used decision tree model modeling method is usually interactive modeling. Interactive modeling can usually be adjusted through multiple human interactions to set the division rules of the decision tree nodes, so that the decision tree model can split nodes, grow trees or prune according to the artificial expected direction. However, it is found in practice that interactive modeling is based on single machine operation, and the performance of single machine operation is limited, which leads to the fact that interactive modeling cannot utilize massive data to establish a decision tree model, thereby causing the performance of the established decision tree model to be poor. SUMMARY

[0003] Therefore, the embodiments of the present application provide a decision tree model generation method, a terminal device, a service device and a system to solve the problem of poor performance of the decision tree model.

[0004] In a first aspect of the embodiments of the present application, a decision tree model generation method is provided, applied to a terminal device, and the method comprises:

[0005] sending a first instruction corresponding to the input parameter data to a service device corresponding to the terminal device, so that the service device determines a current decision tree model corresponding to the first instruction based on a distributed cluster, and sends a decision tree structure of the current decision tree model to the terminal device; wherein the first instruction at least includes a cluster data address and a configuration parameter;

[0006] outputting decision tree information containing the decision tree structure;

[0007] obtaining operation information input by a user for the decision tree information;

[0008] if the operation information indicates that the adjustment for the decision tree information is not completed, determining a second instruction corresponding to the operation information, and sending the second instruction to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends a decision tree structure of the updated current decision tree model to the terminal device; and performing the steps from outputting the decision tree information containing the decision tree structure to obtaining the operation information input by the user for the decision tree information;

[0009] If the operation information indicates that the adjustment for the decision tree information is completed, a target decision tree model corresponding to the decision tree information is obtained.

[0010] In one embodiment of the present embodiment, the output includes decision tree information of the decision tree structure, comprising:

[0011] The decision tree structure is parsed to obtain structure information of the decision tree structure, wherein the structure information at least includes node information, split condition and path information.

[0012] The decision tree information including the decision tree structure and the structure information is output.

[0013] In one embodiment of the present embodiment, the determination of the second instruction corresponding to the operation information comprises:

[0014] The operation information is parsed to obtain an adjustment type and an adjustment parameter, wherein the adjustment type at least includes a pruning type, a node split type, an artificial split type, a downward extension type and a result derivation type.

[0015] The adjustment type and the adjustment parameter are determined as the second instruction.

[0016] In one embodiment of the present embodiment, after the target decision tree model corresponding to the decision tree information is obtained, the method further comprises:

[0017] The output decision tree information is closed;

[0018] A closing instruction is sent to the service device, wherein the closing instruction is used to close the target decision tree model determined based on the distributed cluster.

[0019] In one embodiment of the present embodiment, after the target decision tree model corresponding to the decision tree information is obtained, the method further comprises:

[0020] When the user input restart information is detected, the restart information is parsed to obtain restart data and historical cluster data address of a historical decision tree structure;

[0021] A restart instruction including the restart data and the historical cluster data address is sent to the service device, so that the service device recovers a historical decision tree model from the distributed cluster based on the historical cluster data address, and runs the historical decision tree model based on the restart data to obtain a decision result, and the decision result is sent to the terminal device.

[0022] In a second aspect of the present invention, a method for generating a decision tree model is provided, applied to a service device, the method comprising:

[0023] Obtain the cluster data address and configuration parameters from the first instruction sent by the terminal device;

[0024] Obtain target cluster data that matches the cluster data address from the distributed cluster;

[0025] Based on the target cluster data and the configuration parameters, the current decision tree model is generated;

[0026] The decision tree structure of the current decision tree model is sent to the terminal device so that the terminal device outputs decision tree information containing the decision tree structure, and a second instruction corresponding to the operation information is sent to the service device; wherein, the operation information is information input by the user to perform an operation on the decision tree information;

[0027] When the second instruction sent by the terminal device is received, the operation information is obtained from the second instruction;

[0028] The current decision tree model is updated based on the operation information to obtain the updated current decision tree model;

[0029] Send the updated decision tree structure of the current decision tree model to the terminal device, and execute the steps from obtaining the operation information from the second instruction sent by the terminal device when the second instruction is received to sending the updated decision tree structure of the current decision tree model to the terminal device.

[0030] In one embodiment of this implementation, the operation information includes at least adjustment type and adjustment parameters. The adjustment type includes at least pruning type, node splitting type, manual splitting type, downward extension type, and result derivation type. Updating the current decision tree model according to the operation information to obtain the updated current decision tree model includes:

[0031] Determine the objective function that matches the adjustment type;

[0032] The current decision tree model is updated based on the adjustment parameters and the objective function to obtain the updated current decision tree model.

[0033] In one embodiment of this implementation, after sending the updated decision tree structure of the current decision tree model to the terminal device, the method further includes:

[0034] When a shutdown command is received from the terminal device, the target cluster data address is obtained from the shutdown command;

[0035] Determine the target decision tree model corresponding to the target cluster data address from the distributed cluster;

[0036] The target decision tree model is closed.

[0037] In one embodiment of this implementation, after sending the updated decision tree structure of the current decision tree model to the terminal device, the method further includes:

[0038] When a restart command is received from the terminal device, restart data and historical cluster data address are obtained from the restart command;

[0039] Recover the historical decision tree model corresponding to the historical cluster data address from the distributed cluster;

[0040] The historical decision tree model is run based on the restart data to obtain the decision results;

[0041] The decision result is sent to the terminal device.

[0042] In a third aspect of the present invention, a system for generating a decision tree model is provided, the system comprising a terminal device and a service device, wherein:

[0043] The terminal device is used to send a first instruction corresponding to the input parameter data to the service device; wherein the first instruction includes at least a cluster data address and configuration parameters;

[0044] The service device is configured to obtain a cluster data address and configuration parameters from the received first instruction; obtain target cluster data matching the cluster data address from the distributed cluster; generate a current decision tree model based on the target cluster data and the configuration parameters; and send the decision tree structure of the current decision tree model to the terminal device.

[0045] The terminal device is further configured to output decision tree information containing the decision tree structure; and acquire operation information input by the user regarding the decision tree information; if the operation information indicates that the adjustment of the decision tree information is not completed, then determine a second instruction corresponding to the operation information and send the second instruction to the service device; if the operation information indicates that the adjustment of the decision tree information is completed, then obtain the adjusted target decision tree model corresponding to the decision tree information.

[0046] The service device is further configured to, when receiving the second instruction sent by the terminal device, obtain the operation information from the second instruction; update the current decision tree model according to the operation information to obtain the updated current decision tree model; and send the decision tree structure of the updated current decision tree model to the terminal device to trigger the terminal device to output decision tree information containing the decision tree structure and obtain the operation information input by the user regarding the decision tree information.

[0047] In one embodiment of this implementation, the terminal device outputs decision tree information containing the decision tree structure in the following specific manner:

[0048] The decision tree structure is parsed to obtain its structural information; wherein the structural information includes at least node information, splitting conditions, and path information.

[0049] The output includes decision tree information containing the decision tree structure and the structure information.

[0050] In one embodiment of this implementation, the terminal device determines the second instruction corresponding to the operation information in the following specific way:

[0051] The operation information is parsed to obtain the adjustment type and adjustment parameters; wherein, the adjustment type includes at least pruning type, node splitting type, manual splitting type, downward extension type, and result export type;

[0052] The adjustment type and the adjustment parameters are determined as the second instruction.

[0053] In one embodiment of this implementation, the service device updates the current decision tree model according to the operation information, and the updated current decision tree model is obtained in the following specific way:

[0054] Determine the objective function that matches the adjustment type;

[0055] The current decision tree model is updated based on the adjustment parameters and the objective function to obtain the updated current decision tree model.

[0056] In one embodiment of this implementation, wherein:

[0057] The terminal device is further configured to, after obtaining the adjusted target decision tree model corresponding to the decision tree information, close the output decision tree information; and send a close command to the service device; wherein the close command is used to close the target decision tree model determined based on the distributed cluster;

[0058] The service device is further configured to obtain a target cluster data address from the shutdown instruction, determine a target decision tree model corresponding to the target cluster data address from the distributed cluster, and shut down the target decision tree model.

[0059] In one embodiment of the embodiment, wherein:

[0060] The terminal device is further configured to, after obtaining the target decision tree model corresponding to the decision tree information after adjustment is completed, parse restart information input by a user to obtain restart data and a historical cluster data address of a historical decision tree structure when detecting the restart information, and send a restart instruction containing the restart data and the historical cluster data address to the service device.

[0061] The service device is further configured to obtain restart data and a historical cluster data address from the restart instruction, restore a historical decision tree model corresponding to the historical cluster data address from the distributed cluster, run the historical decision tree model based on the restart data to obtain a decision result, and send the decision result to the terminal device.

[0062] In a fourth aspect of the embodiment, a terminal device is provided, comprising:

[0063] A first sending unit is configured to send a first instruction corresponding to input parameter data to a service device corresponding to the terminal device, so that the service device determines a current decision tree model corresponding to the first instruction based on a distributed cluster and sends a decision tree structure of the current decision tree model to the terminal device. The first instruction at least includes a cluster data address and a configuration parameter.

[0064] An output unit is configured to output decision tree information containing the decision tree structure.

[0065] A first obtaining unit is configured to obtain operation information input by a user for the decision tree information.

[0066] A second sending unit is configured to, if the operation information indicates that adjustment for the decision tree information is not completed, determine a second instruction corresponding to the operation information, send the second instruction to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends a decision tree structure of the updated current decision tree model to the terminal device, and control the output unit to output the decision tree information containing the decision tree structure, and control the first obtaining unit to obtain operation information input by a user for the decision tree information.

[0067] The model determining unit is configured to obtain a target decision tree model corresponding to the decision tree information if the operation information indicates that the adjustment for the decision tree information is completed.

[0068] In a fifth aspect of the embodiments of the present application, a method is provided

[0069] The service device comprises:

[0070] The second obtaining unit is configured to obtain the cluster data address and the configuration parameter from the received first instruction sent by the terminal device.

[0071] The third obtaining unit is configured to obtain target cluster data matched with the cluster data address from the distributed cluster.

[0072] The generating unit is configured to generate a current decision tree model based on the target cluster data and the configuration parameter.

[0073] The third sending unit is configured to send a decision tree structure of the current decision tree model to the terminal device, so that the terminal device outputs decision tree information containing the decision tree structure and sends a second instruction corresponding to operation information to the service device; the operation information is information input by a user for operating the decision tree information.

[0074] The fourth obtaining unit is configured to obtain the operation information from the second instruction when the second instruction sent by the terminal device is received.

[0075] The updating unit is configured to update the current decision tree model according to the operation information, to obtain an updated current decision tree model.

[0076] The fourth sending unit is configured to send a decision tree structure of the updated current decision tree model to the terminal device, and control the fourth obtaining unit to obtain the operation information from the second instruction when the second instruction sent by the terminal device is received, and control the updating unit to update the current decision tree model according to the operation information, to obtain an updated current decision tree model, and perform the operation of sending the decision tree structure of the updated current decision tree model to the terminal device.

[0077] In a sixth aspect of the embodiments of the present application, an electronic device is provided, comprising a processor and a memory storing programs; wherein the programs comprise instructions which, when executed by the processor, cause the processor to perform the method of any one of the first aspect and the second aspect.

[0078] In a seventh aspect of the embodiments of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause a computer to execute the method in any one of the first aspect and the second aspect.

[0079] The one or more technical solutions provided in the embodiments of the present application can generate the first instruction containing the cluster data address and the configuration parameter according to the parameter data received by the terminal device, and can send the first instruction to the service device, so that the service device can determine the current decision tree model corresponding to the first instruction based on the distributed cluster, and can feed back the decision tree structure of the decision tree model to the terminal device, so that the user of the terminal device adjusts the decision tree structure until the decision tree structure of the obtained decision tree model meets the needs of the user. It can be seen that the embodiments of the present application can generate the decision tree model based on the massive data stored in the distributed cluster, and can also adjust the decision tree model according to the needs of the user, thereby realizing the technical effect of improving the performance of the decision tree model. BRIEF DESCRIPTION OF DRAWINGS

[0080] In the following description of exemplary embodiments in conjunction with the accompanying drawings, more details, features and advantages of the present application are disclosed, in which:

[0081] Figure 1 A flow chart of a method for generating a decision tree model according to an exemplary embodiment of the present application is shown;

[0082] Figure 2 A schematic diagram of an application scenario of a method for generating a decision tree model according to an exemplary embodiment of the present application is shown;

[0083] Figure 3 A flow chart of another method for generating a decision tree model according to an exemplary embodiment of the present application is shown;

[0084] Figure 4 A flow chart of still another method for generating a decision tree model according to an exemplary embodiment of the present application is shown;

[0085] Figure 5 A schematic diagram of the structure of a system for generating a decision tree model according to an exemplary embodiment of the present application is shown;

[0086] Figure 6 A schematic diagram of the structure of a terminal device according to an exemplary embodiment of the present application is shown;

[0087] Figure 7 A schematic diagram of the structure of a service device according to an exemplary embodiment of the present application is shown;

[0088] Figure 8A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the application is shown. DETAILED DESCRIPTION

[0089] Embodiments of the application will be described in more detail with reference to the drawings. While several embodiments of the application are shown in the drawings, it is understood that the application can be embodied in various forms and should not be interpreted in a limited sense. Rather, these embodiments are provided so that this disclosure will be thorough and complete. It is understood that the drawings and embodiments are for illustrative purposes only and should not be construed as limiting the scope of the application.

[0090] It should be understood that the various steps of the method embodiments of the application can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit performing the steps shown. The scope of the application is not limited in this respect.

[0091] The term "comprising" and variations thereof as used herein are used inclusively, i.e., "comprising but not limited to." The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related terms are defined in the description that follows. It should be noted that reference herein to "first", "second", etc. concepts merely serves to distinguish different apparatuses, modules, or units, and is not intended to limit the order or interdependence of the functions performed by these apparatuses, modules, or units.

[0092] It should be noted that the terms "a" and "an" and "the" and similar referents used in the context of describing the application are to be construed to cover both the singular and the plural, unless otherwise indicated herein or clearly contradicted by context. Recitation of one or more examples of a feature or component is not an admission that such feature or component is a complete or exhaustive list of possible features or components.

[0093] The names of the messages or information exchanged between the various apparatuses in the embodiments of the application are used only for illustrative purposes and are not intended to limit the scope of the messages or information.

[0094] Reference will now be made to Figure 1 , Figure 1 A flowchart of a method of generating a decision tree model according to an exemplary embodiment of the application is shown. It should be noted that the embodiments of the application can be applied to a terminal device.

[0095] Figure 1 The flow of a method of generating a decision tree model according to an exemplary embodiment of the application is shown, comprising:

[0096] Step S101, a first instruction corresponding to the input parameter data is sent to a service device corresponding to the terminal device, so that the service device determines a current decision tree model corresponding to the first instruction based on a distributed cluster, and sends a decision tree structure of the current decision tree model to the terminal device.

[0097] Please refer to Figure 2 , Figure 2 An application scene schematic diagram of a decision tree model generation method according to an exemplary embodiment of the present application is shown. Figure 2 The terminal device and the service device are included in the system, and the interaction mode of the terminal device and the service device adopts the gRPC mode. The terminal device is a platform where the interactive decision tree model is located; the service device is a Python task that is resident on an Xlearning (a deep learning scheduling platform). The Xlearning is integrated based on Hadoop Yarn.

[0098] In the embodiment of the present application, the gRPC is a general open source RPC framework, mainly facing mobile application development and being designed based on the HTTP / 2 protocol standard, and supporting most popular programming languages. The ProductInfo.proto file is used to generate a terminal device stub (gRPCStub) and generate service device code storage into a gRPC server (gRPCServer). The gRPCStub can be implemented based on the Java language, and the code in the gRPCServer can be implemented based on the Python language. The network communication between the terminal device and the service device uses the gRPC protocol through HTTP / 2.

[0099] In addition, the gRPCStub provides the same method as the gRPCServer, the terminal device converts the operation of the user on the platform into a corresponding gRPC instruction through the Protocol Buffer, and sends the gRPC instruction to the service device to call the corresponding function of the service device; the service device can call the matching encapsulation function according to the gRPC instruction issued by the client; and the running result is obtained by running the gRPC instruction through the encapsulation function; and the running result can be returned to the terminal device. The Protocol Buffer is an independent data exchange format.

[0100] It can be seen that the embodiment of the present application completes the integration of the interactive decision tree model based on the task scheduling and running mode of the distributed cluster. Through the cluster resource scheduling, the interactive adjustment of massive data is supported, the running efficiency is improved, and the conditions of elastic expansion and contraction are met with the growth of the business. According to the data size, the resources are allocated on demand, and the resource utilization efficiency is improved.

[0101] In the embodiment of the present application, the parameter data can be data input by a user through a terminal device. The parameter data can include cluster data addresses and configuration parameters. The cluster data addresses can be cluster data addresses of data required for constructing a decision tree model in a distributed cluster. The configuration parameters can include at least a decision tree type of a decision tree model to be constructed and decision tree construction parameters. For example, the decision tree construction parameters can include a number of layers of the decision tree, node information, and a correspondence between nodes, etc. The embodiment of the present application is not limited in this regard.

[0102] Therefore, the first instruction corresponding to the parameter data includes at least the cluster data addresses and the configuration parameters, so that the service device can accurately construct the decision tree model according to the cluster data addresses and the configuration parameters in the first instruction.

[0103] Optionally, the terminal device can support multiple users to input different parameter data at the same time, so as to construct different decision tree models according to the different parameter data.

[0104] In step S102, decision tree information containing the decision tree structure is output.

[0105] In the embodiment of the present application, the decision tree information can contain the decision tree structure, and can also contain node information in the decision tree, a split condition of each node, and path information of the decision tree, etc. The embodiment of the present application is not limited in this regard. In addition, the decision tree information can be output in the form of an image and / or text.

[0106] As an optional implementation, the manner of outputting the decision tree information containing the decision tree structure in step S102 can be specifically as follows:

[0107] The decision tree structure is parsed to obtain structure information of the decision tree structure. The structure information at least includes node information, a split condition, and path information.

[0108] The decision tree information containing the decision tree structure and the structure information is output.

[0109] In this implementation, the decision tree structure can be parsed to obtain a plurality of different structure information, such as node information, a split condition, and path information, etc. By outputting these different structure information, the user can have a more comprehensive understanding of the decision tree structure, and the user experience is improved.

[0110] Specifically, the node information can include information of all nodes existing in the decision tree structure, such as a number of nodes, a level of a node, and specific decision information of the node, etc. The specific decision information of the node can be determined according to an actual application scenario of the decision tree model.

[0111] For example, if the actual application scenario of the decision tree model is a financial scenario, the specific decision information of the node can be business information such as the number of people, category information, average value, standard deviation, Gini coefficient, and overdue rate.

[0112] The split condition can be a split feature and a threshold value corresponding to each node.

[0113] The path information can be path information of an entire path of the decision tree structure from a root node to a leaf node.

[0114] In step S103, operation information input by a user for the decision tree information is obtained.

[0115] In the embodiment of the present application, after the user views the decision tree information output by the terminal device, the user may need to make partial adjustments to the decision tree structure, and may also need to obtain other information about the decision tree structure. Therefore, the user can input operation information for the decision tree information through the terminal device. The operation information can be used to indicate whether the adjustment of the decision tree information is complete. If it is complete, the current decision tree model can be determined as the final adjusted decision tree model; if it is not complete, the adjustment operation that needs to be made to the decision tree model can be continuously obtained from the operation information.

[0116] In step S104, it is determined whether the operation information indicates that the adjustment of the decision tree information is complete.

[0117] In step S105, if not, a second instruction corresponding to the operation information is determined, and the second instruction is sent to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends the decision tree structure of the updated current decision tree model to the terminal device; and steps S102-S104 are executed.

[0118] As an optional implementation, the manner in which step S105 determines the second instruction corresponding to the operation information can be specifically as follows:

[0119] The operation information is analyzed to obtain an adjustment type and an adjustment parameter; wherein the adjustment type at least includes a pruning type, a node split type, an artificial split type, a downward extension type, and a result derivation type;

[0120] The adjustment type and the adjustment parameter are determined as the second instruction.

[0121] Wherein, the embodiment can make the user input operation information of various adjustment types, and can determine the parameters used in the adjustment of the decision tree model according to the adjustment type, so that the user can more accurately adjust the decision tree model, and the efficiency of the decision tree model adjustment is improved.

[0122] Specifically, the adjustment operation corresponding to the pruning type can be pruning the subtree of a node to make the node a leaf node, and the adjustment parameter corresponding to the pruning type can include the node identifier of the target node to be pruned, the subtree information to be removed, and the like.

[0123] The adjustment operation corresponding to the node splitting type can be selecting different split gain methods, calculating the optimal split combination for each node, and feeding back the calculation result, and the adjustment parameter corresponding to the node splitting type can include information such as the business indicators (such as Gini coefficient, delinquency rate, etc.) concerned by the split gain method; wherein, the split gain method can be implemented based on machine learning, and the optimal split combination can represent the combination relationship of the features and thresholds of the node.

[0124] The adjustment operation corresponding to the manual splitting type can be splitting the node according to the features and thresholds of the node input by the user, and the adjustment parameter corresponding to the manual splitting type can include the features and thresholds of the node input by the user, and the like.

[0125] The adjustment operation corresponding to the down extension type can be automatic growth based on different split gain methods when the user determines that a certain node is not developed enough, and the adjustment parameter corresponding to the down extension type can include the node identifier of the target node to be down-extended and information such as the business indicators (such as Gini coefficient, delinquency rate, etc.) concerned by the split gain method for the target node.

[0126] The operation corresponding to the result export type can be exporting the tree result output after the interaction adjustment, and the adjustment parameter corresponding to the result export type can include result export format information; the result export format information can include tree pictures, Python functions, rules, and the like, which are not limited by the embodiments of the present application.

[0127] As can be seen, the embodiments of the present application meet the tree structure adjustment requirements including calculation of the optimal split combination, manual input of threshold splitting, automatic growth, pruning, and the like, can realize the whole process of rule generation in work, and can meet the needs of high interpretability of rule generation and the scenarios requiring manual intervention strategy.

[0128] In step S106, if yes, a target decision tree model corresponding to the decision tree information is obtained after adjustment.

[0129] As an optional implementation, after step S106 obtains the target decision tree model corresponding to the decision tree information after adjustment, the following steps can be further performed:

[0130] closing the output of the decision tree information;

[0131] sending a closing instruction to the service device, wherein the closing instruction is used to close the target decision tree model determined based on the distributed cluster.

[0132] By implementing this implementation, the target decision tree model generated based on the distributed cluster can be closed by the service device according to the closing instruction after the adjustment of the decision tree model is completed, so that the memory occupied by the service device for running the decision tree model is saved, and the running efficiency of the service device is improved.

[0133] In the embodiment of the application, after it is determined that the adjustment of the target decision tree model is completed, the decision tree information output by the terminal device can be closed to avoid the case that the user makes a mistake on the terminal device.

[0134] Optionally, after step S106 obtains the target decision tree model corresponding to the decision tree information after adjustment, the following steps can be further performed:

[0135] When the restart information input by the user is detected, the restart information is parsed to obtain restart data and a historical cluster data address of a historical decision tree structure;

[0136] sending a restart instruction containing the restart data and the historical cluster data address to the service device, so that the service device recovers a historical decision tree model from the distributed cluster based on the historical cluster data address, runs the historical decision tree model based on the restart data to obtain a decision result, and sends the decision result to the terminal device.

[0137] By implementing this implementation, the restart information input by the user can be parsed to determine the historical cluster data address of the historical decision tree structure that the user needs to restart, and a restart instruction containing the restart data and the historical cluster data address can be sent to the service device, so that the service device determines the historical decision tree model from the distributed cluster according to the historical cluster data address, and then runs the historical decision tree model based on the restart data to obtain the final decision result. It can be seen that, by this way, the historical decision tree model can be obtained from the distributed cluster in time when the user needs to use the historical decision tree model, and the flexibility of the use of the decision tree model is improved.

[0138] In the embodiment of the present application, the restart data can be used as input to the historical decision tree model, so that the historical decision tree model performs operation according to the restart data, and outputs a decision result corresponding to the restart data.

[0139] The embodiment of the present application realizes traceability and adjustability of the decision tree splitting process through the construction of the interactive decision tree model, and improves the interpretability of the output decision tree model. Meanwhile, based on the capability of the distributed cluster, the distributed task resource is scheduled, the model performance problem caused by massive data is solved, and the parallel development of multiple users and multiple tasks is realized.

[0140] Reference will now be made to Figure 3 , Figure 3 A flowchart of another method for generating a decision tree model according to an exemplary embodiment of the present application is shown. It should be noted that the embodiments of the present application can be applied to a service device.

[0141] Figure 3 The flow of the method for generating another decision tree model according to an exemplary embodiment of the present application shown includes:

[0142] In step S301, the cluster data address and the configuration parameters are obtained from the first instruction received and sent by the terminal device.

[0143] In step S302, the target cluster data matching the cluster data address is obtained from the distributed cluster.

[0144] In the embodiment of the present application, the distributed cluster can be a hadoop cluster, a zookeeper cluster or an elasticsearch cluster, etc., and the present embodiment does not limit this. A large amount of data can be pre-stored in the distributed cluster, and the corresponding target cluster data can be obtained from the distributed cluster through the obtained cluster data address.

[0145] In step S303, the current decision tree model is generated based on the target cluster data and the configuration parameters.

[0146] In the embodiment of the present application, the Xleaning task pre-constructed in the service device can be used to generate the current decision tree model according to the input target cluster data and the configuration parameters.

[0147] In step S304, the decision tree structure of the current decision tree model is sent to the terminal device, so that the terminal device outputs the decision tree information containing the decision tree structure, and sends a second instruction corresponding to the operation information to the service device.

[0148] In the embodiment of the present application, the operation information is information input by a user for operating the decision tree information. The operation information at least includes an adjustment type and an adjustment parameter, and the adjustment type at least includes a pruning type, a node splitting type, a manual splitting type, a downward extension type, and a result derivation type.

[0149] In step S305, the operation information is obtained from the second instruction when the second instruction sent by the terminal device is received.

[0150] In step S306, the current decision tree model is updated according to the operation information, and an updated current decision tree model is obtained.

[0151] As an optional implementation, in step S306, the current decision tree model is updated according to the operation information, and an updated current decision tree model is obtained. The manner can be specifically as follows:

[0152] A target function matched with the adjustment type is determined;

[0153] The current decision tree model is updated according to the adjustment parameter and the target function, and an updated current decision tree model is obtained.

[0154] In this implementation, the target function matched with the adjustment type can be obtained, and the current decision tree model is updated through the adjustment parameter and the target function, so that the updated current decision tree model meets the adjustment expectation of the user, and the adjustment according to the matched target function can improve the accuracy of the adjustment of the decision tree model.

[0155] In the embodiment of the present application, the target function is a pre-set function, and each adjustment type can be matched with different target functions. Through different target functions, the decision tree model can be updated more accurately.

[0156] In step S307, the decision tree structure of the updated current decision tree model is sent to the terminal device, and steps S305-S307 are executed.

[0157] As an optional implementation, after step S307, the decision tree structure of the updated current decision tree model is sent to the terminal device, the following steps can also be executed:

[0158] When a closing instruction sent by the terminal device is received, a target cluster data address is obtained from the closing instruction;

[0159] A target decision tree model corresponding to the target cluster data address is determined from the distributed cluster;

[0160] The target decision tree model is closed.

[0161] According to the embodiment, the target decision tree model generated based on the distributed cluster can be closed by the service device according to the closing instruction after the adjustment of the decision tree model is completed, thereby saving the memory occupied by the service device in running the decision tree model, and improving the running efficiency of the service device.

[0162] Optionally, after the step S307 of sending the updated current decision tree model to the terminal device, the following steps can be further performed:

[0163] When the restart instruction sent by the terminal device is received, the restart data and the historical cluster data address are obtained from the restart instruction;

[0164] The historical decision tree model corresponding to the historical cluster data address is recovered from the distributed cluster;

[0165] The historical decision tree model is run based on the restart data to obtain a decision result;

[0166] The decision result is sent to the terminal device.

[0167] According to the embodiment, the restart information input by the user can be parsed to determine the historical cluster data address where the historical decision tree structure to be restarted by the user is located, and the restart instruction containing the restart data and the historical cluster data address can be sent to the service device, so that the service device determines the historical decision tree model from the distributed cluster according to the historical cluster data address, and then runs the historical decision tree model based on the restart data to obtain the final decision result. It can be seen that, by this way, the historical decision tree model can be obtained from the distributed cluster in time when the user needs to use the historical decision tree model, and the flexibility of using the decision tree model is improved.

[0168] The present application can generate a decision tree model based on the massive data stored in the distributed cluster, and can adjust the decision tree model according to the user's demand, thereby achieving the technical effect of improving the performance of the decision tree model. In addition, the present application can enable the user to have a more comprehensive understanding of the decision tree structure, thereby improving the user's experience. In addition, the present application can enable the user to more accurately adjust the decision tree model, thereby improving the efficiency of adjusting the decision tree model. In addition, the present application can improve the running efficiency of the service device. In addition, the present application can improve the flexibility of using the decision tree model. In addition, the present application can improve the accuracy of adjusting the decision tree model.

[0169] Reference will now be made to Figure 4 , Figure 4A flowchart of another method for generating a decision tree model according to an example embodiment of the present application is shown. It should be noted that the embodiments of the present application can be applied to terminal devices and service devices.

[0170] Figure 4 The flowchart of another method for generating a decision tree model according to an example embodiment of the present application is shown, which includes:

[0171] In step S401, the terminal device sends a first instruction corresponding to the input parameter data to the service device.

[0172] In step S402, the service device obtains cluster data address and configuration parameters from the received first instruction sent by the terminal device.

[0173] In step S403, the service device obtains target cluster data matching the cluster data address from the distributed cluster.

[0174] In step S404, the service device generates a current decision tree model based on the target cluster data and the configuration parameters.

[0175] In step S405, the service device sends the decision tree structure of the current decision tree model to the terminal device.

[0176] In step S406, the terminal device outputs decision tree information containing the decision tree structure.

[0177] In step S407, the terminal device obtains operation information input by a user for the decision tree information.

[0178] In step S408, the terminal device determines whether the operation information indicates that the adjustment for the decision tree information is complete.

[0179] In step S409, if yes, the terminal device obtains a target decision tree model corresponding to the decision tree information after adjustment.

[0180] In step S410, if no, the terminal device determines a second instruction corresponding to the operation information and sends the second instruction to the service device.

[0181] In step S411, when receiving the second instruction sent by the terminal device, the service device obtains the operation information from the second instruction.

[0182] In step S412, the service device updates the current decision tree model according to the operation information to obtain an updated current decision tree model.

[0183] Step S413, the service device sends the decision tree structure of the updated current decision tree model to the terminal device, and executes steps S411-S413.

[0184] Step S414, the terminal device receives the decision tree structure, and executes steps S406-S408.

[0185] The application can generate a decision tree model based on the massive data stored in the distributed cluster, and can also adjust the decision tree model according to the user's demand, thereby realizing the technical effect of improving the performance of the decision tree model.

[0186] After introducing the method of the exemplary embodiments of the application, next please refer to Figure 5 , Figure 5 The structure schematic diagram of a decision tree model generation system according to an exemplary embodiment of the application is shown, which comprises a terminal device 501 and a service device 502, wherein:

[0187] The terminal device 501 is configured to send a first instruction corresponding to the input parameter data to the service device 502; wherein the first instruction at least comprises a cluster data address and a configuration parameter;

[0188] The service device 502 is configured to obtain the cluster data address and the configuration parameter from the received first instruction; obtain target cluster data matching the cluster data address from the distributed cluster; generate a current decision tree model based on the target cluster data and the configuration parameter; and send the decision tree structure of the current decision tree model to the terminal device 501;

[0189] The terminal device 501 is further configured to output decision tree information comprising the decision tree structure; obtain operation information input by a user for the decision tree information; if the operation information indicates that the adjustment for the decision tree information is not completed, determine a second instruction corresponding to the operation information, and send the second instruction to the service device 502; if the operation information indicates that the adjustment for the decision tree information is completed, obtain a target decision tree model corresponding to the decision tree information which is adjusted and completed;

[0190] The service device 502 is further configured to, when receiving the second instruction sent by the terminal device 501, obtain the operation information from the second instruction; update the current decision tree model according to the operation information, to obtain an updated current decision tree model; and send the decision tree structure of the updated current decision tree model to the terminal device 501, to trigger the terminal device 501 to output the decision tree information comprising the decision tree structure, and obtain the operation information input by the user for the decision tree information.

[0191] As an optional implementation, the manner in which the terminal device 501 outputs the decision tree information containing the decision tree structure is specifically as follows:

[0192] parsing the decision tree structure to obtain structure information of the decision tree structure, wherein the structure information at least includes node information, split conditions, and path information;

[0193] outputting decision tree information containing the decision tree structure and the structure information.

[0194] By implementing this implementation, the decision tree structure can be parsed to obtain various structure information, such as node information, split conditions, and path information. By outputting these different structure information, the user can have a more comprehensive understanding of the decision tree structure, and the user experience is improved.

[0195] As an optional implementation, the manner in which the terminal device 501 determines the second instruction corresponding to the operation information is specifically as follows:

[0196] parsing the operation information to obtain an adjustment type and an adjustment parameter, wherein the adjustment type at least includes a pruning type, a node split type, a manual split type, a downward extension type, and a result derivation type;

[0197] determining the adjustment type and the adjustment parameter as the second instruction.

[0198] By implementing this implementation, the user can input operation information of various adjustment types, and the parameters used in the process of adjusting the decision tree model can be determined according to the adjustment type, so that the user can more accurately adjust the decision tree model, and the efficiency of adjusting the decision tree model is improved.

[0199] As an optional implementation, the manner in which the service device 502 updates the current decision tree model according to the operation information to obtain an updated current decision tree model is specifically as follows:

[0200] determining a target function matched with the adjustment type;

[0201] updating the current decision tree model according to the adjustment parameter and the target function to obtain an updated current decision tree model.

[0202] According to the embodiment, the target function matched with the adjustment type can be obtained, and the current decision tree model is updated by the adjustment parameter and the target function, so that the updated current decision tree model meets the adjustment expectation of the user, and the adjustment according to the matched target function can improve the accuracy of the decision tree model adjustment.

[0203] As an optional embodiment, wherein:

[0204] The terminal device 501 is further configured to, after obtaining the target decision tree model corresponding to the decision tree information after the adjustment is completed, close the output decision tree information, and send a closing instruction to the service device 502, wherein the closing instruction is used to close the target decision tree model determined based on the distributed cluster.

[0205] The service device 502 is further configured to obtain a target cluster data address from the closing instruction, and determine a target decision tree model corresponding to the target cluster data address from the distributed cluster, and close the target decision tree model.

[0206] According to the embodiment, after the adjustment of the decision tree model is completed, the target decision tree model generated based on the distributed cluster is closed by the service device according to the closing instruction, so that the memory occupied by the service device running the decision tree model is saved, and the running efficiency of the service device is improved.

[0207] As an optional embodiment, wherein:

[0208] The terminal device 501 is further configured to, after obtaining the target decision tree model corresponding to the decision tree information after the adjustment is completed, when detecting the restart information input by the user, analyze the restart information to obtain restart data and a historical cluster data address of a historical decision tree structure, and send a restart instruction containing the restart data and the historical cluster data address to the service device 502.

[0209] The service device 502 is further configured to obtain the restart data and the historical cluster data address from the restart instruction, restore a historical decision tree model corresponding to the historical cluster data address from the distributed cluster, run the historical decision tree model based on the restart data to obtain a decision result, and send the decision result to the terminal device 501.

[0210] Wherein, the embodiment can analyze the restart information input by the user, determine the historical cluster data address where the historical decision tree structure needs to be restarted by the user, and send the restart instruction containing the restart data and the historical cluster data address to the service device, so that the service device determines the historical decision tree model from the distributed cluster according to the historical cluster data address, and then runs the historical decision tree model based on the restart data to obtain the final decision result. It can be seen that, through this way, the historical decision tree model can be obtained from the distributed cluster in time when the user needs to use it, and the flexibility of the decision tree model is improved.

[0211] The application can generate a decision tree model based on the massive data stored in the distributed cluster, and can adjust the decision tree model according to the user's demand, thereby realizing the technical effect of improving the performance of the decision tree model. In addition, the application can also enable the user to have a more comprehensive understanding of the decision tree structure, thereby improving the user's experience. In addition, the application can also enable the user to more accurately adjust the decision tree model, thereby improving the efficiency of the decision tree model adjustment. In addition, the application can also improve the running efficiency of the service device. In addition, the application can also improve the flexibility of the decision tree model. In addition, the application can also improve the accuracy of the decision tree model adjustment.

[0212] After introducing the system of the exemplary embodiment of the application, next please refer to Figure 6 , Figure 6 The structure diagram of a terminal device according to an exemplary embodiment of the application is shown, which comprises:

[0213] The first sending unit 601 is configured to send a first instruction corresponding to the input parameter data to the service device corresponding to the terminal device, so that the service device determines a current decision tree model corresponding to the first instruction based on the distributed cluster, and sends the decision tree structure of the current decision tree model to the terminal device. The first instruction at least includes a cluster data address and a configuration parameter.

[0214] The output unit 602 is configured to output the decision tree information containing the decision tree structure.

[0215] The first obtaining unit 603 is configured to obtain the operation information input by the user for the decision tree information output by the output unit 602.

[0216] The second sending unit 604 is configured to: if the operation information obtained by the first obtaining unit 603 indicates that the adjustment on the decision tree information is not completed, determine a second instruction corresponding to the operation information, and send the second instruction to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends the decision tree structure of the updated current decision tree model to the terminal device; and control the output unit 602 to output the decision tree information containing the decision tree structure, and control the first obtaining unit 603 to obtain the operation information input by the user for the decision tree information.

[0217] The model determining unit 605 is configured to: if the operation information obtained by the first obtaining unit 603 indicates that the adjustment on the decision tree information is completed, obtain a target decision tree model corresponding to the decision tree information.

[0218] As an optional implementation, the manner in which the output unit 602 outputs the decision tree information containing the decision tree structure can be specifically as follows:

[0219] parsing the decision tree structure to obtain structure information of the decision tree structure, wherein the structure information at least includes node information, split condition and path information;

[0220] outputting the decision tree information containing the decision tree structure and the structure information.

[0221] By implementing this implementation, the decision tree structure can be parsed to obtain various structure information, such as node information, split condition and path information, and by outputting the various structure information, the user can have a more comprehensive understanding of the decision tree structure, and the user experience is improved.

[0222] As an optional implementation, the manner in which the second sending unit 604 determines the second instruction corresponding to the operation information can be specifically as follows:

[0223] parsing the operation information to obtain an adjustment type and an adjustment parameter, wherein the adjustment type at least includes a pruning type, a node split type, a manual split type, a lower extension type and a result derivation type;

[0224] determining the adjustment type and the adjustment parameter as the second instruction.

[0225] By implementing this implementation, the user can input operation information of various adjustment types, and the parameters used in the process of adjusting the decision tree model can be determined according to the adjustment type, so that the user can more accurately adjust the decision tree model, and the efficiency of adjusting the decision tree model is improved.

[0226] As an optional implementation, the model determination unit 605 is further configured to:

[0227] after obtaining the target decision tree model corresponding to the decision tree information, closing the output of the decision tree information;

[0228] sending a closing instruction to the service device, wherein the closing instruction is used to close the target decision tree model determined based on the distributed cluster.

[0229] According to the implementation, the target decision tree model generated based on the distributed cluster can be closed by the service device according to the closing instruction after the adjustment of the decision tree model is completed, thereby saving the memory occupied by the service device in running the decision tree model, and improving the running efficiency of the service device.

[0230] As an optional implementation, the model determination unit 605 is further configured to:

[0231] after obtaining the target decision tree model corresponding to the decision tree information, when detecting the restart information input by the user, analyzing the restart information to obtain restart data and a historical cluster data address of a historical decision tree structure;

[0232] sending a restart instruction containing the restart data and the historical cluster data address to the service device, so that the service device recovers a historical decision tree model from the distributed cluster based on the historical cluster data address, runs the historical decision tree model based on the restart data to obtain a decision result, and sends the decision result to the terminal device.

[0233] According to the implementation, the restart information input by the user can be analyzed to determine the historical cluster data address where the historical decision tree structure to be restarted by the user is located, and a restart instruction containing the restart data and the historical cluster data address can be sent to the service device, so that the service device determines the historical decision tree model from the distributed cluster according to the historical cluster data address, and then runs the historical decision tree model based on the restart data to obtain the final decision result. It can be seen that the historical decision tree model can be obtained from the distributed cluster in time when the user needs to use the historical decision tree model, thereby improving the flexibility of the use of the decision tree model.

[0234] After introducing the terminal device of the exemplary embodiments of the present application, next please refer to Figure 7 , Figure 7 a structure schematic diagram of a service device according to an exemplary embodiment of the present application is shown, which comprises:

[0235] The second obtaining unit 701 is configured to obtain cluster data addresses and configuration parameters from the received first instruction sent by the terminal device;

[0236] The third obtaining unit 702 is configured to obtain target cluster data matched with the cluster data addresses obtained by the second obtaining unit 701 from the distributed clusters;

[0237] The generating unit 703 is configured to generate a current decision tree model based on the target cluster data obtained by the third obtaining unit 702 and the configuration parameters obtained by the second obtaining unit 701;

[0238] The third sending unit 704 is configured to send a decision tree structure of the current decision tree model generated by the generating unit 703 to the terminal device, so that the terminal device outputs decision tree information containing the decision tree structure and sends second instructions corresponding to operation information to the service device, where the operation information is information input by a user for operating the decision tree information;

[0239] The fourth obtaining unit 705 is configured to obtain the operation information from the second instructions sent by the terminal device when the second instructions are received;

[0240] The updating unit 706 is configured to update the current decision tree model according to the operation information obtained by the fourth obtaining unit 705 to obtain an updated current decision tree model;

[0241] The fourth sending unit 707 is configured to send a decision tree structure of the current decision tree model updated by the updating unit 706 to the terminal device, and control the fourth obtaining unit 705 to obtain the operation information from the second instructions sent by the terminal device when the second instructions are received, control the updating unit 706 to update the current decision tree model according to the operation information to obtain an updated current decision tree model, and perform an operation of sending the decision tree structure of the updated current decision tree model to the terminal device.

[0242] As an optional implementation, the operation information at least includes an adjustment type and an adjustment parameter, the adjustment type at least includes a pruning type, a node splitting type, an artificial splitting type, a lower extension type and a result derivation type, and the updating unit 706 updates the current decision tree model according to the operation information to obtain an updated current decision tree model in the following manner:

[0243] determining a target function matched with the adjustment type;

[0244] updating the current decision tree model according to the adjustment parameter and the target function to obtain an updated current decision tree model.

[0245] According to the embodiment, the target function matched with the adjustment type can be obtained, and the current decision tree model is updated by the adjustment parameter and the target function, so that the updated current decision tree model meets the adjustment expectation of the user, and the adjustment according to the matched target function can improve the accuracy of the decision tree model adjustment.

[0246] As an optional implementation, the fourth sending unit 707 is further configured to:

[0247] After sending the decision tree structure of the updated current decision tree model to the terminal device, when a closing instruction sent by the terminal device is received, target cluster data address is obtained from the closing instruction;

[0248] A target decision tree model corresponding to the target cluster data address is determined from the distributed cluster;

[0249] The target decision tree model is closed.

[0250] According to the embodiment, after the adjustment of the decision tree model is completed, the target decision tree model generated based on the distributed cluster is closed by the service device according to the closing instruction, so that the memory occupied by the service device running the decision tree model is saved, and the running efficiency of the service device is improved.

[0251] As an optional implementation, the fourth sending unit 707 is further configured to:

[0252] After sending the decision tree structure of the updated current decision tree model to the terminal device, when a restart instruction sent by the terminal device is received, restart data and historical cluster data address are obtained from the restart instruction;

[0253] A historical decision tree model corresponding to the historical cluster data address is recovered from the distributed cluster;

[0254] The historical decision tree model is run based on the restart data to obtain a decision result;

[0255] The decision result is sent to the terminal device.

[0256] Wherein, the embodiment can analyze the restart information input by the user, determine the historical cluster data address where the historical decision tree structure needs to be restarted by the user, and send the restart instruction containing the restart data and the historical cluster data address to the service device, so that the service device determines the historical decision tree model from the distributed cluster according to the historical cluster data address, and then runs the historical decision tree model based on the restart data to obtain the final decision result. It can be seen that, through this way, the historical decision tree model can be obtained from the distributed cluster in time when the user needs to use it, and the flexibility of the decision tree model is improved.

[0257] The application can generate a decision tree model based on the massive data stored in the distributed cluster, and can adjust the decision tree model according to the user's demand, thereby realizing the technical effect of improving the performance of the decision tree model. In addition, the application can also enable the user to have a more comprehensive understanding of the decision tree structure, thereby improving the user's experience. In addition, the application can also enable the user to more accurately adjust the decision tree model, thereby improving the efficiency of the decision tree model adjustment. In addition, the application can also improve the running efficiency of the service device. In addition, the application can also improve the flexibility of the decision tree model. In addition, the application can also improve the accuracy of the decision tree model adjustment.

[0258] The exemplary embodiments of the application also provide an electronic device, comprising: at least one processor; and a memory connected with the at least one processor in communication. The memory stores a computer program capable of being executed by the at least one processor, and the computer program is used to make the electronic device execute the method according to the embodiments of the application when executed by the at least one processor.

[0259] The exemplary embodiments of the application also provide a non-transitory computer readable storage medium storing a computer program, wherein the computer program is used to make the computer execute the method according to the embodiments of the application when executed by the processor of the computer.

[0260] The exemplary embodiments of the application also provide a computer program product comprising a computer program, wherein the computer program is used to make the computer execute the method according to the embodiments of the application when executed by the processor of the computer.

[0261] Reference Figure 8The present invention will now be described in the form of a structural block diagram of an electronic device 800 that can serve as a server or client of the present invention, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0262] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0263] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, output unit 807, storage unit 808, and communication unit 809. Input unit 806 can be any type of device capable of inputting information to electronic device 800. Input unit 806 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 807 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 804 may include, but is not limited to, disk and optical disk. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0264] The computing unit 801 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs various methods and processes described above. For example, in some embodiments, the method of generating a decision tree model can be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 800 via the ROM 802 and / or the communication unit 809. In some embodiments, the computing unit 801 can be configured to perform the method of generating a decision tree model by any other suitable means, such as by means of firmware.

[0265] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a function / operation specified in the flowchart and / or block diagram. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, and partially on a remote machine or entirely on a remote machine or server.

[0266] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage media can include, without limitation, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0267] As used in this description, the terms "machine-readable medium," "computer-readable medium," and "computer-readable media" refer to any computer program product, apparatus and / or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal that can be used to provide machine instructions and / or data to a programmable processor.

[0268] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0269] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0270] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

Claims

1. A method for generating a decision tree model, applied to a terminal device, the method comprising: sending, to a service device corresponding to the terminal device, a first instruction corresponding to input parameter data, so that the service device determines a current decision tree model corresponding to the first instruction based on a distributed cluster, and sends a decision tree structure of the current decision tree model to the terminal device; wherein the first instruction at least includes cluster data address and configuration parameter; outputting decision tree information containing the decision tree structure; obtaining operation information input by a user for the decision tree information; if the operation information indicates that adjustment for the decision tree information is not completed, determining a second instruction corresponding to the operation information, and sending the second instruction to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends a decision tree structure of the updated current decision tree model to the terminal device; and performing steps from outputting the decision tree information containing the decision tree structure to obtaining the operation information input by the user for the decision tree information; if the operation information indicates that adjustment for the decision tree information is completed, obtaining a target decision tree model corresponding to the decision tree information after adjustment is completed. 2.The method for generating a decision tree model according to claim 1, wherein the outputting decision tree information containing the decision tree structure comprises: analyzing the decision tree structure to obtain structure information of the decision tree structure; wherein the structure information at least includes node information, split condition and path information; outputting decision tree information containing the decision tree structure and the structure information. 3.The method for generating a decision tree model according to claim 1, wherein the determining a second instruction corresponding to the operation information comprises: analyzing the operation information to obtain adjustment type and adjustment parameter; wherein the adjustment type at least includes pruning type, node split type, artificial split type, down extension type and result derivation type; determining the adjustment type and the adjustment parameter as the second instruction. 4.The method for generating a decision tree model according to claim 1, wherein after obtaining the target decision tree model corresponding to the decision tree information after adjustment is completed, the method further comprises: closing the output decision tree information; sending a closing instruction to the service device; wherein the closing instruction is used to close the target decision tree model determined based on the distributed cluster. 5.The method for generating a decision tree model according to any one of claims 1 to 4, wherein after obtaining the target decision tree model corresponding to the decision tree information after adjustment is completed, the method further comprises: when detecting restart information input by a user, analyzing the restart information to obtain restart data and historical cluster data address of historical decision tree structure. sending a restart instruction containing the restart data and the historical cluster data address to the service device, so that the service device recovers a historical decision tree model from the distributed cluster based on the historical cluster data address, runs the historical decision tree model based on the restart data to obtain a decision result, and sends the decision result to the terminal device. 6.A method for generating a decision tree model, applied to a service device, the method comprising: obtaining a cluster data address and configuration parameters from a first instruction received from a terminal device; obtaining target cluster data matching the cluster data address from a distributed cluster; generating a current decision tree model based on the target cluster data and the configuration parameters; sending a decision tree structure of the current decision tree model to the terminal device, so that the terminal device outputs decision tree information containing the decision tree structure and sends a second instruction corresponding to operation information to the service device, wherein the operation information is information input by a user for operating the decision tree information; when receiving the second instruction sent by the terminal device, obtaining the operation information from the second instruction; updating the current decision tree model according to the operation information to obtain an updated current decision tree model; sending a decision tree structure of the updated current decision tree model to the terminal device, and performing the steps from when receiving the second instruction sent by the terminal device, obtaining the operation information from the second instruction, to sending the decision tree structure of the updated current decision tree model to the terminal device. 7.The method of claim 6, wherein the operation information comprises at least an adjustment type and an adjustment parameter, the adjustment type comprises at least a pruning type, a node splitting type, an artificial splitting type, a lower extension type, and a result derivation type, and the updating the current decision tree model according to the operation information to obtain an updated current decision tree model comprises: determining a target function matching the adjustment type; and updating the current decision tree model according to the adjustment parameter and the target function to obtain an updated current decision tree model. 8.The method of claim 6, wherein after the sending the decision tree structure of the updated current decision tree model to the terminal device, the method further comprises: when receiving a shutdown instruction sent by the terminal device, obtaining a target cluster data address from the shutdown instruction; determining a target decision tree model corresponding to the target cluster data address from the distributed cluster; and shutting down the target decision tree model. 9.The method of any one of claims 6 to 8, wherein after the sending the decision tree structure of the updated current decision tree model to the terminal device, the method further comprises: when receiving a restart instruction sent by the terminal device, obtaining restart data and a historical cluster data address from the restart instruction. Recover the historical decision tree model corresponding to the historical cluster data address from the distributed cluster; The historical decision tree model is run based on the restart data to obtain the decision results; The decision result is sent to the terminal device.

10. A system for generating a decision tree model, the system comprising a terminal device and a service device, wherein: The terminal device is used to send a first instruction corresponding to the input parameter data to the service device; wherein the first instruction includes at least a cluster data address and configuration parameters; The service device is configured to obtain a cluster data address and configuration parameters from the received first instruction; obtain target cluster data matching the cluster data address from the distributed cluster; generate a current decision tree model based on the target cluster data and the configuration parameters; and send the decision tree structure of the current decision tree model to the terminal device. The terminal device is further configured to output decision tree information containing the decision tree structure; and acquire operation information input by the user regarding the decision tree information; if the operation information indicates that the adjustment of the decision tree information is not completed, then determine a second instruction corresponding to the operation information and send the second instruction to the service device; if the operation information indicates that the adjustment of the decision tree information is completed, then obtain the adjusted target decision tree model corresponding to the decision tree information. The service device is further configured to, when receiving the second instruction sent by the terminal device, obtain the operation information from the second instruction; update the current decision tree model according to the operation information to obtain the updated current decision tree model; and send the decision tree structure of the updated current decision tree model to the terminal device to trigger the terminal device to output decision tree information containing the decision tree structure and obtain the operation information input by the user regarding the decision tree information.

11. The decision tree model generation system according to claim 10, wherein the terminal device outputs decision tree information containing the decision tree structure in the following specific manner: parsing the decision tree structure to obtain structure information of the decision tree structure; wherein The structural information includes at least node information, splitting conditions, and path information; The output includes decision tree information containing the decision tree structure and the structure information.

12. In the decision tree model generation system according to claim 10, the terminal device determines the second instruction corresponding to the operation information in the following specific manner: The operation information is parsed to obtain an adjustment type and an adjustment parameter; wherein The adjustment types include at least pruning type, node splitting type, manual splitting type, downward extension type, and result export type; The adjustment type and the adjustment parameters are determined as the second instruction.

13. The decision tree model generation system according to claim 12, wherein the service device updates the current decision tree model according to the operation information to obtain the updated current decision tree model in the following specific manner: Determine the objective function that matches the adjustment type; The current decision tree model is updated based on the adjustment parameters and the objective function to obtain the updated current decision tree model.

14. The system of claim 10, wherein: the terminal device is further configured to, after obtaining the target decision tree model corresponding to the decision tree information, close the output of the decision tree information, send a closing instruction to the service device, and close the target decision tree model determined based on the distributed cluster according to the closing instruction; the service device is further configured to obtain a target cluster data address from the closing instruction, determine a target decision tree model corresponding to the target cluster data address from the distributed cluster, and close the target decision tree model.

15. The system of any one of claims 10-14, wherein: the terminal device is further configured to, after obtaining the target decision tree model corresponding to the decision tree information, analyze a restart information input by a user to obtain restart data and a historical cluster data address of a historical decision tree structure, send a restart instruction containing the restart data and the historical cluster data address to the service device, and send a decision result to the terminal device based on the restart data and the historical decision tree model corresponding to the historical cluster data address.

16. A terminal device, comprising: a first sending unit configured to send a first instruction corresponding to input parameter data to a service device corresponding to the terminal device, so that the service device determines a current decision tree model corresponding to the first instruction based on a distributed cluster and sends a decision tree structure of the current decision tree model to the terminal device, wherein the first instruction at least includes a cluster data address and a configuration parameter; an output unit configured to output decision tree information containing the decision tree structure; a first obtaining unit configured to obtain operation information input by a user for the decision tree information; a second sending unit configured to, if the operation information indicates that adjustment for the decision tree information is not completed, determine a second instruction corresponding to the operation information, send the second instruction to the service device, so that the service device updates the current decision tree model according to the second instruction to obtain an updated current decision tree model, and sends a decision tree structure of the updated current decision tree model to the terminal device, and control the output unit to output the decision tree information containing the decision tree structure, and control the first obtaining unit to obtain operation information input by a user for the decision tree information; a model determining unit configured to, if the operation information indicates that adjustment for the decision tree information is completed, obtain a target decision tree model corresponding to the decision tree information.

17. A service device, comprising: ​ The second acquisition unit is configured to acquire the cluster data address and the configuration parameter from the received first instruction sent by the terminal device. The third acquisition unit is configured to acquire target cluster data matched with the cluster data address from the distributed cluster. The generation unit is configured to generate a current decision tree model based on the target cluster data and the configuration parameter. The third sending unit is configured to send a decision tree structure of the current decision tree model to the terminal device, so that the terminal device outputs decision tree information containing the decision tree structure, and sends a second instruction corresponding to operation information to the service device; the operation information is information input by a user for operating the decision tree information. The fourth acquisition unit is configured to acquire the operation information from the second instruction when the second instruction sent by the terminal device is received. The update unit is configured to update the current decision tree model according to the operation information to obtain an updated current decision tree model. The fourth sending unit is configured to send a decision tree structure of the updated current decision tree model to the terminal device, and control the fourth acquisition unit to acquire the operation information from the second instruction when the second instruction sent by the terminal device is received, and control the update unit to update the current decision tree model according to the operation information to obtain an updated current decision tree model, and perform an operation of sending the decision tree structure of the updated current decision tree model to the terminal device.

18. An electronic device comprising: a processor; and a memory storing a program, wherein the program includes instructions that when executed by the processor cause the processor to perform the method of any one of claims 1-9. The computer instructions are used to make the computer perform the method of any one of claims 1-9.

19. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, ​

Citation Information

Patent Citations

  • Machine learning based method for predicating parameters during MPI (message passing interface) optimal operation in multi-core environments

    CN102708404A

  • Method for joint inversion of forest aboveground biomass by integrating three data sources

    CN108921885A