Unmanned aerial vehicle flight control method and device, storage medium and unmanned aerial vehicle countering system

By using the camera device of the second drone to capture images and adjust its position information, the problem of close drone tracking was solved, enabling precise escort and effective countermeasures.

CN121857767APending Publication Date: 2026-04-14AUTEL INTELLIGENT AUTOMOBILE CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-23
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies cannot effectively control drones to closely follow high-threat target drones, resulting in the inability to achieve precise escort and effective countermeasures.

Method used

The second drone's camera device captures images of the first drone to determine its position in the image. Based on this position information, the drone's heading angle, pitch angle, and flight speed are adjusted to ensure that the first drone's area is within a preset zone, thus achieving precise escort.

Benefits of technology

Ensure that the second UAV can stably maintain its visual center and effective countermeasure range against the first UAV, achieving precise escort and effective countermeasure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121857767A_ABST
    Figure CN121857767A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of unmanned aerial vehicles, and discloses an unmanned aerial vehicle flight control method and device, a storage medium and an unmanned aerial vehicle countering system.The method comprises the steps that in response to a received shooting instruction, a camera device is controlled to shoot a first unmanned aerial vehicle to obtain a first image, the camera device is a device in a second unmanned aerial vehicle, and the first image is obtained; the first image comprises a first unmanned aerial vehicle area; determining position information of the first unmanned aerial vehicle area in the first image; determining whether the first unmanned aerial vehicle area is located in a preset area in the first image according to the position information; and if the first unmanned aerial vehicle area is not located in the preset area in the first image, adjusting at least one of the course angle, the pitch angle and the flight speed of the second unmanned aerial vehicle based on the position information, so that the first unmanned aerial vehicle area is located in the preset area in the second image in the second image obtained by shooting the first unmanned aerial vehicle by a subsequent camera device. According to the invention, accurate accompanying flight can be carried out on the first unmanned aerial vehicle through the second unmanned aerial vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of unmanned aerial vehicle (UAV) technology, specifically to a UAV flight control method, device, storage medium, and UAV countermeasure system. Background Technology

[0002] When countering high-threat target drones with strong anti-jamming capabilities in complex environments, friendly drones can closely follow the target drone to achieve precise escort. If the target drone is detected to be performing illegal missions or posing a threat to the protected area, friendly drones can be used to conduct close-range electronic jamming or navigation deception to counter the target drone. How to control friendly drones to closely follow the target drone is a problem that needs to be solved. Summary of the Invention

[0003] In view of the above problems, this application provides a drone flight control method, device, storage medium, second drone, and drone countermeasure system to solve the problem in the prior art that it is impossible to control a drone to closely follow a target drone.

[0004] According to one aspect of the embodiments of this application, a flight control method for an unmanned aerial vehicle (UAV) is provided. The method includes: responding to receiving a shooting command, controlling a camera device to shoot a first UAV to obtain a first image, wherein the camera device is a device for a second UAV, and the first image includes a region of the first UAV; determining position information of the first UAV region in the first image; determining whether the first UAV region is located in a preset region in the first image based on the position information; if the first UAV region is not located in the preset region in the first image, adjusting at least one of the heading angle, pitch angle, and flight speed of the second UAV based on the position information, so that in a subsequent second image obtained by the camera device shooting the first UAV, the first UAV region is located in the preset region in the second image.

[0005] In one optional approach, determining the location information of the first drone region in the first image includes: determining a first pixel in the first image that belongs to the first drone region; establishing a reference coordinate system with a preset reference point in the first image as the origin; determining the first coordinate of the first pixel in the reference coordinate system, and using the first coordinate as the location information of the first drone region in the first image.

[0006] In one alternative approach, determining a first pixel belonging to the first drone region in the first image includes: determining all pixels belonging to the first drone region in the first image; selecting one pixel from all pixels as the first pixel; determining whether the first drone region is located in a preset region in the first image based on the location information includes: determining the second coordinates of a second pixel belonging to the preset region in the first image under the reference coordinate system; and determining whether the first drone region is located in the preset region in the first image based on the first coordinates and the second coordinates.

[0007] In one alternative approach, the first pixel is the center pixel among all the pixels, and the second pixel is the center pixel among all the pixels belonging to the preset region.

[0008] In one optional embodiment, the first coordinate includes a first abscissa and a first ordinate, and the second coordinate includes a second abscissa and a second ordinate; if the first UAV region is not located within the preset region in the first image, adjusting at least one of the heading angle, pitch angle, and flight speed of the second UAV based on the position information includes: determining a first difference between the first abscissa and the second ordinate. Determine the second difference between the first ordinate and the second ordinate. ; through formula Determine the heading angle offset ,in, The focal length of the camera device. The horizontal field of view of the camera device; expressed by the formula Determine the pitch angle offset ,in, The vertical field of view of the camera device; based on the heading angle offset. and the pitch angle offset Adjust the heading and pitch angles of the second UAV.

[0009] In one alternative approach, the step of controlling the camera device to capture images of the first drone in response to receiving a shooting command to obtain a first image includes: controlling the camera device to capture images of the first drone at preset time intervals in response to receiving the shooting command to obtain the first image; the method further includes: controlling the camera device to stop capturing images in response to receiving a stop shooting command.

