Method, device, equipment and storage medium for matching stores for delivery personnel

By using a multi-round pre-matching algorithm and the Hungarian KM algorithm, combined with a virtual store mechanism, the matching relationship between delivery personnel and stores is optimized, which solves the problem of unequal numbers of delivery personnel and stores, shortens the driving distance of delivery personnel, and improves the efficiency of food delivery.

CN115375188BActive Publication Date: 2026-11-27SHENGDOUSHI SHANGHAI SCI & TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211216966.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2026-11-27
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

Existing technology cannot effectively solve the problem of how to reasonably match the number of delivery personnel with the number of stores, resulting in excessively long travel distances for delivery personnel and affecting the efficiency of food delivery.

Method used

Multiple delivery personnel are initially matched with at least one store through a multi-round preset matching algorithm. Target delivery personnel whose relationships need to be optimized are selected and their relationships are optimized. The matching relationship between delivery personnel and stores is adjusted by using the Hungarian KM algorithm and virtual store mechanism.

Benefits of technology

This system effectively matches delivery personnel with stores, reducing the total distance they travel to their assigned stores and improving the efficiency of food delivery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115375188B_ABST
    Figure CN115375188B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and equipment for matching stores for delivery personnel, and a storage medium, and the method comprises the following steps: preliminarily matching a plurality of delivery personnel with at least one store to obtain a preliminary matching result, wherein the preliminary matching result comprises an association relationship between each delivery personnel and the preliminarily matched store; selecting a target delivery personnel with an association relationship to be optimized from the plurality of delivery personnel; and optimizing the association relationship corresponding to the target delivery personnel in the preliminary matching result to obtain a target matching result. The application can reasonably match stores for delivery personnel, can shorten the total driving distance required for the delivery personnel to drive to the respective matched stores, and can further shorten the driving time of the delivery personnel, thereby being beneficial to improving the take-out delivery efficiency of subsequent stores.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, equipment and storage medium for matching delivery personnel with stores. Background Technology

[0002] With the continuous development of internet technology and the accelerating pace of life, the food delivery industry has also experienced rapid growth. Delivery riders (i.e., delivery personnel) are a crucial link in this industry. In real-life scenarios, a commercial area typically has multiple delivery riders and multiple stores, thus requiring food delivery platforms to match riders with the stores they need to pick up. Therefore, how to match delivery riders with stores to shorten the total travel distance to their assigned stores, thereby reducing travel time and improving delivery efficiency, is one of the most pressing technical problems to be solved. Summary of the Invention

[0003] In view of this, the present invention proposes a method, apparatus, equipment and storage medium for matching delivery personnel with stores to solve the above-mentioned technical problems.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0005] According to a first aspect of the present invention, a method for matching delivery personnel with stores is provided, comprising:

[0006] Multiple delivery personnel are initially matched with at least one store to obtain preliminary matching results, which include the association between each delivery personnel and the initially matched store;

[0007] Select the target delivery personnel whose relationship needs to be optimized from the multiple delivery personnel;

[0008] The association relationships corresponding to the target delivery personnel in the preliminary matching results are optimized to obtain the target matching results.

[0009] In one embodiment, selecting the target delivery person whose relationship needs to be optimized from the plurality of delivery persons includes:

[0010] Determine the initial distance between each delivery person and the initially matched store;

[0011] Based on the first distance and the second distance, target delivery personnel with the relationship to be optimized are selected from the multiple delivery personnel. The second distance is the distance between each delivery personnel and the nearest store among the at least one stores.

[0012] In one embodiment, selecting the target delivery person with whom the association relationship needs to be optimized from the plurality of delivery persons based on the first distance and the second distance includes:

[0013] A probabilistic selection process is performed on the multiple delivery personnel.

[0014] The selected delivery person is designated as the target delivery person.

[0015] In one embodiment, optimizing the association relationship corresponding to the target delivery person in the preliminary matching result to obtain the target matching result includes:

[0016] Determine the first total distance traveled by the multiple delivery personnel to their respective currently matched stores;

[0017] After the target deliveryman and other deliverymen among the multiple deliverymen exchange their currently matched stores, the multiple deliverymen travel the second total distance to their respective exchanged stores, where the other deliverymen are different from the stores currently matched with the target deliveryman.

[0018] In response to determining that the second total driving distance is less than the first total driving distance, the association relationship corresponding to the target delivery person is optimized by swapping the stores currently matched with the other delivery persons.

[0019] In one embodiment, the total number of the plurality of delivery personnel is greater than the total number of the at least one store;

[0020] The process of initially matching multiple delivery personnel with at least one store to obtain preliminary matching results includes:

[0021] Multiple delivery personnel are initially matched with at least one store through a multi-round preset matching algorithm to obtain the preliminary matching result. The number of delivery personnel matched by the preset matching algorithm is equal to the number of stores.

[0022] In one embodiment, the preliminary matching of multiple delivery personnel with at least one store using a multi-round preset matching algorithm includes:

[0023] Before executing each round of the preset matching algorithm, in response to determining that the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round, a third number of virtual stores is determined so that the first total number of deliverymen to be matched in the current round is equal to the total number of target stores to be matched in the current round, wherein the total number of target stores is the sum of the second total number and the third number;

[0024] The preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round;

[0025] Remove the association between the virtual store and the deliveryman matched in the current round of virtual matching results, and determine the deliveryman after the association is removed as the deliveryman to be matched in the next round;

[0026] Repeat the matching process for each round until the initial matching of the multiple delivery personnel with the at least one store is completed.

