An unmanned aerial vehicle path dynamic programming method and system for regional cattle and sheep inventory
By using a dynamic path planning method for UAVs, grid-level vectors of group activity and migration trends are generated through high-altitude observations. This enables rolling cruise and migration compensation deduplication for UAVs, solving the problems of missed and multiple counts in traditional fixed-route inventory, and improving the accuracy and efficiency of cattle and sheep inventory.
Patent Information
- Application Number
- CN202610249301.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-03
- Publication Date
- 2026-05-29
- Estimated Expiration
- 2046-03-03
AI Technical Summary
In large grasslands or semi-open grazing areas, traditional fixed-route inventory methods cannot effectively cope with the rapid migration of cattle and sheep herds, resulting in serious omissions and over-counting, especially when cattle and sheep migrate in large groups and cannot be accurately counted.
The method of UAV path dynamic planning is adopted. By generating grid-level group activity intensity and migration trend vectors through high-altitude observation, dynamic planning priorities and interception target points are generated to realize UAV rolling cruise and low-altitude detection. Combined with migration trend, migration compensation and deduplication are performed to generate accurate cattle and sheep inventory results.
It effectively reduces the accumulation of errors from missed and multiple inventory counts, improves the accuracy and efficiency of cattle and sheep inventory, and enables real-time adjustment of path planning in scenarios of rapid cattle and sheep migration, reducing errors caused by repeated observations.
Smart Images

