Resident area recommendation method, device, electronic device and storage medium
By obtaining historical order information and candidate area data of resource capacity objects, and using genetic algorithms to recommend the resident area of resource capacity objects, the problem of subjective setting of resident areas affecting efficiency is solved, and more efficient order allocation and resource capacity object allocation is achieved.
Patent Information
- Application Number
- CN201910277797.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-08
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2039-04-08
AI Technical Summary
When the resource capacity object sets a permanent area based on subjective consciousness, it may affect the order allocation and the allocation efficiency of resource capacity object.
By obtaining the order information of the orders received by K resource capacity objects in history, determining M candidate areas and their related data, and using genetic algorithms to recommend the resident area of resource capacity objects.
This method objectively recommends the resident area from a global perspective, reduces the influence of subjective factors, and improves the efficiency of order allocation and resource capacity allocation.
Smart Images

Figure CN111798076B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology, and in particular to a method, device, electronic device and storage medium for recommending a resident area. Background Art
[0002] With the rapid development of network technology, resource allocation through the network has been widely adopted. Among them, when allocating resources through the network, users can place orders through the network, and the order information of the order includes at least the destination location of the resources and the source location of the resources. In this way, after the resource capacity object receives the order, it can obtain resources according to the source location included in the order information, and allocate resources according to the destination location included in the order information. For example, for takeout orders, users can place orders through the Internet, and the order information of the order includes at least the delivery location and the pick-up location. In this way, after the rider receives the order, he can pick up the food according to the pick-up location included in the order information, and deliver the food according to the delivery location included in the order information, so as to realize the delivery of takeout.
[0003] When allocating resources using the above method, if the source location included in the order information of the order received by the resource capacity object is far away from the current location, this will affect the efficiency of resource allocation. Therefore, resource capacity objects generally set a permanent area for themselves so that the system can allocate orders based on the permanent area. However, due to subjective factors, if orders are allocated through the permanent area set by the resource capacity object itself, the overall effect of order allocation may not be guaranteed. For example, if resource capacity objects all choose the same area with a relatively dense order volume, there may be a situation where supply exceeds demand, and for areas with sparse orders, there will be very few resource capacity objects, which will affect the allocation of orders and the allocation efficiency of resource capacity objects. Summary of the invention
[0004] This application provides a method, device, electronic device and storage medium for recommending a resident area, which can solve the problem in the related art that when resource transport objects set resident areas according to subjective consciousness, it may affect the efficiency of order allocation and resource transport object allocation. The technical solution is as follows:
[0005] In a first aspect, a method for recommending a resident area is provided, the method comprising:
[0006] Obtain order information of orders received historically by K resource capacity objects, wherein the order information includes the source location of the resource, and K is a positive integer greater than or equal to 2;
[0007] According to the acquired order information, determine M candidate areas, the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, where M is a positive integer greater than or equal to 1;
[0008] Based on the M candidate areas, the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, a genetic algorithm is used to recommend a permanent area for at least one of the K resource capacity objects.
[0009] Optionally, the recommending a permanent area of at least one of the K resource capacity objects by using a genetic algorithm according to the M candidate areas, the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, comprises:
[0010] According to the M candidate regions, N chromosomes are determined, each chromosome including K gene bits corresponding to the K resource capacity objects one by one, and an element on each gene bit is used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2;
[0011] Determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached;
[0012] Evolving the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, the number of orders received by each resource transport object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes;
[0013] During the evolution process, if the algorithm convergence condition is currently met, the permanent area of at least one of the K resource capacity objects is recommended based on the chromosome with the largest fitness among the N chromosomes obtained after the last evolution.
[0014] Optionally, the evolving the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes includes:
[0015] Selecting S chromosomes from the N chromosomes in descending order of the fitness of the N chromosomes, where S is a positive integer greater than or equal to 1;
[0016] Select T chromosomes from the remaining chromosomes, where T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N;
[0017] According to the crossover probability and the mutation probability, crossover and mutation are performed on the T chromosomes;
[0018] The S chromosomes and the mutated T chromosomes are used as the evolved N chromosomes, and the fitness of each chromosome in the evolved N chromosomes is determined according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached;
[0019] If the algorithm convergence condition is not met currently, then for the evolved N chromosomes, return to the step of selecting S chromosomes from the N chromosomes in descending order of the fitness of the N chromosomes until the algorithm convergence condition is met.
[0020] Optionally, determining the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached includes:
[0021] For the first chromosome, according to the total number of orders received in each candidate area, determine the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0022] The first chromosome is any chromosome of the N chromosomes, and the distance between each candidate region included in the candidate region set corresponding to each resource capacity object and the candidate region indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold;
[0023] The fitness of the first chromosome is determined based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at.
[0024] Optionally, determining the fitness of the first chromosome according to the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, comprises:
[0025] According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0026] Determine the order balance based on the total order volume of each resource capacity object;
[0027] Determine the familiarity of each resource capacity object according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set;
[0028] The fitness of the first chromosome is determined according to the total order quantity of each resource capacity object, the order quantity balance and the familiarity of each resource capacity object.
[0029] Optionally, the total order quantity of each resource capacity object when determining, based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, to use the candidate area indicated by the element on the gene position included in the first chromosome as the resident area of the corresponding resource capacity object, includes:
[0030] Determine the total order quantity of the K resource capacity objects in the same candidate area according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set;
[0031] The total order quantity of each resource capacity object is determined according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set and the total order quantity of the K resource capacity objects in the same candidate area.
[0032] Optionally, determining the order quantity balance degree according to the total order quantity of each resource capacity object includes:
[0033] Determine the average order quantity of the total order quantity of the K resource capacity objects;
[0034] Determine the average absolute error between the total order quantity of each resource capacity object and the average order quantity to obtain K average absolute errors;
[0035] The average value of the K mean absolute errors is determined as the single quantity balance degree.
[0036] Optionally, determining the familiarity of each resource capacity object according to the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set includes:
[0037] For a first resource capacity object, at least one order quantity is selected from the order quantity of each candidate area historically reached by the first resource capacity object, the at least one order quantity refers to the order quantity of a candidate area that has an intersection with the set of candidate areas corresponding to the first resource capacity object among the candidate areas historically reached by the first resource capacity object, and the first resource capacity object is any one of the K resource capacity objects;
[0038] Adding the at least one order quantity to obtain a first order quantity, and adding the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set to obtain a second order quantity;
[0039] The quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
[0040] Optionally, after determining the fitness of each chromosome in the N evolved chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, the method further includes:
[0041] Determine the current evolutionary generation;
[0042] If the current evolutionary generation is less than the maximum evolutionary generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution are the same, it is determined that the algorithm convergence condition is currently met; otherwise, it is determined that the algorithm convergence condition is not currently met, and H is a positive integer greater than or equal to 2.
[0043] Optionally, determining, based on the acquired order information, M candidate areas, a total order quantity of each candidate area, a candidate area historically reached by each resource capacity object, and an order quantity of each resource capacity object in each candidate area historically reached includes:
[0044] Discretize the source location included in the acquired order information to obtain the M candidate areas;
[0045] Based on the acquired order information, determine the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at.
[0046] In a second aspect, a resident area recommendation device is provided, the device comprising:
[0047] An acquisition module, used to acquire order information of orders received historically by K resource capacity objects, wherein the order information includes a source location of the resource, and K is a positive integer greater than or equal to 2;
[0048] A determination module, configured to determine, based on the acquired order information, M candidate areas, a total order volume of each candidate area, a candidate area historically reached by each resource capacity object, and an order volume of each resource capacity object in each candidate area historically reached, where M is a positive integer greater than or equal to 1;
[0049] The recommendation module is used to recommend a permanent area for at least one of the K resource capacity objects through a genetic algorithm based on the M candidate areas, the total number of orders received in each candidate area, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at.
[0050] Optionally, the recommendation module includes:
[0051] A first determination submodule is used to determine N chromosomes according to the M candidate regions, each chromosome includes K gene bits corresponding to the K resource capacity objects one by one, and an element on each gene bit is used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2;
[0052] A second determination submodule is used to determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached;
[0053] An evolution submodule, for evolving the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, the number of orders received by each resource transport object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes;
[0054] The recommendation submodule is used to recommend the permanent area of at least one of the K resource capacity objects according to the chromosome with the largest fitness among the N chromosomes obtained after the last evolution if the algorithm convergence condition is currently met during the evolution process.
[0055] Optionally, the evolution submodule includes:
[0056] A first selection unit is used to select S chromosomes from the N chromosomes in descending order of fitness of the N chromosomes, where S is a positive integer greater than or equal to 1;
[0057] A second selection unit, configured to select T chromosomes from the remaining chromosomes, wherein T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N;
[0058] An evolution unit, used for performing crossover and mutation on the T chromosomes according to a crossover probability and a mutation probability;
[0059] A first determination unit is used to use the S chromosomes and the mutated T chromosomes as the evolved N chromosomes, and determine the fitness of each chromosome in the evolved N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached;
[0060] The trigger unit is used to trigger the first selection unit to select S chromosomes from the N chromosomes in the order of the fitness of the N chromosomes from large to small, if the convergence condition of the algorithm is not currently met, for the evolved N chromosomes, until the convergence condition of the algorithm is met.
[0061] Optionally, the second determining submodule includes:
[0062] A second determining unit is used to determine, for the first chromosome, based on the total number of orders received in each candidate area, the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0063] The first chromosome is any chromosome of the N chromosomes, and the distance between each candidate region included in the candidate region set corresponding to each resource capacity object and the candidate region indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold;
[0064] The third determination unit is used to determine the fitness of the first chromosome based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at.
[0065] Optionally, the third determining unit includes:
[0066] A first determination subunit is used to determine, based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0067] The second determination subunit is used to determine the order quantity balance according to the total order quantity of each resource capacity object;
[0068] The third determination subunit is used to determine the familiarity of each resource capacity object according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set;
[0069] The fourth determination subunit is used to determine the fitness of the first chromosome according to the total order quantity of each resource capacity object, the order quantity balance and the familiarity of each resource capacity object.
[0070] Optionally, the first determining subunit is mainly used for:
[0071] Determine the total order quantity of the K resource capacity objects in the same candidate area according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set;
[0072] The total order quantity of each resource capacity object is determined according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set and the total order quantity of the K resource capacity objects in the same candidate area.
[0073] Optionally, the second determining subunit is mainly used for:
[0074] Determine the average order quantity of the total order quantity of the K resource capacity objects;
[0075] Determine the average absolute error between the total order quantity of each resource capacity object and the average order quantity to obtain K average absolute errors;
[0076] The average value of the K mean absolute errors is determined as the single quantity balance degree.
[0077] Optionally, the third determining subunit is mainly used for:
[0078] For a first resource capacity object, at least one order quantity is selected from the order quantity of each candidate area historically reached by the first resource capacity object, the at least one order quantity refers to the order quantity of a candidate area that has an intersection with the set of candidate areas corresponding to the first resource capacity object among the candidate areas historically reached by the first resource capacity object, and the first resource capacity object is any one of the K resource capacity objects;
[0079] Adding the at least one order quantity to obtain a first order quantity, and adding the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set to obtain a second order quantity;
[0080] The quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
[0081] Optionally, the recommendation module further includes:
[0082] The third determination submodule is used to determine the current evolutionary generation;
[0083] The fourth determination submodule is used to determine that the algorithm convergence condition is currently met if the current evolutionary generation is less than the maximum evolutionary generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution are the same, otherwise, determine that the algorithm convergence condition is not currently met, and H is a positive integer greater than or equal to 2.
[0084] Optionally, the determination module is mainly used for:
[0085] Discretize the source location included in the acquired order information to obtain the M candidate areas;
[0086] Based on the acquired order information, determine the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at.
[0087] According to a third aspect, an electronic device is provided, the electronic device comprising:
[0088] processor;
[0089] a memory for storing processor-executable instructions;
[0090] The processor is configured to execute the steps of any one of the methods described in the first aspect above.
[0091] In a fourth aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the steps of any one of the methods described in the first aspect.
[0092] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the steps of any one of the methods described in the first aspect.
[0093] The technical solution provided by this application can at least bring the following beneficial effects:
[0094] In the embodiment of the present application, the permanent area of at least one of the K resource capacity objects can be recommended through a genetic algorithm based on the order information of the orders received by the K resource capacity objects in the past. That is, the permanent area of at least one of the K resource capacity objects is recommended from a global perspective through a genetic algorithm, which is relatively objective and not affected by subjective factors. This solves the problem that the resource capacity objects are highly subjective when setting permanent points by themselves, which may affect the order allocation and resource capacity object allocation efficiency, and ensures the overall effect of order allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0096] Figure 1 is a schematic diagram of an implementation environment for resident area recommendation according to an exemplary embodiment;
[0097] Figure 2 is a flow chart of a method for recommending a resident area according to an exemplary embodiment;
[0098] Figure 3 is a flowchart of another resident area recommendation method according to an exemplary embodiment;
[0099] Figure 4 is a schematic diagram of a chromosome according to an exemplary embodiment;
[0100] Figure 5 is a schematic structural diagram of a chromosome crossover operation according to an exemplary embodiment;
[0101] Figure 6 is a structural schematic diagram of a chromosome mutation operation according to an exemplary embodiment;
[0102] Figure 7 is a structural schematic diagram of a resident area recommendation device according to an exemplary embodiment;
[0103] Figure 8 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0104] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0105] Before explaining the embodiments of the present application in detail, a brief introduction to the application scenarios and implementation environment involved in the present application is first given.
[0106] The resident area recommendation method provided by the embodiment of the present application can be applied in many scenarios. For example, a resident area can be recommended for a rider in a takeaway delivery scenario. That is, for takeaway orders, users can place orders through the Internet, and the order information of the order includes at least a delivery location and a pick-up location. In this way, after the rider receives the order, he can pick up the food according to the pick-up location included in the order information, and deliver the food according to the delivery location included in the order information to achieve the delivery of the takeaway. However, if the pick-up location is far from the current location, it will affect the delivery efficiency of the takeaway. Therefore, a resident area can be recommended for each rider. In this way, orders can be allocated according to the pick-up location and the rider's resident area to ensure the delivery efficiency of the order. For another example, a resident area can be recommended for a driver in a taxi business scenario. That is, for the taxi service, users can place an order through the Internet, and the order information of the order includes at least the departure location and the destination location. In this way, after the driver receives the order, he can pick up the passenger according to the departure location included in the order information and deliver the passenger to the destination location in the order information. However, if the departure location is far from the current location, the waiting time of the passenger will be extended. Therefore, a permanent area can be recommended for each driver. In this way, orders can be allocated according to the departure location and the driver's permanent area, thereby shortening the waiting time of passengers. The permanent area recommendation method provided in the embodiment of the present application can also be applied in other scenarios, for example, recommending a permanent area for a deliveryman in a courier delivery scenario, which will not be listed one by one in the embodiment of the present application.
[0107] Figure 1 FIG. 1 is a schematic diagram of an implementation environment for recommending a resident area according to an exemplary embodiment. Figure 1The implementation environment includes a user terminal 101, a resource transportation terminal 102 and a server 103. The user terminal 101 can communicate with the server 103 through a wired network or a wireless network, and the resource transportation terminal 102 can also communicate with the server 103 through a wired network or a wireless network.
[0108] The user terminal 101 is used to place an order through the network and report the order information of the order to the server 103. The server 103 is used to receive the order information of the order sent by the user terminal 101, and allocate the order to the resource capacity terminal 102 according to the order information, so as to instruct the resource capacity object to allocate the resources of the order. The resource capacity terminal 102 is used to receive the order allocated by the server 103, and report the location information of the resource capacity object in real time during the resource allocation process. As an example, the user terminal 101 and the resource capacity terminal 102 can both be mobile phones, tablet computers, etc., which is not limited in the embodiments of the present application. The server 103 can be a single server or a server cluster composed of multiple servers, which is not limited in the embodiments of the present application.
[0109] After introducing the application scenarios and implementation environment involved in this application, the embodiments of this application are described in detail with reference to the accompanying drawings.
[0110] Figure 2 is a flowchart of a method for recommending a resident area according to an exemplary embodiment. The method is applied to the above Figure 1 In the server 103 shown, see Figure 2 , the method comprising:
[0111] Step 201: Obtain order information of orders received historically by K resource capacity objects, where the order information includes the source location of the resource, and K is a positive integer greater than or equal to 2.
[0112] Step 202: Based on the acquired order information, determine M candidate areas, the total number of orders for each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders for each resource capacity object in each candidate area that has historically arrived at, where M is a positive integer greater than or equal to 1.
[0113] Step 203: Based on the M candidate areas, the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, a genetic algorithm is used to recommend a permanent area for at least one of the K resource capacity objects.
[0114] In the embodiment of the present application, the permanent area of at least one of the K resource capacity objects can be recommended through a genetic algorithm based on the order information of the orders received by the K resource capacity objects in the past. That is, the permanent area of at least one of the K resource capacity objects is recommended from a global perspective through a genetic algorithm, which is relatively objective and not affected by subjective factors. This solves the problem that the resource capacity objects are highly subjective when setting permanent points by themselves, which may affect the order allocation and resource capacity object allocation efficiency, and ensures the overall effect of order allocation.
[0115] Optionally, based on the M candidate areas, the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, a resident area of at least one of the K resource capacity objects is recommended through a genetic algorithm, including:
[0116] According to the M candidate regions, N chromosomes are determined, each chromosome includes K gene positions corresponding to the K resource capacity objects, and the elements on each gene position are used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2;
[0117] Determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas that each resource transport object has historically arrived at, and the number of orders received by each resource transport object in each candidate area that it has historically arrived at.
[0118] Evolve the N chromosomes according to the total number of orders received in each candidate area, the candidate areas that each resource transport object has historically arrived at, the number of orders received by each resource transport object in each candidate area that it has historically arrived at, and the fitness of each chromosome in the N chromosomes;
[0119] During the evolution process, if the algorithm convergence condition is currently met, the permanent area of at least one of the K resource capacity objects is recommended based on the chromosome with the largest fitness among the N chromosomes obtained after the last evolution.
[0120] Optionally, the N chromosomes are evolved according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes, including:
[0121] Select S chromosomes from N chromosomes in the order of their fitness from large to small, where S is a positive integer greater than or equal to 1;
[0122] Select T chromosomes from the remaining chromosomes, where T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N;
[0123] According to the crossover probability and mutation probability, crossover and mutation are performed on T chromosomes;
[0124] The S chromosomes and the mutated T chromosomes are used as the evolved N chromosomes. The fitness of each chromosome in the evolved N chromosomes is determined according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached.
[0125] If the algorithm convergence condition is not met currently, then for the evolved N chromosomes, return to execute the step of selecting S chromosomes from the N chromosomes in the order of the fitness of the N chromosomes from large to small until the algorithm convergence condition is met.
[0126] Optionally, the fitness of each chromosome in the N chromosomes is determined according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, including:
[0127] For the first chromosome, according to the total number of orders received in each candidate area, determine the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0128] The first chromosome is any chromosome among the N chromosomes, and the distance between each candidate region included in the candidate region set corresponding to each resource capacity object and the candidate region indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold;
[0129] The fitness of the first chromosome is determined based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached.
[0130] Optionally, determining the fitness of the first chromosome according to the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, includes:
[0131] According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0132] Determine the order balance based on the total order volume of each resource capacity object;
[0133] Determine the familiarity of each resource capacity object according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set;
[0134] The fitness of the first chromosome is determined based on the total number of orders received by each resource capacity object, the order balance and the familiarity of each resource capacity object.
[0135] Optionally, according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determining the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the resident area of the corresponding resource capacity object includes:
[0136] According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of K resource capacity objects in the same candidate area;
[0137] The total order quantity of each resource capacity object is determined according to the order quantity of each candidate area included in the corresponding candidate area set of each resource capacity object and the total order quantity of K resource capacity objects in the same candidate area.
[0138] Optionally, the order quantity balance is determined according to the total order quantity of each resource capacity object, including:
[0139] Determine the average order quantity of the total order quantity of K resource capacity objects;
[0140] Determine the mean absolute error between the total order volume and the average order volume of each resource capacity object to obtain K mean absolute errors;
[0141] The average of the K mean absolute errors is determined as the single quantity balance.
[0142] Optionally, the familiarity of each resource capacity object is determined according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, including:
[0143] For the first resource capacity object, at least one order quantity is selected from the order quantity of each candidate area historically reached by the first resource capacity object, the at least one order quantity refers to the order quantity of the candidate area historically reached by the first resource capacity object that has an intersection with the candidate area set corresponding to the first resource capacity object, and the first resource capacity object is any resource capacity object among the K resource capacity objects;
[0144] Add at least one order quantity to obtain a first order quantity, and add the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set to obtain a second order quantity;
[0145] The quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
[0146] Optionally, after determining the fitness of each of the N chromosomes after evolution according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, the method further includes:
[0147] Determine the current evolutionary generation;
[0148] If the current evolutionary generation is less than the maximum evolutionary generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution is the same, it is determined that the algorithm convergence condition is currently met; otherwise, it is determined that the algorithm convergence condition is not currently met, and H is a positive integer greater than or equal to 2.
[0149] Optionally, according to the acquired order information, M candidate areas, the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached are determined, including:
[0150] Discretize the source location included in the acquired order information to obtain M candidate areas;
[0151] Based on the acquired order information, determine the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at.
[0152] All the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and the embodiments of the present application will not be described in detail one by one.
[0153] Figure 3 is a flowchart of another resident area recommendation method according to an exemplary embodiment, which is applied to the above Figure 1 In the server 103 shown, see Figure 3 , the method comprising:
[0154] Step 301: Obtain order information of orders received historically by K resource capacity objects, where the order information includes the source location of the resource, and K is a positive integer greater than or equal to 2.
[0155] It should be understood that when recommending a resident area for a resource capacity object, the server needs to collect order information of multiple resource capacity objects and analyze the order information of the multiple resource capacity objects. For ease of understanding and description, multiple resource capacity objects are represented as K resource capacity objects, where K is a positive integer greater than or equal to 2. In addition, the order information may include not only the source location of the resource, but also the destination location of the resource, the allocation duration of the resource, the number of resources, etc., which will not be listed one by one in the embodiments of the present application.
[0156] In some embodiments, after allocating orders to resource capacity objects, the server may record order information of the orders allocated to each resource capacity object. In this way, the server can obtain the order information of the orders allocated to K resource capacity objects by the server from the recorded information, and then determine the order information of the obtained orders as the order information of the orders historically received by the K resource capacity objects.
[0157] For example, if the resource capacity object is a rider, for food delivery, the server can record the order information of the orders assigned to each rider. The order information may include the order time, delivery time, number of meals, pick-up location, delivery location, etc. In this way, when making recommendations for resident areas, the server can obtain the order information of the orders assigned to K riders by the server from the recorded information, and then determine the order information of the obtained orders as the order information of the orders historically received by the K riders.
[0158] For another example, if the resource capacity object is a driver, for the taxi business, the server can record the order information of the orders assigned to each driver. The order information may include the order time, number of passengers, departure location, destination location, etc. In this way, when making recommendations for resident areas, the server can obtain the order information of the orders assigned to K drivers by the server from the recorded information, and then determine the order information of the obtained orders as the order information of the orders historically received by the K drivers.
[0159] It should be noted that the resident area recommendation method involved in the present application can be applied when the resource capacity object is a rider or a driver. For the sake of convenience, in the subsequent steps, the embodiment of the present application will be illustrated by taking the resource capacity object as a rider.
[0160] It is worth noting that the order information of the orders received historically by the K resource capacity objects may be the order information of the orders received in a historical time period before the current time, and the historical time period may be continuous with the current time or discontinuous with the current time. For example, the historical time period may be one month, and the order information of the orders received historically by the K resource capacity objects may be the order information of the orders received in any one month before the current time, or the order information of the orders received in one month starting from the current time.
[0161] Step 302: Based on the acquired order information, determine M candidate areas, the total number of orders for each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders for each resource capacity object in each candidate area that has historically arrived at, where M is a positive integer greater than or equal to 1.
[0162] Since the source location included in the acquired order information is usually scattered, and the source location is a location point, while the resident area is an area range, in some embodiments, the server may discretize the source location included in the acquired order information to obtain M candidate areas. Afterwards, the total order volume of each candidate area, the candidate area that each resource capacity object has historically arrived at, and the order volume of each resource capacity object in each candidate area that has historically arrived at are determined based on the acquired order information.
[0163] As an example, the server may discretize the source location included in the acquired order information by using a geohash algorithm to obtain M candidate areas.
[0164] It should be noted that the server can use the geohash algorithm for discretization processing, or it can use hexagonal blocks or other geographic block granularity to discretize the source location included in the acquired order information, and the embodiments of the present application are not limited to this.
[0165] As an example, after determining M candidate areas, for the first candidate area among the M candidate areas, the server can select order information including the source location located in the first candidate area from the acquired order information, count the number of selected order information, and obtain the total order volume of the first candidate area, where the first candidate area is any candidate area among the M candidate areas. Similarly, the total order volume of other candidate areas among the M candidate areas can be determined. For the first resource capacity object among the K resource capacity objects, at least one candidate area including the source location included in the order information of the orders historically received by the first resource capacity object is determined from the M candidate areas, and the determined at least one candidate area is used as the candidate area historically arrived by the first resource capacity object, where the first resource capacity object is any resource capacity object among the K resource capacity objects. From the order information of the acquired orders, select order information including the source location located in each candidate area historically arrived, count the number of selected order information, and obtain the order volume of the first resource capacity object in each candidate area historically arrived. Similarly, the candidate areas historically reached by other resource capacity objects among the K resource capacity objects and the number of orders received in each candidate area historically reached by other resource capacity objects among the K resource capacity objects can be determined.
[0166] It should be noted that the total number of orders received in each candidate area can reflect the order density of each candidate area, the candidate areas that each resource capacity object has historically arrived at can reflect the areas that each resource capacity object has historically visited, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at can reflect the areas that each resource capacity object often visits. With this information, the genetic algorithm can be used to recommend permanent areas from a global perspective, thereby avoiding the influence of subjective factors.
[0167] For example, the K resource capacity objects are object 1, object 2, object 3, object 4, and object 5. Object 1 has received 50 orders in the past, and the order information of these 50 orders includes 20 source locations 1, 12 source locations 2, 5 source locations 3, 3 source locations 4, and 10 source locations 5. Object 2 has received 20 orders in the past, and the order information of these 20 orders includes 8 source locations 1, 4 source locations 3, 2 source locations 5, and 6 source locations 6. Object 3 has received 80 orders in the past, and the order information of these 80 orders includes 15 source locations 1, 20 source locations 2, 13 source locations 5, 7 source locations 6, and 25 source locations 7. Object 4 has received 30 orders in the past, and the order information of these 30 orders includes 10 source locations 3, 8 source locations 4, and 12 source locations 5. Object 5 has received 40 orders in the history, and the order information of these 40 orders includes 18 from source location 4, 15 from source location 5, and 7 from source location 6.
[0168] Assume that three candidate areas are determined by the acquired order information, namely candidate area 1, candidate area 2 and candidate area 3. Candidate area 1 includes source location 1, source location 2 and source location 3, candidate area 2 includes source location 4 and source location 5, and candidate area 3 includes source location 6 and source location 7. Through statistics, the total number of orders received in candidate area 1 is 94, the total number of orders received in candidate area 2 is 81, and the total number of orders received in candidate area 3 is 45. The candidate areas that objects 1 and 4 have historically arrived at are both candidate area 1 and candidate area 2, the candidate areas that objects 2 and 3 have historically arrived at are both candidate area 1, candidate area 2 and candidate area 3, and the candidate areas that object 5 has historically arrived at are candidate area 2 and candidate area 3. The number of orders received by object 1 in candidate area 1 is 37, and the number of orders received by object 1 in candidate area 2 is 13. The number of orders received by object 2 in candidate area 1 is 12, the number of orders received by object 2 in candidate area 2 is 2, and the number of orders received by object 2 in candidate area 3 is 6. The number of orders for object 3 in candidate area 1 is 35, the number of orders for object 3 in candidate area 2 is 13, and the number of orders for object 3 in candidate area 3 is 32. The number of orders for object 4 in candidate area 1 is 10, and the number of orders for object 4 in candidate area 2 is 20. The number of orders for object 5 in candidate area 2 is 33, and the number of orders for object 5 in candidate area 3 is 7.
[0169] Step 303: According to the determined M candidate regions, N chromosomes are determined, each chromosome includes K gene positions corresponding to K resource capacity objects, and the elements on each gene position are used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2.
[0170] Since the embodiment of the present application recommends the resident areas of resource capacity objects through a genetic algorithm, it is necessary to generate an initialization population for the genetic algorithm, that is, to determine N chromosomes. In some embodiments, the server can randomly determine the N chromosomes based on the determined M candidate areas. Of course, the server can also determine the N chromosomes based on the total number of orders for each candidate area in the M candidate areas, that is, if the total number of orders for a candidate area is larger, the probability of this candidate area appearing in the N chromosomes is greater, so it is possible that the same chromosome or different chromosomes will have the same elements at the gene position.
[0171] It should be noted that, since the elements on the gene positions included in the chromosome are used to indicate one of the M candidate regions, the elements on the gene positions can usually be set as the number of the candidate region. In addition, the chromosome can be encoded in a decimal encoding method or in other ways, that is, the elements on the gene positions included in the chromosome can be encoded in a decimal encoding method or in other ways.
[0172] Since each chromosome includes K gene bits corresponding to K resource capacity objects, the elements on each gene bit are used to indicate one candidate region among M candidate regions, that is, the length of a chromosome represents the number of resource capacity objects to be solved. Therefore, the genetic algorithm can flexibly adjust the length of the chromosome to adapt to the changes in the number of resource capacity objects, thereby improving the scalability of the method.
[0173] For example, Figure 3 A chromosome is shown, which is encoded in decimal and includes 6 gene bits, that is, the number of resource transport objects that need to be solved is 6. The first gene bit represents candidate area 10, the second gene bit represents candidate area 6, the third gene bit represents candidate area 72, the fourth gene bit represents candidate area 88, the fifth gene bit represents candidate area 10, and the sixth gene bit represents candidate area 24.
[0174] Step 304: Determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached.
[0175] During the evolution of chromosomes, fitness is used to evaluate the quality of chromosomes. The greater the fitness, the better the chromosome. Conversely, the smaller the fitness, the worse the chromosome. The size of fitness can be used to determine which chromosomes can be directly inherited to the next generation and which chromosomes need subsequent crossover and mutation.
[0176] In some embodiments, the server may determine the fitness of each of the N chromosomes through the following steps (1)-(2):
[0177] (1) For the first chromosome, according to the total number of orders received in each candidate area, determine the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object. The first chromosome is any chromosome among the N chromosomes, and the distance between each candidate area included in the candidate area set corresponding to each resource capacity object and the candidate area indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold.
[0178] It should be understood that the distance threshold may be set in advance or may be set when recommending the resident area, and the distance threshold may be determined based on experience or big data.
[0179] As an example, the server may determine the order quantity of a resource capacity object in a candidate area included in the corresponding candidate area set by using the following first formula. Specifically, for the first chromosome, the server may determine the order quantity of the resource capacity object k in the candidate area j included in the corresponding candidate area set by using the following first formula:
[0180] First formula:
[0181] In the first formula above, cap ijk Indicates that when the candidate region j indicated by the element on the gene position corresponding to the resource transport object k in the first chromosome is the permanent region of the resource transport object k, the number of orders received by the resource transport object k in the candidate region i included in the corresponding candidate region set, order i represents the total number of orders received in candidate area i, dis ij represents the distance between candidate region i and candidate region j, G j represents the set of candidate regions corresponding to resource capacity object k, order n The candidate area set corresponding to the resource capacity object k includes candidate areas n, dis nj Represents the distance between candidate region n and candidate region j.
[0182] Through the above first formula, it is possible to calculate the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object. Similarly, it is also possible to calculate the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in other chromosomes is used as the permanent area of the corresponding resource capacity object through the above first formula.
[0183] (2) Determine the fitness of the first chromosome based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached.
[0184] In some embodiments, the server may determine the fitness of the first chromosome through the following steps ad, including:
[0185] Step a: According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object.
[0186] In some embodiments, the server can determine the total order quantity of K resource capacity objects in the same candidate area based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, and then determine the total order quantity of each resource capacity object based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set and the total order quantity of the K resource capacity objects in the same candidate area.
[0187] As an example, the server can superimpose the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set according to the differences between resource capacity object k and resident area j, so as to obtain the total number of orders received by K resource capacity objects in the same candidate area. And divide the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set by the total number of orders received by K resource capacity objects in the same candidate area, and then superimpose according to candidate area i to obtain the total number of orders received by each resource capacity object. That is, the server can determine the total number of orders received by K resource capacity objects in the same candidate area by the following second formula, and determine the total number of orders received by each resource capacity object by the following third formula:
[0188] Second formula:
[0189] The third formula:
[0190] In the second formula above, cap i represents the total number of orders received by K resource transport objects in the same candidate area i, G i represents a set of candidate regions whose distance from candidate region i is less than the distance threshold. In the third formula above, cnt k Indicates the total number of orders received by resource capacity object k.
[0191] Step b: Determine the order quantity balance according to the total order quantity of each resource capacity object.
[0192] In some embodiments, the server may determine the average order quantity of the total order quantity of K resource capacity objects. Determine the average absolute error between the total order quantity and the average order quantity of each resource capacity object to obtain K average absolute errors. The average of the K average absolute errors is determined as the order quantity balance. That is, the server may add the total order quantity of the K resource capacity objects, and then divide the added value by K to obtain the average order quantity of the total order quantity of the K resource capacity objects. Afterwards, calculate the average absolute error between the total order quantity and the average order quantity of each resource capacity object to obtain K average absolute errors, and the average value obtained by superimposing the K average absolute errors is determined as the order quantity balance.
[0193] As an example, the server may determine the order balance degree by the following fourth formula:
[0194] The fourth formula:
[0195] In the fourth formula above, equ represents the single quantity balance, cnt avg Represents the average order quantity of the total order quantity of K resource capacity objects.
[0196] Step c: determine the familiarity of each resource capacity object based on the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set.
[0197] In some embodiments, for the first resource capacity object, the server can select at least one order quantity from the order quantity in each candidate area that the first resource capacity object has historically arrived at, and the at least one order quantity refers to the order quantity in the candidate area that the first resource capacity object has historically arrived at and has an intersection with the candidate area set corresponding to the first resource capacity object, and the first resource capacity object is any resource capacity object among the K resource capacity objects. Then, the at least one order quantity is added to obtain a first order quantity, and the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set is added to obtain a second order quantity, and the quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
[0198] That is, the server can divide the total number of orders in the candidate areas that have an intersection with the candidate area set corresponding to the first resource capacity object among the candidate areas historically reached by the first resource capacity object by the sum of the number of orders of each candidate area included in the candidate area set corresponding to the first resource capacity object to obtain the familiarity of the first resource capacity object. As an example, the server can calculate the familiarity of the first resource capacity object through the following fifth formula. Specifically, the familiarity of the resource capacity object k can be calculated through the following fifth formula:
[0199] The fifth formula:
[0200] Among them, in the above fifth formula, fam jk represents the familiarity of resource transport object k, G overlap G represents the set of candidate areas that have an intersection with the set of candidate areas corresponding to resource capacity object k among the candidate areas that resource capacity object k has historically arrived at. j Represents the set of candidate regions corresponding to the resource capacity object k.
[0201] Step d: Determine the fitness of the first chromosome according to the total order quantity, order balance degree and familiarity degree of each resource capacity object.
[0202] Since fitness is for chromosomes, the fitness of the first chromosome can be determined by the total order volume, order balance and familiarity of the K resource capacity objects on the first chromosome. As an example, the server can determine the fitness of a chromosome by the following sixth formula. Specifically, for the first chromosome, the server can determine the fitness of the first chromosome by the following sixth formula:
[0203] Sixth formula: f(x) = f(x) 1 -f(x) 2 +f(x) 3
[0204] In the sixth formula above, f(x) represents the fitness of the first chromosome, and f(x) 1 represents the sum of the total orders received by each resource capacity object, f(x) 2 represents the single quantity balance, f(x) 3 Represents the sum of the familiarity of each resource capacity object.
[0205] It should be noted that the operation of determining the fitness of other chromosomes among the N chromosomes is similar to the operation of determining the fitness of the first chromosome. The specific implementation process can refer to the relevant description of determining the fitness of the first chromosome above, and the embodiment of the present application will not go into details.
[0206] It should be noted that the formulas and methods involved in the above-mentioned process of determining the fitness of chromosomes are only examples of embodiments of the present application. In other embodiments, other factors that may affect the efficiency of resource allocation and resource capacity object allocation may also be considered when calculating the fitness of chromosomes. The embodiments of the present application do not limit this.
[0207] Step 305: Evolve the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes.
[0208] In some embodiments, the server may evolve the N chromosomes through the following steps (1)-(5):
[0209] (1) Select S chromosomes from the N chromosomes in descending order of their fitness, where S is a positive integer greater than or equal to 1.
[0210] Since fitness is used to evaluate the quality of chromosomes, and the greater the fitness, the better the chromosome, and vice versa, the smaller the fitness, the worse the chromosome, and if the chromosomes with larger fitness are crossed and mutated, the better chromosomes are likely to be destroyed, thus failing to achieve the purpose of accumulating better genes, it is necessary to first select S chromosomes with larger fitness from N chromosomes, retain these chromosomes, and directly inherit them to the next generation. That is, through the elite retention strategy, chromosomes with larger fitness can be directly inherited to the next generation without crossover and mutation, which can avoid the optimal chromosome being destroyed due to crossover and mutation operations, resulting in the genetic algorithm failing to converge to the global optimal solution.
[0211] In some embodiments, the server may select the first S chromosomes with the largest fitness from the N chromosomes in descending order of the fitness of the N chromosomes, and the S chromosomes will not be subjected to subsequent crossover and mutation operations but will directly enter the next generation and become part of the N chromosomes of the next generation. S may be set in advance, and of course, S may also be obtained by multiplying a preset ratio threshold by N.
[0212] It should be noted that the elite retention strategy is an exemplary method of selecting S chromosomes from N chromosomes in the order of the fitness of the N chromosomes from large to small in the embodiment of the present application. In other embodiments, S chromosomes can also be selected from N chromosomes by other methods such as optimal individual preservation, and the embodiment of the present application is not limited to this.
[0213] (2) Select T chromosomes from the remaining chromosomes, where T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N.
[0214] It is worth noting that when selecting T chromosomes from the remaining chromosomes, chromosomes with too small fitness may be eliminated. In this way, after selecting S chromosomes with large fitness from N chromosomes, when selecting the remaining chromosomes, it is necessary to ensure that the total number of chromosomes in the next generation is the same as the total number of chromosomes in the previous generation, that is, the sum of S and T must be equal to N. In this way, because some chromosomes will be eliminated during the selection process, at least two repeated chromosomes may appear in the T chromosomes selected.
[0215] For example, suppose there are 10 chromosomes, the first 2 are selected using the elite retention strategy, and the remaining 8 are selected by random traversal sampling. Suppose the 6th and 8th chromosomes are both selected twice, while the 4th and 7th chromosomes are eliminated, then the 6th and 8th chromosomes of the previous generation will be repeated in the 10 chromosomes selected for the next generation.
[0216] It should be noted that the server can select T chromosomes from the remaining chromosomes by using a random traversal sampling method, a tournament selection method, a roulette selection method, etc., and this embodiment of the present application does not limit this.
[0217] (3) According to the crossover probability and mutation probability, crossover and mutation are performed on the T chromosomes.
[0218] It should be understood that both the crossover probability and the mutation probability can be set in advance and remain unchanged during the entire algorithm execution process, and can also be set when recommending the resident area.
[0219] In some embodiments, after selecting T chromosomes from the remaining chromosomes, the T chromosomes are randomly paired in pairs, and a random number [0,1] is generated for each pair of chromosomes. The random number is compared with the crossover probability. If the random number is greater than the crossover probability, it is determined that the pair of chromosomes is to be crossovered. Otherwise, if the random number is not greater than the crossover probability, the pair of chromosomes is not crossovered. As an example, when it is determined that the pair of chromosomes needs to be crossovered, the server can randomly select some gene positions from the pair of chromosomes for crossover. For example, see Figure 5 , the server can select the third gene position and the fourth gene position from the pair of chromosomes for crossover to obtain a new pair of chromosomes.
[0220] It should be noted that the crossover operation described above is a two-point crossover. In other embodiments, other crossover operators such as a single-point crossover and a uniform crossover may also be used for the operation, and the embodiments of the present application do not limit this.
[0221] In some embodiments, when performing mutation operations on the selected T chromosomes, firstly, a random number in the range of [0,1] is randomly generated for a certain chromosome. If the random number is greater than the mutation probability, it is determined that the chromosome is mutated. Otherwise, if the random number is not greater than the mutation probability, the chromosome is not mutated. As an example, when it is determined that the chromosome needs to be mutated, the server can randomly select some gene positions from the chromosome for mutation.
[0222] For example, see Figure 6 , the server can select the third gene position from this chromosome to mutate, and can use the number of any candidate region in the M candidate regions as the mutated gene position, so as to obtain a new chromosome.
[0223] It should be noted that the mutation operation described above is a single-point mutation. In other embodiments, other mutation operators such as uniform mutation and Gaussian mutation may also be used for the operation, which is not limited in the embodiments of the present application.
[0224] (4) The S chromosomes and the mutated T chromosomes are taken as the evolved N chromosomes. The fitness of each chromosome in the evolved N chromosomes is determined according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached.
[0225] After the previous generation of chromosomes is subjected to selection, crossover, and mutation operations, a new generation of chromosomes is obtained. The new generation of chromosomes can be called evolved chromosomes. At this time, the fitness of each of the N evolved chromosomes can be determined according to the method of step 304.
[0226] It should be noted that after determining the fitness of each chromosome in the N chromosomes after evolution, the current evolution generation can also be determined. If the current evolution generation is less than the maximum evolution generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution is the same, it is determined that the algorithm convergence condition is currently met. Otherwise, it is determined that the algorithm convergence condition is not currently met. H is a positive integer greater than or equal to 2. The maximum evolution generation can be set in advance and remain unchanged during the entire algorithm execution process, and can also be set when recommending the resident area.
[0227] (5) If the algorithm convergence condition is not met at present, then for the N evolved chromosomes, return to execute step (1) until the algorithm convergence condition is met.
[0228] The evolution of chromosomes is a cyclic process, that is, the genes included in the chromosomes are evolved. In this way, when the algorithm convergence conditions are met, a chromosome with the largest fitness can be selected from the N chromosomes after the final evolution, and the candidate area indicated by the elements on the gene positions included in the selected chromosome can be used as the permanent area of the corresponding resource capacity object.
[0229] Step 306: During the evolution process, if the algorithm convergence condition is currently met, a permanent area of at least one of the K resource capacity objects is recommended based on the chromosome with the largest fitness among the N chromosomes obtained after the last evolution.
[0230] In some embodiments, if the algorithm convergence condition is currently met, then the chromosome with the largest fitness among the N chromosomes obtained in the last evolution is the optimal solution of the genetic algorithm. At this time, for at least one resource capacity object among the K resource capacity objects that needs to have a permanent area recommended, the candidate area indicated by the elements on the gene positions included in the chromosome with the largest fitness among the N chromosomes obtained in the last evolution can be recommended as the permanent area of the corresponding resource capacity object.
[0231] In the embodiment of the present application, the permanent area of at least one of the K resource capacity objects can be recommended through a genetic algorithm based on the order information of the orders received by the K resource capacity objects in the past. That is, the permanent area of at least one of the K resource capacity objects is recommended from a global perspective through a genetic algorithm, which is relatively objective and not affected by subjective factors. This solves the problem that the resource capacity objects are highly subjective when setting permanent points by themselves, which may affect the order allocation and resource capacity object allocation efficiency, and ensures the overall effect of order allocation.
[0232] Figure 7 is a schematic diagram of the structure of a resident area recommendation device provided in an embodiment of the present application. The device can be implemented by software, hardware, or a combination of both. Figure 7 The device includes: an acquisition module 701, a determination module 702 and a recommendation module 703.
[0233] The acquisition module 701 is used to acquire order information of orders received historically by K resource capacity objects, where the order information includes the source location of the resource, and K is a positive integer greater than or equal to 2;
[0234] The determination module 702 is used to determine, based on the acquired order information, M candidate areas, the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that has historically arrived at, where M is a positive integer greater than or equal to 1;
[0235] The recommendation module 703 is used to recommend the permanent area of at least one of the K resource capacity objects through a genetic algorithm based on the M candidate areas, the total number of orders received in each candidate area, the candidate areas where each resource capacity object has historically arrived, and the number of orders received by each resource capacity object in each candidate area where it has historically arrived.
[0236] Optionally, the recommendation module 703 includes:
[0237] The first determination submodule is used to determine N chromosomes according to the M candidate regions, each chromosome includes K gene bits corresponding to the K resource capacity objects, and the elements on each gene bit are used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2;
[0238] The second determination submodule is used to determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached;
[0239] An evolution submodule is used to evolve the N chromosomes according to the total number of orders received in each candidate area, the candidate areas that each resource transport object has historically arrived at, the number of orders received by each resource transport object in each candidate area that it has historically arrived at, and the fitness of each chromosome in the N chromosomes;
[0240] The recommendation submodule is used to recommend the permanent area of at least one of the K resource capacity objects according to the chromosome with the largest fitness among the N chromosomes obtained after the last evolution if the algorithm convergence condition is currently met during the evolution process.
[0241] Optionally, the evolution submodule includes:
[0242] A first selection unit is used to select S chromosomes from the N chromosomes in descending order of fitness of the N chromosomes, where S is a positive integer greater than or equal to 1;
[0243] A second selection unit is used to select T chromosomes from the remaining chromosomes, where T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N;
[0244] The evolution unit is used to perform crossover and mutation on T chromosomes according to the crossover probability and mutation probability;
[0245] The first determination unit is used to use the S chromosomes and the mutated T chromosomes as the evolved N chromosomes, and determine the fitness of each chromosome in the evolved N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached;
[0246] The trigger unit is used to trigger the first selection unit to select S chromosomes from the N chromosomes in the order of the fitness of the N chromosomes from large to small, if the algorithm convergence condition is not met at present, for the evolved N chromosomes, until the algorithm convergence condition is met.
[0247] Optionally, the second determining submodule includes:
[0248] A second determining unit is used to determine, for the first chromosome, based on the total number of orders received in each candidate area, the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0249] The first chromosome is any chromosome among the N chromosomes, and the distance between each candidate region included in the candidate region set corresponding to each resource capacity object and the candidate region indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold;
[0250] The third determination unit is used to determine the fitness of the first chromosome based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at.
[0251] Optionally, the third determining unit includes:
[0252] A first determination subunit is used to determine, based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object;
[0253] The second determination subunit is used to determine the order quantity balance according to the total order quantity of each resource capacity object;
[0254] The third determination subunit is used to determine the familiarity of each resource capacity object according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set;
[0255] The fourth determination subunit is used to determine the fitness of the first chromosome according to the total order quantity, order balance degree and familiarity of each resource capacity object of each resource capacity object.
[0256] Optionally, the first determining subunit is mainly used for:
[0257] According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of K resource capacity objects in the same candidate area;
[0258] The total order quantity of each resource capacity object is determined according to the order quantity of each candidate area included in the corresponding candidate area set of each resource capacity object and the total order quantity of K resource capacity objects in the same candidate area.
[0259] Optionally, the second determining subunit is mainly used for:
[0260] Determine the average order quantity of the total order quantity of K resource capacity objects;
[0261] Determine the mean absolute error between the total order volume and the average order volume of each resource capacity object to obtain K mean absolute errors;
[0262] The average of the K mean absolute errors is determined as the single quantity balance.
[0263] Optionally, the third determining subunit is mainly used for:
[0264] For the first resource capacity object, at least one order quantity is selected from the order quantity of each candidate area historically reached by the first resource capacity object, the at least one order quantity refers to the order quantity of the candidate area historically reached by the first resource capacity object that has an intersection with the candidate area set corresponding to the first resource capacity object, and the first resource capacity object is any resource capacity object among the K resource capacity objects;
[0265] Add at least one order quantity to obtain a first order quantity, and add the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set to obtain a second order quantity;
[0266] The quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
[0267] Optionally, the recommendation module 703 further includes:
[0268] Determine the current evolutionary generation;
[0269] If the current evolutionary generation is less than the maximum evolutionary generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution is the same, it is determined that the algorithm convergence condition is currently met; otherwise, it is determined that the algorithm convergence condition is not currently met, and H is a positive integer greater than or equal to 2.
[0270] Optionally, the determination module 702 is mainly used for:
[0271] The source location included in the acquired order information is discretized to obtain M candidate areas. Based on the acquired order information, the total number of orders received in each candidate area, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at are determined.
[0272] In the embodiment of the present application, the permanent area of at least one of the K resource capacity objects can be recommended through a genetic algorithm based on the order information of the orders received by the K resource capacity objects in the past. That is, the permanent area of at least one of the K resource capacity objects is recommended from a global perspective through a genetic algorithm, which is relatively objective and not affected by subjective factors. This solves the problem that the resource capacity objects are highly subjective when setting permanent points by themselves, which may affect the order allocation and resource capacity object allocation efficiency, and ensures the overall effect of order allocation.
[0273] It should be noted that: the resident area recommendation device provided in the above embodiment only uses the division of the above functional modules as an example when performing resident area recommendation. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the resident area recommendation device provided in the above embodiment and the resident area recommendation method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0274] Figure 8 is a schematic diagram of a structure of an electronic device provided according to an exemplary embodiment. The electronic device 800 may be the above-mentioned Figure 1 The server shown, the electronic device 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 801 and one or more memories 802, wherein the memory 802 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 801 to implement the voice navigation method in the above embodiment. Of course, the electronic device 800 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The electronic device 800 may also include other components for implementing device functions, which will not be repeated here.
[0275] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions, and the instructions can be executed by a processor in an electronic device to perform the above-mentioned embodiment. Figure 2 or Figure 3 For example, the computer readable storage medium may be a ROM (read-only memory), a RAM (random access memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0276] It is worth noting that the computer-readable storage medium mentioned in the present application may be a non-volatile storage medium, in other words, a non-transitory storage medium.
[0277] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0278] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the above Figure 2 or Figure 3 The illustrated embodiment provides a method for recommending a resident area.
[0279] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0280] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for recommending a permanent area, characterized in that: The method comprises: Obtain order information of orders received historically by K resource capacity objects, wherein the order information includes the source location of the resource, and K is a positive integer greater than or equal to 2; According to the acquired order information, determine M candidate areas, the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, where M is a positive integer greater than or equal to 1; Determine N chromosomes according to the M candidate regions, each chromosome includes K gene bits corresponding to the K resource capacity objects, and the elements on each gene bit are used to indicate one candidate region among the M candidate regions, and N is a positive integer greater than or equal to 2; Determine the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached; Evolving the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, the number of orders received by each resource transport object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes; During the evolution process, if the algorithm convergence condition is currently met, the permanent area of at least one of the K resource capacity objects is recommended based on the chromosome with the largest fitness among the N chromosomes obtained after the last evolution.
2. The method according to claim 1, characterized in that The evolving the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, the number of orders received by each resource transport object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes includes: Selecting S chromosomes from the N chromosomes in descending order of the fitness of the N chromosomes, where S is a positive integer greater than or equal to 1; Select T chromosomes from the remaining chromosomes, where T is a positive integer greater than or equal to 1, and the sum of S and T is equal to N; According to the crossover probability and the mutation probability, crossover and mutation are performed on the T chromosomes; The S chromosomes and the mutated T chromosomes are used as the evolved N chromosomes, and the fitness of each chromosome in the evolved N chromosomes is determined according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached; If the algorithm convergence condition is not met currently, then for the evolved N chromosomes, return to the step of selecting S chromosomes from the N chromosomes in descending order of the fitness of the N chromosomes until the algorithm convergence condition is met.
3. The method according to claim 1, characterized in that The step of determining the fitness of each chromosome in the N chromosomes according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached by the resource transport object includes: For the first chromosome, according to the total number of orders received in each candidate area, determine the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object; The first chromosome is any chromosome of the N chromosomes, and the distance between each candidate region included in the candidate region set corresponding to each resource capacity object and the candidate region indicated by the element on the gene position corresponding to the corresponding resource capacity object in the first chromosome is less than the distance threshold; The fitness of the first chromosome is determined based on the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically arrived at by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically arrived at.
4. The method according to claim 3, characterized in that The determining the fitness of the first chromosome according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, the candidate areas historically reached by each resource capacity object, and the order quantity of each resource capacity object in each candidate area historically reached, comprises: According to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, determine the total order quantity of each resource capacity object when the candidate area indicated by the element on the gene position included in the first chromosome is used as the permanent area of the corresponding resource capacity object; Determine the order balance based on the total order volume of each resource capacity object; Determine the familiarity of each resource capacity object according to the candidate areas that each resource capacity object has historically arrived at, the number of orders received by each resource capacity object in each candidate area that it has historically arrived at, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set; The fitness of the first chromosome is determined according to the total order quantity of each resource capacity object, the order quantity balance and the familiarity of each resource capacity object.
5. The method according to claim 4, characterized in that The total order quantity of each resource capacity object when determining, based on the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set, to use the candidate area indicated by the element on the gene position included in the first chromosome as the permanent area of the corresponding resource capacity object, includes: Determine the total order quantity of the K resource capacity objects in the same candidate area according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set; The total order quantity of each resource capacity object is determined according to the order quantity of each resource capacity object in each candidate area included in the corresponding candidate area set and the total order quantity of the K resource capacity objects in the same candidate area.
6. The method according to claim 4, characterized in that Determining the order quantity balance degree according to the total order quantity of each resource capacity object includes: Determine the average order quantity of the total order quantity of the K resource capacity objects; Determine the average absolute error between the total order quantity of each resource capacity object and the average order quantity to obtain K average absolute errors; The average value of the K mean absolute errors is determined as the single quantity balance degree.
7. The method according to claim 4, characterized in that The determining the familiarity of each resource capacity object according to the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the number of orders received by each resource capacity object in each candidate area included in the corresponding candidate area set includes: For a first resource capacity object, at least one order quantity is selected from the order quantity of each candidate area historically reached by the first resource capacity object, the at least one order quantity refers to the order quantity of a candidate area that has an intersection with the set of candidate areas corresponding to the first resource capacity object among the candidate areas historically reached by the first resource capacity object, and the first resource capacity object is any one of the K resource capacity objects; Adding the at least one order quantity to obtain a first order quantity, and adding the order quantity of the first resource capacity object in each candidate area included in the corresponding candidate area set to obtain a second order quantity; The quotient between the first order quantity and the second order quantity is determined as the familiarity of the first resource capacity object.
8. The method according to any one of claims 2 to 7, characterized in that: After determining the fitness of each of the N chromosomes after evolution according to the total number of orders received in each candidate area, the candidate areas historically reached by each resource transport object, and the number of orders received by each resource transport object in each candidate area historically reached, the method further includes: Determine the current evolutionary generation; If the current evolutionary generation is less than the maximum evolutionary generation, or the chromosome with the largest fitness among the N chromosomes after H consecutive generations of evolution are the same, it is determined that the algorithm convergence condition is currently met; otherwise, it is determined that the algorithm convergence condition is not currently met, and H is a positive integer greater than or equal to 2.
9. The method according to claim 1, characterized in that The method of determining, based on the acquired order information, M candidate areas, the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, includes: Discretize the source location included in the acquired order information to obtain the M candidate areas; Based on the acquired order information, determine the total number of orders received in each candidate area, the candidate areas that each resource capacity object has historically arrived at, and the number of orders received by each resource capacity object in each candidate area that it has historically arrived at.
10. A resident area recommendation device, characterized in that: The device comprises: An acquisition module, used to acquire order information of orders received historically by K resource capacity objects, wherein the order information includes a source location of the resource, and K is a positive integer greater than or equal to 2; A determination module, configured to determine, based on the acquired order information, M candidate areas, a total order volume of each candidate area, a candidate area historically reached by each resource capacity object, and an order volume of each resource capacity object in each candidate area historically reached, where M is a positive integer greater than or equal to 1; The recommendation module includes a first determination submodule, a second determination submodule, an evolution submodule and a recommendation submodule, wherein the first determination submodule is used to determine N chromosomes according to the M candidate areas, each chromosome includes K gene bits corresponding to the K resource capacity objects one by one, and the elements on each gene bit are used to indicate one candidate area among the M candidate areas, and N is a positive integer greater than or equal to 2; the second determination submodule is used to determine the total number of orders received in each candidate area, the candidate areas historically reached by each resource capacity object, and the number of orders received by each resource capacity object in each candidate area historically reached, The fitness of each chromosome in the N chromosomes is determined; the evolution submodule is used to evolve the N chromosomes according to the total number of orders in each candidate area, the candidate areas historically reached by each resource capacity object, the number of orders received by each resource capacity object in each candidate area historically reached, and the fitness of each chromosome in the N chromosomes; the recommendation submodule is used to recommend a permanent area for at least one of the K resource capacity objects based on the chromosome with the largest fitness among the N chromosomes obtained after the last evolution during the evolution process if the algorithm convergence condition is currently met.
11. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to execute the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
D2D communication resource optimization method based on multi-population genetic algorithm
CN106792451A
Recommended data obtaining method and device
CN106874503A