Method, apparatus and device for determining resource quantity, and storage medium
Patent Information
- Application Number
- CN202111643221.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2041-12-29
AI Technical Summary
[0004]然而,上述资源数量的确定方式中,确定出的需要转移的资源数量与订单资源的资源数量正相关,例如,对于订单资源的资源数量比较多的订单,商家需要转移的资源数量也比较多
[0037]本申请提供的技术方案,由于订单信息包括对象标识,以及订单资源与配送距离中的至少一种,使得确定的资源数量能够反映目标订单的对象标识,以及订单资源与配送距离中的至少一种,提高了确定出的需要转移的资源数量与目标订单的匹配度,准确性更高;由于用来确定转移资源的技术资源变量和履约资源变量满足各自的资源约束条件,使得确定出的资源数量不会过高或过低,进而确定出的资源数量的稳定性更高。
Smart Images

Figure CN116432915B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a method, apparatus, device and storage medium for determining the quantity of resources. Background Technology
[0002] With the development of internet technology and the widespread adoption of smart devices, various service businesses have emerged, such as food delivery and express delivery. Typically, instant delivery services involve a fulfillment relationship between merchants, platforms, and users, with the platform acting as an intermediary to provide delivery fulfillment services. When a user places an order with a merchant on the platform, the merchant needs to transfer a certain amount of resources to the platform, thus requiring a determination of the quantity of resources transferred. The reasonableness of this resource quantity affects the balance of interests among merchants, users, and the platform.
[0003] In related technologies, order resources are acquired for each order, and the quantity of resources that need to be transferred corresponding to the order is determined based on these order resources.
[0004] However, in the above method of determining the resource quantity, the determined quantity of resources to be transferred is positively correlated with the quantity of resources in the order. For example, for orders with a large quantity of resources, the merchant needs to transfer a larger quantity of resources. Since the determination of the quantity of resources to be transferred is based solely on the quantity of resources in the order, the determined quantity is not accurate enough. Furthermore, if the quantity of resources in the order fluctuates significantly, the determined quantity of resources to be transferred is not stable enough. Summary of the Invention
[0005] This application provides a method, apparatus, device, and storage medium for determining the quantity of resources, which can solve the problems in related technologies.
[0006] On one hand, a method for determining the quantity of resources is provided. The method includes: obtaining order information of a target order, wherein the order information of the target order includes an object identifier and at least one of order resources and delivery distance; determining technical resource variables and fulfillment resource variables based on order information of multiple historical orders, wherein the technical resource variables and the fulfillment resource variables satisfy their respective resource constraints, wherein the resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the fulfillment resource variables are used to constrain the scope of fulfillment service resources; determining the technical service resources and fulfillment service resources corresponding to the target order based on the order information of the target order, the technical resource variables, and the fulfillment resource variables; and determining the quantity of resources to be transferred corresponding to the target order based on the technical service resources and the fulfillment service resources.
[0007] In one possible implementation, the order information of the target order includes the order resources, the delivery distance, and the object identifier; the fulfillment resource variables include resource tier variables and distance tier variables; and the fulfillment service resources include order service resources and distance service resources.
[0008] The process of determining the technical service resources and fulfillment service resources corresponding to the target order based on the order information of the target order, the technical resource variables, and the fulfillment resource variables, and determining the quantity of resources to be transferred corresponding to the target order based on the technical service resources and the fulfillment service resources, includes: determining the order service resources corresponding to the target order based on the order resources of the target order and the resource tier variables; determining the distance service resources corresponding to the target order based on the delivery distance of the target order and the distance tier variables; determining the technical service resources corresponding to the target order based on the object identifier of the target order, the order resources of the target order, and the technical resource variables; and determining the quantity of resources to be transferred corresponding to the target order based on the order service resources, the distance service resources, and the technical service resources.
[0009] In one possible implementation, the resource tier variables include a first resource range, a first basic resource, an order step size, an order step size resource, and a first standard resource; determining the order service resource corresponding to the target order based on the order resource of the target order and the resource tier variables includes: in response to the order resource of the target order belonging to the first resource range, using the first basic resource as the order service resource; in response to the order resource of the target order not belonging to the first resource range, obtaining the additional order resource of the target order; determining the order service resource corresponding to the target order based on the first basic resource, the additional order resource, the order step size, and the order step size resource; and in response to the order service resource being greater than the first standard resource, using the first standard resource as the order service resource.
[0010] In one possible implementation, the distance ladder variable includes a first distance interval, a second basic resource, a distance step size, a distance step size resource, and a second standard resource; determining the distance service resource corresponding to the target order based on the delivery distance of the target order and the distance ladder variable includes: in response to the delivery distance of the target order belonging to the first distance interval, using the second basic resource as the distance service resource; in response to the delivery distance of the target order not belonging to the first distance interval, obtaining the additional distance resource of the target order; determining the distance service resource corresponding to the target order based on the second basic resource, the additional distance resource, the distance step size, and the distance step size resource; and in response to the distance service resource being greater than the second standard resource, using the second standard resource as the distance service resource.
[0011] In one possible implementation, the technical resource variables include the correspondence between object identifiers and resource conversion coefficients, and a third standard resource; determining the technical service resource corresponding to the target order based on the object identifier of the target order, the order resources of the target order, and the technical resource variables includes: determining the resource conversion coefficient corresponding to the target order based on the object identifier of the target order and the technical resource variables; determining the technical service resource corresponding to the target order based on the order resources of the target order and the resource conversion coefficient corresponding to the target order; and, in response to the technical service resource of the target order being less than the third standard resource, using the third standard resource as the technical service resource.
[0012] In one possible implementation, determining the technical resource variables and fulfillment resource variables based on the order information of the plurality of historical orders includes: acquiring the order information of the plurality of historical orders, wherein the order information of each historical order includes order resources, delivery distance, object identifier, and historical resources transferred; determining the technical resource variables and the fulfillment resource variables based on the order information of the plurality of historical orders and a resource variable calculation model, wherein the resource variable calculation model includes a mathematical programming model constructed based on the resource constraints of the technical resource variables and the resource constraints of the fulfillment resource variables.
[0013] In one possible implementation, the resource constraints of the technical resource variables include the upper and lower limits and data types of each resource variable in the technical resource variables, and a minimum constraint on technical service resources. The resource constraints of the performance resource variables include the upper and lower limits and data types of each resource variable in the performance resource variables, a cap constraint on order service resources, and a cap constraint on distance service resources. The step of determining the technical resource variables and the performance resource variables based on the order information and resource variable calculation model of multiple historical orders includes: initializing the values of a first resource interval and an order step size; aggregating the data of the multiple historical orders according to the initialized first resource interval and order step size to obtain first aggregated historical order data; solving the mathematical programming model based on the first aggregated historical order data; and determining the technical resource variables and the performance resource variables based on the solution result of the mathematical programming model.
[0014] In one possible implementation, determining the technical resource variables and the performance resource variables based on the solution result of the mathematical programming model includes: determining the technical resource variables and the performance resource variables based on the feasible solution in response to the solution result of the mathematical programming model being feasible; updating the values of the first resource interval and the order step size in response to the solution result of the mathematical programming model being infeasible; aggregating the data of the multiple historical orders based on the updated first resource interval and order step size to obtain second aggregated historical order data; solving the mathematical programming model based on the second aggregated historical order data and the resource constraints; and determining the technical resource variables and the performance resource variables based on the solution result of the mathematical programming model.
[0015] In one possible implementation, the resource constraints further include constraints on the magnitude of change in the quantity of resources to be transferred, and the technical resource variables include the correspondence between object identifiers and resource conversion coefficients. In response to the solution result of the mathematical programming model being feasible, after determining the technical resource variables and the fulfillment resource variables based on the feasible solution, the method further includes: searching for order information among the plurality of historical orders that does not meet the constraints on the magnitude of change in the quantity of resources to be transferred; obtaining the resource conversion coefficients corresponding to the object identifiers that meet the constraints on the magnitude of change in the quantity of resources to be transferred based on the order information that does not meet the constraints on the magnitude of change in the quantity of resources to be transferred and the technical resource variables and the fulfillment resource variables; and updating the technical resource variables based on the resource conversion coefficients corresponding to the object identifiers that meet the constraints on the magnitude of change in the quantity of resources to be transferred.
[0016] On the other hand, a device for determining the quantity of resources is provided, the device comprising:
[0017] The acquisition module is used to acquire the order information of the target order, wherein the order information of the target order includes an object identifier and at least one of order resources and delivery distance;
[0018] The first determining module is used to determine technical resource variables and performance resource variables based on order information of multiple historical orders. The technical resource variables and the performance resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the performance resource variables are used to constrain the scope of performance service resources.
[0019] The second determining module is used to determine the technical service resources and fulfillment service resources corresponding to the target order based on the order information of the target order, the technical resource variables, and the fulfillment resource variables, and to determine the quantity of resources that need to be transferred corresponding to the target order based on the technical service resources and the fulfillment service resources.
[0020] In one possible implementation, the order information of the target order includes the order resources, the delivery distance, and the object identifier; the fulfillment resource variables include resource tier variables and distance tier variables; and the fulfillment service resources include order service resources and distance service resources.
[0021] The second determining module is used to determine the order service resources corresponding to the target order based on the order resources of the target order and the resource tier variable; determine the distance service resources corresponding to the target order based on the delivery distance of the target order and the distance tier variable; determine the technical service resources corresponding to the target order based on the object identifier of the target order, the order resources of the target order, and the technical resource variable; and determine the quantity of resources that need to be transferred corresponding to the target order based on the order service resources, the distance service resources, and the technical service resources.
[0022] In one possible implementation, the resource ladder variables include a first resource range, a first basic resource, an order step size, an order step size resource, and a first standard resource;
[0023] The second determining module is configured to: in response to the order resources of the target order belonging to the first resource range, use the first basic resource as the order service resource; in response to the order resources of the target order not belonging to the first resource range, obtain the additional order resources of the target order; determine the order service resource corresponding to the target order based on the first basic resource, the additional order resources, the order step size, and the order step size resource; and in response to the order service resource being greater than the first standard resource, use the first standard resource as the order service resource.
[0024] In one possible implementation, the distance ladder variable includes a first distance interval, a second base resource, a distance step size, a distance step size resource, and a second standard resource;
[0025] The second determining module is configured to: in response to the delivery distance of the target order belonging to a first distance interval, use the second basic resource as the distance service resource; in response to the delivery distance of the target order not belonging to the first distance interval, obtain additional distance resources for the target order; determine the distance service resource corresponding to the target order based on the second basic resource, the additional distance resources, the distance step size, and the distance step size resource; and in response to the distance service resource being greater than the second standard resource, use the second standard resource as the distance service resource.
[0026] In one possible implementation, the technical resource variables include the correspondence between object identifiers and resource conversion coefficients, as well as third standard resources;
[0027] The second determining module is configured to determine the resource conversion coefficient corresponding to the target order based on the object identifier of the target order and the technical resource variable; determine the technical service resource corresponding to the target order based on the order resource of the target order and the resource conversion coefficient corresponding to the target order; and, in response to the technical service resource of the target order being less than the third standard resource, use the third standard resource as the technical service resource.
[0028] In one possible implementation, the first determining module is used to acquire order information of the plurality of historical orders, the order information of each historical order including order resources, delivery distance, object identifier, and historical resources transferred; and to determine the technical resource variable and the fulfillment resource variable based on the order information of the plurality of historical orders and a resource variable calculation model, the resource variable calculation model including a mathematical programming model constructed based on the resource constraints of the technical resource variable and the resource constraints of the fulfillment resource variable.
[0029] In one possible implementation, the resource constraints of the technical resource variables include the upper and lower limits and data types of each resource variable in the technical resource variables, and the minimum technical service resource constraint; the resource constraints of the performance resource variables include the upper and lower limits and data types of each resource variable in the performance resource variables, the maximum order service resource constraint, and the maximum distance service resource constraint.
[0030] The first determining module is used to initialize the values of the first resource interval and the order step size; aggregate the data of the multiple historical orders according to the initialized first resource interval and the order step size to obtain the first aggregated historical order data; solve the mathematical programming model based on the first aggregated historical order data, and determine the technical resource variable and the fulfillment resource variable according to the solution result of the mathematical programming model.
[0031] In one possible implementation, the first determining module is configured to: determine the resource variable based on the feasible solution in response to the solution result of the mathematical programming model being feasible; determine the technical resource variable and the performance resource variable based on the feasible solution in response to the solution result of the mathematical programming model being feasible; update the values of the first resource interval and the order step size in response to the solution result of the mathematical programming model being non-feasible; aggregate the data of the multiple historical orders based on the updated first resource interval and order step size to obtain second aggregated historical order data; solve the mathematical programming model based on the second aggregated historical order data and the resource constraints; and determine the technical resource variable and the performance resource variable based on the solution result of the mathematical programming model.
[0032] In one possible implementation, the resource constraint further includes a constraint on the magnitude of change in the quantity of resources to be transferred, and the technical resource variable includes a correspondence between object identifiers and resource conversion coefficients; the first determining module is further configured to search for order information among the plurality of historical orders that does not meet the constraint on the magnitude of change in the quantity of resources to be transferred; based on the order information that does not meet the constraint on the magnitude of change in the quantity of resources to be transferred, the technical resource variable, and the fulfillment resource variable, obtain the resource conversion coefficient corresponding to the object identifier that meets the constraint on the magnitude of change in the quantity of resources to be transferred; and update the technical resource variable based on the resource conversion coefficient corresponding to the object identifier that meets the constraint on the magnitude of change in the quantity of resources to be transferred.
[0033] On the other hand, a computer device is also provided, the computer device including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the method for determining the number of resources as described in any of the preceding claims.
[0034] On the other hand, a computer-readable storage medium is also provided, wherein at least one piece of program code is stored therein, the at least one piece of program code being loaded and executed by a processor to implement the method for determining the number of resources as described in any of the preceding claims.
[0035] On the other hand, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform any of the resource quantity determination methods described above.
[0036] The technical solution provided in this application can bring at least the following beneficial effects:
[0037] The technical solution provided in this application, because the order information includes at least one of the object identifier and the order resources and delivery distance, enables the determined resource quantity to reflect the object identifier of the target order and at least one of the order resources and delivery distance, thereby improving the matching degree between the determined resource quantity to be transferred and the target order and increasing the accuracy; because the technical resource variables and fulfillment resource variables used to determine the transferred resources meet their respective resource constraints, the determined resource quantity will not be too high or too low, thus making the determined resource quantity more stable. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the implementation environment of a method for determining the quantity of resources provided in an embodiment of this application;
[0040] Figure 2 This is a flowchart of a method for determining the quantity of resources provided in an embodiment of this application;
[0041] Figure 3 This is a flowchart of a search evaluation method provided in an embodiment of this application;
[0042] Figure 4 This is a schematic diagram of a resource variable calculation model for resource quantity provided in an embodiment of this application;
[0043] Figure 5 This is a schematic diagram of a resource quantity determination device provided in an embodiment of this application;
[0044] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0046] Figure 1 A schematic diagram illustrating the implementation environment of the method for determining the number of resources provided in this application embodiment is shown. Figure 1 As shown, the implementation environment may include: a first electronic device 101, a second electronic device 102, and a server 103.
[0047] The first electronic device 101 and the second electronic device 102 can be any electronic product that allows human-computer interaction with a user through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting device, such as a PC (Personal Computer), mobile phone, PDA (Personal Digital Assistant), wearable device, PPC (Pocket PC), tablet computer, etc. The first electronic device 101 and the second electronic device 102 communicate with the server 103 through a wired network or wireless network, thereby realizing resource transfer through interaction with the server 103.
[0048] The first electronic device 101 and the second electronic device 102 can refer to one of a plurality of electronic devices. This embodiment only uses the first electronic device 101 and the second electronic device 102 as examples. Those skilled in the art will know that the number of the first electronic device 101 and the second electronic device 102 can be more or less. For example, there may be only one first electronic device 101 and one second electronic device 102, or there may be dozens or hundreds of first electronic devices 101 and two electronic devices 102, or more. This application embodiment does not limit the number and type of electronic devices.
[0049] Server 103 can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed file system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Server 103 is used to execute the resource quantity determination method provided in this application embodiment. An application for determining the resource quantity is installed and runs on server 103; this application can be of any type, and this application embodiment does not limit its application. Of course, server 103 may also include other functional servers to provide more comprehensive and diversified services.
[0050] In this embodiment, a first electronic device 101 installs a first application provided by a server 103, and a second electronic device 102 installs a second application provided by the server 103. The first and second applications may be the same or different. Optionally, the first electronic device 101 can be a user-used device. The first electronic device 101 can generate order information for a target order through the first application and send the generated order information to the server 103. The server 103 can determine the quantity of resources to be transferred corresponding to the target order based on the order information and send the order information and the determined quantity of resources to be transferred to the second electronic device 102. Optionally, the second electronic device 102 can be a merchant-used device. After receiving the quantity of resources to be transferred corresponding to the target order, the second electronic device 102 can transfer the resources from its account to the server's account through the second application.
[0051] Those skilled in the art should understand that the first electronic device 101, the second electronic device 102, and the server 103 described above are merely examples. Other existing or future electronic devices or servers that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0052] based on Figure 1 In the implementation environment shown, this application embodiment provides a method for determining the quantity of resources. Figure 2 A flowchart illustrating a method for determining the quantity of resources provided in an embodiment of this application is shown below. Figure 2 As shown, the method includes, but is not limited to, the following steps 201-203.
[0053] Step 201: Obtain the order information of the target order. The order information includes the object identifier and at least one of the order resources and delivery distance.
[0054] In one possible implementation, a target user places an order in a first application installed on a first electronic device. In response to the target user clicking the order button or paying for the order resources, the first electronic device sends order information for the target order to a server. This order information includes an object identifier for the target order, and at least one of the following: order resources and delivery distance. That is, the server receives the order information for the target order sent by the first electronic device.
[0055] In one possible implementation, the order resource is the order price of the target order, the delivery distance is the distance between the merchant's location corresponding to the target order and the target location, and the object identifier is the merchant identifier of the merchant corresponding to the target order, or the object identifier is the merchant type of the merchant corresponding to the target order. For example, the object identifier is the merchant identifier of the merchant corresponding to the target order, which can be the merchant's shop name, the merchant's resource account, the merchant's business license number, or any identifier that can uniquely identify the target object.
[0056] For example, the object identifier is the type identifier of the merchant corresponding to the target order. The merchant type is categorized based on the time they joined the platform, which may include a first type and a second type. It can also be categorized based on strategic partnership relationships, which may include strategic partnership types and non-strategic partnership types. Optionally, a first-type merchant refers to a merchant whose platform joining time is greater than a reference time, also known as an established merchant. A second-type merchant refers to a merchant whose platform joining time is no greater than the reference time, also known as a new merchant. The reference time can be set based on experience or flexibly adjusted according to the application scenario; for example, the reference time could be one year.
[0057] For example, a target user initiates a target order with merchant A on a first electronic device. The order resource is 30 yuan, and the target location is community B. The distance from merchant A's location to community B is 2 km (kilometre). Merchant A's merchant type is type 1. In response to the target user's order placement, the first electronic device sends the order information of the target order to the server. The order information received by the server includes: order resource: 30 yuan, delivery distance: 2 km, and object identifier: type 1 identifier.
[0058] In an optional embodiment of this application, to improve the accuracy of the quantity of resources to be transferred determined based on order information, the form of the quantity of resources to be transferred is changed to a combination of technical service resources and fulfillment service resources. Optionally, technical service resources are determined based on order information and technical resource variables, and fulfillment service resources are determined based on order information and fulfillment resource variables. The fulfillment service resources include at least one of order service resources and distance service resources.
[0059] In one possible implementation, the order information of the target order includes the object identifier of the target order, and at least one of order resources and delivery distance, that is, the order information of the target order includes the object identifier and order resources of the target order, in which case the fulfillment service resources include order service resources; or, the order information of the target order includes the object identifier and delivery distance of the target order, in which case the fulfillment service resources include distance service resources; or, the order information of the target order includes the order resources, delivery distance and object identifier of the target order, in which case the fulfillment service resources include order service resources and distance service resources.
[0060] For example, the order information of the target order includes the order resources, delivery distance and object identifier of the target order.
[0061] Step 202: Determine technical resource variables and performance resource variables based on order information from multiple historical orders. The technical resource variables and performance resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the performance resource variables are used to constrain the scope of performance service resources.
[0062] In one possible implementation, the order information for each historical order in the multiple historical orders includes, in addition to order resources, delivery distance, and object identifier, the historical resources transferred for each historical order. Optionally, determining technical resource variables and fulfillment resource variables based on the order information of multiple historical orders includes: obtaining the order information of multiple historical orders; and obtaining the technical resource variables and fulfillment resource variables that satisfy their respective resource constraints based on the order information of multiple historical orders and the resource variable calculation model. The resource variable calculation model includes a mathematical programming model constructed based on the resource constraints of the technical resource variables and the resource constraints of the fulfillment resource variables. This mathematical programming model can solve for the technical resource variables and fulfillment resource variables that satisfy their respective resource constraints.
[0063] In one possible implementation, the server continuously receives order information for the target order and determines the historical resources corresponding to the target order. Through the historical orders of these historical resources, the server can obtain order information for multiple historical orders within a historical period, thus determining the quantity of historical resources transferred. By analyzing the quantity of historical resources transferred, the server can assess the fluctuation between the quantity of resources to be transferred determined by the resource quantity determination method provided in this embodiment and the quantity of historical resources transferred. This prevents excessive fluctuations between the resource quantity determined by the method and the quantity of historical resources transferred, avoiding disruption of the previously stable resource quantity.
[0064] For example, taking the merchant as the object of the quantity of resources to be transferred and the platform as the object of obtaining the quantity of resources to be transferred, in order to make the method for determining the quantity of resources provided in this application example more accurate and reasonable, and to ensure the stability of the platform and the merchant before and after switching the method for determining the quantity of resources provided in this application embodiment with the current method for determining the quantity of resources, the technical resource variables and performance resource variables used to determine the quantity of resources to be transferred need to satisfy their respective resource constraints.
[0065] In one possible implementation, the resource constraints mainly consider the following factors: average technical service fee rate per order, i.e., the proportion of technical service resources to be transferred per order to the total order resources; fluctuation range of the total number of resources to be transferred before and after the switch, i.e., the range of the proportion of the total number of resources to be transferred within the reference period before the switch to the total number of resources to be transferred within the reference period after the switch; fluctuation range of the average number of resources to be transferred per order before and after the switch for different order resource intervals, i.e., the range of the proportion of merchants whose revenue from the total number of resources to be transferred exceeds the first reference value, i.e., the range of merchants whose revenue from the total number of resources to be transferred after the switch exceeds the first reference value; and the range of merchants whose revenue from the total number of resources to be transferred exceeds the first reference value and whose revenue from the average number of resources to be transferred exceeds the second reference value. The reference period, the first reference value, and the second reference value can all be set based on experience or flexibly adjusted according to the application scenario. For example, the reference period could be one month, the first reference value 20%, and the second reference value 10%.
[0066] In one possible implementation, based on the above factors, resource constraints may include: upper and lower limits and data types of each variable in the resource variables, capping constraints on order service resources, capping constraints on distance service resources, minimum constraints on technical service resources, and constraints on the magnitude of changes in the quantity of resources to be transferred. This application does not limit the content of resource constraints; they can be flexibly adjusted according to the application scenario. For example, resource constraints on technical resource variables may include upper and lower limits and data types of each resource variable in the technical resource variables, and minimum constraints on technical service resources; resource constraints on fulfillment resource variables may include upper and lower limits and data types of each resource variable in the fulfillment resource variables, capping constraints on order service resources, and capping constraints on distance service resources.
[0067] The upper and lower limits of each variable in the resource variables can be set based on experience or flexibly adjusted according to the application scenario. This embodiment does not impose upper and lower limits on each variable; these limits only need to define the range of variation for each variable. Optionally, the data type of each variable in the resource variables refers to the unit of each variable. For example, for resource type variables, the data type is limited to yuan.
[0068] In one possible implementation, the fulfillment resource variables include resource tier variables and distance tier variables. The resource tier variables include a first resource interval, a first basic resource, an order step size, an order step size resource, and a first standard resource; the distance tier variables include a first distance interval, a second basic resource, a distance step size, a distance step size resource, and a second standard resource. The technical resource variables include the correspondence between object identifiers and resource conversion coefficients, and a third standard resource.
[0069] In one possible implementation, the technical resource variables and fulfillment resource variables for resource constraints are determined based on order information and resource variable calculation models from multiple historical orders. This includes: initializing the values of a first resource interval and an order step size; aggregating data from multiple historical orders based on the initialized first resource interval and order step size to obtain first aggregated historical order data; solving a mathematical programming model based on the first aggregated historical order data; and determining the technical resource variables and fulfillment resource variables that satisfy the resource constraints based on the solution results of the mathematical programming model.
[0070] This application describes a mathematical programming model for solving the problem of finding the optimal decision variables under certain constraints. The embodiments of this application do not limit the mathematical programming model used; for example, the mathematical programming model can be linear programming, nonlinear programming, integer programming, or multi-objective programming. In linear programming, both the objective function and constraints are linear expressions of the decision variables; in nonlinear programming, one of the objective function and / or constraints is a nonlinear expression of the decision variables. The solution method for nonlinear programming can be to find the optimal decision variables through a prescribed search method after selecting initial values for the decision variables.
[0071] For example, in the process of constructing a mathematical programming model based on resource constraints, the mathematical programming model used is a mixed positive linear programming model, the objective function is an unrelated 0-1 variable, the decision variables are technical resource variables and performance resource variables, and the constraints are resource constraints. Using an unrelated 0-1 variable as the objective function can reduce the time for the solver to iterate the upper and lower bounds. Optionally, this application does not limit the solver used to solve the mathematical programming model; for example, it may use a gurobi solver or a MOSEK solver.
[0072] In this embodiment, since the order service resource capping constraint, the distance service resource capping constraint, and the technical service resource minimum constraint are constraints at the order granularity, taking multiple historical orders as the historical order data of a city in the past month as an example, since the monthly order volume of the city is relatively large, it is difficult to create a solution model for the mathematical programming model at the order granularity. Therefore, this embodiment adopts an aggregation solution strategy.
[0073] The strategy for aggregation is as follows: based on the first resource interval, aggregate data from multiple historical orders in units of order steps to obtain aggregated historical order data. For example, if there are 1000 historical orders, the first resource interval is initialized to (20-30 yuan), and the order step is 5 yuan, then the aggregated historical order data can be represented as: first resource interval: 500 historical orders; first resource interval + 1 order step interval: 200 historical orders; first resource interval + 2 order step intervals: 300 historical orders. This reduces the amount of historical order data from thousands or tens of thousands to hundreds, improving computational efficiency.
[0074] For example, based on aggregated historical order data, this paper uses the capping constraint of order service resources and the minimum constraint of technical service resources in the resource constraints as examples to illustrate the expression of constraints in the constructed mathematical programming model.
[0075] Order service resource capping constraint: Taking the i-th segment (i is a positive integer greater than 0) of aggregated historical order data as an example, the total number of historical orders in this segment is N. i The capped value of order service resources is Q. Based on the order resource range corresponding to the i-th segment, a definite expression for the order service resources of the i-th segment without considering the capped value of order service resources is obtained, denoted as p. i To characterize whether the order service resource of the i-th segment triggers the order service resource cap value Q, a 0-1 variable u is introduced. i , when u i =0 indicates that the cap has not been triggered, u i A value of 1 indicates that the cap has been triggered. Let x be the order service resource corresponding to the final i-th segment. i The order service resource capping constraint is expressed as follows:
[0076] p i *N i -Q*N i -Min≥(-Q*N i -Min)*(1-u i )
[0077] p i *N i -Q*N i ≤Max*ui
[0078] x i ≥p i *N i -Max*u i
[0079] x i ≤Q*N i +Max*(1-u i )
[0080] x i ≥Q*N i -Max*(1-u i )
[0081] x i ≤p i *N i +Max*u i
[0082] Optionally, Min and Max above represent the smaller and larger values, respectively. For example, the value of Min can be 0.0001, and the value of Max can be 10000. The order service resource x obtained based on the above formula... i This refers to the order service resource that satisfies the capping constraint on order service resources. Therefore, at this time, the order service resource x is obtained. i The decision variables are the resource ladder variables that satisfy the resource constraints. Since each interval in the aggregated historical order data corresponds to one resource service resource, the aggregation solution strategy can accurately consider the capping constraints of order service resources.
[0083] Technical service resource guarantee constraint: Taking the i-th segment (i is a positive integer greater than 0) of aggregated historical order data as an example, the total number of historical orders in this segment is N. i Let L be the minimum technical service resource guarantee value. Based on the quantity of resources to be transferred in the i-th segment and the resource conversion coefficient variable, obtain the technical service resource expression for the total historical orders in the i-th segment without considering the minimum technical service resource guarantee value, denoted as t. i Introduce 0-1 variables v i When v i =1 indicates that the guaranteed minimum has not been triggered, v i =0 indicates that the minimum guarantee has been triggered. Let y be the technical service resource corresponding to the i-th segment. i The minimum guarantee constraint for technical service resources is expressed as follows:
[0084] t i -L*N i -Min≥(-L*N i -Min)*(1-v i )
[0085] t i -L*N i ≤Max*v i
[0086] y i ≥L*N i -Max*v i
[0087] y i ≤t i +Max*(1-v i )
[0088] y i ≥t i -Max*(1-v i )
[0089] y i ≤L*N i +Max*v i
[0090] Optionally, Min and Max represent the smaller and larger values, respectively. For example, the value of Min can be 0.0001, and the value of Max can be 10000. The technical service resource y obtained based on the above formula... i This refers to the technical service resource that meets the minimum guarantee constraint. Therefore, acquiring this technical service resource y at this time... i The decision variables are the distance ladder variables that satisfy the resource constraints.
[0091] In one possible implementation, determining the technical resource variables and performance resource variables that satisfy the resource constraints based on the solution result of the mathematical programming model includes: in response to the solution result of the mathematical programming model being feasible, determining the technical resource variables and performance resource variables for the resource constraints based on the feasible solution; in response to the solution result of the mathematical programming model being infeasible, updating the values of the first resource interval and the order step size; aggregating multiple historical orders based on the updated first resource interval and order step size to obtain second aggregated historical order data; solving the mathematical programming model based on the second aggregated historical order data and the resource constraints; and determining the technical resource variables and performance resource variables based on the solution result of the mathematical programming model.
[0092] In this embodiment, the method of updating the first resource range and the order step size is not limited. For example, the method of updating the first resource range and the order step size can be an enumeration method or an adaptive algorithm.
[0093] Since the aggregate mathematical programming model mainly considers constraints at the order level, the technical resource variables and fulfillment resource variables determined based on the above aggregate mathematical programming model may not meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred at the merchant level. In order to meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred, further judgment is needed on the technical resource variables and fulfillment resource variables determined based on the above aggregate mathematical programming model.
[0094] In one possible implementation, the resource variable calculation model further includes a search evaluation model. Specifically, in response to the mathematical programming model's solution being feasible, after determining the technical resource variables and performance resource variables that satisfy the resource constraints based on the feasible solution, the model further includes: searching for order information from multiple historical orders that does not meet the constraints on the magnitude of resource quantity changes requiring transfer; obtaining the resource conversion coefficient corresponding to the object identifier that meets the constraints on the magnitude of resource quantity changes requiring transfer based on the order information that does not meet the constraints on the magnitude of resource quantity changes requiring transfer, along with the technical resource variables and performance resource variables; and updating the technical resource variables based on the resource conversion coefficient corresponding to the object identifier that meets the constraints on the magnitude of resource quantity changes requiring transfer.
[0095] The constraint on the change in the quantity of resources to be transferred can be a constraint on the percentage increase in the quantity of resources to be transferred for any object identifier exceeding a set value before and after the change in the method for determining the quantity of resources. For example, the constraint on the change in the quantity of resources to be transferred is to limit the percentage increase in the quantity of resources to be transferred for any object identifier exceeding a set value to no more than 50%. The set value can be adjusted flexibly based on experience or application scenarios; for example, the set value is 10 yuan. Therefore, after switching to the method for determining the quantity of resources provided in this application embodiment, the quantity of resources to be transferred by the merchant will not change significantly, avoiding damage to the merchant's interests and ensuring the stability of the platform operation.
[0096] For example, Figure 3 The flowchart of a search evaluation method provided in the embodiments of this application includes, but is not limited to, the following steps 2021-2023.
[0097] Step 2021: Search for order information among multiple historical orders that do not meet the constraint of the change range of the quantity of resources that need to be transferred.
[0098] In one possible implementation, based on the technical resource variables and performance resource variables that satisfy the resource constraints obtained from the aggregated solution, the system searches for object identifiers in multiple historical orders that do not meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred. If each object identifier meets the constraints on the magnitude of changes in the quantity of resources that need to be transferred, the search is terminated, and the technical resource variables and performance resource variables that satisfy the resource constraints are output. If any object identifier does not meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred, step 2022 is executed.
[0099] Step 2022: Based on the order information, technical resource variables, and fulfillment resource variables that do not meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred, obtain the resource conversion coefficient corresponding to the object identifier that meets the constraints on the magnitude of changes in the quantity of resources that need to be transferred.
[0100] In one possible implementation, the fulfillment service resources are calculated based on the technical resource variables and fulfillment resource variables that meet the resource constraints. Based on the calculated fulfillment service resources and the historical resources transferred, the resource transfer coefficients corresponding to each object identifier are deduced. Based on the deduced resource transfer coefficients corresponding to the object identifiers, the object identifiers in multiple historical orders that do not meet the constraints on the change range of the resource quantity to be transferred are searched. If each object identifier meets the constraints on the change range of the resource quantity to be transferred, the search is terminated, and the resource variables that meet the resource constraints are output. If any object identifier does not meet the constraints on the change range of the resource quantity to be transferred, step 2023 is executed.
[0101] Step 2023: Update the technical resource variables based on the resource conversion coefficients corresponding to the object identifiers that meet the constraints on the magnitude of changes in the quantity of resources that need to be transferred.
[0102] In one possible implementation, for historical orders corresponding to object identifiers that do not meet the constraints on the magnitude of resource quantity changes that need to be transferred, the fulfillment service resources are calculated based on the technical resource variables and fulfillment resource variables that meet the resource constraints. Based on the calculated fulfillment service resources and the resource quantities of the historical resources transferred corresponding to the aforementioned historical orders, the resource transfer coefficients corresponding to each object identifier that does not meet the constraints on the magnitude of resource quantity changes that need to be transferred are calculated backwards. Based on the resource transfer coefficients corresponding to the object identifiers that do not meet the constraints on the magnitude of resource quantity changes that need to be transferred, the search is conducted among multiple historical orders for object identifiers that do not meet the constraints on the magnitude of resource quantity changes that need to be transferred. If each object identifier meets the constraints on the magnitude of resource quantity changes that need to be transferred, the search is terminated, and the technical resource variables and fulfillment resource variables that meet the resource constraints are output. If any object identifier does not meet the constraints on the magnitude of resource quantity changes that need to be transferred, the result that no technical resource variables and fulfillment resource variables meet the resource constraints is output.
[0103] During the process of reverse-engineering the resource transfer coefficient corresponding to the object identifier in steps 2022 and 2023 above, if the resource transfer coefficient exceeds the specified upper and lower limits, the corresponding upper and lower limits will be adjusted. If the total number of resources to be transferred for multiple historical orders determined after the switch is less than the total number of historical resources to be transferred before the switch, the corresponding resource transfer coefficient will be increased or decreased based on the difference between the total number of resources to be transferred before and after the switch.
[0104] For example, see Figure 4 This application provides a resource variable calculation model to obtain resource variables that meet resource constraints. These resource variables include technical resource variables and performance resource variables, thereby providing a method for determining the quantity of resources. Figure 4 As shown, based on the order information of multiple historical orders, the processing flow of this resource variable calculation model includes: initializing resource ladder variables and distance ladder variables; aggregating data according to the resource ladder variables to obtain aggregated historical order data; inputting the aggregated historical order data into a mathematical programming model constructed according to resource constraints; solving the mathematical programming model to obtain resource variables; responding to the mathematical programming model returning a feasible solution, searching and evaluating the returned resource variables according to the resource constraints, and outputting resource variables that satisfy the resource constraints based on the search and evaluation results; responding to the mathematical programming model not returning a feasible solution, updating the resource ladder and distance ladder, determining whether the termination condition is met; responding to the termination condition not being met, returning to the aggregation solution process based on the updated resource ladder and distance ladder; responding to the termination condition being met, determining that there are no resource variables that satisfy the resource constraints.
[0105] The termination condition can be that the calculation time of the resource variable calculation model exceeds the reference time. The reference time can be flexibly adjusted according to the application scenario; for example, the reference time can be 1 hour. When it is determined that there are no resource variables that meet the resource constraints, the resource constraints can be appropriately relaxed, and then the resource variables that meet the relaxed resource constraints can be obtained again according to the above mathematical programming model.
[0106] based on Figure 4 The resource variables obtained by the resource variable calculation model shown meet the resource constraints, making the determined resource quantity more accurate. Moreover, the model takes into account both computational complexity and efficiency, laying the technical foundation for providing a unified solution for determining the quantity of resources that need to be transferred.
[0107] Step 203: Based on the order information, technical resource variables, and fulfillment resource variables of the target order, determine the technical service resources and fulfillment service resources corresponding to the target order, and determine the quantity of resources that need to be transferred for the target order based on the technical service resources and fulfillment service resources.
[0108] In this embodiment, to address the unfairness and unreasonableness of the determined quantity of resources to be transferred in related technologies, the determination method for the quantity of resources to be transferred is changed to a combination of technical service resources and fulfillment service resources. That is, the quantity of resources to be transferred corresponding to the target order is divided into two parts: fulfillment service resources and technical service resources. The fulfillment service resources are related to the order resources and delivery distance, including tiered determination criteria for order resources and delivery distances. In other words, the method for determining the fulfillment service resources varies depending on the order resources and delivery distance. The technical service resources are positively correlated with the order resources; that is, the larger the value of the order resources, the larger the technical service resources.
[0109] This application does not limit the criteria for determining the tiered order resources and the tiered delivery distance. As long as the criteria for determining the tiered order resources are related to the numerical value of the order resources and the criteria for determining the tiered delivery distance are related to the distance of the delivery distance, it is acceptable. For example, the criteria for determining the tiered order resources are based on the order resources and fulfillment resource variables of the target order to determine the order service resources corresponding to the target order; the criteria for determining the tiered delivery distance are based on the delivery distance and fulfillment resource variables of the target order to determine the distance service resources corresponding to the target order.
[0110] In one possible implementation, the technical service resources and fulfillment service resources corresponding to the target order are determined based on the order information, technical resource variables, and fulfillment resource variables of the target order. The quantity of resources to be transferred corresponding to the target order is then determined based on the technical service resources and fulfillment service resources. This includes: determining the order service resources corresponding to the target order based on the order resources and resource tier variables of the target order; determining the distance service resources corresponding to the target order based on the delivery distance and distance tier variables of the target order; determining the technical service resources corresponding to the target order based on the object identifier, order resources, and technical resource variables of the target order; and determining the quantity of resources to be transferred corresponding to the target order based on the order service resources, distance service resources, and technical service resources.
[0111] Among these, the technical resource variables and the fulfillment resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables constrain the scope of technical service resources, while the resource constraints of the fulfillment resource variables constrain the scope of fulfillment service resources. In other words, the resource constraints constrain the range of the determined quantity of resources to be transferred. That is, the determined quantity of resources to be transferred must reflect both the cost of order resources and delivery distance, and ensure the stability of the fluctuation range of the quantity of resources to be transferred. It should not result in the determined quantity of resources to be transferred being too high for target orders with higher order resources, nor should it result in the determined quantity of resources to be transferred being too low for target orders with lower order resources.
[0112] In one possible implementation, the order service resources corresponding to the target order are determined based on the order resources and resource ladder variables of the target order, including: in response to the order resources of the target order belonging to a first resource interval, the first basic resource is used as the order service resource; in response to the order resources of the target order not belonging to the first resource interval, the additional order resources of the target order are obtained; the order service resources corresponding to the target order are determined based on the first basic resource, the additional order resources, the order step size, and the order step size resource; in response to the order service resources being greater than the first standard resource, the first standard resource is used as the order service resource.
[0113] In one possible implementation, the order service resource corresponding to the target order is determined based on the first basic resource, additional order resources, order step size, and order step size resource as follows: Obtain the first quantity of order steps included in the additional order resources; obtain the product of the first quantity and the order step size resource; obtain the sum of the product and the first basic resource, which is the order service resource corresponding to the target order. Here, the first quantity is a positive value. If the first quantity is a small value, the smallest positive integer in the set of positive integers greater than the first quantity is taken as the first quantity.
[0114] This application does not limit the content of resource ladder variables, distance ladder variables, and technical resource variables. For example, resource ladder variables may also include a second resource range, a second order step size, and a second order step size resource.
[0115] In one possible implementation, the order service resource corresponding to the target order is determined based on the order resources and resource hierarchy variables of the target order, including: in response to the target order's order resources belonging to a first resource interval, the first basic resource is used as the order service resource; in response to the target order's order resources belonging to a second resource interval, the first additional order resource of the target order is obtained, and the order service resource corresponding to the target order is determined based on the first basic resource, the first additional order resource, the order step size, and the order step size resource; in response to the target order's order resources not belonging to the first resource interval or the second resource interval, the second additional order resource of the target order is obtained, and the order service resource corresponding to the target order is determined based on the first basic resource, the second resource interval, the order step size, the order step size resource, the second additional order resource, the second order step size, and the second order step size resource; in response to the order service resource being greater than the first standard resource, the first standard resource is used as the order service resource.
[0116] In one possible implementation, the method for determining the order service resource corresponding to the target order based on the first basic resource, the second resource interval, the order step size, the order step size resource, the second order additional resource, the second order step size, and the second order step size resource is as follows: Based on the first basic resource, the order step size, the order step size resource, and the second resource interval, obtain the second basic resource corresponding to the second resource interval; obtain the second quantity of the second order step size included in the second order additional resource; obtain the product of the second quantity and the second order step size resource; obtain the sum of this product and the second basic resource, and this sum is the order service resource corresponding to the target order. Wherein, the obtained second quantity is a positive value. If the obtained second quantity is a small value, the smallest positive integer in the set of positive integer values greater than the second quantity is taken as the second quantity.
[0117] In one possible implementation, the distance service resource corresponding to the target order is determined based on the delivery distance and distance step variable of the target order, including: in response to the delivery distance of the target order belonging to a first distance interval, using a second basic resource as the distance service resource; in response to the delivery distance of the target order not belonging to the first distance interval, obtaining additional distance resources for the target order; determining the distance service resource corresponding to the target order based on the second basic resource, additional distance resources, distance step size, and distance step size resource; and in response to the distance service resource being greater than the second standard resource, using the second standard resource as the distance service resource.
[0118] In this embodiment of the application, the method of determining the distance service resource corresponding to the target order based on the second basic resource, additional distance resource, distance step size and distance step size resource can be the same as the method of determining the order service resource corresponding to the target order based on the first basic resource, additional order resource, order step size and order step size resource, and will not be repeated here.
[0119] In one possible implementation, the technical service resources corresponding to the target order are determined based on the object identifier of the target order, the order resources of the target order, and the technical resource variables. This includes: determining the resource conversion coefficient corresponding to the target order based on the object identifier and technical resource variables of the target order; determining the technical service resources corresponding to the target order based on the order resources of the target order and the resource conversion coefficient corresponding to the target order; and, in response to the fact that the technical service resources of the target order are less than the third standard resources, using the third standard resources as the technical service resources.
[0120] In one possible implementation, the technical service resources corresponding to the target order are determined based on the order resources and resource conversion coefficient of the target order by obtaining the product of the order resources and resource conversion coefficient of the target order, which is the technical service resource corresponding to the target order.
[0121] For example, a scheme for determining the amount of resources to be transferred corresponding to a target order based on the order information and resource variables of the target order includes: a tiered determination standard for order resources, a tiered determination standard for delivery distance, and a resource conversion coefficient. For instance, the tiered standard for order resources can be: for orders with resources within DE yuan, an additional M yuan is charged for each order requiring transfer; for orders with resources within EF yuan, an additional N yuan is charged for every G yuan above G yuan; for orders with resources above F yuan, an additional P yuan is charged for every H yuan above F yuan, capped at Q yuan (if less than G yuan, it is calculated as G yuan; if less than H yuan, it is calculated as H yuan); the tiered standard for delivery distance can be: X yuan for distances within A kilometers; and Y yuan for every C meters within AB kilometers (if less than C meters, it is calculated as C meters). Where A, B, C, D, E, F, G, H, M, P, Q, X, and Y are all real numbers greater than 0. G and H can be the same or different, and N and P can be the same or different; this embodiment does not limit these aspects.
[0122] For example, Table 1 shows a scheme for determining the amount of resources to be transferred corresponding to a target order based on the order information and resource variables of the target order. As shown in Table 1, the amount of resources corresponding to the target order includes fulfillment service resources and technical service resources. The tiered determination standard for order resources in fulfillment service resources is as follows: (20-30 yuan) : 1.0 yuan; (30-50 yuan) : 0.8 yuan for every 5 yuan more; (above 50 yuan) : 0.9 yuan for every 5 yuan more; less than 5 yuan is calculated as 5 yuan; the order resource cap is 9 yuan. For example, if the order resources of the target order are 25 yuan, within the (20-30 yuan) range, the order service resources corresponding to the target order are 1.0 yuan; if the order resources of the target order are 35 yuan, within the (30-50 yuan) range, the order service resources corresponding to the target order are 1.0 yuan; Within the range of -50 yuan, the order service resource corresponding to the target order is 1.0 + 0.8 = 1.8 yuan; if the order resource of the target order is 59 yuan, within the range of (above 50 yuan), the order service resource corresponding to the target order is 1.0 + 4 * 0.8 + 2 * 0.9 = 6.0 yuan; if the order resource of the target order is 100 yuan, the order service resource corresponding to the target order is 1.0 + 4 * 0.8 + 10 * 0.9 = 13.2 yuan. Since the order service resource corresponding to the target order is greater than the order resource cap, the final order service resource corresponding to the target order is 9 yuan.
[0123] The tiered pricing standard for delivery distance in fulfillment service resources is as follows: (0-2km): 2.0 yuan; (above 2km): an additional 0.8 yuan for every additional 0.5km; distances less than 0.5km are calculated as 0.5km. For example, if the delivery distance of the target order is 1.5km, within the (0-2km) range, the corresponding distance service resource is 2.0 yuan; if the delivery distance of the target order is 3km, within the (above 2km) range, the corresponding distance service resource is 2.0 + 2 * 0.8 = 3.6 yuan. The resource conversion coefficient for the second type of merchant is 5.4%, and the resource conversion coefficient for the first type of merchant is 8%. The minimum technical service resource is 1 yuan.
[0124] Table 1
[0125]
[0126] Optionally, based on order service resources, distance service resources, and technical service resources, the quantity of resources corresponding to the target order is determined, including: obtaining a first weight corresponding to the order service resources, obtaining a second weight corresponding to the distance service resources, and obtaining a third weight corresponding to the technical service resources; and determining the quantity of resources corresponding to the target order based on the first weight, second weight, third weight, order service resources, distance service resources, and technical service resources. The first weight, second weight, and third weight can be set based on experience or flexibly adjusted according to the application scenario; for example, the first weight, second weight, and third weight can all be 1.
[0127] In one possible implementation, the quantity of resources corresponding to a target order is determined based on the first weight, second weight, third weight, order service resources, distance service resources, and technical service resources as follows: First weight * order service resources + Second weight * distance service resources + Third weight * technical service resources = quantity of resources.
[0128] For example, according to the scheme for determining the amount of resources to be transferred corresponding to the target order shown in Table 1, if the order information of the target order is as follows: order resource of the target order: 30 yuan, delivery distance of the target order: 3km, object identifier of the target order: first type of merchant, then the order service resource corresponding to the target order is 1.0 yuan, the distance service resource corresponding to the target order is 2.0 + 2 * 0.8 = 3.6 yuan, and the technical service resource corresponding to the target order is 30 * 0.08 = 2.4 yuan. Optionally, the amount of resources to be transferred corresponding to the target order is 1.0 + 2.4 + 3.6 = 7 yuan.
[0129] Steps 202 and 203 above are illustrated using the example of the target order's order information including order resources, delivery distance, and object identifier. It is understood that when the target order's order information includes order resources and delivery distance, the implementation method for determining the resource quantity based on order resources and delivery distance in steps 202 and 203 can be referred to; similarly, when the target order's order information includes order resources and object identifier, the implementation method for determining the resource quantity based on order resources and object identifier in steps 202 and 203 can be referred to, and will not be repeated here.
[0130] The resource quantity determination method provided in this application embodiment determines that the required resource quantity includes two parts: technical service resources and fulfillment service resources. Both the technical resource variable used to determine the technical service resources and the fulfillment resource variable used to determine the fulfillment service resources satisfy their respective resource constraints, limiting the range of the required resource quantity for different target orders and preventing it from being too high or too low. This solves the problem in related technologies where the quantity of resources to be transferred is determined by the size of the order's resource quantity. For merchants with large order resource quantities, the determined required resource quantity is too high, making it unfair to them; that is, the determined resource quantity in related technologies is unreasonable.
[0131] Furthermore, although the form of the determined quantity of resources to be transferred has changed to a combination of technical service resources and fulfillment service resources, the new determination method may lead to significant changes in the quantity of resources that merchants need to transfer, thereby harming their interests. Therefore, a calculation mechanism is needed to ensure that the quantity of resources does not change significantly under the new and old determination methods. However, due to the large number of parameters involved and the large number of orders affected, no solution that meets the requirements has yet been found in related technologies.
[0132] In response to this, the method provided in this application, based on solving the problems in related technologies, adopts an aggregation solution method in the process of solving the technical resource variables and fulfillment resource variables that satisfy their respective constraints through a mathematical programming model. This solves the problem of large-scale solution caused by the large number of historical orders during the calculation process, thus improving efficiency. Since the aggregation solution method adopted is based on the order dimension as the aggregation granularity, it does not consider the constraints at the merchant dimension, i.e., the change in the number of resources that merchants need to transfer before and after the switch between the methods for determining the number of old and new resources. Therefore, a search evaluation model is further introduced. The solution obtained by the search evaluation model satisfies both the constraints at the order dimension and the constraints at the merchant dimension, ensuring that the number of resources that need to be transferred does not change significantly under the methods for determining the number of old and new resources, thus not affecting the stability of the platform operation and taking into account complexity.
[0133] In summary, the resource quantity determination method provided in this application embodiment improves the matching degree between the determined resource quantity and the target order because the order information includes at least one of the object identifier and the order resource and delivery distance. Furthermore, since the technical resource variables and fulfillment resource variables used to determine the transfer resources satisfy their respective resource constraints, the determined resource quantity will not be too high or too low, thus resulting in higher stability of the determined resource quantity.
[0134] See Figure 5 This application provides a device for determining the quantity of resources, the device comprising:
[0135] The acquisition module 501 is used to acquire the order information of the target order, which includes the object identifier and at least one of the order resources and delivery distance.
[0136] The first determining module 502 is used to determine technical resource variables and performance resource variables based on order information of multiple historical orders. The technical resource variables and performance resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the performance resource variables are used to constrain the scope of performance service resources.
[0137] The second determining module 503 is used to determine the technical service resources and fulfillment service resources corresponding to the target order based on the order information, technical resource variables and fulfillment resource variables of the target order, and to determine the quantity of resources that need to be transferred corresponding to the target order based on the technical service resources and fulfillment service resources.
[0138] In one possible implementation, the order information of the target order includes order resources, delivery distance and object identifier, the fulfillment resource variables include resource ladder variables and distance ladder variables, and the fulfillment service resources include order service resources and distance service resources;
[0139] The second determining module 503 is used to determine the order service resources corresponding to the target order based on the order resources and resource tier variables of the target order; to determine the distance service resources corresponding to the target order based on the delivery distance and distance tier variables of the target order; to determine the technical service resources corresponding to the target order based on the object identifier, order resources and technical resource variables of the target order; and to determine the quantity of resources that need to be transferred corresponding to the target order based on the order service resources, distance service resources and technical service resources.
[0140] In one possible implementation, the resource ladder variables include a first resource range, a first basic resource, an order step size, an order step size resource, and a first standard resource;
[0141] The second determining module 503 is used to: respond to the fact that the order resources of the target order belong to the first resource range, use the first basic resource as the order service resource; respond to the fact that the order resources of the target order do not belong to the first resource range, obtain the additional order resources of the target order; determine the order service resources corresponding to the target order based on the first basic resource, the additional order resources, the order step size and the order step size resource; and respond to the fact that the order service resources are greater than the first standard resource, use the first standard resource as the order service resource.
[0142] In one possible implementation, the distance ladder variables include a first distance interval, a second base resource, a distance step size, a distance step resource, and a second standard resource;
[0143] The second determining module 503 is used to: respond to the fact that the delivery distance of the target order belongs to the first distance interval, use the second basic resource as the distance service resource; respond to the fact that the delivery distance of the target order does not belong to the first distance interval, obtain the additional distance resource of the target order; determine the distance service resource corresponding to the target order based on the second basic resource, the additional distance resource, the distance step size and the distance step size resource; and respond to the fact that the distance service resource is greater than the second standard resource, use the second standard resource as the distance service resource.
[0144] In one possible implementation, the technical resource variables include the correspondence between object identifiers and resource conversion coefficients, as well as third-standard resources;
[0145] The second determining module 503 is used to determine the resource conversion coefficient corresponding to the target order based on the object identifier and technical resource variables of the target order; determine the technical service resource corresponding to the target order based on the order resource of the target order and the resource conversion coefficient corresponding to the target order; and, in response to the technical service resource of the target order being less than the third standard resource, use the third standard resource as the technical service resource.
[0146] In one possible implementation, the first determining module 502 is used to obtain order information of multiple historical orders, the order information of each historical order including order resources, delivery distance, object identifier, and historical resources transferred; and to determine technical resource variables and fulfillment resource variables based on the order information of multiple historical orders and a resource variable calculation model, the resource variable calculation model including a mathematical programming model constructed based on the resource constraints of the technical resource variables and the resource constraints of the fulfillment resource variables.
[0147] In one possible implementation, the resource constraints of the technical resource variables include the upper and lower limits and data types of each resource variable in the technical resource variables, and the minimum constraint of technical service resources; the resource constraints of the performance resource variables include the upper and lower limits and data types of each resource variable in the performance resource variables, the maximum constraint of order service resources, and the maximum constraint of distance service resources.
[0148] The first determining module 502 is used to initialize the values of the first resource interval and the order step size; aggregate multiple historical orders according to the initialized first resource interval and order step size to obtain the first aggregated historical order data; solve the mathematical programming model based on the first aggregated historical order data, and determine the technical resource variables and the fulfillment resource variables according to the solution results of the mathematical programming model.
[0149] In one possible implementation, the first determining module 502 is configured to: determine resource variables based on a feasible solution in response to the solution result of the mathematical programming model being feasible; determine technical resource variables and performance resource variables based on a feasible solution in response to the solution result of the mathematical programming model being feasible; update the values of the first resource interval and order step size in response to the solution result of the mathematical programming model being infeasible; aggregate multiple historical orders based on the updated first resource interval and order step size to obtain second aggregated historical order data; solve the mathematical programming model based on the second aggregated historical order data and resource constraints; and determine technical resource variables and performance resource variables based on the solution result of the mathematical programming model.
[0150] In one possible implementation, the resource constraints also include constraints on the magnitude of change in the quantity of resources to be transferred, and the technical resource variables include the correspondence between object identifiers and resource conversion coefficients; the first determining module 502 is further configured to search for order information in multiple historical orders that does not meet the constraints on the magnitude of change in the quantity of resources to be transferred; based on the order information that does not meet the constraints on the magnitude of change in the quantity of resources to be transferred, and the technical resource variables and fulfillment resource variables, obtain the resource conversion coefficients corresponding to the object identifiers that meet the constraints on the magnitude of change in the quantity of resources to be transferred; and update the technical resource variables based on the resource conversion coefficients corresponding to the object identifiers that meet the constraints on the magnitude of change in the quantity of resources to be transferred.
[0151] Because the order information includes an object identifier and at least one of the order resources and delivery distance, the device ensures that the determined resource quantity reflects the object identifier of the target order and at least one of the order resources and delivery distance, thus improving the matching degree between the determined resource quantity to be transferred and the target order and increasing accuracy. Furthermore, since the technical resource variables and fulfillment resource variables used to determine the transferred resources meet their respective resource constraints, the determined resource quantity will not be too high or too low, resulting in higher stability of the determined resource quantity.
[0152] It should be understood that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0153] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 1100 can be a smartphone, tablet computer, laptop computer, or desktop computer. The computer device 1100 may also be referred to as user equipment, portable electronic device, laptop electronic device, desktop electronic device, or other names.
[0154] Typically, computer device 1100 includes one or more processors 1101 and one or more memories 1102.
[0155] Processor 1101 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1101 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1101 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0156] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1102 are used to store at least one program code, which is executed by the processor 1101 to implement the method for determining the amount of resources provided in the method embodiments of this application.
[0157] In some embodiments, the computer device 1100 may also optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, memory 1102, and peripheral device interface 1103 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1104, a display screen 1105, a camera 1106, an audio circuit 1107, a positioning component 1108, and a power supply 1109.
[0158] Peripheral device interface 1103 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1101 and memory 1102. In some embodiments, processor 1101, memory 1102 and peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1101, memory 1102 and peripheral device interface 1103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0159] The radio frequency (RF) circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1104 can communicate with other electronic devices through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1104 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0160] Display screen 1105 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1105 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1101 for processing. In this case, display screen 1105 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1105, which serves as the front panel of the computer device 1100; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of the computer device 1100 or in a folded design; in some embodiments, display screen 1105 may be a flexible display screen, disposed on a curved or folded surface of the computer device 1100. Furthermore, display screen 1105 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0161] The camera assembly 1106 is used to acquire images or videos. Optionally, the camera assembly 1106 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device, and the rear-facing camera is located on the back of the electronic device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0162] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1101 for processing, or input to the radio frequency circuit 1104 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the computer device 1100. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1107 may also include a headphone jack.
[0163] The positioning component 1108 is used to locate the current geographical location of the computer device 1100 in order to enable navigation or LBS (Location Based Service). The positioning component 1108 can be a positioning component based on the US GPS (Global Positioning System), China's BeiDou system, Russia's Granas system, or the European Union's Galileo system.
[0164] Power supply 1109 is used to supply power to the various components in computer device 1100. Power supply 1109 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1109 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0165] In some embodiments, the computer device 1100 further includes one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: an accelerometer 1111, a gyroscope 1112, a pressure sensor 1113, a fingerprint sensor 1114, an optical sensor 1115, and a proximity sensor 1116.
[0166] Accelerometer 1111 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1100. For example, accelerometer 1111 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1101 can control display screen 1105 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1111. Accelerometer 1111 can also be used for games or for acquiring user motion data.
[0167] The gyroscope sensor 1112 can detect the orientation and rotation angle of the computer device 1100. The gyroscope sensor 1112 can work in conjunction with the accelerometer sensor 1111 to collect 3D motion data from the user on the computer device 1100. Based on the data collected by the gyroscope sensor 1112, the processor 1101 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0168] Pressure sensor 1113 can be disposed on the side bezel of computer device 1100 and / or on the lower layer of display screen 1105. When pressure sensor 1113 is disposed on the side bezel of computer device 1100, it can detect the user's grip signal on computer device 1100, and processor 1101 can perform left / right hand recognition or quick operation based on the grip signal collected by pressure sensor 1113. When pressure sensor 1113 is disposed on the lower layer of display screen 1105, processor 1101 can control operable controls on the UI interface based on the user's pressure operation on display screen 1105. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0169] The fingerprint sensor 1114 is used to collect a user's fingerprint. The processor 1101 identifies the user based on the fingerprint collected by the fingerprint sensor 1114, or vice versa. When the user's identity is identified as trusted, the processor 1101 authorizes the user to perform relevant sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 1114 can be located on the front, back, or side of the computer device 1100. When the computer device 1100 has physical buttons or a manufacturer's logo, the fingerprint sensor 1114 can be integrated with the physical buttons or the manufacturer's logo.
[0170] An optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 can control the display brightness of the display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the display screen 1105 is decreased. In another embodiment, the processor 1101 can also dynamically adjust the shooting parameters of the camera assembly 1106 based on the ambient light intensity collected by the optical sensor 1115.
[0171] The proximity sensor 1116, also known as a distance sensor, is typically located on the front panel of the computer device 1100. The proximity sensor 1116 is used to detect the distance between the user and the front of the computer device 1100. In one embodiment, when the proximity sensor 1116 detects that the distance between the user and the front of the computer device 1100 is gradually decreasing, the processor 1101 controls the display screen 1105 to switch from a screen-on state to a screen-off state; when the proximity sensor 1116 detects that the distance between the user and the front of the computer device 1100 is gradually increasing, the processor 1101 controls the display screen 1105 to switch from a screen-off state to a screen-on state.
[0172] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the computer device 1100 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0173] In an exemplary embodiment, a computer device is also provided, comprising a processor and a memory storing at least one line of program code. This at least one line of program code is loaded and executed by one or more processors to implement any of the methods for determining the amount of resources described above.
[0174] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one piece of program code that is loaded and executed by a processor of a computer device to implement any of the above-described methods for determining the number of resources.
[0175] Optionally, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0176] In an exemplary embodiment, a computer program product or computer program is also provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform any of the above-described methods for determining the amount of resources.
[0177] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0178] The above are merely optional embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining the quantity of resources, characterized in that, The method includes: Obtain the order information of the target order, wherein the order information of the target order includes an object identifier and at least one of order resources and delivery distance; Based on order information from multiple historical orders, technical resource variables and fulfillment resource variables are determined. The technical resource variables and the fulfillment resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the fulfillment resource variables are used to constrain the scope of fulfillment service resources. The resource constraints of the technical resource variables include the upper and lower limits and data types of each resource variable in the technical resource variables, and a minimum technical service resource constraint. The resource constraints of the fulfillment resource variables include the upper and lower limits and data types of each resource variable in the fulfillment resource variables, an order service resource cap constraint, and a distance service resource cap constraint. The determination of technical resource variables and fulfillment resource variables based on order information from multiple historical orders includes: Obtain the order information of the multiple historical orders, whereby the order information of each historical order includes order resources, delivery distance, object identifier, and historical resources transferred. The technical resource variables and the performance resource variables are determined based on the order information and resource variable calculation model of the multiple historical orders. The resource variable calculation model includes a mathematical programming model constructed based on the resource constraints of the technical resource variables and the resource constraints of the performance resource variables. The model for calculating technical resource variables and fulfillment resource variables based on order information and resource variables from the multiple historical orders determines the following: Initialize the values of the first resource range and the order step size; Based on the initialized first resource range and order step size, the data of the multiple historical orders is aggregated to obtain the first aggregated historical order data; The mathematical programming model is solved based on the first aggregated historical order data, and the technical resource variables and the performance resource variables are determined based on the solution results of the mathematical programming model. Based on the order information of the target order, the technical resource variables, and the fulfillment resource variables, determine the technical service resources and fulfillment service resources corresponding to the target order, and determine the quantity of resources that need to be transferred corresponding to the target order based on the technical service resources and the fulfillment service resources.
2. The method according to claim 1, characterized in that, The order information of the target order includes the order resources, the delivery distance and the object identifier; the fulfillment resource variables include resource tier variables and distance tier variables; and the fulfillment service resources include order service resources and distance service resources. The process of determining the technical service resources and fulfillment service resources corresponding to the target order based on the order information of the target order, the technical resource variables, and the fulfillment resource variables, and determining the quantity of resources to be transferred corresponding to the target order based on the technical service resources and fulfillment service resources, includes: Based on the order resources of the target order and the resource ladder variables, determine the order service resources corresponding to the target order; Based on the delivery distance of the target order and the distance step variable, determine the distance service resources corresponding to the target order; Based on the object identifier of the target order, the order resources of the target order, and the technical resource variables, determine the technical service resources corresponding to the target order; Based on the order service resources, the distance service resources, and the technical service resources, determine the amount of resources that need to be transferred corresponding to the target order.
3. The method according to claim 2, characterized in that, The resource ladder variables include the first resource interval, the first basic resource, the order step size, the order step size resource, and the first standard resource; The step of determining the order service resources corresponding to the target order based on the order resources of the target order and the resource ladder variable includes: In response to the target order's order resources belonging to the first resource range, the first basic resource is used as the order service resource; In response to the fact that the order resources of the target order do not belong to the first resource range, the additional order resources of the target order are obtained; based on the first basic resources, the additional order resources, the order step size, and the order step size resources, the order service resources corresponding to the target order are determined; in response to the fact that the order service resources are greater than the first standard resources, the first standard resources are used as the order service resources.
4. The method according to claim 2, characterized in that, The distance ladder variables include a first distance interval, a second basic resource, a distance step size, a distance step size resource, and a second standard resource; The step of determining the distance service resources corresponding to the target order based on the delivery distance of the target order and the distance step variable includes: In response to the fact that the delivery distance of the target order belongs to the first distance range, the second basic resource is used as the distance service resource; In response to the fact that the delivery distance of the target order does not belong to the first distance interval, additional distance resources for the target order are obtained; based on the second basic resources, the additional distance resources, the distance step size, and the distance step size resources, the distance service resources corresponding to the target order are determined; in response to the fact that the distance service resources are greater than the second standard resources, the second standard resources are used as the distance service resources.
5. The method according to claim 2, characterized in that, The technical resource variables include the correspondence between object identifiers and resource conversion coefficients, as well as third-standard resources; The step of determining the technical service resources corresponding to the target order based on the object identifier of the target order, the order resources of the target order, and the technical resource variables includes: Based on the object identifier of the target order and the technical resource variables, determine the resource conversion coefficient corresponding to the target order; Based on the order resources of the target order and the resource conversion coefficient corresponding to the target order, the technical service resources corresponding to the target order are determined; If the technical service resources for the target order are less than the third standard resources, the third standard resources will be used as the technical service resources.
6. The method according to claim 1, characterized in that, The step of determining the technical resource variables and the performance resource variables based on the solution results of the mathematical programming model includes: In response to the solution result of the mathematical programming model being feasible, the technical resource variables and the performance resource variables are determined based on the feasible solution; In response to the mathematical programming model finding no feasible solution, the values of the first resource interval and the order step size are updated; the data of the multiple historical orders are aggregated based on the updated first resource interval and order step size to obtain second aggregated historical order data; the mathematical programming model is solved based on the second aggregated historical order data and the resource constraints; the technical resource variable and the fulfillment resource variable are determined based on the solution of the mathematical programming model.
7. The method according to claim 6, characterized in that, The resource constraints also include constraints on the magnitude of change in the quantity of resources to be transferred, and the technical resource variables include the correspondence between object identifiers and resource conversion coefficients; After determining the technical resource variables and the performance resource variables based on the feasible solution of the mathematical programming model, the solution further includes: Search for order information among the multiple historical orders that does not meet the constraint on the change range of the resource quantity that needs to be transferred; Based on the order information that does not meet the constraint on the change range of the resource quantity that needs to be transferred, and the technical resource variable and the fulfillment resource variable, obtain the resource conversion coefficient corresponding to the object identifier that meets the constraint on the change range of the resource quantity that needs to be transferred; The technical resource variable is updated based on the resource conversion coefficient corresponding to the object identifier that satisfies the constraint on the change range of the required resource quantity.
8. A device for determining the quantity of resources, characterized in that, The device includes: The acquisition module is used to acquire the order information of the target order, wherein the order information of the target order includes an object identifier and at least one of order resources and delivery distance; The first determining module is used to determine technical resource variables and fulfillment resource variables based on order information from multiple historical orders. The technical resource variables and the fulfillment resource variables satisfy their respective resource constraints. The resource constraints of the technical resource variables are used to constrain the scope of technical service resources, and the resource constraints of the fulfillment resource variables are used to constrain the scope of fulfillment service resources. The resource constraints of the technical resource variables include the upper and lower limits and data types of each resource variable in the technical resource variables, and a minimum constraint on technical service resources. The resource constraints of the fulfillment resource variables include the upper and lower limits and data types of each resource variable in the fulfillment resource variables, a cap constraint on order service resources, and a cap constraint on distance service resources. The first determining module is used to obtain order information of the multiple historical orders, the order information of each historical order including order resources, delivery distance, object identifier, and historical resources transferred; and to determine the technical resource variable and the fulfillment resource variable based on the order information of the multiple historical orders and the resource variable calculation model, the resource variable calculation model including a mathematical programming model constructed based on the resource constraints of the technical resource variable and the resource constraints of the fulfillment resource variable. The first determining module is used to initialize the values of the first resource interval and the order step size; aggregate the data of the multiple historical orders according to the initialized first resource interval and the order step size to obtain the first aggregated historical order data; solve the mathematical programming model based on the first aggregated historical order data; and determine the technical resource variable and the fulfillment resource variable according to the solution result of the mathematical programming model. The second determining module is used to determine the technical service resources and fulfillment service resources corresponding to the target order based on the order information of the target order, the technical resource variables, and the fulfillment resource variables, and to determine the quantity of resources that need to be transferred corresponding to the target order based on the technical service resources and the fulfillment service resources.
9. The apparatus according to claim 8, characterized in that, The first determining module is used to acquire order information of multiple historical orders, the order information of each historical order including order resources, delivery distance, object identifier, and historical resources transferred; and to determine the technical resource variable and the fulfillment resource variable based on the order information of the multiple historical orders and the resource variable calculation model, the resource variable calculation model including a mathematical programming model constructed based on the resource constraints of the technical resource variable and the resource constraints of the fulfillment resource variable.
10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one line of program code, which is loaded and executed by the processor to implement the method for determining the number of resources as described in any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the method for determining the number of resources as described in any one of claims 1 to 7.
12. A computer program product, characterized in that, The computer program product includes: computer program code, which is loaded and executed by a computer to enable the computer to implement the method for determining the amount of resources according to any one of claims 1-7.
