Logistics resource allocation method and device, equipment and storage medium

By accelerating the scheduling and allocation of logistics resources using genetic and dynamic allocation strategies, the problem of poor scalability in logistics resource data processing was solved, thereby improving resource utilization and optimizing load balancing.

CN113191534BActive Publication Date: 2026-05-26SHANGHAI DONGPU INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI DONGPU INFORMATION TECH CO LTD
Filing Date
2021-04-14
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing data processing methods for logistics resources suffer from poor scalability. In particular, as the growth rate of logistics resources continues to increase, the speed of server performance iteration cannot keep up, resulting in a decline in logistics data processing efficiency.

Method used

An accelerated genetic strategy is adopted to schedule storage tasks and a dynamic allocation strategy is adopted to allocate logistics resources. By reorganizing the initial storage task population until the optimal storage task population is obtained, it is allocated to the storage nodes of the target data processing cluster to achieve optimal resource allocation.

Benefits of technology

It improves the resource utilization of each task in the cluster environment and optimizes the load balancing of each task in the cluster environment, thereby improving the processing efficiency of logistics resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113191534B_ABST
    Figure CN113191534B_ABST
Patent Text Reader

Abstract

The present application relates to the field of logistics resource management and control, and discloses a logistics resource allocation method, device, equipment and storage medium. The method comprises the following steps: obtaining an initial storage task population corresponding to a to-be-controlled logistics resource; continuously recombining a task individual corresponding to each first storage task by using a preset acceleration genetic strategy until the initial storage task population meets a preset optimization condition, and then stopping the recombination to obtain an optimal storage task population; pre-allocating the to-be-controlled logistics resource to each processing node corresponding to a second storage task by using a preset dynamic allocation strategy to obtain an initial allocation decision sequence of the to-be-controlled logistics resource in each processing node; and stopping the allocation until the initial allocation decision sequence meets an allocation condition, and then taking the initial allocation decision sequence as an optimal allocation decision sequence. The present application realizes cloud storage of logistics resources on multiple general servers, improves the storage utilization of the general servers, and optimizes the system load balancing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics resource management and control, and in particular to a method, apparatus, equipment and storage medium for logistics resource allocation. Background Technology

[0002] The current pace of socio-economic development is accelerating, especially in the logistics industry, which is experiencing explosive growth. The number of express deliveries is growing at an astonishing rate. This massive volume of deliveries is accompanied by a sharp increase in the storage of logistics resources, posing a significant challenge to optimizing logistics resource storage technology. Faced with rapid business growth and massive data expansion, the traditional approach is to purchase higher-performance software and main servers. However, as the growth rate of logistics resources continues to increase, the speed of server performance iteration cannot keep up in practice. The low horizontal scalability of servers undoubtedly leads to a gradual decline in the efficiency of logistics data processing as logistics resources grow. Therefore, existing methods for processing logistics resources suffer from poor scalability. Summary of the Invention

[0003] The main objective of this invention is to solve the technical problem of poor scalability in existing data processing methods for logistics resources.

[0004] The first aspect of this invention provides a method for allocating logistics resources, comprising: obtaining an initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals; calculating the storage efficiency of each task individual, and calculating the fitness of each task individual in the initial storage task population based on the storage efficiency of each task individual; recombining each task individual using a preset accelerated genetic strategy based on the fitness of each task individual in the initial storage task population to obtain a new storage task population; if the new storage task population satisfies preset optimization conditions, outputting an optimal storage task population, and generating an optimal allocation decision sequence using a preset dynamic allocation strategy, and allocating each task individual in the optimal storage task population to a storage node corresponding to a target data processing cluster according to the optimal decision allocation sequence.

[0005] Optionally, in a first implementation of the first aspect of the present invention, the step of generating the optimal allocation decision sequence using a preset dynamic allocation strategy includes: allocating each task in the optimal storage task population to a storage node corresponding to the target data processing cluster based on the distribution of the data to be stored corresponding to each task individual and the preset load capacity of each storage node in the target data processing cluster, thereby obtaining an initial allocation decision sequence; determining whether the initial allocation decision sequence satisfies the preset allocation conditions; if it does, outputting the optimal allocation decision sequence; otherwise, re-allocating each task individual in the optimal storage task population until the obtained initial allocation decision sequence satisfies the allocation conditions, and then outputting the optimal allocation decision sequence.

[0006] Optionally, in a second implementation of the first aspect of the present invention, the step of allocating each individual task in the optimal storage task population to a storage node corresponding to the target data processing cluster based on the distribution of data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster to obtain an initial allocation decision sequence includes: determining the storage tasks included in each individual task in the optimal storage task population, and performing virtualization processing on each storage node in the target data processing cluster to obtain multiple storage sub-nodes; determining the storage data distribution corresponding to each storage task based on the storage data distribution corresponding to each individual task, and calculating the initial state variables corresponding to each storage task based on the storage data distribution corresponding to each storage task; determining the load capacity of each storage sub-node based on the preset load capacity of each storage node, and sequentially calculating the optimal decision variables of each storage sub-node based on the load capacity of each storage sub-node and the initial state variables; and sequentially allocating each storage task to the corresponding storage sub-node based on the optimal decision variables of each storage sub-node to obtain an initial allocation decision sequence.

[0007] Optionally, in a third implementation of the first aspect of the present invention, the step of recombining each task individual with a preset accelerated genetic strategy based on the fitness of each task individual in the initial storage task population to obtain a new storage task population includes: determining a pre-convergence threshold corresponding to a preset genetic algorithm and the fitness distribution of each task individual in the initial storage task population based on the fitness of each task individual in the initial storage task population; detecting a pre-convergence index of the preset genetic algorithm and determining whether the pre-convergence index is less than the pre-convergence threshold; if the pre-convergence index is less than the pre-convergence threshold, changing the preset recombination threshold in the genetic algorithm to obtain an accelerated genetic algorithm; and recombining each task individual with the accelerated genetic algorithm according to the fitness distribution of each task individual in the initial storage task population to obtain a new storage task population.