[0027] In one embodiment, the method further includes:

[0028] In response to determining that the first total number of delivery personnel to be matched in the current round is equal to the second total number of real stores to be matched in the current round, the preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the real stores to be matched in the current round. According to a second aspect of the present invention, an apparatus for matching stores for delivery personnel is provided, comprising:

[0029] The preliminary matching module is used to perform preliminary matching between multiple deliverymen and at least one store to obtain preliminary matching results. The preliminary matching results include the association between each deliveryman and the preliminarily matched store.

[0030] The personnel selection module is used to select the target delivery personnel whose relationships need to be optimized from the multiple delivery personnel;

[0031] The result acquisition module is used to optimize the association relationship between the target delivery person and the target matching result in the preliminary matching result.

[0032] In one embodiment, the personnel selection module includes:

[0033] The distance determination unit is used to determine the initial distance between each delivery person and the initially matched store;

[0034] The personnel selection unit is used to select a target deliveryman whose relationship needs to be optimized from the multiple deliverymen based on the first distance and the second distance, wherein the second distance is the distance between each deliveryman and the nearest store among the at least one stores.

[0035] In one embodiment, the personnel selection unit is further configured to:

[0036] A probabilistic selection process is performed on the multiple delivery personnel.

[0037] The selected delivery person is designated as the target delivery person.

[0038] In one embodiment, the result acquisition module includes:

[0039] The first determining unit is used to determine the first total driving distance of the multiple deliverymen to their respective currently matched stores;

[0040] The second determining unit is used to determine the second total driving distance of the multiple deliverymen to their respective exchanged stores after the target deliveryman and other deliverymen among the multiple deliverymen have exchanged their currently matched stores, wherein the other deliverymen are different from the stores currently matched by the target deliveryman;

[0041] The relationship optimization unit is configured to optimize the association relationship corresponding to the target delivery person by exchanging the stores currently matched with the other delivery persons when it is determined that the second total driving distance is less than the first total driving distance.

[0042] In one embodiment, the total number of the plurality of delivery personnel is greater than the total number of the at least one store;

[0043] The preliminary matching module also includes:

[0044] The multi-round algorithm execution unit is used to perform preliminary matching between multiple deliverymen and at least one store through a multi-round preset matching algorithm to obtain the preliminary matching result. The number of deliverymen matched by the preset matching algorithm is equal to the number of stores.

[0045] In one embodiment, the multi-round algorithm execution unit is further configured to:

[0046] Before executing each round of the preset matching algorithm, in response to determining that the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round, a third number of virtual stores is determined so that the first total number of deliverymen to be matched in the current round is equal to the total number of target stores to be matched in the current round, wherein the total number of target stores is the sum of the second total number and the third number;

[0047] The preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round;

[0048] Remove the association between the virtual store and the deliveryman matched in the current round of virtual matching results, and determine the deliveryman after the association is removed as the deliveryman to be matched in the next round;

[0049] Repeat the matching process for each round until the initial matching of the multiple delivery personnel with the at least one store is completed.

[0050] In one embodiment, the multi-round algorithm execution unit is further configured to:

[0051] In response to determining that the first total number of delivery personnel to be matched in the current round is equal to the second total number of real stores to be matched in the current round, the preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the real stores to be matched in the current round.

[0052] According to a third aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0053] processor;

[0054] Memory used to store computer programs;

[0055] The processor is configured to implement any of the above-described methods for matching delivery personnel with stores when executing the computer program.

[0056] According to a fourth aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when processed by a processor, implements any of the above-described methods for matching delivery personnel with stores.

[0057] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0058] This invention performs an initial matching of multiple delivery personnel with at least one store to obtain an initial matching result, which includes the association between each delivery personnel and the initially matched store. Then, target delivery personnel whose associations need to be optimized are selected from the multiple delivery personnel. The associations corresponding to the target delivery personnel in the initial matching result are then optimized to obtain a target matching result. This can achieve reasonable matching of stores for delivery personnel, shorten the total travel distance required for delivery personnel to travel to their respective matched stores, and thus shorten the travel time of delivery personnel, which is conducive to improving the efficiency of subsequent store takeout delivery. Attached Figure Description

[0059] Figure 1 A flowchart illustrating a method for matching delivery personnel with stores according to an exemplary embodiment of the present invention is shown;

[0060] Figure 2 A flowchart illustrating how, according to the present invention, multiple delivery personnel are initially matched with at least one store using a multi-round preset matching algorithm;

[0061] Figure 3 A flowchart illustrating how, according to the present invention, a target delivery person with optimized relationships is selected from the plurality of delivery persons;

[0062] Figure 4A flowchart illustrating how, according to the present invention, a target delivery person with an optimized relationship is selected from a plurality of delivery persons based on a first distance and a second distance;

[0063] Figure 5A A flowchart illustrating how to optimize the association relationship corresponding to the target delivery person in the preliminary matching result according to the present invention is shown;

[0064] Figure 5B A schematic diagram of the preliminary matching results obtained by using a multi-round preset matching algorithm according to the present invention is shown;

[0065] Figure 5C A schematic diagram of the matching results obtained after the first round of optimization according to the present invention is shown;

[0066] Figure 5D A schematic diagram of the matching results obtained after the second round of optimization according to the present invention is shown;

[0067] Figure 5E A schematic diagram of the target matching result obtained after the 12th round of optimization according to the present invention is shown;

[0068] Figure 6 A structural block diagram of an apparatus for matching delivery personnel with stores according to an exemplary embodiment of the present invention is shown;

