An obstacle avoidance path rationality evaluation method and device and electronic equipment

CN122593380APending Publication Date: 2026-08-18INFORMATION SCI RES INST OF CETC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610657851.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

当无人机在飞行过程中,由于动态障碍物难以提前全部探测,实际飞行路径往往与预先规划的最优路径存在一定偏差

Benefits of technology

一、本发明采用基于分段连续函数的影响建模方法,将影响区域划分为高影响区、中影响区和无影响区三级,以连续衰减函数替代传统二元硬阈值判断,从根本上解决了代价突变导致的优化困难问题,使无人机能够根据障碍物类型和距离采取差异化的避障策略。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122593380A_ABST
    Figure CN122593380A_ABST
Patent Text Reader

Abstract

This invention discloses a method, device, and electronic device for evaluating the rationality of obstacle avoidance paths, relating to the field of UAV path planning and intelligent optimization technology. The method includes: acquiring information on the location and influence range of obstacles in the environment; constructing an obstacle avoidance path objective function, dividing the influence range into three levels to model a cost function, and dynamically adjusting weight factors based on task completion; repeatedly solving for multiple low-cost obstacle avoidance paths based on an improved whale swarm optimization algorithm to form a rational path sample set, balancing global exploration and local development, and refining the optimal solution in the later stages through pattern search; acquiring the path point sequence of the actual UAV flight path; using a Gaussian mixture model to fit the probability distribution of the offline-generated low-cost obstacle avoidance path feature vectors, extracting the common features of the actual flight paths and calculating their negative log-likelihood, and outputting the obstacle avoidance rationality level according to a preset threshold. This solves the problem of the lack of rationality evaluation for UAV obstacle avoidance paths in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of UAV path planning and intelligent optimization technology, and in particular to a method, device, electronic device and storage medium for evaluating the rationality of obstacle avoidance paths based on improved whale swarm optimization. Background Technology

[0002] Drone technology has developed rapidly in recent years and is widely used in fields such as power line inspection and logistics delivery. In these applications, path planning is one of the key technologies of drone technology. Its main task is to design an optimal path from the starting point to the destination while meeting the performance constraints of the drone, and at the same time minimizing the costs such as energy consumption and target distance. This is a typical multi-objective and multi-constraint optimization problem.

[0003] The environmental impacts faced by drones mainly include static obstacle impacts and dynamic obstacle impacts. Traditional impact modeling typically uses a binary partitioning method, employing a hard threshold function to determine whether a drone enters the impact area, where 0 represents a safe zone and 1 represents an unsafe zone. This approach is overly simplistic and fails to reflect the characteristic of impact costs continuously changing with distance in real-world applications. When a drone is near the impact boundary, the cost function undergoes abrupt changes, making it difficult for the optimization algorithm to converge smoothly, thus failing to obtain a high-quality planned path.

[0004] In existing path planning methods, the weight coefficients of multiple objective functions, such as impact cost, energy cost, and target distance cost, typically remain constant throughout the optimization process, employing a static weight configuration. However, the emphasis on each cost objective varies at different stages of actual flight: obstacle avoidance should be prioritized in the early stages, while target approach should be prioritized in the later stages. Static weights cannot reflect these stage-specific changes, making it difficult for UAVs to adaptively adjust their flight behavior strategies according to mission progress, resulting in insufficient mission adaptability.

[0005] Regarding path rationality assessment, existing technologies primarily focus on path planning itself, lacking quantitative assessment methods for the rationality of actual flight paths. During drone flight, dynamic obstacles are difficult to detect in advance, often resulting in deviations between the actual flight path and the pre-planned optimal path. However, there is currently a lack of quantitative assessment technologies for obstacle avoidance paths that can adapt to complex obstacle environments (coexisting with static and dynamic obstacles), making it impossible to objectively judge the rationality of drone's actual flight behavior.

[0006] Therefore, there is an urgent need for a technical solution to assess the rationality of obstacle avoidance paths for drones, which can solve the above problems. Summary of the Invention

[0007] The present invention aims to provide a method for evaluating the rationality of obstacle avoidance paths based on improved whale pod optimization, so as to solve the shortcomings of the existing technology. The technical problem to be solved by the present invention is achieved through the following technical solution.

