Resource allocation method, device and storage medium
By obtaining the user's historical order data and in-transit order data, and comparing the amount of basic resources and in-transit resources, the problem of inaccurate resource allocation in the existing technology is solved, accurate resource allocation is achieved, and the resource utilization efficiency in e-commerce is improved.
Patent Information
- Application Number
- CN201911181520.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-27
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-11-27
AI Technical Summary
Existing resource allocation methods cannot accurately allocate resources based on users' order data, making it difficult to effectively solve the problem of resource shortage.
By obtaining the user's historical order data, the user's basic resource amount in the first time period is determined, and compared with the total resources associated with the in-transit orders in the second time period, the user's pre-allocated resource amount is calculated to achieve resource accurate distribution.
It realizes the accurate allocation of resources for users based on the user's order data, improves the accuracy and efficiency of resource allocation, and can estimate the amount of pre-allocated resources for users in advance.
Smart Images

Figure CN112862552B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a resource allocation method, device and storage medium. Background Art
[0002] The rapid development of e-commerce originated in the 1990s. After more than 20 years of rapid development, the e-commerce industry has gone through the development path from e-commerce technology, e-commerce services to e-commerce economy. At present, the e-commerce economy has formed a development model from commodity trading, capital transmission, business activities, supply chain system construction, to commercial development, industrial chain system and industrial cluster formation. At present, merchants engaged in e-commerce are mainly small and medium-sized enterprises or even individuals, and they generally have the problem of lack of resources, such as lack of financial resources.
[0003] In order to solve the problem of resource scarcity, existing resource allocation methods include: Internet credit, supply chain finance, pre-sale order financing and cross-border cooperative finance, etc. However, these resource allocation methods cannot accurately allocate resources to users based on their order data. Summary of the invention
[0004] The embodiments of the present application provide a resource allocation method, device and storage medium, which can accurately allocate resources to users.
[0005] In a first aspect, an embodiment of the present application provides a resource allocation method, including:
[0006] Obtain the user's historical order data, where the historical order data includes resources associated with each historical order;
[0007] Determine the basic resources of the user in the first time period according to the resources associated with the historical orders in the historical order data, where the basic resources are the maximum amount of resources available to the user;
[0008] Obtaining total resources associated with the in-transit orders of the user in a second time period, where the second time period is the same length as the first time period;
[0009] The total resources associated with the in-transit orders in the second time period are compared with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user.
[0010] In a possible implementation manner of the first aspect, comparing the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user includes:
[0011] If the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period, it is determined that the pre-allocated resources of the user are less than or equal to the basic resources of the user and greater than zero.
[0012] In a possible implementation manner of the first aspect, the historical order data includes a generation time and a completion time of each of the historical orders, and if total resources associated with the in-transit orders in the second time period are less than basic resources of the user in the first time period, the method further includes:
[0013] Determine the order grace period of the user based on the generation time and completion time of each of the historical orders in the historical data of the user;
[0014] Acquire total resources associated with the in-transit orders of the user within the order grace period, where the order grace period includes the second time period;
[0015] If the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources within the first time period, it is determined that the user's pre-allocated resources are less than or equal to the user's basic resources and greater than zero.
[0016] In a possible implementation manner of the first aspect, determining the basic resources of the user in the first time period according to the resources associated with the historical orders in the historical order data includes:
[0017] The basic resources of the user in the first time period are determined according to the resources associated with some historical orders in the historical order data.
[0018] In a possible implementation manner of the first aspect, determining the basic resources of the user in the first time period according to the resources associated with some historical orders in the historical order data includes:
[0019] Acquire in-transit resources associated with historical orders in each sampling period of the part of historical orders, where the sampling period is the same as the length of the first time period;
[0020] A preset portion of the average value of the in-transit resources associated with the historical orders in each sampling period is determined as the basic resources of the user in the first time period.
[0021] In a possible implementation manner of the first aspect, the part of historical orders includes historical orders at special time nodes, and the in-transit resources associated with the historical orders at the special time nodes are a preset part of actual resources associated with the historical orders at the special time nodes.
[0022] Optionally, some of the historical orders in the historical order data are historical orders in a preset recent time period in the historical data.
[0023] In a second aspect, an embodiment of the present application provides a resource allocation device, including:
[0024] An acquisition module, used to acquire the user's historical order data, wherein the historical order data includes resources associated with each historical order;
[0025] A processing module, configured to determine the basic resources of the user in a first time period according to the resources associated with the historical orders in the historical order data, wherein the basic resources are the maximum amount of resources available to the user;
[0026] The acquisition module is further used to acquire the total resources associated with the in-transit orders of the user in a second time period, where the second time period is the same length as the first time period;
[0027] The processing module is further used to compare the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user.
[0028] In a possible implementation of the second aspect, the processing module is specifically used to determine that the pre-allocated resource amount of the user is less than or equal to the basic resources of the user and greater than zero if the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period.
[0029] In a possible implementation manner of the second aspect, the historical order data includes a generation time and a completion time of each of the historical orders, and if total resources associated with the in-transit orders in the second time period are less than basic resources of the user in the first time period, the device further includes a determining module:
[0030] A determination module, which determines the order grace period of the user based on the generation time and completion time of each of the historical orders in the historical data of the user;
[0031] The acquisition module is further used to acquire the total resources associated with the in-transit orders of the user within the order grace period, where the order grace period includes the second time period;
[0032] The processing module is also used to determine that the pre-allocated resource amount of the user is less than or equal to the basic resources of the user and greater than zero if the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources in the first time period.
[0033] In a possible implementation manner of the second aspect, the processing module is specifically configured to determine basic resources of the user in the first time period according to resources associated with some historical orders in the historical order data.
[0034] In a possible implementation of the second aspect, the processing module is specifically used to obtain the in-transit resources associated with the historical orders in each sampling period of the part of the historical orders, and the sampling period is the same as the length of the first time period; and a preset part of the average value of the in-transit resources associated with the historical orders in each sampling period is determined as the basic resources of the user in the first time period.
[0035] In a possible implementation manner of the second aspect, the part of historical orders includes historical orders at special time nodes, and the in-transit resources associated with the historical orders at the special time nodes are a preset part of the actual resources associated with the historical orders at the special time nodes.
[0036] Optionally, some of the historical orders in the historical order data are historical orders in a preset recent time period in the historical data.
[0037] In a third aspect, an embodiment of the present application provides a resource allocation device, which exists in the form of a chip product. The structure of the device includes a processor and a memory. The memory is used to couple with the processor to store necessary program instructions and data for the device. The processor is used to execute the program instructions stored in the memory, so that the device executes the resource allocation method described in the first aspect above.
[0038] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
[0039] The memory is used to store computer programs;
[0040] The processor is used to execute the computer program to implement the resource allocation method described in any one of the first aspects above.
[0041] In a fifth aspect, an embodiment of the present application provides a computer storage medium, wherein the storage medium includes computer instructions. When the instructions are executed by a computer, the computer implements the resource allocation method as described in any one of the first aspects.
[0042] In a sixth aspect, an embodiment of the present application provides a computer program product, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a computer being able to read the computer program from the readable storage medium, and the at least one processor executing the computer program so that the computer implements any of the resource allocation methods described in the first aspect.
[0043] The resource allocation method, device and storage medium provided in the embodiments of the present application obtain the user's historical order data, wherein the historical order data includes resources associated with each historical order; determine the user's basic resources in the first time period based on the resources associated with the historical orders in the historical order data, wherein the basic resources are the maximum amount of resources available to the user; obtain the total resources associated with the user's in-transit orders in the second time period, wherein the second time period is the same length as the first time period; compare the total resources associated with the in-transit orders in the second time period with the user's basic resources in the first time period to determine the user's pre-allocated resource amount. That is, by comparing the total resources associated with the user's in-transit orders with the user's basic resources, the embodiments of the present application can accurately estimate the user's pre-allocated resource amount in advance, thereby accurately configuring resources for the user based on the user's order data. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of an application scenario involved in an embodiment of the present application;
[0045] Figure 2 A flowchart of a resource allocation method provided in an embodiment of the present application;
[0046] Figure 3 A flowchart of a resource allocation method provided in another embodiment of the present application;
[0047] Figure 4 A schematic diagram of a resource allocation device provided in one embodiment of the present application;
[0048] Figure 5 A schematic diagram of a resource allocation device provided in another embodiment of the present application;
[0049] Figure 6 A schematic diagram of the structure of a resource allocation device provided in one embodiment of the present application;
[0050] Figure 7 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] It should be noted that, in the embodiment of the present invention, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based only on A, and B can also be determined based on A and / or other information.
[0053] In the description of the present application, unless otherwise specified, “plurality” means two or more than two.
[0054] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with substantially the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.
[0055] The resource allocation method provided in the embodiment of the present application is described in detail below with reference to a specific example.
[0056] Figure 1 This is a schematic diagram of an application scenario involved in an embodiment of the present application, including: a first electronic device and a second electronic device, wherein the first electronic device stores order data of a user (i.e., a merchant), the second electronic device is used to execute the method of the embodiment of the present application, the first electronic device and the second electronic device are communicatively connected, and the second electronic device can obtain the user's order data from the first electronic device.
[0057] The first electronic device may be a terminal device, such as a laptop, desktop computer, mobile phone, tablet computer, etc., for users to conduct transactions with consumers. Optionally, the first electronic device may also be a server, such as a cloud server. The first electronic device stores all order data of the user and may also store order data of other users.
[0058] The second electronic device may be a terminal device, such as a notebook, a desktop computer, a mobile phone, a tablet computer, etc. Optionally, the second electronic device may also be a server.
[0059] In an actual application example, when a user needs resources, the user can make a resource request to a resource supplier through a first electronic device, and the resource request includes the user's identification information. After receiving the resource request, the resource supplier uses a second electronic device to obtain the user's order data from the first electronic device based on the user's identification information included in the resource request, and executes the method of the embodiment of the present application to determine the pre-allocated resources of the user.
[0060] Figure 2 A flowchart of a resource allocation method provided in an embodiment of the present application is shown in FIG. Figure 2As shown, the method of the embodiment of the present application includes:
[0061] S101. Obtain the user's historical order data.
[0062] The historical order data includes resources associated with each historical order.
[0063] Optionally, the resources of the embodiment of the present application can be understood as financial resources, for example, the resources associated with an order can be understood as the amount corresponding to the order, and resource allocation can be allocating funds to the user. Optionally, the resources of the embodiment of the present application can also be other types of resources, such as material resources, human resources, etc.
[0064] The execution subject of the embodiment of the present application is a device having a resource allocation function, such as a resource allocation device. The resource allocation device can be a separate electronic device, such as Figure 1 The second electronic device in the embodiment may also be a component in the electronic device, for example Figure 1 A processor in a second electronic device.
[0065] In the embodiment of the present application, the execution subject is an electronic device, for example Figure 1 The second electronic device in is used as an example for explanation.
[0066] The above-mentioned historical order data of the user is the historical order data of the user within a preset historical time period, for example, obtaining the data of each historical order that the user has completed with the consumer within the last 12 months.
[0067] Optionally, the above historical order data also includes information such as the order number, customer ID, order generation time, product category, order completion time, order status, etc. of each historical order.
[0068] The order status can include completed, returned, uncompleted, etc.
[0069] S102: Determine basic resources of the user in a first time period according to resources associated with historical orders in the historical order data.
[0070] From the above, it can be seen that the historical order data of the embodiment of the present application includes resources associated with each historical order, so that the basic resources of the user in the first time period can be determined based on the resources associated with the historical orders included in the historical order data.
[0071] The above-mentioned first time period is of any length, such as one day, one week, one month, one year, etc. Correspondingly, the basic resources include daily basic resources, weekly basic resources, monthly basic resources, and annual basic resources, etc.
[0072] The basic resources of the above-mentioned user in the first time period are the maximum amount of resources that the user can obtain from the resource supplier in the first time period. For example, if the user's daily basic resources are 200,000, then the maximum amount of resources that the user can obtain from the resource supplier in one day is 200,000.
[0073] The embodiment of the present application takes the first time period as one day as an example, that is, the basic resources are daily basic resources as an example for explanation. The basic resources of other time periods, such as monthly basic resources, annual basic resources, etc., can refer to the determination process of daily basic resources.
[0074] In this step, the methods for determining the user's basic resources include, but are not limited to, the following methods based on the resources associated with the historical orders in the user's historical order data:
[0075] Method 1: Determine the basic resources of the user based on the resources associated with each historical order in the historical order data of the user. For example, if the above basic resources are daily basic resources, then obtain the resources associated with each daily historical order in the historical order data, and use the average value of the resources associated with each daily historical order as the daily basic resource of the user, or use a part of the average value of the resources associated with each daily historical order in the historical order data as the daily basic resource of the user.
[0076] Similarly, all or part of the average value of resources associated with historical orders in each week can be used as the user's weekly basic resources, and all or part of the average value of resources associated with historical orders in each month can be used as the user's monthly basic resources, and so on.
[0077] Method 2: determining the basic resources of the user in the first time period according to the resources associated with some historical orders in the historical order data.
[0078] Optionally, the above-mentioned partial historical orders may be historical orders within any time period in the historical order data.
[0079] Optionally, the above-mentioned part of historical orders is historical orders in a preset recent time period in the historical data. For example, the above-mentioned historical order data is the historical order data of the user in the past 12 months, and the above-mentioned historical orders in the preset recent time period can be historical orders in the most recent 6 months in the historical order data of the 12 months.
[0080] It should be noted that the embodiment of the present application does not impose any specific restrictions on the above-mentioned preset recent time period, which can be determined according to actual needs.
[0081] For example, assuming that the above basic resources are daily basic resources, the above historical order data are the user's historical order data for the past 12 months, and the above preset recent time period is the past 6 months, then the historical order data for the past 6 months can be obtained from the 12 months of historical order data, and the resources associated with each day's historical order in the past 6 months' historical order data can be determined, and all or part of the average value of the resources associated with each day's historical order in the past 6 months can be used as the basic resources of the user.
[0082] In some embodiments, in order to improve the accuracy of the user's basic resources, undelivered orders and orders that have been cancelled are filtered out. In this case, the above method 2 includes step A1 and step A2:
[0083] Step A1: Obtain in-transit resources associated with historical orders in each sampling period in the part of historical orders, where the sampling period is the same as the length of the first time period.
[0084] Specifically, assuming that the length of the first time period and the sampling period is one day, the electronic device monitors the user's order data for each day in the past six months in real time, filters out unshipped, completed, and canceled orders for each day's order data, and obtains the resources associated with the in-transit orders for each day. For example, for a certain day a in the past six months, the electronic device monitors the user's order data on that day, filters out unshipped, completed, and canceled orders, obtains the resources associated with the user's in-transit orders on that day, and uses the resources associated with the in-transit orders as the in-transit resources for that day. Similarly, the electronic device can obtain the in-transit resources associated with the user's historical orders for each day in the past six months.
[0085] Optionally, if the above-mentioned part of historical orders (e.g., historical orders in the last 6 months) includes historical orders at special time nodes, such as special time nodes such as the 6.18 mid-year promotion and the 11.11 promotion, the in-transit resources associated with the historical orders at the special time nodes are a preset part of the actual resources (e.g., actual amount) of the historical orders at the special time nodes. For example, 80% of the actual resources associated with the historical orders at the special time nodes are used as the in-transit resources associated with the historical orders at the special time nodes.
[0086] Step A2: Determine a preset portion of the average value of the in-transit resources associated with the historical orders in each sampling period as the basic resources of the user in the first time period.
[0087] Specifically, according to the above steps, the in-transit resources associated with the historical orders in each sampling period of some historical orders can be obtained, and then a preset part of the average value of the in-transit resources associated with the historical orders in each sampling period is determined as the basic resources of the user in the first time period. Continuing with the above example, assuming that the sampling period is one day, the average value of the in-transit resources associated with the daily historical orders in the last 6 months is obtained, and a preset part of the average value, such as 10% of the average value, is used as the basic resources of the user.
[0088] S103: Obtain the total resources associated with the user's in-transit orders within the second time period.
[0089] The second time period has the same length as the first time period, for example, both are one day.
[0090] If the above-mentioned basic resources are daily basic resources, optionally, the above-mentioned second time period can be the current day, so that the electronic device monitors the user's order data of the current day in real time, filters out unshipped, completed and canceled orders, and obtains the total resources associated with the in-transit orders as the total resources associated with the user's in-transit orders in the second time period.
[0091] Optionally, the second time period is a future time period of the first time period.
[0092] S104: Compare the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user.
[0093] According to the above steps, after the electronic device obtains the total resources associated with the user's in-transit orders in the second time period, it compares the total resources associated with the user's in-transit orders in the second time period with the user's basic resources in the first time period to determine the user's pre-allocated resource amount.
[0094] The pre-allocated resource amount of the user includes at least the following types: equal to the basic resource of the user, less than the basic resource of the user and greater than zero, and zero.
[0095] In some embodiments, the above S104 compares the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user, including:
[0096] If the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period, it is determined that the pre-allocated resource amount of the user is equal to the basic resources of the user, or is less than the basic resources of the user and greater than zero.
[0097] For example, according to the above steps, the total resources associated with the user's in-transit orders in the second time period are determined to be 100,000, and the user's basic resources in the first time period are 80,000. The total resources associated with the in-transit orders of 100,000 are greater than the basic resources of 80,000, then the pre-allocated resources for the user are determined to be 80,000, or less than 80,000 and greater than zero.
[0098] If the total resources associated with the in-transit orders in the second time period are less than the basic resources of the user, it is determined that the user enters the observation period.
[0099] For example, according to the above steps, the total resources associated with the user's in-transit orders in the second time period are determined to be 60,000, and the user's basic resources in the first time period are 80,000. The total resources of 60,000 associated with the in-transit orders are less than the basic resources of 80,000. At this time, it is determined that the user enters the observation period, and the total resources associated with the user's in-transit orders are compared with the user's basic resources during the observation period.
[0100] In the embodiment of the present application, during the observation period, if the total resources associated with the user's in-transit orders are greater than the user's basic resources, it is determined that the user's pre-allocated resources are equal to the user's basic resources, or less than the user's basic resources and greater than zero. If during the observation period, the total resources associated with the user's in-transit orders are still less than the basic resources, it is determined that the user's pre-allocated resources are less than the user's basic resources, or are zero.
[0101] Optionally, the above observation period may be a preset value.
[0102] Optionally, in some embodiments, after determining the pre-allocated resource amount of the user, the pre-allocated resource amount may be output, for example, by Figure 1 The second electronic device in the system displays the pre-allocated resource amount so that the resource supplier can obtain it, or the second electronic device sends the user's pre-allocated resource amount to the resource supplier's electronic device so that the resource supplier can obtain it. This allows the resource supplier to grasp the user's order data in real time, and allocate resources to the user based on the user's pre-allocated resource amount, thereby achieving the accuracy of resource allocation by the resource supplier to the user. For example, when the total resources associated with the user's in-transit orders in the second time period are greater than or equal to the user's basic resources in the first time period, the resource supplier can allocate funds to the user that are less than or equal to the user's basic resources; when the total resources associated with the user's in-transit orders in the second time period are less than the user's basic resources in the first time period, the resource supplier can stop or reduce the allocation of resources to the user, thereby achieving accurate allocation of resources to the user based on the user's order data.
[0103] The resource allocation method provided in the embodiment of the present application obtains the historical order data of the user, wherein the historical order data includes the resources associated with each historical order; determines the basic resources of the user in the first time period according to the resources associated with the historical orders in the historical order data, wherein the basic resources are the maximum amount of resources available to the user; obtains the total resources associated with the in-transit orders of the user in the second time period, wherein the second time period is the same length as the first time period; compares the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period, and determines the pre-allocated resource amount of the user. That is, the embodiment of the present application achieves accurate allocation of resources for the user by comparing the total resources associated with the in-transit orders of the user with the basic resources of the user.
[0104] In some embodiments, based on the above embodiments, if the total resources associated with the in-transit orders in the second time period are less than the user's basic resources in the first time period, such as Figure 3 As shown, the method of the embodiment of the present application also includes:
[0105] S201. Determine an order grace period for the user based on the generation time and completion time of each historical order in the historical data of the user.
[0106] The order grace period of the user in the embodiment of the present application can be understood as the observation period of the user described in the above embodiment. In this way, when the total resources associated with the user's in-transit orders in the second time period are less than the user's basic resources in the first time period, the order grace period (i.e., observation period) of the user is determined based on the generation time and completion time of each historical order.
[0107] Specifically, the completion period of each historical order is determined according to the generation time and completion time of each historical order in the historical order data, and the average of the completion period of each historical order is used as the order grace period of the user. For example, if the average completion period of each historical order of the user is 3 days, the order grace period of the user is determined to be 3 days.
[0108] S202: Obtain the total resources associated with the user's in-transit orders within the order grace period.
[0109] The order grace period includes the second time period.
[0110] Specifically, if the total resources associated with the user's in-transit orders in the second time period are less than the user's basic resources in the first time period, the total resources associated with the user's in-transit orders in the order grace period are obtained. For example, the second time period is one day and the order grace period is three days. At this time, the total resources associated with the user's in-transit orders in the order grace period are the sum of the total resources associated with the user's in-transit orders on the first day, the total resources associated with the user's in-transit orders on the second day, and the total resources associated with the user's in-transit orders on the third day.
[0111] S203: If the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources within the first time period, determine that the user's pre-allocated resources are less than or equal to the user's basic resources and greater than zero.
[0112] Next, determine whether the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources. If the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources, determine that the user's pre-allocated resources are less than or equal to the user's basic resources and greater than zero; if the total resources associated with the user's in-transit orders within the order grace period are less than the user's basic resources, determine that the user's pre-allocated resources are less than the user's basic resources, or are zero.
[0113] The resource allocation method provided in the embodiment of the present application determines the order grace period of the user through the generation time and completion time of each historical order in the historical order data of the user; obtains the total resources associated with the in-transit orders of the user within the order grace period, and the order grace period includes the second time period; if the total resources associated with the in-transit orders of the user within the order grace period are greater than or equal to the basic resources of the user, determines that the pre-allocated resource amount of the user is less than or equal to the basic resources of the user and greater than zero, thereby further improving the accuracy of allocating resources to the user according to the user's order data.
[0114] Figure 4 A schematic diagram of a resource allocation device provided in an embodiment of the present application, the resource allocation device is applied to an electronic device, the resource allocation device can be an electronic device, or a component of an electronic device (for example, an integrated circuit, a chip, etc.), such as Figure 4 As shown, the resource allocation device 100 includes:
[0115] An acquisition module 110 is used to acquire historical order data of a user, wherein the historical order data includes resources associated with each historical order;
[0116] A processing module 120, configured to determine the basic resources of the user in a first time period according to the resources associated with the historical orders in the historical order data, wherein the basic resources are the maximum amount of resources available to the user;
[0117] The acquisition module 110 is further used to acquire the total resources associated with the in-transit orders of the user in a second time period, where the second time period is the same length as the first time period;
[0118] The processing module 120 is further configured to compare the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user.
[0119] The resource allocation device of the embodiment of the present application can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0120] In one possible implementation, the processing module 120 is specifically used to determine that the pre-allocated resource amount of the user is less than or equal to the basic resources of the user and greater than zero if the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period.
[0121] Figure 5 A schematic diagram of a resource allocation device provided by another embodiment of the present application, based on the above embodiment, if the total resources associated with the in-transit orders in the second time period are less than the basic resources of the user in the first time period, the above device further includes a determination module 130;
[0122] A determination module 130, determining an order grace period for the user based on the generation time and completion time of each of the historical orders in the historical data of the user;
[0123] The acquisition module 110 is further configured to acquire total resources associated with the in-transit orders of the user within the order grace period, where the order grace period includes the second time period;
[0124] The processing module 120 is also used to determine that the pre-allocated resource amount of the user is less than or equal to the basic resources of the user and greater than zero if the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources in the first time period.
[0125] In a possible implementation, the processing module 120 is specifically configured to determine the basic resources of the user in the first time period according to resources associated with some historical orders in the historical order data.
[0126] In a possible implementation, the processing module 120 is specifically used to obtain the in-transit resources associated with the historical orders in each sampling period of the part of the historical orders, and the sampling period is the same as the length of the first time period; and a preset part of the average value of the in-transit resources associated with the historical orders in each sampling period is determined as the basic resources of the user in the first time period.
[0127] In a possible implementation, some historical orders include historical orders at special time nodes, and the in-transit resources associated with the historical orders at the special time nodes are a preset part of the actual resources associated with the historical orders at the special time nodes.
[0128] Optionally, some of the historical orders in the above historical order data are historical orders in a preset recent time period in the historical data.
[0129] The resource allocation device of the embodiment of the present application can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0130] Figure 6 A schematic diagram of the structure of a resource allocation device provided in an embodiment of the present application. The resource allocation device 700 exists in the form of a chip product, and the structure of the resource allocation device includes a processor 701 and a memory 702, the memory 702 is used to couple with the processor 701, the memory 702 stores the necessary program instructions and data of the device, and the processor 701 is used to execute the program instructions stored in the memory 702, so that the device performs the functions of the electronic device in the above method embodiment.
[0131] The resource allocation device of the embodiment of the present application can be used to execute the technical solutions of the electronic device in the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0132] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 600 can implement the functions performed by the electronic device in the above method embodiment, and the functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions.
[0133] In a possible design, the structure of the electronic device 600 includes a processor 601, a transceiver 602 and a memory 603, and the processor 601 is configured to support the electronic device 600 to perform the corresponding functions in the above method. The transceiver 602 is used to support the communication between the electronic device 600 and other electronic devices or servers. The electronic device 600 may also include a memory 603, which is used to couple with the processor 601 and store the necessary program instructions and data of the electronic device 600.
[0134] When the electronic device 600 is turned on, the processor 601 can read the program instructions and data in the memory 603, interpret and execute the program instructions, and process the data of the program instructions. When data needs to be sent, the processor 601 outputs the data to be sent to the transceiver 602, and the transceiver 602 sends the data to be sent out. When data is sent to the electronic device, the transceiver 602 outputs the received data to the processor 601, and the processor 601 processes the data.
[0135] Those skilled in the art will appreciate that for ease of description, Figure 7 Only one memory 603 and one processor 601 are shown. In the actual electronic device 600, there may be multiple processors 601 and multiple memories 603. The memory 603 may also be called a storage medium or a storage device, etc., which is not limited in the embodiment of the present application.
[0136] The electronic device of the embodiment of the present application can be used to execute the technical solutions of the electronic device in the above-mentioned method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.
[0137] Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the device described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
[0139] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned device embodiments, and will not be repeated here. In addition, the various device embodiments and the various device embodiments can also refer to each other, and the same or corresponding contents in different embodiments can be quoted from each other without repeated description.
Claims
1. A resource allocation method, characterized in that: include: Receiving a resource request from a first electronic device, wherein the resource request includes identification information of a user, and the first electronic device stores order data of the user; Acquire historical order data of the user from the first electronic device according to the identification information of the user, the historical order data including resources associated with each historical order; Determine the basic resources of the user in the first time period according to the resources associated with the historical orders in the historical order data, where the basic resources are the maximum amount of resources available to the user; Obtaining total resources associated with the in-transit orders of the user in a second time period, where the second time period is the same length as the first time period, and the total resources associated with the in-transit orders are a portion of the actual resources of the user in the second time period; Compare the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user; The comparing the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user includes: If the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period, then determining that the pre-allocated resources of the user are less than or equal to the basic resources of the user and greater than zero; Determining the basic resources of the user in the first time period according to the resources associated with the historical orders in the historical order data includes: Obtain in-transit resources associated with historical orders in each sampling period of some historical orders, where the sampling period is the same as the duration of the first time period, and the in-transit resources are the number of orders after filtering out unshipped, completed, and canceled orders; Determine a preset portion of the average value of the in-transit resources associated with the historical orders in each sampling period as the basic resources of the user in the first time period, wherein the basic resources include daily basic resources, weekly basic resources, monthly basic resources and annual basic resources; The resources are material resources.
2. The method according to claim 1, characterized in that The historical order data includes the generation time and completion time of each of the historical orders. If the total resources associated with the in-transit orders in the second time period are less than the basic resources of the user in the first time period, the method further includes: Determine an order grace period for the user based on the generation time and completion time of each of the historical orders in the historical data of the user; Acquire total resources associated with the in-transit orders of the user within the order grace period, where the order grace period includes the second time period; If the total resources associated with the user's in-transit orders within the order grace period are greater than or equal to the user's basic resources within the first time period, it is determined that the user's pre-allocated resources are less than or equal to the user's basic resources and greater than zero.
3. The method according to claim 1, characterized in that The part of historical orders includes historical orders at special time nodes, and the in-transit resources associated with the historical orders at the special time nodes are a preset part of the actual resources associated with the historical orders at the special time nodes.
4. The method according to claim 1, characterized in that Some of the historical orders in the historical order data are historical orders in a preset recent time period in the historical data.
5. A resource allocation device, characterized in that: include: an acquisition module, configured to receive a resource request from a first electronic device, the resource request including identification information of a user, and the first electronic device storing order data of the user; and to acquire historical order data of the user from the first electronic device according to the identification information of the user, the historical order data including resources associated with each historical order; A processing module, configured to determine the basic resources of the user in a first time period according to the resources associated with the historical orders in the historical order data, wherein the basic resources are the maximum amount of resources available to the user; The acquisition module is further used to acquire the total resources associated with the in-transit orders of the user in a second time period, the second time period is the same length as the first time period, and the total resources associated with the in-transit orders are a part of the actual resources of the user in the second time period; The processing module is further used to compare the total resources associated with the in-transit orders in the second time period with the basic resources of the user in the first time period to determine the pre-allocated resource amount of the user; The processing module is specifically used for: If the total resources associated with the in-transit orders in the second time period are greater than or equal to the basic resources of the user in the first time period, then determining that the pre-allocated resources of the user are less than or equal to the basic resources of the user and greater than zero; The processing module is specifically used to: obtain in-transit resources associated with historical orders in each sampling period of some historical orders, the sampling period is the same as the duration of the first time period, and the in-transit resources are the number of orders after filtering out unshipped, completed and cancelled orders; determine a preset part of the average value of the in-transit resources associated with the historical orders in each sampling period as the basic resources of the user in the first time period, and the basic resources include daily basic resources, weekly basic resources, monthly basic resources and annual basic resources; The resources are material resources.
6. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program to implement the resource allocation method as described in any one of claims 1 to 4.
7. A computer storage medium, characterized in that: The storage medium includes computer instructions, and when the instructions are executed by a computer, the computer implements the resource allocation method according to any one of claims 1 to 4.
8. A computer program product, the program product comprising a computer program, characterized in that: The computer program is stored in a readable storage medium. At least one processor of a computer can read the computer program from the readable storage medium. The at least one processor executes the computer program so that the computer implements the resource allocation method according to any one of claims 1 to 4.
