A fully automatic AGV charging and battery replacement collaborative optimization system

By integrating the AGV pose topological characteristics and the energy consumption prediction model of the battery potential margin attenuation gradient, combined with the consensus mechanism and scheduling optimization module, the congestion problem of multiple AGV battery swap stations is solved, and efficient and reliable coordinated optimization of charging and swap is achieved.

CN120257074BActive Publication Date: 2025-08-12BEIJING XUNCHAO TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510704975.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-12
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

The prior art lacks quantitative assessment of space conflict risks and task timeliness when multiple AGV cars are in the critical state of power at the same time, resulting in congestion and waste of resources in the battery swap station.

Method used

Through the energy consumption prediction module, a multi-physical coupling energy consumption trajectory residual model is constructed, and the charging urgency, spatial conflict entropy value and task time-limiting penalty items are integrated to generate trusted dynamic consensus factors, and a space-time conflict dissolution map is used to build an AGV scheduling optimization module to generate the optimal battery swap order and collision avoidance path.

Benefits of technology

It realizes efficient battery swap in multiple AGV critical power scenarios, avoids congestion and resource waste caused by prediction deviations, priority imbalances and time-space conflicts, and improves the scheduling efficiency and reliability of battery swap stations in high-frequency usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120257074B_ABST
    Figure CN120257074B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of electric vehicle technology, and discloses a fully automatic AGV (Automated Guided Vehicle) charging and battery swapping collaborative optimization system, comprising an energy consumption prediction module, a consensus mechanism design module, and an AGV scheduling optimization module; the energy consumption prediction module is used to obtain a posture topology feature vector and a potential margin attenuation gradient, construct a multi-dimensional input vector, and generate a dynamic energy consumption prediction value based on an energy consumption trajectory residual model coupled with multiple physical fields; the consensus mechanism design module is used to construct and verify a dynamic consensus factor, and provide a basis for priority decision-making; the AGV scheduling optimization module is used to discretize the battery swap station operation space, generate a time-space folding unit, construct a time-space conflict resolution map, and generate an optimal battery swapping order and a collision avoidance path; the present invention realizes efficient coordination of multi-AGV charging and battery swapping through multi-module collaboration, thereby avoiding congestion and waste of resources in battery swap stations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric vehicles, and more specifically, to a fully automatic AGV (Automated Guided Vehicle) vehicle charging and battery replacement collaborative optimization system. Background Art

[0002] With the increasing automation of logistics and warehousing, efficient charging and battery swapping management for AGVs (Automated Guided Vehicles), core equipment for warehousing operations, has become crucial for ensuring stable system operation. When multiple AGVs simultaneously reach critical battery levels and converge on the same battery swap station, traditional scheduling methods often cause congestion or even paralysis at the station due to inaccurate energy consumption predictions, single-priority decisions, and inadequate mitigation of spatiotemporal conflicts, severely impacting warehousing efficiency.

[0003] In the prior art, Chinese patent application CN113902289A proposes an AGV path planning method based on a flexible spatiotemporal network model, optimizing paths and energy consumption through a hybrid heuristic algorithm. However, this method focuses solely on time and energy consumption targets in path planning, failing to fully integrate the dynamic impact of AGV motion states (such as trajectory curvature and battery aging) on energy consumption. This makes it difficult to accurately predict the remaining battery life under complex operating conditions. This can lead to AGVs operating at high curvature and with aging batteries experiencing power outages due to insufficient battery life estimates, or low-energy AGVs prematurely occupying battery swap stations, exacerbating congestion. The Chinese patent application with publication number CN118068836A discloses a multi-AGV obstacle avoidance and path planning method and system based on deep learning. It realizes multi-AGV obstacle avoidance and path planning based on deep learning and adapts to environmental changes through reinforcement learning. However, its priority decision relies on static power threshold or task priority. It has not built a multi-dimensional evaluation system covering charging urgency, spatial conflict risk, and task timeliness. It cannot dynamically balance multiple constraints within the limited space of the battery swap station, which easily leads to problems such as "urgent task AGVs are delayed in scheduling due to spatial conflicts" or "multiple AGVs rush into the battery swap station at the same time, causing the robotic arm to preempt".

[0004] When it comes to solving the problem of efficient and orderly battery swapping when multiple AGVs are simultaneously in a critical battery state and head to the same battery swap station, existing technologies rely solely on a single indicator (such as battery level or task priority) for battery swap priority decisions. This lacks quantitative assessment of spatial conflict risks and task timeliness, and is unable to meet multi-objective optimization requirements. Summary of the Invention

[0005] The present invention is suitable for scenarios such as large-scale intelligent warehouses, logistics centers, and automated factories. It is designed for AGV fleets of multiple models and multi-task types. It solves the congestion problem caused by centralized battery replacement when multiple AGVs reach critical power levels under the demand for high-frequency charging and battery replacement.

[0006] In order to overcome the above-mentioned defects of the prior art, the present invention provides a fully automatic AGV car charging and battery swapping collaborative optimization system. Through the energy consumption prediction module, the AGV posture topological characteristics and the battery potential margin attenuation gradient are integrated to construct a multi-physical field coupled energy consumption trajectory residual model to achieve accurate energy consumption prediction; the consensus mechanism design module is used to integrate the charging urgency, spatial conflict entropy, and task time penalty items to generate a credible dynamic consensus factor to quantify multi-dimensional priorities; with the help of the AGV scheduling optimization module, the spatiotemporal resources of the battery swap station are discretized, a spatiotemporal conflict resolution map is constructed, and the optimal battery swap order and collision avoidance path are generated. Breaking through the limitations of traditional single-dimensional scheduling, the "motion-energy consumption-aging" multi-physical field collaborative analysis is realized, significantly improving the scheduling efficiency and reliability of the battery swap station in the multi-AGV critical power scenario, and avoiding congestion and resource waste caused by prediction bias, priority imbalance, and spatiotemporal conflict.

[0007] To achieve the above object, the present invention provides the following technical solutions:

[0008] A fully automatic AGV charging and battery swapping collaborative optimization system, including:

[0009] Energy consumption prediction module: used to obtain the AGV's posture topology feature vector and potential margin attenuation gradient, construct a multi-dimensional input vector, and generate a dynamic energy consumption prediction value with adaptive characteristics based on the multi-dimensional input vector and the pre-built multi-physics field coupled energy consumption trajectory residual model;

[0010] Consensus mechanism design module: used to build a dynamic consensus factor that provides a priority decision basis for AGV charging and swapping scheduling optimization, and to perform cross-node verification on the constructed dynamic consensus factor to obtain a credible dynamic consensus factor;

[0011] AGV scheduling optimization module: used to discretize the battery swap station operation space and generate space-time folding units; based on the dynamic energy consumption prediction value, the credible dynamic consensus factor and the space-time folding units, it constructs a space-time conflict resolution map for the battery swap station and generates the optimal battery swap sequence and collision avoidance path for the AGV.

[0012] Furthermore, the method for obtaining the posture topological feature vector of the AGV vehicle is: obtaining the posture topological features of the AGV vehicle in real time to form a posture topological feature vector; the posture topological features include at least three-dimensional coordinates.

[0013] Furthermore, the method for constructing a multidimensional input vector is: normalizing the posture topological feature vector and the potential margin attenuation gradient, and splicing the normalized posture topological feature vector and the potential margin attenuation gradient into a multidimensional input vector.

[0014] Furthermore, the consensus mechanism design module includes a dynamic consensus factor construction unit and a dynamic consensus factor verification unit;

[0015] The dynamic consensus factor construction unit is used to determine the urgency weight reflecting the urgency of AGV charging, the spatial conflict entropy value reflecting the spatial conflict risk of AGV, and the task time penalty item reflecting the risk of AGV task timeout. According to the urgency weight, spatial conflict entropy value and task time penalty item, a dynamic consensus factor is constructed to provide a priority decision basis for AGV charging and swapping scheduling optimization.

[0016] Furthermore, the dynamic consensus factor verification unit is used to build a distributed collaborative verification layer based on the Byzantine fault tolerance mechanism, and the constructed dynamic consensus factor is verified across nodes through the distributed collaborative verification layer to obtain a trusted dynamic consensus factor.

[0017] Furthermore, the method for determining the urgency weight includes:

[0018] Obtain the current remaining power DE of the AGV; obtain the activation exponential growth function based on the current remaining power DE of the AGV and the potential margin attenuation gradient; set the initial urgency weight E1, when DE ≥ S1, the urgency weight E = E1; when DE < S1, dynamically increase the initial urgency weight E1 according to the activation exponential growth function to obtain the urgency weight E, where S1 is the power urgency threshold.

[0019] Furthermore, the method for determining the spatial conflict entropy value includes:

[0020] Based on the three-dimensional coordinates of the AGV in the pose topology feature vector, the relative distance between multiple AGVs is obtained;

[0021] According to the relative distances between multiple AGVs, a virtual repulsive potential field is introduced to establish a congestion model for AGVs in the operation area of the battery swap station.

[0022] According to the established congestion model of AGVs in the battery swap station operation area, the spatial conflict entropy value reflecting the spatial conflict risk of AGVs is obtained.

[0023] Furthermore, the method for determining the task time penalty item includes:

[0024] Obtain the deadline and current time of the task currently being executed by the AGV; introduce an inverse proportional function between the deadline and current time of the task; and generate a task time penalty item reflecting the risk of AGV task timeout based on the inverse proportional function.

[0025] Furthermore, the method for discretizing the operation space of the battery swap station includes:

[0026] The four-dimensional spatiotemporal coordinates of the resource elements of the battery swap station are extracted to form the operation space state matrix of the battery swap station; the operation space state matrix of the battery swap station is compressed and mapped to generate a spatiotemporal folding unit that reflects the spatiotemporal dependency relationship between the resource elements of the battery swap station.

[0027] Furthermore, the method for constructing a spatiotemporal conflict resolution graph for battery swap stations includes:

[0028] The dynamic energy consumption prediction value and the credible dynamic consensus factor are mapped to the spatiotemporal folding unit to form a six-dimensional state matrix. Based on the six-dimensional state matrix, a spatiotemporal conflict resolution map of the battery swap station is constructed. Each AGV corresponds to a node in the spatiotemporal conflict resolution map of the battery swap station.

[0029] Furthermore, the method for generating the optimal battery replacement sequence of the AGV includes:

[0030] Based on the spatiotemporal conflict resolution graph of battery swap stations, a node coloring model is constructed. Based on the node coloring model, the graph nodes are traversed and colored according to the trusted dynamic consensus factor.

[0031] The spatiotemporal replacement algorithm is used to gradually eliminate adjacent nodes of the same color in the spatiotemporal conflict resolution graph of the battery swap station; through iterative optimization, the final node coloring scheme is output, and the final node coloring scheme corresponds to the optimal battery swap order of the AGV.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] The fully automatic AGV charging and battery swapping collaborative optimization system of the present invention improves the charging and battery swapping efficiency and reliability of multiple AGVs in critical power scenarios through the organic collaboration of multiple modules. The energy consumption prediction module establishes a physical coupling relationship between the motion trajectory and the battery status through cross-domain data fusion, accurately captures the nonlinear energy consumption growth under complex working conditions such as "high curvature driving + aging battery", and provides a reliable remaining battery life estimate for the scheduling system, avoiding the concentrated congestion of multiple AGVs in the battery swap station due to prediction deviation. The dynamic consensus factor constructed by the consensus mechanism design module integrates the charging urgency, spatial conflict risk and task timeout risk, solving the problem of a single basis for priority decision-making in traditional methods, ensuring that the scheduling system can dynamically weigh multiple constraints, avoiding decision deviations in scenarios such as "urgent but not crowded" and "crowded but non-urgent", and ensuring data reliability through cross-node verification. The AGV scheduling optimization module discretizes the operating space of the battery swap station in time and space, constructs a spatial-temporal conflict resolution map, and combines dynamic energy consumption predictions with trusted dynamic consensus factors to generate the optimal battery swap sequence and collision avoidance path. This effectively handles time window conflicts and priority scheduling issues for multiple AGVs, avoids spatial resource competition and equipment collisions, and achieves a "time-ordered, spatially conflict-free" battery swap process. The entire fully automatic AGV charging and swapping collaborative optimization system has upgraded from "single power monitoring" to "motion-energy consumption-aging" multi-physics field collaborative analysis, significantly improving the scheduling efficiency of battery swap stations in high-frequency usage scenarios and ensuring the efficient operation of warehousing and logistics systems. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 This is a functional module diagram of a fully automatic AGV charging and battery swapping collaborative optimization system in the present invention;