[0008] According to a first aspect of this application, a method for evaluating the rationality of obstacle avoidance paths is provided, the method comprising: Acquire the location information of static and dynamic obstacles in the environment in which the drone is located, as well as the influence range information of each obstacle; An obstacle avoidance path objective function is constructed, which comprehensively considers the impact cost, energy consumption cost, and target distance cost. The impact cost is modeled based on a piecewise continuous function, dividing the obstacle's influence range into three levels: high-impact zone, medium-impact zone, and no-impact zone. The impact cost is calculated using a continuous decay function based on the distance from the UAV to the obstacle. The impact cost, energy consumption cost, and target distance cost correspond to weighting factors, which are dynamically adjusted according to the task completion rate. The objective function was optimized and solved independently multiple times based on the improved whale swarm optimization algorithm. Given the flight start point, end point, and flight time, multiple low-cost obstacle avoidance paths were collected as a reasonable path sample set. The global geometric, safety, and dynamic features of each path were extracted, and the probability distribution of the feature vector was fitted using a Gaussian mixture model. The improved whale swarm optimization algorithm used a Tent chaotic mapping with small perturbations to generate the initial population during population initialization, used a nonlinear convergence factor to update the shrinkage coefficient during position update iteration, and initiated a mode search to refine the current optimal solution when the trigger condition was met in the later stage of the iteration. Obtain the path point sequence of the actual flight path of the drone; A Gaussian mixture model is used to calculate the negative log-likelihood of the actual flight path, and a reasonableness level is output based on a preset threshold. After extracting the same feature vector from the actual flight path, it is input into the pre-trained Gaussian mixture model to calculate its negative log-likelihood value; this value is compared with the threshold determined in the offline stage, and the reasonableness of the path obstacle avoidance is divided into three levels: high, medium, and low, and the evaluation result is output.

[0009] Preferably, the piecewise continuous function divides the impact cost into four segments: when the distance from the UAV to the obstacle is less than the core radius of the high impact zone, the impact cost reaches its maximum value; when the distance is between the core radius and the impact radius of the medium impact zone, the impact cost decays exponentially from the maximum cost outside the core zone to the cost outside the impact zone; when the distance is between the impact radius of the medium impact zone and the safe radius of the no-impact zone, the impact cost continues to decay exponentially from the maximum cost outside the impact zone; when the distance is greater than the safe radius, the impact cost is zero.

[0010] Preferably, the task completion rate is the ratio of the distance the UAV has flown to the total distance from the starting point to the target point; the default ratio of the impact cost weight, energy consumption cost weight and target distance cost weight is 1:0.5:2.5, and it is continuously and smoothly adjusted according to the task completion rate, so that the UAV focuses on obstacle avoidance in the early stage of flight, balances various indicators in the middle stage, and accelerates to approach the target point in the later stage.

[0011] Preferably, in the iterative formula of the Tent chaotic mapping with small perturbation, the next chaotic value is calculated by superimposing the current chaotic value with a small random number that meets a predetermined range. The small random number is used to eliminate the periodic window and fixed point problem of the Tent mapping, so that the initial population is more evenly distributed in the search space.

[0012] Preferably, the nonlinear convergence factor is updated nonlinearly based on the ratio of the current iteration number to the maximum iteration number and a preset decay rate parameter. The decay rate parameter has a value range of 2 to 5, which makes the algorithm focus more on global exploration in the early stage of iteration and more on local development in the later stage of iteration.

[0013] Preferably, the triggering conditions for the pattern search include at least one of the following: the ratio of the current iteration number to the maximum iteration number exceeds a predetermined iteration ratio threshold; the improvement of the current optimal solution is lower than a predetermined accuracy threshold; the optimal solution has not changed significantly after multiple consecutive iterations; after the triggering conditions are met, the current optimal solution is refined by performing a search loop based on the current optimal solution position, problem boundary conditions, and objective function through the initial step size and minimum step size of the pattern search.

[0014] Preferably, the negative log-likelihood threshold includes a first threshold and a second threshold. When the negative log-likelihood value is less than the first threshold, the path obstacle avoidance rationality level is determined to be high; when the negative log-likelihood value is not less than the first threshold and less than the second threshold, the path obstacle avoidance rationality level is determined to be medium; when the negative log-likelihood value is not less than the second threshold, the path obstacle avoidance rationality level is determined to be low.

[0015] According to a second aspect of this application, an obstacle avoidance path rationality assessment device employing the above-described obstacle avoidance path rationality assessment method is provided, comprising: The information acquisition module is used to acquire the location information of static and dynamic obstacles in the environment in which the UAV is located, as well as the influence range information of each obstacle; The objective function construction module is used to construct the objective function for obstacle avoidance path. The objective function comprehensively considers the impact cost, energy consumption cost and target distance cost. The impact cost is modeled based on a piecewise continuous function, which divides the impact range of obstacles into three levels: high impact zone, medium impact zone and no impact zone, and dynamically adjusts the weight factors of each cost according to the task completion degree. The path planning module optimizes the objective function based on the improved whale swarm optimization algorithm to obtain the optimal obstacle avoidance path. The improved whale swarm optimization algorithm includes Tent chaotic mapping population initialization, nonlinear convergence factor position update, and pattern search refinement enhancement. The path acquisition module is used to obtain the path point sequence of the actual flight path of the UAV; Reasonableness assessment module: The Gaussian mixture model built based on the offline stage is used to evaluate the actual flight path online, determine the negative log-likelihood value of the actual flight path, and output the reasonableness level of the obstacle avoidance path according to the preset threshold.