[0008] Optionally, in a fourth implementation of the first aspect of the present invention, the step of using the accelerated genetic algorithm to recombine each task individual according to the fitness distribution of each task individual in the initial storage task population to obtain a new storage task population includes: calculating the breeding selection probability of each task individual in the initial storage task population according to the fitness distribution of each task individual in the initial storage task population; determining whether each task individual meets the preset population size of the initial storage task population according to the breeding selection probability of each task individual; if it does, taking the corresponding task individual as the parent task individual, and randomly matching each pair of task individuals; using a preset breeding algorithm to perform cross-recombination on each pair of randomly matched task individuals, outputting the corresponding offspring task individuals, and combining each of the offspring task individuals to obtain a new storage task population.

[0009] Optionally, in the fifth implementation of the first aspect of the present invention, the step of using a pre-set breeding algorithm to perform cross-recombination on each of two randomly matched task individuals and outputting corresponding offspring task individuals includes: randomly generating the cross-probability of each of two matched task individuals within a pre-set cross-probability interval, and performing cross-transformation processing on each of two task individuals whose cross-probability is less than a pre-set cross-probability threshold to obtain multiple offspring task individuals; randomly generating the mutation probability of each of the offspring task individuals within a pre-set mutation probability interval, and performing mutation transformation processing on the offspring task individuals whose mutation probability is less than a pre-set mutation probability threshold.

[0010] A second aspect of the present invention provides a logistics resource allocation device, comprising:

[0011] The system comprises the following modules: an acquisition module for acquiring an initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals; a fitness calculation module for calculating the storage efficiency of each task individual and, based on the storage efficiency of each task individual, calculating the fitness of each task individual in the initial storage task population; a recombination module for recombinating each task individual based on its fitness in the initial storage task population using a preset accelerated genetic strategy to obtain a new storage task population; and an allocation module for outputting an optimal storage task population if the new storage task population meets preset optimization conditions, generating an optimal allocation decision sequence using a preset dynamic allocation strategy, and allocating each task individual in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence.

[0012] Optionally, in a first implementation of the second aspect of the present invention, the allocation module includes: an allocation unit, configured to allocate each individual task in the optimal storage task population to a storage node corresponding to the target data processing cluster based on the distribution of the data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, thereby obtaining an initial allocation decision sequence; and a discrimination unit, configured to determine whether the initial allocation decision sequence satisfies the preset allocation conditions; if it does, the optimal allocation decision sequence is output; otherwise, each individual task in the optimal storage task population is re-allocated until the obtained initial allocation decision sequence satisfies the allocation conditions, at which point the optimal allocation decision sequence is output.

[0013] Optionally, in a second implementation of the second aspect of the present invention, the allocation unit is further configured to: determine the storage tasks included in each individual task in the optimal storage task population, and perform virtualization processing on each storage node in the target data processing cluster to obtain multiple storage sub-nodes; determine the storage data distribution corresponding to each storage task based on the storage data distribution corresponding to each individual task, and calculate the initial state variable corresponding to each storage task based on the storage data distribution corresponding to each storage task; determine the load capacity of each storage sub-node based on the preset load capacity of each storage node, and calculate the optimal decision variable of each storage sub-node sequentially based on the load capacity of each storage sub-node and the initial state variable; and allocate each storage task to the corresponding storage sub-node sequentially based on the optimal decision variable of each storage sub-node to obtain an initial allocation decision sequence.

[0014] Optionally, in a third implementation of the second aspect of the present invention, the recombination module includes: a determining unit, configured to determine a pre-convergence threshold corresponding to a preset genetic algorithm and the fitness distribution of each task individual in the initial stored task population based on the fitness of each task individual in the initial stored task population; a detecting unit, configured to detect a pre-convergence index of the preset genetic algorithm and determine whether the pre-convergence index is less than the pre-convergence threshold; an accelerating unit, configured to change a preset recombination threshold in the genetic algorithm to obtain an accelerated genetic algorithm if the pre-convergence index is less than the pre-convergence threshold; and a recombination unit, configured to recombine each task individual using the accelerated genetic algorithm according to the fitness distribution of each task individual in the initial stored task population to obtain a new stored task population.

[0015] Optionally, in a fourth implementation of the second aspect of the present invention, the recombination unit is further configured to: calculate the breeding selection probability of each task individual in the initial storage task population based on the fitness distribution of each task individual in the initial storage task population; determine whether each task individual meets the preset population size of the initial storage task population based on the breeding selection probability of each task individual; if it does, take the corresponding task individual as the parent task individual, and randomly match each pair of task individuals; use a preset breeding algorithm to perform cross-recombination on each pair of randomly matched task individuals, output the corresponding offspring task individuals, and combine each of the offspring task individuals to obtain a new storage task population.

[0016] Optionally, in a fifth implementation of the second aspect of the present invention, the recombination unit is further configured to: randomly generate the crossover probability of each pair of successfully matched task individuals within a preset crossover probability interval, and perform crossover transformation processing on each pair of task individuals whose crossover probability is less than a preset crossover probability threshold to obtain multiple offspring task individuals; randomly generate the mutation probability of each of the offspring task individuals within a preset mutation probability interval, and perform mutation transformation processing on the offspring task individuals whose mutation probability is less than a preset mutation probability threshold.