[0069] Figure 7 A structural block diagram of an apparatus for matching delivery personnel with stores according to another exemplary embodiment of the present invention is shown;

[0070] Figure 8 A structural block diagram of an electronic device according to an exemplary embodiment of the present invention is shown. Detailed Implementation

[0071] The present invention will now be described in detail with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.

[0072] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0073] It should be understood that although the terms first, second, etc. may be used in this invention to describe various structures, these structures should not be limited to these terms. These terms are only used to distinguish structures of the same type from each other.

[0074] With the continuous development of internet technology and the accelerating pace of life, the food delivery industry has also experienced rapid growth, and delivery personnel are a crucial link in this industry. In real-life scenarios, a commercial area typically has multiple delivery personnel and multiple stores, thus requiring food delivery platforms to match delivery personnel with the stores where they need to pick up orders. Therefore, how to match delivery personnel with stores based on their locations and the number of delivery personnel required by each store, in order to shorten the total travel distance and thus reduce the travel time, is one of the most pressing technical problems to be solved.

[0075] In related technologies, the Hungarian KM (Kuhn-Munkres) algorithm is mainly used to address the matching problem of multiple delivery personnel and multiple stores. However, the Hungarian KM algorithm can only match an equal number of delivery personnel and stores, and cannot solve the matching problem when the number of delivery personnel and stores is unequal. In view of this, embodiments of the present invention provide the following methods, apparatus, devices, and storage media for matching delivery personnel with stores to solve the above-mentioned technical problems in related technologies.

[0076] Figure 1 A flowchart illustrating a method for matching delivery personnel with stores according to an exemplary embodiment of the present invention is shown. This method can be applied to terminal devices with data processing capabilities (e.g., smartphones, tablets, or desktop computers), or to a server (e.g., a single server or a server cluster). The following description uses a terminal device as an example. Figure 1 As shown, the method includes the following steps S101-S103:

[0077] In step S101, multiple deliverymen are initially matched with at least one store to obtain preliminary matching results.

[0078] In this embodiment, when it is necessary to match a store with a delivery person, a preliminary matching method can be used to match multiple delivery persons with at least one store to obtain a preliminary matching result.

[0079] The preliminary matching results include the association between each delivery person and the preliminarily matched stores.

[0080] It is worth noting that the above matching method can be set according to actual needs, as long as it can match multiple deliverymen with at least one store. This embodiment does not limit this.

[0081] In one embodiment, a multi-round preset matching algorithm can be used to initially match multiple delivery personnel with at least one store to obtain the initial matching result. The method for initially matching multiple delivery personnel with at least one store using a multi-round preset matching algorithm is described below. Figure 2 The embodiments shown will not be described in detail here.

[0082] In step S102, a target delivery person whose relationship needs to be optimized is selected from the multiple delivery persons.

[0083] In this embodiment, after initially matching multiple deliverymen with at least one store and obtaining the initial matching results, a target deliveryman whose relationship needs to be optimized can be selected from the multiple deliverymen.

[0084] For example, after obtaining the preliminary matching results, i.e., the association between each delivery person and the initially matched store, the target delivery person whose association needs to be optimized can be selected from the multiple delivery persons based on the distance each delivery person travels to the currently initially matched store. For instance, the top k delivery persons with the longest distances to the currently initially matched store can be determined as the target delivery persons; this embodiment does not limit this.

[0085] In another embodiment, the method for selecting the target delivery person whose relationship needs to be optimized from the plurality of delivery persons can also be referred to the following: Figure 3 The embodiments shown will not be described in detail here.

[0086] In step S103, the association relationship corresponding to the target delivery person in the preliminary matching result is optimized to obtain the target matching result.

[0087] In this embodiment, after selecting the target deliveryman whose association relationship needs to be optimized from the multiple deliverymen, the association relationship corresponding to the target deliveryman in the preliminary matching result can be optimized to obtain the target matching result. The target matching result is the matching result between the deliveryman and the store obtained after implementing the deliveryman matching store scheme of this embodiment.

[0088] For example, after selecting a target deliveryman whose relationship needs to be optimized from the multiple deliverymen, the store currently matched by the target deliveryman can be swapped with the stores currently matched by other riders in different stores, so as to optimize the relationship corresponding to the target deliveryman and thus obtain the target matching result.

[0089] In another embodiment, the method for optimizing the association relationship corresponding to the target delivery person in the preliminary matching result can also be found in the following: Figure 5AThe embodiments shown will not be described in detail here.

[0090] As described above, the method of this embodiment obtains a preliminary matching result by initially matching multiple deliverymen with at least one store. The preliminary matching result includes the association between each deliveryman and the initially matched store. Then, a target deliveryman whose association needs to be optimized is selected from the multiple deliverymen. The association corresponding to the target deliveryman in the preliminary matching result is then optimized to obtain the target matching result. This method can reasonably match stores for deliverymen, shorten the total travel distance required for deliverymen to travel to their respective matched stores, and thus shorten the travel time for deliverymen, which is beneficial to improving the efficiency of subsequent store takeout delivery.

[0091] Figure 2 A flowchart illustrating how to initially match multiple delivery personnel with at least one store using a multi-round preset matching algorithm according to the present invention is shown. This embodiment is based on the above embodiment and uses the example of how to initially match multiple delivery personnel with at least one store using a multi-round preset matching algorithm as an example for illustrative explanation.

