Resource processing method and device based on resource consumption scene implementation

Managing resource consumption scenarios and judgment conditions through a decision tree structure solves the problems of low manual maintenance efficiency and long resource processing time, and achieves efficient resource processing path matching.

CN118627601APending Publication Date: 2024-09-10ZHEJIANG CAINIAO SUPPLY CHAIN MANAGEMENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202310257841.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-10
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

The inefficiency of manual sorting and maintenance of resource consumption scenarios in the existing technology is low, resulting in high complexity and long time-consuming resource processing and matching.

Method used

The decision tree structure is used to characterize resource consumption scenarios and resource judgment conditions. The tree structure is used to realize the association management of resource elements and judgment conditions, simplify overlap and logical closed-loop verification, and traverse from the root node to the target resource during resource processing. Consumption scene.

Benefits of technology

It improves resource processing efficiency, reduces resource processing time, simplifies manual maintenance and verification processes, and reduces path routing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118627601A
    Figure CN118627601A
Patent Text Reader

Abstract

The embodiment of the invention provides a resource processing method and device based on resource consumption scenario implementation, and the method comprises the steps: obtaining a resource consumption scenario included in a resource project and a resource judgment condition included in the resource consumption scenario, constructing a decision tree corresponding to the resource project, enabling an intermediate node in the decision tree to be used for representing a resource element, and enabling the intermediate node to be used for representing the resource element; the resource judgment condition is used as an association condition between father and child nodes in the decision tree, and leaf nodes in the decision tree are used for representing a resource consumption scene. The problems of high cost and low efficiency existing in manual maintenance and verification are solved, the resource processing efficiency is greatly improved, and the resource processing time consumption is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource processing method and device based on resource consumption scenarios, a resource consumption scenario determination method and device, an electronic device, and a machine-readable medium. Background Art

[0002] Due to the characteristics of the retail and logistics industries and the continuous changes in the market, in the new retail logistics scenario, the resource consumption scenarios in the quotation of a commercial contract are complex and numerous.

[0003] In related technologies, staff can sort out the resource items in the project files and the resource consumption scenarios involved in the resource items according to the project files, and exhaustively list the resource consumption scenarios under the expense items, and then perform manual verification to ensure that there are no duplications and conflicts between the resource consumption scenarios. After sorting, these resource consumption scenarios are maintained separately. When resource processing is required, the resource processing request is matched with the maintained resource consumption scenarios, and finally the target resource consumption scenario is hit to realize resource processing.

[0004] However, after research, the inventors found that in the current solution, it is difficult to manually organize and maintain resource consumption scenarios, resulting in low efficiency and prone to errors. In addition, all resource consumption scenarios need to be traversed during resource processing, which also leads to greater matching complexity and longer time consumption. Summary of the invention

[0005] The embodiments of the present application provide a resource processing method and a resource consumption scenario determination method based on resource consumption scenarios to solve the problems in related technologies of low efficiency and error-prone manual organization and maintenance of resource consumption scenarios, large matching complexity and long time consumption during resource processing.

[0006] Correspondingly, the embodiments of the present application also provide a resource processing device, a resource consumption scenario determination device, an electronic device and a storage medium implemented based on a resource consumption scenario to ensure the implementation and application of the above method.

[0007] In order to solve the above problems, an embodiment of the present application discloses a resource processing method based on a resource consumption scenario, the method comprising:

[0008] Acquire a resource consumption scenario included in a resource item and a resource judgment condition included in the resource consumption scenario, wherein the resource judgment condition includes a resource element;

[0009] According to the resource judgment conditions included in the resource consumption scenario and the resource elements contained in the resource judgment conditions, a decision tree corresponding to the resource item is constructed, and the intermediate nodes in the decision tree are used to characterize the resource elements. The intermediate nodes are at least part of the nodes except the root node and the leaf nodes. The resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenario.

[0010] Optionally, according to the resource element corresponding to the resource judgment condition and the logical closed-loop condition corresponding to the resource judgment condition, after adding the logical closed-loop condition corresponding to the logical closed-loop node and the logical closed-loop scenario corresponding to the logical closed-loop condition under the node corresponding to the resource element in the decision tree, the method further includes:

[0011] The resource judgment conditions of each node in the decision tree are traversed hierarchically to see if they are logically closed. When the resource judgment conditions of the node are not logically closed, a first reminder message is displayed until the resource judgment conditions of the node are logically closed in response to a modification operation, at which time the first reminder message is stopped from being displayed.

[0012] Optionally, after constructing a decision tree corresponding to the resource item according to the resource judgment condition included in the resource consumption scenario and the resource elements included in the resource judgment condition, the method further includes:

[0013] Traversing the nodes on each path in the decision tree, and displaying the second reminder information when there are duplicate nodes on the path, until the nodes on the path are no longer duplicated in response to a modification operation, and then stopping displaying the second reminder information;

[0014] The resource judgment conditions of each node in the decision tree are traversed hierarchically, and when there is an intersection in the resource judgment conditions of the nodes, the third reminder information is displayed, until the resource judgment conditions of the nodes no longer have an intersection in response to a modification operation, and the third reminder information is stopped from being displayed.

[0015] The embodiment of the present application also discloses a method for determining a resource consumption scenario, the method comprising:

[0016] Obtaining a resource processing request, the resource processing request comprising: a query element and a value of the query element;

[0017] In response to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node according to the query element and the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node;

[0018] Among them, the decision tree is constructed by the above-mentioned resource processing method based on the resource consumption scenario, the intermediate nodes in the decision tree are used to characterize the resource elements, the intermediate nodes are at least part of the nodes except the root node and the leaf nodes, the resource judgment conditions are used as the association conditions between the parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenarios.

[0019] Optionally, in response to the resource processing request, traversing the nodes in the decision tree from the root node, and determining the target leaf node according to the query element and the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node, including:

[0020] In response to the resource processing request, traverse the nodes in the decision tree starting from a root node;

[0021] When the query element and the value of the query element satisfy the target resource judgment condition corresponding to the node, enter the next child node associated with the target resource judgment condition for traversal until the target leaf node is traversed;

[0022] The method further comprises:

[0023] When the query element and the value of the query element do not satisfy the resource judgment condition corresponding to the node, a request failure notification is displayed.

[0024] Optionally, after determining the target resource consumption scenario corresponding to the target leaf node, the method further includes:

[0025] Obtain a target statistical algorithm corresponding to a target resource consumption scenario;

[0026] The target resource amount of the target resource consumption scenario is calculated according to the value of the query element and the target statistical algorithm, and the target resource amount is used as the resource amount of the resource item.

[0027] Optionally, after the target resource amount of the target resource consumption scenario is obtained by calculation, the method further includes:

[0028] The resource quantities of each resource project are summarized to obtain the total resource quantity.

[0029] The embodiment of the present application discloses a resource processing device implemented based on a resource consumption scenario, the device comprising:

[0030] An acquisition module, used to acquire a resource consumption scenario included in a resource item and a resource judgment condition included in the resource consumption scenario, wherein the resource judgment condition includes a resource element;

[0031] A construction module is used to construct a decision tree corresponding to the resource item according to the resource judgment conditions included in the resource consumption scenario and the resource elements contained in the resource judgment conditions, wherein the intermediate nodes in the decision tree are used to characterize the resource elements, and the intermediate nodes are at least part of the nodes except the root node and the leaf nodes. The resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenario.

[0032] The embodiment of the present application discloses a resource consumption scenario determination device, the device comprising:

[0033] A request module, used to obtain a resource processing request, wherein the resource processing request includes: a query element and a value of the query element;

[0034] The resource module is used to respond to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node based on the query element and whether the value of the query element meets the resource judgment condition corresponding to the node.

[0035] Among them, the decision tree is constructed by the above-mentioned resource consumption scenario determination device, the intermediate nodes in the decision tree are used to characterize the resource elements, the intermediate nodes are at least part of the nodes except the root node and the leaf nodes, the resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenarios.

[0036] An embodiment of the present application further discloses an electronic device, including: a processor; and a memory, on which executable code is stored. When the executable code is executed, the processor executes one or more methods described in the embodiments of the present application.

[0037] The embodiments of the present application also disclose one or more machine-readable media on which executable codes are stored. When the executable codes are executed, the processor executes one or more methods described in the embodiments of the present application.

[0038] Compared with the related art, the embodiments of the present application have the following advantages:

[0039] In the embodiment of the present application, a decision tree corresponding to the resource project can be constructed based on the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing subsequent resource processing, the tree structure of the decision tree can save the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing and reducing the time consumption of resource processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a system architecture diagram of an embodiment of the present application;

[0041] Figure 2 It is a schematic diagram of an implementation method of a resource processing method in a logistics scenario according to an embodiment of the present application;

[0042] Figure 3 It is a schematic diagram of implementing a resource processing method in an e-commerce scenario according to an embodiment of the present application;

[0043] Figure 4 It is a schematic diagram of implementing a resource processing method in a construction scenario of an embodiment of the present application;

[0044] Figure 5 It is a flowchart of the steps of a resource processing method implemented based on a resource consumption scenario in an embodiment of the present application;

[0045] Figure 6 is a flowchart of the steps of a method for determining a resource consumption scenario in an embodiment of the present application;

[0046] Figure 7 It is a flowchart of specific steps of a resource processing method implemented based on a resource consumption scenario in an embodiment of the present application;

[0047] Figure 8 is a schematic diagram of a decision tree of an embodiment of the present application;

[0048] Fig. 9 is a schematic diagram of another decision tree of an embodiment of the present application;

[0049] Fig.10 It is a block diagram of a resource processing device implemented based on a resource consumption scenario according to an embodiment of the present application;

[0050] Fig.11 is a block diagram of a resource consumption scenario determination device according to an embodiment of the present application;

[0051] Fig.12 It is a schematic diagram of the structure of a device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0053] In order to enable those skilled in the art to better understand the present application, the concepts involved in the present application are explained below:

[0054] Quotation: A component of a commercial contract, which refers to the price of the services (including goods, activities, etc.) provided by the seller to the buyer in response to the buyer's inquiry during the transaction. A quotation can include multiple resource items.

[0055] Resource items: can include expense items or service items. Expense items are specific items of fees charged by the seller for the services provided to the buyer. For example, in the field of logistics, forward delivery fees and value-added service fees are all resource items. A resource item can include multiple different resource consumption scenarios. Service items are specific items of services provided by the seller to the buyer, such as value-added services.

[0056] Resource consumption scenario: A resource consumption scenario is used to characterize a resource processing method under a resource project. A resource project can include multiple different resource consumption scenarios, so that different resource processing methods under a resource project can be distinguished. When processing resources, a target resource consumption scenario under a resource project can be hit according to a resource processing request to implement resource processing. A resource consumption scenario can contain at least one resource judgment condition.

[0057] Resource elements: A certain attribute in the industry to which the seller belongs is called a resource element. Resource elements can be added with decision conditions to form resource judgment conditions. For example, a resource element in the logistics field is the package type. There can also be resource elements in the logistics field such as warehouse relocation identification, transfer type, etc.

[0058] Resource judgment condition: A condition formed based on resource elements and additional decision conditions, used to limit a resource processing method through logical judgment. For example, in the field of logistics, the package type of small package is a resource judgment condition, and the package type of fragile goods is another resource judgment condition.

[0059] Decision tree: A hierarchical tree structure consisting of multiple finite nodes and multiple resource judgment conditions, used to maintain the resource judgment conditions of each resource consumption scenario in the resource project, wherein an intermediate node represents a resource element, and the intermediate node is at least part of the nodes in the decision tree except the root node and the leaf node. The resource judgment condition is used as the condition of the node in the decision tree. Based on whether the condition is met, it is determined whether the node traverses downward to the corresponding child node. If the resource judgment condition of the node is met, it traverses downward. If the resource judgment condition of the node is not met, it does not traverse.

[0060] Query element: When performing resource processing, the query element has a corresponding value for the parameter contained in the resource processing request. The query element value can be used to participate in the judgment of the resource judgment condition of the node during resource processing, so as to decide whether to continue traversing downward from the node. The judgment has two results: the condition is satisfied and the condition is not satisfied.

[0061] The resource processing method implemented based on resource consumption scenarios in the embodiments of the present application can be applied to application scenarios of commercial resource processing, such as a scenario of resource consumption scenarios in the logistics field: when a logistics company provides logistics services to merchants, there are many types of resource items, such as distribution items, value-added service items, etc., and there are a large number of resource consumption scenarios under the resource items. Different resource consumption scenarios have different resource processing methods (for example, when transporting different types of packages such as large packages, small packages, fragile goods, and dangerous goods, there are different resource processing methods). The resource processing method can be specifically implemented through the resource judgment conditions set in the resource consumption scenario. This means that in the process of implementing logistics services, there are a large number of resource consumption scenarios and resource judgment conditions that need to be maintained, and the cost of manual maintenance is high and the efficiency is low. The embodiment of the present application can construct a decision tree corresponding to the resource project according to the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively characterize the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraint based on the tree structure can make the coincidence check and logical closed-loop check of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing in the future, it can be traversed from the root node of the decision tree according to the resource processing request, and finally quickly routed to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing. The routing time complexity of the resource processing routing of the related technology is O (n), while the routing time complexity of the resource processing routing based on the decision tree path of the present application is O (logn), and the routing time complexity is significantly reduced.

[0062] It should be noted that the fields to which the resource processing method implemented by the embodiment of the present application based on the resource consumption scenario is applicable include but are not limited to: logistics, e-commerce, construction, manufacturing, etc. It can be understood that the above application scenarios are only for example, and the embodiment of the present application does not limit the specific application scenarios.

[0063] Reference Figure 1 , which shows a system architecture diagram provided in an embodiment of the present application, including: user equipment and a server.

[0064] Among them, the server can obtain the resource consumption scenarios under each resource project, the resource judgment conditions under the resource consumption scenarios, and the resource elements included in the resource judgment conditions, and build a decision tree based on these data, so as to maintain the relationship between the resource consumption scenarios, resource judgment conditions, and resource elements through a tree structure. Specifically, after setting a root node, the server can use the resource element as the intermediate node in the decision tree, use the resource judgment condition to which the resource element belongs as the association condition for the intermediate node to point to the next child node (the child node is another resource element), and finally use the resource consumption scenario to which the resource judgment condition belongs as the leaf node under the path in the decision tree.

[0065] In the subsequent routing decision tree process, the decision tree is traversed from the root node, and logical judgment is performed based on the resource processing request and the resource judgment condition of the node. When the resource judgment condition of the node is met, the node can continue to traverse to the child node corresponding to the resource judgment condition; when the resource judgment condition of the node is not met, the node stops traversing to the child node corresponding to the resource judgment condition. After the decision tree routing of a resource processing request is finally completed, a routing path to the target resource consumption scenario will be obtained. The target resource consumption scenario is the final resource processing scenario. After determining the target resource consumption scenario, the server determines a resource processing method based on the resource processing request under the resource project. The target resource consumption scenario has a corresponding target statistical algorithm, which can be used to realize the target resource amount of the target resource consumption scenario under the resource project. The target resource amount can be provided to the user device so that the user device can understand the service quotation. In addition, the target resource amount can be used as the resource amount of the resource project. After completing the resource amount calculation of the resource project, the server can summarize the total resource amount and provide it to the user device.

[0066] In summary, the embodiments of the present application can construct a decision tree corresponding to the resource project based on the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing later, you can start traversing from the root node of the decision tree according to the resource processing request, and through matching and judging the resource elements and resource judgment conditions in the decision tree, finally quickly route to a target resource consumption scenario to realize resource processing, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0067] It should be noted that, based on the resource processing method provided in the embodiment of the present application based on the resource consumption scenario, several specific scenarios that can be implemented are as follows:

[0068] In one implementation, referring to Figure 2 , which shows a schematic diagram of an implementation of a resource processing method in a logistics scenario provided by an embodiment of the present application. It is assumed that in a logistics service of an express package, there is a resource item of non-sales delivery fee, and there are three resource consumption scenarios under this resource item: resource consumption scenario 1, resource consumption scenario 2, and resource consumption scenario 3.

[0069] Resource consumption scenario 1 includes three resource judgment conditions:

[0070] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 1";

[0071] Based on resource elements: Resource judgment condition of "Transfer Type": "Transfer Type contains 30";

[0072] Based on resource elements: Resource judgment condition of "warehouse type": "Warehouse type includes xietong".

[0073] Resource consumption scenario 2 includes three resource judgment conditions:

[0074] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 1";

[0075] Based on resource elements: Resource judgment condition of "Transfer Type": "Transfer Type contains 30";