[0036] Figure 2 This is a flow chart of a method for obtaining the potential margin attenuation gradient of an AGV in a fully automatic AGV charging and swapping collaborative optimization system of the present invention;

[0037] Figure 3 This is a flow chart of a method for determining the urgency weight E in a fully automatic AGV charging and battery swapping collaborative optimization system of the present invention;

[0038] Figure 4 This is a flow chart of a method for determining the spatial conflict entropy value in a fully automatic AGV charging and battery swapping collaborative optimization system of the present invention;

[0039] Figure 5 This is a flow chart of a method for determining task time penalty items in a fully automatic AGV charging and battery swapping collaborative optimization system of the present invention;

[0040] Figure 6 This is a schematic diagram of a scenario in which multiple AGVs are simultaneously in a critical battery state and head to the same battery swap station in an embodiment of the present invention;

[0041] Figure 7 This is a schematic diagram of giving priority to battery replacement for the AGV with the most urgent task in an embodiment of the present invention;

[0042] Figure 8 This is a flow chart of a method for iteratively searching for the optimal battery swapping sequence through a time-space replacement algorithm based on a time-space conflict resolution graph of a battery swapping station in a fully automatic AGV battery swapping collaborative optimization system of the present invention;

[0043] Figure 9 This is a flow chart of a method for collaborative optimization of fully automatic AGV charging and battery replacement according to the present invention. DETAILED DESCRIPTION

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0045] Example 1:

[0046] See also Figure 1 As shown, this embodiment provides a fully automatic AGV charging and battery replacement collaborative optimization system, including:

[0047] The energy consumption prediction module is used to obtain the AGV's posture topology feature vector and potential margin attenuation gradient, construct a multi-dimensional input vector, and generate a dynamic energy consumption prediction value with adaptive characteristics based on the multi-dimensional input vector and the pre-built multi-physics field coupled energy consumption trajectory residual model;

[0048] Traditional methods process motion data and battery data independently, causing the energy consumption model to ignore the synergistic attenuation effect of "high curvature driving + aging battery". The energy consumption prediction module establishes a physical coupling relationship between motion trajectory and battery status through cross-domain data fusion, enabling the energy consumption trajectory residual model to accurately predict energy consumption changes under complex working conditions, providing the scheduling system with a reliable estimate of the remaining battery life, and avoiding the concentrated congestion of multiple AGVs in battery swap stations due to prediction deviations.

[0049] The energy consumption prediction module includes:

[0050] The feature fusion unit is used to obtain the AGV's posture topology feature vector and potential margin attenuation gradient to construct a multi-dimensional input vector;

[0051] Furthermore, the feature fusion unit in the embodiment of the present application is further configured to perform the following steps:

[0052] Step S1110: acquiring the posture topological features of the AGV in real time to form a posture topological feature vector; the posture topological features include three-dimensional coordinates, motion vector angles, and trajectory curvature dynamic parameters;

[0053] Specifically, the AGV's position (x, y, z) in the warehouse space is recorded in real time using a Cartesian coordinate system. This 3D coordinate system is used to record the AGV's position (x, y, z) in real time, determining its absolute spatial location. The motion vector angle is defined as the angle θ between the AGV's current direction of motion and the x-axis of the global coordinate system. This angle is calculated in real time by analyzing the drive wheel speed difference or using an inertial navigation system. It reflects changes in the AGV's heading. For example, a sudden change in θ from 0° to 90° during a right-angle turn indicates a need for trajectory adjustment. The trajectory curvature dynamic parameter, ρ, is based on a Frenet frame-based curvature radius estimation algorithm. This parameter calculates the curvature radius ρ by fitting the local trajectory with continuously acquired pose data. This parameter quantifies the nonlinear complexity of the trajectory. Smaller values of ρ (e.g., ρ = 1 meter for a sharp turn) indicate higher maneuverability requirements and correspondingly increased energy consumption due to frequent steering. These parameters constitute the pose topology feature vector [x, y, z, θ, ρ], providing geometric foundational data for subsequent analysis of the energy consumption characteristics of AGV motion in the warehouse space. Traditional energy consumption prediction models rely solely on linear distance or speed parameters, failing to account for the nonlinear effects of trajectory curvature on energy consumption (e.g., frequent turns leading to sudden increases in motor load). By introducing a dynamic parameter for trajectory curvature, the AGV's maneuverability (e.g., the curvature of the obstacle avoidance path) is correlated with motor energy consumption. Combined with the potential margin attenuation gradient in step S1120, this model characterizes the coupled relationship between "motion state and battery attenuation." Without step S1110, the energy consumption trajectory residual model would be unable to distinguish between the energy consumption differences between straight-line travel and complex paths, causing the battery swap station scheduling strategy to ignore the AGV's real-time motion needs.

[0054] Step S1120, obtaining the potential margin attenuation gradient of the AGV;

[0055] Furthermore, if Figure 2 As shown, the step S1120 includes:

[0056] Step S1121: collect the charge and discharge current data of the AGV battery in real time, integrate the current data according to the time series, and obtain the cumulative charge change from the last charging completion to the current moment;

[0057] Step S1122, obtaining a battery aging coefficient reflecting the current degree of battery performance degradation;

[0058] Step S1123, the cumulative charge change and the battery aging coefficient are input into a pre-built nonlinear mapping function to obtain the potential margin attenuation gradient of the current AGV vehicle; the nonlinear mapping function takes the cumulative charge change and the battery aging coefficient as input and takes the potential margin attenuation gradient as output.

[0059] Specifically, the cumulative charge change ΔQ is determined by real-time charge and discharge current acquisition by the battery management system (BMS). The current is time-integrated from the last charge completion time to the current moment. ΔQ reflects the cumulative charge consumed or replenished during battery operation. Positive values indicate charging, while negative values indicate discharging. For example, ΔQ is negative during continuous cargo handling, and its absolute value increases with operating time. The battery aging factor (SoH) is determined by analyzing the battery's historical charge and discharge cycles and the open-circuit voltage decay curve under static conditions, combined with an electrochemical impedance spectroscopy (EIS) model or a capacity decay fitting algorithm. SoH ranges from 0 to 1, with 1 representing a brand new state and 0 representing complete failure. For example, if a battery's measured capacity drops to 80% of its rated capacity after 500 cycles, its SoH is 0.8, indicating a 20% decrease in its actual available energy. Based on the physicochemical mechanisms of battery charge and discharge (such as the diffusion resistance of lithium ions in the electrode material and the aging decrease in electrolyte conductivity), a mapping relationship is established, with ΔQ and SoH as inputs and the potential margin decay gradient (γ) as output. This function, fitted by experimental data, captures the characteristic of aging batteries, which experience a faster potential drop under the same charge level. For example, when SoH = 0.6, the γ value corresponding to the same ΔQ is 30% higher than when SoH = 1, reflecting the accelerated potential decay caused by increased internal resistance due to aging. The resulting γ value represents the rate of potential decay of the battery, taking into account the current energy consumption and aging state, providing a key basis for dynamically assessing the remaining endurance of AGVs. Battery aging leads to deviations in the prediction of the actual available capacity (SoC) under the same charge level. Traditional methods fail to take SoH into account and cannot accurately predict the "false charge" phenomenon of aging batteries.

[0060] In step S1130, the posture topology feature vector and the potential margin attenuation gradient are normalized, and the normalized posture topology feature vector and the potential margin attenuation gradient are spliced into a multi-dimensional input vector.

[0061] Specifically, the three-dimensional coordinates (x, y, z) and the motion vector angle θ are converted to relative coordinates (s, φ, k) in the Frenet frame, where s is the arc length along the trajectory tangent, φ is the angle between the tangent and the principal normal, and k is the trajectory curvature (k = 1 / ρ). This transformation eliminates the influence of absolute position in the global coordinate system and focuses on the local geometric characteristics of the AGV's trajectory. For example, the path curvatures in different regions are uniformly mapped to relative values, facilitating model comparison of energy consumption characteristics under different operating conditions. The trajectory curvature k is normalized, and the SoH and γ are mapped to the range of 0-1. This process eliminates the interference of dimensional differences on model training. For example, it prevents the three-dimensional coordinates (values range from 0-100 meters) from dominating the model weights during input, ensuring the effective influence of the battery state parameters (range 0-1). The resulting multi-dimensional input vector provides unified dimensional input data for subsequent multi-physics coupling models, addressing the training bias caused by the direct fusion of heterogeneous data. If this step is omitted, the model requires an additional feature scaling layer, increasing computational complexity and reducing real-time performance.

[0062] The fully automated AGV charging and battery swapping collaborative optimization system aims to address congestion at battery swap stations when multiple AGVs reach critical battery levels. The core challenge lies in integrating AGV motion and battery status to achieve accurate energy consumption prediction and scheduling priority calculation. The feature fusion unit specifically addresses the challenges of heterogeneous data fusion and model input inaccuracy. The dimensionality difference between pose data (meters, radians) and potential data (ampere-hours, dimensionless) leads to imbalanced parameter weights during model training. For example, directly inputting 3D coordinates (large numerical range) and SoH (small numerical range) causes the model to overly focus on spatial position and ignore the significant impact of battery aging on energy consumption. AGV energy consumption is determined by both trajectory complexity (such as the curvature radius affecting the drive motor load) and battery performance (such as increased internal resistance due to aging). Traditional methods independently process these two types of data and fail to capture the nonlinear energy consumption growth associated with high curvature and aging batteries. This can lead to excessive energy consumption prediction errors and, in turn, scheduling errors. If the trajectory curvature parameter is lacking, the model cannot distinguish between straight-line driving (low energy consumption) and continuous curve driving (high energy consumption), which may cause low-energy AGVs to occupy the battery swap station in advance, while high-energy AGVs will stagnate due to power exhaustion, exacerbating congestion; if the battery aging coefficient is ignored, the battery life of the aging battery will be overestimated, causing it to lose power before reaching the battery swap station, blocking the channel and triggering a chain reaction.

[0063] The multidimensional input vector integrates the geometric features of the motion trajectory (curvature, heading) with the electrochemical characteristics of the battery state (aging, charge decay rate), enabling the energy consumption trajectory residual model to capture the coupled effects of "motion, energy consumption, and battery aging." The potential margin decay gradient γ directly influences the dynamic adjustment of the urgency weight E. When the remaining charge DE falls below a threshold S1 (e.g., 15%), an exponential growth function is activated in conjunction with the γ value, giving higher priority to AGVs with severe aging and high decay gradients. This addresses the problem of "battery endurance cannot be distinguished based solely on remaining charge" and prevents excessive allocation of scheduling resources to AGVs with newer batteries. The three-dimensional coordinates of the pose topology provide input for the calculation of spatial conflict entropy. A virtual repulsive potential field is constructed based on relative distance to quantify the congestion risk near battery swap stations. For example, when two AGVs with a small curvature radius run parallel within 5 meters of a battery swap station, the potential field strength increases nonlinearly with decreasing distance, prompting the scheduling system to prioritize one of them for an early battery swap, reducing the probability of spatial collisions.

[0064] In the fully automatic AGV charging and battery swapping collaborative optimization system, if the feature fusion unit is missing, then:

[0065] The energy consumption prediction model fails: The lack of trajectory curvature parameters makes it impossible to distinguish the energy consumption differences under different road conditions, resulting in the same treatment of AGVs traveling in a straight line and AGVs traveling on a curve. This may lead to resource mismatches such as "low-energy-consuming AGVs preemptively occupying battery swap stations, while high-energy-consuming AGVs stall due to power depletion." The lack of a battery aging coefficient will overestimate the battery life of aging batteries, causing them to lose power on the way to the battery swap station, blocking the channel and triggering chain congestion.

[0066] Inaccurate scheduling priority calculation: Determining the urgency weight based solely on the remaining battery power, while ignoring the rapid decay characteristics of aging batteries, may cause AGVs that truly need charging to be delayed in scheduling, while AGVs with new batteries are prioritized. This leads to a mismatch between battery swap station resource allocation and actual demand, exacerbating congestion risks.

