Dynamic distribution method and device for articles in building, electronic equipment and medium
Through dynamic path adjustment and multi-objective optimization model, combined with quantum particle swarm optimization algorithm, the problems of delay and inefficiency in traditional distribution path planning in complex building environments are solved, and efficient and on-time delivery of items is achieved.
Patent Information
- Application Number
- CN202411675773.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2024-12-24
AI Technical Summary
Traditional methods of internal building items delivery path planning cannot cope with real-time changing environments and appointment time windows, resulting in delivery delays, errors and inefficiencies, making it difficult to deal with complex multi-floor and multi-room environments.
Using dynamic path adjustment method, combining multi-objective optimization model and quantum particle swarm optimization algorithm, based on the delivery staff's real-time location information and real-time information of the building environment, a global optimal delivery path is generated to meet the reservation time window constraints and reduce the total delivery time and path. length.
It significantly improves the efficiency of item delivery, avoids local optimal solutions, improves the timeliness and service quality of delivery, and adapts to complex environment changes.
Smart Images

Figure CN119180580A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic equipment and medium for dynamically distributing items within a building. Background Art
[0002] In modern urban life, with the rapid development of e-commerce, food delivery services and express delivery industries, the demand for goods delivery inside buildings is increasing. Such delivery services usually require a large number of parcels, meals and other items to be delivered accurately to multiple floors and rooms within a specified time. However, the delivery environment inside buildings is complex, and there are often problems such as elevator congestion and narrow passages between floors, which increases the difficulty of the delivery staff's work and the delivery time.
[0003] Traditional delivery route planning methods usually use fixed paths or simple shortest path algorithms, which have many shortcomings in practical applications. Fixed paths cannot cope with real-time changing environments, and although simple shortest path algorithms can calculate shorter paths, they cannot take into account factors such as appointment time windows and emergencies. These problems lead to delays, errors, and inefficiencies in the delivery process, affecting user experience and service quality. Therefore, traditional route planning algorithms often find it difficult to effectively handle the diversity and complexity of routes when faced with complex building environments with multiple floors and rooms.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] In view of this, the embodiments of the present application at least provide a method, device, electronic device and medium for dynamic distribution of items inside a building, which can adjust the path in time according to changes in the distribution environment, and efficiently search for the global optimal path in a complex building environment, avoiding falling into local optimality, and significantly improving the efficiency of item distribution.
[0006] This application mainly includes the following aspects: In a first aspect, an embodiment of the present application provides a method for dynamically distributing items within a building, the method comprising: Obtaining delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes a scheduled delivery time period, a starting location, and a delivery location; For any of the delivery items, based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item, an initial delivery path corresponding to the delivery item is generated; During the delivery process, if it is determined that the initial delivery path of the delivered item is affected by the building environment, the initial delivery path of the delivered item is adjusted based on the real-time location information of the delivery person and the real-time information of the building environment, and an adjusted target delivery path of the delivered item is generated; Based on the multi-objective optimization model, the quantum particle swarm optimization algorithm and the candidate delivery paths of each of the delivery items, a target delivery plan for the global optimal delivery path of at least one delivery item is determined; the candidate delivery paths include an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan corresponding to minimizing the total delivery time and total path length of all delivery items under the premise of satisfying the constraints of the scheduled delivery time periods of each delivery item.
[0007] In a second aspect, an embodiment of the present application further provides a device for dynamically distributing items within a building, the device comprising: An acquisition module, used to acquire delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes a scheduled delivery time period, a starting location, and a delivery location; A first generation module is used to generate, for any of the delivery items, an initial delivery path corresponding to the delivery item based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item; A second generation module is used to adjust the initial delivery path of the delivery item based on the real-time location information of the delivery person and the real-time information of the building environment if it is determined that the initial delivery path of the delivery item is affected by the building environment, and generate an adjusted target delivery path of the delivery item; A determination module is used to determine a target delivery plan for the global optimal delivery path of at least one delivery item based on a multi-objective optimization model, a quantum particle swarm optimization algorithm, and candidate delivery paths of each delivery item; the candidate delivery path includes an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan corresponding to minimizing the total delivery time and total path length of all delivery items under the premise of satisfying the constraints of the scheduled delivery time period of each delivery item.
[0008] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for dynamic distribution of items within a building as described in the first aspect or any possible implementation scheme of the first aspect.
[0009] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for dynamic distribution of items within a building as described in the first aspect or any possible implementation scheme of the first aspect are executed.
[0010] The embodiments of the present application provide a method, device, electronic device and medium for dynamic delivery of items inside a building, which combine real-time data collection, dynamic path adjustment and global path optimization, and can determine a target delivery plan corresponding to minimizing the total delivery time and path length of all delivered items under the premise of satisfying the constraints of the scheduled delivery time period of each delivered item. Compared with the prior art in which delays, errors and inefficiencies occur during the delivery process, affecting user experience and service quality, the embodiments of the present application can adjust the path in time according to changes in the delivery environment, can efficiently search for the global optimal path in a complex building environment, avoid falling into local optimality, and significantly improve the efficiency of item delivery.
[0011] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0013] Figure 1 A flow chart of a method for dynamically distributing items within a building provided by an embodiment of the present application is shown; Figure 2 A functional module diagram of a dynamic distribution device for items inside a building provided by an embodiment of the present application is shown; Figure 3 A functional module diagram of a first generation module in a dynamic distribution device for items within a building provided by an embodiment of the present application; Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0014] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art, under the guidance of the content of the present application, can add one or more other operations to the flowchart, or remove one or more operations from the flowchart.
[0015] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0016] In order to enable those skilled in the art to use the contents of this application, the following implementation methods are given in combination with the specific application scenario of "item delivery". For those skilled in the art, the general principles defined here can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application.
[0017] The following methods, devices, electronic devices or computer-readable storage media of the embodiments of the present application can be applied to any scenario where item delivery is required. The embodiments of the present application are not limited to specific application scenarios. Any scheme using the method and device for dynamic delivery of items within a building provided by the embodiments of the present application is within the scope of protection of the present application.
[0018] It is worth noting that before this application was proposed, traditional delivery route planning methods usually adopted fixed paths or simple shortest path algorithms, which have many shortcomings in practical applications. Fixed paths cannot cope with real-time changing environments, and although simple shortest path algorithms can calculate shorter paths, they cannot take into account factors such as appointment time windows and emergencies. These problems lead to delays, errors and inefficiencies in the delivery process, affecting user experience and service quality. Therefore, traditional path planning algorithms often find it difficult to effectively handle the diversity and complexity of paths when faced with complex internal environments of buildings with multiple floors and rooms.
[0019] In response to the above problems, the embodiments of the present application generate the initial delivery path corresponding to the delivery items based on the delivery information of at least one delivery item; during the delivery process, if it is determined that the initial delivery path is affected by the building environment, the target delivery path of the delivery items after the change is generated based on the real-time location information of the delivery person and the real-time information of the building environment; based on the multi-objective optimization model, the quantum particle swarm optimization algorithm, and the candidate delivery paths of each delivery item, the target delivery plan corresponding to minimizing the total delivery time and path length of all delivery items under the premise of satisfying the scheduled delivery time constraints of each delivery item is determined. In this way, the present application can adjust the path in time according to the changes in the delivery environment, and efficiently search for the global optimal path in a complex building environment, avoiding falling into the local optimum, and significantly improving the efficiency of item delivery.
[0020] To facilitate the understanding of the present application, the technical solution provided by the present application is described in detail below in conjunction with specific embodiments.
[0021] Figure 1 This is a flow chart of a method for dynamically distributing items within a building provided by an embodiment of the present application. Figure 1 As shown, the method for dynamic distribution of items inside a building provided in an embodiment of the present application includes the following steps: S101: Obtain delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes a scheduled delivery time period, a starting location, and a delivery location.
[0022] In a specific implementation, before formulating a delivery plan for the delivery personnel to deliver items inside a building, it is necessary to first obtain the information of each delivery task of the delivery personnel, that is, to obtain at least one delivery task involved in the delivery personnel. Each delivery task is a task for delivering an item, and each delivery task includes the delivery information of the corresponding delivery item. The delivery information of each delivery item includes the scheduled delivery time period, the starting location, and the delivery location. Here, the delivery personnel can be a delivery service personnel who delivers items inside a building, or a delivery robot that delivers items inside a building.
[0023] For example, a delivery task for a delivery person includes N items to be delivered. , delivery items The scheduled delivery time period (i.e., the scheduled time window) is , which is the earliest delivery time and the latest delivery time The time period between the delivery of item i and the delivery person’s starting position is , including the starting floor and starting room number ; Delivery items The delivery location is , including the target floor and the target room number .
[0024] S102: For any of the delivery items, based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item, an initial delivery path corresponding to the delivery item is generated.
[0025] It should be noted that in the delivery scenario of multiple delivery tasks and multiple delivery items, it is crucial to ensure that each item is delivered within the scheduled time window. Traditional algorithms lack effective methods for dealing with time constraints. This application uses a multi-objective optimization model, combined with path length and time management, to ensure that the delivery path is both the shortest and can meet the requirements of all time windows, thereby improving the punctuality and accuracy of delivery.
[0026] In the specific implementation, the path planning problem is formalized as a vehicle routing problem with time windows (VRPTW). The goal is to minimize the delivery time and path length of the item while satisfying the constraints of the scheduled time window (i.e., meeting the scheduled delivery period) of the delivery item.
[0027] Among them, the shortest path algorithm such as Dijkstra algorithm or Algorithm, using the shortest path algorithm to perform initial path planning, calculating the To the destination The shortest path is the initial delivery path. Dijkstra algorithm, also known as Dijkstra algorithm, is an algorithm used to find the shortest path between two nodes in a graph. The algorithm is a heuristic search algorithm widely used in path finding and graph traversal. It combines the advantages of best-first search and Dijkstra algorithm. It not only considers the actual cost from the starting point to the current node, but also estimates the expected cost from the current node to the target node. The goal of the algorithm is to find the lowest cost path from the starting point to the end point while maintaining efficient search and avoiding unnecessary exploration.
[0028] Here, this application integrates a multi-objective optimization model, combining path length minimization with appointment time window management to ensure that the delivery path is not only the shortest but also meets the time window requirements. This innovation improves the punctuality and service quality of delivery and solves the time constraint problem in complex delivery scenarios.
[0029] S103: During the delivery process, if it is determined that the initial delivery path of the delivery item is affected by the building environment, the initial delivery path of the delivery item is adjusted based on the real-time location information of the delivery person and the real-time information of the building environment, and an adjusted target delivery path of the delivery item is generated.
[0030] In the specific implementation, first, real-time data is obtained, that is, the real-time location information of the delivery personnel and the real-time information of the building environment are obtained. Then, real-time monitoring is performed based on the real-time location information of the delivery personnel and the real-time information of the building environment. When the initial delivery path is affected, the dynamic path adjustment algorithm is used to adjust the path and generate the target delivery path. Specifically, the real-time data collected includes The real-time location information of the corresponding delivery person and real-time information about the building environment , including the real-time location information of the delivery person The current location information of the delivery person obtained by Ultra-Wideband Wireless Communication Technology (UWB) is used to dynamically adjust the route; real-time information of the building environment Including the status information of each elevator, elevator waiting time information, congestion information between floors, etc. ,elevator The status information is represented as , Include current floor , running speed , Estimated waiting time wait.
[0031] Among them, UWB technology is a carrier-free communication technology. UWB does not use a carrier, but uses a short energy pulse sequence and expands the pulse into a frequency range through orthogonal frequency division modulation or direct sequencing. UWB is widely used in scenarios that require high-precision positioning, such as indoor navigation, logistics tracking, asset management, etc.
[0032] In addition, during the delivery process, real-time information of the building environment is continuously monitored and the delivery person’s real-time location information , determine the current initial delivery path of the delivery item Whether it is affected; if it is found that the path is blocked, an unexpected situation occurs (such as elevator failure, road congestion) or the time is expected to exceed the window, it is determined that the initial delivery path of the delivery item is affected by the building environment, then the path is recalculated based on the current state, and multiple alternative delivery paths are generated. The target delivery path of the delivery item is determined from the multiple alternative delivery paths. Specifically, the optimal path can be selected from the alternative delivery paths as the target delivery path, and backup plans are reserved to cope with further environmental changes or unexpected situations.
[0033] Among them, the alternative delivery path (i.e. the new delivery path) The following conditions should be met: ; in, represents the path cost increment caused by real-time environmental changes, is the balance coefficient.
[0034] It should be noted that in the actual delivery process, environmental changes in buildings, such as elevator congestion and channel closures, frequently occur. Traditional fixed route planning methods cannot flexibly respond to these emergencies, resulting in delivery delays. This application uses real-time data collection and a dynamic route adjustment mechanism to automatically adjust the route according to real-time changes in the current environment, generate alternative plans, and ensure the flexibility and efficiency of the delivery process.
[0035] S104: Determine a target delivery plan of a global optimal delivery path for the at least one delivery item based on a multi-objective optimization model, a quantum particle swarm optimization algorithm, and candidate delivery paths for the respective delivery items.
[0036] The candidate delivery paths include an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan that minimizes the total delivery time and total path length of all delivery items under the premise of satisfying the scheduled delivery time constraints of each delivery item.
[0037] It should be noted that the embodiment of the present application forms a complete and integrated building internal goods distribution path planning solution by organically combining the quantum particle swarm optimization algorithm (QPSO), multi-objective optimization and dynamic adjustment mechanism. This innovation not only improves the intelligence and adaptability of the system, but also significantly reduces the distribution cost and optimizes resource utilization.
[0038] Here, QPSO is a global optimization algorithm inspired by the principles of quantum mechanics. It is an improvement on the traditional particle swarm optimization (PSO). QPSO attempts to combine concepts in quantum theory, such as quantum states, quantum superposition, and quantum tunneling effects, to enhance the search capability and convergence performance of PSO, especially when dealing with complex optimization problems. The basic idea of QPSO is to regard each particle as a quantum system, whose position and velocity are represented by quantum probability amplitudes rather than traditional deterministic values. The key to the algorithm is how to update the position of particles through quantum mechanisms, making the search more flexible and effectively escaping from local optimality.
[0039] In addition, when there are multiple delivery tasks, a multi-objective optimization model is adopted, and the path planning of all delivery tasks is taken as the overall optimization goal to minimize the total path length and total delivery time.
[0040] In the embodiment of the present application, the initial delivery path corresponding to the delivery item is generated based on the delivery information of at least one delivery item; during the delivery process, if it is determined that the initial delivery path is affected by the building environment, the target delivery path of the delivery item after the change is generated based on the real-time location information of the delivery person and the real-time information of the building environment; based on the multi-objective optimization model, the quantum particle swarm optimization algorithm, and the candidate delivery paths of each delivery item, the target delivery plan corresponding to minimizing the total delivery time and path length of all delivery items under the premise of satisfying the scheduled delivery time constraints of each delivery item is determined. In this way, the present application can adjust the path in time according to the changes in the delivery environment, and efficiently search for the global optimal path in a complex building environment, avoiding falling into the local optimum, and significantly improving the efficiency of item delivery.
[0041] In a possible implementation, the step S102 of generating an initial delivery path corresponding to the delivery item based on the scheduled delivery time period, the starting location, the delivery location, and the shortest path algorithm of the delivery item includes the following steps: Step 1021: Calculate the shortest delivery path of the delivery item from the starting location to the delivery location based on the shortest path algorithm and the building internal map model.
[0042] The internal map model of the building is constructed by a plurality of location nodes and path edges between adjacent location nodes.
[0043] Here, the modeling process of the building interior map model is described below, that is, the building interior map model is built according to the following steps: Step (1): define multiple location nodes in the internal map of the building, and path edges between adjacent location nodes; the location nodes include room nodes, floor entrance nodes, and elevator door nodes, and the path edges between adjacent location nodes include floor corridors and elevator passages connecting the adjacent location nodes.
[0044] Exemplarily, the building interior map model is provided by Modeling, is a location node (such as a room, floor entrance, elevator door, etc.), are the path edges connecting these nodes (such as floor corridors, elevator passages, etc.).
[0045] Here, the edge weight of the path edge is calculated by the following formula: ; in: Indicates location node and location nodes The weight between , i.e., the travel time cost; It is a location node and location nodes The physical distance between It is a location node and location nodes The speed of travel between places (such as walking speed, speed of using elevators, etc.).
[0046] Step (2): Determine the edge weight of each path edge; the edge weight is the travel time of the adjacent location nodes, and the travel time is the quotient between the physical distance of the adjacent location nodes and the travel speed; Step (3): Generate the internal map model of the building according to the edge weights of each location node and the path edges between adjacent location nodes.
[0047] Step 1022: Determine the estimated delivery time required to deliver the delivery item along the shortest delivery route.
[0048] Step 1023: Determine whether the estimated delivery time of the delivery item is within the scheduled delivery time period of the delivery item.
[0049] Step 1024a: If yes, the shortest delivery path of the delivery item is determined as the initial delivery path of the delivery item; Step 1024b: If not, re-plan a route for the delivery item that meets the scheduled delivery time period, and determine the re-planned delivery route as the initial delivery route for the delivery item.
[0050] It should be noted that the shortest path algorithm and the internal building map model are used for initial path planning and calculation of delivery items. From the starting position To delivery location The initial delivery path of the delivery item is as follows: , from the starting position To begin, use, for example, Dijkstra's algorithm to find the starting position To delivery location The shortest delivery path between ; Calculate the shortest delivery route Estimated delivery time , ,in, Time for delivery to start; check estimated delivery time Is it during the scheduled delivery time? Inside, ,if If the time window constraint is not met, the route will be replanned, giving priority to using less congested channels (such as stairs) or adjusting the delivery order.
[0051] In a possible implementation, the step of determining a target delivery solution of a global optimal delivery path for at least one delivery item based on a multi-objective optimization model, a quantum particle swarm optimization algorithm, and candidate delivery paths for each of the delivery items in S104 includes the following steps: Step 1041: Initialize a particle swarm and define an individual optimal position and a global optimal position of each particle in the particle swarm; each particle is used to represent a delivery path of a delivery item; Step 1042: Determine the fitness value of each particle based on the path cost and delay time of the delivery item; Step 1043: Based on the probability wave equation of quantum mechanics and the fitness value of each particle, the individual optimal position and the global optimal position of each particle are updated; Step 1044: Repeat the steps of updating the individual optimal position and the global optimal position of each particle until the fitness function converges, and determine the delivery path of each delivery item in the particle swarm at the time of convergence as the target delivery plan.
[0052] In the specific implementation, the first step is to initialize the particles, specifically, initialize the particle swarm , each particle Corresponding to a candidate solution, representing the delivery path of delivery item i; assigning a random position to each particle and random speed ; Define the individual optimal position of each particle and the global optimal position ; The second step is to define the fitness function. Specifically, the fitness value of each particle is evaluated based on the path cost and delay time, where the fitness function is: ,in, and is the weight coefficient, which determines the importance of path cost and delay time in optimization; the third step is to update the particle position. Specifically, in the QPSO algorithm, the particle update follows the probability wave equation of quantum mechanics, and the update formula is as follows: ,in, is the average value of the current positions of all particles, is the shrinkage factor, controlling the search range, is a random number in the range [0,1], which determines the randomness of the particle position; the symbol "±" determines which side the particle fluctuates to ensure the diversity of the particles; the fourth step is to update the optimal position. Specifically, if the current particle The fitness value of Better than its historical best , then update the individual optimal position ,if The fitness value is better than the global optimal value , then update the global optimal position ; The fifth step is algorithm iteration and convergence. Specifically, the position update and global optimal position update steps are repeated until the preset maximum number of iterations is reached or the global optimal value does not change in multiple iterations. The QPSO algorithm determines whether the optimal solution is reached by the convergence of the fitness function and the overall distribution state of the particle swarm. Usually, when the global optimal solution of the particle swarm no longer changes significantly, the algorithm is considered to have converged; The sixth step is the generation and selection of alternative delivery paths. Specifically, in the optimal path Based on this, several alternative routes are generated, taking into account the UWB real-time location information The fitness evaluation of the alternative paths is based on the degree of deviation from the global optimal path and the stability of the path, and the alternative delivery path with the highest fitness is finally selected as the current target delivery path, and other alternative plans are reserved to deal with emergencies.
[0053] Here, the multi-objective optimization model is used to take the path planning of all delivery items involved in this delivery as the overall optimization goal to minimize the path length and delivery time: ; ; in, For delivery route The cost function of delivering items Delivery time and path length from the initial location to the delivery location; For delivery of items The delay time, .
[0054] It should be noted that traditional path planning algorithms often have difficulty effectively handling the diversity and complexity of paths when facing complex internal environments of buildings with multiple floors and rooms. The embodiments of the present application use a quantum particle swarm optimization algorithm to globally search for the optimal path, combined with the modeling of the internal building map and path planning, so that the system can efficiently find the optimal path in a complex environment and avoid blind spots and repeated paths in path planning.
[0055] Here, the embodiment of the present application introduces the quantum particle swarm optimization algorithm (QPSO) in the internal building delivery path planning, and enhances the global search capability through the principles of quantum mechanics. QPSO can efficiently search for the global optimal path in a complex building environment, avoid falling into the local optimum, and significantly improve the effect of path planning.
[0056] In a possible implementation, a target delivery path for the delivery item is generated according to the following steps: based on the real-time location information of the delivery person and the real-time information of the building environment, multiple alternative delivery paths are generated on the basis of the initial delivery path corresponding to the delivery item; the fitness of each alternative delivery path is determined based on the degree of deviation from the initial delivery path and the stability of the path; and the alternative delivery path corresponding to the highest fitness among the multiple alternative delivery paths is determined as the target delivery path for the delivery item.
[0057] It should be noted that the embodiment of the present application has developed a dynamic path adjustment mechanism based on real-time data collection, which can respond to environmental changes in real time, such as elevator failures or congestion, and automatically adjust the path. It can also generate multiple alternative delivery paths to ensure the flexibility and efficiency of the delivery process and reduce delays caused by emergencies.
[0058] In a possible implementation, an alternative delivery path for the delivery item is generated according to the following steps, including: inputting the real-time location information of the delivery person, the real-time information of the building environment, and the initial delivery path of the delivery item into a target reinforcement learning model to generate an alternative delivery path for the delivery item.
[0059] It should be noted that the embodiment of the present application innovatively applies reinforcement learning technology to the dynamic adjustment and adaptive optimization of delivery routes. By continuously accumulating historical delivery data and using the target reinforcement learning model to autonomously learn the optimal path selection strategy, the adaptability and delivery efficiency in different environments can be gradually improved.
[0060] Here, the target reinforcement learning model can be Q-Learning, which is an important algorithm in the field of reinforcement learning and a model-free learning method. It enables the intelligent agent to learn what actions to take in a given state to maximize the cumulative reward through interaction with the environment. The core of Q-Learning is to use the Q table (Q-value function) to estimate the expected return that can be obtained by taking a certain action in a certain state.
[0061] In a possible implementation, the target reinforcement learning model is generated according to the following steps: preprocessing the building distribution data in the historical database; the building distribution data includes distribution path data, delivery time data, path selection data, and emergency data; extracting distribution-related features from the preprocessed building distribution data, the distribution-related features include path length features, travel speed features, stay time features between nodes, frequency of occurrence of emergencies, and features affecting the path; training the initial reinforcement learning model based on the distribution-related features to generate the target reinforcement learning model.
[0062] In the specific implementation, the generation process of the target reinforcement learning model is explained. In the first step, the building distribution data can be collected to form a historical database. Specifically, the building distribution data includes distribution path data, delivery time data, path selection data, and emergency data. The distribution path data is collected through UWB devices to collect the real-time location information of the delivery personnel. And all the locations and paths passed during the delivery process; delivery time data is recorded for each delivery item Actual delivery time , and the expected time For comparison; the route selection data is the actual route selected during each delivery process. and the corresponding path cost , including the use of alternative routes due to emergencies; emergency data are all recorded emergencies that occur during the distribution process, such as elevator failures, congestion, etc., and their impact on the path. The second step is the storage of feedback data. Specifically, the above-collected building distribution data is stored in the historical database to provide data support for subsequent model training and path optimization. The third step is data preprocessing. Specifically, data cleaning is to process missing data and abnormal data, such as UWB signal loss or abnormal location data; filter out noise data to retain valid paths and time records; data feature extraction is to extract key features, such as path length features, travel speed features, node residence time features, emergency frequency features, and impact features on the path; the data is standardized to facilitate model training and comparison.
[0063] It should be noted that traditional path planning algorithms usually lack self-learning capabilities and cannot automatically optimize and adjust as the environment and conditions change. The embodiment of the present application introduces a reinforcement learning mechanism, which can autonomously learn and optimize the path selection strategy by continuously accumulating historical delivery data. Over time, the system can gradually improve its adaptability to different environments, optimize the effect of path planning, and improve delivery efficiency.
[0064] Here, the embodiment of the present application involves an intelligent feedback and self-learning mechanism that can automatically collect and analyze feedback data (i.e. building delivery data) generated during the distribution process, and continuously optimize the path selection strategy through reinforcement learning. This mechanism enables the reinforcement learning model to gradually improve its intelligence level and adaptability in the continuous execution of tasks.
[0065] In a possible implementation, the initial reinforcement learning model is trained based on the delivery-related features to generate the target reinforcement learning model, including: defining a delivery state vector, a path selection action space vector, and a reward function; the delivery state vector represents state information at different stages in the delivery process, the path selection action space vector represents the path choices taken by the delivery personnel at different stages, and the reward function represents the immediate benefit after selecting any path; based on the delivery state vector, the path selection action space vector, and the reward function, the reward value of the initial reinforcement learning model is updated to generate the target reinforcement learning model.
[0066] In the specific implementation, the first step is to select and implement the reinforcement learning model. Reinforcement learning is a machine learning method based on trial and reward, which is suitable for complex path optimization problems, especially in dynamic environments. Specifically, the distribution state vector, path selection action space vector and reward function are defined first. The distribution state vector (State Space) represents the different stages of the distribution process, such as the current node (such as floor or room), the cumulative cost of the current path, and environmental information (such as elevator waiting time, floor congestion). The distribution state vector can be represented as a vector ,in is the current location of the delivery person, is the cumulative cost of the current path, is the current state of the environment; the path selection action space vector (Action Space) is defined as the path choices that the delivery person can take in the current state, such as choosing an elevator, stairs, or going directly to the target room. The action can be represented as a set of discrete choices , where each Corresponding to an alternative delivery path; the reward function is defined as the immediate benefit after selecting a delivery path, which is usually directly related to the path cost and time. The second step is the implementation of the Q-Learning algorithm. Q-Learning is a model-free reinforcement learning algorithm suitable for the self-learning process of path planning. By learning a The value function is the algorithm that predicts the expected reward for taking an action in each state. Specifically, Value update formula: ;in, Is the current state Next select action of value; is the learning rate, used to control the new and old The speed at which the value is updated; is a discount factor used to balance the weights of current rewards and future rewards; Is to perform an action During the actual delivery process, the system updates the value, gradually learn to choose the best action (path) in different states. Each path selection will be updated The value makes the reinforcement learning model's perception and decision-making ability of the environment continuously enhanced. The third step is the application and optimization of the model. Specifically, in the actual delivery process, the system and trained Value function, select the optimal path , dynamically adjust the route selection to respond to real-time environmental changes and ensure the optimal route. Continuously learn online through actual delivery data and continuously update value, so that the path planning algorithm adapts to new environmental conditions. Over time, enough environmental data can be accumulated to further optimize the path selection strategy. The fourth step is model evaluation and iterative improvement. Specifically, the main indicators of the evaluation model include path cost reduction, delivery time reduction, path planning stability, etc. These indicators are used to judge the effectiveness of the reinforcement learning model, and parameters such as learning rate and discount factor are adjusted according to the evaluation results. Based on the evaluation, the model is retrained regularly, or more state and action space features are introduced when necessary to improve the performance of the model.
[0067] Here, the design of the reward function is crucial. The goal is to minimize the path and time, so the following formula can be set: ; in, Is the selection action The path cost after is the delay time of the delivery route, is the time penalty coefficient.
[0068] Here, considering that in the distribution process of related technologies, redundant paths, repeated distribution and inefficient path selection often lead to increased operating costs. The embodiment of the present application effectively reduces invalid trips and resource waste through global path optimization and self-learning mechanism, optimizes resource utilization in the distribution process, reduces operating costs, and improves overall economic benefits.
[0069] In addition, an embodiment of the present application proposes a method for dynamic distribution of items within a building. The method combines real-time data collection, dynamic path adjustment, global path optimization and self-learning mechanism. It can adjust the path in time according to changes in the distribution environment, and continuously optimize the distribution strategy through self-learning to ensure that each item can be efficiently delivered to the target location within the scheduled time via the shortest path.
[0070] Based on the same application concept, the embodiments of the present application also provide a dynamic distribution device for items inside a building that corresponds to the dynamic distribution method for items inside a building provided in the above embodiments. Since the principle of solving the problem by the device in the embodiments of the present application is similar to the dynamic distribution method for items inside a building in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0071] Figure 2 This is a functional module diagram of a dynamic distribution device 200 for building internal items provided in an embodiment of the present application. Figure 2 As shown, the dynamic distribution device 200 for items inside a building includes: The acquisition module 210 is used to acquire the delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes the scheduled delivery time period, the starting location, and the delivery location; A first generation module 220 is used to generate, for any of the delivery items, an initial delivery path corresponding to the delivery item based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item; The second generation module 230 is used to adjust the initial delivery path of the delivery item based on the real-time location information of the delivery person and the real-time information of the building environment if it is determined that the initial delivery path of the delivery item is affected by the building environment, and generate an adjusted target delivery path of the delivery item; The determination module 240 is used to determine the target delivery plan of the global optimal delivery path of at least one delivery item based on the multi-objective optimization model, the quantum particle swarm optimization algorithm, and the candidate delivery paths of each delivery item; the candidate delivery path includes an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan corresponding to minimizing the total delivery time and total path length of all delivery items under the premise of satisfying the scheduled delivery time constraints of each delivery item.
[0072] In one possible implementation, Figure 3 This is a functional module diagram of a first generation module 220 in a dynamic distribution device for internal items of a building provided in an embodiment of the present application, such as Figure 3 As shown, the first generation module 220 includes: The calculation unit 221 is used to calculate the shortest delivery path of the delivery item from the starting location to the delivery location according to the shortest path algorithm and the internal building map model; the internal building map model is constructed by a plurality of location nodes and path edges between adjacent location nodes; A first determining unit 222 is used to determine an estimated delivery time required for delivering the delivery item according to the shortest delivery path; A determination unit 223 is used to determine whether the estimated delivery time of the delivered item is within the scheduled delivery time period of the delivered item; A second determining unit 224 is configured to determine the shortest delivery path of the delivery item as the initial delivery path of the delivery item if yes; The planning unit 225 is configured to, if not, re-plan a route for the delivery item to satisfy the scheduled delivery time period, and determine the re-planned delivery route as the initial delivery route for the delivery item.
[0073] In a possible implementation, Figure 2 As shown, the determination module 240 is specifically used to determine the target delivery solution of the global optimal delivery path of the at least one delivery item according to the following steps: Initializing a particle swarm and defining an individual optimal position and a global optimal position of each particle in the particle swarm; each particle is used to represent a delivery path of a delivery item; Determining a fitness value of each particle based on the path cost and delay time of the delivery item; Based on the probability wave equation of quantum mechanics and the fitness value of each particle, the individual optimal position and the global optimal position of each particle are updated; Repeat the steps of updating the individual optimal position and the global optimal position of each particle until the fitness function converges, and determine the delivery path of each delivery item in the particle swarm at the time of convergence as the target delivery plan.
[0074] In a possible implementation, Figure 2 As shown, the determination module 240 is further used to generate the target delivery path of the delivery item according to the following steps: Generate multiple alternative delivery routes based on the initial delivery route corresponding to the delivery item according to the real-time location information of the delivery person and the real-time information of the building environment; Determine the fitness of each alternative delivery path based on the degree of deviation from the initial delivery path and the stability of the path; The alternative delivery path corresponding to the highest fitness among the multiple alternative delivery paths is determined as the target delivery path for the delivery item.
[0075] In a possible implementation, Figure 2 As shown, the determination module 240 is also used to generate alternative delivery paths for the delivery items according to the following steps: inputting the real-time location information of the delivery person, the real-time information of the building environment and the initial delivery path of the delivery items into the target reinforcement learning model to generate alternative delivery paths for the delivery items.
[0076] In a possible implementation, Figure 2 As shown, the determination module 240 is further used to generate the target reinforcement learning model according to the following steps: Preprocessing the building distribution data in the historical database; the building distribution data includes distribution path data, delivery time data, path selection data, and emergency event data; Extracting distribution-related features from the pre-processed building distribution data, wherein the distribution-related features include path length features, travel speed features, residence time features between nodes, frequency of occurrence of emergencies, and impact features on the path; The initial reinforcement learning model is trained based on the delivery-related features to generate the target reinforcement learning model.
[0077] In a possible implementation, Figure 2 As shown, the determination module 240 is further used to generate the target reinforcement learning model according to the following steps: Define a delivery state vector, a path selection action space vector and a reward function; the delivery state vector represents the state information of different stages in the delivery process, the path selection action space vector represents the path selection taken by the delivery person at different stages, and the reward function represents the immediate benefit after selecting any path; Based on the delivery state vector, the path selection action space vector and the reward function, the reward value of the initial reinforcement learning model is updated to generate the target reinforcement learning model.
[0078] In the embodiment of the present application, the initial delivery path corresponding to the delivery item is generated based on the delivery information of at least one delivery item; during the delivery process, if it is determined that the initial delivery path is affected by the building environment, the target delivery path of the delivery item after the change is generated based on the real-time location information of the delivery person and the real-time information of the building environment; based on the multi-objective optimization model, the quantum particle swarm optimization algorithm, and the candidate delivery paths of each delivery item, the target delivery plan corresponding to minimizing the total delivery time and path length of all delivery items under the premise of satisfying the scheduled delivery time constraints of each delivery item is determined. In this way, the present application can adjust the path in time according to the changes in the delivery environment, and efficiently search for the global optimal path in a complex building environment, avoiding falling into the local optimum, and significantly improving the efficiency of item delivery.
[0079] Based on the same application concept, see Figure 4 As shown, it is a structural diagram of an electronic device 400 provided in an embodiment of the present application, including: a processor 410, a memory 420 and a bus 430, the memory 420 stores machine-readable instructions executable by the processor 410, when the electronic device 400 is running, the processor 410 and the memory 420 communicate through the bus 430, and the machine-readable instructions are executed by the processor 410 when running to perform the steps of the method for dynamic distribution of objects inside a building as described in any of the above embodiments.
[0080] Based on the same application concept, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for dynamic distribution of items within a building provided in the above embodiment are executed.
[0081] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned dynamic distribution method of items inside the building, can adjust the path in time according to changes in the distribution environment, and efficiently search for the global optimal path in a complex building environment, avoiding falling into local optimality, and significantly improving the efficiency of item distribution.
[0082] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
Claims
1. A method for dynamic distribution of items within a building, characterized in that: The method comprises: Obtaining delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes a scheduled delivery time period, a starting location, and a delivery location; For any of the delivery items, based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item, an initial delivery path corresponding to the delivery item is generated; During the delivery process, if it is determined that the initial delivery path of the delivered item is affected by the building environment, the initial delivery path of the delivered item is adjusted based on the real-time location information of the delivery person and the real-time information of the building environment, and an adjusted target delivery path of the delivered item is generated; Based on the multi-objective optimization model, the quantum particle swarm optimization algorithm and the candidate delivery paths of each of the delivery items, a target delivery plan for the global optimal delivery path of at least one delivery item is determined; the candidate delivery paths include an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan corresponding to minimizing the total delivery time and total path length of all delivery items under the premise of satisfying the constraints of the scheduled delivery time periods of each delivery item.
2. The method according to claim 1, characterized in that The generating of the initial delivery path corresponding to the delivery item based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item comprises: Calculate the shortest delivery path of the delivery item from the starting location to the delivery location according to the shortest path algorithm and the internal building map model; the internal building map model is constructed by a plurality of location nodes and path edges between adjacent location nodes; Determining an estimated delivery time required for delivering the delivery item according to the shortest delivery route; Determining whether the estimated delivery time of the delivered item is within the scheduled delivery time period of the delivered item; If yes, the shortest delivery path of the delivery item is determined as the initial delivery path of the delivery item; If not, a route that satisfies the scheduled delivery time period is re-planned for the delivery item, and the re-planned delivery route is determined as the initial delivery route for the delivery item.
3. The method according to claim 1, characterized in that The method of determining a target delivery solution of a global optimal delivery path for at least one delivery item based on a multi-objective optimization model, a quantum particle swarm optimization algorithm, and candidate delivery paths for each of the delivery items includes: Initializing a particle swarm and defining an individual optimal position and a global optimal position of each particle in the particle swarm; each particle is used to represent a delivery path of a delivery item; Determining a fitness value of each particle based on the path cost and delay time of the delivery item; Based on the probability wave equation of quantum mechanics and the fitness value of each particle, the individual optimal position and the global optimal position of each particle are updated; Repeat the steps of updating the individual optimal position and the global optimal position of each particle until the fitness function converges, and determine the delivery path of each delivery item in the particle swarm at the time of convergence as the target delivery plan.
4. The method according to claim 1, characterized in that: Generate the target delivery path of the delivery item according to the following steps: Generate multiple alternative delivery routes based on the initial delivery route corresponding to the delivery item according to the real-time location information of the delivery person and the real-time information of the building environment; Determine the fitness of each alternative delivery path based on the degree of deviation from the initial delivery path and the stability of the path; The alternative delivery path corresponding to the highest fitness among the multiple alternative delivery paths is determined as the target delivery path for the delivery item.
5. The method according to claim 4, characterized in that The alternative delivery paths for the delivery items are generated according to the following steps, including: The real-time location information of the delivery person, the real-time information of the building environment and the initial delivery path of the delivery item are input into the target reinforcement learning model to generate an alternative delivery path for the delivery item.
6. The method according to claim 5, characterized in that The target reinforcement learning model is generated according to the following steps: Preprocessing the building distribution data in the historical database; the building distribution data includes distribution path data, delivery time data, path selection data, and emergency event data; Extracting distribution-related features from the pre-processed building distribution data, wherein the distribution-related features include path length features, travel speed features, residence time features between nodes, frequency of occurrence of emergencies, and impact features on the path; The initial reinforcement learning model is trained based on the delivery-related features to generate the target reinforcement learning model.
7. The method according to claim 6, characterized in that The training of the initial reinforcement learning model based on the delivery-related features to generate the target reinforcement learning model includes: Define a delivery state vector, a path selection action space vector and a reward function; the delivery state vector represents the state information of different stages in the delivery process, the path selection action space vector represents the path selection taken by the delivery person at different stages, and the reward function represents the immediate benefit after selecting any path; Based on the delivery state vector, the path selection action space vector and the reward function, the reward value of the initial reinforcement learning model is updated to generate the target reinforcement learning model.
8. A dynamic distribution device for items inside a building, characterized in that: The device comprises: An acquisition module, used to acquire delivery information corresponding to at least one delivery item; the delivery information of each delivery item includes a scheduled delivery time period, a starting location, and a delivery location; A first generation module is used to generate, for any of the delivery items, an initial delivery path corresponding to the delivery item based on the scheduled delivery time period, the starting location, the delivery location and the shortest path algorithm of the delivery item; A second generation module is used to adjust the initial delivery path of the delivery item based on the real-time location information of the delivery person and the real-time information of the building environment if it is determined that the initial delivery path of the delivery item is affected by the building environment, and generate an adjusted target delivery path of the delivery item; A determination module is used to determine a target delivery plan for the global optimal delivery path of at least one delivery item based on a multi-objective optimization model, a quantum particle swarm optimization algorithm, and candidate delivery paths of each delivery item; the candidate delivery path includes an initial delivery path and / or an alternative delivery path; the target delivery plan is a delivery plan corresponding to minimizing the total delivery time and total path length of all delivery items under the premise of satisfying the constraints of the scheduled delivery time period of each delivery item.
9. An electronic device, characterized in that: include: Processor. Memory and bus, the memory stores machine-readable instructions executable by the processor, when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the method for dynamic distribution of items inside a building as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for dynamic distribution of objects within a building as claimed in any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Logistics vehicle distribution planning method and system based on distribution entropy multi-target particle swarm
CN112488386A
Operating room medical material distribution multi-robot cooperative path planning method and application thereof
CN114489065A
Robot scheduling method based on topological map, distribution equipment and storage medium
CN117130365A
Path planning method, application and device based on knowledge and data combination
CN117808180A
Battery distribution method, device and equipment for battery charging and swapping network and storage medium
CN118014460A
Cited By
Ordering distribution method and system based on closed campus, and mobile terminal
CN120387763A