[0092] In this embodiment, the total number of delivery personnel is greater than the total number of at least one store, making it impossible to directly use the existing Hungarian KM matching algorithm to perform a one-time matching between delivery personnel and stores. Therefore, this embodiment proposes using a multi-round preset matching algorithm to initially match multiple delivery personnel with at least one store, obtaining the initial matching result.

[0093] like Figure 2 As shown, the proposed embodiment uses a multi-round preset matching algorithm to initially match multiple delivery personnel with at least one store, specifically including the following steps S201-S206:

[0094] In step S201, it is determined whether the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round: if not, then proceed to step S202; if yes, then proceed to step S203.

[0095] In step S202, a preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the actual stores to be matched in the current round; wherein, the number of delivery personnel matched by the preset matching algorithm is equal to the number of stores. For example, the preset matching algorithm can be the Hungarian KM matching algorithm.

[0096] In step S203, a third number of virtual stores is determined so that the first total number of delivery personnel to be matched in the current round is equal to the total number of target stores to be matched in the current round. The total number of target stores is the sum of the second total number and the third number.

[0097] In step S204, a preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round.

[0098] In step S205, the association between the virtual store and the deliveryman matched in the current round is deleted from the current round of virtual matching results, and the deliveryman after the association is deleted is determined as the deliveryman to be matched in the next round;

[0099] In step S206, it is determined whether the initial matching of the multiple deliverymen and the at least one store has been completed: if yes, the current process ends; if no, step S201 is executed again.

[0100] In this embodiment, since the total number of delivery personnel to be matched is greater than the total number of at least one store to be matched, and the prerequisite for executing preset matching algorithms such as the Hungarian KM algorithm is that the number of matched delivery personnel is equal to the number of stores, this embodiment can first determine whether the first total number of delivery personnel to be matched in the current round is greater than the second total number of real stores to be matched in the current round before executing each round of preset matching algorithm. If so, a third number of virtual stores is determined so that the first total number of delivery personnel to be matched in the current round is equal to the total number of target stores to be matched in the current round. The third number is the difference between the first total number and the second total number. Then, the preset matching algorithm of the current round can be executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round (the target stores include real stores and virtual stores), thereby obtaining the virtual matching result of the current round.

[0101] It is worth noting that this is referred to as a virtual matching result because it includes matching results for both real and virtual stores. Further, after obtaining the current round of virtual matching results, the association between virtual stores and the delivery personnel matched in the current round can be deleted from the virtual matching results (i.e., only the association between real stores and their corresponding delivery personnel is retained). The delivery personnel whose associations have been deleted (i.e., the delivery personnel matched with virtual stores in the current round of virtual matching results) can then be identified as the delivery personnel to be matched in the next round. Next, it can be determined whether the initial matching of the multiple delivery personnel with the at least one store has been completed. If so, the current process can end; otherwise, step S201 can be executed again, that is, it can be determined again whether the first total number of delivery personnel to be matched in the current round is greater than the second total number of real stores to be matched in the current round. If it is greater, steps S203 to S206 are repeated until the initial matching of the multiple delivery personnel with the at least one store has been completed; if they are equal, steps S202 and S206 can be executed.

[0102] It is understood that in this embodiment, it is assumed that the total number of multiple deliverymen is the same as the total number of deliverymen required by at least one store. Therefore, the first total number of deliverymen to be matched in each round can only be greater than or equal to the second total number of real stores to be matched in the current round, and cannot be less than the second total number of real stores to be matched in the current round.

[0103] Furthermore, in this embodiment, the actual number of delivery personnel needed by each store needs to be considered during each round of matching. For example, if store A needs 2 delivery personnel, and after two rounds of KM algorithm matching, store A has already been matched with 2 delivery personnel, then store A does not need to participate in the next round of matching. That is to say, the actual stores to be matched in the current round of each KM algorithm refer to stores that still need to be matched with delivery personnel, excluding stores that have already matched a sufficient number of delivery personnel. The actual number of delivery personnel needed by each store is known, and this number can be determined based on solutions in related technologies, such as the order volume of each store during historical periods. This embodiment does not limit this.

[0104] Figure 3 A flowchart illustrating how to select a target delivery person with optimized relationships from a plurality of delivery persons according to the present invention is provided. This embodiment, based on the above embodiment, exemplifies how to select a target delivery person with optimized relationships from a plurality of delivery persons. Figure 3 As shown, the step S102 above, which involves selecting the target delivery person from the multiple delivery persons whose relationship needs to be optimized, includes the following steps S301-S303:

[0105] In step S301, the first distance between each delivery person and the initially matched store is determined;

[0106] In step S302, based on the first distance and the second distance, a target delivery person whose association relationship needs to be optimized is selected from the multiple delivery persons; wherein, the second distance is the distance between each delivery person and the nearest store among the at least one store.

[0107] In this embodiment, after initially matching multiple delivery personnel with at least one store and obtaining the initial matching results, in order to select the target delivery personnel whose association relationship needs to be optimized from the multiple delivery personnel, a first distance between each delivery personnel and the initially matched store, and a second distance between each delivery personnel and the nearest store among the at least one store, can be determined. Based on this, the distance r of the i-th delivery personnel can be calculated. i The ratio of the first distance to the second distance As shown in the following formula (3-1):

[0108]