[0067] Heterogeneous data cannot be integrated: Directly inputting geometric and electrochemical dimensions into the model leads to training bias (for example, the gradient descent algorithm converges to a local optimal solution). The resulting battery swapping sequence and collision avoidance path lack physical mechanism support, making it unable to cope with the scheduling needs under complex working conditions of multiple AGVs, thereby reducing the processing efficiency of the battery swap station.

[0068] By constructing multidimensional input vectors, the feature fusion unit systematically addresses the technical barriers to heterogeneous data fusion, providing basic data with clear physical meaning and uniform dimensions for subsequent energy consumption prediction, priority calculation, and spatiotemporal scheduling. Its core value lies in the cross-domain coupling of the AGV's motion characteristics and battery status, enabling the entire dispatch system to upgrade from "single power monitoring" to a multi-physics collaborative analysis of "motion, energy consumption, and aging." This fundamentally improves the dispatch efficiency and reliability of battery swap stations in multi-AGV critical power scenarios, avoiding the risk of congestion and waste of resources caused by one-sided data.

[0069] The energy consumption prediction unit generates a dynamic energy consumption prediction value with adaptive characteristics based on a multi-dimensional input vector and a pre-built multi-physics field coupled energy consumption trajectory residual model.

[0070] Specifically, the energy consumption prediction unit solves the problem of insufficient AGV energy consumption prediction accuracy under complex working conditions by integrating multi-dimensional physical characteristics and data-driven modeling methods, avoiding resource allocation imbalance and the risk of congestion at battery swap stations due to prediction bias, and providing key input for the subsequent construction of dynamic consensus factors and the resolution of spatiotemporal conflicts at battery swap stations. The multi-physics field coupled energy consumption trajectory residual model is a composite prediction model that integrates the physical characteristics of AGV motion (such as posture topology characteristics) and the electrochemical characteristics of batteries (such as the potential margin attenuation law). Its core architecture consists of four parts: input layer, multimodal feature fusion layer, residual calculation layer, and adaptive output layer:

[0071] Input layer: Receives the multi-dimensional input vector generated by the feature fusion unit, including the pose topology feature vector (three-dimensional coordinates, motion vector angle, trajectory curvature dynamic parameters) and the potential margin attenuation gradient (reflecting the battery energy consumption rate and aging status).

[0072] Multimodal feature fusion layer: Using the spatiotemporal attention mechanism, the spatial pose data and the temporal battery status data are cross-modally associated to extract the coupling features between the two (for example, the additional consumption of battery energy by high curvature trajectories).

[0073] Residual calculation layer: Through historical data training, a residual database of "predicted energy consumption" and "actual energy consumption" is established to identify prediction deviation patterns under different working conditions (such as reduced battery life due to battery aging).

[0074] Adaptive Output Layer: Based on the residual-corrected prediction model, it outputs a dynamic energy consumption forecast for the future period. This forecast is adaptively adjusted based on the real-time status of the AGV. It integrates a set of decision trees generated by a random forest algorithm, uses the AdaBoost mechanism to weight abnormal operating condition samples, and configures an online learning module to update model parameters in real time.

[0075] The model training sample dataset contains the following core dimensions:

[0076] Posture trajectory data: Collects the historical operation trajectory of the AGV in the warehouse, including the three-dimensional coordinate sequence, motion vector angle, and trajectory curvature dynamic parameters (calculated using the Frenet frame curvature radius estimation algorithm to reflect the degree of path curvature).

[0077] Battery status data: including charge and discharge current sequence, cumulative charge change, battery aging coefficient (SoH, calculated by combining the battery capacity decay curve with the internal resistance growth model to characterize the degree of battery performance degradation), and potential margin decay gradient (obtained by coupling the cumulative charge change with the aging coefficient through a nonlinear mapping function to quantify the battery energy decay rate).

[0078] Measured energy consumption data: The energy consumption per unit time value collected in real time by the AGV battery management system (BMS) serves as a supervisory signal for model training.

[0079] The training samples cover different load conditions (no load / full load), path types (straight line / curved road), and battery aging stages (new battery / aged battery), ensuring the model's generalization ability for complex scenarios.

[0080] An ensemble learning framework employs a random forest algorithm to generate multiple decision trees. Each decision tree is trained on randomly sampled training and feature subsets to reduce model variance. An adaptive boosting (AdaBoost) mechanism is introduced to increase the weight of samples with large residual errors from the previous round of predictions, forcing subsequent decision trees to focus on difficult-to-fit conditions (such as abnormal energy consumption under rapid acceleration and high-curvature paths). After model deployment, the online learning module receives new AGV operation data in real time and regularly updates the decision tree weights, enabling adaptive adjustments to dynamic factors such as battery aging and changes in path planning strategies.

[0081] The multi-dimensional input vector is input into the trained energy consumption trajectory residual model to generate a dynamic energy consumption prediction value with adaptive characteristics. The "adaptive characteristics" mentioned above mean that the model can dynamically adjust the prediction parameters according to the real-time input posture and battery status data. For example, when the battery aging coefficient of an AGV exceeds the threshold, the model automatically increases the weight of the potential margin attenuation gradient to improve the prediction accuracy of the AGV's range reduction.

[0082] Through multi-physics coupled modeling, the kinematic characteristics of AGVs and battery characteristics are combined, addressing the problem of single-dimensional data failing to fully reflect energy consumption patterns. For example, the coupling of trajectory curvature dynamic parameters with the potential margin attenuation gradient can identify abnormal energy consumption increases under the combined operating conditions of a "highly maneuverable path with aging batteries." A residual model and adaptive training mechanism address the compatibility of historical data with real-time operating conditions, enabling the model to dynamically adjust prediction parameters based on the AGV's lifecycle (battery aging) and operating environment (path changes).

[0083] In scenarios where multiple AGVs frequently swap batteries, the lack of accurate energy consumption predictions makes it impossible to accurately determine the AGV's true endurance needs, potentially leading to "battery misjudgments" (e.g., insufficient remaining battery estimation leading to power outages, or excessively premature battery swaps occupying resources). Difficulty identifying the impact of battery aging on battery life leads to rigid scheduling strategies (e.g., assigning battery swap priorities based on new battery standards while ignoring the urgent charging needs of aging AGVs). Ignoring the dynamic impact of position and trajectory on energy consumption—for example, an AGV that frequently turns actually consumes more energy than one traveling in a straight line—will lead to irrational allocation of battery swap windows if the prediction model fails to account for trajectory curvature.

[0084] Omitting this step and using a fixed energy consumption model (e.g., estimating battery life based solely on remaining battery charge) will distort battery swap priority calculations. This will make it impossible to distinguish between low battery levels due to battery aging and low battery levels due to high-load operation, potentially leading to incorrect priority allocations (e.g., prioritizing AGVs with aging batteries but sufficient battery life, while ignoring high-load AGVs that urgently need a battery swap). Temporal and spatial conflict resolution will also fail, and the allocation of time windows without energy consumption predictions will be unable to match the actual battery life requirements of AGVs. This can lead to multiple AGVs simultaneously entering the battery swap station, causing congestion or even collisions.

[0085] The dynamic energy consumption prediction value in the energy consumption prediction unit, combined with the remaining battery capacity, can more accurately quantify the urgency of AGV charging. For example, given two AGVs with 15% remaining battery, the model can use the potential margin decay gradient to identify one as nearing endurance due to battery aging (large decay gradient) while the other is experiencing stable energy consumption due to a flat path (small decay gradient). This allows for appropriate charging priority between the two, avoiding indiscriminate scheduling based on "absolute battery value determining priority." Coupled analysis of pose trajectory and energy consumption allows for the prediction of AGV arrival times and energy consumption rates at battery swap stations, enabling pre-planned battery swap windows. For example, for an AGV about to enter a highly curvature path, the model predicts a significant increase in energy consumption, enabling the pre-allocation of battery swap resources to avoid scheduling disruptions caused by emergency battery swaps. An adaptive training mechanism enables the model to adapt to dynamic changes such as battery aging and adjustments to path planning strategies. For example, if changes in warehouse layout increase the average curvature of an AGV's travel, the model automatically adjusts the weight of the trajectory curvature's impact on energy consumption through online learning, ensuring consistent prediction accuracy over long-term operation.

[0086] The consensus mechanism design module is used to construct a dynamic consensus factor that provides a priority decision basis for AGV charging and swapping scheduling optimization, and to perform cross-node verification on the constructed dynamic consensus factor to obtain a credible dynamic consensus factor;

[0087] Traditional methods only sort by power or task priority, and are unable to balance the multi-objective optimization of charging urgency, spatial congestion, and task timeliness. The dynamic consensus factor in the consensus mechanism design module integrates these three elements, enabling the scheduling system to dynamically weigh multiple constraints and avoid decision-making deviations in "urgent but not congested" and "congested but non-urgent" scenarios. In a warehousing environment, AGV nodes may report incorrect remaining power or task status due to electromagnetic interference, causing the scheduling system to misjudge priority. The cross-node verification mechanism reduces the risk of misjudgment of abnormal data through multi-node data cross-validation, ensuring that battery swap station resource allocation is based on reliable data and avoiding "single point failure causing global congestion."

[0088] The consensus mechanism design module includes:

[0089] A dynamic consensus factor construction unit is used to determine the urgency weight reflecting the urgency of AGV charging, the spatial conflict entropy value reflecting the AGV spatial conflict risk, and the task time penalty item reflecting the AGV task overtime risk. Based on the urgency weight, spatial conflict entropy value, and task time penalty item, a dynamic consensus factor is constructed to provide a priority decision basis for AGV charging and swapping scheduling optimization;

[0090] Furthermore, the dynamic consensus factor construction unit of the embodiment of the present application is also used to perform the following steps:

[0091] Step S2110, determining the urgency weight E;

[0092] Furthermore, if Figure 3 As shown, step S2110 includes:

[0093] Step S2111, obtaining the current remaining power DE of the AGV;

[0094] Step S2112: obtaining an activation exponential growth function based on the current remaining power DE of the AGV and the potential margin attenuation gradient;

[0095] Step S2113, setting the initial urgency weight E1, when DE≥S1, E=E1; when DE<S1, dynamically increase the initial urgency weight E1 according to the activation exponential growth function to obtain the urgency weight E, where S1 is the power urgency threshold.

[0096] Specifically, the urgency weight E is the core parameter that reflects the urgency of AGV charging. Its role is to quantify the urgent need of AGV for charging resources and provide a basis for priority decision-making for the dynamic consensus factor. In the scenario of centralized battery replacement of multiple AGVs, there are defects in judging the charging priority simply by the absolute value of the remaining power. For example, two AGVs with the same remaining power may have significant differences in the actual charging urgency due to different battery aging or energy consumption rates. Step S2110 solves the problem that "the static power threshold cannot reflect the dynamic charging demand" by integrating the remaining power and the potential margin attenuation gradient.

[0097] The AGV's battery management system (BMS) collects the battery's state of charge (SoC) in real time and normalizes it to obtain the current remaining energy (DE). DE ranges from [0, 1], where 0 indicates a completely depleted battery and 1 indicates a fully charged battery. This parameter is a fundamental indicator of the AGV's current energy reserve. However, DE alone cannot distinguish between low energy levels due to high-energy consumption and low energy levels due to battery aging. Therefore, it must be dynamically corrected in conjunction with the potential margin decay gradient. The potential margin decay gradient reflects the rate of potential decay after accounting for battery aging and accumulated energy consumption and is a key parameter for characterizing the battery's remaining energy availability. The activation exponential growth function takes DE and the potential margin decay gradient as inputs. Its mathematical mapping is determined by analyzing the battery's electrochemical characteristics: when DE exceeds the battery emergency threshold S1 (e.g., 0.15), the AGV has ample time to plan a battery replacement route, and the urgency remains at the initial urgency weight E1. When DE falls below S1, the function output increases exponentially as DE decreases. The larger the potential margin decay gradient (i.e., the faster the battery energy decay), the higher the growth rate. The design logic behind the activation exponential growth function is that, in low-battery conditions, rapid potential decay due to battery aging or high energy consumption exacerbates the urgency of charging. This exponential growth characteristic can nonlinearly amplify the priority of such emergency situations. For example, an AGV may have a large potential margin decay gradient due to high-frequency steering (high trajectory curvature). Even if its DE is slightly higher than S1, the activation function will still moderately increase the urgency based on the gradient value, avoiding scheduling delays caused by relying solely on the remaining battery threshold. Using an exponential growth function to handle low-battery scenarios is consistent with the electrochemical characteristics of batteries—at critical battery levels, the potential decay rate increases significantly with aging. Nonlinear mapping can accurately capture this dynamic change, avoiding the hysteresis inherent in fixed thresholds.