[0017] A third aspect of the present invention provides a logistics resource allocation device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the logistics resource allocation device to execute the above-described logistics resource allocation method.

[0018] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described logistics resource allocation method.

[0019] The technical solution provided by this invention uses an accelerated genetic strategy to schedule storage tasks and a dynamic allocation strategy to allocate logistics resources. Specifically, the initial population of storage tasks for the logistics resources to be managed is continuously reorganized using the accelerated genetic strategy until an optimal population of storage tasks is obtained, thus determining the second storage task for optimal task scheduling for each individual task. Then, using the processing nodes of each second storage task in the reorganized optimal population of storage tasks, the logistics resources to be managed are continuously allocated using the Dong'ai allocation strategy until the optimal allocation decision sequence for each processing node to handle the logistics resources to be managed is obtained. This achieves clustered processing of logistics resources, improves the resource utilization of each individual task in the clustered environment, and optimizes the load balancing of each individual task in the clustered environment. Attached Figure Description

[0020] Figure 1This is a schematic diagram of one embodiment of the logistics resource allocation method in this invention;

[0021] Figure 2 This is a schematic diagram of another embodiment of the logistics resource allocation method in this invention;

[0022] Figure 3 This is a schematic diagram of one embodiment of the logistics resource allocation device in this invention;

[0023] Figure 4 This is a schematic diagram of another embodiment of the logistics resource allocation device in this invention;

[0024] Figure 5 This is a schematic diagram of one embodiment of the logistics resource allocation device in this invention. Detailed Implementation

[0025] This invention provides a method, apparatus, device, and storage medium for allocating logistics resources. The method involves obtaining an initial population of storage tasks corresponding to the logistics resources to be managed. Based on the preset storage efficiency of each first storage task, a preset accelerated genetic strategy is used to continuously recombine the corresponding task individuals until the initial population of storage tasks meets preset optimization conditions, at which point recombination stops, resulting in an optimal population of storage tasks. A preset dynamic allocation strategy is then used to pre-allocate the logistics resources to be managed to the processing nodes corresponding to each second storage task, resulting in an initial allocation decision sequence for the logistics resources to be managed at each processing node. Allocation stops when the initial allocation decision sequence meets the allocation conditions, and this initial allocation decision sequence is taken as the optimal allocation decision sequence. This invention enables cloud storage of logistics resources on multiple general-purpose servers, improving the storage utilization of general-purpose servers and optimizing system load balancing.

[0026] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the logistics resource allocation method in this invention includes:

[0028] 101. Obtain multiple individual tasks from the initial storage task population corresponding to the logistics resources to be managed;

[0029] It is understood that the executing entity of this invention can be a logistics resource allocation device, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.

[0030] In this embodiment, the logistics resources to be managed refer to logistics resources that need to be stored. Specifically, in a clustered environment, the logistics resources are stored in the cloud, that is, the same logistics resource is stored on multiple servers. The issues involved include: how to schedule storage tasks on different servers to store different parts of a logistics resource? This invention uses an accelerated genetic strategy to schedule storage tasks; and how to evenly distribute a logistics resource across various servers for storage? This invention uses an allocation strategy to allocate logistics resources.

[0031] In addition, the initial storage task population contains multiple individual tasks that store the logistics resources to be managed. The order of these individual tasks is sequential, and each individual task contains multiple storage tasks for the logistics resources to be managed.

[0032] Specifically, the initial storage task population can be represented using an encoding format, including binary encoding, floating-point encoding, and natural number encoding. For example, by encoding the actual storage tasks with natural numbers, storage task types include storage task A, storage task B, and storage task C, corresponding to the encoding [1, 2, 3]. The order of scheduling storage tasks for the logistics resources to be managed is [3, 2, 2, 1, 3, 2, 1, 3, 1, 2, 2, 3, 3, 1, 1]. Further, the individual tasks can be determined. The storage task distribution, such as the individual tasks involved and the storage task distribution, includes: S1: {4, 7, 9, 14, 15}, S2: {2, 3, 6, 10, 11}, S3: {1, 5, 8, 12, 13}, that is, the 4th, 7th, 9th, 14th, and 15th storage tasks are run sequentially on task individual S1, the 2nd, 3rd, 6th, 10th, and 11th storage tasks are run sequentially on task individual S2, and the 1st, 5th, 8th, 12th, and 13th storage tasks are run sequentially on task individual S3.

[0033] 102. Calculate the storage efficiency of each individual task, and based on the storage efficiency of each individual task, calculate the fitness of each individual task in the initial storage task population.

[0034] In this embodiment, each storage task has a fixed storage efficiency in its corresponding storage node, which can be represented by the EES (Expected Efficiency to Store) matrix, where EES[i,j] represents the storage efficiency of the i-th storage task on the j-th storage node.

[0035] The storage efficiency of each individual task can be calculated based on the storage efficiency of each storage task within that task. Specifically, this can be done using the following formula:

[0036]

[0037] Where storage(s, i) is the efficiency value of the s-th storage node storing the i-th storage task, n is the number of storage tasks in the s-th storage node, and N is a natural number.

[0038] Then, based on the storage efficiency of each individual task, the fitness of each individual task in the initial storage task population can be further calculated, specifically using the following formula:

[0039]