[0010] According to another aspect of the embodiments of this application, a drone flight control device is provided. The device includes: a control module, configured to control a camera device to capture images of a first drone in response to receiving a shooting command, thereby obtaining a first image, wherein the camera device is a device for a second drone, and the first image includes a region of the first drone; a first determining module, configured to determine the position information of the first drone region in the first image; a second determining module, configured to determine whether the first drone region is located in a preset region in the first image based on the position information; and an adjustment module, configured to adjust at least one of the heading angle, pitch angle, and flight speed of the second drone based on the position information if the first drone region is not located in the preset region in the first image, so that in a subsequent second image captured by the camera device of the first drone, the first drone region is located in the preset region in the second image.

[0011] According to another aspect of the embodiments of this application, a second unmanned aerial vehicle (UAV) is provided, including a camera device, a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the UAV flight control method as described above.

[0012] According to another aspect of the embodiments of this application, a drone countermeasure system is provided, including a drone position prediction device and a second drone as described above; the drone position prediction device is used to predict the position of the first drone at a first moment, obtain the predicted position, and control the second drone to fly towards the predicted position, wherein the first moment is a future moment at a distance of a preset time Δt from the current moment; the drone position prediction device is also used to determine the relative distance between the first drone and the second drone at the current moment, and if the relative distance is less than or equal to a preset distance threshold, send the shooting command to the first drone.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the unmanned aerial vehicle flight control method as described above.

[0014] In this embodiment, the first drone is photographed by the camera device of the second drone to obtain a first image. Then, the flight attitude and speed of the second drone are adjusted in real time using the position information of the first drone area in the first image. This ensures that the first drone area is located in a preset area in the second image obtained by the subsequent camera device, thereby ensuring that the first drone is always stably in the center of the second drone's field of vision and within its effective countermeasure range. This allows the second drone to maintain precise escort of the first drone and ensures that when the first drone poses a threat to the control area, the second drone can effectively counter the first drone.

[0015] The above description is merely an overview of the technical solutions of the embodiments of this application. In order to better understand the technical means of the embodiments of this application and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of this application more obvious and understandable, specific implementation methods of this application are described below. Attached Figure Description

[0016] The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 The illustration shows an application scenario provided by an embodiment of this application; Figure 2 A flowchart illustrating the UAV flight control method provided in an embodiment of this application is shown; Figure 3 A flowchart illustrating the sub-steps of step 120 is shown; Figure 4 This illustration shows a first image, a first drone area, and a preset area provided in this application. Figure 5 A schematic diagram of the structure of the UAV flight control device provided in an embodiment of this application is shown; Figure 6 A schematic diagram of the structure of the second unmanned aerial vehicle provided in an embodiment of this application is shown; Figure 7 A schematic diagram of the structure of the drone countermeasure system provided in the embodiment of this application is shown. Detailed Implementation

[0017] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein.

[0018] For high-threat target drones with strong anti-jamming capabilities and operating in complex environments, a countermeasure strategy can be implemented using friendly drones. This involves controlling friendly drones to closely accompany the target drone to achieve precise escort. Once the target drone is detected to be performing illegal tasks or posing a threat to the control area, friendly drones can be used to implement countermeasures such as close-range electronic jamming or navigation deception to effectively counter the target drone.

[0019] However, due to the high speed and complex, ever-changing flight patterns of drones, escorting them is significantly more difficult, making it highly likely that the friendly drone will lose track of the target drone. If the friendly drone fails to maintain close escort and loses track of the target drone, it will be unable to effectively counter the target drone.

[0020] In order to closely escort a target drone with its own drone, this application proposes a drone flight control method. Upon receiving a shooting command, the method controls a camera device to shoot a first drone (i.e., the target drone) to obtain a first image including the area of ​​the first drone. The camera device is a device for a second drone. If the area of ​​the first drone is not located in a preset area in the first image, at least one of the heading angle, pitch angle, and flight speed of the second drone is adjusted so that the area of ​​the first drone is located in the preset area in the second image obtained by the subsequent camera device shooting the first drone.

[0021] The drone flight control method provided in this application is executed by an electronic device, which may be a device including one or more processors, such as a drone, server, touch screen phone, smartphone, tablet computer, portable electronic device, or other electronic device. The processor may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application; no limitation is made herein. The one or more processors included in the electronic device may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs; no limitation is made herein.

