Method, electronic device, and storage medium for requesting a resource

By constructing a decision tree to adjust thresholds to identify procurement risks, the problem of inaccurate inventory risk identification in existing technologies is solved, enabling more precise inventory management and cost control.

CN113988751BActive Publication Date: 2025-10-28BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111246458.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-26
Publication Date
2025-10-28
Estimated Expiration
2041-10-26

AI Technical Summary

Technical Problem

Existing technologies cannot accurately identify items with procurement risks, leading to inaccurate inventory cost control.

Method used

By constructing a decision tree, the values ​​of multiple indicators are determined based on the resource scheduling parameters of historical requests, and the thresholds are adjusted to build the decision tree, recommending different resource indicator sequences and threshold sequences, and deciding whether to increase the amount of resources.

Benefits of technology

It improved the accuracy of identifying procurement risks, optimized inventory management, and reduced inventory costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113988751B_ABST
    Figure CN113988751B_ABST
Patent Text Reader

Abstract

This invention discloses a method, electronic device, and storage medium for requesting resources. The method includes: determining the index values ​​of multiple first indicators corresponding to each historical request based on at least one resource scheduling parameter corresponding to each historical request in a first request set corresponding to a first resource; constructing a decision tree based on the index values ​​of the multiple first indicators corresponding to each historical request and a first threshold corresponding to each first indicator; adjusting the first threshold corresponding to at least one first indicator in the decision tree and adjusting the request set corresponding to each node in the decision tree based on the adjusted first threshold when the index value of any second indicator is not within a corresponding set range; determining at least one first indicator sequence and a corresponding threshold sequence based on the adjusted decision tree; and processing a first request based on the determined first indicator sequence and the corresponding threshold sequence; the first request is used to request an increase in the quantity of a first resource.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method for requesting resources, an electronic device, and a storage medium. Background Technology

[0002] Inventory turnover rate is a core indicator of inventory management. The goal of inventory management is to minimize inventory costs while meeting consumer demand. Inventory costs mainly come from the time costs, capital occupation costs, and loss costs incurred by stockpiling goods.

[0003] In related technologies, the existence of procurement risks is determined based on the inventory turnover rate of the requested items, and the decision on whether to allow the procurement of the corresponding items is made based on the determination result, thereby controlling inventory costs. However, this method has the problem of not being able to accurately identify items with procurement risks. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method for requesting resources, an electronic device, and a storage medium to solve the technical problem in the prior art that it is impossible to accurately identify items with procurement risks.

[0005] To achieve the above objectives, the technical solution of the present invention is implemented as follows:

[0006] This invention provides a method for requesting resources, including:

[0007] Based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, the index values ​​of multiple first indicators corresponding to each historical request are determined; the first indicators are used to control the quantity of the first resource stored.

[0008] Based on the index values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, a decision tree is constructed. If the index value of any second indicator is not within the corresponding set range, the first threshold corresponding to at least one first indicator in the decision tree is adjusted, and the request set corresponding to each node in the decision tree is adjusted based on the adjusted first threshold. The index value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree.

[0009] Based on the adjusted decision tree, at least one first indicator sequence and a corresponding threshold sequence are determined.

[0010] Based on the determined first indicator sequence and the corresponding threshold sequence, the first request is processed; the first request is used to request an increase in the quantity of the first resource.

[0011] This invention provides an electronic device, comprising:

[0012] The first determining unit is configured to determine the index values ​​of multiple first indicators corresponding to each historical request based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource; the first indicators are used to control the quantity of the first resource stored.

[0013] An adjustment unit is configured to construct a decision tree based on the index values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, and adjust the first threshold corresponding to at least one first indicator in the decision tree and adjust the request set corresponding to each node in the decision tree based on the adjusted first threshold when the index value of any second indicator is not within the corresponding set range; wherein, the index value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree;

[0014] The second determining unit is used to determine at least one first indicator sequence and a corresponding threshold sequence based on the adjusted decision tree;

[0015] The processing unit is configured to process a first request based on a determined first indicator sequence and a corresponding threshold sequence; the first request is used to request an increase in the quantity of a first resource.

[0016] This invention also provides an electronic device, including: a processor and a memory for storing a computer program that can run on the processor, wherein the processor, when running the computer program, performs the steps of the above-described method for requesting resources.

[0017] This invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described steps of requesting resources.

[0018] In this embodiment of the invention, based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, the index values ​​of multiple first indicators corresponding to each historical request are determined. Based on the index values ​​of the multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, a decision tree is constructed. If the index value of any second indicator is not within the corresponding set range, the first threshold corresponding to at least one first indicator in the decision tree is adjusted, and the request set corresponding to each node in the decision tree is adjusted based on the adjusted first threshold. Based on the adjusted decision tree, at least one first indicator sequence and a corresponding threshold sequence are determined. Based on the determined first indicator sequence and the corresponding threshold sequence, a first request is processed. The first request is used to request an increase in the quantity of the first resource. Therefore, the constructed decision tree can recommend different first indicator sequences and corresponding threshold sequences corresponding to the first resource. By using the recommended first indicator sequence and corresponding threshold sequence, it can be determined whether to allow an increase in the quantity of the first resource based on the currently stored first resource, thereby improving the accuracy of identifying scheduling risks associated with the first request. Attached Figure Description

[0019] Figure 1 A schematic diagram illustrating the implementation flow of the method for requesting resources provided in an embodiment of the present invention;

[0020] Figure 2 A schematic diagram illustrating the implementation process of constructing a decision tree in the method for requesting resources provided in this embodiment of the invention;

[0021] Figure 3 This is a schematic diagram of the adjusted decision tree provided in an embodiment of the present invention;

[0022] Figure 4 A schematic diagram illustrating the implementation flow of processing the first request in the method for requesting resources provided in an embodiment of the present invention;

[0023] Figure 5 A schematic diagram illustrating the implementation flow of the method for requesting resources provided in an application embodiment of the present invention;

[0024] Figure 6 This is a schematic diagram of the relevant data for Test Case 1 provided in an embodiment of the present invention;

[0025] Figure 7 This is a schematic diagram of the relevant data for Test Case 2 provided in the embodiments of the present invention;

[0026] Figure 8 A schematic diagram of the index values ​​of the second index provided for the implementation of the present invention;

[0027] Figure 9 A schematic diagram of the first data table provided for the implementation of the present invention;

[0028] Figure 10 A schematic diagram of the over-threshold tracking and early warning interface provided for the implementation of this invention;

[0029] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention;