[0016] According to a third aspect of this application, an electronic device includes a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the above-described obstacle avoidance path rationality assessment method.

[0017] According to a fourth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the above-described obstacle avoidance path rationality assessment method.

[0018] The embodiments of the present invention have the following advantages: I. This invention adopts an impact modeling method based on piecewise continuous functions, which divides the impact area into three levels: high impact area, medium impact area and no impact area. It replaces the traditional binary hard threshold judgment with a continuous decay function, which fundamentally solves the optimization difficulty caused by cost mutation, enabling UAVs to adopt differentiated obstacle avoidance strategies according to obstacle type and distance.

[0019] Second, this invention introduces an adaptive weight adjustment mechanism based on mission completion, which makes the impact cost weight, energy consumption cost weight and target distance cost weight change continuously and smoothly with the flight phase, significantly improving mission adaptability.

[0020] Third, this invention improves the global search capability and the ability to escape local optima in the later stages of the whale swarm optimization algorithm by introducing three improvement measures: Tent chaotic mapping initialization, nonlinear convergence factor, and pattern search.

[0021] Fourth, this invention proposes a path rationality assessment method based on Gaussian mixture model and negative log-likelihood. By constructing the probability distribution of rational paths offline and calculating the negative log-likelihood of actual paths online, combined with level classification, a quantitative assessment of the rationality of path obstacle avoidance is achieved, filling the technical gap in the assessment of UAV path rationality in complex environments. Attached Figure Description

[0022] Figure 1 This is a flowchart of the steps in the obstacle avoidance path rationality assessment method of the present invention; Figure 2 This is a schematic diagram of the structure of an obstacle avoidance path rationality evaluation system according to the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to the present invention; Figure 4 This is a schematic diagram of the structure of a computer storage medium according to the present invention. Detailed Implementation

[0023] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0024] It should be noted that the above detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0025] Example 1: like Figure 1 As shown, the obstacle avoidance path rationality assessment method in one embodiment of this application includes the following steps: S1: Obtain the location information of static and dynamic obstacles in the environment where the drone is located, as well as the influence range information of each obstacle; In this step, the position and influence range of static obstacles can be obtained through detection methods before flight; the speed of dynamic obstacles is updated in real time during flight. Each obstacle is associated with three parameters: the core radius of the high-influence zone, the influence radius of the medium-influence zone, and the safe radius of the no-influence zone.

[0026] S2: Construct an obstacle avoidance path objective function. The objective function comprehensively considers the impact cost, energy consumption cost, and target distance cost. The impact cost is modeled based on a piecewise continuous function, dividing the obstacle's influence range into three levels: high impact zone, medium impact zone, and no impact zone. The impact cost is calculated using a continuous decay function based on the distance from the UAV to the obstacle. The impact cost, energy consumption cost, and target distance cost correspond to weighting factors, which are dynamically adjusted according to the task completion rate. In this step, the default weight ratio of impact cost, energy consumption cost, and target distance cost is 1:0.5:2.5, and it is continuously and smoothly adjusted according to the mission completion rate (i.e., the ratio of the distance flown to the total distance from the starting point to the target point): in the early stage of flight, the weight of impact cost is increased to make the UAV prioritize avoiding obstacles; in the middle stage of flight, the weight of impact cost and energy consumption cost are balanced; in the later stage of flight, the weight of target distance cost is increased to prompt the UAV to accelerate towards the target point.

[0027] The impact cost is modeled based on a piecewise continuous function, dividing the impact range of each obstacle into three levels: high impact zone, medium impact zone, and no impact zone. Specifically: (1) High impact zone: When the distance between the UAV and an obstacle is less than the core radius of the high impact zone of the obstacle, the impact cost is taken as the maximum value; (2) Medium Influence Zone: When the above distance is between the core radius and the influence radius of the medium influence zone, the influence cost decreases from the maximum cost outside the core zone to the cost value outside the influence zone according to the exponential decay function; (3) Transition section of no-impact zone: When the above distance is between the influence radius of the medium-impact zone and the safety radius of the no-impact zone, the impact cost continues to decrease from the maximum cost outside the impact zone according to the exponential decay function; (4) Safe zone: When the above distance is greater than the safe radius, the impact cost is zero.

[0028] The formula for the overall objective function is:

[0029] In the formula, To influence the cost, For the cost of energy consumption, The cost of distance to the target To influence the cost weight, As a weight for energy consumption cost, The target distance cost weight.