[0022] If the electronic device executing this application is a non-drone device such as a server or computer, the electronic device can control the second drone to photograph the first drone by sending a photographing command to the second drone. After the second drone photographs the first drone and obtains a first image, the second drone sends the first image to the electronic device. The electronic device determines whether the area of ​​the first drone is located within a preset area of ​​the first image. If it is not located within the preset area, it determines the adjustment items to be adjusted (i.e., at least one of the second drone's heading angle, pitch angle, and flight speed) and their corresponding specific values, and sends an adjustment command containing the above information to the second drone. After receiving the adjustment command, the second drone adjusts the corresponding flight parameters to the specified values.

[0023] As mentioned earlier, drones fly at high speeds and their flight states are complex and changeable. Communication between the electronic equipment and the second drone (the second drone sending the first image to the electronic equipment and the electronic equipment sending adjustment commands to the second drone) takes a certain amount of time. This can easily cause the adjustment commands received by the second drone to lag behind the actual flight state of the first drone 12, thus failing to eliminate positional deviations in time and reducing the real-time performance and accuracy of the escort flight.

[0024] Therefore, to avoid the aforementioned problems and enable the second drone to accurately escort the first drone, in this application, preferably, the drone flight control method provided in this application is executed by the second drone. It is understood that if the distance between the second drone and the first drone is large, it may be difficult to effectively identify the area of ​​the first drone in the first image captured by the second drone. Therefore, in order to accurately identify the area of ​​the first drone from the first image, preferably, the camera device of the second drone is controlled to capture images of the first drone only when the relative distance between the second drone and the first drone is less than a preset distance threshold.

[0025] Figure 1 A schematic diagram illustrating an application scenario provided by an embodiment of this application is shown. For example... Figure 1As shown, the UAV detection device 11 detects the first UAV 12 in real time, collects its status data, and transmits it to the UAV position prediction device 13 in real time. The UAV position prediction device 13 predicts the position of the first UAV 12 at a future moment, obtains the predicted position, and then controls the second UAV 14 to fly towards the predicted position. After the second UAV 14 begins flight, the UAV detection device 11 determines the first position of the first UAV 12 and the second position of the second UAV 14 in real time, and transmits the second position to the UAV position prediction device 13. The UAV position prediction device 13 determines whether the relative distance between the first and second positions is less than or equal to a preset distance threshold. If the relative distance is less than or equal to the preset distance threshold, it indicates that the first UAV 12 and the second UAV 14 are relatively close. At this time, the UAV position prediction device 13 sends a shooting command to the second UAV 14. After receiving the shooting command, the second UAV 14 executes the UAV flight control method provided in this application, thereby achieving precise escort of the first UAV 12. The UAV flight control method provided in this application will be described in detail below with reference to the accompanying drawings.

[0026] Figure 2 A flowchart illustrating a drone flight control method provided in an embodiment of this application is shown. This method is executed by a second drone 14. Figure 2 As shown, the method includes steps 110 to 140.

[0027] Step 110: In response to receiving the shooting command, control the camera device to shoot the first drone 12 and obtain the first image.

[0028] Since the first drone 12 occupies a certain volume in physical space, its imaging in the first image will include multiple pixels, thus constituting the area of ​​the first drone.

[0029] Step 120: Determine the location information of the first UAV area in the first image.

[0030] Figure 3 A flowchart illustrating the sub-steps of step 120 is shown. For example... Figure 3 As shown, step 120 can be achieved through steps 121 to 123.

[0031] Step 121: Determine the first pixel in the first image that belongs to the region of the first drone.

[0032] Specifically, the first image can be identified by a trained target detection model, and the features of the first image can be extracted and analyzed to identify the outline of the first UAV region. The pixels on and within the outline are the pixels belonging to the first UAV region.

[0033] In this step, all pixels belonging to the first drone region can be used as the first pixel. However, since there are many pixels belonging to the first drone region, to improve the efficiency of determining the position information of the first drone region in the first image based on the first pixel, preferably, after determining all pixels belonging to the first drone region in the first image, one pixel is selected from all the aforementioned pixels as the first pixel. Specifically, a representative pixel can be selected from all the aforementioned pixels. For example, the center pixel of the first drone region can be selected as the first pixel.

[0034] Figure 4 A schematic diagram showing the first image, the first drone area, and the preset area provided in this application is illustrated. (See attached diagram.) Figure 4 As shown, the first image 20 includes a first drone region 21 and a preset region 22. In this step, the center pixel B of the first drone region 21 is taken as the first pixel.

[0035] Step 122: Establish a reference coordinate system with the preset reference point in the first image 20 as the origin.

[0036] The preset reference point can be set as needed, for example, the reference coordinate system can be established with the upper left corner point A of the first image 20 as the origin.

[0037] Step 123: Determine the first coordinates of the first pixel in the reference coordinate system, and use the first coordinates as the position information of the first UAV region 21 in the first image 20.

[0038] In this step, based on the reference coordinate system established in step 122, the first pixel point belonging to the first UAV area determined in step 121 is mapped to coordinates, and its specific value in the reference coordinate system is calculated to obtain the first coordinate of the first pixel point. The first coordinate is then used as the position information of the first UAV area in the first image.

[0039] Step 130: Determine whether the first drone area 21 is located in the preset area 22 in the first image 20 based on the location information. If not, proceed to step 140; if yes, proceed to step 110 and continue to control the camera device to take pictures of the first drone 12.

[0040] Specifically, a second pixel point (e.g., the center pixel point C in the preset region 22) is determined within the preset region 22. Then, the coordinates of pixel point C in a reference coordinate system established with point A as the origin are determined to obtain the second coordinates. Based on the first coordinates of pixel point B and the second coordinates of pixel point C, it can be determined whether the first drone region 21 is located within the preset region 22 of the first image 20. For example, the coordinate offset (difference between the horizontal and vertical coordinates) between the first coordinates of pixel point B and the second coordinates of pixel point C can be calculated. Then, the straight-line distance between the two points can be calculated and compared with a preset distance difference threshold. If the straight-line distance is less than or equal to the distance difference threshold, it is determined that the first drone region 21 is located within the preset region 22 of the first image 20; conversely, if the straight-line distance is greater than the distance difference threshold, it is determined that the first drone region 21 is not located within the preset region 22 of the first image 20.

[0041] Alternatively, to improve the accuracy of determining whether the first drone region is located within a preset region in the first image, it can also be determined whether the first coordinate of pixel B is the same as the second coordinate of pixel C. Specifically, if the first coordinate of pixel B is the same as the second coordinate of pixel C, then the first drone region 21 is determined to be located within the preset region 22 in the first image 20; conversely, if the first coordinate of pixel B is different from the second coordinate of pixel C, then the first drone region 21 is determined not to be located within the preset region 22 in the first image 20.

[0042] Since the preset area 22 is the center area of ​​the first image 20, if the first drone area 21 is located in the preset area 22, it means that the tracking and shooting angle of the second drone 14 on the first drone 12 has been adjusted to the best position, the first drone 12 is located in the center of the field of view of the second drone 14, and is also within the effective countermeasure range of the second drone 14. At this time, the process proceeds to step 110 to continue shooting the first drone 12 in order to continuously accompany the first drone 12.

[0043] Conversely, if the first drone area 21 is not located within the preset area 22, it indicates a deviation in the tracking and shooting perspective of the second drone 14 towards the first drone 12. The first drone 12 is off-center from the field of view of the second drone 14, and may be outside the effective countermeasure range of the second drone 14. In this case, the second drone 14 needs to adjust its position to restore the optimal countermeasure state. Therefore, proceed to step 140 below to adjust the flight attitude or speed of the second drone 14.

[0044] Step 140: Adjust at least one of the heading angle, pitch angle and flight speed of the second UAV based on the position information, so that in the second image obtained by the subsequent camera device from the first UAV, the area of ​​the first UAV is located in the preset area of ​​the second image.

[0045] In this step, we will take the center pixel B of the first UAV region 21 as the first pixel and the center pixel C of the preset region 22 as the second pixel as an example. In the reference coordinate system established with point A as the origin, the coordinates of pixel B are the first coordinates and the coordinates of pixel C are the second coordinates. The first coordinates include the first horizontal coordinate and the first vertical coordinate, and the second coordinates include the second horizontal coordinate and the second vertical coordinate.

[0046] Specifically, at least one of the heading angle, pitch angle, and flight speed of the second UAV 14 can be adjusted through the following steps a1 to a5.

[0047] Step a1: Determine the first difference between the first and second x-coordinates. .

[0048] Step a2: Determine the second difference between the first and second ordinates. .

[0049] Step a3: Determine the heading angle offset using the following formula (1). .

[0050] (1) in, The focal length of the camera device, This refers to the horizontal field of view of the camera device.

[0051] Step a4: Determine the pitch angle offset using the following formula (2). .

[0052] (2) in, This refers to the vertical field of view of the camera device.

[0053] Step a5: Based on the heading angle offset and pitch angle offset Adjust the heading and pitch angles of the second UAV 14.

[0054] If the area of ​​the first drone region 21 is larger than the area of ​​the preset region 22, it means that the current distance between the second drone 14 and the first drone 12 is too close. In this case, the flight speed of the second drone 14 can be reduced. Conversely, if the area of ​​the first drone region 21 is much smaller than the area of ​​the preset region 22, it means that the current distance between the second drone 14 and the first drone 12 is too far. In this case, the flight speed of the second drone 14 can be increased.

[0055] In this embodiment, the camera device of the second drone 14 captures the first drone 12 to obtain a first image 20. Then, the flight attitude and speed of the second drone 14 are adjusted in real time using the position information of the first drone region 21 in the first image 20. This ensures that in the second image captured by the camera device, the first drone region is located in a preset area in the second image. This ensures that the first drone 12 is always stably located in the center of the field of vision and within the effective countermeasure range of the second drone 14. This allows the second drone 14 to maintain precise escort of the first drone 12. Furthermore, when the first drone 12 poses a threat to the control area, the second drone 14 can effectively counter the first drone 12.

[0056] Since the first drone 12 is flying continuously, in order to enable the second drone 14 to continuously and accurately accompany the first drone 12, in some embodiments, in step 110, the second drone 14 responds to the received shooting command, controls the camera device to take pictures of the first drone every preset time interval (e.g., 10s or 30s) to obtain a first image, and identifies the first image in real time to determine the location information of the first drone area in the first image. Then, the second drone 14 continuously updates its flight attitude and speed based on the location information, thereby realizing dynamic tracking and accurate accompaniment of the first drone 12.

[0057] It should be noted that, for ease of distinction, in this application, if the current time is t1, the image captured at time t1 is called the first image, and the image captured at time t2 (i.e., a future time with a preset time interval from t1) is called the second image. When time t2 is reached, the image captured at that time is the new first image.

[0058] When it is determined that the first UAV 12 has left the control area, there is no need to control the second UAV 14 to escort the first UAV 12. Therefore, the second UAV 14 can stop performing the escort mission. Specifically, the UAV detection device 11 acquires the position of the first UAV 12 in real time and transmits it to the UAV position prediction device 13. When the UAV position prediction device 13 determines that the first UAV 12 has left the control area, it sends a stop shooting command to the second UAV 14. After receiving the stop shooting command, the second UAV 14 controls the camera device to stop shooting, thereby ceasing image acquisition and tracking of the first UAV 12, avoiding invalid escort flight, and enabling the second UAV 14 to exit the tracking mode in time and adjust to a hovering standby or return-to-home state to save energy.

[0059] Figure 5 A schematic diagram of the structure of the UAV flight control device provided in an embodiment of this application is shown. Figure 5 As shown, the UAV flight control device 200 includes: a control module 201, a first determination module 202, a second determination module 203, and an adjustment module 204.

[0060] In response to receiving a shooting command, control module 201 controls a camera device to capture a first image of the first drone, wherein the camera device is a component of the second drone, and the first image includes a region of the first drone. First determining module 202 determines the position information of the first drone region in the first image. Second determining module 203 determines whether the first drone region is located within a preset region in the first image based on the position information. If the first drone region is not located within the preset region in the first image, adjustment module 204 adjusts at least one of the heading angle, pitch angle, and flight speed of the second drone based on the position information, so that in a subsequent second image captured by the camera device, the first drone region is located within the preset region in the second image.

[0061] The UAV flight control device 200 provided in this embodiment is used to execute the technical solution of the UAV flight control method in the aforementioned method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0062] It is worth noting that the UAV flight control device 200 provided in this embodiment also includes other modules for performing the steps of the above-described UAV flight control method embodiment, which will not be described in detail here.