[0030] Figure 12 This is a schematic diagram of the hardware composition structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0031] In related technologies, procurement risk control measures are used to approve and manage high-risk procurement activities that exceed thresholds. However, these measures have the following drawbacks:

[0032] 1. Using the same threshold for procurement risk control for different categories of goods makes it impossible to accurately identify goods with procurement risks;

[0033] 2. The threshold for inventory turnover rate is set based on experience and cannot accurately identify items with procurement risks.

[0034] Based on this, embodiments of the present invention provide a method for requesting resources, comprising: determining the index values ​​of multiple first indicators corresponding to each historical request based on at least one resource scheduling parameter corresponding to each historical request; constructing a decision tree based on the index values ​​of the multiple first indicators corresponding to each historical request and a first threshold corresponding to each first indicator; adjusting the first threshold corresponding to at least one first indicator in the decision tree and adjusting the request set corresponding to each node in the decision tree based on the adjusted first threshold when the index value of any second indicator is not within the corresponding set range; determining at least one first indicator sequence and a corresponding threshold sequence based on the adjusted decision tree; and processing a first request based on the determined first indicator sequence and the corresponding threshold sequence; wherein the first request is used to request an increase in the quantity of a first resource. Thus, the constructed decision tree can recommend different first indicator sequences and corresponding threshold sequences corresponding to the first resource, thereby determining whether to allow an increase in the quantity of the first resource based on the currently stored first resource, which can improve the accuracy of identifying scheduling risks associated with the first request.

[0035] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0036] Figure 1This is a schematic diagram illustrating the implementation flow of a method for requesting resources provided in an embodiment of the present invention, wherein the execution subject of the flow is an electronic device such as a terminal device or a server. Figure 1 The methods for requesting resources, as shown, include:

[0037] Step 101: Based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, determine the index values ​​of multiple first indicators corresponding to each historical request; the first indicators are used to control the quantity of the first resource stored.

[0038] Here, the electronic device identifies the first resource in an abnormal state from all stored resources, retrieves historical requests corresponding to this first resource received within a past period from the database, and divides these historical requests into a first request set and a second request set. The historical requests are used to request an increase in the quantity of the first resource. The stored first resources include at least one corresponding historical request requesting the addition of the first resource, thus identifying the historical requests that caused the first resource to become abnormal. The historical requests in the first request set are used to construct a decision tree, and the historical requests in the second request set are used to test the accuracy of the first indicator sequence and corresponding threshold sequence determined based on the decision tree. Both the first and second request sets include multiple historical requests, and both sets include labeled reasonable and unreasonable requests. In the process of labeling reasonable and unreasonable requests, the status of the first resource stored at the corresponding scheduling time is obtained based on the scheduling time included in the historical request. If the first resource stored at the corresponding scheduling time is in an abnormal state, the historical request is labeled as an unreasonable request; if the first resource stored at the corresponding scheduling time is not in an abnormal state, the historical request is labeled as a reasonable request. The scheduling time refers to the time when the first resource was requested to be scheduled.

[0039] The electronic device retrieves at least one resource scheduling parameter corresponding to the first resource from the database based on the scheduling time included in each historical request in the first request set; based on the determined resource scheduling parameters, it determines the index values ​​of multiple first indicators corresponding to each historical request; the first indicators are used to control the quantity of the first resource stored.

[0040] It should be noted that, to improve the accuracy of the determined first indicator values, after obtaining at least one resource scheduling parameter corresponding to the first resource, the obtained resource scheduling parameters are preprocessed. Based on the preprocessed resource scheduling parameters, the indicator values ​​of multiple first indicators corresponding to each historical request are determined. Preprocessing includes: quantile backfilling, smoothing, or averaging outliers in the obtained resource scheduling parameters. Outliers refer to values ​​outside the set range. Quantile backfilling refers to replacing highly disparate values ​​with more uniformly distributed values ​​based on the distribution of the resource scheduling parameters.

[0041] The abnormal state indicates that the storage period is too long. The past period can be 30 days, 45 days, or 60 days, etc., which can be set according to actual needs. The past period can be determined based on the time of the most recent increase in the quantity of the first resource. The past period can consist of a single time segment or multiple discontinuous time segments.

[0042] In practical applications, when the primary resource is the first item procured, abnormal states are characterized by long inventory age, excessively long inventory turnover days, or slow-moving inventory. Long inventory age refers to the storage period exceeding a set in-stock threshold, such as 90 days. The end time of the past period can be determined based on the last procurement time of the first item, where the end time can be after the last procurement time.

[0043] In practical applications, when the primary resource is the first item to be procured, historical requests refer to historical purchase orders. The scheduling time included in the historical requests is the procurement time included in the historical purchase orders. The resource scheduling parameters for the primary resource include inventory-related parameters, business indicators, and procurement control parameters. Inventory-related parameters include the primary item's slow-moving and limited-procurement status, pre-sale status, available inventory quantity / amount, and inventory quantity / amount in each warehouse, and may also include shelf-mounted and de-shelf status. Business indicators include turnover days, inventory turnover, unit turnover, percentage of slow-moving units / amount in a single warehouse or nationwide, and percentage of units with long inventory ages / amount with long inventory ages. Procurement control parameters include procurement quantity / procurement amount and inventory-to-sales ratio growth. Inventory turnover represents the quotient of the sum of inventory costs and the sum of sales costs; unit turnover represents the quotient of the number of units in inventory and the number of units sold.

[0044] When the first resource is the first item to be procured, the first indicator includes one of the following:

[0045] Turnover days represent the number of turnover days corresponding to the order placement time of the historical purchase order for the goods;

[0046] The percentage of unsold inventory represents the ratio between the total number of unsold items in the warehouse and the corresponding total value.

[0047] The inventory-to-sales ratio growth rate represents the difference between the year-on-year growth rate of the amount of orderable inventory and the year-on-year growth rate of the amount of goods shipped out in the past 30 days; Inventory-to-sales ratio growth rate = (Amount of orderable inventory this year - Amount of orderable inventory in the same period last year) / Amount of orderable inventory in the same period last year, Amount of orderable inventory = (Quantity of orderable inventory + Quantity purchased) × Purchase unit price.

[0048] Inventory value represents the sum of the inventory value and the value in transit for each brand's items;

[0049] Orderable inventory quantity represents the sum of the inventory quantity and the quantity in transit for each item in each warehouse;

[0050] The first inventory turnover represents the inventory turnover of each brand's items. Inventory turnover represents the quantity of orderable inventory and the average daily sales volume, or the value of orderable inventory and the average daily sales revenue.

[0051] The second inventory turnover represents the inventory turnover of each item.

[0052] The electronic devices determine the number of turnover days as follows:

[0053] Method 1: Determine the sum between the available inventory and the current order quantity, and then calculate the quotient of this sum and the average daily sales to obtain the turnover days.

[0054] Method 2: Determine the sum of the orderable inventory amount and the total order amount. Then, calculate the quotient of this sum and the average daily sales to obtain the inventory turnover days. Average daily sales are determined based on the sales volume each day within a set time period. Average daily sales are the product of average daily sales and the purchase price per unit. Orderable inventory amount is the product of the orderable inventory quantity and the purchase price per unit.

[0055] Step 102: Based on the index values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, construct a decision tree, and if the index value of any second indicator is not within the corresponding set range, adjust the first threshold corresponding to at least one first indicator in the decision tree and adjust the request set corresponding to each node in the decision tree based on the adjusted first threshold; wherein, the index value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree.

[0056] Here, the first threshold corresponding to the first indicator can be determined by the historical threshold corresponding to the first indicator. For example, the average of the historical thresholds can be used as the corresponding first threshold, or it can be preset by relevant personnel based on experience.

[0057] When an electronic device obtains the index value of each first indicator and the first threshold corresponding to each historical request, it constructs a decision tree according to set rules based on the index values ​​of multiple first indicators and the first threshold corresponding to each historical request. After constructing the decision tree, based on the node information of each node in the decision tree, it identifies all nodes related to historical requests that exceed the first threshold corresponding to the first indicator of the root node from the last layer of the decision tree; that is, it identifies the nodes corresponding to historical requests exceeding the threshold. From the node information of the root node and the node information of the nodes determined from the last layer of the decision tree, it determines the relevant data for calculating the index value of the second indicator. Based on the determined relevant data, it determines the index value corresponding to each second indicator. If the index value of any second indicator is not within the corresponding set range, it adjusts the first threshold corresponding to at least one first indicator in the decision tree. Based on the adjusted first threshold and the corresponding first indicator, it reclassifies the historical requests in the first request set according to the first indicator corresponding to each node in the decision tree, thereby adjusting the request set corresponding to each node in the decision tree. The node information includes the first indicator corresponding to the node, the first threshold corresponding to the first indicator, the total number of historical requests included in the request set corresponding to the node, the number of categorized reasonable requests included in the request set, and the number of categorized unreasonable requests.

[0058] It should be noted that during the decision tree adjustment process, the first threshold corresponding to at least one first indicator in the decision tree can be adjusted, as can the depth of the decision tree and / or the first indicator corresponding to a node in the decision tree. Pruning of the decision tree can also be performed until, based on the adjusted decision tree, it is determined that the values ​​of all second indicators are within their corresponding set ranges. Once the values ​​of all second indicators are within their corresponding set ranges, the decision tree adjustment is stopped, and step 103 is executed.

[0059] The second indicator includes precision and / or recall, and may also include the number of checks.

[0060] Precision is the ratio of the number of unreasonable requests exceeding a threshold to the number of historical requests exceeding a threshold. Precision is used to measure the accuracy of risk management.

[0061] Recall rate represents the ratio of the number of unreasonable requests exceeding a threshold to the total number of categorized unreasonable requests. Recall rate is used to measure the coverage of risk management.

[0062] The control quantity represents the total number of historical requests exceeding the threshold and the total number of historical requests in the first request set. The control quantity is used to measure the workload of risk management.

[0063] The total number of identified unreasonable requests and the total number of historical requests in the first request set are both obtained from the node information corresponding to the root node of the decision tree. The number of unreasonable requests exceeding the threshold and the number of historical requests exceeding the threshold are obtained from the node information corresponding to the last level node in the decision tree. Exceeding the threshold refers to an indicator value greater than the first indicator value corresponding to the root node in the decision tree.

[0064] The rules define the method for constructing the decision tree. The construction of the decision tree is essentially a process of binary classification of historical requests in the first set according to a first threshold corresponding to a first indicator. The rules can indicate the order of some or all of the first indicators among multiple first indicators and the depth of the decision tree. This order indicates the first indicator corresponding to each node in the decision tree. In some embodiments, the rules can also only indicate the depth of the decision tree and the first indicator corresponding to the root node. In this case, during the construction of the decision tree, the first indicators corresponding to nodes other than the root node can be randomly selected from multiple first indicators. The constructed decision tree includes multiple layers, each layer including at least one node. For example, the first layer of the decision tree includes a root node, and each node corresponds to two child nodes. The root node corresponds to the first request set, and each node other than the root node corresponds to a request subset. The request subset corresponding to a child node is obtained by binary classification of historical requests in the request set corresponding to the parent node based on the first threshold corresponding to the first indicator of the parent node. Each node corresponds to one first indicator, and different nodes may have the same or different first indicators. Among any parent node and its two corresponding child nodes, at most two nodes have the same first index, and the first thresholds corresponding to the same first index are different. The first threshold of the child node is obtained by adjusting the first threshold of the parent node.

[0065] In practical applications, during the construction of the decision tree, based on the first indicator A corresponding to the root node and the first threshold corresponding to the first indicator A, historical requests in the first request set are binary classified, resulting in request subsets corresponding to the two child nodes of the root node. In one request subset, the indicator values ​​of the first indicator A for all historical requests are greater than the corresponding first threshold, while in the other request subset, the indicator values ​​of the first indicator A for all historical requests are less than or equal to the corresponding first threshold. Based on the first threshold corresponding to the first indicator B of the child node corresponding to the root node, the request subset corresponding to that child node is binary classified, resulting in request subsets corresponding to each child node of that child node. This method is repeated sequentially to classify the request subsets corresponding to each node, thus obtaining the decision tree after classification.

[0066] In some embodiments, the method includes the following when constructing a decision tree:

[0067] Step 201: Based on the first indicator and the first threshold corresponding to the first node, perform binary classification on the historical requests in the request set corresponding to the first node to obtain the request subsets corresponding to the two first child nodes of the first node;

[0068] Step 202: Based on the first indicator and the first threshold corresponding to the first child node, perform binary classification on the historical requests in the request subset corresponding to the first child node to obtain the request subsets corresponding to the two second child nodes corresponding to the first child node.

[0069] Here, the first node can be any node in the decision tree. When the first node is the root node, the request set corresponding to the first node is the first request set.

