A path planning method and system for a Chinese herbal medicine weeding robot

By combining dynamic learning factors and the Levy flight mechanism, the Hippo optimization algorithm solves the efficiency and accuracy problems of path planning in the Chinese herbal medicine planting environment, realizes efficient and safe path planning, avoids excessive detours and plant damage, and ensures the continuity and automation of the weeding robot's operation.

CN123067464APending Publication Date: 2026-11-10HUBEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611352318.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Existing path planning algorithms in the context of Chinese herbal medicine cultivation suffer from several problems. In the early stages of iteration, the search range is limited, and in the later stages, individual convergence leads to the weeding robot being unable to complete a large-area search within a limited number of iterations. Furthermore, the algorithm is prone to planning excessive detours or being forced to stop.

Method used

The Hippo optimization algorithm, which combines dynamic learning factors and the Levy flight mechanism, enhances global exploration capabilities in the early stages of iteration and improves local search capabilities in the later stages of iteration. It also optimizes path planning by incorporating crop damage risk and energy consumption penalty terms into the fitness function.

Benefits of technology

It significantly improves the efficiency and accuracy of path planning in the environment of Chinese herbal medicine cultivation, avoids excessive detours, ensures the continuity and automation level of operations, and reduces the risk of mechanical damage to Chinese herbal medicine plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123067464A_ABST
    Figure CN123067464A_ABST
Patent Text Reader

Abstract

This invention provides a path planning method and system for a herbal weeding robot. The method includes: acquiring map obstacle information, starting point, and ending point; generating multiple initial hippo positions; calculating fitness values ​​and determining the current optimal hippo; determining a dynamic learning factor that decreases linearly with iteration; updating some hippos based on the current optimal hippo to obtain a first updated position; randomly generating predators representing obstacles and updating them according to fitness comparison to obtain a second updated position; generating new candidate positions in the vicinity of the second updated position and selecting the better one as the third updated position; classifying hippos into foraging and following categories; controlling foraging hippos to learn towards the current optimal orientation using the dynamic learning factor and superimposing a Lévy perturbation; controlling following hippos to randomly select foraging hippos to learn from, obtaining a fourth updated position; and outputting the corresponding path point based on the fourth updated position. This invention improves the efficiency and accuracy of path planning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of path planning technology, specifically to a path planning method and system for a Chinese herbal medicine weeding robot. Background Technology

[0002] In the large-scale cultivation of Chinese medicinal herbs, weeding is a crucial step in ensuring the quality and yield of the herbs. Weeding robots need to autonomously plan their work path from start to finish in complex farmland environments, while avoiding obstacles such as field ridges and irrigation facilities. Therefore, the search efficiency, convergence accuracy, and robustness of the path planning algorithm directly affect the safety and economy of the operation.

[0003] Traditional path planning methods, such as the A* algorithm and Dijkstra's algorithm, perform well in structured environments, but suffer from high computational cost and poor real-time performance when applied to large-scale or complex dynamic scenarios. Swarm intelligence optimization algorithms have been widely adopted in the field of path planning due to their advantages such as not requiring gradient information and flexible mechanisms. The Hippopotamus Optimization (HO) algorithm is a novel swarm intelligence method proposed in recent years, which achieves its search by simulating the social activities of hippos in rivers, such as group behavior, predator defense, and predator escape. However, the standard HO algorithm has the following shortcomings in path planning scenarios: (1) In the early stage of iteration, it lacks a sufficiently large search step size, making it difficult to fully explore different areas in a large-scale map, resulting in a limited search range in the early stage. Consequently, the weeding robot cannot complete a comprehensive search of a large planting area within a limited number of iterations, and it is easy to miss the possible optimal passage path, resulting in the robot's actual travel distance being too long, the operation time being long, and the energy consumption being increased, thus reducing the overall efficiency of weeding operations; (2) In the later stage of iteration, individuals gradually converge, lacking an effective diversity maintenance mechanism. Once the path is surrounded by obstacles or the passage is dead zone, the algorithm is difficult to escape and cannot find a better path, causing the weeding robot to easily plan an invalid path that involves excessive detours and repeated back-and-forths in a complex obstacle environment. It may even be forced to stop and wait because it cannot generate a feasible path in time, which seriously affects the continuity and automation level of weeding operations.

[0004] Therefore, there is an urgent need to provide a path planning method and system for Chinese herbal medicine weeding robots, which can plan high-quality operation paths for weeding robots in the complex scenario of Chinese herbal medicine farmland, thereby improving the efficiency and rationality of path planning. Summary of the Invention

[0005] In view of this, it is necessary to provide a path planning method and system for a Chinese herbal medicine weeding robot to solve the technical problems in the prior art, such as the limited search range in the early stage of iteration, which makes it difficult for the weeding robot to complete a comprehensive search of a large planting area within a limited number of iterations, and the tendency for the robot to plan excessive detours or be forced to stop and wait in complex obstacle environments in the later stage of iteration due to individual convergence.