[0076] Based on resource elements: Resource judgment condition of "warehouse type": "Warehouse type includes zhibo".

[0077] Resource consumption scenario 3 includes two resource judgment conditions:

[0078] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 2";

[0079] Based on resource elements: "Warehouse code" resource judgment condition: "Warehouse code contains ZJA401".

[0080] The server can collect the resource judgment conditions contained in the resource consumption scenarios under the resource project, as well as the resource elements contained in the resource judgment conditions, and construct these data into a decision tree, thereby clearly and intuitively representing the relationship between the resource elements and resource judgment conditions in each resource consumption scenario through a tree structure.

[0081] In this decision tree, the child node of the root node can be a warehouse moving identifier, and a branch resource judgment condition of the warehouse moving identifier node is: "The warehouse moving identifier contains 1", and the child node pointed to by the branch resource judgment condition "The warehouse moving identifier contains 1" can be an allocation type. The resource judgment condition of the allocation type node is: "The allocation type contains 30", and the child node pointed to by the resource judgment condition "The allocation type contains 30" can be a warehouse type. A branch resource judgment condition of the warehouse type node is: "The warehouse type contains xietong", and the leaf node pointed to by the branch resource judgment condition "The warehouse type contains xietong" is resource consumption scenario 1. Another branch resource judgment condition of the warehouse type node is: "The warehouse type contains zhibo", and the leaf node pointed to by the branch resource judgment condition "The warehouse type contains zhibo" is resource consumption scenario 2. Another branch resource judgment condition of the warehouse moving identification node is: "The warehouse moving identification contains 2". The child node pointed to by the branch resource judgment condition "The warehouse moving identification contains 2" can be the warehouse code. The resource judgment condition of the warehouse code node is: "The warehouse code contains ZJA401". The leaf node pointed to by the resource judgment condition "The warehouse code contains ZJA401" is resource consumption scenario 3.

[0082] When performing specific resource processing, assuming that the value of the query element contained in the resource processing request sent by the user device includes: warehouse moving identifier: xx1xx, transfer type: x30x, warehouse type: zhibo, the server can traverse the decision tree based on the value of the query element, first traverse to the warehouse moving identifier node, and then because the warehouse moving identifier in the query element contains 1, further traverse to the transfer type node, and then because the transfer type in the query element contains 30, further traverse to the warehouse type node, and finally because the warehouse type contains zhibo, it is determined that resource consumption scenario 2 is the scenario in which the user device requests resource processing. After determining resource consumption scenario 2, the server determines the resource processing method based on the resource processing request under the resource project. Resource consumption scenario 2 has a corresponding statistical algorithm, which can be used to realize the target resource amount of resource consumption scenario 2 under the calculation resource project, and the target resource amount can be provided to the user device.

[0083] In another implementation, referring to Figure 3, which shows a schematic diagram of the implementation of a resource processing method in an e-commerce scenario provided by an embodiment of the present application. Assuming that a commodity is put on an e-commerce platform, there is a resource item called value-added service fee. There are multiple resource consumption scenarios under this resource item. The resource elements involved in each resource consumption scenario include promotion service, promotion type, page design, design type, etc. The resource judgment conditions involved in each resource consumption scenario include "whether promotion service is needed", "promotion type is offline", "promotion type is online", "whether page design is needed", "design type is boutique", "design type is ordinary", etc. Then the server can collect the resource judgment conditions contained in the resource consumption scenario under the resource item, and the resource elements contained in the resource judgment conditions, and construct these data into a decision tree, so as to clearly and intuitively characterize the relationship between the resource elements and resource judgment conditions in each resource consumption scenario through a tree structure. When performing resource processing, the server can route in the decision tree based on the resource processing request sent by the user device, so as to determine a target resource consumption scenario. The target resource consumption scenario has a corresponding statistical algorithm, which can be used to realize the target resource amount of the target resource consumption scenario under the resource item, and the target resource amount can be provided to the user device.

[0084] In another implementation, referring to Figure 4 , which shows a schematic diagram of the implementation of a resource processing method under a construction scenario provided by an embodiment of the present application. Assuming that in a construction project, there is a resource item called construction fee, and there are multiple resource consumption scenarios under this resource item. The resource elements involved in each resource consumption scenario include building material type, daily construction time, seismic resistance level, etc., and the resource judgment conditions involved in each resource consumption scenario include "building material type is xx", "daily construction time is xx", "seismic resistance level is xx", etc. Then the server can collect the resource judgment conditions contained in the resource consumption scenario under the resource item, and the resource elements contained in the resource judgment conditions, and construct these data into a decision tree, thereby clearly and intuitively representing the relationship between the resource elements and resource judgment conditions under each resource consumption scenario through a tree structure. When performing resource processing, the server can route in the decision tree based on the resource processing request sent by the user device, so as to determine a target resource consumption scenario. The target resource consumption scenario has a corresponding statistical algorithm, which can be used to realize the target resource amount of the target resource consumption scenario under the resource item, and the target resource amount can be provided to the user device.

[0085] It should be noted that the resource amount and total resource amount in the embodiment of the present application may be quotations, prices, etc., or may be statistical resources such as time and manpower, or may be virtual resources such as virtual currency. The present application does not limit this.

[0086] It should be noted that the process of obtaining resource items, resource judgment conditions, resource elements, resource consumption scenarios, resource processing requests and other information, signals or data used in the embodiments of the present application is carried out in compliance with the relevant data protection laws and policies of the country where it is located, and with the authorization given by the owner of the corresponding device.

[0087] Reference Figure 5 , which shows a flow chart of the steps of a resource processing method implemented based on a resource consumption scenario provided by an embodiment of the present application, including:

[0088] Step 101: Obtain resource consumption scenarios included in resource items and resource judgment conditions included in the resource consumption scenarios, wherein the resource judgment conditions include resource elements.

[0089] In the embodiment of the present application, the resource item is a specific item of the fee charged for the service provided by the seller to the buyer. For the contract for the service provided by the seller to the buyer, the resource item can be a part of the contract agreed upon. In the process of the buyer using the service provided by the seller, the seller can calculate the quotation under the resource consumption scenario through the resource processing link, and provide the quotation to the buyer for payment. The resource consumption scenario is used to characterize a resource processing method under the resource item. A resource item can include multiple different resource consumption scenarios, so that different resource processing methods under a resource item can be distinguished. When processing resources, a target resource consumption scenario under a resource item can be hit according to the resource processing request to realize resource processing. The resource consumption scenario can include at least one resource judgment condition, which is a condition formed based on resource elements and additional decision conditions, and is used to limit a resource processing method through logical judgment. For example: in the field of logistics, the package type is a small package, which is a resource judgment condition, and the package type is fragile, which is another resource judgment condition.

[0090] In this step, the seller's server may first prepare data to obtain the resource consumption scenarios included in the resource items and the resource judgment conditions included in the resource consumption scenarios. Specifically, the server may compile a list of resource items involved in resource processing and the corresponding resource consumption scenarios, and the list may include the resource judgment conditions included in each resource consumption scenario. After that, the server takes the resource consumption scenario corresponding to a resource item, splits the resource consumption scenario and the resource judgment conditions included in the resource consumption scenario, obtains the resource elements included in the resource judgment conditions, and maintains the correspondence data between the resource judgment conditions and the resource elements in the resource consumption scenarios. After the resource item is processed, the correspondence between the resource consumption scenarios included in the resource item, the resource judgment conditions included in the resource consumption scenarios, and the resource elements included in the resource judgment conditions is obtained.

[0091] Step 102: construct a decision tree corresponding to the resource item according to the resource judgment condition included in the resource consumption scenario and the resource elements included in the resource judgment condition.

[0092] Among them, the intermediate nodes in the decision tree are used to characterize the resource elements, and the intermediate nodes are at least some nodes except the root nodes and leaf nodes. The resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize resource consumption scenarios.

[0093] In an embodiment of the present application, based on the logical relationship that the resource consumption scenario contains resource judgment conditions, and the resource judgment conditions contain resource elements, the resource elements can be converted into nodes in a tree structure, the resource judgment conditions can be converted into association conditions between parent and child nodes in the tree structure, and the leaf nodes in the tree structure can represent the resource consumption scenario, so that a decision tree corresponding to the resource project can be constructed based on the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions.

