A method and device for obtaining an ERP system configuration result based on a decision tree
By employing the decision tree method in the ERP system to generate input tables and evaluate conditions step by step, the problem of configuring complex business rules was solved, the system's flexibility and scalability were improved, and the development process was simplified.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RICHFIT INFORMATION TECH
- Filing Date
- 2023-11-30
- Publication Date
- 2026-04-28
AI Technical Summary
When dealing with complex business rules, existing ERP systems often struggle to manage form configuration methods, which are prone to errors and lack flexibility, making them unable to effectively handle combinations and cross-conditions of multiple judgment criteria.
The system employs a decision tree-based approach. It generates an input table by acquiring business data and functional module names, calls the decision tree in the system configuration, evaluates conditions level by level until the leaf node, obtains the system configuration result, and performs corresponding operations based on the result.
It improves the configurability and scalability of the ERP system, simplifies system development, reduces maintenance costs, enhances the system's flexibility and adaptability, and can easily cope with business changes and meet specific customer needs.
Smart Images

Figure CN120066561B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and apparatus for obtaining ERP system configuration results based on decision trees. Background Technology
[0002] Enterprise Resource Planning (ERP) systems play a crucial role in meeting the diverse business needs of different enterprises. Due to the complexity of businesses, ERP systems typically require extensive system configuration to ensure their adaptability to various industries, departments, and business processes. Currently, most system configurations are based on configuration forms, which usually consist of two main parts: conditional statements and return results. This configuration method offers advantages such as clear structure and ease of maintenance when handling simple configurations.
[0003] Specifically, businesses may need to configure various business rules and policies, such as inventory management, sales order processes, procurement approvals, and financial statements. These rules typically include the following aspects:
[0004] Decision criteria: Decision criteria are rules used to determine the system's behavior based on specific circumstances or input data. For example, deciding whether to approve a purchase order based on conditions such as total order amount, inventory level, and supplier qualifications.
[0005] Return Results: The return results specify the concrete actions the system should take when certain judgment conditions are met. These include approval, rejection, automatic price calculation, and triggering notifications.
[0006] For simple business rules, using configuration forms is an effective approach. They provide a clear interface that allows administrators to easily define and modify judgment conditions and return results without writing code or performing complex custom development. Summary of the Invention
[0007] To improve the configurability and scalability of ERP system configuration business logic processing, embodiments of the present invention provide a method and apparatus for obtaining ERP system configuration results based on decision trees.
[0008] In a first aspect, embodiments of the present invention provide a method for obtaining ERP system configuration results based on a decision tree, the method comprising:
[0009] S101: Obtain the input table based on the acquired business data and functional module names;
[0010] S102: Call the corresponding decision tree in the system configuration according to the name of the functional module;
[0011] S103: Obtain the corresponding first field of the input table according to the condition judgment of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node.
[0012] S104: Obtain the corresponding second field of the input table according to the condition judgment of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node;
[0013] S105: Repeat step S104 until the leaf node of the decision tree is obtained, and use the return value of the leaf node as the ERP system configuration result;
[0014] S106: Based on the ERP system configuration results, call the operation corresponding to the name of the function module in the ERP system.
[0015] In one or more optional embodiments of this application, the decision tree in the system configuration is obtained in the following manner:
[0016] Obtain the functional module name and input configuration table; the input configuration table includes a dictionary of fields and field types;
[0017] Based on the input configuration table, generate a decision domain selection list for each field;
[0018] Based on the decision domain selection list and the corresponding decision rules, the conditional judgment expression for the corresponding field is obtained;
[0019] By setting the return value or the conditional statement for the next field for each field based on the different judgment results obtained, the decision tree is obtained.
[0020] In one or more optional embodiments of this application, the following further includes:
[0021] During the decision-making process of the decision tree based on the input table, if the value in the input table cannot correspond to the conditional judgment of the node in the decision tree, the corresponding branch processing is executed; the branch processing includes: returning the default value and returning the error message.
[0022] In one or more optional embodiments of this application, after obtaining the decision tree by setting the return value pointed to by the different judgment results that can be obtained by setting the conditional judgment expression of each field or the conditional judgment expression of the next field, the method further includes:
[0023] If an instruction is received to modify the decision rules or field dictionary of the decision tree, the decision domain selection list of the field is regenerated, and the corresponding conditional expression is modified or a conditional expression branch is added.
[0024] In one or more optional embodiments of this application, the process of obtaining the decision tree further includes:
[0025] By setting the conditional statements for each field, different judgment results can be obtained, pointing to nested decision trees or external functions, thus obtaining the decision tree.
[0026] In one or more optional embodiments of this application, after obtaining the decision tree, the method further includes:
[0027] The decision tree is subjected to rule checks to determine that the conditional statements of each field contain all the values of the dictionary corresponding to that field, and that each value appears only once in all the conditional statements of that field.
[0028] Secondly, embodiments of the present invention provide an apparatus for obtaining system configuration results based on a decision tree, the apparatus comprising:
[0029] The first acquisition module is used to obtain the input table based on the acquired business data and the name of the functional module.
[0030] The first calling module is used to call the corresponding decision tree in the system configuration according to the name of the functional module;
[0031] The first judgment module is used to obtain the corresponding first field of the input table according to the condition judgment expression of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node.
[0032] The second judgment result is used to obtain the corresponding second field of the input table according to the condition judgment expression of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node; repeat the above steps of obtaining the corresponding field of the input table according to the condition judgment expression of the child node of the decision tree, inputting the corresponding field into the child node of the decision tree, and obtaining the corresponding new child node of the decision tree according to the condition judgment result of the child node until the leaf node of the decision tree is obtained, and the return value of the leaf node is used as the ERP system configuration result;
[0033] The first operation module is used to call the operation corresponding to the function module name in the ERP system according to the ERP system configuration result.
[0034] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above for obtaining ERP system configuration results based on a decision tree.
[0035] Fourthly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method described above for obtaining ERP system configuration results based on a decision tree.
[0036] Fifthly, embodiments of the present invention provide a computer program product containing instructions that, when the computer program product is run on a computer device, cause the computer device to execute the method described above for obtaining ERP system configuration results based on a decision tree.
[0037] In a sixth aspect, embodiments of the present invention provide a chip, the chip including a processor and a communication interface, the communication interface and the processor being coupled, the processor being used to run computer programs or instructions to implement the method described above for obtaining ERP system configuration results based on decision trees.
[0038] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:
[0039] This invention provides a method for obtaining system configuration results based on a decision tree. The method involves calling the corresponding decision tree in the system configuration based on the obtained functional module name, simultaneously obtaining an input table, inputting the data from the input table into the decision tree, starting from the root node, selecting an output branch based on the condition judgment result, reaching the child node, and repeating this process until the leaf node is reached to obtain the final output result, and then performing corresponding operations based on the corresponding module function. Using decision trees for business logic judgment in ERP system configuration offers a visually intuitive way to express business logic, making it easier to understand. It can improve the configurability and scalability of the product, enable partial business logic processing, simplify system development, and enhance the system's flexibility and adaptability.
[0040] Decision trees provide enterprises with an intuitive and highly configurable way to represent business logic. Enterprise administrators or business analysts can easily create, modify, or delete conditions and decision nodes to meet the specific needs of different enterprises without requiring deep programming knowledge, such as SQL statements. The flexibility of decision trees allows them to perform different operations based on different conditions and requirements. This is extremely helpful in responding to business changes and meeting specific customer needs. Compared to traditional form configurations, decision trees are more flexible in responding to changes without requiring extensive modifications to form configurations. They have the ability to be easily extended to handle new business rules and conditions without redesigning the entire configuration system, reducing maintenance costs and making the system more scalable.
[0041] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.
[0042] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0043] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention, but do not constitute a limitation thereof; in the drawings:
[0044] Figure 1 This is a schematic diagram illustrating the steps for obtaining ERP system configuration results based on a decision tree, as provided in an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of the input table structure provided in an embodiment of the present invention;
[0046] Figure 3 This is a schematic diagram illustrating an input representation example provided in an embodiment of the present invention;
[0047] Figure 4 This is a schematic diagram of the decision tree creation process provided in an embodiment of the present invention;
[0048] Figure 5 This is an example of the input configuration representation intent in the decision tree configuration provided in this embodiment of the invention.
[0049] Figure 6 This is a schematic diagram illustrating an example of the input configuration in the decision tree configuration provided in an embodiment of the present invention;
[0050] Figure 7 This is an example of the output configuration representation intent in the decision tree configuration provided in this embodiment of the invention;
[0051] Figure 8 This is a schematic diagram illustrating an example of the output configuration in the decision tree configuration provided in an embodiment of the present invention;
[0052] Figure 9 This is a schematic diagram of basic information about a decision tree provided in an embodiment of the present invention;
[0053] Figure 10 This is a schematic diagram of decision tree operation provided in an embodiment of the present invention;
[0054] Figure 11 This is a schematic diagram of decision tree node types provided in an embodiment of the present invention;
[0055] Figure 12 This is a schematic diagram of a decision tree provided in an embodiment of the present invention;
[0056] Figure 13 This is a schematic diagram of decision tree invocation provided in an embodiment of the present invention;
[0057] Figure 14 This is a schematic diagram of the output table structure provided in an embodiment of the present invention;
[0058] Figure 15 This is a schematic diagram illustrating an example of output representation provided in an embodiment of the present invention;
[0059] Figure 16 This is a schematic diagram of the device for obtaining system configuration results based on a decision tree, as provided in an embodiment of this application. Detailed Implementation
[0060] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0061] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0062] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0063] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0064] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0065] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0066] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0067] To illustrate the technical solution of this application, specific embodiments are described below.
[0068] The inventors discovered that in the existing technology, most system configurations are currently form-based. However, this configuration method faces challenges when dealing with complex business rules. When it involves combinations of multiple judgment conditions, cross-conditions, multi-level decisions, multi-step processes, or situations requiring high flexibility, the structure of configuration forms can become complex, difficult to manage, and prone to errors.
[0069] Therefore, when dealing with complex business rules, some enterprises are beginning to consider more powerful and flexible tools, such as decision trees or rule engines, to provide more intuitive visualization, more flexible conditional branching, and easier-to-maintain configuration methods. These tools allow enterprises to better adapt to changing needs, reduce configuration complexity, and improve system flexibility and maintainability. Therefore, the choice of an appropriate configuration method should be based on a trade-off between the complexity and variability of the business rules.
[0070] Based on this, the inventors conducted further research and development and made this invention, which provides a method and apparatus for obtaining ERP system configuration results based on decision trees.
[0071] Example 1
[0072] This invention provides a method for obtaining ERP system configuration results based on decision trees, referring to... Figure 1 As shown, the method includes:
[0073] S101: Obtain the input table based on the acquired business data and functional module names.
[0074] In this embodiment, in step S101 above, after the user logs into the ERP system, when the ERP system needs to use a decision tree for system configuration, the ERP system will obtain the name of the required function module, extract the corresponding data from the business data according to the input data required by the function module, and form an input table. A schematic diagram of the input table structure is shown below. Figure 2 As shown, the input table contains multiple fields. Each field includes three configuration values: field, content, and field type. The field stores the field name, the content is the field value, and the field type identifies the field's data type, such as a date type, facilitating data type conversion in subsequent processing. The input representation is as follows: Figure 3 As shown, the input table contains 7 fields. Figure 3 The document displays the content and type of each field.
[0075] S102: Call the corresponding decision tree in the system configuration according to the name of the functional module.
[0076] In this embodiment of the application, in step S102 above, the decision tree ID corresponding to the function is found in the ERP system according to the function module name, and then the corresponding decision tree is called according to the decision tree ID and stored in memory for later use.
[0077] The decision tree in the ERP system configuration is obtained in the following way:
[0078] Obtain the functional module name and input configuration table; the input configuration table includes a dictionary of fields and field types;
[0079] Based on the input configuration table, generate a decision domain selection list for each field;
[0080] Based on the decision domain selection list and the corresponding decision rules, the conditional statements for the corresponding fields are obtained;
[0081] By setting the return value or the conditional statement for the next field for each field's conditional statement, a decision tree is obtained. The root node and each child node of the decision tree contain conditional statements, and the leaf nodes contain return values.
[0082] In this embodiment of the application, the flowchart for creating a decision tree is shown as follows: Figure 4 As shown, it mainly consists of three parts: defining the input configuration table, defining the output configuration table, and decision tree maintenance. Decision tree maintenance includes operations on the decision tree such as creating and modifying the decision tree.
[0083] Next, the process of creating a decision tree will be introduced based on the three parts mentioned above.
[0084] The first part defines the input configuration table, which is used to confirm the input fields. The decision tree uses the contents of the input table to make judgments, thereby achieving different return results. The input configuration table is shown below. Figure 5 As shown, each field includes four values: field, description, dictionary, and field type. The field name determines the selection criteria in the decision tree, used to determine different content to be returned under different selection conditions. The description describes the meaning of the field and is displayed in the decision tree. The dictionary is a list of possible results for the field. The field type determines the field's data type, such as a date type, thus determining the appropriate processing method. The input configuration is represented as follows: Figure 6 As shown, the input configuration table contains 7 fields. Figure 6 The dictionary section in column 4 is the data dictionary for that field. In the example, the dictionary for each field will contain all possible values of that dictionary.
[0085] After obtaining the input configuration table, each field is used as a judgment condition for the decision tree according to the decision rules. Its numerical type and dictionary are also obtained to generate the decision domain selection list. The decision domain selection list is a list of all possible values used to define a decision domain in the decision tree or decision analysis. It is created using the data of the selected fields, such as data types and dictionaries, and includes all possible decision conditions. This list will be used to construct the decision tree so that decisions are made based on these conditions during the decision-making process.
[0086] The second part defines the output configuration table, which is used to specify the fields to be output. The output configuration table is shown below. Figure 7 As shown, each field includes three values: field, description, and field type. The field name is the field name, the description explains the field's meaning, and the field type confirms the field's data type. The output configuration is shown in the example below. Figure 8 As shown, the input table contains three fields, each containing the field name, description, and character type of each field.
[0087] Part Three, Decision Tree Maintenance, requires setting the basic information of the decision tree, as referred to... Figure 9As shown, the basic information of a decision tree includes: ID, name, module assignment, component assignment, input structure, and feature description. ID is the decision tree's identifier, used when calling the decision tree; name is a functional description of the decision tree; module assignment determines the functional module to which the decision tree belongs, such as the HR module; component assignment is the subdivision after module assignment, used to classify different functions within a module, such as the payroll sub-module under the HR module; input structure defines the data structure of the input table; input structure defines the data structure of the output table; feature description provides a detailed explanation and examples of the decision tree, helping with its practical use.
[0088] Decision tree operation reference Figure 10 As shown, this includes creating a decision tree, modifying a decision tree, inserting a sub-decision tree, copying a sub-decision tree, and pasting a sub-decision tree. The decision tree is the tree used for creating new decision tree branches for different processing methods. Creating a decision tree involves creating new branches for different processing methods; modifying a decision tree involves editing an existing decision tree; inserting a sub-decision tree involves inserting a new branch under a selected decision tree; copying a sub-decision tree involves copying all nodes under a selected decision tree branch for pasting elsewhere; and pasting a sub-decision tree involves pasting the copied decision tree. The following section will primarily explain the steps for creating a decision tree.
[0089] The steps for creating a decision tree include: obtaining the conditional statements for each field based on the decision domain selection list and corresponding decision rules obtained in Part 1; setting the return value or the conditional statement for the next field that can be obtained from the different judgment results of the conditional statements for each field; and obtaining the decision tree. The decision tree creation process also includes: if the value in the input table cannot correspond to the conditional statement of a node in the decision tree, executing the corresponding branch processing, which includes returning a default value and returning an error message; setting the nested decision trees or external functions that can be obtained from the different judgment results of the conditional statements for each field, meaning the decision tree can call other decision trees to achieve detailed configuration functions and refined processing for multiple cases, or call functions in external programs to handle cases that the decision tree cannot handle, and to enhance program functionality. Simultaneously, the decision tree has rule checks to ensure that the selected conditions do not overlap or omit anything.
[0090] When creating a decision tree, you also need to set the type of each node. The root node and each child node of the decision tree contain conditional statements, while the leaf nodes contain return values. Specifically, the selectable node types in a decision tree are as follows: Figure 11As shown, it includes return value, decision implementation domain, implementation domain value, otherwise, sub-features, and program. The return value can be a list or text; the decision implementation domain, as mentioned above, determines which field to evaluate; the implementation domain value determines the return value of the decision implementation domain, taking the value from the field's dictionary; otherwise, it's the branching process mentioned above—if the input value is not in the implementation domain value, other cases are handled accordingly, and creating the decision implementation domain automatically creates an otherwise branch; the sub-features, as mentioned above, are nested decision trees used to call other decision trees, with the same input conditions as the current decision tree, allowing for further subdivision of the decision tree to satisfy different functions and focus on different judgment conditions; the program, as mentioned above, is the external function used to handle certain functions that cannot be achieved using the decision tree.
[0091] In one specific embodiment, an example of a well-created decision tree is as follows: Figure 12 As shown, this page is the operation page for maintaining the decision tree in the ERP system. The delete bar is used to delete the decision tree branch. If it is not a leaf, it deletes all decision tree nodes under it. The name is used to display the content of each node in the decision tree. The remarks are used to display some remarks and tips about the decision tree. The level is the level of the current node in the decision tree. Figure 12 The decision tree shown has 5 levels. The first level is the root node, the second to fourth levels are all child nodes, and the fifth level is the leaf node, which is used to return the text "U1". The second and fourth levels also contain "otherwise" branches.
[0092] The above steps complete the creation of the decision tree, which can then be directly retrieved from the ERP system for later use.
[0093] S103: Obtain the corresponding first field of the input table according to the condition judgment of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node.
[0094] S104: Obtain the corresponding second field of the input table according to the condition judgment of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node;
[0095] S105: Repeat step S104 above until the leaf node of the decision tree is obtained, and use the return value of the leaf node as the ERP system configuration result.
[0096] S106: Based on the ERP system configuration results, call the operation corresponding to the name of the function module in the ERP system.
[0097] In this embodiment, the input table obtained in step S101 is input into the decision tree of the corresponding functional module called in step S102. According to the branching rules of the decision tree, the data moves downwards along the tree path until it reaches a leaf node. The value stored in the leaf node is the return value of the decision tree. Specific steps include: starting from the root node, comparing the first item of the input table with the conditional statement of the root node; selecting the corresponding branch based on the input value matching the conditional statement of the root node; moving the data along the selected branch to a child node, comparing the second item of the input table with the conditional statement of the child node; selecting the corresponding branch based on the input value matching the conditional statement of the child node; moving the data along the selected branch to the next child node, repeating this process step by step until the leaf node of the decision tree is reached; obtaining the data stored in the leaf node and returning it as a return value to the ERP system as the ERP system configuration result. Based on the ERP system configuration result, the corresponding operation is called in the ERP system.
[0098] In this embodiment, the process of calling the decision tree to obtain the ERP system configuration result is as follows: Figure 13 As shown. Figure 13 The statements shown are used to call the decision tree in the program: the function name indicates a general function when the decision tree needs to be called, such as "GET_DECISIONTREE_VALUE"; the input includes the decision tree number and the input table, where the decision tree number corresponds to the ID in the basic information of the decision tree above; the decision tree is called for processing, and the output table, text, and message list are returned. The output table is a list of return value fields, where the text is the return value, the message list corresponds to the error messages above, and the output table stores the return values of the decision tree. The structure of the output table is as follows: Figure 14 As shown, the output table example is... Figure 15 As shown, the output table contains multiple fields. Each field includes three configuration values: field, content, and field type. The field stores the field name, the content is the field value, and the field type confirms the field's type. The ERP system can call multiple decision trees to form a decision cluster and return the decision percentage to provide decision support for business functions.
[0099] To facilitate understanding of this solution by those skilled in the art, the specific implementation process of the method for obtaining ERP system configuration results based on decision trees provided in the embodiments of the present invention will be described more clearly and completely below:
[0100] In one specific embodiment, taking the determination of the process approver node as an example, the purpose is to obtain the process approver's number. The judgment conditions required by the process approver for each module are different. For example, the process input fields of the organization module include: company code, organization number, job title, and position number; the process input fields of the personnel module include: company code, personnel scope, personnel sub-scope, and employee group; and the process input fields of the payroll module include: company code, salary range, accounting type, personnel scope, and employee group.
[0101] For example, when the functional module name is "Payroll Module Process Approval," the decision tree creation process defines an input configuration table. This table includes fields for company code, salary range, accounting type, personnel scope, and employee group. Specific data must be obtained within the user's permission limits. During the decision tree writing phase, different conditional statements are first set, along with corresponding return values for different results. In this example, the return value is the approver's ID. For instance, the system first judges based on the company code (e.g., company code 1000), then it judges based on the salary range. If the salary range is 10, it returns username A001; if the salary range is 20, it returns username A002.
[0102] The decision tree code is obtained based on the functional module name. The decision tree is then invoked, and based on this decision tree and business data, an input table is retrieved. Decisions are made sequentially according to the decision tree's conditional statements, and the return value is obtained. The decision tree has an "otherwise" branch; if none of the conditions are met, the matter is passed to the default approver. If multiple approver results exist, the first result that meets the condition is taken. The approver's number is retrieved, and a pending approval task is added to that approver's purview in the ERP system.
[0103] This application provides a method for obtaining ERP system configuration results based on a decision tree, enabling flexible business logic judgments within the ERP system. It involves multiple functional modules, each with a corresponding decision tree, and the appropriate decision tree is invoked based on the required function. The branching pattern of the decision tree intuitively expresses the business logic, making the system easier to understand and operate.
[0104] During execution, the system retrieves the corresponding decision tree ID based on the input functional module name, calls the corresponding decision tree based on the decision tree ID, and retrieves data from the input table. Then, according to the structure of the decision tree, it evaluates conditions level by level starting from the root node and selects the appropriate output branch. This process continues until the leaf node is reached, yielding the final output result. Based on this output result, the system can perform operations related to the corresponding module's function.
[0105] This decision tree-based configuration approach introduces an intuitive and highly configurable representation of business logic to ERP systems. Enterprise administrators or business analysts can easily create, modify, or delete conditions and decision nodes without requiring in-depth programming knowledge. Compared to traditional form configurations, the flexibility of decision trees lies in their ability to perform different operations based on varying conditions and needs. This provides robust support for enterprises to respond to business changes and meet specific customer requirements, while also simplifying system development and improving the system's adaptability. The capabilities of decision trees allow for easy expansion to handle new business rules and conditions without redesigning the entire configuration system, thereby reducing maintenance costs and enhancing system scalability.
[0106] Example 2
[0107] Based on the same inventive concept, embodiments of the present invention also provide an apparatus for obtaining system configuration results based on a decision tree, referring to... Figure 16 As shown, the device includes:
[0108] The first acquisition module is used to obtain the input table based on the acquired business data and the name of the functional module.
[0109] The first calling module is used to call the corresponding decision tree in the system configuration according to the name of the functional module;
[0110] The first judgment module is used to obtain the corresponding first field of the input table according to the condition judgment expression of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node.
[0111] The second judgment result is used to obtain the corresponding second field of the input table according to the condition judgment expression of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node; repeat the above steps of obtaining the corresponding field of the input table according to the condition judgment expression of the child node of the decision tree, inputting the corresponding field into the child node of the decision tree, and obtaining the corresponding new child node of the decision tree according to the condition judgment result of the child node until the leaf node of the decision tree is obtained, and the return value of the leaf node is used as the ERP system configuration result;
[0112] The first operation module is used to call the operation corresponding to the function module name in the ERP system according to the ERP system configuration result.
[0113] Example 3
[0114] Based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for obtaining ERP system configuration results based on a decision tree as described in Embodiment 1 above.
[0115] Example 4
[0116] Based on the same inventive concept, embodiments of the present invention also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method for obtaining ERP system configuration results based on decision trees as described in Embodiment 1 above.
[0117] Example 5
[0118] Based on the same inventive concept, this embodiment of the invention also provides a computer program product containing instructions that, when the computer program product is run on a computer device, cause the computer device to execute the method for obtaining ERP system configuration results based on decision trees as described in Embodiment 1 above.
[0119] Example 6
[0120] Based on the same inventive concept, this embodiment of the invention also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled together. The processor is used to run computer programs or instructions to implement the method for obtaining ERP system configuration results based on decision trees as described in Embodiment 1 above.
[0121] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing a computer-usable program number ID.
[0122] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0123] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0124] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0125] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for obtaining ERP system configuration results based on decision trees, characterized in that, include: S101: Obtain the input table based on the acquired business data and functional module names; S102: Call the corresponding decision tree in the system configuration according to the name of the functional module; S103: Obtain the corresponding first field of the input table according to the condition judgment of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node. S104: Obtain the corresponding second field of the input table according to the condition judgment of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node; S105: Repeat step S104 above until the leaf node of the decision tree is obtained, and use the return value of the leaf node as the ERP system configuration result; S106: Based on the ERP system configuration results, call the operation corresponding to the name of the function module in the ERP system.
2. The method as described in claim 1, characterized in that, The decision tree in the system configuration is obtained in the following way: Obtain the functional module name and input configuration table; the input configuration table includes a dictionary of fields and field types; Based on the input configuration table, generate a decision domain selection list for each field; Based on the decision domain selection list and the corresponding decision rules, the conditional judgment expression for the corresponding field is obtained; By setting the return value or the conditional statement for the next field for each field based on the different judgment results obtained, the decision tree is obtained.
3. The method as described in claim 1, characterized in that, Also includes: During the decision-making process of the decision tree based on the input table, if the value in the input table cannot correspond to the conditional judgment of the node in the decision tree, the corresponding branch processing is executed. The branching process includes: returning a default value and returning an error message.
4. The method as described in claim 2, characterized in that, After obtaining the decision tree by setting the return value pointed to by different judgment results obtained by setting the conditional judgment expression for each field or the conditional judgment expression for the next field, the method further includes: If an instruction is received to modify the decision rules or field dictionary of the decision tree, the decision domain selection list of the field is regenerated, and the corresponding conditional statement is modified or a conditional statement branch is added.
5. The method as described in claim 2, characterized in that, The process of obtaining a decision tree also includes: By setting the conditional statements for each field, different judgment results can be obtained, pointing to nested decision trees or external functions, thus obtaining the decision tree.
6. The method as described in claim 2, characterized in that, After obtaining the decision tree, the following steps are also included: The decision tree is subjected to rule checks to determine that the conditional statements of each field contain all the values of the dictionary corresponding to that field, and that each value appears only once in all the conditional statements of that field.
7. An apparatus for obtaining system configuration results based on a decision tree, characterized in that, include: The first acquisition module is used to obtain the input table based on the acquired business data and the name of the functional module. The first calling module is used to call the corresponding decision tree in the system configuration according to the name of the functional module; The first judgment module is used to obtain the corresponding first field of the input table according to the condition judgment expression of the root node of the decision tree, input the first field into the root node of the decision tree, and obtain the corresponding child node of the decision tree according to the condition judgment result of the root node. The second judgment result is used to obtain the corresponding second field of the input table according to the condition judgment expression of the child node of the decision tree, input the second field into the child node of the decision tree, and obtain the corresponding new child node of the decision tree according to the condition judgment result of the child node; repeat the above steps of obtaining the corresponding field of the input table according to the condition judgment expression of the child node of the decision tree, inputting the corresponding field into the child node of the decision tree, and obtaining the corresponding new child node of the decision tree according to the condition judgment result of the child node until the leaf node of the decision tree is obtained, and the return value of the leaf node is used as the ERP system configuration result; The first operation module is used to call the operation corresponding to the function module name in the ERP system according to the ERP system configuration result.
8. A computer-readable storage medium storing instructions that, when executed on a terminal, cause the terminal to perform the method for obtaining ERP system configuration results based on a decision tree as described in any one of claims 1-6.
9. A computer device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for obtaining ERP system configuration results based on a decision tree as described in any one of claims 1-6.
10. A computer program product containing instructions, which, when run on a computer device, causes the computer device to perform the method for obtaining ERP system configuration results based on a decision tree as described in any one of claims 1-6.
11. A chip, comprising a processor and a communication interface, the communication interface being coupled to the processor, the processor being configured to execute a computer program or instructions to implement the method for obtaining ERP system configuration results based on a decision tree as described in any one of claims 1-6.
Citation Information
Patent Citations
Subject processing method and system based on labels and decision trees
CN110473082A
Decision-making behavior generation method and system based on decision-making treeDecision-making tree-based decision-making behavior generation method and system
CN111340147A