[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides a path planning method for a herbal medicine weeding robot, comprising: Obtain obstacle information and the starting and ending points of the weeding robot from a two-dimensional map of the Chinese herbal medicine planting area; The weeding path of the weeding robot is initialized, generating multiple initial hippo positions representing candidate paths from the starting point to the ending point; The fitness value of each initial hippopotamus position is calculated based on the fitness function, and the current optimal hippopotamus is determined based on the fitness value. The dynamic learning factor is determined based on the current iteration number and decreases linearly with the increase of the iteration number. Based on the current optimal hippopotamus, the positions of hippos that meet the fitness value requirements are updated to obtain the first updated position; Randomly generate predators representing obstacles, and update the hippo's position based on the comparison results of the fitness values ​​of each hippo and the predator corresponding to the first updated position to obtain the second updated position; A new candidate position is generated within the neighborhood of the second update position, and the candidate position with the higher fitness value than the second update position is taken as the third update position. The neighborhood decreases as the number of iterations increases. Based on fitness values, hippos are divided into foraging hippos and following hippos. The foraging hippos are controlled to learn towards the current best hippo using the dynamic learning factor as the learning step size coefficient. The foraging Levi flight step size is added as a random perturbation term to the directional learning to update the position of the foraging hippo. The following hippos are controlled to randomly select learning objects from the foraging hippos for differential learning to update the position of the following hippos, resulting in the fourth updated position. The hippopotamus with the highest fitness value in the fourth update position is selected as the target optimal hippopotamus. Determine whether the number of iterations has reached the maximum number of iterations. If so, use the path point corresponding to the target optimal hippo as the planned path.

[0007] In one possible implementation, the two-dimensional map of the Chinese herbal medicine planting area includes an operation corridor area and a crop buffer protection area. The operation corridor area is an area where weeding robots are allowed to pass, and the crop buffer protection area is an area where weeding robots are prohibited from passing. When a path point of the candidate path or the planned path falls into the crop protection buffer zone, the path point will be forcibly adjusted to the operation corridor area.

[0008] In one possible implementation, the fitness function is:

[0009]

[0010]

[0011] In the formula, For path x fitness value; This represents the path length. This represents the number of intersections between the path and obstacles. For smoothness penalty; , , These are the weights for path length, number of intersections, and smoothness penalty, respectively. , Let x be the two-dimensional coordinates of the (s+1)th path point in path x; , Let x be the two-dimensional coordinates of the s-th path point in path x; This represents the total number of path points in the path. Let be the turning angle between two adjacent road segments in path s.

[0012] In one possible implementation, the fitness function is:

[0013]

[0014]

[0015] In the formula, This is a penalty item for crop damage risk; This is an energy consumption penalty item; , The weights of crop damage risk penalty and energy consumption penalty; the preset safety distance; The path point s is the boundary of the crop buffer zone. The distance.

[0016] In one possible implementation, updating the position of the hippos that meet the fitness value requirement based on the current best hippo to obtain the first updated position includes: Hippos were sorted by fitness value, and the top 50% of hippos by fitness value were selected as the first target individuals. If the first target individual is a male hippopotamus, the first candidate update position of the male hippopotamus is... for: ; If the first target individual is a female hippopotamus or a juvenile hippopotamus, the temperature parameter is calculated based on the current iteration number, and the temperature parameter decreases exponentially with the increase of the iteration number; When the temperature parameter is greater than the temperature threshold, the second candidate update position of the female or juvenile hippopotamus is... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is greater than the random number threshold, the second candidate update position is... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is less than or equal to the random number threshold, the second candidate update position is... for: ; In the formula, The current location of the first target individual; For random processing; This is the current optimal position for the hippopotamus; , The parameters are random, I1 and I2 ∈ [1,2]; The average position of the first target individual in the group; This is the first behavioral pattern; This is the second behavioral pattern; , These are the upper and lower limits of the search space; When the fitness of the first candidate update position or the second candidate update position is greater than the fitness value corresponding to the current position of the first target individual, the first candidate update position or the second candidate update position is used as the first update position. When the fitness of the first candidate update position or the second candidate update position is less than or equal to the fitness value corresponding to the current position of the first target individual, the current position of the first target individual is used as the first update position.

[0017] In one possible implementation, the predator representing the obstacle is randomly generated, and the hippopotamus's position is updated based on the comparison results of the fitness values ​​of each hippopotamus and the predator corresponding to the first updated position to obtain the second updated position, including: Predator locations are randomly generated within the search space, and the fitness value of the predator locations is calculated. Hippos were sorted by fitness value, and the bottom 50% of hippos by fitness value were selected as the second target individuals. Calculate the Euclidean distance between the current position of the second target individual and the position of the predator, and generate the defensive Levi flight stride. If the fitness value of the second target individual is greater than the fitness value of the predator, the second update position is: ; If the fitness value of the second target individual is less than or equal to the fitness value of the predator, the second update position is: ; In the formula, This is the second update position; To defend against Levi's flight stride; This represents the position of the 0th predator. , , , For random parameters, b∈[2,4], c∈[1,1.5], d∈[2,3], l∈[-2π,2π] ; The Euclidean distance between the current position of the second target individual and the position of the predator is given.

[0018] In one possible implementation, generating new candidate positions within the vicinity of the second updated position, and selecting the new candidate position with the higher fitness value than the second updated position as the third updated position, includes: The lower and upper bounds of the local search range are calculated based on the current iteration number; both the lower and upper bounds decrease as the iteration number increases. A direction vector is randomly selected, and a new candidate position is determined based on the direction vector, the upper bound, the lower bound, and the second update position. for: ; In the formula, This is the second update position; For random processing; The upper boundary; The lower bound; It is the direction vector; If the fitness value of the new candidate position is greater than the fitness value of the second updated position, then the new candidate position is used as the third updated position; if the fitness value of the new candidate position is less than or equal to the fitness value of the second updated position, then the second updated position is used as the third updated position.

[0019] In one possible implementation, the foraging hippo is the hippo individual corresponding to the third update position with a fitness value in the top 50%, and the following hippo is the hippo individual corresponding to the third update position with a fitness value in the bottom 50%. The location of the foraging hippo for: ; The location of the following hippo for:

[0020] In the formula, This is the third update position; It is a dynamic learning factor; , is a random vector; represents the current optimal position of the hippo. Levi's flight stride length in search of food; This is the current location of a randomly selected foraging hippopotamus.

[0021] One possible implementation also includes: When a new obstacle is detected, the obstacle's position moves, or the passage area changes, a local planning window is captured centered on the current position of the weeding robot. Based on the local planning window, the affected road segments in the planned path are determined, and the location update operations to obtain the second, third, and fourth update positions are performed on the affected road segments to obtain the locally updated path; The unaffected segments of the local update path and the planned path are combined to obtain the global update path.

[0022] Secondly, the present invention also provides a path planning system for a herbal medicine weeding robot, comprising: a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the path planning method of the herbal weeding robot in any of the above possible implementations, and to generate a planned path to instruct the weeding robot to perform weeding.

[0023] The beneficial effects of this invention are as follows: The path planning method for the herbal medicine weeding robot provided by this invention determines a dynamic learning factor that decreases linearly with the number of iterations based on the current iteration number, and updates the foraging hippo's position based on the dynamic learning factor. This allows for maintaining a larger dynamic learning factor (i.e., a larger learning step size) in the early stages of iteration, enhancing global exploration capabilities and enabling thorough exploration of large planting areas within a limited number of iterations. This effectively avoids missing optimal passage areas and overcomes the problems of excessive robot travel distance, long operation time, and increased energy consumption caused by limited search range in the early stages of existing technologies. It significantly improves the path planning efficiency of the weeding robot in large-area herbal medicine planting scenarios. In the later stages of iteration, a smaller dynamic learning factor (i.e., a smaller learning step size) is maintained, enhancing local search capabilities, improving convergence accuracy, and thus increasing the reliability of the planned path. In other words, the dynamic learning factor setting can better adapt to the optimization needs of different stages, balancing early planning efficiency and later planning accuracy.

[0024] Furthermore, this invention superimposes the Levy flight step length as a random perturbation term in the update of the foraging hippo's location. Utilizing the large-scale jump characteristics of the Levy flight heavy-tailed distribution, the algorithm retains the ability to escape local optima in the later stages of iteration, thus approaching a high-quality solution more quickly. Simultaneously, by randomly selecting foraging hippos for differentiated learning while following the hippo, it reduces ineffective searches while maintaining population diversity, achieving rapid convergence and high-quality path output. Furthermore, the combination of the Levy flight mechanism and dynamic learning factors further increases the randomness and jumpiness of the search, helping to escape local optima and maintain high-precision seeking in later stages under complex fault environments. This enables the weeding robot to continuously search for better paths in complex environments with dense obstacles or narrow passages, avoiding the planning of ineffective paths involving excessive detours and repeated backtracking, or being forced to stop and wait due to the inability to generate feasible paths in time, thus ensuring the continuity and automation level of the weeding operation. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A schematic flowchart of an embodiment of the path planning method for the herbal weeding robot provided by the present invention; Figure 2 A schematic flowchart of an embodiment of the dynamic local replanning mechanism provided by the present invention; Figure 3 The diagram below shows the path and convergence curve of the algorithm of this invention.

[0027] Figure 4 It is a simple graph showing the path and convergence curve of the Hippo algorithm.

[0028] Figure 5 It is a simple graph showing the path and convergence curve of the whale optimization algorithm.

[0029] Figure 6 These are the path diagram and convergence curve diagram of the algorithm of this invention under complex maps.

[0030] Figure 7 It shows the path graph and convergence curve of the Hippo algorithm under complex maps.

[0031] Figure 8 It shows the path graph and convergence curve of the whale optimization algorithm under complex maps.

[0032] Figure 9 This is a schematic diagram of an embodiment of the path planning system for the herbal weeding robot provided by the present invention. Detailed Implementation

[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0034] It should be understood that the illustrative drawings are not drawn to scale. The flowcharts used in this invention illustrate operations implemented according to some embodiments of the invention. It should be understood that the operations in the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed or performed simultaneously. Furthermore, those skilled in the art, guided by the content of this invention, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor systems and / or microcontroller systems.

[0035] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0036] This invention provides a path planning method and system for a Chinese herbal medicine weeding robot, which will be described below.