[0040] Where 1≤i≤SCALE, SCALE is the size of the initial storage task population, 1≤k≤M, M is the total number of storage tasks, and S k For the k-th storage task in the i-th task individual, EFF i (S k Let be the storage efficiency of the storage task for the i-th individual task.

[0041] 103. Based on the fitness of each individual task in the initial storage task population, a pre-set accelerated genetic strategy is used to recombine each individual task to obtain a new storage task population.

[0042] In this embodiment, the accelerated genetic strategy involves replacing and recombining parts of the structure of two parent task individuals to generate two new child task individuals. This process is repeated to continuously expand the search space, ultimately achieving a global search and finding the optimal storage task population within the global cluster environment. The accelerated genetic strategy's continuous recombination of task individuals mainly includes the following three processes:

[0043] The first step is to select storage tasks. By using the storage efficiency value of each storage task, the fitness of each individual task to the entire initial storage task population is determined. Storage tasks with high fitness to the initial storage task population are selected for subsequent breeding iterations, while storage tasks with low fitness are removed.

[0044] The second step is the breeding and iteration of storage tasks. Parts of the structure of two storage tasks are recombined to obtain new storage tasks. The adaptive characteristics of the original storage tasks are retained while the adaptive characteristics of the new storage tasks are generated. Finally, storage individuals are stored according to the new storage tasks to obtain a new population of storage tasks. Mutation processing is also performed on the new storage tasks to prevent the initial storage tasks from converging too early.

[0045] The third step is to increase the probability of reproductive iteration for the storage task when it reaches a preset threshold, thereby improving the evolution speed. Accelerated evolution is achieved through reproductive iteration by adding a premature convergence metric to the reproductive iteration of the storage task. This detects whether the storage task will converge prematurely during the reproductive iteration process, and identifies areas with low premature convergence metrics.

[0046] 104. If the new storage task population meets the preset optimization conditions, output the optimal storage task population, and use the preset dynamic allocation strategy to generate the optimal allocation decision sequence. Allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence.

[0047] In this embodiment, the optimal storage task population is determined by pre-set optimization conditions. Specific optimization conditions may include: 1) the resource constraints of each storage task in the individual task, such as computation time and memory usage; 2) a task individual has already met the pre-set optimal fitness; the fitness of each task individual has reached saturation, and further breeding iteration will not produce task individuals with better fitness; 3) the number of breeding iterations; 4) a combination of two or more of the above.

[0048] In this embodiment, the dynamic allocation strategy mainly utilizes the load capacity of each storage task to allocate storage individuals to the storage nodes corresponding to the target data processing cluster. Based on the number of storage nodes corresponding to the target data processing cluster, the storage process of the storage individuals is divided into multiple storage stages. In the initial stage, the current state variable, i.e., the data distribution of each storage task, is determined. Subsequently, the decision variable for data allocation in each stage is calculated, i.e., the storage tasks allocated to each storage stage. The state variable and decision variable of the previous storage stage can determine the decision variable of the next storage stage. This process is repeated until the decision variable of each storage stage is calculated. Based on the storage variables, each storage task is allocated to each storage node to complete the allocation of storage individuals. Thus, the optimal allocation decision sequence, i.e., the distribution of each storage task on each storage node, is obtained.

[0049] Specifically, for example, the three individual tasks each include three storage tasks [A] 11 A 12 A 13 A 21 A22 A 23 A 31 A 32 A 33 After allocation, the first storage node is assigned to storage task {A}. 21 A 22 A 23 The second storage node is assigned to storage task {A}. 31 A 32 A 33 The third storage node is assigned to storage task {A}. 11 A 12 A 13}, then the optimal allocation decision sequence is [A 21 A 22 A 23 A 31 A 32 A 33 A 11 A 12 A 13 ].

[0050] In this embodiment of the invention, a genetic strategy is used to schedule storage tasks, and a dynamic allocation strategy is used to allocate logistics resources. Specifically, the initial population of storage tasks for the logistics resources to be managed is continuously reorganized using the genetic strategy until an optimal population of storage tasks is obtained, thus determining the second storage task for optimal task scheduling for each individual task. Then, using the processing nodes of each second storage task in the reorganized optimal population of storage tasks, the logistics resources to be managed are continuously allocated using the dynamic allocation strategy until the optimal allocation decision sequence for each processing node to handle the logistics resources to be managed is obtained. This achieves clustered processing of logistics resources, improves the resource utilization of each individual task in the clustered environment, and optimizes the load balancing of each individual task in the clustered environment.

[0051] Please see Figure 2 Another embodiment of the logistics resource allocation method in this invention includes:

[0052] 201. Obtain multiple task individuals from the initial storage task population corresponding to the logistics resources to be managed;

[0053] 202. Calculate the storage efficiency of each individual task, and calculate the fitness of each individual task in the initial storage task population based on the storage efficiency of each individual task.

[0054] 203. Based on the fitness of each individual task in the initial stored task population, determine the precocious convergence threshold corresponding to the preset genetic algorithm and the fitness distribution of each individual task in the initial stored task population;

[0055] In this embodiment, an accelerated evolution strategy is added to the conventional genetic algorithm. By adding a premature convergence threshold, the genetic algorithm is detected to detect whether premature convergence occurs during the genetic process. When premature convergence occurs, the crossover probability and mutation probability in the genetic algorithm are increased to suppress the convergence speed of the genetic algorithm.

[0056] Specifically, the precociousness threshold is determined based on the fitness of each individual task in the initial stored task population, by calculating the average fitness (a*10) of each individual task in the previous generation. b And b is used as the precocious convergence threshold.

[0057] 204. Detect the precocity index of the pre-set genetic algorithm and determine whether the precocity index is less than the precocity threshold;

[0058] 205. If the precocity index is less than the precocity threshold, change the preset recombination threshold in the genetic algorithm to obtain an accelerated genetic algorithm;

