Resource allocation method and device

By dynamically updating the resource allocation method, calculating the latest departure and start dates, combining transportation costs and geographical location, the problem that static inventory data is difficult to meet the needs of complex supply chains is solved, and timely delivery of resources and efficient operation of the supply chain is achieved.

CN120258478BActive Publication Date: 2025-09-02BEIJING BIG DATA ADVANCED TECH RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510740622.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-05
Publication Date
2025-09-02
Estimated Expiration
2045-06-05

AI Technical Summary

Technical Problem

The existing static resource matching rules and inventory data are difficult to meet the dynamic resource allocation needs of complex supply chains, resulting in estimated deviations in resource allocation plans and transportation time conflicts, which cannot effectively meet the real-time demands of the supply chain.

Method used

By dynamically updating the resource allocation method, we determine the demand quantity of the demand unit and the number of resources that can be provided by the supply unit, calculate the latest departure and start date, combine the transportation cost and geographical location, and generate resource allocation tasks to ensure the timely delivery of resources.

Benefits of technology

It realizes efficient allocation of resources in complex supply chain scenarios, ensures timely delivery of resources and efficient operation of supply chains, and improves the response speed and emergency response capabilities of the supply chain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258478B_ABST
    Figure CN120258478B_ABST
Patent Text Reader

Abstract

The present invention provides a resource allocation method and device, relating to the technical field of material allocation. The method comprises: determining the demand quantity of a demand unit and determining the quantity of resources that a supply unit can provide on a latest departure date; updating the quantity of resources that can be provided on the latest departure date based on the relationship between the demand quantity and the quantity of resources that can be provided on the latest departure date; determining the latest start date of a supply unit and determining the quantity of resources that can be provided on the latest start date; using the smaller of the quantity of resources that can be provided on the latest departure date and the quantity of resources that can be provided on the latest start date as the task output quantity of the supply unit; and generating a corresponding resource allocation task when the task output quantity equals the demand quantity. The present invention can not only improve the response speed of the supply chain, but also generate an executable resource allocation plan while ensuring its own emergency response capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material allocation, and in particular to a resource allocation method and device. Background Art

[0002] Against the backdrop of sustained global economic growth, market demand is growing, and the scale of supply and demand relationships is also expanding. Companies are not only under pressure to meet diverse customer needs, but also face the challenge of optimizing supply chain management to ensure timely delivery and effectively control costs, given limited resources. However, as supply chain networks continue to expand, the complexity of resource allocation also increases. Modern supply chains typically involve multiple suppliers, demanders, and numerous intermediaries. The coordination and efficient operation of each link are crucial to overall efficiency.

[0003] To address these challenges, related technologies utilize static resource matching rules and conflict detection mechanisms, employing task planning and reserve resource scheduling to allocate resources. However, as resource scheduling scenarios become increasingly complex, current static inventory data is no longer sufficient to meet actual operational needs. Summary of the Invention

[0004] The embodiments of the present invention provide a resource allocation method and device, aiming to solve the problems existing in the above-mentioned background technologies.

[0005] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:

[0006] In a first aspect, an embodiment of the present invention provides a resource allocation method, the method comprising:

[0007] Determine the required quantity of the demand unit and the available resource quantity of the supply unit at the latest departure date;

[0008] updating the available resource quantity on the latest departure date according to the relationship between the required quantity and the available resource quantity on the latest departure date;

[0009] Determining a latest start date for the supply unit and determining the quantity of resources that can be provided by the supply unit on the latest start date, wherein the latest start date is earlier than the latest departure date and the latest start date is determined based on the outbound delivery capacity of the supply unit;

[0010] The smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date is used as the task output quantity of the supply unit;

[0011] In a case where the task output quantity is equal to the required quantity, a corresponding resource allocation task is generated, where the resource allocation task includes the latest start date and the task output quantity.

[0012] Optionally, the method further includes:

[0013] In the case that the task output quantity is less than the required quantity, the difference between the required quantity and the task output quantity is used as the remaining required quantity;

[0014] At least one spare unit is determined in sequence from other supply units except the supply unit in order of transportation cost from low to high, and the spare unit is used to provide the remaining required quantity.

[0015] Optionally, determining at least one backup unit from other supply units except the supply unit in descending order of transportation cost includes:

[0016] Determining a first backup unit with the lowest transportation cost from other supply units except the supply unit;

[0017] Taking the first backup unit as a supply unit, determining the task output quantity of the first backup unit;

[0018] When the task output quantity of the first backup unit is less than the remaining demand quantity, determining a second backup unit with the second lowest transportation cost from other supply units except the supply unit;

[0019] Taking the second backup unit as the supply unit, determining the task output quantity of the second backup unit;

[0020] Repeat the above steps until the remaining required quantity is zero.

[0021] Optionally, before determining at least one backup unit from other supply units except the supply unit in descending order of transportation cost, the method further includes:

[0022] According to the geographical locations of the backup units and the demand units, the geographical space is divided into a plurality of boxes by dividing the boxes;

[0023] Determine the source network box where each backup unit is located and the target network box where the demand unit is located, and obtain the time cost, expense cost and labor cost from the source network box where each backup unit is located to the target network box;

[0024] The time cost, expense cost and labor cost are integrated according to the preset weights to obtain the transportation cost of each spare unit to the demand unit.

[0025] Optionally, determining the demand quantity of the demand unit and determining the quantity of resources that can be provided by the supply unit on the latest departure date include:

[0026] Determine the required quantity and required date of the required unit;

[0027] Determine a first total input quantity of resource input tasks completed by the supply unit before the demand date, and determine a first total output quantity of resource output tasks completed and being executed by the supply unit before the demand date;

[0028] Determining the initial inventory resource quantity of the supply unit, and calculating the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity;

[0029] When the available resource quantity on the demand date is greater than zero, the latest departure date is calculated based on the demand date and the transportation time from the supply unit to the demand unit, and the latest departure date is earlier than the demand date;

[0030] Determine a second total input quantity of resource input tasks completed by the supply unit before the latest departure date, and determine a second total output quantity of resource output tasks completed and being executed by the supply unit before the latest departure date;

[0031] The quantity of resources that can be provided by the supply unit on the demand date is calculated based on the initial inventory resource quantity, the second total input quantity and the second total output quantity.

[0032] Optionally, determining the initial inventory resource quantity of the supply unit and calculating the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity includes:

[0033] Subtract the first total output quantity from the initial inventory resource quantity and add the first total input quantity to obtain the resource holding quantity of the supply unit on the demand date;

[0034] The minimum resource reserve of the supply unit is determined, and the resource holding amount on the demand date is subtracted from the minimum resource reserve to obtain the quantity of resources that the supply unit can provide on the demand date.

[0035] Optionally, before calculating the latest departure date based on the transportation time from the supply unit to the demand unit, the method further includes:

[0036] According to the geographical locations of the supply unit and the demand unit, the geographical space is divided into a plurality of boxes by dividing the boxes;

[0037] Determine a source network box where the supply unit is located and a target network box where the demand unit is located, and obtain a time cost from the source network box to the target network box;

[0038] Determine the shortest transport path from the source network box to the target network box by using a path optimization algorithm;

[0039] The time costs between adjacent grids in the shortest transportation path are accumulated to obtain the transportation time from the supply unit to the demand unit.