[0098] The initial urgency weight E1 is set as the benchmark value when DE ≥ S1. This value is determined through historical data statistics and reflects the AGV's demand level for charging resources under normal working conditions. When DE < S1, E1 is dynamically corrected according to the activation exponential growth function. Step S2110 avoids extensive scheduling based on "power-only" - for example, two AGVs with a DE of 12%, one with a potential margin attenuation gradient of 0.8V / s (high attenuation rate) due to battery aging, and the other with a gradient of 0.3V / s (low attenuation rate) due to a flat path. The urgency weight E of the former will be significantly higher than that of the latter, giving priority to battery replacement resources. This differentiated processing can accurately identify AGVs that are truly in urgent need of charging and avoid unfair scheduling due to differences in battery performance.

[0099] Step S2110 overcomes the limitation of a single charge threshold in not reflecting the dynamic performance of batteries. By incorporating battery aging and energy consumption rate factors into the potential margin decay gradient, this allows for multi-dimensional quantification of charging urgency. This provides a key input for the dynamic consensus factor, the "urgency" dimension, enabling subsequent battery swap order generation to prioritize high-urgency AGVs and reduce the risk of power outages caused by battery exhaustion. Urgency weights serve as a priority in the node coloring model, prioritizing high-weight AGVs in battery swap time windows in the tabu search algorithm to ensure priority execution of urgent tasks. The dynamic energy consumption prediction value in the energy consumption prediction module provides a dynamic assessment of battery life for the urgency weight (e.g., a high-energy-consuming AGV may trigger a high urgency due to insufficient battery life even if its battery level remains high). The urgency weights, in turn, provide an inverse constraint on scheduling priorities for the energy consumption prediction (e.g., prioritizing battery swaps for high-energy-consuming AGVs). These two factors combine to prevent resource waste caused by misjudgments of battery life.

[0100] Step S2120, determining the spatial conflict entropy value;

[0101] Furthermore, if Figure 4 As shown, step S2120 includes:

[0102] Step S2121, obtaining the relative distances between multiple AGVs based on the three-dimensional coordinates of the AGV in the posture topology feature vector;

[0103] Step S2122: Based on the relative distances between multiple AGVs, a virtual repulsive potential field is introduced to establish a congestion model for AGVs in the battery swap station operation area.

[0104] Step S2123: According to the established congestion model of AGVs in the battery swap station operation area, a spatial conflict entropy value reflecting the spatial conflict risk of AGVs is obtained.

[0105] Specifically, the spatial conflict entropy value is used to quantify the spatial collision risk of multiple AGVs within the battery swap station's operating area and is a crucial component of the dynamic consensus factor. Within the limited operating space of a battery swap station (such as charging stations and robotic arm activity areas), close proximity between AGVs can easily lead to path conflicts, resulting in reduced battery swap efficiency and even equipment damage. Step S2120 constructs a congestion model to convert spatial conflict risk into a calculable entropy metric.

[0106] The Euclidean distance between any two AGVs is calculated based on the three-dimensional coordinates of the AGVs in the pose topology eigenvectors. The calculation of relative distances must consider key areas within the battery swap station's operating space, such as the one-meter radius around the charging station and the boundaries of the robotic arm's active area. These areas are prone to spatial conflicts. A virtual repulsive potential field theory is introduced, treating each AGV as a point mass with a repulsive force. The magnitude of the repulsive force is inversely proportional to the square of the relative distance—that is, the closer the distance, the stronger the repulsive force. The mathematical relationship of the potential field strength function is determined by analyzing the AGV dimensions and the distribution of obstacles in the operating space. This ensures that the repulsive force is negligible outside a safe distance (e.g., 0.5 meters) and increases dramatically within a dangerous distance (e.g., 0.2 meters). The introduction of a virtual repulsive potential field transforms the relative distance between AGVs into a nonlinear repulsive force, which conforms to the physical constraints of the battery swap station's operating space. Even small changes in distance within a confined space can lead to a high risk of collision. The nonlinear characteristics of the potential field model amplify this risk, prompting the dispatching system to proactively avoid it.

[0107] The construction process of the congestion model is as follows:

[0108] Potential field initialization: define the repulsive force range of each AGV;

[0109] Repulsion calculation: For each AGV, the repulsion vectors generated by all surrounding AGVs are accumulated to obtain the total repulsion force of the AGV at its current position;

[0110] Risk quantification: The magnitude and direction of the repulsive force are mapped to a spatial conflict risk value. A higher risk value indicates a more severe congestion in the area.

[0111] Based on the output of the congestion model, information entropy theory is used to normalize spatial conflict risk, mapping the repulsive force values to the [0, 1] range to eliminate dimensionality. The Shannon entropy formula is used to calculate the uniformity of the risk distribution of all AGVs within the battery swap station area. A higher entropy value indicates a more concentrated conflict risk. The spatial conflict entropy value reflects the degree of disorder in the AGV distribution within the battery swap station's operating space. For example, when multiple AGVs are concentrated within a 1-meter radius of a charging station, the entropy value increases significantly, indicating a serious potential for spatial conflict.

[0112] Step S2120 converts spatial conflict risk into a quantifiable entropy metric, resolving the difficulty of assessing the spatial positional relationships of multiple AGVs in real time and providing spatial constraints for the scheduling algorithm. The "spatial conflict" dimension, as input into the dynamic consensus factor, enables the subsequent spatiotemporal conflict resolution map to identify high-risk areas and proactively avoid spatial overlap when allocating battery swapping windows. The spatial conflict entropy guides the repulsive force source configuration of the artificial potential field method (step S3244). AGVs in high-entropy areas are assigned greater repulsive force weights to prevent them from entering dangerous distances during path planning.

[0113] Step S2130, determining the task time penalty item;

[0114] Furthermore, if Figure 5 As shown, step S2130 includes:

[0115] Step S2131, obtaining the deadline and current time of the task currently being executed by the AGV; obtaining the remaining time of the task based on the deadline and current time;

[0116] Step S2132: introducing an inverse proportional function between the task deadline and the current time; the function value of the inverse proportional function increases nonlinearly as the remaining time of the task decreases;

[0117] Step S2133: Generate a task time penalty item reflecting the risk of AGV task timeout according to the inverse proportional function.

[0118] Specifically, the task time penalty is a quantitative indicator that reflects the risk of an AGV executing a task overtime. Its function is to convert the time urgency of a task into a decision-making basis for scheduling priorities. In logistics and warehousing scenarios, AGVs may undertake multiple transportation tasks simultaneously, some of which have strict requirements on completion time (such as temperature control tasks for fresh food transportation and instant feeding tasks for production lines). If only power and space factors are considered and task timeliness is ignored, critical tasks may be delayed, affecting the overall efficiency of the warehousing system. Step S2130 solves the problem of "the risk of task timeout cannot be quantified" by introducing an inverse proportional relationship between the task deadline and the current time.

[0119] Obtain the deadline T of the AGV's current task in real time through the warehouse management system (WMS) end (i.e. the latest completion time required for the task) and the current time T now These two time parameters need to be synchronized with the AGV's positioning system and task allocation system to ensure the consistency of the timestamp. For example, an AGV undertakes the task of delivering goods to the sorting port. The WMS sets the T of the task according to the sorting port's operation plan. end is the current time T now Add 30 minutes. Introduce a nonlinear mapping function to convert the remaining time of the task (T end -T now ) is mapped to the task time risk value. The core feature of this function is: as T end Approaching T now As the task deadline approaches, the function value exhibits a nonlinear increasing trend. Using an inverse proportional function to quantify timeliness risk aligns with the time-sensitive nature of warehousing tasks—the tolerance for delays decreases exponentially as tasks approach their deadlines. The rapid growth of the inverse proportional function aligns with the actual risk trend, ensuring the scheduling system's immediate response to urgent tasks.

[0120] The specific construction logic is as follows:

[0121] Remaining time calculation: define the remaining time of the task ΔT=T end -T now , when ΔT≤0, the task has timed out;

[0122] Nonlinear mapping: This approach uses an inverse proportional function, such as f(ΔT) = 1 / ΔT (ΔT > 0), and handles the case where ΔT ≤ 0 using a piecewise function (in this case, the function value takes a preset maximum value). This nonlinearity significantly amplifies the risk weight of tasks approaching deadlines. For example, a task with 10 minutes remaining has twice the risk of a task with 20 minutes remaining, while a task with 5 minutes remaining has four times the risk, creating a gradient assessment that is sensitive to timeliness.

[0123] Normalize the output value of the inverse proportional function to obtain the task time penalty term P. The normalization process needs to be combined with the task time requirements of the warehousing system, for example, map the function value to the interval [0,1], where 0 indicates no timeout risk and 1 indicates that the task is about to timeout. Specifically, linearly scale f(ΔT) so that its maximum value does not exceed the system's preset risk limit; when ΔT≤0, P is directly assigned a value of 1 to ensure that the timed task receives the highest penalty term and triggers the scheduling response first. Step S2130 avoids systemic risks caused by scheduling strategies ignoring task timeliness. For example, Figure 6-Figure 7 As shown, Figure 6 In the example, the remaining power of both AGVs is 11%, which is a critical state. They both go to the battery swap station at the same time. However, the remaining mission time of AGV-01 is 20 minutes, and the remaining mission time of AGV-02 is 40 minutes. The mission of AGV-01 is more urgent and has a higher priority. Therefore, Figure 7 As shown, AGV-01 is given priority to enter the battery swap station for battery swapping, ensuring that it has priority in battery swapping and completes the task on time, avoiding stagnation of the entire production line due to battery swap delays.

[0124] Step S2140 , the urgency weight, the spatial conflict entropy value, and the task time penalty item are weightedly fused to generate a dynamic consensus factor.

[0125] Specifically, the dynamic consensus factor is a multi-dimensional priority indicator that integrates the urgency weight E, the spatial conflict entropy S, and the task time penalty P. By quantifying the comprehensive scheduling priority of AGVs, it provides a ranking basis for the subsequent node coloring model and space-time permutation algorithm. For example, if an AGV has a high E value (urgent battery), a medium S value (moderate spatial conflict), and an extremely high P value (task is about to time out), its dynamic consensus factor C will be significantly higher than other AGVs, and it will be given priority in the battery replacement time window during scheduling.

[0126] The dynamic consensus factor construction unit solves the key problem of "single basis for priority decision-making" in multi-AGV battery swap scheduling by constructing dynamic consensus factors. Traditional scheduling algorithms usually only use the remaining power as the priority basis, without considering the impact of battery aging and energy consumption rate on charging urgency, without quantifying the collision risk of multiple AGVs near the battery swap station, and without taking into account the impact of task timeliness on scheduling priority. The dynamic consensus factor construction unit in this embodiment realizes a technological leap from "single-dimensional power priority" to "multi-modal comprehensive evaluation" through the fusion of three factors, and the dynamic consensus factor ensures that the scheduling system can synchronously respond to the multi-dimensional constraints of power urgency, spatial safety, and task timeliness. As the input of the node coloring model, the dynamic consensus factor enables the taboo search algorithm to allocate battery swap time windows in the priority order of "high urgency, low spatial conflict risk, and high task timeliness", avoiding the preemption of battery swap station resources due to priority confusion. The priority dimension of the dynamic consensus factor is combined with the time dimension of the space-time folding unit to form a three-dimensional constraint of "priority-time-space" in the six-dimensional state matrix, so that the space-time conflict resolution map of the battery swap station can simultaneously optimize the time window allocation and spatial path planning, avoiding the global suboptimal solution caused by single-dimensional optimization.