[0063] Figure 6 The diagram shows a structural schematic of a second unmanned aerial vehicle (UAV) provided in an embodiment of this application. The specific embodiments of this application do not limit the specific implementation of the second UAV.

[0064] like Figure 6As shown, the second drone 14 may include: a camera device 142, a processor 144, and a memory 146.

[0065] The memory 146 is used to store the computer program 148. The memory 146 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device. The computer program 148 may include computer-executable instructions.

[0066] The processor 144 is used to execute the computer program 148 to implement the above-described embodiment of the UAV flight control method.

[0067] Processor 144 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The one or more processors included in the second drone 14 may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.

[0068] Specifically, in response to receiving a shooting command, the processor 144 controls the camera device 142 to shoot the first drone. After the camera device 142 captures a first image of the first drone, it transmits the first image to the processor 144, so that the processor 144 executes the relevant steps in the above-described drone flight control method embodiment.

[0069] Figure 7 A schematic diagram of the structure of the drone countermeasure system provided in an embodiment of this application is shown. Figure 7 As shown, the drone countermeasure system 1 includes a drone position prediction device 13 and a second drone 14. The drone position prediction device 13 predicts the position of the first drone 12 at a first moment (a future moment at a preset time interval Δt from the current moment), obtains the predicted position, and controls the second drone 14 to fly towards the predicted position. After the second drone 14 flies towards the predicted position, the drone position prediction device 13 receives the real-time positions of the first drone 12 and the second drone 14 sent in real-time by the drone detection device 11, and determines the relative distance between the first drone 12 and the second drone 14 at the current moment based on their real-time positions. If the relative distance is less than or equal to a preset distance threshold, a shooting command is sent to the second drone 14. After receiving the shooting command, the second drone 14 executes the above-described drone flight control method embodiment.