[0040] Optionally, determining the latest start date of the supply unit and determining the quantity of resources that can be provided by the supply unit on the latest start date include:

[0041] Calculating the delivery time required by the supply unit based on the daily throughput capacity coefficient of the supply unit, wherein the daily throughput capacity coefficient represents the maximum number of resources that the supply unit can handle for delivery per day;

[0042] Subtract the outbound time from the latest departure date to obtain the latest start date;

[0043] Determine a third total input quantity of resource input tasks completed by the supply unit before the latest start date, and determine a third total output quantity of resource output tasks completed and being executed by the supply unit before the latest start date;

[0044] The resource quantity that can be provided by the supply unit on the latest start date is calculated based on the initial inventory resource quantity, the third total input quantity and the third total output quantity.

[0045] Optionally, updating the quantity of resources available on the latest departure date according to the relationship between the demand quantity and the quantity of resources available on the latest departure date includes:

[0046] comparing the required quantity with the available resource quantity on the latest departure date;

[0047] When the demand quantity is less than or equal to the available resource quantity on the latest departure date, the demand quantity is updated to the available resource quantity on the latest departure date.

[0048] In a second aspect, an embodiment of the present invention provides a resource allocation device, the device comprising:

[0049] A first determination module is used to determine the demand quantity of the demand unit and the quantity of resources that the supply unit can provide on the latest departure date;

[0050] An updating module, configured to update the quantity of resources available on the latest departure date according to a relationship between the required quantity and the quantity of resources available on the latest departure date;

[0051] A second determining module is configured to determine a latest start date of the supply unit and the quantity of resources that the supply unit can provide on the latest start date, wherein the latest start date is earlier than the latest departure date and the latest start date is determined based on the outbound delivery capacity of the supply unit;

[0052] a comparison module, configured to use the smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date as the task output quantity of the supply unit;

[0053] A generating module is configured to generate a corresponding resource allocation task when the task output quantity is equal to the required quantity, wherein the resource allocation task includes the latest start date and the task output quantity.

[0054] Optionally, the device further comprises:

[0055] a remaining demand determining module, configured to, when the task output quantity is less than the required quantity, use the difference between the required quantity and the task output quantity as the remaining required quantity;

[0056] The third determining module is configured to determine at least one spare unit from other supply units except the supply unit in order of transportation cost from low to high, wherein the spare unit is used to provide the remaining required quantity.

[0057] Optionally, the third determining module includes:

[0058] A first determining submodule is configured to determine a first backup unit having the lowest transportation cost from other supply units except the supply unit;

[0059] a second determining submodule, configured to use the first backup unit as a supply unit and determine a task output quantity of the first backup unit;

[0060] a third determining submodule, configured to determine, when the task output quantity of the first backup unit is less than the remaining required quantity, a second backup unit having the second lowest transportation cost from other supply units other than the supply unit;

[0061] a fourth determining submodule, configured to use the second backup unit as a supply unit and determine a task output quantity of the second backup unit;

[0062] The loop submodule is used to repeat the above steps until the remaining required quantity is zero.

[0063] Optionally, the device further comprises:

[0064] A first subdividing network box module is used to divide the geographical space into a plurality of network boxes by subdividing network boxes according to the geographical locations of the backup units and the demand units;

[0065] A fourth determining module is used to determine the source network box where each backup unit is located and the target network box where the demand unit is located, and obtain the time cost, expense cost and labor cost from the source network box where each backup unit is located to the target network box;

[0066] The weighted fusion module is used to fuse the time cost, expense cost and labor cost according to the preset weights to obtain the transportation cost of each backup unit to the demand unit.

[0067] Optionally, the first determining module includes:

[0068] A fifth determining submodule is used to determine the demand quantity and demand date of the demand unit;

[0069] a sixth determining submodule, configured to determine a first total input quantity of resource input tasks completed by the supply unit before the demand date, and to determine a first total output quantity of resource output tasks completed and being executed by the supply unit before the demand date;

[0070] a first calculation submodule, configured to determine the initial inventory resource quantity of the supply unit, and calculate the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity;

[0071] a calculation submodule, configured to calculate the latest departure date based on the demand date and the transportation time from the supply unit to the demand unit, if the quantity of available resources on the demand date is greater than zero, and the latest departure date is earlier than the demand date;

[0072] a seventh determining submodule, configured to determine a second total input quantity of resource input tasks completed by the supply unit before the latest departure date, and to determine a second total output quantity of resource output tasks completed and being executed by the supply unit before the latest departure date;

[0073] The second calculation submodule is configured to calculate the quantity of resources that can be provided by the supply unit on the demand date according to the initial inventory resource quantity, the second total input quantity, and the second total output quantity.

[0074] Optionally, the first calculation submodule includes:

[0075] a first calculation unit, configured to obtain the resource holding quantity of the supply unit on the demand date by subtracting the first total output quantity from the initial inventory resource quantity and adding the first total input quantity;

[0076] The second calculation unit is used to determine the minimum resource reserve of the supply unit, and subtract the minimum resource reserve from the resource holding amount on the demand date to obtain the quantity of resources that the supply unit can provide on the demand date.

[0077] Optionally, the device further comprises:

[0078] A second subdividing network box module is used to divide the geographical space into a plurality of network boxes by subdividing network boxes according to the geographical locations of the supply unit and the demand unit;

[0079] a fifth determining module, configured to determine a source network box where the supply unit is located and a target network box where the demand unit is located, and obtain a time cost from the source network box to the target network box;

[0080] A path determination module, configured to determine the shortest transport path from the source network box to the target network box by using a path optimization algorithm;

[0081] The cost calculation module is used to accumulate the time costs between adjacent grids in the shortest transportation path to obtain the transportation time from the supply unit to the demand unit.

[0082] Optionally, the second determining module includes:

[0083] A third calculation submodule is configured to calculate the delivery time required by the supply unit according to the daily throughput capacity coefficient of the supply unit, wherein the daily throughput capacity coefficient represents the maximum number of resources that the supply unit can handle for delivery per day;

[0084] A fourth calculation submodule is configured to subtract the outbound time from the latest departure date to obtain the latest start date;

[0085] an eighth determining submodule, configured to determine a third total input quantity of resource input tasks completed by the supply unit before the latest start date, and to determine a third total output quantity of resource output tasks completed and being executed by the supply unit before the latest start date;

[0086] The fifth calculation submodule is configured to calculate the quantity of resources that can be provided by the supply unit on the latest start date based on the initial inventory resource quantity, the third total input quantity, and the third total output quantity.

[0087] Optionally, the update module includes:

[0088] a comparison submodule, configured to compare the required quantity with the available resource quantity for the latest departure date;

[0089] The updating submodule is configured to update the demand quantity to the available resource quantity for the latest departure date when the demand quantity is less than or equal to the available resource quantity for the latest departure date.

[0090] The technical solutions provided by the embodiments of the present invention bring at least the following beneficial effects:

[0091] The present invention gradually updates the available resources of each period node, dynamically plans the allocation amount while maintaining its own reserve margin, and avoids the shortcomings of traditional methods that rely solely on static inventory data for resource matching. In addition, the present invention dynamically determines each period node based on the time factor, ensuring that the influence of different external factors is taken into account during the actual transportation process, avoiding resource allocation failures caused by transportation time issues. By calculating the latest departure date and the latest start date, the execution time of the task and the release date of the resource are planned in advance, ensuring the timely delivery of resources, and thus ensuring the efficient operation of the supply chain. The present invention can not only improve the response speed of the supply chain, but also generate executable resource allocation plans in complex resource scheduling scenarios while ensuring its own emergency response capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0093] Figure 1 This is a schematic diagram of the overall concept of a resource allocation method provided by an embodiment of the present invention;

[0094] Figure 2 This is a schematic diagram of the steps of a resource allocation method provided by an embodiment of the present invention;

[0095] Figure 3 This is a schematic diagram of a flow chart for calculating the quantity of resources that a supply unit can provide on a demand date in one embodiment of the present invention;

[0096] Figure 4 1 is a schematic diagram of a calculation process of the latest departure date in one embodiment of the present invention;

[0097] Figure 5 1 is a schematic diagram of a calculation flow of the delivery time in one embodiment of the present invention;

[0098] Figure 6 is a schematic diagram of a process for replenishing the remaining required quantity of a standby unit in one embodiment of the present invention;

[0099] Figure 7 This is a flow chart of a method for allocating data in a multi-supply and multi-demand scenario according to an embodiment of the present invention;

[0100] Figure 8 This is a structural block diagram of a resource allocation device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0101] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the description of the embodiments of the present invention, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In the present invention, "at least one" refers to one or more, and "more than one" refers to two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or multiple items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0102] As the global supply chain becomes increasingly complex and volatile, traditional resource allocation methods are often unable to cope with real-time fluctuations in resource demand and transportation time constraints. During the execution of dynamic tasks, the reserve resources of supply units will continue to fluctuate with changes in demand. In addition, changes in various factors during the transportation process may cause fluctuations in transportation time, which has a significant impact on the timeliness of the supply chain. Traditional resource scheduling methods do not effectively integrate and optimize these dynamic factors, resulting in resource margin estimation deviations in the generated scheduling plan, or due to conflicts in transportation time, the final allocation plan cannot be actually implemented. In order to solve this problem, the present invention proposes a comprehensive resource allocation method based on dynamic inventory guarantee, transportation time and spatial grid subdivision. The present invention aims to meet the needs of the supply chain more efficiently and accurately while taking into account transportation time, external factors and emergency reserves. Figure 1 This is a schematic diagram of the overall concept of a resource allocation method provided by an embodiment of the present invention. First, by dividing the geographical space into multiple grid boxes, the relative positions of the supply units and the demand units are determined. In combination with the relationship between the resource output tasks and the resource input tasks, the resource availability analysis is performed. Furthermore, on the basis of the resource input and output tasks, the resource requirements of the supply units and the demand units are matched with the available resources. Furthermore, based on the allocation strategy, the amount of available resources for the nodes in each period is dynamically calculated, and in combination with factors such as transportation timeliness and minimum resource reserves, the allocation algorithm is used to generate resource allocation tasks. Finally, a task set including multiple resource allocation tasks is generated to instruct at least one supply unit to perform the corresponding resource allocation task to ensure the timely delivery of resources.

[0103] Figure 2 FIG. 1 is a schematic diagram of the steps of a resource allocation method provided by an embodiment of the present invention. Figure 2 As shown, the method includes:

[0104] Step S101 : determining the demand quantity of a demand unit and determining the quantity of resources that a supply unit can provide on the latest departure date.

[0105] In this embodiment, there is at least one supply unit and at least one demand unit. The supply unit is a unit that provides material resources (such as masks) to the demand unit, such as a mask factory, and the demand unit is a unit that receives material resources from the supply unit, such as a hospital.

[0106] The demand quantity is the amount of resources required by the requesting organization. For example, a hospital may require a specific number of masks (the demand quantity) by a specific date (the demand). The latest departure date is the date the supply organization begins delivering resources to the requesting organization after the resources have been successfully shipped out of the warehouse.

[0107] In an optional implementation, step S101 specifically includes steps S1011 to S1016:

[0108] Step S1011: Determine the demand quantity and demand date of the demand unit.

[0109] By traversing a set of demand units that includes at least one demand unit, the required quantity and demand date of each demand unit are determined. The required quantity and corresponding demand date can be determined by referring to the demand unit's pre-set orders. Alternatively, IoT devices can monitor the inventory of the demand unit and automatically trigger a replenishment request containing the corresponding required quantity, while also calculating a future demand date.

[0110] Step S1012: determining a first total input quantity of resource input tasks completed by the supply unit before the required date, and determining a first total output quantity of resource output tasks completed and being executed by the supply unit before the required date.

[0111] For all resource input tasks of the supply unit, check the execution status of each resource input task one by one to determine the completion status of the task. During this process, compare the specified start date and completion date of each resource input task, and filter out the resource input tasks that the supply unit has completed before the required date. The first total input quantity is the total amount of resources that the supply unit has completed and successfully input before the required date. Similarly, for all resource output tasks of the supply unit, analyze the execution status of each resource output task, and filter out the resource output tasks that the supply unit has completed and is being executed before the required date, among which the resource output tasks being executed are tasks with a start date before the required date and a completion date after the required date. The first total output quantity is the total amount of all resource output tasks that the supply unit has completed and is being executed before the required date, including material resources that have been successfully delivered and material resources that are still being executed.

[0112] First, filter the resource input task set and the resource output task set, check the execution status of these tasks, filter out the resource input tasks that have been completed before the required date, and, from the resource output task set, filter out the resource output tasks that have been completed before the required date and the resource output tasks that are being executed.

[0113] For example, assume that Hospital A is the demanding entity, with a demand date of March 10th. The mask factory is the supplier. The mask factory's resource input tasks include: Resource Input Task A, completed on March 3rd (i.e., with a latest completion date of March 3rd), inputting 1,000 masks; Resource Input Task B, completed on March 5th, inputting 500 masks; Resource Input Task C, completed on March 9th, inputting 700 masks. The output tasks include: Resource Output Task D, starting on March 1st, completing on March 6th, outputting 400 masks; Resource Output Task E, starting on March 4th, completing on March 12th, outputting 600 masks; Resource Output Task F, starting on March 7th, completing on March 11th, outputting 600 masks; and Resource Output Task G, starting on March 12th, completing on March 14th, outputting 200 masks.

[0114] Examine the mask factory's resource input task set and analyze the execution status of each resource input task one by one. By comparing the latest completion date of each resource input task with the required date (March 10), it can be determined that resource input tasks A, B, and C were all completed before the required date. Therefore, they are included in the calculation of the first total input quantity. The first total input quantity is 1000 + 500 + 700 = 2200 masks.

[0115] Next, the mask factory's resource output task set is filtered. Resource output task D was completed before the required date and is therefore included in the calculation of the first total output quantity. Resource output task E's start date is before the required date and its completion date is after the required date, so it is also included in the calculation of the first total output quantity. Resource output task F's start date is before the required date and its completion date is after the required date, so it is also included in the calculation of the first total output quantity. Resource output task G's start date and completion date are both after the required date and are therefore not included in the calculation of the first total output quantity. Therefore, the filtered resource output tasks are D, E, and F, and the first total output quantity is 400 + 600 + 600 = 1600 masks.

[0116] Step S1013 , determining the initial inventory resource quantity of the supply unit, and calculating the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity.