[0030] The aforementioned piecewise continuous function replaces the traditional hard threshold judgment with a continuously decaying function, eliminating abrupt changes in the cost function at the region boundary and enabling the optimization algorithm to converge smoothly. For complex environments with multiple obstacles, the total impact cost is the sum of the impact costs of each obstacle.

[0031] The energy cost consists of two parts: basic energy consumption and climb-related energy consumption. Basic energy consumption is related to the flight segment distance and fuel consumption rate, while climb-related energy consumption is related to the change in altitude.

[0032] The target distance cost is the three-dimensional Euclidean distance from the UAV's current position to the target point, obtained by calculating the square root of the sum of the squares of the differences between the three-dimensional coordinate components of the current position and the three-dimensional coordinate components of the target point. Specifically: Formula for calculating the impact cost:

[0033] In the formula, For drones to the first The distance to each obstacle The function is defined as follows:

[0034] In the formula, The core radius of the high-impact zone. The radius of influence of the medium-sized influence zone. The safety radius of the no-impact zone, This is the biggest cost outside the core area. To maximize the impact on areas outside the region, This is the attenuation coefficient.

[0035] The formula for calculating energy consumption cost is shown below. Energy consumption cost consists of basic energy consumption and additional energy consumption for climbing.

[0036]

[0037] In the formula, For fuel consumption rate, For the previous path point, For flight segment distance, For the current height, For the previous height, This represents the change in altitude.

[0038] The formula for calculating the target distance cost is shown below.

[0039]

[0040] In the formula, , and These are the three-dimensional spatial coordinate components of the current position. , and These are the three-dimensional spatial coordinate components of the target point.

[0041] S3: The objective function is optimized and solved independently multiple times based on the improved whale swarm optimization algorithm. Given the flight start point, end point, and flight time, multiple low-cost obstacle avoidance paths are collected as a reasonable path sample set. The global geometric, safety, and dynamic features of each path are extracted, and the probability distribution of the feature vector is fitted using a Gaussian mixture model. The improved whale swarm optimization algorithm uses a Tent chaotic mapping with small perturbations to generate the initial population during population initialization, uses a nonlinear convergence factor to update the shrinkage coefficient during position update iteration, and initiates mode search to refine the current optimal solution when the triggering condition is met in the later stage of iteration. The specific method for this step is as follows: Step S3-1: Population initialization based on Tent chaotic mapping. During population initialization, a small-perturbation Tent chaotic mapping is introduced—the next chaotic value is calculated by superimposing the current chaotic value with a small random number within a predetermined range. This eliminates the periodic window and fixed-point problems of the Tent mapping, making the initial population more evenly distributed in the search space and improving the diversity of initial solutions.

[0042] Population initialization is performed based on the following formula.

[0043]

[0044] In the formula, For individuals Location, and These are the upper and lower bounds of the search space. A random number between 0 and 1.

[0045] This method of generating and initializing the population using random numbers may lead to an uneven initial population distribution, potentially causing it to get stuck in local optima later in the search and making it difficult to find the global optimum. To improve global search capabilities and increase the diversity of initial solutions, a Tent map is introduced during population initialization. The Tent map is a one-dimensional chaotic mapping system. A perturbation smaller than a threshold is added to the Tent map to address the periodic window and fixed nature of the Tent map, as shown in the following formula.

[0046]

[0047] in, This indicates that the current chaotic value satisfies , Indicates the next chaotic value. For a very small random number perturbation, satisfying ~ .

[0048] Step S3-2: Position Update Iteration. During the shrinking encirclement phase, each individual updates its position based on the difference between its current position and the current best individual position, along with a coefficient. During the spiral update phase, each individual updates its position spirally based on the distance between its current position and the best individual, along with the logarithmic spiral parameter. These two mechanisms are triggered alternately with equal probability. When the absolute value of the shrinkage coefficient is greater than 1, the algorithm enters the global exploration phase, randomly selecting an individual position as a reference for position updating.

[0049] The whale pod optimization algorithm assumes that the current best candidate solution position is the target prey position. Once the target prey position is defined, other whales will attempt to surround it. The position transformation formula is shown below.

[0050]

[0051]

[0052]

[0053]

[0054] In the formula, This represents the current iteration number. and For coefficients, It is the position of the current solution. It is the position of the current optimal solution. The linear decrease from 2 to 0 during the iteration process.

[0055] Step S3-3: Nonlinear convergence factor update. The contraction coefficient is updated nonlinearly based on the ratio of the current iteration number to the maximum iteration number and a preset decay rate parameter. The decay rate parameter ranges from 2 to 5, enabling the algorithm to maintain strong global exploration capabilities in the early stages of iteration and quickly focus on local fine-tuning in the later stages of iteration.