[0059] In this embodiment, when the premature convergence index of the genetic algorithm is detected to be less than the premature convergence threshold, it is determined that using the current crossover and mutation probabilities of the genetic algorithm will lead to premature convergence of the initial storage task population. The resulting optimal storage task population will only have the feature expression of local storage task scheduling, and will not have a global feature expression of the storage task scheduling of the overall target data processing cluster. Therefore, at this time, the crossover and mutation probabilities in the genetic algorithm are increased according to the actual situation, such as increasing them by 10 times, or increasing both the crossover and mutation probabilities to 100%.

[0060] 206. Based on the fitness distribution of each individual task in the initial storage task population, an accelerated genetic algorithm is used to recombine each individual task to obtain a new storage task population.

[0061] In this embodiment, if it is detected that the genetic algorithm may cause premature convergence in the initial storage task population, each task individual can be recombined by using an accelerated genetic algorithm that increases the crossover and mutation probabilities. Specifically, this includes the following steps:

[0062] 1) Calculate the reproductive selection probability of each individual task in the initial storage task population based on the fitness distribution of each individual task in the initial storage task population.

[0063] 2) Based on the reproduction selection probability of each task individual, determine whether each task individual meets the preset population size of the initial stored task population;

[0064] 3) If satisfied, the corresponding task individual is taken as the parent task individual, and each pair of task individuals is randomly matched.

[0065] 4) Use a pre-set breeding algorithm to cross-recombine every two randomly matched task individuals, output the corresponding offspring task individuals, and combine the offspring task individuals to obtain a new storage task population.

[0066] In this embodiment, based on the fitness distribution of each task individual in the initial storage task population, the ant colony algorithm can be used to calculate the reproduction selection probability P(t) of each task individual. If the reproduction selection probability P(t)-1 / SCALE≤0, it is determined that the corresponding task individual does not meet the preset population size of the initial storage task population; otherwise, it is determined that the corresponding task individual meets the preset population size of the initial storage task population. Here, SCALE is the population size of the initial storage task population. For example, if the initial storage task population contains 10 storage tasks, then SCALE=10. The task individuals that meet the population size are used as parent task individuals for the reproduction of offspring task individuals, specifically including the following steps:

[0067] 4.1) Randomly generate the crossover probability of every two successfully matched task individuals within the preset crossover probability interval, and perform crossover transformation on every two task individuals whose crossover probability is less than the preset crossover probability threshold to obtain multiple offspring task individuals.

[0068] 4.2) Randomly generate the mutation probability of each child task individual within the preset mutation probability range, and perform mutation transformation on the child task individuals whose mutation probability is less than the preset mutation probability threshold.

[0069] In this embodiment, the crossover probability P between every two task individuals is randomly generated within the crossover probability interval (p1, p2). a If P a Less than the pre-set crossover probability threshold P c Then, a crossover conversion is performed, generating two new offspring task individuals. The specific calculation formula is as follows:

[0070] g1 = P a G1+(1-P a G2;

[0071] g2=P a G2+(1-P a G1

[0072] Among them, g1 and g2 are child task individuals, and G1 and G2 are parent task individuals.

[0073] In this embodiment, the mutation probability P of the offspring task individual is randomly generated within the mutation probability interval (p3, p4). b If P b Less than the preset P mIf the child task is mutated, a new child task will be generated. The mutation process can include swapping, resetting, and / or shifting. For example, if the stored task in the atomic task is [2, 2, 1, 3, 3, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2], shifting the stored task at position 9 to position 3 will result in a new child task [2, 2, 2, 1, 3, 3, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2].

[0074] 207. If the new storage task population meets the preset optimization conditions, output the optimal storage task population;

[0075] 208. Based on the distribution of data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, each individual task in the optimal storage task population is assigned to the storage node corresponding to the target data processing cluster to obtain the initial allocation decision sequence.

[0076] 209. Determine whether the initial allocation decision sequence meets the preset allocation conditions;

[0077] In this embodiment, the dynamic allocation strategy essentially involves determining the state variables and decision variables for each storage stage. The state variables for each storage stage are related to the distribution of storage tasks for each individual task, while the decision variables are related to the load capacity of each storage node in the target data processing cluster. Therefore, by considering the distribution of data to be stored for each individual task and the preset load capacity of each storage node in the target data processing cluster, the allocation of individual tasks can be achieved. Furthermore, the initial allocation decision sequence obtained here is related to the distribution of tasks to be stored and the load capacity of the storage nodes, but it cannot determine the overall data content of the logistics resources to be managed. Therefore, allocation conditions are preset; that is, the initial allocation decision sequence must reach the overall data content of the logistics resources to be managed in order to determine that the initial allocation decision sequence is optimal.

[0078] 210. If the conditions are met, output the optimal allocation decision sequence. Otherwise, reallocate each individual task in the optimal storage task population until the initial allocation decision sequence satisfies the allocation conditions. Output the optimal allocation decision sequence and allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence.

[0079] In this embodiment, the dynamic allocation strategy mainly includes the following steps:

[0080] (1) Determine the storage tasks contained in each individual task in the optimal storage task population, and perform virtualization processing on each storage node in the target data processing cluster to obtain multiple storage sub-nodes.

[0081] In this embodiment, each individual task in the optimal storage task population can be divided into multiple storage tasks and assigned to different storage sub-nodes for storage. For example, multiple individual tasks of CData can be divided into m storage tasks through a consistent hash distribution strategy and assigned to n storage sub-nodes for storage. That is, the dynamic allocation strategy is to reasonably allocate m storage tasks to n storage sub-nodes to ensure that the storage efficiency and load capacity of each storage sub-node reach the optimal combination.

[0082] (2) Determine the storage data distribution for each storage task based on the storage data distribution for each individual task, and calculate the initial state variables for each storage task based on the storage data distribution for each storage task.

[0083] In this embodiment, m storage tasks are processed through n storage sub-nodes, meaning the m storage tasks are allocated to n storage sub-nodes for processing. In the dynamic allocation strategy, the data allocation of each current storage sub-node is controlled by the state variable of the storage tasks of the previous storage sub-node. The state variable represents the allocation status of the m storage tasks, expressed as the memory usage of the m storage tasks. Here, the initial state variable refers to the allocation status of the logistics resources to be managed after allocation to the nth storage sub-node, i.e., the memory usage distribution of all m storage tasks. For example, if m = 50, then the initial state variable is: [V1, V2, ..., V...]. 50 ].

[0084] (3) Determine the load capacity of each storage sub-node based on the preset load capacity of each storage node, and calculate the optimal decision variables of each storage sub-node in turn based on the load capacity and initial state variables of each storage sub-node.

[0085] In this embodiment, the boundary value of the decision variable [u(i)] for the i-th storage task is determined based on the load capacity of the i-th (i∈1,2,...,n) storage sub-node. min ,u(i) max ], and traverse the value interval [u(i)] using the initial state variable x(i+1) with a pre-set step size. min ,u(i) max The optimal decision variable u(i) is obtained, and the optimal decision variable for each storage sub-node is determined by the inverse reasoning method and the state transition equation: x(i+1)=x(i)-u(i).