[0109] Where J is the total number of stores, d(r i ,s j (r) is the i-th delivery person. i With stores j The first distance between them, d(r) i ,s z For delivery personnel r i With the nearest store z The second distance between them, a ij =1 indicates that the delivery person r i With stores j Match, a ij =0 indicates that the i-th delivery person r i With stores j Mismatch. Understandably, delivery person r... i It can only be matched with one of the stores, that is, only when store s j Is the deliveryman r i When matching stores, a ij =1. s z ={s j |min{d(r i ,s j )},j=1,2,...J}.

[0110] Furthermore, this can be based on the ratio of the first distance to the second distance mentioned above. From the multiple delivery personnel, target delivery personnel whose relationships need optimization are selected. For example, the top k delivery personnel with the highest ratios can be selected as target delivery personnel. It is understood that the ratios... The larger the value, the more it indicates the delivery person's r. i The greater the likelihood that the relationship between the delivery person and the currently matched store is not globally optimal, the more likely that delivery person can be selected as the target delivery person for subsequent optimization. In another embodiment, it can also be done according to the following... Figure 4 The method used in the illustrated embodiment to select the target delivery person from the multiple delivery persons will not be described in detail here.

[0111] Figure 4 A flowchart illustrating how, according to the present invention, a target delivery person with an optimized relationship is selected from a plurality of delivery persons based on a first distance and a second distance; this embodiment, based on the above embodiment, provides an exemplary description of how to select a target delivery person with an optimized relationship from a plurality of delivery persons based on a first distance and a second distance. Figure 4 As shown, the step S302 above, which involves selecting the target delivery person whose relationship needs to be optimized from the multiple delivery persons based on the first distance and the second distance, may include the following steps S401-S402:

[0112] In step S401, the multiple delivery personnel are selected probabilistically.

[0113] In step S402, the selected deliveryman is determined as the target deliveryman.

[0114] In some embodiments, after determining the ratio of the first distance to the second distance, the ratio of the multiple deliverymen can be probabilistically selected based on the roulette wheel selection method, and the deliveryman corresponding to the selected ratio can be determined as the target deliveryman.

[0115] Among them, roulette wheel selection is the simplest and most commonly used selection method. In this method, the selection probability of each individual is proportional to its fitness value (e.g., the "ratio" in this embodiment): the higher the fitness, the higher the selection probability. However, in actual roulette wheel selection, the selection of individuals is often not based on individual selection probabilities, but rather on "cumulative probabilities".

[0116] For example, assuming the ratios corresponding to deliverymen A, B, and C are 3, 2, and 5 respectively, after normalization, it can be determined that the ratios of the three correspond to the distribution probabilities (or distribution ratios) on the roulette wheel as 0.3, 0.2, and 0.5 respectively. Furthermore, the corresponding "cumulative probabilities" of the three can be determined sequentially in the order of A-B-C as [0,0.3), [0.3,0.5), and [0.5,1). Based on this, a random number Rand = 0 to 1 can be selected using the roulette wheel selection method. For example, the following (1) to (3) cases may occur:

[0117] (1) If the current value is 0≤Rand<0.3, then deliveryman A is selected;

[0118] (2) If the current value is 0.3 ≤ Rand < 0.5, then deliveryman B is selected;

[0119] (3) If the current value is 0.5≤Rand<1, then deliveryman C is selected.

[0120] It is worth noting that the above-described cumulative probabilities of [0, 0.3), [0.3, 0.5), and [0.5, 1) for determining the three individuals in the order of A-B-C are merely illustrative. In actual implementation, the cumulative probabilities can also be determined based on actual needs, following the order of A-C-B, B-A-C, B-C-A, C-A-B, or C-B-A (i.e., there are n! possible sequences, where n is the total number of delivery personnel), and the corresponding cumulative probabilities will differ accordingly. Taking the order A-C-B as an example, the corresponding cumulative probabilities are [0, 0.3), [0.3, 0.8), and [0.8, 1), respectively. The calculation method for other sequences is similar and will not be elaborated here.

[0121] Therefore, the larger the ratio, the greater the probability that the delivery person will be selected. This increases the probability of optimizing the relationship between delivery people with larger ratios, and can help determine a more suitable target matching result, that is, to reasonably match stores for delivery people.

[0122] Figure 5A A flowchart illustrating how to optimize the association relationship corresponding to the target delivery person in the preliminary matching result according to the present invention is provided. This embodiment, based on the above embodiment, exemplifies how to optimize the association relationship corresponding to the target delivery person in the preliminary matching result. Figure 5A As shown, the optimization of the association relationship corresponding to the target delivery person in the preliminary matching result described in step S103 above to obtain the target matching result may include the following steps S501-S503:

[0123] In step S501, the first total distance traveled by the multiple deliverymen to their respective currently matched stores is determined;

[0124] In step S502, after determining that the target deliveryman and other deliverymen among the multiple deliverymen have exchanged their currently matched stores, the multiple deliverymen travel the second total distance to their respective exchanged stores;

[0125] In step S503, in response to determining that the second total driving distance is less than the first total driving distance, the association relationship corresponding to the target delivery person is optimized by exchanging the stores currently matched with the other delivery persons.

[0126] In this embodiment, after initially matching multiple delivery personnel with at least one store and obtaining the initial matching results, the first total driving distance of the multiple delivery personnel to their respective currently matched stores can be determined. Then, after selecting a target delivery personnel whose association relationship needs to be optimized from the multiple delivery personnel, the second total driving distance of the multiple delivery personnel to their respective exchanged stores after exchanging their currently matched stores with other delivery personnel can be determined, wherein the other delivery personnel are not currently matched with the target delivery personnel. Based on this, the second total driving distance can be compared with the first total driving distance. If it is determined that the second total driving distance is less than the first total driving distance, that is, the total driving distance of the multiple delivery personnel to their respective stores can be shortened after exchanging stores, then the stores currently matched with the target delivery personnel and other delivery personnel can be truly exchanged, thereby optimizing the association relationship corresponding to the target delivery personnel.

[0127] In one embodiment, to further improve the global optimality of obtaining the target matching result, the target delivery person whose association relationship needs to be optimized can be selected from the multiple delivery persons in N rounds (N is a set positive integer). The total driving distance after the target delivery person selected in each round exchanges the matched stores with other delivery persons in different stores is calculated until it is determined that the total driving distance of the current matching result is the shortest (i.e., no better matching result is found in multiple consecutive rounds) and / or the currently set number of rounds has been reached (i.e., the current round is N).

[0128] For example, suppose there are 12 delivery drivers and 4 stores to be matched, and the number of delivery drivers needed for each store is [1, 6, 1, 4]. First, a multi-round Hungarian KM algorithm can be used to initially match the 12 delivery drivers with the 4 stores, resulting in the following: Figure 5B The preliminary matching results are shown below. Figure 5BAs shown, the delivery rider matched with store 1 (1-shop) is delivery rider 3 (3-rider); the delivery riders matched with store 2 (2-shop) are delivery rider 2 (2-rider), delivery rider 5 (5-rider), delivery rider 8 (8-rider), delivery rider 9 (9-rider), delivery rider 10 (10-rider), and delivery rider 12 (12-rider); the delivery rider matched with store 3 (3-shop) is delivery rider 1 (1-rider); and the delivery riders matched with store 4 (4-shop) are delivery rider 4 (4-rider), delivery rider 6 (6-rider), delivery rider 7 (7-rider), and delivery rider 11 (11-rider). Based on this, the total driving distance (hereinafter referred to as total driving distance) of each delivery rider to their respective matched store under the current matching results can be calculated to be 56.05 km.

[0129] Based on this, the number of rounds can be set cyclically, such as N1 = 20 rounds (preferably the number of rounds is greater than or equal to the number of deliverymen, but this embodiment does not limit this), and the target deliverymen whose relationship needs to be optimized can be selected from the multiple deliverymen.

[0130] For example, if the target delivery person selected in the first round is delivery person 6 (6-rider), after calculating and comparing the total driving distance, the store 4 (4-shop) currently matched with delivery person 6 (6-rider) will be swapped with the store 2 (2-shop) currently matched with delivery person 9 (9-rider), that is, as follows. Figure 5C As shown, matching delivery rider 6 with store 2 and delivery rider 9 with store 4 will shorten the total driving distance to 55.18km.

[0131] In the second round, the target delivery person selected is delivery person 6 (6-rider). After calculating and comparing the total driving distance, the store 2 (2-shop) currently matched with delivery person 6 (6-rider) is swapped with the store 4 (4-shop) currently matched with delivery person 11 (11-rider), that is, as follows. Figure 5D As shown, matching delivery rider 6 (6-rider) with store 4 (4-shop) and delivery rider 11 (11-rider) with store 2 (2-shop) will shorten the total driving distance to 54.83km.

[0132] In the third round, [11-rider-2-shop] and [4-rider-4-shop] are swapped to obtain [11-rider-4-shop] and [4-rider-2-shop], thus reducing the total driving distance to 53.57km;

[0133] In the fourth round, [2-rider-2-shop] and [1-rider-3-shop] are swapped to obtain [2-rider-3-shop] and [1-rider-2-shop], thus reducing the total driving distance to 52.96km;

[0134] And so on... In the 12th round, [3-rider-4-shop] and [1-rider-2-shop] are swapped to obtain [3-rider-2-shop] and [1-rider-4-shop], thus reducing the total driving distance to 51.42km.

[0135] Furthermore, if no better match is found after continuously looping through a set number of rounds, such as N2 = 4 rounds (this number of rounds can be set based on actual needs, and this embodiment does not limit it), the current optimization process can be terminated, and the association relationship between each delivery person and the matched store obtained so far can be output, i.e., Figure 5E The target matching results are shown. Based on Figure 5E The target matching results shown indicate that the total driving distance was shortened by (56.05-51.42) / 56.05 = 8.3%.

[0136] As can be seen from the above-described scheme, this embodiment can quickly obtain preliminary matching results through multiple rounds of the Hungarian KM algorithm. Based on this, target deliverymen whose association needs to be optimized can be selected based on the ratio of the first distance between each deliveryman and the initially matched store and the second distance between each deliveryman and the nearest store. Then, the association between the target deliveryman and other deliverymen can be optimized in a targeted pairwise manner, which can achieve reasonable and efficient matching of stores for deliverymen and solve the matching problem of unequal numbers of deliverymen and stores.

[0137] Figure 6 A structural block diagram of an apparatus for matching delivery personnel with stores according to an exemplary embodiment of the present invention is shown. The apparatus of this embodiment can be applied to terminal devices with data processing capabilities (e.g., smartphones, tablets, or desktop computers), or to a server (e.g., a single server or a server cluster consisting of multiple servers). Figure 6 As shown, the device includes: a preliminary matching module 110, a personnel selection module 120, and a result acquisition module 130, wherein:

[0138] The preliminary matching module 110 is used to perform preliminary matching between multiple deliverymen and at least one store to obtain preliminary matching results, the preliminary matching results including the association between each deliveryman and the preliminarily matched store;

[0139] The personnel selection module 120 is used to select a target delivery person whose relationship needs to be optimized from the multiple delivery persons;

[0140] The result acquisition module 130 is used to optimize the association relationship corresponding to the target deliveryman in the preliminary matching result to obtain the target matching result.

[0141] As described above, the device in this embodiment obtains a preliminary matching result by initially matching multiple deliverymen with at least one store. The preliminary matching result includes the association between each deliveryman and the initially matched store. Then, a target deliveryman whose association needs to be optimized is selected from the multiple deliverymen. The association corresponding to the target deliveryman in the preliminary matching result is then optimized to obtain a target matching result. This can achieve reasonable matching of stores for deliverymen, shorten the total travel distance required for deliverymen to travel to their respective matched stores, and thus shorten the travel time of deliverymen, which is beneficial to improving the delivery efficiency of subsequent stores.

[0142] Figure 7 A structural block diagram of an apparatus for matching delivery personnel with stores according to another exemplary embodiment of the present invention is shown. The apparatus of this embodiment can be applied to terminal devices with data processing capabilities (e.g., smartphones, tablets, or desktop computers), or to a server (e.g., a single server or a server cluster consisting of multiple servers). The preliminary matching module 210, the personnel selection module 220, and the result acquisition module 230 are as described above. Figure 6 The preliminary matching module 110, personnel selection module 120, and result acquisition module 130 in the illustrated embodiment have the same functions, which will not be described in detail here. Figure 7 As shown, in this embodiment, the total number of the multiple delivery personnel is greater than the total number of the at least one store; based on this, the preliminary matching module 210 may further include:

[0143] The multi-round algorithm execution unit 211 is used to perform preliminary matching of multiple deliverymen with at least one store through a multi-round preset matching algorithm to obtain the preliminary matching result. The number of deliverymen matched by the preset matching algorithm is equal to the number of stores.

[0144] In one embodiment, the multi-round algorithm execution unit 210 described above can also be used for:

[0145] Before executing each round of the preset matching algorithm, in response to determining that the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round, a third number of virtual stores is determined so that the first total number of deliverymen to be matched in the current round is equal to the total number of target stores to be matched in the current round, wherein the total number of target stores is the sum of the second total number and the third number;

[0146] The preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round;

[0147] Remove the association between the virtual store and the deliveryman matched in the current round of virtual matching results, and determine the deliveryman after the association is removed as the deliveryman to be matched in the next round;

[0148] Repeat the matching process for each round until the initial matching of the multiple delivery personnel with the at least one store is completed.

[0149] In one embodiment, the multi-round algorithm execution unit 211 described above can also be used for:

[0150] In response to determining that the first total number of delivery personnel to be matched in the current round is equal to the second total number of real stores to be matched in the current round, the preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the real stores to be matched in the current round.

[0151] In one embodiment, the personnel selection module 220 may include:

[0152] Distance determination unit 221 is used to determine the initial distance between each delivery person and the initially matched store;

[0153] Personnel selection unit 222 is used to select a target deliveryman whose association relationship needs to be optimized from the multiple deliverymen based on the first distance and the second distance, wherein the second distance is the distance between each deliveryman and the nearest store among the at least one stores.

[0154] In one embodiment, the personnel selection unit 222 can also be used for:

[0155] A probabilistic selection process is performed on the multiple delivery personnel.

[0156] The selected delivery person is designated as the target delivery person.

[0157] In one embodiment, the result acquisition module 230 may include:

[0158] The first determining unit 231 is used to determine the first total driving distance of the multiple deliverymen to their respective currently matched stores;

[0159] The second determining unit 232 is used to determine the second total driving distance of the multiple deliverymen to their respective exchanged stores after the target deliveryman and other deliverymen among the multiple deliverymen have exchanged their currently matched stores, wherein the other deliverymen are different from the stores currently matched by the target deliveryman;

[0160] The relationship optimization unit 233 is used to optimize the association relationship corresponding to the target delivery person by exchanging the stores currently matched with the other delivery persons when it is determined that the second total driving distance is less than the first total driving distance.

[0161] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0162] The embodiments of the device for matching delivery personnel with stores according to this invention can be applied to network devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of its host device reading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 8 The diagram shown is a hardware structure diagram of an electronic device for matching delivery personnel with stores, as per the present invention. (Except for...) Figure 8 In addition to the processor, network interface, memory, and non-volatile memory shown, the device in the embodiment may also include other hardware, such as a forwarding chip responsible for processing packets; from a hardware structure perspective, the device may also be a distributed device, which may include multiple interface cards to extend packet processing at the hardware level.