[0070] The electronic device determines a first indicator C corresponding to the first node. Based on the correspondence between the first indicator and a first threshold, it determines a first threshold corresponding to the first indicator C. Based on the first indicator C and the corresponding first threshold corresponding to the first node, and based on the indicator values ​​of the first indicator C corresponding to historical requests in the request set, the historical requests in the request set corresponding to the first node are binary classified to obtain two request subsets corresponding to the first child nodes of the first node. In one request subset, the indicator value of the first indicator C corresponding to each historical request is greater than the corresponding first threshold, and in the other request subset, the indicator value of the first indicator C corresponding to each historical request is less than or equal to the corresponding first threshold. The first indicator corresponding to the first node can be randomly determined from multiple first indicators or can be pre-specified.

[0071] Given the request subsets corresponding to the two first child nodes of the first node, determine the first index D and the first threshold corresponding to each first child node of the first node; based on the first index D and the first threshold corresponding to the first child node, and based on the index value of the first index D corresponding to each historical request in the request subset, perform binary classification on the historical requests in the request subset corresponding to the first child node to obtain the request subsets corresponding to the two second child nodes of the first child node.

[0072] The first indicator corresponding to the first child node can be randomly determined from multiple first indicators or it can be pre-specified; the first indicator corresponding to the first node can be the same as the first indicator corresponding to one of the first child nodes; when the first node and one of the first child nodes correspond to the same first indicator, their corresponding first thresholds are different, and the first threshold corresponding to the first indicator of the first child node is determined based on the first threshold of the first indicator of the first node.

[0073] To more accurately determine the first indicator and the corresponding first threshold for each child node, in some embodiments, the method for determining the first indicator and the corresponding first threshold for the first child node includes:

[0074] Under the condition of satisfying the first set condition, among the first indicators other than the first indicator corresponding to the first node, determine the third indicator corresponding to each first child node corresponding to the first node.

[0075] If the first set condition is not met, the first indicator corresponding to the first node is determined to be the first indicator corresponding to a first child node of the first node, and the first product is determined to be the first threshold corresponding to the first indicator of the first child node; among the first indicators other than the first indicator corresponding to the first node, the fourth indicator corresponding to another first child node of the first node is determined.

[0076] Based on the established correspondence between the first indicator and the first threshold, the first threshold corresponding to each third indicator is determined, as well as the first threshold corresponding to the fourth indicator; wherein,

[0077] The first product represents the product between the index value of the segmentation index and the total number of historical requests in the request set corresponding to the first node; the index value of the segmentation index is calculated based on the index value of the first index corresponding to the first node for each historical request in the request set corresponding to the first node.

[0078] Here, when the electronic device receives the request subsets corresponding to the two first child nodes corresponding to the first node, it determines whether the first set condition is met based on the request subset and / or the index value corresponding to the segmentation index. Specifically, the electronic device can determine, based on the request subset, a first ratio between the number of labeled reasonable requests and the number of labeled unreasonable requests in the request set corresponding to the first node; determine a first product between the index value corresponding to the segmentation index and the total number of historical requests included in the request subset; and determine whether the first set condition is met based on the first ratio or the first product.

[0079] Under the current condition of satisfying the first setting, the first indicators corresponding to the two first child nodes of the first node are different from the first indicators corresponding to the first node. At this time, it is necessary to change the first indicators corresponding to the two first child nodes of the first node. The electronic device determines the third indicator corresponding to each first child node of the first node from the first indicators other than the first indicator corresponding to the first node. Based on the set correspondence between the first indicator and the first threshold, the first threshold corresponding to each third indicator is determined.

[0080] If the first set condition is not met, and the first indicator corresponding to one of the first child nodes of the first node is the same as the first indicator corresponding to the first node, and the first threshold corresponding to the first child node needs to be changed, then the first indicator corresponding to the first node is determined as the first indicator corresponding to one of the first child nodes of the first node, and the first product is determined as the first threshold corresponding to the first indicator corresponding to the first child node; among the first indicators other than the first indicator corresponding to the first node, the fourth indicator corresponding to another first child node of the first node is determined, and the first threshold corresponding to the fourth indicator is determined based on the set correspondence between the first indicator and the first threshold.

[0081] The process of determining the first product as the first threshold corresponding to the first index of the first child node is as follows:

[0082] Based on the index value of the first index corresponding to the first node for each historical request in the request set corresponding to the first node, the index value corresponding to the segmentation index is determined; the first product between the index value corresponding to the segmentation index and the total number of historical requests included in the request subset is determined, and the determined first product is determined as the first threshold corresponding to the first index of the first child node. The index value of the segmentation index is used to determine the new first threshold; the segmentation index includes information gain, information gain ratio, or Gini index.

[0083] In practical applications, the formula is used. Calculate information gain, where, D represents the request set corresponding to the first node. k Let Ent(D) represent the entropy of set D, where y represents the value of the first index corresponding to the first node, Y represents the set of index values ​​of the first index corresponding to the first node, P(y|D) represents the probability of y appearing in the set of index values ​​of the first index corresponding to set D, and |D| represents the total number of historical requests included in set D. i |Representation set D i The total number of historical requests included in D i The i-th subset of set D is represented by i, which is a positive integer less than or equal to k.

[0084] For example, when calculating the information gain corresponding to node A, D represents the request set corresponding to node A, D k The subset of requests corresponding to the k-th child node of node A is represented by k, where k is a positive integer less than or equal to 2.

[0085] Using formula Calculate the information gain ratio.

[0086] Using formula Calculate the Gini index.

[0087] It should be noted that the first indicator and the first threshold corresponding to each child node can be determined using the method described above.

[0088] In some embodiments, the first setting condition includes one of the following:

[0089] The first product is greater than or equal to the minimum set threshold corresponding to the first indicator;

[0090] The first ratio is greater than or equal to a set ratio threshold; the first ratio represents the ratio between the number of reasonable requests and the number of unreasonable requests in the request set corresponding to the first node.

[0091] Here, the ratio threshold can be set to be greater than 0.5. The minimum threshold represents the minimum value that the first indicator needs to reach under normal circumstances.

[0092] To improve the accuracy of the determined index value corresponding to the second index, in some embodiments, the method for determining the index value corresponding to the second index includes:

[0093] If the value of the second indicator determined based on the node information of the second node is less than or equal to the second set threshold, the second node and its child nodes are deleted from the decision tree.

[0094] Based on the node information of the root node in the updated decision tree and the node information of the third node in the last layer, the indicator value corresponding to the second indicator is determined; where,

[0095] The second node represents a node related to a historical request whose corresponding indicator value is greater than the first threshold corresponding to the root node in the decision tree; the node information includes the number of identifiable unreasonable requests and the number of identifiable reasonable requests.