[0086] (4) Based on the optimal decision variables of each storage sub-node, each storage task is assigned to the corresponding storage sub-node in sequence to obtain the initial allocation decision sequence.

[0087] In this embodiment, the storage task assigned to each storage sub-node is calculated using the optimal decision variables and dynamic programming equations of each storage sub-node, and the data is recorded in the data set Notedata[i]{x(i+1), u(i), V(x(i), i)}. By integrating the various data sets, the initial allocation decision sequence of each storage task in each storage sub-node can be obtained.

[0088] This invention describes in detail the scheduling of storage tasks and the allocation of storage tasks to storage nodes in the target data processing cluster during the allocation of logistics resources. The scheduling of storage tasks is based on the crossover and mutation of the initial storage task population in an accelerated genetic algorithm, and the optimal storage task population is prevented from prematurely maturing through an accelerated evolution strategy. The storage tasks are then globally scheduled on the storage nodes. Then, by using the state variables and decision variables of the initial storage task population in each allocation, the optimal allocation decision sequence of each storage task on each storage node is gradually calculated using a back-calculation method. This enables the processing of rapidly growing logistics resources in the data processing cluster and improves the horizontal scalability of the logistics resource processing system.

[0089] The logistics resource allocation method in the embodiments of the present invention has been described above. The logistics resource allocation device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 3 One embodiment of the logistics resource allocation device in this invention includes:

[0090] The acquisition module 301 is used to acquire the initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals;

[0091] The fitness calculation module 302 is used to calculate the storage efficiency of each task individual and, based on the storage efficiency of each task individual, calculate the fitness of each task individual in the initial storage task population.

[0092] The recombination module 303 is used to recombine each task individual based on the fitness of each task individual in the initial stored task population using a preset accelerated genetic strategy to obtain a new stored task population.

[0093] The allocation module 304 is used to output the optimal storage task population when the new storage task population meets the preset optimization conditions, and to generate the optimal allocation decision sequence using a preset dynamic allocation strategy, and to allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence.

[0094] In this embodiment of the invention, a genetic strategy is used to schedule storage tasks, and a dynamic allocation strategy is used to allocate logistics resources. Specifically, the initial population of storage tasks for the logistics resources to be managed is continuously reorganized using the genetic strategy until an optimal population of storage tasks is obtained, thus determining the second storage task for optimal task scheduling for each individual task. Then, using the processing nodes of each second storage task in the reorganized optimal population of storage tasks, the logistics resources to be managed are continuously allocated using the dynamic allocation strategy until the optimal allocation decision sequence for each processing node to handle the logistics resources to be managed is obtained. This achieves clustered processing of logistics resources, improves the resource utilization of each individual task in the clustered environment, and optimizes the load balancing of each individual task in the clustered environment.

[0095] Please see Figure 4 Another embodiment of the logistics resource allocation device in this invention includes:

[0096] The acquisition module 301 is used to acquire the initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals;

[0097] The fitness calculation module 302 is used to calculate the storage efficiency of each task individual and, based on the storage efficiency of each task individual, calculate the fitness of each task individual in the initial storage task population.

[0098] The recombination module 303 is used to recombine each task individual based on the fitness of each task individual in the initial stored task population using a preset accelerated genetic strategy to obtain a new stored task population.

[0099] The allocation module 304 is used to output the optimal storage task population when the new storage task population meets the preset optimization conditions, and to generate the optimal allocation decision sequence using a preset dynamic allocation strategy, and to allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence.

[0100] In this embodiment, the allocation module 304 includes: an allocation unit 3041, configured to allocate each individual task in the optimal storage task population to a storage node corresponding to the target data processing cluster based on the distribution of the data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, thereby obtaining an initial allocation decision sequence; and a discrimination unit 3042, configured to determine whether the initial allocation decision sequence satisfies the preset allocation conditions; if it does, the optimal allocation decision sequence is output; otherwise, each individual task in the optimal storage task population is re-allocated until the obtained initial allocation decision sequence satisfies the allocation conditions, at which point the optimal allocation decision sequence is output.

[0101] In this embodiment, the allocation unit 3041 is further configured to:

[0102] The storage tasks contained in each individual task in the optimal storage task population are determined, and the storage nodes in the target data processing cluster are virtualized to obtain multiple storage sub-nodes.

[0103] Based on the storage data distribution corresponding to each individual task, determine the storage data distribution corresponding to each storage task, and calculate the initial state variables corresponding to each storage task based on the storage data distribution corresponding to each storage task.