[0056] To improve the balance between global exploration and local exploitation capabilities of the whale swarm optimization algorithm, the coefficient of linear decay was adjusted. A non-linear convergence strategy is employed for updates, allowing the algorithm to focus more on global exploration in the early stages and on local exploration in the later stages. The update formula is shown in the following equation:

[0057] in, This represents the decay rate parameter (usually 2-5). Indicates the maximum number of iterations. This indicates the current iteration number.

[0058] In the solution process, by reducing The value is used to achieve the shrinking of the bounding box. The range of values ​​is .when When decreasing linearly, The range will also shrink. During the position update process, the spiral movement of the whale is simulated according to the following spiral update formula.

[0059]

[0060]

[0061] in, Indicates the first The distance between each individual and the optimal individual It is a constant used to define the shape of the logarithmic spiral. for A random number between [a certain number of points].

[0062] Assuming that the whale shrinking encirclement mechanism and the spiral update mechanism have equal probabilities, the mathematical expression is as follows.

[0063]

[0064] Besides using bubble nets to hunt, humpback whales also randomly seek out prey. By changing... The value is used to achieve this predation method. When When the absolute value of the value is greater than 1, the whale will move away from its target prey. In contrast to the bubble-net predation phase, the position of a randomly selected individual is used as a reference to update the next position, rather than the current optimal individual position. This phase is equivalent to the exploration phase, and the calculation formula is shown below.

[0065]

[0066]

[0067] Step S3-4: Pattern Search Enhancement. Pattern search is initiated when triggering conditions are met. These triggering conditions include at least one of the following: the ratio of the current iteration count to the maximum iteration count exceeds a predetermined iteration ratio threshold; the improvement of the current optimal solution is lower than a predetermined accuracy threshold; or the optimal solution has not changed significantly after multiple consecutive iterations. After the triggering conditions are met, a search loop is performed based on the current optimal solution's position, problem boundary conditions, and objective function, using the initial and minimum step sizes of the pattern search, to refine the current optimal solution.

[0068] To improve the accuracy of the solution in the later stages of whale pod optimization, a pattern search method is added in the later stages of iteration to improve the accuracy of the solution.

[0069] Because the whale swarm optimization algorithm mainly uses global search in the early iterations, balances search and development in the mid-term iterations, and focuses on local development in the later iterations, which is the main stage of its use.

[0070] The specific triggering conditions for pattern search include three conditions: Condition 1: Number of iterations > Total number of iterations 0.7 Condition 2: Five consecutive generations of improvement < 0.000001 Condition 3: Population diversity < threshold When the pattern search meets the triggering condition, it is based on the current position of the solution. and the boundary conditions of the problem , and objective function During the pattern search process, the search loop is performed based on the current solution's position, the initial step size, and the minimum step size.

[0071] Step S3-5: Feature Extraction. For multiple independent runs of the improved whale swarm optimization algorithm, collect low-cost obstacle avoidance paths and extract features for each path. These features include static obstacle environment features and dynamic obstacle environment features. Extracted features include: path length ratio, average curvature, peak curvature, minimum safe distance, safety margin, hazard retention ratio, dynamic obstacle proximity index, and average spatiotemporal risk.

[0072] Step S3-6: Fit the probability distribution of the feature vectors using a Gaussian mixture model. Using the collected set of reasonable path feature vectors as training samples, fit the probability density function using a Gaussian mixture model to obtain the statistical distribution model of the reasonable path in the high-dimensional feature space. This model is then used to calculate the negative log-likelihood of the actual flight path in subsequent online evaluations.

[0073] Since rational paths often exhibit multimodal distribution characteristics in the feature space, a single Gaussian distribution cannot accurately describe such complex distributions. Gaussian mixture models, through weighted combinations of multiple Gaussian components, can approximate any continuous distribution.

[0074] Let the set of feature vectors of a reasonable path be... ,in For a reasonable number of paths, each feature vector Includes steps S3-5 Each feature is standardized by calculating its mean vector. and standard deviation vector And transform each feature vector into This ensures that each feature has zero mean and unit variance.

[0075] The standardized feature vector set is fitted using a Gaussian mixture model. Gaussian mixture models are defined as follows: Weighted sum of Gaussian components:

[0076] in, For the first The mixing weights of the Gaussian components satisfy... and , For For mean vector, The probability density function of the multivariate Gaussian distribution of the covariance matrix is:

[0077] Parameters of Gaussian mixture model The EM algorithm estimates the value from the training samples using the Expectation-Maximization (EM) algorithm. The EM algorithm iteratively performs the following two steps until convergence: Step E: Calculate each sample based on the current parameters. Data No. Posterior probability (responsibility) of each Gaussian component:

[0078] M-step: Update parameters using responsibility level:

[0079] Component number of Gaussian mixture models The Bayesian Information Criterion (BIC) is used for selection. A smaller BIC value indicates a better balance between model fit and complexity. The formula for calculating BIC is:

[0080] in, This represents the number of free parameters. Typically, this is chosen... Perform a traversal and select the component with the smallest BIC.

[0081] Finally, the parameters of the trained Gaussian mixture model are output. and standardized parameters , For use during the online assessment phase.

[0082] Specifically: Gaussian mixture models are used for non-parametric modeling of the multimodal feature distribution of rational paths. Let the set of feature vectors of rational paths be... After standardization, it becomes The Gaussian mixture model represents the probability density function as a convex combination of a finite number of Gaussian components. The log-likelihood function is iteratively optimized using the EM algorithm.

[0083] The EM algorithm guarantees that the log-likelihood is monotonically increasing. The algorithm terminates when the parameter change is less than a preset threshold or when the maximum number of iterations is reached.

[0084] S4: Obtain the path point sequence of the actual flight path of the UAV; In this step, the path point sequence of the actual flight path is collected by the UAV's onboard sensors and reported to the ground control station; in other embodiments, it can also be extracted from historical trajectory points recorded in the flight log.

[0085] S5: Calculate the negative log-likelihood of the actual flight path using a Gaussian mixture model, and output the rationality level based on a preset threshold. After extracting the same feature vector from the actual flight path, input it into the pre-trained Gaussian mixture model to calculate its negative log-likelihood value; compare this value with the threshold determined in the offline stage, classify the path obstacle avoidance rationality into three levels: high, medium, and low, and output the evaluation result.

[0086] In this step, the probability distribution of the Gaussian mixture model and the standardized parameters of the feature vectors of a reasonable path have been obtained in the offline phase. During online evaluation, for the actual flight path, the same feature extraction and standardization methods as in offline modeling must be used to calculate the negative log-likelihood of its feature vectors under the Gaussian mixture model. The smaller the negative log-likelihood value, the closer the features of the actual path are to the typical distribution of a reasonable path, i.e., the higher the obstacle avoidance rationality.

[0087] First, the actual flight path is a discretized sequence of three-dimensional spatial points. ,in Extract the feature vector of the path according to the method described in steps S3-5. Then, the mean vector stored in the offline phase is used. and standard deviation vector Standardize the feature vectors:

[0088] The standardized feature vectors are then input into the trained Gaussian mixture model (GMM) to calculate its probability density values. GMM is composed of... Composed of Gaussian components, each component With weight mean vector Covariance Matrix The probability density function is:

[0089] in, Let be the probability density function of a multivariate Gaussian distribution. The negative log-likelihood is defined as:

[0090] The negative log-likelihood is non-negative. The smaller the value, the more the characteristics of the actual flight path conform to the statistical distribution of low-cost obstacle avoidance paths, and the higher the rationality of obstacle avoidance.

[0091] Finally, based on the two thresholds determined in the offline phase and They are then categorized into different levels. The 50th quantile of the negative log-likelihood of the offline low-cost obstacle avoidance path set. The 95th percentile of the negative log-likelihood of the offline low-cost obstacle avoidance path set.

[0092] when When the path obstacle avoidance rationality level is high; when When the path obstacle avoidance rationality level is medium; when At this time, the path obstacle avoidance rationality level is low. Output the rationality level.

[0093] Specifically: Negative log-likelihood is used to quantify the deviation between the actual flight path and the probability distribution of a reasonable path. Let the GMM parameters obtained from offline training be... The standardized parameters are , For the actual flight path, calculate its eigenvector. Then, press Standardize the data. Substitute the values ​​into the GMM to obtain the probability density. Taking the negative logarithm gives the NLL. The smaller this value, the closer the actual path is to the typical characteristics of a reasonable path.

[0094] Example 2

[0095] This embodiment provides a device for evaluating the rationality of obstacle avoidance paths based on improved whale pod optimization, used to implement the method described in Embodiment 1. The device structure is as follows: Figure 2 As shown, it includes the following functional modules: Information acquisition module: used to acquire the location information of static and dynamic obstacles in the environment where the UAV is located, as well as the influence range information of each obstacle, including the core radius of the high influence zone, the influence radius of the medium influence zone, and the safety radius of the non-influence zone of each obstacle.

[0096] Objective function construction module: used to construct the objective function of obstacle avoidance path. The objective function comprehensively considers the impact cost, energy consumption cost and target distance cost. The impact cost is modeled based on piecewise continuous function, dividing the obstacle's influence range into three levels: high impact zone, medium impact zone and no impact zone, and dynamically adjusting the weight factors of each cost according to the task completion degree.