[0037] Figure 1 A schematic flowchart of an embodiment of the path planning method for the herbal weeding robot provided by the present invention is shown below. Figure 1 As shown, the path planning method for the herbal medicine weeding robot includes: S101. Obtain obstacle information and the starting and ending points of the weeding robot from the two-dimensional map of the Chinese herbal medicine planting area.

[0038] Specifically, obstacle information is set based on areas in the medicinal herb planting area where weeding robots are not allowed to pass, such as field ridges, irrigation facilities, and herb growing areas. The obstacle information includes obstacle regions; in this embodiment of the invention, obstacles are represented as rectangular areas.

[0039] The starting point and the ending point can be set according to actual needs.

[0040] S102. Initialize the weeding path of the weeding robot, generate multiple initial hippo positions representing candidate paths from the starting point to the end point, calculate the fitness value of each initial hippo position based on the fitness function, and determine the current optimal hippo based on the fitness value.

[0041] Specifically, the population is uniformly distributed according to the set population size to obtain multiple hippopotamus individuals. The position of each hippopotamus individual represents a potential path of the weeding robot in two-dimensional space. The path consists of several path points between the starting point and the ending point.

[0042] The j-th dimension decision variable value of the i-th hippopotamus individual is generated as follows: ; In the formula, Let be the decision variable value of the j-th dimension of the search space for the i-th hippo individual; A random number between 0 and 1; , These are the upper and lower bounds of the decision variables in the j-th dimension of the search space, respectively, which are the boundaries of the two-dimensional map of the Chinese herbal medicine planting area.

[0043] For example, in this embodiment of the invention, the boundary of the two-dimensional map of the Chinese herbal medicine planting area is [0, 100], then the upper and lower boundaries are 100 and 0, respectively.

[0044] It should be understood that the decision variable value is the two-dimensional coordinate of the i-th hippopotamus individual, i.e., j is the horizontal or vertical coordinate value.

[0045] S103. Determine a dynamic learning factor that decreases linearly with the number of iterations based on the current iteration number.

[0046] Specifically, the dynamic learning factor is: ; In the formula, Let be the dynamic learning factor for the t-th iteration; The maximum learning factor; The minimum learning factor; This represents the maximum number of iterations.

[0047] In a specific embodiment of the present invention, the maximum learning factor and the minimum learning factor are 1.5 and 0.3, respectively, and the maximum number of iterations is 180.

[0048] S104. Based on the current best hippo, update the position of the hippo that meets the fitness value requirement to obtain the first updated position.

[0049] S105. Randomly generate predators representing obstacles, and update the hippopotamus positions based on the comparison results of the fitness values ​​of each hippopotamus and the predators corresponding to the first update position to obtain the second update position.

[0050] S106. Generate new candidate positions within the neighborhood of the second update position. The candidate position with the higher fitness value than the second update position is taken as the third update position. The neighborhood decreases as the number of iterations increases.

[0051] S107. Based on the fitness value, the hippos are divided into foraging hippos and following hippos. The foraging hippos are controlled to learn towards the current best hippo with the dynamic learning factor as the learning step size coefficient. The flight step size of the foraging hippo is added as a random perturbation term to the orientation learning to update the position of the foraging hippo. The following hippos are controlled to randomly select learning objects from the foraging hippos for differential learning to update the position of the following hippos, thus obtaining the fourth updated position.

[0052] S108. Select the hippopotamus individual with the highest fitness value in the fourth update position as the target optimal hippopotamus.