[0117] The initial inventory resource quantity refers to the quantity of resource reserves initially possessed by the supply unit, which is equivalent to the initial value of the resource quantity in the material warehouse.

[0118] Figure 3 FIG. 1 is a flow chart showing the calculation process of the quantity of resources that can be provided by a supply unit on a demand date in one embodiment of the present invention. Figure 3 As shown, the first total input quantity is used as the input of the initial inventory resource quantity, and the first total output quantity is used as the output of the initial inventory resource quantity. The resource holding quantity of the supply unit on the demand date is calculated according to the following formula :

[0119]

[0120] Where, is the initial inventory resource quantity, For the The output of each resource output task, For the The output of a resource input task.

[0121] The resource holdings on the demand date represent the supplier's inventory on that date, specifically the actual quantity of resources held in the warehouse. The resource holdings on the demand date serve as a criterion for further estimating the available resource quantities on that date.

[0122] In an optional embodiment, step S1013 specifically includes: subtracting the first total output quantity from the initial inventory resource quantity and adding the first total input quantity to obtain the resource holdings of the supply unit on the demand date; determining the minimum resource reserve quantity of the supply unit, and subtracting the minimum resource reserve quantity from the resource holdings on the demand date to obtain the quantity of resources that the supply unit can provide on the demand date.

[0123] According to the formula The resource holdings on the requested date are calculated. The supplier's available resource quantities are further adjusted by considering the minimum resource reserve. This minimum resource reserve is the amount of resource that the supplier must maintain to ensure normal operations. This minimum resource reserve can be set by company or supply chain management policies and requirements. For example, a mask manufacturer may need to maintain a certain number of masks as an emergency reserve to cope with emergencies or other unforeseen needs.

[0124] like Figure 3 As shown, the resource holdings on the demand date Subtract the minimum resource reserves , we can get the amount of resources that the supply unit can provide on the demand date, which represents the amount of resources that the supply unit can allocate to the demand unit under the premise of meeting the minimum reserve. The calculation formula is as follows:

[0125]

[0126] Step S1014, when the available resource quantity on the demand date is greater than zero, the latest departure date is calculated according to the demand date and the transportation time from the supply unit to the demand unit, and the latest departure date is earlier than the demand date.

[0127] This step aims to ensure that the supplier delivers resources to the requesting party on time, while meeting the requested date and taking into account the transportation time. First, the supplier's available resource quantity on the requested date is checked. If the available resource quantity on the requested date is less than or equal to zero, the supplier does not have sufficient resources to meet the requesting party's resource needs on the requested date. Therefore, in this case, the resource allocation process cannot continue, and subsequent steps will not be executed. An error message can be reported to the client.

[0128] If the quantity of available resources on the demand date is greater than zero, it means that the supply unit has sufficient resources and is able to provide material resources to the demand unit on the demand date.

[0129] Figure 4 FIG. 1 is a flow chart showing the calculation process of the latest departure date in one embodiment of the present invention. Figure 4 As shown, the next step is to determine the transportation time between the supply unit and the demand unit to determine the latest departure time. Subtract the transportation time from the demand date to obtain the supply unit's latest departure date. In other words, the supply unit must depart on or before the latest departure date to ensure that the resources reach the demand unit on time before the demand date.

[0130] The transport time can be calculated in a variety of ways, such as based on factors such as geographical distance, traffic conditions, mode of transport, etc. In this embodiment, the transport time can be estimated using a pre-set transport model or historical data, or by quickly calculating the transport time using a method of segmenting the net box.

[0131] In an optional embodiment, the transport time is determined according to the following steps:

[0132] According to the geographical locations of the supply unit and the demand unit, the geographical space is divided into a plurality of network boxes by splitting the network boxes.

[0133] To effectively allocate resources and optimize transportation routes, the geographic space is divided into boxes based on the geographic locations of supply and demand units. The entire geographic area is divided into multiple small grid cells, resulting in grid information consisting of multiple boxes. Each box represents a specific geographic area and contains a certain amount of resource and transportation route information. The grid division method can be implemented using a predetermined grid resolution. For example, the size of each grid cell is determined based on the size of the geographic area, the complexity of transportation patterns, and the distance between supply and demand units.

[0134] A source network box where the supply unit is located and a target network box where the demand unit is located are determined, and a time cost from the source network box to the target network box is obtained.

[0135] See Figure 4Based on the geographic locations of the supply and demand units, identify the grid boxes in which they are located. The grid box where the supply unit is located is the source grid box, and the grid box where the demand unit is located is the destination grid box. Based on the previously obtained grid information, determine the corresponding grid locations of the supply and demand units in two-dimensional space. Then, calculate the time cost from the source grid box to the destination grid box. Time cost is used to measure the time required for the transportation process and can be calculated based on factors such as traffic flow, transportation method (such as truck, rail, aviation, etc.), road conditions, and weather.

[0136] The shortest transport path from the source network box to the target network box is determined by a path optimization algorithm.

[0137] The shortest transport path from the source network box to the target network box is determined using a path optimization algorithm. A path optimization algorithm is a mathematical method for finding the optimal path from a starting point to a destination. In an embodiment of the present invention, a Dijkstra algorithm can be used to gradually expand from the source network box to the target network box using a shortest transport path tree to find the shortest transport path between the two.

[0138] The time costs between adjacent grids in the shortest transportation path are accumulated to obtain the transportation time from the supply unit to the demand unit.

[0139] Each adjacent grid segment in the shortest transport path is analyzed. By summing up the transport cost parameters (primarily the time cost) for each segment in the path, the total transport time from the supply unit to the demand unit is ultimately determined. Specifically, each adjacent grid segment in the shortest transport path is analyzed one by one. By summing up the transport cost parameters between all adjacent grid segments, the transport time from the supply unit to the demand unit can be quickly determined.

[0140] Step S1015: determining a second total input quantity of resource input tasks completed by the supply unit before the latest departure date, and determining a second total output quantity of resource output tasks completed and being executed by the supply unit before the latest departure date.

[0141] Subtract the transportation time from the demand date to obtain the supplier's latest departure date. It is understandable that the available resource quantity on the demand date only reflects the supplier's inventory status on the demand date, but the supplier's inventory on the latest departure date may differ from the inventory on the demand date (for example, new resource input / output tasks may be completed during transportation). If only relying on the available resource quantity on the demand date, the actual available resource quantity may be overestimated, resulting in insufficient inventory on the latest departure date. Therefore, this embodiment recalculates the available resource quantity of the supplier on the latest departure date, which is equivalent to taking into account both the dynamic changes in inventory and the factors affecting timeliness due to transportation time.

[0142] From the supply unit's resource input task set, check the execution status of each resource input task one by one. Filter out resource input tasks that have been completed before the latest departure date.

[0143] Assuming the transportation time from the supplier to the demander is calculated to be one day, using the previous example, the latest departure date is: demand date (March 10) - 1 day = March 9. Task A, with a completion date of March 3, is earlier than the latest departure date (March 9), so it is included in the screening. Task B, with a completion date of March 5, is earlier than the latest departure date (March 9), so it is also included in the screening. Task C, with a completion date of March 9, is exactly the latest departure date, so it is also included in the screening.

[0144] Similarly, from the resource output task set, filter out the resource output tasks that have been completed before the latest departure date and the resource output tasks that are being executed.