[0104] Based on the preset load capacity of each storage node, the load capacity of each storage sub-node is determined, and based on the load capacity of each storage sub-node and the initial state variables, the optimal decision variables of each storage sub-node are calculated sequentially.

[0105] Based on the optimal decision variables of each storage sub-node, each storage task is sequentially assigned to the corresponding storage sub-node to obtain the initial allocation decision sequence.

[0106] In this embodiment, the recombination module 303 includes:

[0107] The determining unit 3031 is used to determine the precociousness threshold corresponding to the preset genetic algorithm and the fitness distribution of each task individual in the initial stored task population based on the fitness of each task individual in the initial stored task population.

[0108] The detection unit 3032 is used to detect the precociousness index of the preset genetic algorithm and determine whether the precociousness index is less than the precociousness threshold.

[0109] Acceleration unit 3033 is used to change the preset recombination threshold in the genetic algorithm to obtain an accelerated genetic algorithm if the precocity index is less than the precocity threshold.

[0110] The recombination unit 3034 is used to recombine each task individual according to the fitness distribution of each task individual in the initial storage task population using the accelerated genetic algorithm to obtain a new storage task population.

[0111] In this embodiment, the recombination unit 3034 is further configured to: calculate the breeding selection probability of each task individual in the initial storage task population based on the fitness distribution of each task individual in the initial storage task population; determine whether each task individual meets the preset population size of the initial storage task population based on the breeding selection probability of each task individual; if it meets the requirement, take the corresponding task individual as the parent task individual, and randomly match each pair of task individuals; use a preset breeding algorithm to perform cross-recombination on each pair of randomly matched task individuals, output the corresponding offspring task individuals, and combine each of the offspring task individuals to obtain a new storage task population.

[0112] In this embodiment, the recombination unit 3034 is further configured to: randomly generate the crossover probability of each pair of successfully matched task individuals within a preset crossover probability interval, and perform crossover transformation processing on each pair of task individuals whose crossover probability is less than a preset crossover probability threshold to obtain multiple offspring task individuals; randomly generate the mutation probability of each of the offspring task individuals within a preset mutation probability interval, and perform mutation transformation processing on the offspring task individuals whose mutation probability is less than a preset mutation probability threshold.

[0113] This invention describes in detail the scheduling of storage tasks and the allocation of storage tasks to storage nodes in the target data processing cluster during the allocation of logistics resources. The scheduling of storage tasks is based on the crossover and mutation of the initial storage task population in an accelerated genetic algorithm, and the optimal storage task population is prevented from prematurely maturing through an accelerated evolution strategy. The storage tasks are then globally scheduled on the storage nodes. Then, by using the state variables and decision variables of the initial storage task population in each allocation, the optimal allocation decision sequence of each storage task on each storage node is gradually calculated using a back-calculation method. This enables the processing of rapidly growing logistics resources in the data processing cluster and improves the horizontal scalability of the logistics resource processing system.

[0114] above Figure 3 and Figure 4 The logistics resource allocation device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The logistics resource allocation equipment in this embodiment of the invention will be described in detail from the perspective of hardware processing.

[0115] Figure 5This is a schematic diagram of the structure of a logistics resource allocation device 500 provided in an embodiment of the present invention. The logistics resource allocation device 500 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 510 (e.g., one or more processors) and a memory 520, and one or more storage media 530 (e.g., one or more mass storage devices) for storing application programs 533 or data 532. The memory 520 and storage media 530 can be temporary or persistent storage. The program stored in the storage media 530 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the logistics resource allocation device 500. Furthermore, the processor 510 may be configured to communicate with the storage media 530 and execute the series of instruction operations in the storage media 530 on the logistics resource allocation device 500.

[0116] The logistics resource distribution equipment 500 may also include one or more power supplies 540, one or more wired or wireless network interfaces 550, one or more input / output interfaces 560, and / or one or more operating systems 531, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated structure of the logistics resource allocation equipment does not constitute a limitation on the logistics resource allocation equipment. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.

[0117] The present invention also provides a logistics resource allocation device, wherein the computer device includes a memory and a processor, the memory storing computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor performs the steps of the logistics resource allocation method in the above embodiments.

[0118] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the logistics resource allocation method.

[0119] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0120] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0121] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for allocating logistics resources, characterized in that, The logistics resource allocation method includes: Obtain the initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals; Calculate the storage efficiency of each individual task, and based on the storage efficiency of each individual task, calculate the fitness of each individual task in the initial storage task population. Based on the fitness of each individual task in the initial storage task population, a pre-set accelerated genetic strategy is used to recombine each individual task to obtain a new storage task population. If the new storage task population meets the preset optimization conditions, the optimal storage task population is output, and the optimal allocation decision sequence is generated using the preset dynamic allocation strategy. Each individual task in the optimal storage task population is allocated to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence. The dynamic allocation strategy utilizes the load capacity of each storage task to allocate storage individuals to the storage nodes corresponding to the target data processing cluster. Based on the number of storage nodes corresponding to the target data processing cluster, the storage process of each storage individual is divided into multiple storage stages. In the initial stage, the current state variables and decision variables for data allocation in each subsequent stage are determined. The decision variables for the next storage stage are determined based on the state variables and decision variables of the previous storage stage. This process is repeated until the decision variables for each storage stage are calculated. Based on the storage variables, each storage task is allocated to each storage node to complete the allocation of storage individuals and obtain the optimal allocation decision sequence.