[0070] Specifically, the UAV detection device 11 collects and determines the position and flight speed of the first UAV 12 in real time, and transmits the position and flight speed of the first UAV 12 to the UAV position prediction device 13 in real time. It is worth noting that, since the UAV detection device 11 continuously collects and determines the position and flight speed of the first UAV 12 and transmits it to the UAV position prediction device 13, in order to facilitate the UAV position prediction device 13 in distinguishing the position and flight speed of the first UAV 12 at different times, in this application, preferably, the position and flight speed of the first UAV 12 transmitted by the UAV detection device 11 to the UAV position prediction device 13 carries a timestamp. This timestamp is used to mark the collection time corresponding to each set of position and flight speed data, so that the UAV position prediction device 13 can arrange and synchronize the received data sequence according to the timestamp in chronological order, thereby avoiding the problem of timing deviation that may occur during data transmission. The status data of the first UAV 12 includes the position and flight speed of the first UAV 12. The position of the first UAV 12 may include the longitude, latitude, and altitude of the first UAV 12; the flight speed of the first UAV 12 may include vertical speed and horizontal speed.

[0071] For ease of distinction, the state data of the first UAV 12 acquired earlier than the current time is referred to as the historical state data of the first UAV 12. After receiving the state data of the first UAV, the UAV position prediction device 13 identifies the flight mode of the first UAV 12 based on the historical state data. Since the UAV may fly at a constant speed, accelerate at a constant speed, or fly in other modes, this application divides the flight mode of the first UAV 12 into three types: constant speed flight, constant acceleration flight, and other flight modes besides constant speed flight and constant acceleration flight, and predefines the flight speed characteristics of the UAV corresponding to each of these three flight modes.

[0072] The UAV position prediction device 13 determines the flight mode of the first UAV 12 from the three flight modes mentioned above. Specifically, it performs statistical analysis on the historical state data of the first UAV 12 to determine whether the flight speed of the first UAV 12 in the historical period closest to the current time conforms to the characteristics of uniform speed flight. If it does, the flight mode of the first UAV 12 is determined to be uniform speed flight; if it does not, it determines whether the flight speed of the first UAV 12 in the historical period conforms to the characteristics of uniform acceleration flight. If it does, the flight mode of the first UAV 12 is determined to be uniform acceleration flight; if it does not, the flight mode of the first UAV 12 is determined to be a flight mode other than uniform speed flight and uniform acceleration flight.