[0096] Here, the electronic device identifies the node to which a historical request belongs, whose corresponding indicator value is greater than the first threshold of the first indicator corresponding to the root node of the decision tree. From the decision tree, it identifies all second nodes related to that child node, with the second nodes located in the middle and last layers of the decision tree. Based on the node information of the second nodes and the root node, relevant data for calculating the indicator value of the second indicator is determined. Based on the determined relevant data, the indicator value corresponding to each second indicator is determined. If the determined indicator value of the second indicator is less than or equal to a second set threshold, indicating that the second node has a relatively small impact on the indicator value of the second indicator, the second node and its child nodes are deleted from the decision tree. Based on the node information of the root node and the node information of the third node in the last layer of the updated decision tree, the indicator value corresponding to the second indicator is determined. It should be noted that when the second indicator does not include the card control quantity, the indicator value corresponding to the second indicator can be determined solely based on the node information of the third node in the last layer.

[0097] When the second metric is precision, the relevant data includes the number of identifiable unreasonable requests corresponding to the second node and the total number of historical requests contained in the request subset corresponding to the second node. When the second metric is recall, the relevant data includes the number of identifiable unreasonable requests corresponding to the second node and the total number of identifiable unreasonable purchases contained in the first request set corresponding to the root node. When the second metric is control quantity, the relevant data includes the total number of historical requests contained in the request subset corresponding to the second node and the total number of historical requests contained in the first request set corresponding to the root node.

[0098] Step 103: Based on the adjusted decision tree, determine at least one first indicator sequence and its corresponding threshold sequence.

[0099] Here, the electronic device stops adjusting the decision tree when all the index values ​​corresponding to the second index are within the corresponding set range. From the nodes included in the adjusted decision tree, it determines the node to which the historical request belongs, whose corresponding index value is greater than the first threshold corresponding to the first index of the root node belongs. Based on the determined first index and the corresponding first threshold of the node, it outputs at least one first index sequence and a corresponding threshold sequence. The order of the first indexes in the first index sequence is determined by the topology of the nodes in the adjusted decision tree, and the nodes corresponding to each first index included in the first index sequence are all at different levels in the decision tree. That is, the same first index sequence includes any two nodes corresponding to different levels of the first index.

[0100] It should be noted that when there are at least two second indicators, the values ​​of all second indicators need to be considered comprehensively to determine the first indicator sequence and the corresponding threshold sequence in order to obtain the optimal combination of first indicators. The first indicator sequence includes some or all of the multiple first indicators mentioned in step 101.

[0101] For example, Figure 3 A schematic diagram of the adjusted decision tree is shown. Figure 3 As shown, the first indicator corresponding to the root node is the turnover days, the first threshold for the turnover days corresponding to the root node is 42.425, the Gini index corresponding to the root node is 0.5, the total number of historical requests contained in the first request set corresponding to the root node is 111383, the number of reasonable requests identified in the first request set is 55663, and the number of unreasonable requests identified is 55720. class=1 represents unreasonable requests, class=0 represents reasonable requests, true represents requests less than or equal to the corresponding first threshold, and false represents requests greater than the corresponding first threshold. Figure 3 Among them, the number of historical requests with a turnover period greater than 42.42525 is 47795, and the number of historical requests with a turnover period less than or equal to 42.42525 is 63588.

[0102] In practical applications, based on Figure 3 The nodes within the dashed box determine at least one first indicator sequence and its corresponding threshold sequence. Figure 3 The nodes connected by the dashed lines form a first index sequence. Among them, Figure 3 The precision rate corresponding to the last node connected by the middle dashed line is 2921 / 3752, the recall rate is 2921 / 55720, and the number of checks is 3752 / 111383.

[0103] Step 104: Based on the determined first indicator sequence and the corresponding threshold sequence, process the first request; the first request is used to request an increase in the quantity of the first resource.

[0104] Here, when the electronic device receives a new first request, given a first indicator sequence and its corresponding threshold sequence, it obtains or predicts at least one resource scheduling parameter corresponding to the first resource based on the scheduling time included in the first request. Based on the determined resource scheduling parameters, it determines the indicator value of each first indicator in the first indicator sequence, thus obtaining the indicator values ​​of multiple first indicators corresponding to the first request. Based on the indicator values ​​of the multiple first indicators corresponding to the first request, and the threshold values ​​corresponding to each first indicator in the corresponding threshold sequence, it determines the scheduling risk corresponding to the first request, and decides whether to allow the increase in the number of first resources according to the first request based on the determined scheduling risk. Wherein, if the corresponding indicator value is greater than the threshold value corresponding to the corresponding first indicator, it indicates that the first request has a scheduling risk.

[0105] In practical applications, the first request is a purchase order for a first item. The electronic device, based on the purchase time included in the received purchase order, obtains or predicts the inventory-related parameters, business indicators, and purchase control parameters corresponding to the first item. Based on these parameters, it determines the indicator values ​​corresponding to multiple first indicators in the first indicator sequence, thus obtaining the indicator values ​​for the multiple first indicators corresponding to the purchase order. Based on the indicator values ​​of the multiple first indicators corresponding to the purchase order, and the threshold values ​​corresponding to each first indicator in the corresponding threshold sequence, it determines whether the purchase order carries any purchase risk. If it is determined that the purchase order does not carry any purchase risk, or that the existing purchase risk is within a set risk range, purchase is permitted according to the purchase order. Purchase risk can include risks such as slow sales of the first item, excessively long inventory time, or excessive inventory turnover.

[0106] It should be noted that in some embodiments, when a purchase order is determined to have procurement risk, multiple second purchase times are determined based on the first purchase time in the purchase order, and the indicator values ​​corresponding to multiple first indicators at different second purchase times are predicted. Based on the determined sequence of first indicators and the corresponding threshold sequence, the corresponding second purchase time is output when the corresponding indicator value is less than the corresponding threshold, so that relevant personnel can adjust the purchase time in the purchase order based on the output second purchase time. In some embodiments, a credit score for the purchaser can also be determined for each purchase order submitted by the purchaser. For example, the purchaser's credit score can be determined based on two dimensions: whether the purchase order has procurement risk and the risk level. The risk level can be determined by the indicator value of the first indicator and the corresponding threshold.

[0107] To improve the accuracy of the determined first indicator sequence and corresponding threshold sequence, and to more accurately identify the risks associated with the first request, such as... Figure 4As shown, in some embodiments, processing the first request based on the determined first indicator sequence and the corresponding threshold sequence includes:

[0108] Step 401: Based on the index values ​​of the multiple first indicators corresponding to each historical request in the second request set corresponding to the first resource, and based on the determined first indicator sequence and the corresponding threshold sequence, determine the historical requests that exceed the threshold and obtain unreasonable historical requests.