2. The logistics resource allocation method according to claim 1, characterized in that, The step of generating the optimal allocation decision sequence using a pre-set dynamic allocation strategy includes: Based on the distribution of data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, each individual task in the optimal storage task population is assigned to the storage node corresponding to the target data processing cluster to obtain the initial allocation decision sequence. Determine whether the initial allocation decision sequence satisfies the preset allocation conditions; If the conditions are met, the optimal allocation decision sequence is output; otherwise, each task in the optimal storage task population is reassigned until the initial allocation decision sequence satisfies the allocation condition, at which point the optimal allocation decision sequence is output.

3. The logistics resource allocation method according to claim 2, characterized in that, The initial allocation decision sequence, which assigns each individual task in the optimal storage task population to a storage node corresponding to the target data processing cluster based on the distribution of the data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, includes: The storage tasks contained in each individual task in the optimal storage task population are determined, and the storage nodes in the target data processing cluster are virtualized to obtain multiple storage sub-nodes. Based on the storage data distribution corresponding to each individual task, determine the storage data distribution corresponding to each storage task, and calculate the initial state variables corresponding to each storage task based on the storage data distribution corresponding to each storage task. Based on the preset load capacity of each storage node, the load capacity of each storage sub-node is determined, and based on the load capacity of each storage sub-node and the initial state variables, the optimal decision variables of each storage sub-node are calculated sequentially. Based on the optimal decision variables of each storage sub-node, each storage task is sequentially assigned to the corresponding storage sub-node to obtain the initial allocation decision sequence.

4. The logistics resource allocation method according to claim 1, characterized in that, The process of recombining each task individual based on its fitness in the initial storage task population, using a pre-set accelerated genetic strategy, to obtain a new storage task population includes: Based on the fitness of each individual task in the initial stored task population, the precocious convergence threshold corresponding to the preset genetic algorithm and the fitness distribution of each individual task in the initial stored task population are determined. Detect the precocity index of the preset genetic algorithm and determine whether the precocity index is less than the precocity threshold; If the precocity index is less than the precocity threshold, then the preset recombination threshold in the genetic algorithm is changed to obtain an accelerated genetic algorithm; Based on the fitness distribution of each individual task in the initial storage task population, the accelerated genetic algorithm is used to recombine each individual task to obtain a new storage task population.

5. The logistics resource allocation method according to claim 4, characterized in that, The step of recombining each task individual according to the fitness distribution of each task individual in the initial storage task population, and obtaining a new storage task population using the accelerated genetic algorithm, includes: Based on the fitness distribution of each individual task in the initial storage task population, calculate the reproductive selection probability of each individual task in the initial storage task population. Based on the reproductive selection probability of each task individual, determine whether each task individual meets the preset population size of the initial stored task population; If the conditions are met, the corresponding task individual will be used as the parent task individual, and each pair of task individuals will be randomly matched. A pre-set breeding algorithm is used to cross-recombine every two randomly matched task individuals, outputting the corresponding offspring task individuals. The offspring task individuals are then combined to obtain a new storage task population.

6. The logistics resource allocation method according to claim 5, characterized in that, The pre-set breeding algorithm is used to perform cross-recombination on every two randomly matched task individuals, and the corresponding offspring task individuals are output as follows: Within a preset crossover probability range, the crossover probability of each pair of successfully matched task individuals is randomly generated, and each pair of task individuals with a crossover probability less than the preset crossover probability threshold is subjected to crossover transformation to obtain multiple offspring task individuals. Within a preset mutation probability range, the mutation probability of each of the child task individuals is randomly generated, and the child task individuals with mutation probabilities less than the preset mutation probability threshold are subjected to mutation transformation processing.

7. A logistics resource allocation device, characterized in that, The logistics resource allocation device includes: The acquisition module is used to acquire the initial storage task population corresponding to the logistics resources to be managed, wherein the initial storage task population includes multiple task individuals; The fitness calculation module is used to calculate the storage efficiency of each task individual and, based on the storage efficiency of each task individual, calculate the fitness of each task individual in the initial storage task population. The recombination module is used to recombine each task individual based on the fitness of each task individual in the initial stored task population using a preset accelerated genetic strategy to obtain a new stored task population. The allocation module is used to output the optimal storage task population when the new storage task population meets the preset optimization conditions, and to generate the optimal allocation decision sequence using a preset dynamic allocation strategy, and to allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the optimal decision allocation sequence. The dynamic allocation strategy utilizes the load capacity of each storage task to allocate storage individuals to the storage nodes corresponding to the target data processing cluster. Based on the number of storage nodes corresponding to the target data processing cluster, the storage process of each storage individual is divided into multiple storage stages. In the initial stage, the current state variables and decision variables for data allocation in each subsequent stage are determined. The decision variables for the next storage stage are determined based on the state variables and decision variables of the previous storage stage. This process is repeated until the decision variables for each storage stage are calculated. Based on the storage variables, each storage task is allocated to each storage node to complete the allocation of storage individuals and obtain the optimal allocation decision sequence.

8. The logistics resource allocation device according to claim 7, characterized in that, The allocation module includes: The allocation unit is used to allocate each individual task in the optimal storage task population to the storage node corresponding to the target data processing cluster according to the distribution of the data to be stored corresponding to each individual task and the preset load capacity of each storage node in the target data processing cluster, so as to obtain an initial allocation decision sequence. The discrimination unit is used to determine whether the initial allocation decision sequence meets the preset allocation conditions; if it does, the optimal allocation decision sequence is output; otherwise, each task individual in the optimal storage task population is re-allocated until the initial allocation decision sequence meets the allocation conditions, and then the optimal allocation decision sequence is output.

9. A logistics resource allocation device, characterized in that, The logistics resource allocation device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the logistics resource allocation device to execute the logistics resource allocation method as described in any one of claims 1-6.

10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the logistics resource allocation method as described in any one of claims 1-6.