[0163] This invention also provides a computer-readable storage medium having a computer program stored thereon, which, when processed by a processor, implements the above-described... Figures 1 to 5A Any method for matching delivery drivers with stores.

[0164] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the claims.

[0165] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for matching delivery personnel with stores, characterized in that, include: Multiple delivery personnel are initially matched with at least one store to obtain preliminary matching results, which include the association between each delivery personnel and the initially matched store; Based on the distance between each deliveryman and the initially matched store, target deliverymen whose relationships need to be optimized are selected from the multiple deliverymen. Determine the first total distance traveled by the multiple delivery personnel to their respective currently matched stores; After the target deliveryman and other deliverymen among the multiple deliverymen exchange their currently matched stores, the multiple deliverymen travel the second total distance to their respective exchanged stores, where the other deliverymen are different from the stores currently matched with the target deliveryman. In response to determining that the second total driving distance is less than the first total driving distance, the association relationship corresponding to the target delivery person is optimized by swapping the stores currently matched with the other delivery persons. The process of selecting target delivery personnel with optimized relationships from among the multiple delivery personnel based on the distance between each delivery person and the initially matched store includes: Determine the initial distance between each delivery person and the initially matched store; Based on the ratio of the first distance to the second distance, target deliverymen whose association needs to be optimized are selected from the multiple deliverymen. The second distance is the distance between each deliveryman and the nearest store among the at least one store. The larger the ratio, the greater the possibility that the association between the corresponding deliveryman and the currently matched store is not globally optimal. The step of selecting target delivery personnel with optimized relationships from the multiple delivery personnel based on the ratio of the first distance to the second distance includes: The ratios corresponding to the multiple delivery personnel are selected probabilistically. The delivery person corresponding to the selected ratio is determined as the target delivery person.