[0109] Here, the second request set is used to test the accuracy of the determined first indicator sequence and the corresponding threshold sequence. The second request set includes multiple calibrated reasonable requests and calibrated unreasonable requests, both of which are historical requests corresponding to the first resource.

[0110] The electronic device uses the method described above for determining the index values ​​of multiple first indicators corresponding to historical requests in the first request set to determine the index values ​​of multiple first indicators corresponding to each historical request in the second request set corresponding to the first resource. From the determined first indicator sequence and the corresponding threshold sequence, the threshold corresponding to each first indicator in the first indicator sequence is determined; based on the threshold corresponding to each first indicator in the first indicator sequence, and based on the index values ​​of multiple first indicators corresponding to each historical request in the second request set, historical requests whose corresponding index values ​​are greater than the corresponding first indicator thresholds are determined, thus obtaining all historical requests in the second request set that exceed the threshold, i.e., unreasonable historical requests.

[0111] Step 402: Determine the accuracy based on the unreasonable requests identified in the second request set and the determined unreasonable historical requests.

[0112] Here, the electronic device compares the unreasonable requests identified in the second request set with the identified unreasonable historical requests to determine the identical historical requests; it then calculates the quotient of the number of all identical historical requests and the total number of identified unreasonable requests included in the second request set to obtain the accuracy corresponding to the first indicator sequence. It should be noted that the electronic device can determine the accuracy corresponding to each first indicator sequence in the above manner.

[0113] Step 403: If the determined accuracy is greater than or equal to the first set threshold, process the first request based on the determined first index sequence and the corresponding threshold sequence.

[0114] Here, if any determined accuracy is greater than or equal to a first set threshold, the electronic device indicates that the accuracy of the corresponding first indicator sequence meets the requirements, and processes the first request based on the corresponding first indicator sequence and the corresponding threshold sequence.

[0115] If it is determined that the accuracy of at least two first indicator sequences is greater than or equal to a first set threshold, the first request is processed based on any one of the corresponding first indicator sequences and the first threshold sequence.

[0116] In some embodiments, the method further includes: adjusting a first threshold corresponding to at least one first indicator in the decision tree and adjusting a request subset corresponding to each node in the decision tree based on the adjusted first threshold when all determined accuracies are less than the first set threshold.

[0117] Here, if the determined accuracy is less than the first set threshold, the electronic setting indicates that the characterization accuracy does not meet the requirements. The decision tree is then adjusted according to the method described in step 102 to redetermine the first index sequence and the corresponding threshold sequence.

[0118] In this embodiment of the invention, based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, the index values ​​of multiple first indicators corresponding to each historical request are determined. Based on the index values ​​of the multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, a decision tree is constructed. If the index value of any second indicator is not within the corresponding set range, the first threshold corresponding to at least one first indicator in the decision tree is adjusted, and the request set corresponding to each node in the decision tree is adjusted based on the adjusted first threshold. Based on the adjusted decision tree, at least one first indicator sequence and a corresponding threshold sequence are determined. Based on the determined first indicator sequence and the corresponding threshold sequence, a first request is processed. The first request is used to request an increase in the quantity of the first resource. Therefore, the constructed decision tree can recommend different first indicator sequences and corresponding threshold sequences corresponding to the first resource. By using the recommended first indicator sequence and corresponding threshold sequence, it can be determined whether to allow an increase in the quantity of the first resource based on the currently stored first resource, thereby improving the accuracy of identifying scheduling risks associated with the first request.

[0119] When the value of the second indicator is within the corresponding set range, the first indicator sequence and the corresponding threshold sequence are determined. Thus, there is a certain correlation between the threshold corresponding to the second indicator and the first indicator. Therefore, based on the determined first indicator sequence and the corresponding threshold sequence, the first request can be processed to meet the risk control requirements indicated by the second indicator. Figure 5 A schematic diagram illustrating the implementation flow of the method for requesting resources provided in an application embodiment of the present invention, as shown below. Figure 5 As shown, the methods for requesting resources include:

[0120] Step 501: Based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, determine the index values ​​of multiple first indicators corresponding to each historical request; the first indicators are used to control the quantity of the first resource stored.

[0121] Step 501 is the same as step 101; please refer to the relevant description in step 101.

[0122] Step 502: Based on the index values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, construct a decision tree, and if the index value of any second indicator is not within the corresponding set range, adjust the first threshold corresponding to at least one first indicator in the decision tree and adjust the request set corresponding to each node in the decision tree based on the adjusted first threshold; wherein, the index value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree.

[0123] Step 501 is the same as step 102; please refer to the relevant description in step 102.

[0124] Step 503: Based on the adjusted decision tree, determine at least one first indicator sequence and its corresponding threshold sequence.

[0125] Step 503 is the same as step 103; please refer to the relevant description in step 103.

[0126] Step 504: Based on the index values ​​of the multiple first indicators corresponding to each historical request in the second request set corresponding to the first resource, and based on the determined first indicator sequence and the corresponding threshold sequence, determine the historical requests that exceed the threshold and obtain unreasonable historical requests.

[0127] Step 504 is the same as step 401; please refer to the relevant description in step 401.

[0128] Step 505: Determine the accuracy based on the unreasonable requests identified in the second request set and the determined unreasonable historical requests.

[0129] Step 505 is the same as step 402; please refer to the relevant description in step 402.

[0130] Step 506: Determine whether the determined accuracy is greater than or equal to the first set threshold.

[0131] Step 507: If the determined accuracy is greater than or equal to the first set threshold, process the first request based on the determined first index sequence and the corresponding threshold sequence.

[0132] Step 508: If all determined accuracies are less than the first set threshold, return to step 502 and perform the adjustment of the first threshold corresponding to at least one first indicator in the decision tree and the adjustment of the request subset corresponding to each node in the decision tree based on the adjusted first threshold.

[0133] It should be noted that experimental data demonstrates that the resource request method provided in this solution can improve the accuracy of identifying unreasonable purchase orders. The experimental data is as follows:

[0134] like Figure 6 Test Case 1 shown: For the purchase orders of the primary category of pet supplies, the percentage of unreasonable purchase orders that can be controlled increased from 18% to 71%, and the percentage of total purchase orders that can be controlled increased from 7% to 27%. This meets the design goals and business expectations, namely: it can help the business control most unreasonable purchases, while the increased approval volume is within a controllable range, and the efficiency of risk management is greatly improved.