[0073] After the UAV position prediction device 13 identifies the flight mode of the first UAV, it predicts the position of the first UAV 12 at the first moment based on historical state data, flight mode, and current state data, thus obtaining the predicted position. Specifically, if the flight mode of the first UAV 12 is uniform speed flight mode, the current state data and the preset duration Δt are input into the first model to obtain the predicted position output by the first model. Among them, the current state data includes the current position P0 and the current flight speed V0 of the first UAV. After inputting P0, V0, and Δt into the first model, the first model predicts the position P of the first UAV 12 at the first moment using the following formula (3). pred .

[0074] P pred =P0+V0×Δt(3) If the flight mode is uniform acceleration, the UAV position prediction device 13 determines the acceleration of the first UAV based on historical state data, and inputs the current state data, acceleration, and preset duration Δt into the second model to obtain the predicted position output by the second model. Specifically, the UAV position prediction device 13 extracts the horizontal and vertical velocity sequences of the first UAV 12 at different historical moments within the preset time window from the historical state data; then, it uses a linear fitting algorithm (such as the least squares method) to fit the trend of the above velocity sequence relative to time, and uses the slope obtained by fitting as the acceleration A0 of the first UAV 12, or directly performs a difference operation on the velocity sequence to calculate the rate of change of velocity at adjacent moments and takes the average value, and uses the average value as the acceleration A0 of the first UAV 12. After the UAV position prediction device 13 inputs P0, V0, A0 and Δt into the second model, the second model predicts the position P of the first UAV 12 at the first moment using the following formula (4). pred .

[0075] P pred =P0+V0×Δt+(1 / 2)×A0×Δt 2 (4) If the flight mode is any other than uniform speed flight mode and uniform acceleration flight mode, the UAV position prediction device 13 inputs historical state data, current state data, and preset duration Δt into the third model to obtain the predicted position output by the third model. The third model can be a machine learning prediction model. After the UAV position prediction device 13 inputs historical state data, current state data, and preset duration Δt into the third model, the third model predicts the position P of the first UAV at the first moment using the following formula (5). pred .

[0076] P pred =f(P) -n ..., P0, V -n ,……V0,Δt)(5) Where f is the trained neural network function, P -n ..., P0 represents the position of the first UAV 12 in the historical and current state data; V -n ...V0 represents the flight speed of the first UAV 12 in the historical and current state data.

[0077] Wind speed in the flight environment of a drone can affect its actual flight speed. Therefore, in some embodiments, the drone position prediction device 13 acquires the wind speed and direction of the current flight environment of the first drone 12, and corrects the predicted position based on the wind speed and direction.

[0078] Specifically, meteorological sensors deployed in the flight area or meteorological measuring instruments integrated into the UAV detection equipment can be used to collect environmental airflow parameters in real time. Then, the raw airflow data in the local coordinate system of the sensors is converted into horizontal and vertical wind speeds in the geographic coordinate system through a coordinate transformation algorithm. Vector synthesis and trigonometric functions are then used to calculate the current environmental wind speed and wind direction angle relative to due north. The determined wind speed and wind direction are then transmitted to the UAV position prediction device 13. The meteorological sensor can be an ultrasonic anemometer, a mechanical cup anemometer, or a thermal anemometer.

[0079] The UAV position prediction device 13 can calculate the horizontal and vertical wind speed components generated by the wind field on the first UAV based on the acquired wind speed and direction using vector synthesis and decomposition algorithms, thereby determining the position offset vector caused by the wind force acting on the first UAV at the first moment; then, the position offset vector is superimposed on the initially predicted position, that is, the wind-induced displacement is superimposed on the latitude and longitude coordinates of the original predicted position, thereby realizing dynamic compensation and correction of the predicted position.

[0080] Because drones are directly affected by ambient airflow during flight, the aerodynamic force generated by the wind causes a deviation between their actual ground speed (speed relative to the ground) and air speed (speed relative to the air), resulting in their actual trajectory deviating from the theoretical flight path in windless conditions. Secondly, the superposition of different wind speeds and directions will change the drone's flight attitude and displacement rate, especially under crosswind or headwind conditions, where the drone's position drift is more significant.

[0081] Therefore, by acquiring the wind speed and direction of the current flight environment of the first UAV 12, the environmental wind field is introduced as a key variable into the prediction process. Wind field compensation is applied to correct the UAV's position change trend, eliminating the prediction position error caused by meteorological interference, thereby improving the accuracy and robustness of the prediction position.