2. The method according to claim 1, characterized in that, The total number of the multiple delivery personnel is greater than the total number of the at least one store; The process of initially matching multiple delivery personnel with at least one store to obtain preliminary matching results includes: Multiple delivery personnel are initially matched with at least one store through a multi-round preset matching algorithm to obtain the preliminary matching result. The number of delivery personnel matched by the preset matching algorithm is equal to the number of stores.

3. The method according to claim 2, characterized in that, The process of initially matching multiple delivery personnel with at least one store using a multi-round preset matching algorithm includes: Before executing each round of the preset matching algorithm, in response to determining that the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round, a third number of virtual stores is determined so that the first total number of deliverymen to be matched in the current round is equal to the total number of target stores to be matched in the current round, wherein the total number of target stores is the sum of the second total number and the third number; The preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round; Remove the association between the virtual store and the deliveryman matched in the current round of virtual matching results, and determine the deliveryman after the association is removed as the deliveryman to be matched in the next round; Repeat the matching process for each round until the initial matching of the multiple delivery personnel with the at least one store is completed.

4. The method according to claim 2, characterized in that, The method further includes: In response to determining that the first total number of delivery personnel to be matched in the current round is equal to the second total number of real stores to be matched in the current round, the preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the real stores to be matched in the current round.