[0135] like Figure 7 Test Case 2 shows that for the automotive business unit's maintenance and repair purchase orders, Recommendation Value 1 increased the percentage of unreasonable purchase orders controlled from 3.21% to 16.3%, and the percentage of total controlled purchase orders increased from 2.91% to 9.9%. Recommendation Value 2 controlled 60.6% of unreasonable purchases, but 38.1% of orders required information entry and approval. Businesses can define different control objectives based on product category characteristics, and the algorithm will provide corresponding threshold solutions.

[0136] like Figure 8 As shown, for purchase orders related to maintenance and repair, the precision rate increased from 29.5% to 44.1%, the recall rate increased from 3.2% to 16.3%, and the number of orders reviewed increased from 2.9% to 9.9%.

[0137] It should be noted that, as Figure 9 As shown, the electronic device can output a first data table, which displays the actual usage thresholds and recommended thresholds for different categories of items, for relevant personnel to refer to before placing an order. For example... Figure 10 As shown, after placing an order based on the purchase order, the electronic device can also output an over-threshold tracking warning interface so that relevant personnel can track the ordered items online.

[0138] To implement the resource request method of this invention, this invention also provides an electronic device, such as... Figure 11 As shown, the electronic device includes:

[0139] The first determining unit 11 is used to determine the index values ​​of multiple first indicators corresponding to each historical request based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource; the first indicators are used to control the quantity of the first resource stored.

[0140] The adjustment unit 12 is used to construct a decision tree based on the indicator values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, and to adjust the first threshold corresponding to at least one first indicator in the decision tree and adjust the request set corresponding to each node in the decision tree based on the adjusted first threshold when the indicator value of any second indicator is not within the corresponding set range; wherein, the indicator value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree;

[0141] The second determining unit 13 is used to determine at least one first indicator sequence and a corresponding threshold sequence based on the adjusted decision tree.

[0142] Processing unit 14 is used to process a first request based on a determined first index sequence and a corresponding threshold sequence; the first request is used to request an increase in the quantity of a first resource.

[0143] In some embodiments, the processing unit 14 is specifically used for:

[0144] Based on the index values ​​of the multiple first indicators corresponding to each historical request in the second request set corresponding to the first resource, and based on the determined first indicator sequence and the corresponding threshold sequence, historical requests exceeding the threshold are determined, and unreasonable historical requests are obtained.

[0145] Accuracy is determined based on the unreasonable requests identified in the second request set and the unreasonable historical requests identified.

[0146] If the determined accuracy is greater than or equal to the first set threshold, the first request is processed based on the determined first index sequence and the corresponding threshold sequence.

[0147] In some embodiments, the processing unit 14 is further configured to:

[0148] If all determined accuracies are less than the first set threshold, adjust the first threshold corresponding to at least one first indicator in the decision tree, and adjust the request subset corresponding to each node in the decision tree based on the adjusted first threshold.

[0149] In some embodiments, when constructing a decision tree, the adjustment unit 12 is specifically used for:

[0150] Based on the first indicator and the first threshold corresponding to the first node, the historical requests in the request set corresponding to the first node are classified into two categories to obtain the request subsets corresponding to the two first child nodes of the first node.

[0151] Based on the first indicator and the first threshold corresponding to the first child node, the historical requests in the request subset corresponding to the first child node are classified into two categories to obtain the request subsets corresponding to the two second child nodes corresponding to the first child node.

[0152] In some embodiments, when constructing a decision tree, the adjustment unit 12 is specifically used for:

[0153] Under the condition of satisfying the first set condition, among the first indicators other than the first indicator corresponding to the first node, determine the third indicator corresponding to each first child node corresponding to the first node.

[0154] If the first set condition is not met, the first indicator corresponding to the first node is determined to be the first indicator corresponding to a first child node of the first node, and the first product is determined to be the first threshold corresponding to the first indicator of the first child node; among the first indicators other than the first indicator corresponding to the first node, the fourth indicator corresponding to another first child node of the first node is determined.

[0155] Based on the established correspondence between the first indicator and the first threshold, the first threshold corresponding to each third indicator is determined, as well as the first threshold corresponding to the fourth indicator; wherein,

[0156] The first product represents the product between the index value of the segmentation index and the total number of historical requests in the request set corresponding to the first node; the index value of the segmentation index is calculated based on the index value of the first index corresponding to the first node for each historical request in the request set corresponding to the first node.

[0157] In some embodiments, the first setting condition includes one of the following:

[0158] The first product is greater than or equal to the minimum set threshold corresponding to the first indicator;

[0159] The first ratio is greater than or equal to a set ratio threshold; the first ratio represents the ratio between the number of reasonable requests and the number of unreasonable requests in the request set corresponding to the first node.

[0160] In some embodiments, when determining the index value corresponding to the second index, the adjustment unit 12 is specifically used for:

[0161] If the value of the second indicator determined based on the node information of the second node is less than or equal to the second set threshold, the second node and its child nodes are deleted from the decision tree.

[0162] Based on the node information of the root node in the updated decision tree and the node information of the second node in the last layer, the indicator value corresponding to the second indicator is determined; where,

[0163] The second node represents the node related to historical requests whose corresponding indicator value is greater than the first threshold corresponding to the root node in the decision tree; the node information includes the number of labeled unreasonable requests and the number of labeled reasonable requests.

[0164] In practical applications, the various units included in an electronic device can be implemented by a processor in the electronic device, such as a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU), or a field-programmable gate array (FPGA), or by a combination of a processor and a communication interface in the electronic device.

[0165] It should be noted that the above embodiments of the electronic device, when requesting resources, are only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the electronic device and the resource requesting method embodiments provided above belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0166] Based on the hardware implementation of the above program modules, and in order to implement the information recommendation method of the present invention, the present invention also provides an electronic device. Figure 12 This is a schematic diagram of the hardware composition structure of the electronic device provided in the embodiments of the present invention, such as... Figure 12 As shown, the electronic device 12 includes:

[0167] The communication interface 121 enables information exchange with other devices, such as network devices.

[0168] The processor 122 is connected to the communication interface 121 to enable information interaction with other devices and to execute the method for requesting resources provided by one or more of the above-described technical solutions when running a computer program. The computer program is stored in the memory 123.

[0169] Of course, in practical applications, the various components in electronic device 12 are coupled together through bus system 124. It can be understood that bus system 124 is used to realize communication between these components. In addition to a data bus, bus system 124 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 12 The general labeled all buses as Bus System 124.

[0170] The memory 123 in this embodiment of the invention is used to store various types of data to support the operation of the electronic device 12. Examples of such data include any computer program used to operate on the electronic device 12.

[0171] It is understood that memory 123 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 123 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0172] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 122. Processor 122 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the hardware of processor 122 or by instructions in software form. Processor 122 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 122 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, specifically memory 123. Processor 122 reads the program from memory 123 and, in conjunction with its hardware, completes the steps of the aforementioned methods.