[0082] In the aforementioned embodiments, if the wind speed data collected by the wind speed sensor contains noise, or if overfitting occurs when correcting the predicted position, additional calculation errors may be introduced, causing the corrected predicted position to deviate further from the true value than the original predicted position. Therefore, in other embodiments, the UAV position prediction device 13 determines whether to correct the predicted position based on wind speed and direction when subsequently predicting the position of the first UAV 12, by determining whether the corrected predicted position deviates further from the actual value than the original predicted position, thereby improving the accuracy of the final predicted position. In this embodiment, the UAV position prediction device 13, in response to reaching a first moment, acquires first state data of the first UAV 12, wherein the first state data includes the first position and first flight speed of the first UAV 12 at the first moment, and determines a first deviation between the first position and the first predicted position (predicted position before correction), and a second deviation between the first position and the second predicted position (predicted position after correction). If the first deviation is less than or equal to the second deviation, the wind speed and wind direction of the current flight environment of the first UAV 12 will no longer be acquired, and the predicted position will be corrected according to the wind speed and wind direction. If the first deviation is greater than the second deviation, the wind speed and wind direction of the current flight environment of the first UAV 12 will continue to be acquired, and the predicted position will be corrected according to the wind speed and wind direction to improve the accuracy of the final predicted position.

[0083] Specifically, the Euclidean distance between the first position and the first predicted position can be calculated to obtain the first Euclidean distance, and the first Euclidean distance can be determined as the first deviation; the Euclidean distance between the first position and the second predicted position can be calculated to obtain the second Euclidean distance, and the second Euclidean distance can be determined as the second deviation.

[0084] The calculated first deviation is compared with the second deviation. If the first deviation is less than or equal to the second deviation, the predicted position corrected based on wind speed and direction (i.e., the second predicted position) is not more accurate than the first predicted position. Therefore, the predicted position will not be further corrected based on wind speed and direction. If the first deviation is greater than the second deviation, the predicted position corrected based on wind speed and direction (i.e., the second predicted position) is more accurate than the first predicted position. Therefore, the predicted position will continue to be corrected based on wind speed and direction to improve the accuracy of the final predicted position.

[0085] In some embodiments, in order to determine the relative distance between the first drone 12 and the second drone 14, the drone detection device 11 can determine the second position of the second drone 14 at the current time, and then transmit the second position to the drone position prediction device 13. The drone position prediction device 13 calculates the third distance between the second position and the predicted position, and uses the third distance as the relative distance.

[0086] Alternatively, the drone detection device 11 can determine the second position of the second drone 14 and the third position of the first drone 12 at the current moment, and then transmit the second and third positions to the drone position prediction device 13. The drone position prediction device 13 calculates the fourth distance between the second and third positions and uses the fourth distance as the relative distance.

[0087] Since the first UAV 12 and the second UAV 14 are in flight, their actual spatial positions change dynamically in real time. The actual flight trajectory of the first UAV 12 may deviate from the predicted trajectory, causing the relative distance calculated based on the predicted position to fail to accurately reflect the true relative spatial relationship between the two. Therefore, by calculating a fourth distance between the third position (i.e., the actual position) of the first UAV 12 and the second position of the second UAV 14, the model prediction error can be eliminated, allowing this relative distance to accurately reflect the current physical spatial interval between the two.

[0088] When the relative distance between the second UAV 14 and the first UAV 12 is less than or equal to a preset distance threshold, the UAV position prediction device 13 sends a shooting command to the second UAV 14. After receiving the shooting command, the second UAV 14 takes a picture of the first UAV 12 through its camera device to obtain a first image including the area of ​​the first UAV. Based on the position information of the area of ​​the first UAV in the first image, the device adjusts at least one of the heading angle, pitch angle and flight speed of the second UAV 14 to maintain an appropriate distance between the second UAV 14 and the first UAV 12, and the first UAV 12 is within the optimal observation range of the second UAV 14, that is, the first UAV 12 is within the optimal countermeasure range of the second UAV 14.

[0089] Understandably, if the second UAV 14 transmits the first image 2 to the UAV position prediction device 13, the UAV position prediction device 13 will analyze the first image 2 and determine the heading angle offset of the second UAV 14. Pitch angle offset After at least one of the following is obtained, the first image 2 is transmitted to the second UAV 14. Due to the high speed of the UAV, there is a communication delay in the transmission of the first image 2 and the return of the command. This can easily cause the adjustment command received by the second UAV 14 to lag behind the actual flight state of the first UAV 12, thus failing to eliminate the position deviation in time. This will reduce the real-time performance and accuracy of the escort flight, and may even lead to the risk of losing the target.

[0090] In this application, the second UAV 14 analyzes the first image 20 and adjusts the flight attitude and speed of the second UAV 14 based on the area of ​​the first UAV region 21 in the first image 20, instead of transmitting the first image 20 to the UAV position prediction device 13 for analysis. This avoids communication delays caused by image data transmission and ensures that the second UAV 14 can respond quickly and make precise adjustments based on the real-time flight status of the first UAV 12. Thus, the second UAV 14 can accurately accompany the first UAV 12, effectively preventing tracking delays or target loss caused by data transmission delays.