[0145] Task D, with a completion date of March 6, is before the latest departure date (March 9), and is therefore included in the screening. Task E, with a start date (March 4) before the latest departure date (March 9), and a completion date (March 12) after the latest departure date (March 9), is also included in the screening. Task F, with a start date (March 7) before the latest departure date (March 9), and a completion date (March 11) after the latest departure date (March 9), is also included in the screening. Task G, with both a start date (March 12) and a completion date (March 14) after March 9, is not included in the screening.

[0146] The second total input quantity is the total amount of resources that the supplier has successfully received before the latest departure date. The second total output quantity is the total amount of resources that the supplier has delivered or is in the process of delivering before the latest departure date. In the above example, the second total input quantity = the input quantities of Task A + Task B + Task C; the second total output quantity = the output quantities of Task D + Task E + Task F.

[0147] Step S1016: Calculate the quantity of resources that can be provided by the supply unit on the demand date based on the initial inventory resource quantity, the second total input quantity, and the second total output quantity.

[0148] Based on the latest departure date, the supply unit's available resource quantity at the latest departure date is recalculated. Specifically, the supply unit's available resource quantity at the latest departure date is calculated by adding the second total input quantity to the initial inventory resource quantity and then subtracting the second total output quantity.

[0149] Assume that the initial inventory resource quantity of the supply unit (such as the mask factory) is 3000 masks, the second total input quantity is 2200 masks (calculated in step S1015), and the second total output quantity is 1600 masks (calculated in step S1015). In this case, the latest departure date The amount of resources available at the time 3000 - 1600 + 2200 = 3600 masks.

[0150] Step S102 : updating the quantity of resources available on the latest departure date according to the relationship between the demand quantity and the quantity of resources available on the latest departure date.

[0151] When the demand quantity is less than or equal to the available resource quantity for the latest departure date, it indicates that the supply unit is able to meet the demand. The supply unit will allocate resources based on the demand quantity and update the available resource quantity. When the demand quantity is greater than the available resource quantity for the latest departure date, it indicates that the supply unit cannot meet the demand. The supply unit can only provide existing resources, and the available resource quantity will not be updated. In an optional embodiment, step S102 specifically includes steps S1021 and S1022:

[0152] Step S1021 : comparing the required quantity with the available resource quantity on the latest departure date.

[0153] Step S1022: When the demand quantity is less than or equal to the available resource quantity for the latest departure date, the demand quantity is updated to the available resource quantity for the latest departure date.

[0154] If the demand quantity is less than or equal to the available resource quantity on the latest departure date, this indicates that the supply unit can meet the demand unit's needs on the latest departure date. In other words, the target unit has sufficient supply capacity on the latest departure date. Therefore, the supply unit will depart on the latest departure date and deploy resources based on the resource demand quantity. In this case, the demand quantity is the resource demand quantity of the demand unit; that is, the available resource quantity on the latest departure date is updated based on the demand quantity.

[0155] Conversely, if the demand quantity is greater than the available resource quantity at the latest departure date, this indicates that the supplier cannot meet the demand of the demanding unit on the latest departure date. In other words, the target unit's supply capacity at the latest departure date is insufficient, and the supplier can only provide its existing resource quantity. In this case, the supplier's available resource quantity remains unchanged, meaning that the available resource quantity at the latest departure date does not need to be updated.

[0156] Step S103, determining the latest start date of the supply unit and the quantity of resources that the supply unit can provide on the latest start date, wherein the latest start date is earlier than the latest departure date and is determined based on the outbound delivery capacity of the supply unit.

[0157] The present invention considers the delivery time as one of the key factors affecting the timeliness of resource allocation tasks. By calculating the delivery capacity of the supply unit, the resource allocation time is effectively planned, thereby ensuring that the supply unit can deliver the resources to the demand unit in a timely manner. In an optional embodiment, step S103 specifically includes steps S1031 to S1034:

[0158] Step S1031 , calculating the delivery time required by the supply unit according to the daily throughput coefficient of the supply unit, wherein the daily throughput coefficient represents the maximum number of resources that the supply unit can handle for delivery per day.

[0159] The daily throughput coefficient represents the supply unit's outbound delivery capacity, specifically the maximum number of resources that the supply unit can handle outbound delivery per day. Figure 5 FIG. 1 is a flow chart showing the calculation process of the delivery time in one embodiment of the present invention. Figure 5 As shown, the daily throughput coefficient of the supply unit is combined with the available resource quantity on the latest departure date to calculate the delivery time according to the following formula :

[0160] (Equation 2.1)

[0161] Where, The quantity of resources available for the latest departure date. is the daily throughput capacity coefficient of the supply unit.

[0162] Step S1032: Subtract the outbound time from the latest departure date to obtain the latest start date.

[0163] To ensure that resources can be shipped on time and meet the resource requirements of the demand unit on the demand date, the latest departure date Subtract the calculated outbound time , calculate the latest start date of the target scheduling task , which is the latest time when resources start to be scheduled, so as to complete the outbound and transportation tasks within the specified time.

[0164] For example, the latest departure date The delivery time is March 9th The calculated date is 2 days, so the latest start date of the target scheduling task is The date is confirmed to be March 7th.

[0165] Step S1033: determining the third total input quantity of the resource input tasks completed by the supply unit before the latest start date, and determining the third total output quantity of the resource output tasks completed and being executed by the supply unit before the latest start date.

[0166] This embodiment will recalculate the quantity of resources that the supply unit can provide on the latest start date, which is equivalent to taking into account the dynamic changes in inventory and the factors affecting the timeliness due to transportation time and delivery time.

[0167] From the supply unit's resource input task set, check the execution status of each resource input task one by one. Filter out resource input tasks that have been completed before the latest start date. Also, from the resource output task set, filter out resource output tasks that have been completed before the latest start date and those that are currently being executed.

[0168] The third total input quantity is the total amount of resources that the supply unit has successfully received before the latest start date. The third total output quantity is the total amount of resources that the supply unit has delivered or is in the process of delivering before the latest start date. The specific calculation method is similar to step S1015 and will not be repeated here.

[0169] Step S1034 : Calculate the quantity of resources that can be provided by the supply unit on the latest start date based on the initial inventory resource quantity, the third total input quantity, and the third total output quantity.

[0170] Recalculate the available resource quantity of the supply unit at the latest start date based on the latest start date , to determine whether the supply unit's resources are sufficient to support subsequent scheduling tasks on the latest start date. Specifically, by adding the third total input quantity to the initial inventory resource quantity and then subtracting the third total output quantity, the supply unit's available resource quantity on the latest start date is obtained.

[0171] Step S104 : The smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date is used as the task output quantity of the supply unit.

[0172] When the quantity of available resources on the latest departure date is greater than the quantity of available resources on the latest start date, if the quantity of available resources on the latest departure date is used as the task output quantity, the required outbound time will be greater than the outbound time calculated in step S1031. In this case, the actual departure date will also exceed the expected latest departure date, resulting in the final supply unit being unable to obtain material supply on or before the required time. Therefore, the quantity of available resources on the latest start date (the smaller one) needs to be used as the task output quantity.