[0053] S109. Determine if the number of iterations has reached the maximum number of iterations. If so, use the path point corresponding to the target optimal hippo as the planned path.

[0054] It should be noted that: if not, the target optimal hippo will be taken as the current optimal hippo, and steps S104-S109 will be repeated until the maximum number of iterations is reached.

[0055] Compared with existing technologies, the path planning method for the herb-harvesting robot provided in this invention determines a dynamic learning factor that decreases linearly with the number of iterations based on the current iteration number, and updates the foraging hippo's position based on the dynamic learning factor. This allows for maintaining a larger dynamic learning factor (i.e., a larger learning step size) in the early stages of iteration, enhancing global exploration capabilities and enabling thorough exploration of large planting areas within a limited number of iterations. This effectively avoids missing optimal passage areas and overcomes the problems of excessive robot travel distance, long operation time, and increased energy consumption caused by limited search range in the early stages of existing technologies. It significantly improves the path planning efficiency of the weeding robot in large-area herb planting scenarios. In the later stages of iteration, a smaller dynamic learning factor (i.e., a smaller learning step size) is maintained, enhancing local search capabilities, improving convergence accuracy, and thus increasing the reliability of the planned path. In other words, the dynamic learning factor setting can better adapt to the optimization needs of different stages, balancing early planning efficiency and later planning accuracy.

[0056] Furthermore, in this embodiment of the invention, the foraging Levy flight step length is superimposed as a random perturbation term in the update of the foraging hippo's location. Utilizing the large-scale jump characteristics of the Levy flight heavy-tailed distribution, the algorithm retains the ability to escape local optima in the later stages of iteration, thus approaching a high-quality solution more quickly. Simultaneously, by randomly selecting foraging hippos for differentiated learning while following the hippo, ineffective searches are reduced while maintaining population diversity, achieving rapid convergence and high-quality path output. Furthermore, the combination of the Levy flight mechanism and the dynamic learning factor further increases the randomness and jumpiness of the search, helping to escape local optima and maintain high-precision seeking in later stages under complex fault environments. This enables the weeding robot to continuously search for better paths in complex environments with dense obstacles or narrow passages, avoiding the planning of excessive detours and repeated backtracking, or being forced to stop and wait due to the inability to generate feasible paths in time, thus ensuring the continuity and automation level of the weeding operation.

[0057] Existing path planning methods for Chinese herbal medicine weeding robots only optimize obstacle avoidance and shortest paths, without considering the physical protection needs of the herbal plants. This can lead to planned paths that may come close to or even cross the areas where the plants are located, causing the robot to easily crush or collide with the stems and leaves of the herbs during its movement. At the same time, when candidate path points fall into impassable areas, existing methods usually directly assign large penalty values ​​and continue to participate in the iteration. A large number of infeasible individuals consume computational resources, resulting in low search efficiency and affecting the robot's response speed within the limited working window.

[0058] To solve the above-mentioned technical problems, in some embodiments of the present invention, the two-dimensional map of the Chinese herbal medicine planting area includes an operation corridor area and a crop buffer protection area. The operation corridor area is an area where weeding robots are allowed to pass, and the crop buffer protection area is an area where weeding robots are prohibited from passing. When a path point of a candidate or planned path falls into the crop protection buffer zone, the path point will be forcibly adjusted to the operational corridor area.

[0059] Specifically, forced adjustment methods include, but are not limited to: projecting, translating, or adjusting path points to the interior or boundary of the work corridor area.

[0060] The obstacle zone refers to a physically impassable area where a robot entering will experience an actual collision; this is a hard physical constraint. The crop buffer zone, on the other hand, is a physically passable area that is designated as a prohibited zone to protect medicinal plants from mechanical damage; this is a soft agronomic constraint. The crop buffer zone itself is not an impassable physical obstacle, but crossing it will cause crushing or scratching damage to the medicinal plants.

[0061] This invention reduces the risk of mechanical damage to Chinese herbal medicine plants by setting a path point to be forcibly adjusted to the operation corridor when it falls into the crop buffer protection area, thus instantly repairing infeasible solutions into feasible solutions. At the same time, it reduces the waste of computing resources due to invalid searches, significantly improves the proportion of feasible solutions and search efficiency of path planning, and makes the planning results more in line with the actual needs of refined operations of Chinese herbal medicine.

[0062] In some embodiments of the present invention, the fitness function is:

[0063]

[0064]

[0065] In the formula, For path x fitness value; This represents the path length. This represents the number of intersections between the path and obstacles. For smoothness penalty; , , These are the weights for path length, number of intersections, and smoothness penalty, respectively. , Let x be the two-dimensional coordinates of the (s+1)th path point in path x; , Let x be the two-dimensional coordinates of the s-th path point in path x; This represents the total number of path points in the path. Let be the corner between two adjacent road segments in path s.

[0066] It should be understood that when the dimensions of the terms in the fitness function are inconsistent, the terms can be normalized before weighting.

[0067] In a specific embodiment of the present invention, the process for determining whether the path intersects with an obstacle is as follows: Let the rectangular obstacle be [xmin, ymin, xmax, ymax], with its four vertices forming four boundary segments. Determine whether the endpoints p1=(x1, y1) and p2=(x2, y2) of the path segment are inside the rectangle. If either endpoint is inside the rectangle, the path segment intersects with the rectangular obstacle. If both endpoints are outside the rectangle, determine whether the path segment intersects with any of the four boundary segments of the rectangle. If the path segment intersects with any boundary segment, the path segment intersects with the rectangular obstacle; otherwise, it does not intersect. Traverse all obstacles and accumulate the number of collisions, using the number of collisions as the number of intersections.

[0068] This invention constructs a fitness function that includes a path length term, a collision penalty term, and a smoothness penalty term. The collision penalty term ensures that the path prioritizes avoiding physical obstacles, fundamentally guaranteeing the driving safety of the weeding robot. The path length term guides the algorithm to converge to shorter paths, reducing ineffective travel distances and energy consumption, and improving the efficiency of large-area operations. The smoothness penalty term suppresses sharp turns between adjacent path segments, making the planned path more consistent with the robot's kinematic constraints, avoiding wheel slippage, deviation from the inter-row path, or actuator vibration caused by frequent turns, thereby improving the actual executability of the path and the stability of the weeding operation.

[0069] In a preferred embodiment of the present invention, the fitness function is:

[0070]

[0071]

[0072] In the formula, This is a penalty item for crop damage risk; This is an energy consumption penalty item; , The weights of crop damage risk penalty and energy consumption penalty; the preset safety distance; The path point s is the boundary of the crop buffer zone. The distance.

[0073] Similarly, when the dimensions of the newly added terms in the fitness function are inconsistent with those of the terms in the aforementioned embodiments, the terms can be normalized before being weighted.

[0074] This invention further incorporates crop damage risk penalty and energy consumption penalty into the fitness function. The crop damage risk penalty is quantified by the distance between the path point and the boundary of the crop buffer protection area; the closer the path is to the plant protection area, the greater the penalty value. This embeds plant protection constraints into the fitness evaluation in the form of continuous costs, guiding the algorithm to actively move away from the vicinity of medicinal plants while meeting obstacle avoidance and path length requirements, effectively reducing the risk of the robot crushing or scratching the stems and leaves of medicinal plants during its movement. The energy consumption penalty is quantified by the absolute value of the turning angle of adjacent path segments; the higher the path's tortuosity, the greater the penalty value. This suppresses repeated backtracking and unnecessary sharp turns, reducing energy consumption caused by frequent acceleration and deceleration of the drive motor and excessive movement of the steering mechanism, and extending the robot's endurance after a single charge. These two additional penalties, along with the path length, collision, and smoothness penalties, work synergistically to expand the optimization objective from "shortest and obstacle avoidance" to a comprehensive objective of "safety, smoothness, low damage, and low energy consumption," thereby ensuring that the planned path takes into account both plant protection and energy economy while guaranteeing safety.

[0075] In some embodiments of the present invention, step S104 includes: Hippos were sorted by fitness value, and the top 50% of hippos by fitness value were selected as the first target individuals. If the primary target individual is a male hippopotamus, the first candidate position for the male hippopotamus will be updated. for: ; If the first target individual is a female hippopotamus or a juvenile hippopotamus, the temperature parameter is calculated based on the current iteration number, and the temperature parameter decreases exponentially with the increase of the iteration number. When the temperature parameter exceeds the temperature threshold, the second candidate update position for female or juvenile hippos... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is greater than the random number threshold, the second candidate update position is... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is less than or equal to the random number threshold, the second candidate update position is... for: ; In the formula, The current location of the first target individual; For random processing; This is the current optimal position for the hippopotamus; , The parameters are random, I1 and I2 ∈ [1,2]; The average position of the first target individual in the group; This is the first behavioral pattern; This is the second behavioral pattern; , These are the upper and lower limits of the search space; When the fitness of the first candidate update position or the second candidate update position is greater than the fitness value corresponding to the current position of the first target individual, the first candidate update position or the second candidate update position is used as the first update position. When the fitness of the first candidate update position or the second candidate update position is less than or equal to the fitness value corresponding to the current position of the first target individual, the current position of the first target individual is used as the first update position.

[0076] It should be noted that the first and second behavior patterns are randomly selected from a pre-built array of behavior patterns. This array includes five patterns: ; ; ; ; ; In the formula, , , , , These are five behavioral patterns; , For random parameters, , ∈[1,2] ; It is a binary random vector containing two elements, each of which takes the value 0 or 1; , To select either the first or second element; It is the negation operator; To generate a random vector with 1 row and 1dm columns.

[0077] In a specific embodiment of the present invention, the temperature parameter is: T=exp(-t / T max ) In the formula, T is the temperature parameter.

[0078] The temperature threshold and the random number threshold can be set or adjusted according to the actual application scenario. In a specific embodiment of the present invention, the temperature threshold is 0.6 and the random number threshold is 0.5.

[0079] In some embodiments of the present invention, step S105 includes: Randomly generate predator locations within the search space and calculate the fitness value of each predator location; Hippos were sorted by fitness value, and the bottom 50% of hippos by fitness value were selected as the second target individuals. Calculate the Euclidean distance between the current position of the second target individual and the position of the predator, and generate the defensive Levi flight stride. If the fitness value of the second target individual is greater than that of the predator, the second update position is: ; If the fitness value of the second target individual is less than or equal to the fitness value of the predator, the second update position is: ; In the formula, This is the second update position; To defend against Levi's flight stride; This represents the position of the 0th predator. , , , For random parameters, b∈[2,4], c∈[1,1.5], d∈[2,3], l∈[-2π,2π] ; Let be the Euclidean distance between the current position of the second target individual and the position of the predator.

[0080] In a specific embodiment of the present invention, the Euclidean distance between the current position of the second target individual and the position of the predator is... for: ; In the formula, The total number of predators; The location of the second target individual.

[0081] In a specific embodiment of the present invention, the defensive Levi flight step length is: RL=0.05×levy(SearchAgents, dimension, 1.5); in, Let i be the i-th element in RL, where i is the index of the current hippo individual; SearchAgents is the population size; and dimension is the question dimension, which is twice the number of path points.

[0082] The specific formula for Levi's flight is existing technology and will not be elaborated here.

[0083] In some embodiments of the present invention, step S106 includes: Calculate the lower and upper bounds of the local search range based on the current iteration number; both the lower and upper bounds decrease as the iteration number increases. Randomly select a direction vector, and determine a new candidate position based on the direction vector, upper bound, lower bound, and second update position. for: ; In the formula, This is the second update position; For random processing; The upper boundary; The lower bound; It is the direction vector; If the fitness value of the new candidate position is greater than the fitness value of the second updated position, then the new candidate position is used as the third updated position; if the fitness value of the new candidate position is less than or equal to the fitness value of the second updated position, then the second updated position is used as the third updated position.

[0084] In a specific embodiment of the present invention, the upper boundary and the lower boundary are respectively: ; .

[0085] The direction vector is: D∈{2×rand(1,dimension)-1, rand, randn}.

[0086] In the formula, rand It is a uniform random distribution; randn It follows a normal random distribution.

[0087] In some embodiments of the present invention, the foraging hippo is the hippo individual corresponding to the third update position with a fitness value in the top 50%, and the following hippo is the hippo individual corresponding to the third update position with a fitness value in the bottom 50%. Hippopotamus foraging location for: ; Follow the hippo's location for:

[0088] In the formula, This is the third update position; It is a dynamic learning factor; , is a random vector; represents the current optimal position of the hippo. Levi's flight stride length in search of food; This is to retrieve the elements of all columns in the random_forager row of the X matrix, which represents the current position of a randomly selected foraging hippo.

[0089] In a specific embodiment of the present invention = (1, dimension, lambda) × beta; In the formula, lambda is the Lévy distribution parameter; beta is the Lévy flight step size factor. Both can be set or adjusted according to the actual application scenario or requirements, and no specific limitations are made here.

[0090] It should be noted that after obtaining the first updated position in step S104, the second updated position in step S105, the third updated position in step S106, and the fourth updated position in step S107, boundary processing needs to be performed on the first, second, third, and fourth updated positions to ensure that the coordinates of all updated path points are within the traversable search space defined by the map boundary. This avoids invalid path points that exceed the map range due to position update calculations and ensures that each candidate path is physically executable.

[0091] Specifically, the boundary processing is as follows: for each coordinate value in the position vector of any individual hippopotamus, if the coordinate value is greater than the upper limit of the map boundary, then the coordinate value is assigned as the upper limit value of the map boundary; if the coordinate value is less than the lower limit of the map boundary, then the coordinate value is assigned as the lower limit value of the map boundary; if the coordinate value is between the upper and lower limits of the map boundary, then the coordinate value remains unchanged.

[0092] In real-world applications, the environment for planting Chinese medicinal herbs frequently undergoes dynamic changes (such as temporary entry of agricultural machinery, temporary storage of farm implements, movement of irrigation facilities, and entry of workers into the field). Existing path planning methods typically employ a global replanning approach to address these changes. This means that whenever an environmental change is detected, the entire optimization process is re-executed from scratch. This results in high computational load and long response times. Weeding robots must wait in place for the global path to be regenerated before they can continue working, severely impacting the continuity of operations and real-time response capabilities. To solve the above-mentioned technical problems, in some embodiments of the present invention, such as Figure 2 As shown, the path planning method for the herbal weeding robot also includes: S201. When a new obstacle is detected, the obstacle's position moves, or the passage area changes, a local planning window is captured centered on the current position of the weeding robot.

[0093] The local planning window is a window within a preset range from the current position. The preset range can be adaptively set or adjusted according to the size of obstacles, the robot platform's movement speed and turning ability, and the complexity of the local map environment; no specific limitation is made here.

[0094] S202. Based on the local planning window, determine the affected road segments in the planning path, and perform position update operations to obtain the second, third, and fourth update positions for the affected road segments to obtain the locally updated path.

[0095] The process for determining the affected road segment is as follows: traverse each road segment in the planned path and calculate the spatial relationship between each road segment and the local planning window; if a road segment enters the local planning window, intersects with the boundary of the local planning window, or the distance between the road segment and the local planning window is less than a preset safety threshold, then the road segment is marked as an affected road segment.

[0096] S203. Combine the unaffected road segments in the local update path and the planned path to obtain the global update path.

[0097] This invention establishes a dynamic local replanning mechanism. When a new obstacle is detected, the obstacle's position changes, or the passable area changes, a local planning window is extracted centered on the robot's current position. The affected path segments are selected from the global path for local re-optimization, while the unaffected segments remain unchanged and are directly spliced ​​with the updated local path. This allows the robot to quickly obtain an updated executable path without waiting for the complete global path to be regenerated, significantly reducing computational overhead and response latency when the environment changes. It effectively avoids situations where the robot has to wait in place for a long time or be forced to stop and interrupt operations due to the temporary appearance of obstacles. This significantly improves the continuity of operation, real-time adaptability, and overall operational efficiency of the weeding robot in dynamic farmland environments.

[0098] To verify the effectiveness of the method proposed in this embodiment of the invention, the method in this embodiment of the invention, hereinafter referred to as MAE-HO, is compared with the conventional Hippo Optimization Algorithm (HO) and Whale Optimization Algorithm (WOA). The experimental results are shown in Table 1 and below. Figure 3-5 As shown in Table 2, the experimental results under complex maps are presented in Table 2 and... Figure 6-8 As shown in the diagram. The simple map represents a map with fewer obstacles, while the complex map represents a map with more obstacles. The black boxes in the map represent obstacles, the circular black dots represent path planning points, and the solid black lines represent the planned paths.

[0099] Table 1 shows the experimental results of each algorithm in simple graph form.

[0100] Table 2 Experimental results of various algorithms for complex maps

[0101] The results in Tables 1 and 2 show that, in environments of varying complexity and scale, MAE-HO demonstrates superior overall performance in terms of path length, stability, adaptability to complex obstacle environments, and feasibility of practical operations, rather than achieving improvements in only a single metric. Therefore, the algorithm proposed in this invention is more suitable for agricultural robot path planning tasks that require high levels of safety, smoothness, and crop protection.

[0102] Furthermore, by Figure 3-5 and Figure 6-8 It can be seen that the algorithm proposed in this embodiment of the invention has a faster convergence speed and a more reasonable planned path compared with various existing algorithms, which further verifies the effectiveness and superiority of the present invention.