5. A device for matching delivery personnel with stores, characterized in that, include: The preliminary matching module is used to perform preliminary matching between multiple deliverymen and at least one store to obtain preliminary matching results. The preliminary matching results include the association between each deliveryman and the preliminarily matched store. The personnel selection module is used to select target delivery personnel whose relationships need to be optimized from the multiple delivery personnel based on the distance between each delivery person and the initially matched stores; The result acquisition module is used to determine the first total driving distance of the multiple deliverymen to their respective currently matched stores; After determining that the target delivery person and other delivery persons among the multiple delivery persons have exchanged their currently matched stores, the multiple delivery persons travel a second total distance to their respective exchanged stores, and the other delivery persons are not currently matched with the target delivery person's stores; in response to determining that the second total distance is less than the first total distance, the association relationship corresponding to the target delivery person is optimized by exchanging the stores currently matched with the target delivery person and the other delivery persons. The process by which the personnel selection module selects target delivery personnel with optimized relationships from among multiple delivery personnel based on the distance between each delivery person and the initially matched stores includes: Determine the initial distance between each delivery person and the initially matched store; Based on the ratio of the first distance to the second distance, target deliverymen whose association needs to be optimized are selected from the multiple deliverymen. The second distance is the distance between each deliveryman and the nearest store among the at least one store. The larger the ratio, the greater the possibility that the association between the corresponding deliveryman and the currently matched store is not globally optimal. The step of selecting target delivery personnel with optimized relationships from the multiple delivery personnel based on the ratio of the first distance to the second distance includes: The ratios corresponding to the multiple delivery personnel are selected probabilistically. The delivery person corresponding to the selected ratio is determined as the target delivery person.

6. The apparatus according to claim 5, characterized in that, The total number of the multiple delivery personnel is greater than the total number of the at least one store; The preliminary matching module also includes: The multi-round algorithm execution unit is used to perform preliminary matching between multiple deliverymen and at least one store through a multi-round preset matching algorithm to obtain the preliminary matching result. The number of deliverymen matched by the preset matching algorithm is equal to the number of stores.

7. The apparatus according to claim 6, characterized in that, The multi-round algorithm execution unit is also used for: Before executing each round of the preset matching algorithm, in response to determining that the first total number of deliverymen to be matched in the current round is greater than the second total number of real stores to be matched in the current round, a third number of virtual stores is determined so that the first total number of deliverymen to be matched in the current round is equal to the total number of target stores to be matched in the current round, wherein the total number of target stores is the sum of the second total number and the third number; The preset matching algorithm is executed to match the delivery personnel to be matched in the current round with the target stores to be matched in the current round, so as to obtain the virtual matching result of the current round; Remove the association between the virtual store and the deliveryman matched in the current round of virtual matching results, and determine the deliveryman after the association is removed as the deliveryman to be matched in the next round; Repeat the matching process for each round until the initial matching of the multiple delivery personnel with the at least one store is completed.

8. The apparatus according to claim 6, characterized in that, The multi-round algorithm execution unit is also used for: In response to determining that the first total number of delivery personnel to be matched in the current round is equal to the second total number of real stores to be matched in the current round, the preset matching algorithm is directly executed to match the delivery personnel to be matched in the current round with the real stores to be matched in the current round.

9. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store computer programs; The processor is configured to implement the method for matching delivery personnel with stores as described in any one of claims 1-4 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is processed by the processor, it implements the method for matching delivery personnel with stores as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Vehicle carrying order quantity balancing method and device for determining home furnishing delivery

    CN111985700A

  • Order scheduling method and device, storage medium and electronic equipment

    CN114565198A