[0173] Conversely, if the available resource quantity on the latest departure date is less than the available resource quantity on the latest start date, this indicates that the available resource quantity decreased between the start and departure dates due to input delays (e.g., delayed raw material arrival) or accelerated output tasks (e.g., early completion of other orders). Consequently, the available resource quantity on the latest departure date will not be able to meet the promised output quantity of the resource allocation task. In other words, if the final output quantity of the resource allocation task is determined to be a larger value, and the available resource quantity on the final transportation day is less than that value, resulting in a post-commitment breach, the available resource quantity on the latest start date (the smaller one) will be used as the output quantity.

[0174] Step S105 : When the task output quantity is equal to the required quantity, a corresponding resource allocation task is generated, where the resource allocation task includes the latest start date and the task output quantity.

[0175] If the task outputs the number The quantity of resource required is equal to the demand unit ( ), indicating that the supplier has sufficient resources to complete the resource allocation task. A corresponding resource allocation task is generated, including the latest start date and task output quantity. The latest start date is also the execution date of the resource allocation task. The resource allocation task indicates when the supplier should start the task and how much resources to ship out.

[0176] Add each generated resource allocation task to the supply unit's task collection for subsequent execution. The task collection is a collection of all resource allocation tasks that the supply unit needs to execute. For example:

[0177] Task 1: Provide 2,500 masks to Hospital A, with a starting date of March 9 at the latest.

[0178] Task 2: Provide 1,500 masks to Hospital B, with a starting date of March 12 at the latest.

[0179] Task 3: Provide 1,000 masks to Supermarket X, with a starting date of March 15th at the latest.

[0180] Finally, the supply unit organizes and arranges the allocation and transportation of resources based on the generated task set.

[0181] In an optional embodiment, the method further includes:

[0182] Step S201: When the task output quantity is less than the required quantity, the difference between the required quantity and the task output quantity is used as the remaining required quantity.

[0183] Figure 6 FIG. 1 is a flow chart of replenishing the remaining required quantity of the standby unit in one embodiment of the present invention. Figure 6 As shown in the figure, if the supply unit's available resource quantity on the latest departure date does not meet (is less than) the resource demand quantity, it means that the supply unit cannot fully cover the resource request of the demand unit on the latest departure date. Subtract the available resource quantity on the latest departure date from the resource demand quantity to get the remaining demand quantity. , represents the amount of resources required by the demand unit. Assume that the demand unit needs 1,000 masks, and the supply unit can provide 600 masks on the latest departure date. At this time, the remaining demand quantity is =1000 - 600 = 400 masks. The remaining quantity will be used to find suitable backup units for resource allocation in subsequent steps.

[0184] In an optional implementation, before step S202, the method further includes:

[0185] According to the geographical locations of the standby units and the demand units, the geographical space is divided into a plurality of network boxes by dividing the network boxes.

[0186] The source network box where each standby unit is located and the target network box where the demand unit is located are determined, and the time cost, expense cost and manpower cost from the source network box where each standby unit is located to the target network box are obtained.

[0187] Identify the geographic location of each backup unit and determine its source network box. Also, determine the target network box for the demand unit. Collect information on the time cost (transport time), expense cost (direct transportation costs, including fuel, labor, and tolls), and labor cost (transport-related human resource costs, including driver wages and loader fees) from each backup unit's source network box to the demand unit's target network box.

[0188] The time cost, expense cost and labor cost are integrated according to the preset weights to obtain the transportation cost of each spare unit to the demand unit.

[0189] The collected costs are processed. Specifically, they are combined according to preset weights. These weights can be adjusted based on the company's specific needs and strategies to reflect the importance of different cost factors. For example, time costs may be more important than expense costs in some cases and therefore may be given a higher weight. The time, expense, and labor costs of each backup unit are combined using a weighted average to determine the transportation cost of each backup unit. This is used to select the backup units in step S202.

[0190] Step S202 : determining at least one spare unit from other supply units except the supply unit in descending order of transportation cost, wherein the spare unit is used to provide the remaining required quantity.

[0191] From other supply units other than the supply unit, the backup unit with the lowest transportation cost is selected, and the most cost-effective (i.e., the optimal backup unit with the lowest transportation cost) is selected as the first backup unit during the resource allocation process to optimize the transportation and allocation efficiency of resources. In an optional embodiment, step S202 specifically includes steps S2021 to S2024:

[0192] Step S2021: Determine a first backup unit with the lowest transportation cost from other supply units except the supply unit.

[0193] See Figure 6 , traverse the supply unit set including each supply unit, and select the optimal backup unit with the lowest transportation cost from other supply units except the supply unit as the first backup unit to supply the remaining demand quantity.

[0194] Step S2022: Taking the first backup unit as a supply unit, determining the task output quantity of the first backup unit.

[0195] The first backup unit is used as the supply unit, and the task output quantity of the first backup unit is determined according to the sequence of steps S101 to S105 .

[0196] Step S2023: When the task output quantity of the first backup unit is less than the remaining required quantity, a second backup unit with the second lowest transportation cost is determined from other supply units except the supply unit.

[0197] Check the first backup unit's task output quantity to determine whether it meets the remaining demand quantity. Specifically, check whether the first backup unit has fully supplied the required quantity. If the first backup unit's task output quantity is less than the remaining demand quantity, update the remaining demand quantity as the new demand quantity, and continue to select the second-best backup unit with the second lowest transportation cost as the second backup unit.

[0198] The second backup unit is used as a supply unit, and the task output quantity of the second backup unit is determined.

[0199] Similar to step S2022 , the second backup unit is used as the supply unit, and the task output quantity of the second backup unit is determined according to the sequence of steps S101 to S105 .

[0200] Step S2024, repeat the above steps until the remaining required quantity is zero.

[0201] Based on the judgment result, the remaining demand quantity is updated accordingly, and the above steps of continuously searching for the next backup unit as the supplier are repeated until the remaining demand quantity is zero (that is, the task output quantity of the selected backup unit is equal to the demand quantity).

[0202] The present invention gradually updates the available resources of each period node, dynamically plans the allocation amount while maintaining its own reserve margin, and avoids the shortcomings of traditional methods that rely solely on static inventory data for resource matching. In addition, the present invention dynamically determines each period node based on the time factor, ensuring that the influence of different external factors is taken into account during the actual transportation process, avoiding resource allocation failures caused by transportation time issues. By calculating the latest departure date and the latest start date, the execution time of the task and the release date of the resource are planned in advance, ensuring the timely delivery of resources, and thus ensuring the efficient operation of the supply chain. The present invention can not only improve the response speed of the supply chain, but also generate executable resource allocation plans in complex resource scheduling scenarios while ensuring its own emergency response capabilities.

[0203] It is understood that the method described in this invention supports complex deployment scenarios involving multiple supply units and multiple demand units. Although the embodiment uses the interaction between a single supply unit and a single demand unit as an example, its core logic—including dynamic inventory calculation, transportation time determination, grid-based route optimization, and a backup unit rotation mechanism—is scalable to many-to-many scenarios. Figure 7 FIG. 1 is a flow chart of a method for allocating data in a multi-supply and multi-demand scenario according to an embodiment of the present invention. Figure 7 As shown, after traversing the input demand unit set, the optimal supply unit is determined (which can be screened according to the method of step S2021). For each supply unit, the demand date, latest departure date and latest start date for each supply unit in the supply unit set are gradually determined. Figure 7 The process shown in the figure gradually determines the available resources for each date, and then determines the output quantity of tasks for each demand unit from the supply unit. Figure 7 The multiple judgment logics involved respectively represent whether resources are available in each period, which directly reflects the emergency level and supply capacity of the supply unit's own reserve resources. Optionally, this embodiment can choose to directly stop generating the supply unit's scheduling tasks when the number of available resources is less than 0 (such as Figure 7), and then traverses the supply unit set and selects backup units for resource supply. This shows that embodiments of the present invention can effectively address real-time resource demand fluctuations and transportation time constraints in complex deployment scenarios with multiple supply units and multiple demand units, and quickly select the optimal supply unit, enabling timely resource delivery in these deployment scenarios, thereby enhancing supply chain resilience.