[0094] The constructed decision tree can be displayed visually to facilitate staff to quickly maintain the data in the decision tree. The decision tree has the characteristic of clearly and intuitively displaying the relationship between resource judgment conditions and resource elements in each resource consumption scenario from a global perspective. The tree structure's own constraints can make the coincidence check and logical closed-loop check of resource judgment conditions and resource elements very simple and efficient. In addition, when performing subsequent resource processing, the decision tree can be traversed from the root node according to the resource processing request, and finally quickly routed to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0095] Reference Figure 6 , which shows a flowchart of the steps of a method for determining a resource consumption scenario provided by an embodiment of the present application, including:

[0096] Step 401: Obtain a resource processing request, wherein the resource processing request includes: a query element and a value of the query element.

[0097] In an embodiment of the present application, when the buyer uses the service provided by the seller, a resource processing link can be triggered. The resource processing link is a link in which the seller determines the resource consumption scenario involving the buyer based on the service item requested by the buyer, and calculates the project fee based on the resource processing method corresponding to the resource consumption scenario.

[0098] Specifically, when the buyer uses the service item provided by the seller, a resource processing request may be generated. The resource processing request includes: a query element and a value of the query element. The value of the query element reflects the characteristics of the service item requested by the buyer.

[0099] For example, in the resource processing of forward delivery fees in the logistics field, the elements related to the resource consumption scenario include: warehouse moving identification, warehouse code, transfer type, warehouse type, etc. The values ​​of these elements limit the specific parameters of the service items selected by the buyer. For example, when the buyer uses a logistics service item, the values ​​of the generated query elements may include: warehouse moving identification: xx1xx, transfer type: x30x, warehouse type: zhibo. The values ​​of these elements limit the scenario characteristics of the service item.

[0100] Step 402, in response to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node based on the query element and whether the value of the query element satisfies the resource judgment condition corresponding to the node.

[0101] In an embodiment of the present application, the seller's server constructs and maintains a decision tree. When the server responds to a resource processing request, it can start from the root node of the decision tree and traverse subsequent nodes in sequence based on the value of the query element in the resource processing request. According to the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node, the decision tree is routed and finally routed to the target leaf node, so that the target resource consumption scenario corresponding to the target leaf node can be used as the scenario for this resource processing. After determining the target resource consumption scenario, the server determines a resource processing method based on the resource processing request under the resource project. The target resource consumption scenario has a corresponding target statistical algorithm, which can be used to realize the target resource amount of the target resource consumption scenario under the calculated resource project. The target resource amount can be provided to the user device so that the user device can understand the service quotation. In addition, the target resource amount can be used as the resource amount of the resource project. After completing the resource amount calculation of the resource project, the server can summarize the total resource amount and provide it to the user device.

[0102] For details, please refer to Figure 2 As well as the above Figure 2 Description of the above, which provides an example of a resource consumption scenario query method in a logistics scenario.

[0103] In summary, the embodiments of the present application can construct a decision tree corresponding to the resource project according to the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing subsequently, it is possible to traverse from the root node of the decision tree according to the resource processing request, and finally quickly route to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0104] Reference Figure 7 , which shows a flow chart of the steps of a resource processing method implemented based on a resource consumption scenario provided by an embodiment of the present application, including:

[0105] Step 201: Obtain resource consumption scenarios included in resource items and resource judgment conditions included in the resource consumption scenarios, wherein the resource judgment conditions include resource elements.

[0106] This step may specifically refer to the above step 101, which will not be described in detail here.

[0107] Step 202: Obtain the arrangement order of the resource judgment conditions included in the resource consumption scenario.

[0108] In an embodiment of the present application, since the decision tree to be constructed is a tree structure, and according to the characteristics of the tree structure, the nodes on a path (corresponding to a resource consumption scenario) can have a parent-child relationship. Therefore, it is required that the nodes of a path have a linear arrangement order. Then, this step can obtain the arrangement order between the resource judgment conditions included in the resource consumption scenario, so as to determine the order of adding nodes on the path in the decision tree according to the arrangement order.

[0109] Specifically, the arrangement order of the resource judgment conditions included in the resource consumption scenario may be an order set according to actual needs or a random order.

[0110] For example, refer to Figure 2 , for the resource consumption scenario 1 of non-sales outbound fees, there are three resource judgment conditions:

[0111] Condition 1: Based on the resource element: the resource judgment condition of "relocation identifier": "relocation identifier contains 1";

[0112] Condition 2, based on resource elements: Resource judgment condition of "transfer type": "transfer type contains 30";

[0113] Condition 3, based on resource elements: Resource judgment condition of "warehouse type": "warehouse type includes xietong".

[0114] Figure 2 The decision tree constructed in the order of condition 1-condition 2-condition 3 is shown in FIG. Of course, the embodiment of the present application can also disrupt the order of condition 1, condition 2, and condition 3, and construct a decision tree by another order. Figure 8 , which shows a schematic diagram of a decision tree provided in an embodiment of the present application. In the decision tree, the child nodes of the root node may include a warehouse type and a warehouse code. A branch resource judgment condition of the warehouse type node is: "The warehouse type contains xietong". The child node pointed to by the branch resource judgment condition "The warehouse type contains xietong" may be a warehouse moving identifier. The resource judgment condition of the warehouse moving identifier node is: "The warehouse moving identifier contains 1". The child node pointed to by the resource judgment condition "The warehouse moving identifier contains 1" may be an allocation type. The resource judgment condition of the allocation type node is: "The allocation type contains 30". The leaf node pointed to by the resource judgment condition "The allocation type contains 30" is resource consumption scenario 1. Another branch resource judgment condition of the warehouse type node is: "The warehouse type contains zhibo". The child node pointed to by the branch resource judgment condition "The warehouse type contains zhibo" is the warehouse moving identifier. The resource judgment condition of the warehouse moving identification node is: "The warehouse moving identification contains 1", and the child node pointed to by the resource judgment condition "The warehouse moving identification contains 1" can be the transfer type. The resource judgment condition of the transfer type node is: "The transfer type contains 30", and the leaf node pointed to by the resource judgment condition "The transfer type contains 30" is resource consumption scenario 2. A resource judgment condition of the warehouse code node is: "Warehouse code contains ZJA401", and the child node pointed to by the resource judgment condition "Warehouse code contains ZJA401" can be the warehouse moving identification. The resource judgment condition of the warehouse moving identification node is: "The warehouse moving identification contains 2", and the leaf node pointed to by the resource judgment condition: "The warehouse moving identification contains 2" is resource consumption scenario 3.

[0115] It can be seen that after changing the arrangement order of the resource judgment conditions included in the resource consumption scenario, the constructed decision tree can still clearly and intuitively represent the relationship between resource elements and resource judgment conditions in each resource consumption scenario without affecting the implementation of subsequent routing resource processing.

[0116] Step 203, in accordance with the arrangement order, starting from the root node of the decision tree, the resource elements of the resource judgment condition are converted into nodes to be added and added to the decision tree in sequence, the resource judgment condition is used as the association condition between the node to be added and the next node, and the resource consumption scenario is used as a leaf node.

[0117] In this step, refer to Figure 2 For resource consumption scenarios 1 and 2 of non-sales outbound fees, the arrangement order of resource judgment conditions including "warehouse moving identification" - resource judgment conditions including "transfer type" - resource judgment conditions including "warehouse type" is determined. For resource consumption scenario 3, after the arrangement order of resource judgment conditions including "warehouse moving identification" - resource judgment conditions including "warehouse code" is determined, for each resource consumption scenario corresponding path in the decision tree, the resource elements corresponding to the resource judgment conditions can be added in sequence starting from the root node according to the arrangement order of the resource judgment conditions of the resource consumption scenario, and the resource judgment conditions corresponding to the resource elements are used as the association conditions between the node corresponding to the resource element and the next node, until the resource consumption scenario is finally used as the leaf node in the path.

[0118] Optionally, step 203 may specifically include:

[0119] Sub-step 2031: convert the resource elements included in the resource consumption scenario into nodes to be added, and sort the nodes to be added according to the arrangement order to obtain a node list.

[0120] In this step, Figure 2 The example provided includes three resource judgment conditions for resource consumption scenario 1 of non-sales outbound fees:

[0121] Condition 1: Based on the resource element: the resource judgment condition of "relocation identifier": "relocation identifier contains 1";

[0122] Condition 2, based on resource elements: Resource judgment condition of "transfer type": "transfer type contains 30";

[0123] Condition 3, based on resource elements: Resource judgment condition of "warehouse type": "warehouse type includes xietong".