[0091] Furthermore, for the drone countermeasure system 1, after the drone position prediction device 13 predicts the position of the first drone 12 at a certain future moment (i.e., the expected interception point), the second drone 14 is controlled to fly towards the predicted position. This allows the second drone 14 to actively intercept the first drone 12, rather than passively tailing it, greatly improving the efficiency of interception and escort. The system also combines the drone position prediction device 13's large-scale, coarse detection and position prediction with the second drone 14's image capture to adjust its flight attitude and speed based on the captured images (i.e., visual servo tracking mode) for small-scale, precise escort of the first drone 12. These two methods complement each other. Even if the signal from the drone position prediction device 13 is temporarily lost, the second drone 14 can still maintain tracking of the first drone 12 through visual lock, improving the robustness of the drone countermeasure system 1. Moreover, the system achieves full automation of the "detection-prediction-guidance-lock-tracking" process without manual intervention, offering a fast response time and making it suitable for security scenarios requiring rapid response. Moreover, the visual servo tracking mode of the second UAV 14 can achieve pixel-level precise control, with a short flight distance and good tracking stability, laying the foundation for subsequent actions such as driving away, forced landing, or capturing the first UAV 12.

[0092] This application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described UAV flight control method embodiment.

[0093] This application provides a computer program that can be executed by a processor to implement the above-described UAV flight control method embodiment.

[0094] This application provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described UAV flight control method embodiment.

[0095] In the several embodiments provided in this application, any function, if implemented as a software functional module / unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the technical solution of this application can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or other electronic device) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing computer program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0096] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of this application are not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of this application.

[0097] It should be noted that the above embodiments are illustrative of this application and not restrictive, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. This application can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In claims enumerating several means, several units or modules of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

[0098] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for controlling the flight of an unmanned aerial vehicle (UAV), characterized in that, The method includes: In response to receiving a shooting command, the camera device is controlled to shoot a first drone to obtain a first image, wherein the camera device is a device of a second drone, and the first image includes the area of ​​the first drone; Determine the location information of the first drone area in the first image; Based on the location information, determine whether the first drone area is located within a preset area in the first image; If the first drone area is not located in the preset area in the first image, then at least one of the heading angle, pitch angle and flight speed of the second drone is adjusted based on the position information so that in the second image obtained by the camera device afterward, the first drone area is located in the preset area in the second image.

2. The method according to claim 1, characterized in that, Determining the location information of the first UAV region in the first image includes: In the first image, identify the first pixel point belonging to the region of the first drone; A reference coordinate system is established with the preset reference point in the first image as the origin; Under the reference coordinate system, the first coordinates of the first pixel are determined, and the first coordinates are used as the position information of the first UAV region in the first image.

3. The method according to claim 2, characterized in that, Determining the first pixel in the first image that belongs to the region of the first drone includes: In the first image, identify all pixels belonging to the region of the first drone; Select one pixel from all the pixels as the first pixel; Determining whether the first drone area is located within a preset area in the first image based on the location information includes: In the reference coordinate system, determine the second coordinates of the second pixel point in the first image that belongs to the preset region; Based on the first coordinates and the second coordinates, determine whether the first drone area is located in the preset area in the first image.

4. The method according to claim 3, characterized in that, The first pixel is the center pixel among all the pixels, and the second pixel is the center pixel among all the pixels belonging to the preset area.

5. The method according to claim 3, characterized in that, The first coordinate includes a first x-coordinate and a first y-coordinate, and the second coordinate includes a second x-coordinate and a second y-coordinate; If the first UAV region is not located within the preset region in the first image, then adjusting at least one of the heading angle, pitch angle, and flight speed of the second UAV based on the location information includes: Determine the first difference between the first x-coordinate and the second x-coordinate. ; Determine the second difference between the first ordinate and the second ordinate. ; Through formula Determine the heading angle offset ,in, The focal length of the camera device. The horizontal field of view of the camera device; Through formula Determine the pitch angle offset ,in, The vertical field of view of the camera device; Based on the heading angle offset and the pitch angle offset Adjust the heading and pitch angles of the second UAV.

6. The method according to claim 1, characterized in that, The step of responding to receiving a shooting command and controlling the camera device to shoot the first drone to obtain a first image includes: In response to receiving the shooting command, the camera device is controlled to take pictures of the first drone at preset time intervals to obtain the first image; The method further includes: in response to receiving a stop shooting command, controlling the camera device to stop shooting.

7. A flight control device for unmanned aerial vehicles (UAVs), characterized in that, The device includes: A control module is configured to control a camera device to capture images of a first drone in response to a received shooting command, thereby obtaining a first image, wherein the camera device is a device in a second drone, and the first image includes the area of ​​the first drone. The first determining module is used to determine the location information of the first UAV area in the first image; The second determining module is used to determine whether the first UAV area is located in a preset area in the first image based on the location information. An adjustment module is configured to adjust at least one of the heading angle, pitch angle, and flight speed of the second drone based on the position information if the first drone area is not located in the preset area in the first image, so that in the second image obtained by the camera device after capturing the first drone, the first drone area is located in the preset area in the second image.

8. A second unmanned aerial vehicle (UAV), comprising a camera device, a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the UAV flight control method according to any one of claims 1 to 6.

9. A countermeasure system for unmanned aerial vehicles (UAVs), characterized in that, Includes a drone location prediction device and a second drone as described in claim 8; The UAV position prediction device is used to predict the position of the first UAV at a first moment, obtain the predicted position, and control the second UAV to fly towards the predicted position, wherein the first moment is a future moment with a preset time interval Δt from the current moment; The drone position prediction device is also used to determine the relative distance between the first drone and the second drone at the current moment. If the relative distance is less than or equal to a preset distance threshold, the device sends the shooting command to the first drone.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the UAV flight control method according to any one of claims 1 to 6.