[0204] Figure 8 This is a structural block diagram of a resource allocation device provided by an embodiment of the present invention. Figure 8 As shown, the device includes:

[0205] The first determining module 301 is used to determine the demand quantity of the demand unit and the quantity of resources that the supply unit can provide on the latest departure date;

[0206] An updating module 302 is configured to update the quantity of resources available on the latest departure date according to a relationship between the required quantity and the quantity of resources available on the latest departure date;

[0207] A second determining module 303 is configured to determine a latest start date of the supply unit and the quantity of resources that the supply unit can provide on the latest start date, wherein the latest start date is earlier than the latest departure date and the latest start date is determined based on the outbound delivery capacity of the supply unit;

[0208] A comparison module 304 is configured to use the smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date as the task output quantity of the supply unit;

[0209] The generating module 305 is configured to generate a corresponding resource allocation task when the task output quantity is equal to the required quantity, wherein the resource allocation task includes the latest start date and the task output quantity.

[0210] In an optional embodiment, the device further includes:

[0211] a remaining demand determining module, configured to, when the task output quantity is less than the required quantity, use the difference between the required quantity and the task output quantity as the remaining required quantity;

[0212] The third determining module is configured to determine at least one spare unit from other supply units except the supply unit in order of transportation cost from low to high, wherein the spare unit is used to provide the remaining required quantity.

[0213] In an optional implementation, the third determining module includes:

[0214] A first determining submodule is configured to determine a first backup unit having the lowest transportation cost from other supply units except the supply unit;

[0215] a second determining submodule, configured to use the first backup unit as a supply unit and determine a task output quantity of the first backup unit;

[0216] a third determining submodule, configured to determine, when the task output quantity of the first backup unit is less than the remaining required quantity, a second backup unit having the second lowest transportation cost from other supply units other than the supply unit;

[0217] a fourth determining submodule, configured to use the second backup unit as a supply unit and determine a task output quantity of the second backup unit;

[0218] The loop submodule is used to repeat the above steps until the remaining required quantity is zero.

[0219] In an optional embodiment, the device further includes:

[0220] A first subdividing network box module is used to divide the geographical space into a plurality of network boxes by subdividing network boxes according to the geographical locations of the backup units and the demand units;

[0221] A fourth determining module is used to determine the source network box where each backup unit is located and the target network box where the demand unit is located, and obtain the time cost, expense cost and labor cost from the source network box where each backup unit is located to the target network box;

[0222] The weighted fusion module is used to fuse the time cost, expense cost and labor cost according to the preset weights to obtain the transportation cost of each backup unit to the demand unit.

[0223] In an optional implementation, the first determining module includes:

[0224] A fifth determining submodule is used to determine the demand quantity and demand date of the demand unit;

[0225] a sixth determining submodule, configured to determine a first total input quantity of resource input tasks completed by the supply unit before the demand date, and to determine a first total output quantity of resource output tasks completed and being executed by the supply unit before the demand date;

[0226] a first calculation submodule, configured to determine the initial inventory resource quantity of the supply unit, and calculate the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity;

[0227] a calculation submodule, configured to calculate the latest departure date based on the demand date and the transportation time from the supply unit to the demand unit, if the quantity of available resources on the demand date is greater than zero, and the latest departure date is earlier than the demand date;

[0228] a seventh determining submodule, configured to determine a second total input quantity of resource input tasks completed by the supply unit before the latest departure date, and to determine a second total output quantity of resource output tasks completed and being executed by the supply unit before the latest departure date;

[0229] The second calculation submodule is configured to calculate the quantity of resources that can be provided by the supply unit on the demand date according to the initial inventory resource quantity, the second total input quantity, and the second total output quantity.

[0230] In an optional implementation, the first calculation submodule includes:

[0231] a first calculation unit, configured to obtain the resource holding quantity of the supply unit on the demand date by subtracting the first total output quantity from the initial inventory resource quantity and adding the first total input quantity;

[0232] The second calculation unit is used to determine the minimum resource reserve of the supply unit, and subtract the minimum resource reserve from the resource holding amount on the demand date to obtain the quantity of resources that the supply unit can provide on the demand date.

[0233] In an optional embodiment, the device further includes:

[0234] A second subdividing network box module is used to divide the geographical space into a plurality of network boxes by subdividing network boxes according to the geographical locations of the supply unit and the demand unit;

[0235] a fifth determining module, configured to determine a source network box where the supply unit is located and a target network box where the demand unit is located, and obtain a time cost from the source network box to the target network box;

[0236] A path determination module, configured to determine the shortest transport path from the source network box to the target network box by using a path optimization algorithm;

[0237] The cost calculation module is used to accumulate the time costs between adjacent grids in the shortest transportation path to obtain the transportation time from the supply unit to the demand unit.

[0238] In an optional implementation, the second determining module includes:

[0239] A third calculation submodule is configured to calculate the delivery time required by the supply unit according to the daily throughput capacity coefficient of the supply unit, wherein the daily throughput capacity coefficient represents the maximum number of resources that the supply unit can handle for delivery per day;

[0240] A fourth calculation submodule is configured to subtract the outbound time from the latest departure date to obtain the latest start date;

[0241] an eighth determining submodule, configured to determine a third total input quantity of resource input tasks completed by the supply unit before the latest start date, and to determine a third total output quantity of resource output tasks completed and being executed by the supply unit before the latest start date;

[0242] The fifth calculation submodule is configured to calculate the quantity of resources that can be provided by the supply unit on the latest start date based on the initial inventory resource quantity, the third total input quantity, and the third total output quantity.

[0243] In an optional implementation, the update module includes:

[0244] a comparison submodule, configured to compare the required quantity with the available resource quantity for the latest departure date;

[0245] The updating submodule is configured to update the demand quantity to the available resource quantity for the latest departure date when the demand quantity is less than or equal to the available resource quantity for the latest departure date.

[0246] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, electronic devices, and storage media. Accordingly, embodiments of the present invention may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0247] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods and apparatus according to the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as the combination of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

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

[0249] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used solely to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Furthermore, the term "comprising" or any other variant thereof is intended to encompass non-exclusive inclusion, such that a process, method, article, or terminal device comprising a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. Without further limitation, elements defined by the phrase "comprising..." do not preclude the presence of additional identical elements in the process, method, article, or terminal device comprising the recited elements. The above detailed description of the resource allocation method and apparatus provided by the present invention has been used. Specific examples have been used herein to illustrate the principles and implementations of the present invention. The description of the above embodiments is intended only to facilitate understanding of the method and its core concepts. Furthermore, those skilled in the art will appreciate that variations in the specific implementation and scope of application are possible based on the principles of the present invention. In summary, the contents of this specification should not be construed as limiting the present invention.