[0127] If the dynamic consensus factor construction unit is missing in the fully automatic AGV vehicle charging and swapping collaborative optimization system, and only the power level is used as the basis, AGVs with aging batteries but still sufficient power may seize resources, while AGVs with urgent tasks but sufficient power are forced to wait, causing task timeouts; due to the lack of spatial conflict entropy, the scheduling system cannot identify crowded areas near the battery swap station, which may cause multiple AGVs to enter a small space at the same time, causing robot arm collisions or path blockages; the task timeliness is not included, and the task scheduling of the warehousing system is separated from the AGV charging and swapping strategy, and the timeliness of critical tasks cannot be guaranteed.

[0128] The dynamic consensus factor construction unit, through the multi-dimensional integration of urgency weights, spatial conflict entropy, and task timeliness penalties, constructs dynamic consensus factors covering power urgency, spatial safety, and task timeliness. This solves the priority decision-making problem of AGV battery swap scheduling in complex warehousing scenarios. As a key hub connecting front-end data collection and back-end spatiotemporal scheduling, the dynamic consensus factor construction unit enables the fully automatic AGV charging and swapping collaborative optimization system to respond to multiple constraints in real time, avoiding scheduling deviations caused by a single indicator. This fundamentally improves the collaborative efficiency of multi-AGV charging and swapping, ensures the orderly operation of battery swap stations in high-frequency usage scenarios, and provides core technical support for the intelligent upgrade of warehousing and logistics systems.

[0129] The dynamic consensus factor verification unit is used to build a distributed collaborative verification layer based on the Byzantine fault tolerance mechanism. The constructed dynamic consensus factor is verified across nodes through the distributed collaborative verification layer to obtain a trusted dynamic consensus factor.

[0130] Specifically, in logistics and warehousing scenarios, when multiple AGVs report dynamic consensus factors via wireless communication, data transmission errors, node failures, or malicious tampering may occur, causing the dispatch system to receive incorrect priority information and disrupting the battery swapping order. The distributed collaborative verification layer employs a Byzantine Fault Tolerance (BFT) mechanism. Its core principle is to ensure data consistency through a voting arbitration mechanism, assuming that some nodes may transmit erroneous or false data. A star-shaped communication network is established, with each AGV node transmitting the dynamic consensus factors to a central dispatching node. Nodes also broadcast data to each other, forming a cross-validation loop. After collecting the dynamic consensus factors from all nodes, the central dispatching node performs a majority vote to verify each AGV's factor value. For example, if the urgency weight reported by a node significantly deviates from the average of other nodes (exceeding a preset threshold), it is considered an anomaly, triggering a retransmission or isolation mechanism. A fault tolerance threshold is set based on the scale of the battery swapping station. For example, when the proportion of faulty nodes is less than 33%, consensus can still be reached using valid data from the remaining nodes, ensuring the reliability of the dispatching strategy even when some equipment fails.

[0131] Based on the BFT mechanism, the Isolation Forest algorithm is introduced to perform secondary screening of the verified dynamic consensus factors. The three dimensions of the dynamic consensus factors (urgency weight, spatial conflict entropy, and task time penalty) are used as input features to form a multidimensional feature vector. Multiple decision trees are constructed by randomly selecting feature attributes and split points, and the average path length of each data point in the decision tree is calculated. Abnormal data (such as extreme values caused by sensor failure) have significantly shorter path lengths than normal values, making them effectively identified. The Isolation Forest model is regularly incrementally trained using the latest trusted data to adapt to dynamic scenarios such as AGV battery aging and changes in task types, thereby preventing a decrease in detection accuracy due to environmental changes.

[0132] If the dynamic consensus factor verification unit is missing, data inconsistencies may occur, leading to scheduling chaos. For example, an AGV may report an incorrectly high urgency weight due to a sensor failure, causing the system to incorrectly assign priorities and trigger resource preemption at the battery swap station. There is also the risk of malicious node attacks. For example, in a wireless communication environment, false data may be injected into the system, preventing mission-critical AGVs from timely battery swaps and affecting the continuity of warehouse operations. The root cause of these problems lies in the lack of a data credibility assurance mechanism, which makes the priority decision-making basis of the dynamic consensus factor unreliable, ultimately leading to the failure of battery swap order and path planning.

[0133] The dynamic consensus factor verification unit uses the Byzantine fault tolerance mechanism and the isolation forest algorithm to build a trusted data verification system under the distributed system, ensuring the reliability of the dynamic consensus factor and solving the data consistency problem in multi-node communication.

[0134] The AGV scheduling optimization module is used to discretize the battery swap station operation space and generate spatiotemporal folding units. Based on the dynamic energy consumption prediction value, the credible dynamic consensus factor, and the spatiotemporal folding units, a spatiotemporal conflict resolution map for the battery swap station is constructed to generate the optimal battery swap sequence and collision avoidance path for the AGV.

[0135] Battery swap station scheduling involves four-dimensional constraints: three-dimensional space (length × width × height) and time. Traditional methods directly solving for the optimal solution exponentially increase the computational complexity with the number of AGVs (for example, the number of possible time window combinations for five AGVs reaches 120, while for ten AGVs, the number reaches 3,628,800), making it impossible to meet real-time requirements. The space-time folding theory in the AGV scheduling optimization module transforms the problem into a polynomial-level complexity solution by maintaining a topologically homeomorphic compression mapping. This approach is suitable for the common warehousing scenario of 10-50 AGVs swapping batteries simultaneously. Traditional methods separate spatial layout and temporal scheduling, resulting in "spatial feasibility but temporal conflict" (e.g., a charging station is occupied when an AGV arrives) or "temporal order but spatial collision" (e.g., the spacing between parking stations is less than the safety threshold). The six-dimensional state matrix in the AGV scheduling optimization module integrates all constraints. The occupied interval must simultaneously meet the requirements of charging station availability, robot arm unloaded, and safe spacing (e.g., ≥ 2 meters) from the preceding AGV, ensuring consistent resource allocation across both space and time.

[0136] The AGV scheduling optimization module includes:

[0137] Spatial discrete units are used to discretize the operation space of the battery swap station and generate space-time folding units;

[0138] Furthermore, the spatial discretization unit in the embodiment of the present application is further configured to perform the following steps:

[0139] Step S3110: extract the four-dimensional space-time coordinates of the battery swap station resource elements to form the battery swap station operation space state matrix; the four-dimensional space-time coordinates introduce the time dimension on the basis of the three-dimensional Euclidean space; the battery swap station resource elements include charging piles, robotic arm activity areas, and AGV parking spaces;

[0140] Step S3120: Use the space-time folding theory to compress and map the state matrix of the battery swap station operation space, and generate a space-time folding unit that reflects the space-time dependency relationship between the resource elements of the battery swap station.

[0141] Specifically, efficient utilization of the operating space at a battery swap station relies on accurate modeling of the spatiotemporal state of resource elements. Spatial discrete units, by combining three-dimensional space with time, address the difficulty of quantifying spatiotemporal conflicts during multi-AGV battery swapping.

[0142] Four-dimensional space-time coordinates introduce a time dimension based on three-dimensional Euclidean space. The three-dimensional space coordinates are centered at the station's geometric center, with the X-axis oriented along the charging piles, the Y-axis pointing vertically upward, and the Z-axis pointing toward the station entrance. These coordinates precisely describe the spatial locations of charging piles, robotic arm activity areas, and AGV parking spaces. The time dimension records the occupancy time intervals of each resource element (e.g., a charging pile was occupied by an AGV between t1 and t2). For each resource element, its four-dimensional coordinates are recorded, forming an M×4 matrix of the station's operational space state, where M is the total number of resource elements. This matrix is updated in real time, reflecting the spatiotemporal occupancy status of each area within the station. Traditional three-dimensional spatial modeling cannot distinguish the occupancy status of the same location at different times, resulting in conflicts when multiple AGV time windows overlap. The introduction of the time dimension enables spatiotemporal occupancy analysis with millisecond accuracy, for example, determining whether two AGVs use the same charging pile in adjacent time slices.

[0143] Using the theory of space-time folding, high-dimensional space-time states are mapped into low-dimensional computable units. Specifically, the spatiotemporal dependencies within the battery swap station's operating space are identified. For example, the occupation of the robotic arm's activity area must be accompanied by the use of adjacent charging stations, forming spatiotemporal correlation constraints. Principal component analysis (PCA) is used to reduce the dimensionality of the state matrix, retaining the key characteristic components of the spatiotemporal correlations and generating spatiotemporal folding units. Each unit contains a set of spatiotemporal constraints (e.g., "When charging station A is occupied at time t, the adjacent parking space B must be unavailable within time t±Δt"). The folding transformation ensures that the spatiotemporal conflict logic of resource elements is not altered. For example, the minimum safe distance constraint for AGVs in the robotic arm's activity area remains valid after folding. Resource elements in the battery swap station's operating space exhibit strong spatiotemporal correlations (e.g., the battery swap process requires the sequential use of parking spaces, robotic arms, and charging stations). By preserving these correlations, the folding transformation allows the low-dimensional model to still reflect the actual conflict logic, significantly reducing computational complexity.