[0103] In summary, the path planning method for the herbal weeding robot provided in this invention has the following beneficial effects: 1. Ensuring dynamic balance between exploration and development capabilities: By introducing a dynamic learning factor, this invention achieves adaptive adjustment of the algorithm's exploration and development capabilities during iteration. In the early stages of iteration, the dynamic learning factor is larger, and the learning step size of individual hippos towards the global optimum is larger, enhancing global exploration capabilities and avoiding premature convergence to local optima. In the later stages of iteration, the dynamic learning factor is smaller, the learning step size decreases, enhancing local development capabilities and improving convergence accuracy. This dynamic adjustment mechanism enables the algorithm to better adapt to the optimization needs at different stages. 2. Improving path planning efficiency: This invention adopts an elite hierarchical strategy, dividing the population into foraging hippos (the top 50% of elite individuals) and following hippos (the bottom 50% of individuals). Foraging hippos directly learn from the global optimum and are superimposed with Lévy perturbations, enabling them to approach high-quality solutions faster. Following hippos learn from foraging hippos, which can reduce ineffective searches while maintaining population diversity. This hierarchical learning mechanism is the core support for this invention to achieve rapid convergence and high-quality path output. 3. Enhanced Global Optimality: This invention combines the Levy flight mechanism and dynamic learning factors, introducing levy_step in the position update during the foraging phase. This increases the randomness and leaps in the search, especially in complex obstacle environments, helping to escape local optima and maintain high-precision development in later stages, thus obtaining a more competitive globally optimal path. 4. Improved Algorithm Stability: This invention uses a linear decreasing strategy for the dynamic learning factor to make the algorithm's search behavior more stable, avoiding performance fluctuations caused by fixed parameters. The standard deviation results from 30 independent runs in experiments show that the improved algorithm's stability is superior to the original Hippo algorithm and other comparative algorithms, maintaining consistent optimization performance across different runs. 5. Improved Adaptability to Complex Environments: The environment for planting Chinese medicinal herbs is often complex, potentially containing irregular ridges, obstacles, and areas with different shapes and distributions of herbs. This invention, through a four-stage position update strategy and collision detection mechanism, can flexibly adjust the search strategy according to the specific environmental conditions, adapting to various complex terrains and obstacle distributions. This allows for the planning of a reasonable travel path for the weeding robot, ensuring that the robot covers the area requiring weeding as comprehensively as possible without colliding with obstacles. 6. Reduced Energy Costs: By optimizing path planning, this invention can find shorter paths, reducing the robot's ineffective travel distance and repetitive work areas during weeding, thus reducing energy consumption and wear, extending the robot's lifespan, and consequently lowering the cost of weeding medicinal herbs. Furthermore, efficient path planning means that weeding can be completed in a shorter time, reducing manual intervention and time costs, and improving overall production efficiency. 7. Easy to Implement and Expand: The algorithm structure of this invention is clear, and parameter settings are simple. Only a few parameters need to be adjusted to adapt to different application scenarios. The algorithm is implemented using MATLAB, with a high degree of code modularity, making it easy to understand and maintain.8. Enhanced Crop Protection Capabilities: By introducing operational corridors and crop protection buffer zones, this invention not only focuses on path length and obstacle avoidance safety but also considers the protection needs of medicinal plants, effectively reducing the risk of mechanical damage caused by robots driving close to plants or accidentally entering planting areas. 9. Improved Path Feasibility and Optimization Efficiency: By setting a path point feasibility repair mechanism, when candidate path points fall into obstacle areas or crop protection buffer zones, they can be quickly adjusted back to passable areas, reducing the proportion of infeasible individuals, minimizing invalid iterations, and improving search efficiency. 10. Enhanced Dynamic Environment Adaptability: By setting a local replanning trigger mechanism, when new obstacles appear in the operational environment or local passage conditions change, only the affected path segments can be quickly re-optimized, reducing the computational overhead of global replanning and enhancing the system's real-time adaptability in actual farmland environments.

[0104] On the other hand, embodiments of the present invention also provide a path planning system for a herbal medicine weeding robot, such as... Figure 9 As shown, the path planning system 900 of the Chinese herbal medicine weeding robot includes: a processor 901 and a memory 902. Figure 9 Only some components of the path planning system 900 for the Chinese herbal medicine weeding robot are shown. However, it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0105] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the path planning method of the herbal weeding robot in this invention.

[0106] In some embodiments, the memory 902 may be an internal storage unit of the path planning system 900 of the herbal weeding robot, such as a hard disk or memory of the herbal weeding robot path planning system 900. In other embodiments, the memory 902 may also be an external storage device of the herbal weeding robot path planning system 900, such as a pluggable hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on the herbal weeding robot path planning system 900.

[0107] In some embodiments of the present invention, when the processor 901 executes the path planning program for the herbal medicine weeding robot in the memory 902, the following steps can be implemented: Obtain obstacle information and the starting and ending points of the weeding robot from a two-dimensional map of the Chinese herbal medicine planting area; The weeding path of the weeding robot is initialized, generating multiple initial hippo positions representing candidate paths from the start point to the end point. The fitness value of each initial hippo position is calculated based on the fitness function, and the current optimal hippo is determined based on the fitness value. The dynamic learning factor is determined based on the current iteration number and decreases linearly with the increase of the iteration number. Based on the current best hippo, the positions of hippos that meet the fitness value requirements are updated to obtain the first updated position; Randomly generate predators representing obstacles, and update the hippo's position based on the comparison results of the fitness values ​​of each hippo and the predator corresponding to the first update position to obtain the second update position; New candidate positions are generated within the neighborhood of the second update position. The candidate position with the higher fitness value than the second update position is taken as the third update position. The neighborhood decreases as the number of iterations increases. Based on fitness values, hippos are divided into foraging hippos and following hippos. Foraging hippos are controlled to learn towards the current best hippo with a dynamic learning factor as the learning step size coefficient. The flight step size of foraging hippos is added as a random perturbation term to the orientation learning to update the position of foraging hippos. Following hippos are controlled to randomly select learning objects from foraging hippos for differential learning to update the position of following hippos, resulting in the fourth updated position. The hippopotamus with the highest fitness value in the fourth update position is selected as the target optimal hippopotamus. Determine if the number of iterations has reached the maximum number of iterations. If so, use the path point corresponding to the optimal hippo as the planned path.

[0108] It should be understood that when the processor 901 executes the path planning program for the herbal weeding robot in the memory 902, in addition to the functions mentioned above, it can also perform other functions, as detailed in the description of the corresponding method embodiments above.

[0109] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.

[0110] The path planning method and system for a Chinese herbal medicine weeding robot provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of ​​the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of ​​the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A path planning method for a Chinese herbal medicine weeding robot, characterized in that, include: Obtain obstacle information and the starting and ending points of the weeding robot from a two-dimensional map of the Chinese herbal medicine planting area; The weeding path of the weeding robot is initialized, generating multiple initial hippo positions representing candidate paths from the starting point to the ending point. The fitness value of each initial hippo position is calculated based on the fitness function, and the current optimal hippo is determined based on the fitness value. The dynamic learning factor is determined based on the current iteration number and decreases linearly with the increase of the iteration number. Based on the current optimal hippopotamus, the positions of hippos that meet the fitness value requirements are updated to obtain the first updated position; Randomly generate predators representing obstacles, and update the hippo's position based on the comparison results of the fitness values ​​of each hippo and the predator corresponding to the first updated position to obtain the second updated position; A new candidate position is generated within the neighborhood of the second update position, and the candidate position with the higher fitness value than the second update position is taken as the third update position. The neighborhood decreases as the number of iterations increases. Based on fitness values, hippos are divided into foraging hippos and following hippos. The foraging hippos are controlled to learn towards the current best hippo using the dynamic learning factor as the learning step size coefficient. The foraging Levi flight step size is added as a random perturbation term to the directional learning to update the position of the foraging hippo. The following hippos are controlled to randomly select learning objects from the foraging hippos for differential learning to update the position of the following hippos, resulting in the fourth updated position. The hippopotamus with the highest fitness value in the fourth update position is selected as the target optimal hippopotamus. Determine whether the number of iterations has reached the maximum number of iterations. If so, use the path point corresponding to the target optimal hippo as the planned path.

2. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, The two-dimensional map of the Chinese herbal medicine planting area includes an operation corridor area and a crop buffer protection area. The operation corridor area is the area where weeding robots are allowed to pass, and the crop buffer protection area is the area where weeding robots are prohibited from passing. When a path point of the candidate path or the planned path falls into the crop protection buffer zone, the path point will be forcibly adjusted to the operation corridor area.

3. The path planning method for the herbal medicine weeding robot according to claim 2, characterized in that, The fitness function is: In the formula, For path x fitness value; This represents the path length. This represents the number of intersections between the path and obstacles. For smoothness penalty; , , These are the weights for path length, number of intersections, and smoothness penalty, respectively. , Let x be the two-dimensional coordinates of the (s+1)th path point in path x; , Let x be the two-dimensional coordinates of the s-th path point in path x; This represents the total number of path points in the path. Let be the corner between two adjacent road segments in path s.

4. The path planning method for the herbal medicine weeding robot according to claim 3, characterized in that, The fitness function is: In the formula, This is a penalty item for crop damage risk; This is an energy consumption penalty item; , The weights of the crop damage risk penalty and the energy consumption penalty; To establish a preset safe distance; The path point s is the boundary of the crop buffer zone. The distance.

5. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, The step of updating the position of hippos that meet the fitness value requirement based on the current best hippo to obtain the first updated position includes: Hippos were sorted by fitness value, and the top 50% of hippos by fitness value were selected as the first target individuals. If the first target individual is a male hippopotamus, the first candidate update position of the male hippopotamus is... for: ; If the first target individual is a female hippopotamus or a juvenile hippopotamus, the temperature parameter is calculated based on the current iteration number, and the temperature parameter decreases exponentially with the increase of the iteration number; When the temperature parameter is greater than the temperature threshold, the second candidate update position of the female or juvenile hippopotamus is... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is greater than the random number threshold, the second candidate update position is... for: ; When the temperature parameter is less than or equal to the temperature threshold, and the random number is less than or equal to the random number threshold, the second candidate update position is... for: ; In the formula, The current location of the first target individual; For random processing; This is the current optimal position for the hippopotamus; , The parameters are random, I1 and I2 ∈ [1,2]; The average position of the first target individual in the group; This is the first behavioral pattern; This is the second behavioral pattern; , These are the upper and lower limits of the search space; When the fitness of the first candidate update position or the second candidate update position is greater than the fitness value corresponding to the current position of the first target individual, the first candidate update position or the second candidate update position is used as the first update position. When the fitness of the first candidate update position or the second candidate update position is less than or equal to the fitness value corresponding to the current position of the first target individual, the current position of the first target individual is used as the first update position.

6. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, The predator representing the obstacle is randomly generated. Based on the comparison results of the fitness values ​​of each hippopotamus and the predator corresponding to the first updated position, the hippopotamus's position is updated to obtain the second updated position, including: Predator locations are randomly generated within the search space, and the fitness value of the predator locations is calculated. Hippos were sorted by fitness value, and the bottom 50% of hippos by fitness value were selected as the second target individuals. Calculate the Euclidean distance between the current position of the second target individual and the position of the predator, and generate the defensive Levi flight stride. If the fitness value of the second target individual is greater than the fitness value of the predator, the second update position is: ; If the fitness value of the second target individual is less than or equal to the fitness value of the predator, the second update position is: ; In the formula, This is the second update position; To defend against Levi's flight stride; This represents the position of the 0th predator. , , , For random parameters, b∈[2,4], c∈[1,1.5], d∈[2,3], l∈[-2π,2π] ; The Euclidean distance between the current position of the second target individual and the position of the predator is given.

7. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, The step of generating new candidate positions within the vicinity of the second updated position, and selecting the candidate position with the higher fitness value than the second updated position as the third updated position, includes: The lower and upper bounds of the local search range are calculated based on the current iteration number; both the lower and upper bounds decrease as the iteration number increases. A direction vector is randomly selected, and a new candidate position is determined based on the direction vector, the upper bound, the lower bound, and the second update position. for: ; In the formula, This is the second update position; For random processing; The upper boundary; The lower bound; It is the direction vector; If the fitness value of the new candidate position is greater than the fitness value of the second updated position, then the new candidate position is used as the third updated position; if the fitness value of the new candidate position is less than or equal to the fitness value of the second updated position, then the second updated position is used as the third updated position.

8. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, The foraging hippo refers to the hippo individual corresponding to the third update position with a fitness value in the top 50%, and the following hippo refers to the hippo individual corresponding to the third update position with a fitness value in the bottom 50%. The location of the foraging hippo for: ; The location of the following hippo for: In the formula, This is the third update position; It is a dynamic learning factor; , is a random vector; represents the current optimal position of the hippo. Levi's flight stride length in search of food; This is the current location of a randomly selected foraging hippopotamus.

9. The path planning method for the herbal medicine weeding robot according to claim 1, characterized in that, Also includes: When a new obstacle is detected, the obstacle's position moves, or the passage area changes, a local planning window is captured centered on the current position of the weeding robot. Based on the local planning window, the affected road segments in the planned path are determined, and the location update operations to obtain the second, third, and fourth update positions are performed on the affected road segments to obtain the locally updated path; The unaffected segments of the local update path and the planned path are combined to obtain the global update path.

10. A path planning system for a Chinese herbal medicine weeding robot, characterized in that, include: Memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the path planning method of the herbal weeding robot according to any one of claims 1 to 9, and to generate a planned path to instruct the weeding robot to perform weeding.