Figure CN121761911B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of drone inventory technology, and in particular to a method and system for dynamic path planning of drones for regional cattle and sheep inventory. Background Technology
[0002] In large grasslands, pastures, or semi-open grazing areas, cattle and sheep typically move in multiple groups. Influenced by herders, watering points, terrain pathways, and disturbances, different groups of cattle and sheep may migrate on a large scale within a short period, manifesting as "the same group appearing consecutively in multiple spatial locations" or "the group rapidly traversing a local area." In this scenario, if traditional fixed patrol routes are still used for inventory checks, the inventory results are prone to differing significantly from the actual numbers.
[0003] Current inventory methods often employ a fixed-route coverage strategy. This involves generating a route covering the entire area before the mission begins, followed by a drone scanning the entire area at a fixed altitude and speed, detecting and counting cattle and sheep on the image. While this method provides good coverage when the target distribution is stable, it exhibits two typical biases when cattle and sheep migrate rapidly in herds: First, the herd may have migrated to an uncovered area before the drone arrives, resulting in the herd not being captured or only partially captured during the current route cycle, leading to missed inventory counts. Second, the drone may capture images of the same migrating herd at different spatial locations, causing the detection and counting results to be repeatedly superimposed during the aggregation, resulting in multiple inventory counts. Due to the rapid migration speed of the herds, a mismatch arises between the spatial and temporal coverage of the fixed route. This mismatch is amplified during the inventory aggregation stage, leading to significant deviations in the final results.
[0004] On the other hand, while low-altitude drones can obtain clearer images of cattle and sheep, their field of view is relatively narrow. If they continue to "blindly scan" using a fixed cruising method, it will be difficult to track the migration zone within the limited flight time. Instead, they may repeatedly scan areas that have already been emptied by the migration, further reducing the effective inventory ratio. In contrast, high-altitude drones have a wider field of view and can observe the migration pattern of the group on a macro scale. However, due to the greater distance, they often cannot reliably identify the number of individuals and can only provide coarse-grained information on "group activity and migration direction." Without a mechanism to translate the macroscopic situation at high altitude into low-altitude path decisions, it is difficult to effectively suppress missed or multiple inventory checks in migration scenarios.
[0005] Therefore, a counting method for the rapid migration of cattle and sheep herds is needed, which can enable the path planning of UAVs to be updated in a rolling manner according to the migration situation, and enable the counting summary to compensate for and deduplicate repeated observations in combination with the migration trend, thereby reducing the accumulation of errors caused by missed counts and multiple counts. Summary of the Invention
[0006] This invention provides a method and system for dynamic path planning of unmanned aerial vehicles (UAVs) for regional cattle and sheep inventory, aiming to solve at least one of the above-mentioned technical problems.
[0007] To achieve the above objectives, this invention provides a method for dynamic path planning of unmanned aerial vehicles (UAVs) for regional cattle and sheep inventory, the method comprising the following steps:
[0008] Obtain grid data to characterize the spatial discrete structure of the area to be inventoried, so as to form a grid set and the grid center coordinates corresponding to the grid set;
[0009] Acquire high-altitude wide-area observation data from the first UAV. Based on the high-altitude wide-area observation data and grid set, generate a group activity intensity vector to characterize the activity level of cattle and sheep in each grid and a group migration trend vector to characterize the migration direction and migration speed trend of cattle and sheep.
[0010] Based on the group activity intensity and group migration trend vector, combined with the grid confirmation status table, a dynamic programming priority for driving the second UAV's rolling cruise is generated. Based on the group migration trend vector and the grid center coordinates, an interception target point for performing interception cruise is generated.
[0011] Based on dynamic programming priorities and interception target points, combined with the grid confirmation status table, a rolling cruise queue for the second UAV is generated. The rolling cruise queue is updated according to the preset reprogramming trigger conditions to drive the second UAV to acquire a set of low-altitude detection records.
[0012] Based on the low-altitude detection record set and the population migration trend vector, migration compensation deduplication and grid confirmation status table update are performed to output the regional cattle and sheep inventory results.
[0013] Optionally, acquiring grid data to characterize the spatial discrete structure of the area to be inventoried, to form a grid set and the grid center coordinates corresponding to the grid set, specifically including:
[0014] Obtain the boundary information of the area to be inventoried to form the area range, and perform rule discretization operation on the area range according to the preset grid side length to generate a grid set containing multiple grid cells;
[0015] A unique grid identifier is generated for each grid cell in the grid set, and the grid center coordinates corresponding to the grid cell are calculated to establish the association between the grid identifier and the grid center coordinates.
[0016] Optionally, the intensity of group activity is generated, specifically including:
[0017] Acquire high-altitude wide-area observation data of the first UAV at time t and t-Δt, and form the first high-altitude wide-area observation frame at time t and the second high-altitude wide-area observation frame at time t-Δt respectively;
[0018] Perform a grid mapping operation on the first high-altitude wide-area observation frame and the second high-altitude wide-area observation frame according to the grid set to form a first grid observation sub-map and a second grid observation sub-map at time t-Δt for each grid.
[0019] The mean absolute difference operation is performed on the grid observation subgraph of each grid in the grid set to obtain the intermediate value of grid activity intensity, and the intermediate value of grid activity intensity is normalized to obtain the group activity intensity.
[0020] Optionally, a population migration trend vector is generated, specifically including:
[0021] Based on the first grid observation sub-map at time t and the second grid observation sub-map at time t-Δt, a preset number of local block regions are selected within each grid to form a local block set;
[0022] Perform inter-frame displacement calculations on each local block in the local block set to obtain a set of displacement vectors;
[0023] The median aggregation operation is performed on the displacement vector set to obtain the grid displacement vector, and the grid displacement vector is converted into a population migration trend vector based on the time interval Δt.
[0024] Optionally, the steps for generating the interception target point specifically include:
[0025] The magnitude of the migration trend vector is calculated and normalized. Combined with the group activity intensity and the grid confirmation status table, a linear fusion operation is performed to obtain the priority.
[0026] The estimated arrival time of the second UAV to the corresponding grid is determined by obtaining the grid center coordinates. Based on the group activity intensity and the estimated arrival time, a forward update is performed to generate the interception target point.
[0027] Optionally, a rolling cruise queue of the second UAV is generated, specifically including:
[0028] Perform priority sorting and extract the top K grids by priority to form a candidate set;
[0029] A confirmation filtering operation is performed on the candidate set to remove grids that meet preset confirmation conditions, forming a filtered candidate set; wherein, the preset confirmation conditions include: the confirmation flag extracted from the grid confirmation status table is confirmed and the confirmation time falls within a preset time window;
[0030] Obtain the current position of the second UAV, and calculate the distance from the current position to the interception target point for each grid in the filtered candidate set to form a selection score;
[0031] The selection score is used to perform descending sorting to generate a sequence of grids to be visited, and the sequence of grids to be visited and their corresponding interception target points are written into the cruise queue to generate the rolling cruise queue of the second UAV.
[0032] Optionally, the second UAV is driven to acquire a set of low-altitude detection records, specifically including:
[0033] The second UAV is driven to read the target grid identifiers and their corresponding interception target points in the rolling cruise queue, and then execute the cruise actions of the second UAV in sequence.
[0034] Acquire low-altitude observation image data within each target grid and call the preset target detection model to output detection records;
[0035] The detection records are subjected to uniform field encoding to form a detection record set; wherein each detection record includes: detection location, detection timestamp, detection category and detection confidence level;
[0036] The detection record set is mapped to grid identifiers according to the detection location to form a low-altitude detection record set in the form of a grid detection list.
[0037] Optionally, based on the low-altitude detection record set and the population migration trend vector, migration compensation deduplication is performed, specifically including:
[0038] In the set of low-altitude detection records, the time difference Δτ is extracted from two detection records of the same category based on the population migration trend vector, and the reachable radius determined by the migration speed and the time difference is calculated.
[0039] Perform migration compensation extrapolation on the locations of earlier detection records to generate predicted locations;
[0040] The distance between the predicted location and the detection location at a later time is calculated and compared with the direction consistency threshold. When the preset conditions are met, the corresponding detection records are merged and updated to form a deduplication result.
[0041] Optionally, the steps for outputting the cattle and sheep inventory results in the output area include:
[0042] The deduplicated set of detection records is mapped to grid identifiers according to the detection location to form a deduplicated set of detection records in the form of a deduplicated grid detection list;
[0043] For each grid, the count of the detection records of the identified target in the deduplication detection record set is accumulated to obtain the grid target count, and the confidence field in the deduplication detection record set of each grid is averaged to obtain the grid confirmation confidence.
[0044] Write the grid target count, grid confirmation confidence, and confirmation time into the grid confirmation status table, and update the confirmation flag extracted from the grid confirmation status table when the preset confirmation conditions are met.
[0045] The grid confirmation status table is traversed to sum the grid target counts of confirmed grids to output the regional cattle and sheep inventory results, and the unconfirmed grid identifiers are output to perform confirmation filtering and priority adjustment in subsequent replanning cycles.
[0046] Furthermore, to achieve the above objectives, the present invention also provides a drone path dynamic planning system for regional cattle and sheep inventory, comprising:
[0047] A forming unit is used to acquire grid data that characterizes the spatial discrete structure of the area to be inventoried, so as to form a grid set and the grid center coordinates corresponding to the grid set;
[0048] The acquisition unit is used to acquire high-altitude wide-area observation data of the first UAV, and based on the high-altitude wide-area observation data and grid set, to generate a group activity intensity that characterizes the activity level of cattle and sheep in each grid and a group migration trend vector that characterizes the migration direction and migration speed trend of cattle and sheep.
[0049] The execution unit is used to generate dynamic programming priorities for driving the rolling cruise of the second UAV based on the group activity intensity and the group migration trend vector, combined with the grid confirmation status table, and to generate interception target points for performing interception cruise based on the group migration trend vector and the grid center coordinates.
[0050] The update unit is used to generate a rolling cruise queue for the second UAV based on dynamic programming priority, interception target points, and grid confirmation status table, and to update the rolling cruise queue according to preset reprogramming trigger conditions, so as to drive the second UAV to acquire a set of low-altitude detection records.
[0051] The output unit is used to perform migration compensation deduplication and grid confirmation status table update based on the low-altitude detection record set and the population migration trend vector, and output the regional cattle and sheep inventory results.
[0052] The beneficial effects of this invention are as follows: It proposes a dynamic path planning method and system for UAVs used in regional cattle and sheep inventory. By quantifying the macroscopic migration situation provided by the first UAV into grid-level group activity intensity and migration trend, and further rewriting it into dynamic planning priorities and interception target points that can be used for rolling path decisions, the patrol queue of the second UAV can be adjusted in real time with the group migration, reducing the risk of missed inventory caused by tail-chasing patrols. Simultaneously, this invention introduces a migration compensation and deduplication mechanism based on migration trend vectors in the inventory summary stage, enabling the merging of repeated observations of the same migrating group in different grids and at different times, reducing the risk of multiple inventory counts. Therefore, this invention, based on the path dynamic planning mechanism, allows the UAV path planning to be updated rollingly with the migration situation, and enables the count summary to compensate for and deduplicate repeated observations in conjunction with the migration trend, thereby reducing the accumulation of errors caused by missed and multiple inventory counts. Attached Figure Description
[0053] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0054] Figure 2 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0056] This invention provides a method for dynamic path planning of unmanned aerial vehicles (UAVs) for regional cattle and sheep inventory, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the UAV path dynamic planning method for regional cattle and sheep inventory according to an embodiment of the present invention.
[0057] In this embodiment, a method for dynamic path planning of unmanned aerial vehicles (UAVs) for regional cattle and sheep inventory includes the following steps:
[0058] S1: Obtain grid data to characterize the spatial discrete structure of the area to be inventoried, so as to form a grid set and the grid center coordinates corresponding to the grid set.
[0059] It should be noted that this step is used to convert the area to be inventoried into a computable grid set Grid and its center coordinates G(c), which serves as a unified spatial base for subsequent generation of group activity intensity, group migration trend vector, dynamic programming priority, interception target point, and updating the grid confirmation status table.
[0060] Specifically, the boundary information of the area to be inventoried is obtained to form the area range. The area range is discretized according to the preset grid side length to generate a grid set containing multiple grid units. A unique grid identifier is generated for each grid unit in the grid set, and the grid center coordinates corresponding to the grid unit are calculated to establish the association between the grid identifier and the grid center coordinates.
[0061] In this embodiment of the invention, the boundary information of the area to be inventoried is first obtained to form the area range Ω. The boundary information can be composed of a sequence of polygonal boundary points exported by a task planning platform, or it can be manually delineated on an electronic map. Then, the area range Ω is discretized according to a preset grid side length to generate a grid set Grid={c} containing multiple grid units.
[0062] Furthermore, the preset grid side length can be configured according to the scale of the inventory task and the low-altitude field of view coverage capability of the second UAV. For example, when the grassland scale is large and the migration speed of cattle and sheep is fast, the grid side length can be selected as a larger value to reduce the number of grids and improve the planning update speed; when the inventory accuracy requirement is higher or the target density is large, the grid side length can be selected as a smaller value to improve spatial resolution. It should be noted that the grid side length does not affect the basic principle of the method of the present invention and is an optional parameter.
[0063] After mesh generation, a unique mesh identifier c is generated for each mesh cell, which can be achieved using a two-dimensional row and column index (row, col) or a one-dimensional incremental number. The coordinates of its mesh center are then calculated. ,in, Used to generate interception target points and write target locations to the cruise queue.
[0064] Optionally, boundary polygons or corner points can be stored for each grid to determine the spatial extent of the grid observation submap during subsequent grid mapping.
[0065] Furthermore, to ensure consistency in subsequent data writing and reading, this embodiment establishes a data storage structure indexed by the grid identifier 'c'. This structure stores the established grid confirmation status table, as well as the group activity intensity, group migration trend vector, dynamic programming priority, and interception target point generated in subsequent steps. The grid confirmation status table records at least the following fields: confirmation flag, confirmation time, cattle and sheep count within the grid, and confirmation confidence level. In this way, the grid set not only performs spatial discretization but also carries the function of representing the inventory progress status, enabling path dynamic programming to directly utilize the grid confirmation status table in subsequent steps to suppress duplicate scans and reduce the probability of multiple inventory checks.
[0066] S2: Acquire high-altitude wide-area observation data from the first UAV. Based on the high-altitude wide-area observation data and grid set, generate a group activity intensity vector to characterize the activity level of cattle and sheep in each grid and a group migration trend vector to characterize the migration direction and migration speed trend of cattle and sheep.
[0067] Specifically, this step is used to extract grid-level swarm activity intensity and swarm migration trends from the wide-area observations of the first UAV. In this embodiment, the high-altitude UAV does not perform precise counting tasks; its output only includes two types of macroscopic situational data: and This reduces the variety of data and keeps the links simple, enabling subsequent path dynamic planning to iterate quickly with limited computing resources.
[0068] Specifically, the method for generating the intensity of group activity includes: acquiring high-altitude wide-area observation data from a first UAV at times t and t-Δt, forming a first high-altitude wide-area observation frame at time t and a second high-altitude wide-area observation frame at time t-Δt; performing a grid mapping operation on the first high-altitude wide-area observation frame and the second high-altitude wide-area observation frame according to a grid set to form a first grid observation sub-map at time t and a second grid observation sub-map at time t-Δt for each grid; performing a mean absolute difference operation on the grid observation sub-map of each grid in the grid set to obtain an intermediate value of grid activity intensity, and performing a normalization operation on the intermediate value of grid activity intensity to obtain the intensity of group activity.
[0069] In this embodiment of the invention, the first UAV acquires two high-altitude wide-area observation frames at times t and t-Δt, respectively forming the first high-altitude wide-area observation frame. With the second high-altitude wide-area observation frame Subsequently, the observation frames are mapped using a grid set Grid to generate a first grid observation sub-image at time t and a second grid observation sub-image at time t-Δt for each grid. It should be noted that the grid mapping operation can be understood as: locating the image region corresponding to grid c in the high-altitude observation frame and extracting that region to form a sub-image.
[0070] After obtaining the grid observation submap, perform the mean absolute difference operation on each grid c to obtain the median value of the activity intensity. and to Perform normalization operation to obtain the intensity of group activity For example, it can be in the following form:
[0071] ;
[0072] ;
[0073] AvgAbsDiff(·) is used to characterize the overall change intensity within the grid at adjacent time points. In practical applications, given the significant brightness difference between the cattle / sheep herd and the background (grassland, soil, etc.), and the fact that the herd's movement alters the local brightness distribution pattern, the overall change intensity is defined as the result of averaging the difference in brightness channel values of all pixels in each grid c across two adjacent frames. Norm(·) is used to... Mapped to a preset range of 0 to 1. Furthermore, to enhance continuity, Norm(·) can be implemented using global minimum-maximum normalization, quantile clipping normalization, or fixed range normalization, but this invention does not limit the specific implementation.
[0074] Through the above methods It can be used to characterize whether there is significant herd activity or traversal phenomenon within grid c near time t. In scenarios of rapid migration of cattle and sheep herds, the herd will traverse multiple grids in a short period of time, causing the migration zone to have continuous grids. It exhibits a chain-like increase. Therefore, In subsequent steps, it will serve as the data source for hotspot location and migration zone identification.
[0075] The specific steps for generating a population migration trend vector include: selecting a preset number of local block regions within each grid based on the first grid observation sub-map at time t and the second grid observation sub-map at time t-Δt to form a local block set; performing inter-frame displacement calculation on each local block in the local block set to obtain a displacement vector set; performing median aggregation operation on the displacement vector set to obtain a grid displacement vector, and converting the grid displacement vector into a population migration trend vector based on the time interval Δt.
[0076] In this embodiment of the invention, based on the same set of grid observation subgraphs (i.e., the first grid observation subgraph at time t and the second grid observation subgraph at time t-Δt), a preset number of local block regions are selected within each grid to form a local block set B(c). Subsequently, inter-frame displacement calculation is performed on each local block in the local block set to obtain a displacement vector set. .
[0077] In one feasible implementation, the specific calculation of vector displacement adopts the Normalized Cross-Correlation (NCC) block matching method. The specific process is as follows: For each local block, in the first grid observation sub-image at time t, the original center coordinates of the local block are used as the reference, and a preset range (such as 20 pixels in each direction) is expanded to form a search window. By calculating the NCC coefficients (which measure the similarity between blocks, with a value range of [-1, 1], and the closer to 1, the higher the similarity) between the local block and all candidate sub-blocks of the same size in the search window, the candidate sub-block with the highest similarity is located. The difference between the center coordinates of the candidate sub-block and the center coordinates of the original local block is used as the displacement vector of the local block, and the final set of displacement vectors is obtained.
[0078] Subsequently, median aggregation is performed on the set of displacement vectors to obtain the grid displacement vector Δd(c), and the grid displacement vector is converted into a migration trend vector based on the time interval Δt. ,For example:
[0079] ;
[0080] ;
[0081] Through the above methods This is used to characterize the main directional and velocity trends of population migration in the grid around time t. Furthermore, This invention serves a dual purpose: firstly, it generates interception target points, enabling the second UAV to conduct forward interception patrols and reduce missed observations caused by rear-end collisions; secondly, it is used for migration compensation and deduplication, merging repeated cross-grid observations through directional consistency constraints to reduce multiple observations. After completion... and After generation, it is written into the grid state storage structure established in step S1 for subsequent processing.
[0082] S3: Based on the group activity intensity and group migration trend vector, combined with the grid confirmation status table, generate dynamic programming priorities for driving the second UAV's rolling cruise, and generate interception target points for performing interception cruise based on the group migration trend vector and grid center coordinates.
[0083] It should be noted that, based on the generated vectors of group activity intensity and group migration trend, this step introduces the grid confirmation status table established in step S1, which transforms the macro situation into executable path decision parameters: dynamic programming priority and interception target point.
[0084] Specifically, the magnitude of the migration trend vector is calculated and normalized. A linear fusion operation is performed on the vector, which is combined with the group activity intensity and the grid confirmation status table, to obtain the priority. The grid center coordinates are obtained to determine the estimated arrival time of the second UAV to the corresponding grid. Based on the group activity intensity and the estimated arrival time, a forward update is performed to generate the interception target point.
[0085] In this embodiment, the data is first read from the grid state storage structure. and And read the grid confirmation status table. Confirmation mark in Subsequently, on The migration velocity is obtained by performing a modulus calculation. And perform normalization on the velocity quantity to form The purpose of normalization is to make... and They are in comparable dimensions, thus allowing for stable priorities to be formed in the same fusion expression.
[0086] Then based on , and Perform linear fusion operations to obtain priority. ,For example:
[0087] ;
[0088] in, , , This is a preset weighting factor. Optionally, the weighting factor can be configured based on task experience: it can be increased when migration speed has a greater impact on disk leakage. When hotspot positioning is more reliable, it can improve... When strong suppression of repeated access is required, it can improve... It should be noted that the weight configuration does not change the nature of this invention. and The basic principles of dynamic programming.
[0089] Furthermore, to achieve interception-style cruise, this embodiment is based on the grid center coordinates. Migration trend vector Compared with the estimated arrival time Generate interception target points :
[0090] ;
[0091] in, It can be estimated from the current position and flight speed of the second UAV, for example, based on the current position to... Alternatively, it can be obtained by dividing the distance to the candidate target point by the average speed. This is achieved through... along The direction is shifted forward for updates, changing the second drone's cruise target from the "current center of the hotspot" to the "location the hotspot may reach in the future." In scenarios involving rapid migration of cattle and sheep, this forward update significantly reduces the probability of "the target having already left when arriving," thereby mitigating the risk of missing targets.
[0092] After completion and After generation, it is written into the grid state storage structure for use in the subsequent step S4 to generate the rolling cruise queue.
[0093] S4: Based on dynamic programming priority and interception target point, combined with the grid confirmation status table, generate a rolling cruise queue for the second UAV, and update the rolling cruise queue according to the preset reprogramming trigger condition to drive the second UAV to acquire the low-altitude detection record set.
[0094] It should be noted that this step is used to generate the result based on step S3. and and the grid confirmation status table established in step S1 and updated in step S5. This generates a rolling cruise queue to drive the second UAV to acquire a set of low-altitude detection records.
[0095] The update of the cruise queue specifically includes: performing priority sorting and extracting the top K grids to form a candidate set; performing a confirmation filtering operation on the candidate set to remove grids that meet preset confirmation conditions, forming a filtered candidate set; wherein, the preset confirmation conditions include: the confirmation flag extracted from the grid confirmation status table is confirmed and the confirmation time falls within a preset time window; obtaining the current position of the second UAV and calculating the distance from the current position to the interception target point for each grid in the filtered candidate set to form a selection score; performing descending sorting based on the selection score to generate a sequence of grids to be visited, and writing the sequence of grids to be visited and their corresponding interception target points into the cruise queue to generate the rolling cruise queue of the second UAV.
[0096] In this embodiment of the invention, the state is first read from the grid state storage structure. and and read Subsequently based on All grids are sorted, and the top K grids by priority are selected to form a candidate set. The value of K can be configured based on computational resources and task urgency: a larger K results in wider coverage, while a smaller K leads to faster updates and a more focused approach on the migration zone. It should be noted that the value of K is an implementation parameter and does not affect the rolling planning principle of this invention.
[0097] A confirmation filtering operation is performed within the candidate set to remove grids that meet preset confirmation conditions, thus forming a filtered candidate set. The preset confirmation conditions include at least: This ensures that the confirmed grid has been accessed and the confirmation time falls within a preset time window. By setting a confirmation time window, it is possible to prevent a second UAV from repeatedly visiting a confirmed grid within a short period of time, thereby reducing the number of grids accessed due to repeated observations. Simultaneously, the confirmation time window also prevents... Excessive suppression of re-examination when there is no update for a long period of time is an optional implementation parameter.
[0098] After obtaining the filter candidate set, obtain the current position of the second UAV. And calculate the current position to the interception target point for each grid c in the set. Distance to form selection score ,For example:
[0099] ;
[0100] Here, ε is a preset small constant used to avoid the denominator being zero; Dist(·) is the distance calculation operator. Through this ratio structure, grids with high priority and close distance will be selected first, thereby reaching the key area faster in migration scenarios and improving the interception probability.
[0101] Subsequently based on Perform a descending sort to generate a sequence of grid cells to be accessed, and then combine the sequence of grid cells to be accessed with their corresponding grid cells. Write to the cruise queue. In this embodiment, the cruise queue can be implemented as a sequential queue structure, and each queue element includes at least: target grid identifier c, target point coordinates. And task flags used to record execution status (not executed / in execution / completed).
[0102] Furthermore, in this embodiment, the cruise queue is updated according to preset replanning trigger conditions. These replanning trigger conditions may include: the second UAV completing at least one grid task in the queue, reaching a preset replanning cycle, or the output of the first UAV... and Significant changes have occurred. Through a rolling update mechanism, the second drone's cruise path is no longer fixed, but continuously follows... and The changes in migration patterns reflected can reduce the risk of missed shipments due to delayed routes when cattle and sheep migrate rapidly.
[0103] The acquisition of the low-altitude detection record set specifically includes: driving the second UAV to read the target grid identifiers and their corresponding interception target points in the rolling cruise queue, and sequentially executing the cruise actions of the second UAV; acquiring low-altitude observation image data within each target grid, and calling a preset target detection model to output detection records; performing unified field encoding on the detection records to form a detection record set; wherein, each detection record includes: detection location, detection timestamp, detection category, and detection confidence; mapping the detection record set to grid identifiers according to the detection location to form a low-altitude detection record set in the form of a grid detection list.
[0104] In this embodiment of the invention, the second UAV reads the rolling cruise queue to obtain the target grid identifier c and its corresponding interception target point. The system acquires low-altitude observation image data within the target grid. Then, a preset target detection model is invoked to output detection records. It should be noted that this embodiment does not limit the specific network structure and training method of the detection model; any detection model capable of identifying cattle and sheep targets should be covered within the scope defined by this invention.
[0105] A unified field encoding is applied to the detection records to form a detection record set. Each detection record contains at least: detection location, detection timestamp, detection category, and detection confidence. The detection location can be obtained by UAV navigation and positioning and image-to-ground mapping. The detection timestamp is used for subsequent time difference calculation. The detection confidence is used for subsequent grid confirmation confidence calculation.
[0106] Furthermore, the set of detection records is mapped to the grid identifier c according to the detection location to form a grid detection list D(c), so that matching can be performed according to the grid and time relationship during subsequent migration compensation and deduplication.
[0107] S5: Based on the low-altitude detection record set and the population migration trend vector, perform migration compensation deduplication and grid confirmation status table update, and output the regional cattle and sheep inventory results.
[0108] It should be noted that this step is used to generate a deduplicated set of detection records and an updated grid confirmation status table based on the low-altitude detection record set generated in step S4 and the population migration trend vector generated in step S2, thereby completing the final inventory evidence acquisition and multi-disk suppression and outputting the inventory results.
[0109] The execution of migration compensation deduplication specifically includes: in the low-altitude detection record set, extracting the time difference Δτ from two detection records of the same category based on the group migration trend vector and calculating the reachable radius determined by the migration speed and the time difference; performing migration compensation extrapolation on the position of the detection record at an earlier time to generate a predicted position; performing distance calculation between the predicted position and the detection position at a later time and comparing it with the direction consistency threshold; and performing a merging update on the corresponding detection record when the preset conditions are met to form a deduplication result.
[0110] In this embodiment of the invention, the state generated in step S2 is read from the grid state storage structure. Furthermore, migration compensation is performed to remove duplicates from the same category of detection records in the grid detection list D(c). Specifically, the time difference Δτ is extracted from two detection records, and the reachable radius determined by the migration velocity and the time difference is calculated. :
[0111] ;
[0112] in, It serves as the basic tolerance radius, used to cover positioning errors and detection center jitter; Δτ represents the magnitude of the migration trend vector; Δτ represents the difference in detection timestamps. This reachable radius reflects the possible displacement scale of the migrating group within the time difference Δτ, allowing the deduplication radius to adaptively adjust with the migration speed, thereby reducing the failure of fixed-radius deduplication in fast migration scenarios and the resulting multi-disk issues.
[0113] Furthermore, for earlier detection locations Perform migration compensation extrapolation to generate predicted locations :
[0114] Subsequently, the predicted location was determined. Location detected at a later time Perform distance calculation and orientation consistency threshold The comparison shows that a merge update is performed on the corresponding detection records when the following conditions are met:
[0115] ;
[0116] and Not greater than By extrapolating and predicting a combination of position and orientation consistency thresholds, the deduplication process considers not only whether it is possible to move to that position, but also whether it moves to that position along the migration direction. This reduces the risk of false merging when the migration speed is fast and the spatial range is large. Furthermore, for repeated observations of the same migration group across grids and across time, a count contribution update is performed to retain only one instance, forming a deduplicated set of detection records.
[0117] The output of the regional cattle and sheep inventory results specifically includes: mapping the deduplicated detection record set to grid identifiers according to the detection location to form a deduplicated detection record set in the form of a deduplicated grid detection list; performing count accumulation on the detection records of the identified target in the deduplicated detection record set for each grid to obtain the grid target count, and performing an average operation on the confidence field in the deduplicated detection record set for each grid to obtain the grid confirmation confidence; writing the grid target count, the grid confirmation confidence, and the confirmation time into the grid confirmation status table, and updating the confirmation flag extracted from the grid confirmation status table when the preset confirmation conditions are met; traversing the grid confirmation status table to sum the grid target counts of the confirmed grids to output the regional cattle and sheep inventory results, and outputting the unconfirmed grid identifiers to perform confirmation filtering and priority adjustment in subsequent replanning cycles.
[0118] In this embodiment of the invention, the deduplicated set of detection records is mapped to grid identifiers according to the detection location to form a deduplicated grid detection list. The detection records for each grid c are counted and accumulated to obtain the grid's cattle and sheep count. Simultaneously, an average calculation is performed on the confidence field in the deduplicated set of detection records to obtain the grid confirmation confidence level. :
[0119] ;
[0120] Count cattle and sheep in the grid, and the grid confirmation confidence level. And the confirmation time is written into the grid confirmation status table. And update when the preset confirmation conditions are met. The confirmation conditions may include: the grid count reaching a preset minimum count condition and the grid confirmation confidence level meeting a preset threshold. In this way, It has consistent semantics when read subsequently: the grid has been confirmed to be in... The weights are reduced during the calculation and filtered during the generation of the cruise queue, thereby suppressing the risk of multiple disks caused by repeated access.
[0121] Finally, traverse the grid to confirm the status table. Summing is performed on the grid counts of the confirmed grids, and the results of the cattle and sheep inventory for the region are output. Since the path dynamic programming phase has already passed... Interception-style cruise control has been implemented, and the deduplication phase has been passed. By achieving migration compensation and merging, the inventory results can significantly reduce the cumulative error caused by missed inventory and multiple inventory counts compared to the fixed route method in scenarios where cattle and sheep migrate rapidly in herds.
[0122] Furthermore, to enhance the traceability of results, this embodiment can also simultaneously provide the following information during output: each grid The confirmation time and confidence level facilitate subsequent review and task evaluation.
[0123] Reference Figure 2 , Figure 2 This is a schematic diagram of the structure of a drone path dynamic planning system for regional cattle and sheep inventory according to an embodiment of the present invention.
[0124] like Figure 2 As shown in the embodiment of the present invention, the UAV path dynamic planning system for regional cattle and sheep inventory includes:
[0125] Forming unit 10 is used to acquire grid data to characterize the spatial discrete structure of the area to be inventoried, so as to form a grid set and the grid center coordinates corresponding to the grid set;
[0126] The acquisition unit 20 is used to acquire high-altitude wide-area observation data of the first UAV, and based on the high-altitude wide-area observation data and grid set, generate a group activity intensity to characterize the activity level of cattle and sheep in each grid and a group migration trend vector to characterize the migration direction and migration speed trend of cattle and sheep.
[0127] The execution unit 30 is used to generate dynamic programming priorities for driving the rolling cruise of the second UAV based on the group activity intensity and the group migration trend vector, combined with the grid confirmation status table, and to generate interception target points for performing interception cruise based on the group migration trend vector and the grid center coordinates.
[0128] Update unit 40 is used to generate a rolling cruise queue of the second UAV based on dynamic programming priority, interception target point, and grid confirmation status table, and to update the rolling cruise queue according to preset reprogramming trigger conditions to drive the second UAV to acquire a set of low-altitude detection records.
[0129] Output unit 50 is used to perform migration compensation deduplication and grid confirmation status table update based on the low-altitude detection record set and the population migration trend vector, and output the regional cattle and sheep inventory results.
[0130] Other embodiments or specific implementations of the UAV path dynamic planning system for regional cattle and sheep inventory of the present invention can be referred to the above-described method embodiments, and will not be repeated here.
[0131] It is understood that in the description of this specification, references to terms such as "one embodiment," "another embodiment," "other embodiments," or "first embodiment to Nth embodiment," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0132] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0133] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for dynamic path planning of unmanned aerial vehicles (UAVs) for regional cattle and sheep inventory, characterized in that, The method includes the following steps: The process involves acquiring grid data to characterize the spatial discrete structure of the area to be inventoried, forming a grid set and the grid center coordinates corresponding to the grid set. Specifically, this includes: acquiring the boundary information of the area to be inventoried to form the area range; performing rule-based discretization operations on the area range according to a preset grid side length to generate a grid set containing multiple grid cells; generating a unique grid identifier for each grid cell in the grid set; calculating the grid center coordinates corresponding to the grid cell; and establishing the association between the grid identifier and the grid center coordinates. Acquire high-altitude wide-area observation data from the first UAV. Based on the high-altitude wide-area observation data and grid set, generate a group activity intensity vector to characterize the activity level of cattle and sheep in each grid and a group migration trend vector to characterize the migration direction and migration speed trend of cattle and sheep. Specifically, generating the group activity intensity includes: acquiring high-altitude wide-area observation data from a first UAV at times t and t-Δt, forming a first high-altitude wide-area observation frame at time t and a second high-altitude wide-area observation frame at time t-Δt; performing a grid mapping operation on the first high-altitude wide-area observation frame and the second high-altitude wide-area observation frame according to a grid set to form a first grid observation sub-map at time t and a second grid observation sub-map at time t-Δt for each grid; performing a mean absolute difference operation on the grid observation sub-map of each grid in the grid set to obtain an intermediate value of the grid activity intensity, and performing a normalization operation on the intermediate value of the grid activity intensity to obtain the group activity intensity; Specifically, generating a population migration trend vector includes: selecting a preset number of local block regions within each grid based on the first grid observation sub-map at time t and the second grid observation sub-map at time t-Δt to form a local block set; performing inter-frame displacement calculation on each local block in the local block set to obtain a displacement vector set; performing median aggregation operation on the displacement vector set to obtain a grid displacement vector, and converting the grid displacement vector into a population migration trend vector based on the time interval Δt. Based on the group activity intensity and group migration trend vector, combined with the grid confirmation status table, a dynamic programming priority for driving the second UAV's rolling cruise is generated. Based on the group migration trend vector and the grid center coordinates, an interception target point for performing interception cruise is generated. Specifically, this includes: performing modulus calculation and normalization on the group migration trend vector; performing linear fusion operation to obtain the priority by combining the group activity intensity and the grid confirmation status table; obtaining the grid center coordinates to determine the estimated arrival time of the second UAV to the corresponding grid; and performing forward update based on the group activity intensity and the estimated arrival time to generate the interception target point. Based on dynamic programming priorities and interception target points, combined with the grid confirmation status table, a rolling cruise queue for the second UAV is generated. The rolling cruise queue is updated according to the preset reprogramming trigger conditions to drive the second UAV to acquire a set of low-altitude detection records. The process of generating the rolling cruise queue for the second UAV specifically includes: performing priority sorting and extracting the top K priority grids to form a candidate set; performing a confirmation filtering operation on the candidate set to remove grids that meet preset confirmation conditions, forming a filtered candidate set; wherein the preset confirmation conditions include: the confirmation flag extracted from the grid confirmation status table is confirmed and the confirmation time falls within a preset time window; obtaining the current position of the second UAV and calculating the distance from the current position to the interception target point for each grid in the filtered candidate set to form a selection score; performing descending sorting based on the selection score to generate a sequence of grids to be visited, and writing the sequence of grids to be visited and their corresponding interception target points into the cruise queue to generate the rolling cruise queue for the second UAV. Specifically, driving the second UAV to acquire a set of low-altitude detection records includes: driving the second UAV to read the target grid identifiers and their corresponding interception target points in the rolling cruise queue, and sequentially executing the cruise actions of the second UAV; acquiring low-altitude observation image data within each target grid, and calling a preset target detection model to output detection records; performing unified field encoding on the detection records to form a set of detection records; wherein each detection record includes: detection location, detection timestamp, detection category, and detection confidence; mapping the set of detection records to grid identifiers according to the detection location to form a set of low-altitude detection records in the form of a grid detection list; Based on the low-altitude detection record set and the population migration trend vector, migration compensation deduplication and grid confirmation status table updates are performed to output the regional cattle and sheep inventory results. Specifically, this includes: mapping the deduplicated detection record set to grid identifiers according to the detection location to form a deduplicated detection record set in the form of a deduplicated grid detection list; accumulating the count of the detection records of the identified target in the deduplicated detection record set for each grid to obtain the grid target count, and averaging the confidence field in the deduplicated detection record set for each grid to obtain the grid confirmation confidence; writing the grid target count, the grid confirmation confidence, and the confirmation time into the grid confirmation status table, and updating the confirmation flag extracted from the grid confirmation status table when the preset confirmation conditions are met; traversing the grid confirmation status table, summing the grid target counts of the confirmed grids to output the regional cattle and sheep inventory results, and outputting the unconfirmed grid identifiers for confirmation filtering and priority adjustment in subsequent replanning cycles.
2. A dynamic path planning system for unmanned aerial vehicles (UAVs) used for regional cattle and sheep inventory, characterized in that, The system is used to execute the UAV path dynamic planning method for regional cattle and sheep inventory as described in claim 1, the system comprising: A forming unit is used to acquire grid data that characterizes the spatial discrete structure of the area to be inventoried, so as to form a grid set and the grid center coordinates corresponding to the grid set; The acquisition unit is used to acquire high-altitude wide-area observation data of the first UAV, and based on the high-altitude wide-area observation data and grid set, to generate a group activity intensity that characterizes the activity level of cattle and sheep in each grid and a group migration trend vector that characterizes the migration direction and migration speed trend of cattle and sheep. The execution unit is used to generate dynamic programming priorities for driving the rolling cruise of the second UAV based on the group activity intensity and the group migration trend vector, combined with the grid confirmation status table, and to generate interception target points for performing interception cruise based on the group migration trend vector and the grid center coordinates. The update unit is used to generate a rolling cruise queue for the second UAV based on dynamic programming priority, interception target points, and grid confirmation status table, and to update the rolling cruise queue according to preset reprogramming trigger conditions, so as to drive the second UAV to acquire a set of low-altitude detection records. The output unit is used to perform migration compensation deduplication and grid confirmation status table update based on the low-altitude detection record set and the population migration trend vector, and output the regional cattle and sheep inventory results.
Citation Information
Patent Citations
Unmanned aerial vehicle multi-target path planning method based on multi-target sheep flock migration algorithm
CN119860774A
Unmanned aerial vehicle three-dimensional path planning method based on multi-strategy improved black-wing optimization algorithm
CN120628130A