[0144] The spatial discrete unit combines the AGV's spatial occupancy (such as parking space occupancy) with the time window (such as the start / end time of battery swapping) through four-dimensional space-time coordinates, forming a "space-time integrated" basis for conflict judgment. The space-time folding unit compresses the complex four-dimensional state matrix into low-dimensional features, avoiding algorithmic infeasibility caused by the curse of dimensionality. As a basic data structure, the space-time folding unit is combined with dynamic energy consumption prediction values and trusted dynamic consensus factors to form a six-dimensional state matrix containing space, time, priority, and energy consumption, providing the underlying data model for the space-time conflict resolution map. The priority dimension in the space-time folding unit is directly linked to the trusted dynamic consensus factor, ensuring that high-priority AGVs occupy resources first in the space-time folded state matrix, such as reserving charging station time windows in advance. The addition of the energy consumption dimension enables the space-time folding unit to reflect the AGV's endurance requirements, for example, allocating later battery swap time windows to AGVs with low energy consumption prediction values, thereby balancing resource utilization efficiency. The space-time constraints in the space-time folding unit (such as the time occupancy of the robot arm's activity area) directly guide the setting of the attraction source and repulsion source of the artificial potential field method, ensuring that the AGV path has no conflicts in both space and time dimensions.

[0145] If spatial discrete units are missing, spatial planning is only based on static layout and cannot dynamically perceive the time occupancy status of charging piles, resulting in multiple AGVs applying for the same resource at the same time; due to the lack of spatiotemporal correlation constraints, the node coloring model cannot accurately judge the spatiotemporal conflicts between AGVs, and the battery replacement order and path planning lose their key basis, ultimately causing congestion at battery replacement stations.

[0146] The scheduling decision generation unit builds a spatiotemporal conflict resolution map for battery swap stations based on dynamic energy consumption prediction values, credible dynamic consensus factors, and spatiotemporal folding units, generating the optimal battery swap sequence and collision avoidance path for AGVs.

[0147] Furthermore, the scheduling decision generation unit in the embodiment of the present application is further configured to perform the following steps:

[0148] In step S3210, the dynamic energy consumption prediction value and the trusted dynamic consensus factor are mapped to the space-time folding unit to form a six-dimensional state matrix; wherein the six dimensions refer to the three dimensions of space, the time dimension, the priority dimension, and the energy consumption dimension.

[0149] Specifically, the dynamic energy consumption prediction value (reflecting the endurance of the AGV) generated by the energy consumption prediction module and the trusted dynamic consensus factor (representing the scheduling priority) obtained by the consensus mechanism design module are embedded in the space-time folding unit (including the space-time dependency of the battery swap station resources) generated by the spatial discrete unit through dimensional expansion. The specific operations are as follows: the three spatial dimensions follow the battery swap station coordinate system defined by the spatial discrete unit to accurately describe the spatial coordinates of the AGV at the charging pile, robotic arm activity area, and berth; the time dimension records the time interval of the AGV entering / leaving the battery swap station, and is aligned with the space-time folding unit timestamp; the priority dimension directly adopts the trusted dynamic consensus factor value verified in the consensus mechanism design module. The higher the value, the higher the scheduling priority (for example, AGVs with high urgency weight, low spatial conflict risk, and urgent task timeliness have the highest priority); the energy consumption dimension normalizes the dynamic energy consumption prediction value obtained by the energy consumption prediction module to the [0,1] range. The smaller the value, the tighter the remaining endurance (for example, 0.1 means the endurance is about to run out, and 0.9 means sufficient endurance). For each AGV, we extract its current position coordinates, expected battery swap window, dynamic consensus factor, and predicted energy consumption to form a six-dimensional vector. The six-dimensional vectors of all AGVs form the global six-dimensional state matrix of the battery swap station. This matrix is updated in real time, comprehensively describing each AGV's spatial and temporal occupancy within the station, its priority requirements, and its energy consumption.

[0150] Step S3220: Based on the six-dimensional state matrix, a spatiotemporal conflict resolution graph for the battery swap station is constructed using a variational Bayesian inference method; each AGV corresponds to a node in the spatiotemporal conflict resolution graph for the power station;

[0151] Specifically, step S3220 uses a probabilistic graphical model to model the spatiotemporal conflicts between AGVs. The specific implementation is as follows: define nodes, each node represents the six-dimensional state of an AGV, and the node attributes include spatial coordinates, time window, priority, and energy consumption value; establish edges, if the spatial distance between two AGVs is less than a safety threshold (such as 1.5 meters) or the time window overlap exceeds a preset time (such as 5 seconds), then an undirected edge is established between the corresponding nodes, indicating the existence of a spatiotemporal conflict; the conflict probability between nodes is trained using historical battery swapping data, for example, "when the priority difference between the two AGVs exceeds the threshold and the spatial distance is less than 1 meter, the conflict probability increases to 80%." In view of the high-dimensional characteristics of the six-dimensional state matrix, the mean field variation method is used to approximately decompose the joint probability distribution into the product of the marginal distributions of each dimension. The KL divergence is minimized through iterative optimization to approximately solve the conflict probability distribution in the high-dimensional space. This method avoids the dimensionality curse problem of traditional Monte Carlo simulation, reduces the computational complexity from exponential to polynomial level, and is suitable for real-time scheduling scenarios.

[0152] In a multi-AGV centralized battery swapping scenario, the lack of a six-dimensional state matrix and variational Bayesian inference prevents the coordination of dynamic energy consumption, priority, and spatiotemporal occupancy data. This can lead to power outages for AGVs with limited battery life due to delayed time window allocation. Traditional methods rely solely on static spatial distance to determine conflicts and are unable to dynamically assess the combined impact of priority and time window overlap (e.g., high-priority AGVs should prioritize use of conflicting areas). The six-dimensional state matrix in step S3220 provides a unified data framework, and variational Bayesian inference quantifies the probability of multi-dimensional conflicts, enabling the scheduling system to dynamically balance "resource occupancy, priority, and battery life requirements." For example, it prioritizes allocating conflict-free time windows to high-priority AGVs with insufficient battery life, avoiding system congestion caused by single-dimensional decision-making.

[0153] Step S3230, based on the spatiotemporal conflict resolution graph of the battery swap station, iteratively search for the optimal battery swap order using the spatiotemporal replacement algorithm;

[0154] Furthermore, if Figure 8 As shown, step S3230 includes:

[0155] Step S3231: construct a node coloring model based on the spatiotemporal conflict resolution graph of the battery swap station;

[0156] Step S3232: Based on the node coloring model, a tabu search algorithm is used to traverse and color the graph nodes according to the trusted dynamic consensus factor.

[0157] Step S3233: gradually eliminate the adjacent nodes of the same color in the spatiotemporal conflict resolution graph of the battery swap station through the spatiotemporal replacement algorithm;

[0158] Step S3234: Output the final node coloring scheme through iterative optimization, and the final node coloring scheme corresponds to the optimal battery replacement order of the AGV.

[0159] Specifically, based on the spatiotemporal conflict resolution graph for battery swap stations, each AGV is mapped to a node in the graph, with each node representing an AGV in a specific spatiotemporal state. "Color" is defined as the battery swap time window (e.g., color A corresponds to 10:00-10:15, and color B corresponds to 10:15-10:30). A constraint rule is established: "Adjacent nodes (AGVs with spatiotemporal conflicts) cannot be colored the same color." A node coloring model is constructed, which transforms the AGV scheduling problem into a classic "graph coloring problem." A mature node coloring algorithm from graph theory is used to solve a conflict-free time window allocation scheme, ensuring that conflict-free AGVs occupy the same or adjacent resources within the same time window. By extracting spatiotemporal occupancy intervals, the spatial distance and time window overlap between any two AGVs are calculated. If the spatial distance is less than a distance safety threshold (e.g., 2 meters) and the time window overlap exceeds a set time (e.g., 5 minutes), the nodes are considered adjacent and require a different color constraint. The spatiotemporal occupancy of AGVs is converted into the relationship between graph nodes and edges. The presence of edges indicates spatiotemporal conflicts, facilitating conflict resolution using established graph coloring algorithms (such as the Welch-Powell algorithm). For example, edges connecting AGVs with a spatial distance of less than 2 meters and overlapping time windows must be assigned different colors (time windows). Node attributes integrate dynamic consensus factors (priority) and energy consumption predictions (battery replacement time requirements). This ensures that color assignment not only ensures time overlap but also prioritizes AGVs with high urgency and timeliness requirements, addressing the drawbacks of "one-size-fits-all" scheduling.

[0160] Based on the AGV scheduling priority represented by the trusted dynamic consensus factor, all nodes are sorted from high to low priority. A tabu table is established to record recently assigned time window combinations to avoid repeated searches for invalid solutions. For example, if AGV-01 has been assigned a red time window (14:00-14:10), subsequent searches prohibit assigning red to adjacent nodes. This action is recorded in the tabu table and repeated for a certain number of iterations (e.g., 10). Starting from the high-priority node, all feasible time windows (i.e., those not occupied by adjacent nodes and meeting the battery swapping time limit) are traversed, and the color assignment scheme that minimizes global conflicts is selected. For example, AGVs with high urgency weights are preferentially assigned the earliest available time window to ensure they charge as quickly as possible to avoid power outages. The tabu search algorithm, combining priority sorting with a tabu table mechanism, efficiently searches for near-optimal solutions in the solution space, balancing search speed and solution quality. This is particularly suitable for complex scenarios with dynamic multi-AGV scheduling. Invalid solutions that have been tried are recorded during the search process to prevent the algorithm from entering a search loop, such as repeatedly swapping the time windows of the same pair of AGVs without making any progress. When a new AGV enters the battery swap station area or the status of an existing AGV changes (such as a sudden drop in power), the system response speed is improved through local replacement rather than global recalculation and adjustment, which is suitable for the real-time scheduling needs of AGVs that dynamically enter and exit the warehouse environment. Node priority sorting directly uses a trusted dynamic consensus factor, which integrates power urgency, spatial conflict risk, and task timeliness, so that the coloring process prioritizes high-priority AGVs. For example, time windows are allocated to AGVs with power levels below 15% and carrying urgent orders, reducing the risk of power outages caused by waiting. The space-time folding unit compresses the four-dimensional space-time coordinates of the battery swap station resources, providing a standardized space-time occupancy description for node coloring, so that the time window allocation of different AGVs can be uniformly referenced to the available time of resources such as charging piles and robotic arm activity areas.

[0161] The node coloring model is scanned in real time to identify all pairs of adjacent nodes with the same color (i.e., AGVs that are subject to spatiotemporal conflict but assigned the same time window). For example, if AGV-02 and AGV-03 are both assigned blue time windows and their parking spaces within the battery swap station are closer than the safety threshold (1.5 meters), they are identified as conflicting pairs. For these conflicting pairs, the time window of the higher-priority AGV is prioritized, and the available window is reallocated to the lower-priority AGV (e.g., AGV-02 retains the blue window, while AGV-03 is adjusted to the green window). The conflict status after the replacement is rechecked. The replacement must meet the minimum time window interval requirement (e.g., a minimum of 5 minutes between consecutive battery swaps to ensure that the preceding AGV has completely left the battery swap station). The conflict detection and replacement process is repeated until all adjacent nodes have different colors, indicating no time window overlap and secure spatial occupancy. The spatiotemporal replacement algorithm gradually eliminates global conflicts by locally adjusting time windows, ensuring orderly execution of battery swap operations and avoiding spatial resource preemption caused by time overlap.

[0162] Set the maximum number of iterations (such as 200 times) or the minimum conflict threshold (such as the number of conflicts remains unchanged for 10 consecutive iterations), and terminate the search when any condition is met. For example, after 150 iterations, the number of conflicting node pairs no longer decreases, and it is considered to have reached the local optimal solution. Map the color order in the final node coloring scheme to the order of the battery replacement time window. For example, red (14:00-14:10) corresponds to the first priority AGV, blue (14:10-14:20) corresponds to the second priority AGV, and so on, to form a battery replacement sequence arranged in chronological order. If it is detected during the iteration process that the battery level of an AGV is lower than the emergency threshold (such as 10%), its node priority will be automatically increased, and the nearest available time window will be forcibly allocated to ensure the robustness of the system in emergency situations.

[0163] The core goal of the fully automated AGV battery charging and swapping collaborative optimization system is to avoid congestion when multiple AGVs are swapping batteries together. Step S3230 specifically addresses time window conflicts, imbalanced priority scheduling, and high solution space complexity. Time window conflicts arise when multiple AGVs simultaneously apply for battery swapping. Directly allocating time windows can easily lead to overlap, triggering competition for spatial resources such as robotic arm preemption and parking conflicts. For example, if two AGVs enter a battery swap station simultaneously, the aisle may be blocked because the robotic arm can only serve one. Priority scheduling imbalances arise when traditional scheduling methods prioritize tasks based solely on battery power, failing to consider multi-dimensional factors such as task timeliness and spatial congestion. This can cause urgent AGVs (such as those carrying urgently needed goods) to be delayed. High solution space complexity arises when battery swap station scheduling involves four-dimensional constraints: three-dimensional space and time. The computational complexity of directly finding the optimal solution increases exponentially with the number of AGVs (an NP-hard problem), necessitating efficient heuristic algorithms to reduce computational costs. By converting the scheduling problem into a node coloring problem, step S3230 uses graph theory and heuristic algorithms to generate a near-optimal solution within a reasonable time, avoiding the computational explosion problem of traditional precise algorithms.

[0164] The "different colors for adjacent nodes" constraint ensures that the battery swap time windows of any two AGVs do not overlap, or that the spatial distance between them is greater than a safety threshold. For example, when AGV-01 uses charging station 1 from 14:00 to 14:10, AGV-02's time window is automatically adjusted to after 14:10, preventing both from occupying the same area at the same time, reducing competition between robotic arms and parking spaces, and improving resource utilization at the battery swap station. The time-space replacement algorithm allows for dynamic adjustment of time windows. When an AGV's arrival at the battery swap station is delayed due to path planning deviations, resources can be reallocated by exchanging time windows without recalculating the entire scheduling plan. For example, if AGV-03 arrives one minute late due to a shelf obstruction, the system automatically replaces its time window with the window of the subsequent AGV-04, ensuring that the overall scheduling process is not interrupted and avoiding global failure caused by local disturbances in traditional fixed scheduling plans.

[0165] If step S3230 is missing, the system cannot handle the time window conflicts of multiple AGVs, which may cause multiple AGVs to enter the battery swap station at the same time, causing robotic arm preemption, parking space congestion, and even physical collisions. In serious cases, the battery swap station will be paralyzed. In the absence of node sorting based on dynamic consensus factors, emergency AGVs may be blocked by low-priority task AGVs. For example, an AGV with only 10% battery power may lose power while waiting for the unloaded AGV in front to swap power, increasing the cost of manual intervention. Directly solving the optimal solution of the four-dimensional spatiotemporal mechanism requires traversing all possible time window combinations, which cannot be completed within a reasonable time, resulting in scheduling delays and exacerbating the risk of congestion.

[0166] Step S3230 systematically solves the time window conflict and priority scheduling problems when multiple AGVs are swapping batteries by constructing a node coloring model and combining tabu search with space-time substitution algorithms. The complex space-time resource allocation is converted into a node coloring problem in graph theory, and a heuristic algorithm is used to generate an efficient and orderly battery swapping order within a reasonable time, ensuring that high-priority AGVs are charged first while avoiding competition for spatial resources. The system realizes the transition from priority calculation to actual time window allocation, providing a time dimension constraint basis for subsequent collision avoidance path planning, fundamentally improving the scheduling efficiency and reliability of battery swap stations in multi-AGV critical power scenarios, and avoiding congestion and resource waste caused by disorderly battery swapping.

[0167] Step S3240: Based on the spatiotemporal conflict resolution graph of the battery swap station, a collision avoidance path for the AGV in the battery swap station is generated by a multi-granularity trajectory planning method;

[0168] Furthermore, step S3240 includes:

[0169] Step S3241, extracting the spatiotemporal occupancy interval of each AGV from the spatiotemporal conflict resolution graph of the battery swap station;

[0170] Step S3242: Determine the scheduled battery replacement time window sequence for each AGV based on the optimal battery replacement sequence of the AGVs;

[0171] Step S3243: With time granularity as the first priority, perform sequence constraints and interval extension on the scheduled battery replacement time windows of each AGV to obtain a planning result in the time dimension;

[0172] Step S3244: With spatial granularity as the second priority, search for local paths within each time slice using the artificial potential field method to obtain a spatial planning result; the time slice is obtained by dividing the entire battery swap station operation space into a multidimensional grid map;

[0173] Step S3245: Integrate the planning results of the time dimension and the space dimension to generate a collision avoidance path for the AGV in the battery swap station.

[0174] The optimal battery replacement sequence and collision avoidance path of AGV are sent to each AGV node.

[0175] Specifically, using the spatiotemporal conflict resolution map of the battery swap station as the data source, the system extracts the three-dimensional spatial area occupied by each AGV within the station's operating space (including the spatial locations of resource elements such as charging stations, robotic arm activity areas, and AGV parking spaces), as well as the corresponding time interval (i.e., the start and end times of the AGV's battery swapping operations within the station). This generates a unique spatiotemporal occupancy interval for each AGV, which reflects the AGV's spatiotemporal occupancy status within the station. The spatiotemporal occupancy status specifies whether an AGV exclusively or shares station resources within a specific timeframe. This provides precise spatiotemporal constraints for subsequent time window allocation and path planning, ensuring that multiple AGVs avoid overlapping resource usage conflicts within the station. The spatiotemporal occupancy interval clearly defines when, where, and which resources each AGV occupies (e.g., charging station 1 is occupied by AGV-01 from 2:00 PM to 2:10 PM), providing a direct basis for time window allocation. When the space-time occupancy intervals of two AGVs overlap in space and partially overlap in time, it is determined to be a conflict, triggering the space-time replacement algorithm in step S3233 to adjust the time window to ensure resource exclusivity.