[0124] After the resource elements of the three resource judgment conditions included in resource consumption scenario 1 are converted into nodes to be added, the nodes to be added can be sorted according to the arrangement order of the three resource judgment conditions to obtain node list 1 = {node relocation identifier to be added, node allocation type to be added, node warehouse type to be added}. Node list 1 is used to record the order of nodes to be added in resource consumption scenario 1, so that the nodes to be added in resource consumption scenario 1 can be added sequentially starting from the root node. The same is true for resource consumption scenarios 2 and 3, which will not be described here.

[0125] Sub-step 2032: Starting from the root node of the decision tree, extract the nodes to be added in the node list in sequence.

[0126] Reference Figure 2 , combined with the above description, for resource consumption scenario 1, after obtaining node list 1 = {node moving warehouse identifier to be added, node allocation type to be added, node warehouse type to be added}, then according to the node order in node list 1, the moving warehouse identifier can be first used as the child node of the root node, and then the allocation type can be used as the child node of the moving warehouse identifier node, and the warehouse type can be used as the child node of the allocation type node, and finally the resource consumption scenario 1 can be used as the leaf node. Through the node order in the node list of each resource consumption scenario, the nodes on each path can be constructed sequentially starting from the root node. For the same resource elements between different resource consumption scenarios, it is also necessary to compare the nodes with each other and merge the repeated resource element nodes. This process will be explained in the following description.

[0127] Sub-step 2033: When the node to be added is different from the nodes already added in the decision tree, the node to be added is added into the decision tree as a new intermediate node, and the resource judgment condition of the node to be added is used as the association condition between the node to be added and the next node.

[0128] In this step, combined with the above-mentioned sub-step 2032, in the process of constructing the path corresponding to the resource consumption scenario 1 in the decision tree, when adding the warehouse moving identification node, the allocation type node, and the warehouse type node in sequence, the node taken out from the node list 1 each time is different from the node already added in the decision tree. In this case, the node to be added can be added to the decision tree as a new intermediate node, and the resource judgment condition of the node to be added can be used as the association condition between the node to be added and the next node.

[0129] Sub-step 2034: when the node to be added is the same as the node already added in the decision tree, merge the node to be added with the same already added node, and merge the resource judgment condition of the node to be added with the resource judgment condition of the same already added node.

[0130] In this step, combined with the above sub-step 2032, after constructing the path corresponding to the resource consumption scenario 1 in the decision tree, the path corresponding to the resource consumption scenario 2 in the decision tree can be further constructed. The node list 2 of the resource consumption scenario 2 is {node moving warehouse identification to be added, node allocation type to be added, node warehouse type to be added}. For the first moving warehouse identification node taken out from the node list 2, it is the same as the moving warehouse identification node added in the decision tree. At this time, the taken out moving warehouse identification node and the moving warehouse identification node added in the decision tree can be merged into the same node, and the resource judgment condition of the taken out moving warehouse identification node (moving warehouse identification contains 1) is merged with the resource judgment condition of the moving warehouse identification node added in the decision tree into the same resource judgment condition. For the second allocation type node and the third warehouse type node taken out from the node list 2, they are the same as the nodes added in the decision tree, so these nodes can be merged with the same added nodes in the same way, and the resource judgment conditions of these nodes can be merged with the resource judgment conditions of the same added nodes.

[0131] In actual applications, since the resource consumption scenarios in a quotation are complex and numerous, and the same resource judgment conditions exist in most resource consumption scenarios, in an embodiment of the present application, the same resource element nodes and the same resource judgment conditions can be merged in the process of constructing a decision tree, thereby streamlining the amount of data in the decision tree, avoiding the generation of redundant data, improving the intuitiveness of the decision tree, and reducing the difficulty of maintaining the decision tree.

[0132] Optionally, sub-step 2034 may specifically include:

[0133] Sub-step A1: when the node to be added is the same as the previous node that has been added, merge the node to be added with the previous node that has been added, and merge the resource judgment condition corresponding to the node to be added with the resource judgment condition corresponding to the previous node that has been added.

[0134] Sub-step A2: When the node to be added is different from the previous node added, but is the same as the ancestor node of the previous node added, merge the node to be added with the same ancestor node, and merge the resource judgment condition corresponding to the node to be added with the resource judgment condition corresponding to the same ancestor node.

[0135] In the embodiment of the present application, for sub-steps A1-A2, for each node to be added to the decision tree, it can be compared with the previous node added in the decision tree first. If the two are the same, the node to be added is merged with the previous node added, and the resource judgment condition corresponding to the node to be added is merged with the resource judgment condition corresponding to the previous node added. When the node to be added is different from the previous node added in the decision tree, the node to be added is compared with the ancestor node on the path in the decision tree. If the node to be added is the same as the ancestor node, the node to be added is merged with the same ancestor node, and the resource judgment condition corresponding to the node to be added is merged with the resource judgment condition corresponding to the same ancestor node. If the node to be added is not the same as the ancestor node, the node to be added is added as a new node. This can improve the efficiency of processing duplicate nodes during the decision tree construction process and reduce the construction time.

[0136] Step 204: Obtain a resource processing request, wherein the resource processing request includes: a query element and a value of the query element.

[0137] This step may be specifically referred to as the above step 103, which will not be described in detail here.

[0138] Step 205, in response to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node based on the query element and whether the value of the query element satisfies the resource judgment condition corresponding to the node.

[0139] This step may be specifically referred to as the above step 104, which will not be described in detail here.

[0140] Optionally, step 205 may specifically include:

[0141] Sub-step 2051: In response to the resource processing request, traverse the nodes in the decision tree starting from the root node.

[0142] Sub-step 2052: When the query element and the value of the query element satisfy the target resource judgment condition corresponding to the node, enter the next child node associated with the target resource judgment condition for traversal until traversing to the target leaf node.

[0143] Sub-step 2053: When the query element and the value of the query element do not satisfy the resource judgment condition corresponding to the node, a request failure notification is displayed.

[0144] In an embodiment of the present application, a resource processing request may include a query element and a value of the query element. The value of the query element reflects the characteristics of the service item requested by the buyer. When the server responds to the resource processing request, it may start from the root node of the decision tree based on the value of the query element in the resource processing request, and traverse the subsequent nodes in sequence. According to the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node, the decision tree is routed and finally routed to the target leaf node, so that the target resource consumption scenario corresponding to the target leaf node can be used as the scenario for this resource processing. In the case where the value of the query element does not meet the resource judgment condition corresponding to the node, it is considered that the current resource processing request does not hit the resource consumption scenario under the resource item, and there may be a problem with the resource processing request. The server may display a request failure notification for the user device to perform fault analysis.

[0145] For example, refer to Figure 2 , assuming that the value of the query element included in the resource processing request sent by the user device includes: warehouse moving identifier: xx1xx, transfer type: x30x, warehouse type: zhibo, the server can traverse the decision tree based on the value of the query element, first traverse to the warehouse moving identifier node, and then because the warehouse moving identifier in the query element contains 1, further traverse to the transfer type node, and then because the transfer type in the query element contains 30, further traverse to the warehouse type node, and finally because the warehouse type contains zhibo, determine that resource consumption scenario 2 is the scenario in which the user device requests resource processing.

[0146] Optionally, after step 205, the following steps may also be included:

[0147] Step 206: Obtain a target statistical algorithm corresponding to the target resource consumption scenario.

[0148] Step 207: Calculate the target resource amount of the target resource consumption scenario according to the value of the query element and the target statistical algorithm, and use the target resource amount as the resource amount of the resource item.

[0149] In an embodiment of the present application, for steps 206-207, after the target resource consumption scenario is determined, the server determines a resource processing method based on the resource processing request under the resource project. The target resource consumption scenario has a corresponding target statistical algorithm, which can be used to realize the target resource amount of the target resource consumption scenario under the computing resource project. The target resource amount can be provided to the user device so that the user device can understand the service quotation.

[0150] Specifically, the statistical algorithm can be bound to and maintained with the corresponding resource consumption scenario. After determining the target resource consumption scenario corresponding to the resource processing request, the target statistical algorithm corresponding to the target resource consumption scenario can be extracted, and the value of the query element in the resource processing request can be substituted into the target statistical algorithm to calculate the target resource amount of the target resource consumption scenario, and use the target resource amount as the resource amount of the resource item.

[0151] For example, assuming that under the resource item of forward delivery fee, the target resource consumption scenario hit by the resource processing request is to perform first and second weight resource processing according to the weight of the package. The specific target statistical algorithm is:

[0152] When the package weight is greater than the first weight, the target resource quantity = ((package weight - first weight) / additional weight) × additional weight price + first weight price;

[0153] When the package weight is less than or equal to the first weight, the target resource quantity = the first weight price.

[0154] According to the above formula, by substituting the weight of the package in the resource processing request, you can get a quote for the forward delivery fee.

[0155] It should be noted that each resource consumption scenario can also be associated with a fixed price. After the resource processing request hits the target resource consumption scenario, the fixed price corresponding to the target resource consumption scenario can be directly used as the resource amount of the corresponding resource project.

[0156] Optionally, after step 207, the following steps may also be included:

[0157] Step 208: Summarize the resource quantities of each resource item to obtain the total resource quantity.

[0158] In an embodiment of the present application, a commercial contract may involve multiple resource items. For each target resource consumption scenario hit by a resource processing request in a decision tree, the resource amount of each resource item can be calculated. By summarizing the resource amounts of each resource item, the total resource amount can be obtained. The total resource amount can be sent to the user device so that the buyer can understand the price of the current service.

[0159] Optionally, after step 203, the following steps may also be included:

[0160] Step 209: Determine a logic closed-loop condition corresponding to the resource judgment condition according to the resource judgment condition.

[0161] Step 210: According to the resource elements corresponding to the resource judgment conditions and the logical closed-loop conditions corresponding to the resource judgment conditions, under the nodes corresponding to the resource elements in the decision tree, add the logical closed-loop conditions corresponding to the resource judgment conditions and the leaf nodes corresponding to the logical closed-loop conditions for characterizing the logical closed-loop scenarios.

[0162] In an embodiment of the present application, when the server maintains a decision tree, the decision tree needs to further satisfy the logical closed loop of the resource judgment conditions of the node on the basis of satisfying the node and the resource judgment conditions of the node without overlap. Since there will be multiple judgment results when judging the resource judgment conditions (such as satisfying the resource judgment conditions, not satisfying the resource judgment conditions, etc.), the logical closed loop refers to the various judgment results of the resource judgment conditions under the node maintained in the decision tree. In this way, the decision tree can have a complete logical closed loop, and the feedback of the corresponding decision tree routing results can be realized for any resource processing request, thereby improving the operational reliability of the decision tree.

[0163] Reference Figure 2 The decision tree shown is not a logically closed decision tree. It can be seen that the logical closed conditions of "the warehouse moving identifier does not contain 1 and does not contain 2", "the transfer type does not contain 30", "the warehouse type does not contain xietong and does not contain zhibo", and "the warehouse code does not contain ZJA401" are missing.

[0164] Reference Fig. 9 , which shows a schematic diagram of another decision tree provided in an embodiment of the present application, in Figure 2 Based on the decision tree, after completing the logical closed-loop conditions of the resource judgment conditions of the above nodes and the scenarios corresponding to the logical closed-loop conditions for characterizing the logical closed-loop, new resource consumption scenarios 4, 5, 6, and 7 can be obtained.

[0165] Resource consumption scenario 4 includes three resource judgment conditions:

[0166] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 1";

[0167] Based on resource elements: Resource judgment condition of "Transfer Type": "Transfer Type contains 30";

[0168] Based on resource elements: Logical closed loop condition of "warehouse type": "warehouse type does not contain xietong and does not contain zhibo"

[0169] Resource consumption scenario 5 includes two resource judgment conditions:

[0170] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 1";

[0171] Based on resource elements: Resource judgment condition of "Transfer Type": "Transfer Type does not contain 30";

[0172] Resource consumption scenario 6 includes two resource judgment conditions:

[0173] Based on the resource element: "Relocation ID" resource judgment condition: "Relocation ID contains 2";

[0174] Based on resource elements: Resource judgment condition of "Transfer Type": "Warehouse code does not contain ZJA401";

[0175] Resource consumption scenario 7 includes two resource judgment conditions:

[0176] Based on the resource element: the resource judgment condition of "warehouse moving identifier": "warehouse moving identifier does not contain 1 and does not contain 2".

[0177] Therefore, based on the new resource consumption scenario and logical closed loop conditions Figure 2 After logical completion of the decision tree, the new decision tree is as follows Fig. 9 As mentioned in Figure 2 The decision tree Fig. 9 In the decision tree, the warehouse moving identification node also has the logical closed-loop condition of "the warehouse moving identification does not contain 1 and does not contain 2", and the logical closed-loop condition of "the warehouse moving identification does not contain 1 and does not contain 2" points to the leaf node of resource consumption scenario 7; the warehouse code node also has the logical closed-loop condition of "; "the warehouse code does not contain ZJA401", and the logical closed-loop condition of "the warehouse code does not contain ZJA401" points to the leaf node of resource consumption scenario 6; the transfer type node also has the logical closed-loop condition of "; "the transfer type does not contain 30", and the logical closed-loop condition of "the transfer type does not contain 30" points to the leaf node of resource consumption scenario 5; the warehouse type node also has the logical closed-loop condition of "; "the warehouse type does not contain xietong and does not contain zhibo", and the logical closed-loop condition of "the warehouse type does not contain xietong and does not contain zhibo" points to the leaf node of resource consumption scenario 4.

[0178] After completing the logical closed loop of the decision tree, any resource processing request that does not meet resource consumption scenarios 1, 2, and 3 can also correspond to hitting any one of resource consumption scenarios 4, 5, 6, and 7. Resource consumption scenarios 4, 5, 6, and 7 can be situations where the request misses resource consumption scenarios 1, 2, and 3, so as to inform the user of the specific reasons why the resource processing request misses resource consumption scenarios 1, 2, and 3, thereby realizing logical closed loop processing.

[0179] Optionally, after step 210, the following steps may also be included:

[0180] Step 211: traverse the resource judgment conditions of each node in the decision tree hierarchically to see if they are logically closed. If the resource judgment conditions of the node are not logically closed, display the first reminder information until the resource judgment conditions of the node are logically closed in response to the modification operation, and then stop displaying the first reminder information.

[0181] After building the decision tree, a logical closed loop check can be performed, specifically, the resource judgment conditions of each node in the decision tree are logically closed according to the level traversal. If the resource judgment conditions of the node are not logically closed, the first reminder information can be displayed. The first reminder information is used to inform the staff that a node has a fault that is not logically closed. The server stops displaying the first reminder information until the resource judgment conditions of the node are logically closed in response to the modification operation. The logical closed loop check helps to improve the logical rigor of the decision tree and ensure the stable and normal operation of the decision tree.

[0182] Optionally, after step 203, the following steps may also be included:

[0183] Step 212: traverse the nodes on each path in the decision tree, and display the second reminder information when there are duplicate nodes on the path, until the nodes on the path are no longer duplicated in response to the modification operation, and then stop displaying the second reminder information.

[0184] Step 213: traverse the resource judgment conditions of each node in the decision tree hierarchically, and display the third reminder information when there is an intersection in the resource judgment conditions of the nodes, until the resource judgment conditions of the nodes no longer have an intersection in response to a modification operation, and then stop displaying the third reminder information.

[0185] In an embodiment of the present application, for steps 212-213, after constructing the decision tree, a duplication check of the nodes and the resource judgment conditions of the nodes can be performed, specifically, the nodes on each path in the decision tree are traversed to determine whether there are duplicate nodes on the path. When the nodes are duplicated, a second reminder message can be displayed. The second reminder message is used to inform the staff of the failure of duplicate nodes in the decision tree. The server stops displaying the second reminder message until it responds to the modification operation so that there are no duplicate nodes on the path.

[0186] The server can also hierarchically traverse the resource judgment conditions of each node in the decision tree to determine whether the resource judgment conditions of the nodes have an intersection. When the resource judgment conditions of the nodes have an intersection, the server can display a third reminder message, which is used to inform the staff of a failure in which the resource judgment conditions of the nodes in the decision tree have an intersection. The server stops displaying the third reminder message until the resource judgment conditions of the nodes do not have an intersection in response to the modification operation.

[0187] The above repeated verification helps to streamline the data of the decision tree, reduce the interference of redundant data on the decision tree and the problem of increased data volume, and ensure the stable and normal operation of the decision tree.

[0188] In summary, the embodiments of the present application can construct a decision tree corresponding to the resource project according to the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing subsequently, it is possible to traverse from the root node of the decision tree according to the resource processing request, and finally quickly route to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0189] Reference Fig.10 , which shows a block diagram of a resource processing device implemented based on a resource consumption scenario provided by an embodiment of the present application, including:

[0190] The acquisition module 301 is used to acquire the resource consumption scenario included in the resource project and the resource judgment condition included in the resource consumption scenario, wherein the resource judgment condition includes a resource element;

[0191] A construction module 302 is used to construct a decision tree corresponding to the resource item according to the resource judgment condition included in the resource consumption scenario and the resource elements included in the resource judgment condition, wherein the intermediate nodes in the decision tree are used to represent the resource elements, and the intermediate nodes are at least part of the nodes except the root node and the leaf nodes, and the resource judgment condition is used as an association condition between the parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to represent the resource consumption scenario;

[0192] Optionally, the construction module 302 includes:

[0193] A sorting submodule, used to obtain the arrangement order between the resource judgment conditions included in the resource consumption scenario;

[0194] A submodule is constructed to convert the resource elements of the resource judgment conditions into nodes to be added and add them to the decision tree in sequence, starting from the root node of the decision tree in the arrangement order, using the resource judgment conditions as the association conditions between the node to be added and the next node, and using the resource consumption scenario as a leaf node.

[0195] Optionally, the construction submodule includes:

[0196] A sorting unit, configured to convert resource elements included in the resource consumption scenario into nodes to be added, and sort the nodes to be added according to the arrangement order to obtain a node list;

[0197] An extraction unit, used to extract the nodes to be added in the node list in sequence starting from the root node of the decision tree;

[0198] A first judgment unit is used to add the node to be added as a new intermediate node into the decision tree when the node to be added is different from the nodes already added in the decision tree, and use the resource judgment condition of the node to be added as the association condition between the node to be added and the next node;

[0199] The second judgment unit is used to merge the node to be added with the same node already added in the decision tree when the node to be added is the same as the node already added in the decision tree, and merge the resource judgment condition of the node to be added with the resource judgment condition of the same node already added.

[0200] Optionally, the second judging unit includes:

[0201] A first merging subunit, configured to merge the node to be added with the previous node to be added when the node to be added is the same as the previous node to be added, and merge the resource judgment condition corresponding to the node to be added with the resource judgment condition corresponding to the previous node to be added;

[0202] The second merging sub-unit is used to merge the node to be added with the same ancestor node when the node to be added is different from the previous node that has been added, but is the same as the ancestor node of the previous node that has been added, and merge the resource judgment condition corresponding to the node to be added with the resource judgment condition corresponding to the same ancestor node.

[0203] Optionally, the device further comprises:

[0204] A determination module, used to determine a logical closed-loop condition corresponding to the resource judgment condition according to the resource judgment condition;

[0205] A logical closed-loop module is used to add the logical closed-loop condition corresponding to the resource judgment condition and the leaf node corresponding to the logical closed-loop condition for characterizing the logical closed-loop scenario under the node corresponding to the resource element in the decision tree.

[0206] Optionally, the device further comprises:

[0207] A closed-loop verification module is used to hierarchically traverse the resource judgment conditions of each node in the decision tree to see if they are logically closed. When the resource judgment conditions of the node are not logically closed, a first reminder message is displayed until the resource judgment conditions of the node are logically closed in response to a modification operation, at which time the first reminder message is stopped from being displayed.

[0208] Optionally, the device further comprises:

[0209] a node duplication checking module, configured to traverse the nodes on each path in the decision tree, and display second reminder information when there are duplications of nodes on the path, and stop displaying the second reminder information when there are no duplications of nodes on the path in response to a modification operation;

[0210] A conditional duplication verification module is used to traverse the resource judgment conditions of each node in the decision tree hierarchically, and display a third reminder message when there is an intersection in the resource judgment conditions of the nodes, until the resource judgment conditions of the nodes no longer have an intersection in response to a modification operation, and then stop displaying the third reminder message.

[0211] In summary, the embodiments of the present application can construct a decision tree corresponding to the resource project according to the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing subsequently, it is possible to traverse from the root node of the decision tree according to the resource processing request, and finally quickly route to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0212] Reference Fig.11 , which shows a block diagram of a resource consumption scenario determination device provided by an embodiment of the present application, including:

[0213] The request module 501 is used to obtain a resource processing request, wherein the resource processing request includes: a query element and a value of the query element;

[0214] Resource module 502 is used to respond to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node based on the query element and whether the value of the query element satisfies the resource judgment condition corresponding to the node.

[0215] Among them, the decision tree is constructed by a resource consumption scenario determination device, the intermediate nodes in the decision tree are used to characterize the resource elements, the intermediate nodes are at least part of the nodes except the root node and the leaf nodes, the resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenarios.

[0216] Optionally, the resource module includes:

[0217] A response submodule, configured to traverse the nodes in the decision tree starting from a root node in response to the resource processing request;

[0218] A third judgment submodule is used to enter the next child node associated with the target resource judgment condition and traverse until the target leaf node is traversed if the query element and the value of the query element meet the target resource judgment condition corresponding to the node;

[0219] The fourth judgment submodule is used to display a request failure notification when the query element and the value of the query element do not satisfy the resource judgment condition corresponding to the node.

[0220] Optionally, the device further comprises:

[0221] An algorithm module, used to obtain a target statistical algorithm corresponding to a target resource consumption scenario;

[0222] A calculation module is used to calculate the target resource amount of the target resource consumption scenario according to the value of the query element and the target statistical algorithm, and use the target resource amount as the resource amount of the resource item.

[0223] Optionally, the device further comprises:

[0224] The summarizing module is used to summarize the resource quantities of each resource project to obtain the total resource quantity.

[0225] In summary, the embodiments of the present application can construct a decision tree corresponding to the resource project according to the resource judgment conditions included in the resource consumption scenario and the resource elements included in the resource judgment conditions, so as to clearly and intuitively represent the relationship between the resource elements and the resource judgment conditions in each resource consumption scenario through a tree structure. Due to the existence of the decision tree, the self-constraints based on the tree structure can make the coincidence verification and logical closed-loop verification of the resource judgment conditions and resource elements very simple and efficient, solving the high cost and low efficiency problems of manual maintenance and verification. In addition, when performing resource processing subsequently, it is possible to traverse from the root node of the decision tree according to the resource processing request, and finally quickly route to a target resource consumption scenario to realize resource processing by matching and judging the resource elements and resource judgment conditions in the decision tree, thereby eliminating the routing cost of the path outside the target resource consumption scenario, greatly improving the efficiency of resource processing, and reducing the time consumption of resource processing.

[0226] The embodiment of the present application also provides a non-volatile readable storage medium, which stores one or more modules (programs). When the one or more modules are applied to a device, the device can execute instructions (instructions) of each method step in the embodiment of the present application.

[0227] The present application embodiment provides one or more machine-readable media on which instructions are stored, and when executed by one or more processors, an electronic device executes one or more of the methods described in the above embodiments. In the present application embodiment, the electronic device includes various types of devices such as terminal devices and server terminals (clusters).

[0228] The embodiments of the present disclosure may be implemented as a device that uses any appropriate hardware, firmware, software, or any combination thereof to perform desired configurations, and the device may include electronic devices such as terminal devices and server (cluster). Fig.12 An exemplary device 1000 that can be used to implement various embodiments described in the embodiments of the present application is schematically shown.

[0229] For one embodiment, Fig.12 An exemplary apparatus 1000 is shown having one or more processors 1002, a control module (chip set) 1004 coupled to at least one of the (one or more) processors 1002, a memory 1006 coupled to the control module 1004, a non-volatile memory (NVM) / storage device 1008 coupled to the control module 1004, one or more input / output devices 1010 coupled to the control module 1004, and a network interface 1012 coupled to the control module 1004.

[0230] The processor 1002 may include one or more single-core or multi-core processors, and the processor 1002 may include any combination of general-purpose processors or special-purpose processors (such as graphics processors, application processors, baseband processors, etc.). In some embodiments, the device 1000 can be used as a terminal device, a server (cluster), and other devices described in the embodiments of the present application.

[0231] In some embodiments, the apparatus 1000 may include one or more computer-readable media (e.g., memory 1006 or NVM / storage device 1008) having instructions 1014 and one or more processors 1002 combined with the one or more computer-readable media and configured to execute the instructions 1014 to implement a module to perform the actions described in the present disclosure.

[0232] For one embodiment, the control module 1004 may include any suitable interface controller to provide any suitable interface to at least one of the processor(s) 1002 and / or any suitable device or component in communication with the control module 1004 .