Claims

1. A resource allocation method, characterized in that: The method comprises: Determine the required quantity of the demand unit and the available resource quantity of the supply unit at the latest departure date; Based on the relationship between the demand quantity and the available resource quantity for the latest departure date, the available resource quantity for the latest departure date is updated. If the available resource quantity is less than 0, the generation of scheduling tasks for the supply unit is stopped. The supply unit set is traversed, and the optimal backup unit with the lowest transportation cost is selected from the supply units other than the supply unit as the first backup unit to supply the remaining demand quantity. The transportation cost is obtained by weighted fusion of time cost, expense cost, and labor cost determined by the split-box algorithm. Determining a latest start date for the supply unit and determining the quantity of resources that can be provided by the supply unit on the latest start date, wherein the latest start date is earlier than the latest departure date and the latest start date is determined based on the outbound delivery capacity of the supply unit; The smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date is used as the task output quantity of the supply unit; When the task output quantity is equal to the required quantity, generating a corresponding resource allocation task, the resource allocation task including the latest start date and the task output quantity; Updating the available resource quantity on the latest departure date according to the relationship between the required quantity and the available resource quantity on the latest departure date includes: comparing the required quantity with the available resource quantity on the latest departure date; When the demand quantity is less than or equal to the available resource quantity on the latest departure date, the demand quantity is updated to the available resource quantity on the latest departure date.

2. The method according to claim 1, characterized in that The method further comprises: In the case that the task output quantity is less than the required quantity, the difference between the required quantity and the task output quantity is used as the remaining required quantity; At least one spare unit is determined in sequence from other supply units except the supply unit in descending order of transportation cost, and the spare unit is used to provide the remaining required quantity.

3. The method according to claim 2, characterized in that The step of determining at least one backup unit from other supply units except the supply unit in descending order of transportation cost includes: Determining a first backup unit with the lowest transportation cost from other supply units except the supply unit; Taking the first backup unit as a supply unit, determining the task output quantity of the first backup unit; When the task output quantity of the first backup unit is less than the remaining demand quantity, determining a second backup unit with the second lowest transportation cost from other supply units except the supply unit; Taking the second backup unit as the supply unit, determining the task output quantity of the second backup unit; Repeat the above steps until the remaining required quantity is zero.

4. The method according to claim 2, characterized in that Before determining at least one backup unit from other supply units except the supply unit in descending order of transportation cost, the method further includes: According to the geographical locations of the backup units and the demand units, the geographical space is divided into a plurality of boxes by dividing the boxes; Determine the source network box where each backup unit is located and the target network box where the demand unit is located, and obtain the time cost, expense cost and labor cost from the source network box where each backup unit is located to the target network box; The time cost, expense cost and labor cost are integrated according to the preset weights to obtain the transportation cost of each spare unit to the demand unit.

5. The method according to claim 1, wherein The step of determining the demand quantity of the demand unit and determining the quantity of resources that can be provided by the supply unit on the latest departure date includes: Determine the required quantity and required date of the required unit; Determine a first total input quantity of resource input tasks completed by the supply unit before the demand date, and determine a first total output quantity of resource output tasks completed and being executed by the supply unit before the demand date; Determining the initial inventory resource quantity of the supply unit, and calculating the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity; When the available resource quantity on the demand date is greater than zero, the latest departure date is calculated based on the demand date and the transportation time from the supply unit to the demand unit, and the latest departure date is earlier than the demand date; Determine a second total input quantity of resource input tasks completed by the supply unit before the latest departure date, and determine a second total output quantity of resource output tasks completed and being executed by the supply unit before the latest departure date; The quantity of resources that can be provided by the supply unit on the demand date is calculated based on the initial inventory resource quantity, the second total input quantity and the second total output quantity.

6. The method according to claim 5, characterized in that The determining of the initial inventory resource quantity of the supply unit and calculating the resource quantity that the supply unit can provide on the demand date based on the initial inventory resource quantity, the first total input quantity, and the first total output quantity includes: Subtract the first total output quantity from the initial inventory resource quantity and add the first total input quantity to obtain the resource holding quantity of the supply unit on the demand date; The minimum resource reserve of the supply unit is determined, and the resource holding amount on the demand date is subtracted from the minimum resource reserve to obtain the quantity of resources that the supply unit can provide on the demand date.

7. The method according to claim 5, characterized in that Before calculating the latest departure date based on the transportation time from the supply unit to the demand unit, the method further includes: According to the geographical locations of the supply unit and the demand unit, the geographical space is divided into a plurality of boxes by dividing the boxes; Determine a source network box where the supply unit is located and a target network box where the demand unit is located, and obtain a time cost from the source network box to the target network box; Determine the shortest transport path from the source network box to the target network box by using a path optimization algorithm; The time costs between adjacent grids in the shortest transportation path are accumulated to obtain the transportation time from the supply unit to the demand unit.

8. The method according to claim 1, characterized in that The determining of the latest start date of the supply unit and the quantity of resources that can be provided by the supply unit on the latest start date include: Calculating the delivery time required by the supply unit based on the daily throughput capacity coefficient of the supply unit, wherein the daily throughput capacity coefficient represents the maximum number of resources that the supply unit can handle for delivery per day; Subtract the outbound time from the latest departure date to obtain the latest start date; Determine a third total input quantity of resource input tasks completed by the supply unit before the latest start date, and determine a third total output quantity of resource output tasks completed and being executed by the supply unit before the latest start date; The resource quantity that can be provided by the supply unit on the latest start date is calculated based on the initial inventory resource quantity, the third total input quantity and the third total output quantity.

9. A resource allocation device, characterized in that: The device comprises: A first determination module is used to determine the demand quantity of the demand unit and the quantity of resources that the supply unit can provide on the latest departure date; An updating module is configured to update the quantity of available resources for the latest departure date based on the relationship between the demand quantity and the quantity of available resources for the latest departure date, stop generating scheduling tasks for the supply unit if the quantity of available resources is less than 0, and traverse the supply unit set to select the optimal backup unit with the lowest transportation cost from other supply units other than the supply unit as the first backup unit to supply the remaining demand quantity, wherein the transportation cost is a weighted fusion of time cost, expense cost, and labor cost determined based on the split-box algorithm; A second determining module is configured to determine a latest start date of the supply unit and the quantity of resources that the supply unit can provide on the latest start date, wherein the latest start date is earlier than the latest departure date and the latest start date is determined based on the outbound delivery capacity of the supply unit; a comparison module, configured to use the smaller of the available resource quantity on the latest departure date and the available resource quantity on the latest start date as the task output quantity of the supply unit; A generating module, configured to generate a corresponding resource allocation task when the task output quantity is equal to the required quantity, wherein the resource allocation task includes the latest start date and the task output quantity; The update module includes: a comparison submodule, configured to compare the required quantity with the available resource quantity for the latest departure date; The updating submodule is configured to update the demand quantity to the available resource quantity for the latest departure date when the demand quantity is less than or equal to the available resource quantity for the latest departure date.

Citation Information

Patent Citations

  • Method and device for formulating goods delivery plan, equipment, medium and program product

    CN114091995A

  • Flight refueling guarantee resource scheduling method and device

    CN116862131A