[0176] The optimal battery swapping order output from step S3230 is used as a time constraint to define the order in which each AGV must enter the battery swap station for battery swapping. Based on this order, a predetermined battery swapping time window is assigned to each AGV. The start and end times of the time window must ensure sufficient safe time spacing between preceding and following AGVs, avoiding space usage conflicts caused by time overlap during battery swapping. This orderly allocation of time windows ensures a strict priority queue for battery swapping operations in the time dimension, reducing resource contention caused by time overlap. In the time dimension, the scheduled battery swapping time windows for each AGV are strictly sorted according to the optimal battery swapping order, ensuring that battery swapping operations proceed in descending order of priority. Furthermore, a reasonable time interval is set between each pair of adjacent battery swapping AGVs (through interval extension). This time interval must be greater than or equal to the minimum time required for an AGV to enter the battery swap station, complete battery swap preparations, perform battery swapping operations, and exit the station. This ensures sufficient safe time spacing between preceding and following AGVs, completely eliminating the possibility of collisions in the time dimension. Time-based planning fundamentally eliminates the possibility of multiple AGVs simultaneously occupying core areas of a battery swap station (such as charging stations and robotic arm activity areas) by quantifying safe spacing and prioritizing them. Using the time window order as the primary constraint ensures that the battery swap operations of high-priority AGVs are not interfered with by lower-priority AGVs. For example, an AGV with only 10% battery life will not be delayed by the routing of other AGVs.

[0177] The entire battery swap station operating space is divided into multiple grids, each corresponding to a specific spatial location and time slice (e.g., 1 minute per grid). Within each time slice, the AGV currently within the battery swap station is constrained by its own kinematic constraints (e.g., maximum speed, minimum turning radius). Using an artificial potential field method, target locations such as charging stations, robotic arm activity areas, and AGV parking spaces are set as attractive sources, while other AGVs and obstacles are set as repulsive sources. The net force acting on the AGV at the current grid position is calculated, and a local optimal path from the current position to the target location is searched based on the direction of the net force, enabling the AGV to flexibly avoid other AGVs and obstacles in space. Attraction refers to target locations such as charging stations and AGV parking spaces, which exert an attractive force on the AGV. The force is inversely proportional to the distance, ensuring that the AGV prioritizes the target location. Repulsion refers to grids currently occupied by other AGVs and obstacles (e.g., shelf supports). The repulsive force is inversely proportional to the square of the distance, preventing collisions. The artificial potential field method simulates the interaction of physical fields, enabling AGVs to autonomously avoid dynamic obstacles in complex spatial environments, improving the real-time and flexibility of path planning. The method independently calculates local paths within each time slice, avoiding the complexity of global path planning. It is suitable for real-time obstacle avoidance in the confined spaces of battery swap stations (for example, when AGVs are traveling towards each other or approaching closely in a 1.5-meter-wide aisle, they automatically adjust their direction using a repulsive force source).

[0178] The sequence and interval extension results of the scheduled battery swap time windows planned in the time dimension are integrated with the local paths obtained by searching the artificial potential field method in each time slice in the spatial dimension; the local paths in each time slice are connected in sequence according to the time sequence to form a complete trajectory of the AGV from entering the battery swap station to completing the battery swap and leaving. This trajectory meets the battery swap sequence and safety interval requirements in time, and meets the collision avoidance requirements in space, which is the final AGV collision avoidance path.

[0179] Traditional path planning only considers spatial obstacle avoidance and ignores resource occupancy in the time dimension (such as charging piles being occupied at a specific time). This causes AGVs to wait after arriving at the battery swap station due to busy resources, exacerbating congestion. The AGVs in the battery swap station are in a dynamic mobile state (such as entering, charging, and leaving), and their paths need to be adjusted in real time to avoid collisions with other AGVs and fixed facilities such as robotic arms and charging piles. High-priority AGVs need to use resources first, but traditional methods find it difficult to simultaneously meet the dual constraints of priority order and spatial safety in path planning. Step S3240 solves the above problem. By combining the priority order in the time dimension with local obstacle avoidance in the spatial dimension, step S3240 realizes a "time-ordered, spatially conflict-free" battery swap process, solving the problem of the separation of time and space constraints in traditional methods.

[0180] By extending the time window interval (e.g., setting a 15-minute safety interval) and implementing an artificial potential field method for spatial path obstacle avoidance, the spatial distance between any two AGVs within the battery swap station is always greater than the safety threshold (2 meters), and the time windows do not overlap. For example, if AGV-01 occupies charging station 1 from 2:00 PM to 2:10 PM, AGV-02 is assigned a time window from 2:15 PM to 2:25 PM, and its path planning automatically avoids the spatial area of charging station 1 to prevent robot arm collisions due to simultaneous approach. Prioritization in the temporal dimension ensures that high-urgency AGVs are prioritized for battery swapping, reducing their waiting time. Local optimization in the spatial dimension shortens AGV movement time within the battery swap station (e.g., using the artificial potential field method to find the shortest obstacle-avoiding path), improving overall battery swap efficiency. If an AGV deviates from its position due to sensor error, the repulsive force source of the artificial potential field method is adjusted in real time to force the AGV back to the planned path. If battery swapping time is extended due to battery aging, the interval extension mechanism automatically adjusts the time windows of subsequent AGVs to avoid chain congestion. For example, if AGV-03 takes 5 minutes longer than expected to charge, the system automatically extends AGV-04's time window by 5 minutes. Simultaneously, using the artificial potential field method, it adjusts its entry path to avoid AGV-03, which is still charging. By combining the priority ranking of dynamic consensus factors with resource constraints within the time and space occupancy intervals, path planning not only adheres to the "urgent first, slow later" scheduling principle but also ensures that each AGV's trajectory conforms to its physical characteristics (such as minimum turning radius and maximum speed), avoiding mechanical losses caused by unreasonable paths. For example, AGVs with a small curvature radius (such as model A-02) are automatically assigned a wider turning grid during path planning to reduce tire wear.

[0181] If step S3240 is missing, there will be a lack of safe spacing and spatial obstacle avoidance planning within the time window, and the AGV may physically collide with the battery swap station, especially in narrow spaces such as the robotic arm activity area, which may cause equipment damage or station shutdown. Multiple AGVs may simultaneously seize the charging pile position, causing a "deadlock" phenomenon (for example, two AGVs drive to the same charging pile at the same time and cannot complete docking), resulting in a drop of more than 50% in the battery swap station's processing capacity. Even if step S3230 generates the optimal battery swap order, if there are no time and space constraints for path planning, high-priority AGVs may not be able to swap batteries on time due to path congestion, causing them to run out of power and exacerbate system-level congestion.

[0182] Step S3240 uses a multi-granularity trajectory planning method to organically combine the priority order of the time dimension with the real-time obstacle avoidance of the space dimension, and systematically solves the spatiotemporal conflict problem of multiple AGVs in the battery swap station. Through the precise extraction of spatiotemporal occupancy intervals, the orderly allocation of time windows, and the local path optimization of the artificial potential field method, the dual goals of "orderly battery swapping according to priority in time and safe movement without collision in space" are achieved. It ensures the feasibility of the scheduling plan and forms a complete closed loop of "priority sorting-path execution" with the node coloring model of step S3230, improving the operating efficiency and safety of the battery swap station under complex working conditions, avoiding equipment collisions and process confusion caused by the lack of spatiotemporal planning, and providing reliable technical guarantees for the efficient coordination of multi-AGV charging and swapping in logistics warehousing.

[0183] Example 2:

[0184] This embodiment provides a fully automatic AGV charging and battery replacement collaborative optimization method based on embodiment 1, such as Figure 9 Shown, including:

[0185] Step S1000: Obtain the AGV's posture topology feature vector and potential margin attenuation gradient, construct a multi-dimensional input vector, and generate a dynamic energy consumption prediction value with adaptive characteristics based on the multi-dimensional input vector and a pre-built multi-physics field coupled energy consumption trajectory residual model;

[0186] Furthermore, step S1000 includes:

[0187] Step S1100: Obtain the posture topology feature vector and potential margin attenuation gradient of the AGV to construct a multi-dimensional input vector;

[0188] Furthermore, step S1100 includes:

[0189] Step S1110: acquiring the posture topological features of the AGV in real time to form a posture topological feature vector; the posture topological features include three-dimensional coordinates, motion vector angles, and trajectory curvature dynamic parameters;

[0190] Step S1120, obtaining the potential margin attenuation gradient of the AGV;

[0191] Furthermore, step S1120 includes:

[0192] Step S1121: collect the charge and discharge current data of the AGV battery in real time, integrate the current data according to the time series, and obtain the cumulative charge change from the last charging completion to the current moment;

[0193] Step S1122, obtaining a battery aging coefficient reflecting the current degree of battery performance degradation;

[0194] Step S1123, the cumulative charge change and the battery aging coefficient are input into a pre-built nonlinear mapping function to obtain the potential margin attenuation gradient of the current AGV vehicle; the nonlinear mapping function takes the cumulative charge change and the battery aging coefficient as input and takes the potential margin attenuation gradient as output.

[0195] In step S1130, the posture topology feature vector and the potential margin attenuation gradient are normalized, and the normalized posture topology feature vector and the potential margin attenuation gradient are spliced into a multi-dimensional input vector.

[0196] Step S1200 , generating a dynamic energy consumption prediction value with adaptive characteristics based on a multi-dimensional input vector and a pre-built multi-physics field coupled energy consumption trajectory residual model.

[0197] Step S2000: construct a dynamic consensus factor that provides a priority decision basis for AGV charging and swapping scheduling optimization, perform cross-node verification on the constructed dynamic consensus factor, and obtain a trusted dynamic consensus factor;

[0198] Furthermore, step S2000 includes:

[0199] Step S2100: Determine an urgency weight reflecting the urgency of AGV charging, a spatial conflict entropy reflecting the risk of AGV spatial conflict, and a task time penalty reflecting the risk of AGV task overtime. Based on the urgency weight, spatial conflict entropy, and task time penalty, a dynamic consensus factor is constructed to provide a priority decision basis for AGV charging and swapping scheduling optimization.

[0200] Furthermore, step S2100 includes:

[0201] Step S2110, determining the urgency weight E;

[0202] Furthermore, step S2110 includes:

[0203] Step S2111, obtaining the current remaining power DE of the AGV;

[0204] Step S2112: obtaining an activation exponential growth function based on the current remaining power DE of the AGV and the potential margin attenuation gradient;

[0205] Step S2113, setting the initial urgency weight E1, when DE≥S1, E=E1; when DE<S1, dynamically increase the initial urgency weight E1 according to the activation exponential growth function to obtain the urgency weight E, where S1 is the power urgency threshold.

[0206] Step S2120, determining the spatial conflict entropy value;

[0207] Furthermore, step S2120 includes:

[0208] Step S2121, obtaining the relative distances between multiple AGVs;

[0209] Step S2122: Based on the relative distances between multiple AGVs, a virtual repulsive potential field is introduced to establish a congestion model for AGVs in the battery swap station operation area.

[0210] Step S2123: According to the established congestion model of AGVs in the battery swap station operation area, a spatial conflict entropy value reflecting the spatial conflict risk of AGVs is obtained.

[0211] Step S2130, determining the task time penalty item;

[0212] Furthermore, step S2130 includes:

[0213] Step S2131, obtaining the deadline and current time of the task currently executed by the AGV;

[0214] Step S2132: introducing an inverse proportional function between the task deadline and the current time; the function value of the inverse proportional function increases nonlinearly as the task deadline approaches;

[0215] Step S2133: Generate a task time penalty item reflecting the risk of AGV task timeout according to the inverse proportional function.

[0216] Step S2140 , the urgency weight, the spatial conflict entropy value, and the task time penalty item are weightedly fused to generate a dynamic consensus factor.

[0217] Step S2200: Build a distributed collaborative verification layer based on the Byzantine fault tolerance mechanism, and perform cross-node verification on the constructed dynamic consensus factor through the distributed collaborative verification layer to obtain a trusted dynamic consensus factor.

[0218] Step S3000: Discretize the battery swap station operation space to generate spatiotemporal folding units. Based on the dynamic energy consumption prediction value, the credible dynamic consensus factor, and the spatiotemporal folding units, construct a spatiotemporal conflict resolution graph for the battery swap station to generate the optimal battery swap sequence and collision avoidance path for the AGV.

[0219] Furthermore, step S3000 includes:

[0220] Step S3100: discretize the operation space of the battery swap station to generate a space-time folding unit;

[0221] Furthermore, step S3100 includes:

[0222] Step S3110: extract the four-dimensional space-time coordinates of the battery swap station resource elements to form the battery swap station operation space state matrix; the four-dimensional space-time coordinates introduce the time dimension on the basis of the three-dimensional Euclidean space; the battery swap station resource elements include charging piles, robotic arm activity areas, and AGV parking spaces;

[0223] Step S3120: Use the space-time folding theory to compress and map the state matrix of the battery swap station operation space, and generate a space-time folding unit that reflects the space-time dependency relationship between the resource elements of the battery swap station.

[0224] Step S3200: Based on the dynamic energy consumption prediction value, the credible dynamic consensus factor, and the spatiotemporal folding unit, a spatiotemporal conflict resolution graph for the battery swap station is constructed to generate the optimal battery swap sequence and collision avoidance path for the AGV.

[0225] Furthermore, step S3200 includes:

[0226] In step S3210, the dynamic energy consumption prediction value and the trusted dynamic consensus factor are mapped to the space-time folding unit to form a six-dimensional state matrix; wherein the six dimensions refer to the three dimensions of space, the time dimension, the priority dimension, and the energy consumption dimension.

[0227] Step S3220: Based on the six-dimensional state matrix, a spatiotemporal conflict resolution graph for the battery swap station is constructed using a variational Bayesian inference method; each AGV corresponds to a node in the spatiotemporal conflict resolution graph for the battery swap station;

[0228] Step S3230, based on the spatiotemporal conflict resolution graph of the battery swap station, iteratively search for the optimal battery swap order using the spatiotemporal replacement algorithm;

[0229] Furthermore, step S3230 includes:

[0230] Step S3231: construct a node coloring model based on the spatiotemporal conflict resolution graph of the battery swap station;

[0231] Step S3232: Based on the node coloring model, a tabu search algorithm is used to traverse and color the graph nodes according to the trusted dynamic consensus factor.

[0232] Step S3233: gradually eliminate the adjacent nodes of the same color in the spatiotemporal conflict resolution graph of the battery swap station through the spatiotemporal replacement algorithm;

[0233] Step S3234: Output the final node coloring scheme through iterative optimization, and the final node coloring scheme corresponds to the optimal battery replacement order of the AGV.

[0234] Step S3240: Based on the spatiotemporal conflict resolution graph of the battery swap station, a collision avoidance path for the AGV in the battery swap station is generated by a multi-granularity trajectory planning method;

[0235] Furthermore, step S3240 includes:

[0236] Step S3241, extracting the spatiotemporal occupancy interval of each AGV from the spatiotemporal conflict resolution graph of the battery swap station;

[0237] Step S3242: Determine the scheduled battery replacement time window sequence for each AGV based on the optimal battery replacement sequence of the AGVs;

[0238] Step S3243: With time granularity as the first priority, perform sequence constraints and interval extension on the scheduled battery replacement time windows of each AGV to obtain a planning result in the time dimension;

[0239] Step S3244: With spatial granularity as the second priority, search for local paths within each time slice using the artificial potential field method to obtain a spatial planning result; the time slice is obtained by dividing the entire battery swap station operation space into a multidimensional grid map;

[0240] Step S3245: Integrate the planning results of the time dimension and the space dimension to generate an AGV collision avoidance path within the battery swap station.

[0241] The methods and systems of the present application may be implemented in many ways. For example, the methods and systems of the present application may be implemented using software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of method steps is for illustration only, and the steps of the methods of the present application are not limited to the order specifically described above unless otherwise specified.

[0242] In addition, the parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive redundancy.

[0243] The above-described specific embodiments further illustrate the objectives, technical solutions, and beneficial effects of the present invention. It should be understood that the above description is merely a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A fully automatic AGV charging and battery replacement collaborative optimization system, characterized by: The system comprises: Energy consumption prediction module: used to obtain the AGV's posture topology feature vector and potential margin attenuation gradient, construct a multi-dimensional input vector, and generate a dynamic energy consumption prediction value with adaptive characteristics based on the multi-dimensional input vector and the pre-built multi-physics field coupled energy consumption trajectory residual model; Consensus mechanism design module: used to build a dynamic consensus factor that provides a priority decision basis for AGV charging and swapping scheduling optimization, and to perform cross-node verification on the constructed dynamic consensus factor to obtain a credible dynamic consensus factor; The consensus mechanism design module includes a dynamic consensus factor construction unit and a dynamic consensus factor verification unit; the dynamic consensus factor construction unit is used to determine the urgency weight reflecting the urgency of AGV charging, the spatial conflict entropy reflecting the risk of AGV spatial conflict, and the task time penalty item reflecting the risk of AGV task timeout, and construct a dynamic consensus factor that provides a priority decision basis for AGV charging and swapping scheduling optimization based on the urgency weight, spatial conflict entropy, and task time penalty item; the dynamic consensus factor verification unit is used to build a distributed collaborative verification layer based on the Byzantine fault tolerance mechanism, and perform cross-node verification on the constructed dynamic consensus factor through the distributed collaborative verification layer to obtain a trusted dynamic consensus factor; AGV scheduling optimization module: This module discretizes the battery swap station operation space and generates spatiotemporal folding units. Based on the dynamic energy consumption prediction value, the credible dynamic consensus factor, and the spatiotemporal folding units, it constructs a spatiotemporal conflict resolution map for the battery swap station and generates the optimal battery swap sequence and collision avoidance path for the AGV. The method for discretizing the battery swap station operation space includes: extracting the four-dimensional spatiotemporal coordinates of the battery swap station resource elements to form a battery swap station operation space state matrix; compressing and mapping the battery swap station operation space state matrix to generate a spatiotemporal folding unit that reflects the spatiotemporal dependency relationship between the battery swap station resource elements; The method for constructing a spatiotemporal conflict resolution graph for a battery swap station based on dynamic energy consumption prediction values, a credible dynamic consensus factor, and a spatiotemporal folding unit, and generating an optimal battery swap sequence and collision avoidance path for AGVs includes: The dynamic energy consumption prediction value and the credible dynamic consensus factor are mapped to the space-time folding unit to form a six-dimensional state matrix. Based on the six-dimensional state matrix, a space-time conflict resolution map for battery swap stations is constructed. Based on the space-time conflict resolution map for battery swap stations, the optimal battery swapping order is iteratively searched through the space-time permutation algorithm, and the AGV collision avoidance path within the battery swap station is generated through a multi-granularity trajectory planning method.

2. The fully automatic AGV charging and battery swapping collaborative optimization system according to claim 1 is characterized in that: The method for obtaining the posture topological feature vector of the AGV vehicle is: obtaining the posture topological features of the AGV vehicle in real time to form a posture topological feature vector; the posture topological features include at least three-dimensional coordinates.

3. The fully automatic AGV charging and battery replacement collaborative optimization system according to claim 2 is characterized in that: The method for constructing a multidimensional input vector is: normalizing the posture topology feature vector and the potential margin attenuation gradient, and splicing the normalized posture topology feature vector and the potential margin attenuation gradient into a multidimensional input vector.

4. The fully automatic AGV charging and battery replacement collaborative optimization system according to claim 1 is characterized in that: The method for determining the urgency weight includes: Obtain the current remaining power DE of the AGV; obtain the activation exponential growth function based on the current remaining power DE of the AGV and the potential margin attenuation gradient; set the initial urgency weight E1, when DE ≥ S1, the urgency weight E = E1; when DE < S1, dynamically increase the initial urgency weight E1 according to the activation exponential growth function to obtain the urgency weight E, where S1 is the power urgency threshold.

5. The fully automatic AGV charging and battery replacement collaborative optimization system according to claim 1 is characterized in that: The method for determining the spatial conflict entropy value includes: Based on the three-dimensional coordinates of the AGV in the pose topology feature vector, the relative distance between multiple AGVs is obtained; According to the relative distances between multiple AGVs, a virtual repulsive potential field is introduced to establish a congestion model for AGVs in the operation area of the battery swap station. According to the established congestion model of AGVs in the battery swap station operation area, the spatial conflict entropy value reflecting the spatial conflict risk of AGVs is obtained.

6. The fully automatic AGV charging and battery swapping collaborative optimization system according to claim 1 is characterized in that: The method for determining the task time penalty item includes: Obtain the deadline and current time of the task currently being executed by the AGV; introduce an inverse proportional function between the deadline and current time of the task; and generate a task time penalty item reflecting the risk of AGV task timeout based on the inverse proportional function.

7. The fully automatic AGV charging and battery swapping collaborative optimization system according to claim 1 is characterized in that: Each AGV corresponds to a node in the spatiotemporal conflict resolution graph of the battery swap station.

8. The fully automatic AGV charging and battery swapping collaborative optimization system according to claim 7 is characterized in that: The method for generating the optimal battery replacement sequence of the AGV includes: Based on the spatiotemporal conflict resolution graph of battery swap stations, a node coloring model is constructed. Based on the node coloring model, the graph nodes are traversed and colored according to the trusted dynamic consensus factor. The spatiotemporal replacement algorithm is used to gradually eliminate adjacent nodes of the same color in the spatiotemporal conflict resolution graph of the battery swap station; through iterative optimization, the final node coloring scheme is output, and the final node coloring scheme corresponds to the optimal battery swap order of the AGV.

Citation Information

Patent Citations

  • AGV path planning method based on flexible space-time network model

    CN113902289A

  • Multi-AGV obstacle avoidance and path planning method and system based on deep learning

    CN118068836A

  • Task allocation and charging scheduling collaborative optimization method for intelligent storage

    CN118378836A

  • Goods-to-people warehousing system AGV scheduling and path planning collaborative optimization method and application thereof

    CN118863398A