[0233] The control module 1004 may include a memory controller module to provide an interface to the memory 1006. The memory controller module may be a hardware module, a software module, and / or a firmware module.

[0234] The memory 1006 may be used, for example, to load and store data and / or instructions 1014 for the device 1000. For one embodiment, the memory 1006 may include any suitable volatile memory, such as a suitable DRAM. In some embodiments, the memory 1006 may include double data rate type four synchronous dynamic random access memory (DDR4 SDRAM).

[0235] For one embodiment, control module 1004 may include one or more input / output controllers to provide an interface to NVM / storage device 1008 and input / output device(s) 1010 .

[0236] For example, NVM / storage 1008 may be used to store data and / or instructions 1014. NVM / storage 1008 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable non-volatile storage device(s) (e.g., one or more hard disk drives (HDDs), one or more compact disk (CD) drives, and / or one or more digital versatile disk (DVD) drives).

[0237] NVM / storage device 1008 may include storage resources that are physically part of the device on which apparatus 1000 is installed, or it may be accessible to the device without being part of the device. For example, NVM / storage device 1008 may be accessed via input / output device(s) 1010 over a network.

[0238] (One or more) input / output devices 1010 may provide an interface for the apparatus 1000 to communicate with any other appropriate device, and the input / output device 1010 may include a communication component, an audio component, a sensor component, etc. The network interface 1012 may provide an interface for the apparatus 1000 to communicate through one or more networks, and the apparatus 1000 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, for example, accessing a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, etc., or a combination thereof for wireless communication.

[0239] For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers (e.g., a memory controller module) of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be packaged together with the logic of one or more controllers of the control module 1004 to form a system-in-package (SiP). For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004. For one embodiment, at least one of the processor(s) 1002 may be integrated on the same die with the logic of one or more controllers of the control module 1004 to form a system-on-chip (SoC).

[0240] In various embodiments, the device 1000 may be, but is not limited to, a terminal device such as a server, a desktop computing device, or a mobile computing device (e.g., a laptop computing device, a handheld computing device, a tablet computer, a netbook, etc.). In various embodiments, the device 1000 may have more or fewer components and / or different architectures. For example, in some embodiments, the device 1000 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touch screen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.

[0241] Among them, the main control chip can be used as a processor or control module in the detection device, sensor data, location information, etc. are stored in a memory or NVM / storage device, the sensor group can be used as an input / output device, and the communication interface may include a network interface.

[0242] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0243] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0244] The present application embodiment is described with reference to the flowchart and / or block diagram of the method, terminal device (system) and computer program product according to the embodiment of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, and the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the function specified in one process or multiple processes in the flowchart and / or one box or multiple boxes in the block diagram.

[0245] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0246] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0247] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0248] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0249] The above is a detailed introduction to a resource processing method and device based on a resource consumption scenario, a resource consumption scenario determination method and device, an electronic device, and a machine-readable medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A resource processing method based on resource consumption scenarios, characterized in that: include: Acquire a resource consumption scenario included in a resource item and a resource judgment condition included in the resource consumption scenario, wherein the resource judgment condition includes a resource element; According to the resource judgment conditions included in the resource consumption scenario and the resource elements contained in the resource judgment conditions, a decision tree corresponding to the resource item is constructed, and the intermediate nodes in the decision tree are used to characterize the resource elements. The intermediate nodes are at least part of the nodes except the root node and the leaf nodes. The resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenario.

2. The method according to claim 1, characterized in that The step of constructing a decision tree corresponding to the resource item according to the resource judgment condition included in the resource consumption scenario and the resource elements included in the resource judgment condition includes: Obtaining an arrangement order between resource judgment conditions included in the resource consumption scenario; According to the arrangement order, starting from the root node of the decision tree, the resource elements of the resource judgment conditions are converted into nodes to be added and added to the decision tree in sequence, the resource judgment conditions are used as the association conditions between the node to be added and the next node, and the resource consumption scenario is used as a leaf node.

3. The method according to claim 2, characterized in that The step of converting the resource elements of the resource judgment condition into nodes to be added and adding them to the decision tree in sequence according to the arrangement order, and using the resource judgment condition as an association condition between the node to be added and the next node, includes: Converting resource elements included in the resource consumption scenario into nodes to be added, and sorting the nodes to be added according to the arrangement order to obtain a node list; Starting from the root node of the decision tree, extracting the nodes to be added in the node list in sequence; When the node to be added is different from the nodes already added in the decision tree, the node to be added is added into the decision tree as a new intermediate node, and the resource judgment condition of the node to be added is used as the association condition between the node to be added and the next node; When the node to be added is the same as the node already added in the decision tree, the node to be added is merged with the same already added node, and the resource judgment condition of the node to be added is merged with the resource judgment condition of the same already added node.

4. The method according to claim 3, characterized in that When the node to be added is the same as a node already added in the decision tree, merging the node to be added with the same node already added comprises: When the node to be added is the same as the previous node that has been added, merging the node to be added with the previous node that has been added, and merging the resource judgment condition corresponding to the node to be added with the resource judgment condition corresponding to the previous node that has been added; When the node to be added is different from the previous node added, but is the same as the ancestor node of the previous node added, the node to be added is merged with the same ancestor node, and the resource judgment condition corresponding to the node to be added is merged with the resource judgment condition corresponding to the same ancestor node.

5. The method according to claim 1, characterized in that After constructing a decision tree corresponding to the resource item according to the resource judgment condition included in the resource consumption scenario and the resource elements included in the resource judgment condition, the method further includes: According to the resource judgment condition, determining a logical closed-loop condition corresponding to the resource judgment condition; According to the resource elements corresponding to the resource judgment conditions and the logical closed-loop conditions corresponding to the resource judgment conditions, under the nodes corresponding to the resource elements in the decision tree, the logical closed-loop conditions corresponding to the resource judgment conditions and the leaf nodes corresponding to the logical closed-loop conditions for characterizing the logical closed-loop scenarios are added.

6. A method for determining a resource consumption scenario, characterized in that: include: Obtaining a resource processing request, the resource processing request comprising: a query element and a value of the query element; In response to the resource processing request, the nodes in the decision tree are traversed starting from the root node, and the target leaf node and the target resource consumption scenario corresponding to the target leaf node are determined based on the query element and the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node; the nodes in the decision tree are used to characterize resource elements, the resource judgment condition is used as the association condition between the parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenario.

7. A resource processing device implemented based on a resource consumption scenario, characterized in that: include: An acquisition module, used to acquire a resource consumption scenario included in a resource item and a resource judgment condition included in the resource consumption scenario, wherein the resource judgment condition includes a resource element; A construction module is used to construct a decision tree corresponding to the resource item according to the resource judgment conditions included in the resource consumption scenario and the resource elements contained in the resource judgment conditions, wherein the intermediate nodes in the decision tree are used to characterize the resource elements, and the intermediate nodes are at least part of the nodes except the root node and the leaf nodes. The resource judgment conditions are used as association conditions between parent and child nodes in the decision tree, and the leaf nodes in the decision tree are used to characterize the resource consumption scenario.

8. A resource consumption scenario determination device, characterized in that: include: A request module, used to obtain a resource processing request, wherein the resource processing request includes: a query element and a value of the query element; A resource module is used to respond to the resource processing request, traverse the nodes in the decision tree starting from the root node, and determine the target leaf node and the target resource consumption scenario corresponding to the target leaf node based on the query element and the judgment result of whether the value of the query element satisfies the resource judgment condition corresponding to the node; the intermediate node in the decision tree is used to characterize the resource element, and the intermediate node is at least part of the node except the root node and the leaf node. The resource judgment condition is used as the association condition between the parent and child nodes in the decision tree, and the leaf node in the decision tree is used to characterize the resource consumption scenario.

9. An electronic device, characterized in that: include: processor; and A memory having executable codes stored thereon, which, when the executable codes are executed, enable the processor to perform the method according to any one of claims 1 to 6.

10. One or more machine-readable media having executable codes stored thereon, which, when executed, cause a processor to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Distributed storage system and method of realizing hard affinity of resource

    CN105991705A

  • Decision tree model-based data processing method and related equipment

    CN113807858A

  • Optimizing networks of decision nodes

    US11379744B1

  • System and method for business decision implementation in a billing environment using decision operation trees

    US6622137B1

  • Article and method for finding a compact representation to visualize complex decision trees

    US7831526B1