[0097] The path planning module is used to perform multiple optimizations on the objective function based on an improved whale swarm optimization algorithm, generating multiple low-cost obstacle avoidance paths to form a low-cost obstacle avoidance path sample set. The improved whale swarm optimization algorithm includes: initializing the population based on a Tent chaotic mapping with small perturbations, using a nonlinear convergence factor for position update iterations, and initiating a pattern search for refinement enhancement when triggering conditions are met in the later stages of iteration.

[0098] Path acquisition module: Used to acquire the path point sequence of the actual flight path of the UAV, supporting real-time acquisition from onboard sensors or extraction from historical trajectories in flight logs.

[0099] Reasonableness Assessment Module: This module performs online evaluation of the actual flight path based on the Gaussian Mixture Model (GMM) constructed in the offline phase. First, it extracts a preset feature vector from the actual flight path, including: path length ratio, average curvature, peak curvature, minimum safe distance, safety margin, hazard retention ratio, dynamic obstacle approach index, and average spatiotemporal risk. Then, it normalizes the feature vector using standardized parameters stored offline and inputs the trained GMM to calculate the negative log-likelihood value. Finally, it compares the negative log-likelihood value with a preset threshold and outputs the reasonableness level of the obstacle avoidance path, which is divided into three levels: high, medium, and low.

[0100] Example 3: In one exemplary embodiment, such as Figure 3 As shown, this application provides an electronic device, which can be a server, industrial control computer, edge computing gateway, or robot main control board. The electronic device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is connected to the system bus via the I / O interfaces. The processor of this electronic device provides computing and control capabilities, supports x86, ARM, or RISC-V instruction set architectures, and can call upon GPU acceleration units to collaboratively perform vector calculations and matrix operations, accelerating optimization algorithms and model inference.

[0101] The electronic device's memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage medium. The electronic device's database stores model data of static and dynamic obstacles, a sample set of low-cost obstacle avoidance paths and extracted feature vectors, Gaussian mixture model parameters, feature standardization parameters, and preset thresholds for rationality evaluation. The electronic device's input / output interface is used for exchanging information between the processor and external devices. The electronic device's communication interface is used for communication with external terminals via a network connection, supporting Ethernet, Wi-Fi, 5G, or industrial fieldbus protocols. When the computer program is executed by the processor, it implements an obstacle avoidance path rationality evaluation method.

[0102] Example 4: On the other hand, such as Figure 4As shown, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device. The computer-readable storage medium stores one or more programs that, when used by one or more processors, execute the obstacle avoidance path rationality assessment method described in this application.

[0103] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0104] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.

[0105] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or apparatus.

[0106] For ease of description, spatial relative terms such as "above," "on top of," "on the upper surface of," "above," etc., are used herein to describe the spatial positional relationship of a device or feature as shown in the figures to other devices or features. It should be understood that spatial relative terms are intended to encompass different orientations in use or operation beyond the orientation of the device as described in the figures. For example, if the device in the figures were inverted, a device described as "above" or "on top of" other devices or structures would subsequently be positioned as "below" or "under" other devices or structures. Thus, the exemplary term "above" can include both "above" and "below." The device may also be positioned in other different ways, such as rotated 90 degrees or in other orientations, and the spatial relative descriptions used herein will be interpreted accordingly.

[0107] In the detailed description above, reference has been made to the accompanying drawings, which form part of this document. In the drawings, similar symbols typically identify similar parts unless the context otherwise indicates otherwise. The illustrated embodiments described in the detailed specification, drawings, and claims are not intended to be limiting. Other embodiments may be used and other changes may be made without departing from the spirit or scope of the subject matter presented herein.

[0108] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for evaluating the rationality of obstacle avoidance paths, characterized in that, The method includes: Acquire the location information of static and dynamic obstacles in the environment in which the drone is located, as well as the influence range information of each obstacle; An obstacle avoidance path objective function is constructed, which comprehensively considers the impact cost, energy consumption cost, and target distance cost. The impact cost is modeled based on a piecewise continuous function, dividing the obstacle's influence range into three levels: high-impact zone, medium-impact zone, and no-impact zone. The impact cost is calculated using a continuous decay function based on the distance from the UAV to the obstacle. The impact cost, energy consumption cost, and target distance cost correspond to weighting factors, which are dynamically adjusted according to the task completion rate. The objective function was optimized and solved independently multiple times based on the improved whale swarm optimization algorithm. Given the flight start point, end point, and flight time, multiple low-cost obstacle avoidance paths were collected as a reasonable path sample set. The global geometric, safety, and dynamic features of each path were extracted, and the probability distribution of the feature vector was fitted using a Gaussian mixture model. The improved whale swarm optimization algorithm used a Tent chaotic mapping with a perturbation less than a threshold to generate the initial population during population initialization. In the position update iteration, a nonlinear convergence factor was used to update the shrinkage coefficient. When the trigger condition was met in the later stage of the iteration, a mode search was initiated to refine the current optimal solution. Obtain the path point sequence of the actual flight path of the drone; The negative log-likelihood of the actual flight path is calculated using a Gaussian mixture model. Based on a preset threshold, a reasonableness level is output. After extracting the same feature vector from the actual flight path, it is input into the pre-trained Gaussian mixture model to calculate its negative log-likelihood value. This value is compared with the threshold determined in the offline stage, and the reasonableness of the path obstacle avoidance is divided into three levels: high, medium, and low, and the evaluation result is output.

2. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, The piecewise continuous function divides the impact cost into four segments: when the distance from the UAV to the obstacle is less than the core radius of the high impact zone, the impact cost reaches its maximum value; when the distance is between the core radius and the influence radius of the medium impact zone, the impact cost decays exponentially from the maximum cost outside the core zone to the cost outside the impact zone; when the distance is between the influence radius of the medium impact zone and the safe radius of the no-impact zone, the impact cost continues to decay exponentially from the maximum cost outside the impact zone; when the distance is greater than the safe radius, the impact cost is zero.

3. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, The task completion rate is the ratio of the distance the drone has flown to the total distance from the starting point to the target point; the default ratio of the impact cost weight, energy consumption cost weight and target distance cost weight is 1:0.5:2.5, and it is continuously and smoothly adjusted according to the task completion rate, so that the drone focuses on obstacle avoidance in the early stage of flight, balances various indicators in the middle stage, and accelerates to approach the target point in the later stage.

4. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, In the process of generating the initial population using the Tent chaotic mapping with a perturbation less than a threshold, the next chaotic value is calculated by superimposing the current chaotic value with a small random number that meets a predetermined range. The small random number is used to eliminate the periodic window and fixed point problem of the Tent mapping, so that the initial population is more evenly distributed in the search space.

5. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, The nonlinear convergence factor is updated nonlinearly based on the ratio of the current iteration number to the maximum iteration number and a preset decay rate parameter. The decay rate parameter ranges from 2 to 5, which makes the algorithm focus more on global exploration in the early stage of iteration and more on local development in the later stage of iteration.

6. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, The triggering conditions for the pattern search include at least one of the following: the ratio of the current iteration number to the maximum iteration number exceeds a predetermined iteration ratio threshold; the improvement of the current optimal solution is lower than a predetermined accuracy threshold. The optimal solution did not change significantly after multiple iterations. Once the triggering condition is met, the current optimal solution is refined by performing a search loop based on the current optimal solution position, problem boundary conditions, and objective function, using the initial and minimum step sizes of the pattern search.

7. The obstacle avoidance path rationality assessment method according to claim 1, characterized in that, The negative log-likelihood value includes a first threshold and a second threshold. When the negative log-likelihood value is less than the first threshold, the path obstacle avoidance rationality level is determined to be high. When the negative log-likelihood value is not less than the first threshold and less than the second threshold, the path obstacle avoidance rationality level is determined to be medium. When the negative log-likelihood value is not less than the second threshold, the path obstacle avoidance rationality level is determined to be low.

8. An obstacle avoidance path rationality assessment device employing the obstacle avoidance path rationality assessment method according to any one of claims 1 to 7, comprising: The information acquisition module is used to acquire the location information of static and dynamic obstacles in the environment in which the UAV is located, as well as the influence range information of each obstacle; The objective function construction module is used to construct the objective function for obstacle avoidance path. The objective function comprehensively considers the impact cost, energy consumption cost and target distance cost. The impact cost is modeled based on a piecewise continuous function, which divides the impact range of obstacles into three levels: high impact zone, medium impact zone and no impact zone, and dynamically adjusts the weight factors of each cost according to the task completion degree. The path planning module optimizes the objective function based on the improved whale swarm optimization algorithm to obtain the optimal obstacle avoidance path. The improved whale swarm optimization algorithm includes Tent chaotic mapping population initialization, nonlinear convergence factor position update, and pattern search refinement enhancement. The path acquisition module is used to obtain the path point sequence of the actual flight path of the UAV; Reasonableness assessment module: The Gaussian mixture model built based on the offline stage is used to evaluate the actual flight path online, determine the negative log-likelihood value of the actual flight path, and output the reasonableness level of the obstacle avoidance path according to the preset threshold.

9. An electronic device, comprising a memory and a processor; characterized in that, The memory stores a computer program, and when the processor executes the computer program, it implements the obstacle avoidance path rationality assessment method as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the obstacle avoidance path rationality assessment method as described in any one of claims 1 to 7.