[0173] Optionally, when the processor 122 executes the program, it implements the corresponding processes implemented by the terminal in the various methods of the embodiments of the present invention. For the sake of brevity, these will not be described in detail here.

[0174] In an exemplary embodiment, the present invention also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 123 storing a computer program, which can be executed by a processor 122 of a terminal to complete the steps described in the foregoing method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0175] In the several embodiments provided by this invention, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0176] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0177] Furthermore, in the various embodiments of the present invention, all functional units can be integrated into one processing module, or each unit can be a separate unit, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0178] It should be noted that the technical solutions described in the embodiments of the present invention can be combined arbitrarily without conflict.

[0179] It should be noted that the term "and / or" in the embodiments of this invention is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0180] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for requesting resources, characterized in that, include: Based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource, the index values ​​of multiple first indicators corresponding to each historical request are determined. The first indicator is used to control the quantity of the first resource stored, where the first resource is the first item procured. Based on the index values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, a decision tree is constructed. If the index value of any second indicator is not within the corresponding set range, the first threshold corresponding to at least one first indicator in the decision tree is adjusted, and the request set corresponding to each node in the decision tree is adjusted based on the adjusted first threshold. The index value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree. The second indicator includes at least one of precision, recall, or block count. Based on the adjusted decision tree, at least one first indicator sequence and a corresponding threshold sequence are determined. Based on the determined first indicator sequence and the corresponding threshold sequence, the first request is processed; the first request is used to request an increase in the quantity of the first resource.

2. The method according to claim 1, characterized in that, The first request is processed based on the determined first indicator sequence and the corresponding threshold sequence, including: Based on the index values ​​of the multiple first indicators corresponding to each historical request in the second request set corresponding to the first resource, and based on the determined first indicator sequence and the corresponding threshold sequence, historical requests exceeding the threshold are determined, and unreasonable historical requests are obtained. Based on the unreasonable requests identified in the second request set and the determined unreasonable historical requests, the accuracy corresponding to the first indicator sequence is determined. The unreasonable requests are historical requests in which the first resource stored corresponding to the scheduling time is in an abnormal state. The abnormal state represents at least one of long inventory age, excessive inventory turnover days, or slow sales. The accuracy corresponding to the first indicator sequence is obtained by comparing the unreasonable requests identified in the second request set with the determined unreasonable historical requests, identifying identical historical requests, and calculating the quotient of the number of identical historical requests and the total number of identified unreasonable requests included in the second request set. If the determined accuracy is greater than or equal to the first set threshold, the first request is processed based on the determined first index sequence and the corresponding threshold sequence.

3. The method according to claim 2, characterized in that, The method further includes: If all determined accuracies are less than the first set threshold, adjust the first threshold corresponding to at least one first indicator in the decision tree, and adjust the request subset corresponding to each node in the decision tree based on the adjusted first threshold.

4. The method according to claim 1, characterized in that, When constructing a decision tree, the method includes: Based on the first indicator corresponding to the first node and the first threshold corresponding to the first indicator, the historical requests in the request set corresponding to the first node are binary classified to obtain the request subsets corresponding to the two first child nodes of the first node; the first node is any node in the decision tree. Based on the first indicator and the first threshold corresponding to the first child node, the historical requests in the request subset corresponding to the first child node are classified into two categories to obtain the request subsets corresponding to the two second child nodes corresponding to the first child node.

5. The method according to claim 4, characterized in that, When determining the first indicator and the corresponding first threshold for the first child node, the method includes: Under the condition of satisfying the first set condition, among the first indicators other than the first indicator corresponding to the first node, determine the third indicator corresponding to each first child node corresponding to the first node. If the first set condition is not met, the first indicator corresponding to the first node is determined to be the first indicator corresponding to a first child node of the first node, and the first product is determined to be the first threshold corresponding to the first indicator of the first child node; among the first indicators other than the first indicator corresponding to the first node, the fourth indicator corresponding to another first child node of the first node is determined. Based on the established correspondence between the first indicator and the first threshold, the first threshold corresponding to each third indicator is determined, as well as the first threshold corresponding to the fourth indicator; wherein, The first product represents the product between the index value of the segmentation index and the total number of historical requests in the request set corresponding to the first node; the index value of the segmentation index is calculated based on the index value of the first index corresponding to the first node for each historical request in the request set corresponding to the first node.

6. The method according to claim 5, characterized in that, The first setting condition includes one of the following: The first product is greater than or equal to the minimum set threshold corresponding to the first indicator; The first ratio is greater than or equal to a set ratio threshold; the first ratio represents the ratio between the number of reasonable requests and the number of unreasonable requests in the request set corresponding to the first node.

7. The method according to claim 1, characterized in that, When determining the indicator value corresponding to the second indicator, the method includes: If the value of the second indicator determined based on the node information of the second node is less than or equal to the second set threshold, the second node and its child nodes are deleted from the decision tree. Based on the node information of the root node in the updated decision tree and the node information of the second node in the last layer, the indicator value corresponding to the second indicator is determined; where, The second node represents the node related to historical requests whose corresponding indicator value is greater than the first threshold corresponding to the root node in the decision tree; the node information includes the number of labeled unreasonable requests and the number of labeled reasonable requests.

8. An electronic device, characterized in that, include: The first determining unit is used to determine the index values ​​of multiple first indicators corresponding to each historical request based on at least one resource scheduling parameter corresponding to each historical request in the first request set corresponding to the first resource. The first indicator is used to control the quantity of the first resource stored, where the first resource is the first item procured. An adjustment unit is configured to construct a decision tree based on the indicator values ​​of multiple first indicators corresponding to each historical request and the first threshold corresponding to each first indicator, and adjust the first threshold corresponding to at least one first indicator in the decision tree and adjust the request set corresponding to each node in the decision tree based on the adjusted first threshold when the indicator value of any second indicator is not within the corresponding set range; wherein, the indicator value corresponding to each second indicator is determined based on the number of historical requests exceeding the threshold represented by the node in the decision tree, and the second indicator includes at least one of precision, recall, or control quantity; The second determining unit is used to determine at least one first indicator sequence and a corresponding threshold sequence based on the adjusted decision tree; The processing unit is configured to process a first request based on a determined first indicator sequence and a corresponding threshold sequence; the first request is used to request an increase in the quantity of a first resource.

9. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Large data-based system and method for analyzing safe stock and reorder of household electrical appliances

    CN107563705A

  • Resource scheduling method, device, equipment and computer readable storage medium

    CN112039709A