Method and device for controlling the flight of a drone

By obtaining obstacle detection results in the UAV's flight environment, calculating obstacle avoidance trajectory and flight parameters, and controlling UAV flight in real time, it solves the problem that drones are difficult to avoid obstacles in curved flight in the existing technology, and realizes the problem of drones being difficult to avoid obstacles in curved flight. A smooth flight path.

CN111766891BActive Publication Date: 2024-12-31BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910433381.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-05-23
Publication Date
2024-12-31
Estimated Expiration
2039-05-23

AI Technical Summary

Technical Problem

When existing drones perform curved flight missions planned online in real-time, it is difficult to effectively avoid obstacles, and manual control methods have insufficient hysteresis and stability.

Method used

By obtaining obstacle detection results in the drone's flight environment, determining the obstacle avoidance trajectory, and calculating the function of flight speed and position change over time based on the obstacle avoidance trajectory and preset flight parameters, we control the drone's flight in real time to achieve stability Avoid obstacles.

Benefits of technology

It realizes smooth obstacle avoidance of drones when performing curved flight missions, reduces the sense of hysteresis, and improves stability and coherence during flight.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111766891B_ABST
    Figure CN111766891B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method and device for controlling the flight of a drone. A specific implementation of the above method includes: obtaining obstacle detection results for the drone flight environment; determining an obstacle avoidance trajectory based on the obstacle detection results; determining a first function of the flight speed changing over time based on the obstacle avoidance trajectory and preset flight parameters; determining a second function of the flight position changing over time based on the obstacle avoidance trajectory and the first function; and controlling the drone to fly from an initial position based on the second function and the real-time position of the drone. This implementation achieves the goal of controlling the drone to avoid obstacles smoothly and achieve a smooth flight.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of drone technology, and more particularly to a method and device for controlling the flight of a drone. Background Art

[0002] With the development of drone technology and the gradual maturity of control systems, more and more drones are being used in logistics, security, inspection, formation performances and other fields. When drones perform autonomous flight missions, they fly along a straight line according to the flight waypoints uploaded in advance. When drones perform curved flight missions planned online in real time, such as performing obstacle avoidance flight, they generally insert multiple flight waypoints to fly a broken line with a similar curved trajectory. Or the pilot on the ground takes over the drone and flies along the curve manually. Summary of the invention

[0003] The embodiments of the present application provide a method and device for controlling the flight of a drone.

[0004] In a first aspect, an embodiment of the present application provides a method for controlling the flight of a drone, comprising: obtaining obstacle detection results for the drone flight environment; determining an obstacle avoidance trajectory based on the obstacle detection results; determining a first function of flight speed changing with time based on the obstacle avoidance trajectory and preset flight parameters; determining a second function of flight position changing with time based on the obstacle avoidance trajectory and the first function; and controlling the drone to fly from an initial position based on the second function and the real-time position of the drone.

[0005] In some embodiments, determining the obstacle avoidance trajectory based on the obstacle detection result includes: determining the position of the obstacle relative to the above-mentioned drone based on the obstacle detection result; determining the position of at least one track point that avoids the above-mentioned obstacle; and fitting the position of the above-mentioned at least one track point to determine the obstacle avoidance trajectory.

[0006] In some embodiments, the first function of the flight speed changing with time is determined based on the obstacle avoidance trajectory and preset flight parameters: the length of the obstacle avoidance trajectory is determined; and the first function is determined based on the length of the obstacle avoidance trajectory and preset flight parameters.

[0007] In some embodiments, the above-mentioned flight parameters include: maximum acceleration, minimum acceleration, acceleration change rate, and maximum speed.

[0008] In some embodiments, the second function for determining the flight position over time based on the obstacle avoidance trajectory and the first function includes: selecting at least one target point from the obstacle avoidance trajectory, and determining the position of the at least one target point; for the target point in the at least one target point, performing the following steps: determining the trajectory length from the initial position to the target point based on the obstacle avoidance trajectory; determining the time to fly from the initial position to the target point based on the trajectory length and the first function; and determining the second function based on the position of the at least one target point and the at least one time determined.

[0009] In some embodiments, the second function is determined based on the position of the at least one target point and the at least one determined time, including: determining the position-time coordinates of the at least one target point based on the position of the at least one target point and the at least one determined time; and fitting the position-time coordinates of the at least one target point to determine the second function.

[0010] In some embodiments, controlling the flight of the UAV according to the second function and the real-time position of the UAV includes: determining the time difference between the current moment and the initial moment during the flight of the UAV; determining the expected flight position corresponding to the current moment according to the second function and the time difference; and controlling the flight of the UAV according to the expected flight position and the current position of the UAV.

[0011] In a second aspect, an embodiment of the present application provides a device for controlling the flight of a drone, comprising: a detection result determination unit, configured to obtain an obstacle detection result for the drone flight environment; an obstacle avoidance trajectory determination unit, configured to determine an obstacle avoidance trajectory based on the above obstacle detection result; a first function determination unit, configured to determine a first function of flight speed changing over time based on the above obstacle avoidance trajectory and preset flight parameters; a second function determination unit, configured to determine a second function of flight position changing over time based on the above obstacle avoidance trajectory and the above first function; and a flight control unit, configured to control the drone to fly from an initial position based on the above second function and the real-time position of the drone.

[0012] In some embodiments, the obstacle avoidance trajectory determination unit is further configured to: determine the position of the obstacle relative to the drone based on the obstacle detection result; determine the position of at least one track point that avoids the obstacle; and fit the position of the at least one track point to determine the obstacle avoidance trajectory.

[0013] In some embodiments, the first function determination unit is further configured to: determine the length of the obstacle avoidance trajectory; and determine the first function according to the length of the obstacle avoidance trajectory and preset flight parameters.

[0014] In some embodiments, the above-mentioned flight parameters include: maximum acceleration, minimum acceleration, acceleration change rate, and maximum speed.

[0015] In some embodiments, the second function determination unit is further configured to: select at least one target point from the obstacle avoidance trajectory, and determine the position of the at least one target point; for the target point among the at least one target point, perform the following steps: determine the trajectory length from the initial position to the target point according to the obstacle avoidance trajectory; determine the time to fly from the initial position to the target point according to the trajectory length and the first function; determine the second function according to the position of the at least one target point and the at least one determined time.

[0016] In some embodiments, the second function determination unit is further configured to: determine the position-time coordinates of the at least one target point based on the position of the at least one target point and the determined at least one time; and fit the position-time coordinates of the at least one target point to determine the second function.

[0017] In some embodiments, the flight control unit is further configured to: determine the time difference between the current moment and the initial moment during the flight of the drone; determine the expected flight position corresponding to the current moment based on the second function and the time difference; and control the flight of the drone based on the expected flight position and the current position of the drone.

[0018] In a third aspect, an embodiment of the present application provides a device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any embodiment of the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the first aspect.

[0020] The method and device for controlling the flight of a drone provided by the above-mentioned embodiments of the present application can first obtain the obstacle detection results for the drone flight environment. Then, based on the obstacle detection results, determine the obstacle avoidance trajectory. And based on the obstacle avoidance trajectory and the preset flight parameters, determine the first function of the flight speed changing with time. Based on the obstacle avoidance trajectory and the first function, determine the second function of the flight position changing with time. Finally, based on the second function and the real-time position of the drone, control the drone to fly from the initial position. The method for controlling the flight of a drone of this embodiment can control the drone to smoothly avoid obstacles and achieve smooth flight. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0022] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present application may be applied;

[0023] Figure 2 is a flow chart of an embodiment of a method for controlling the flight of a drone according to the present application;

[0024] Figure 3 is a schematic diagram of an application scenario of the method for controlling the flight of a drone according to the present application;

[0025] Figure 4 is a flow chart of another embodiment of a method for controlling the flight of a drone according to the present application;

[0026] Figure 5 is a graph showing acceleration changing over time in the method for controlling the flight of a drone of the present application;

[0027] Figure 6 is a schematic structural diagram of an embodiment of a device for controlling the flight of a drone according to the present application;

[0028] Figure 7 It is a structural diagram of a computer system suitable for implementing the device of the embodiment of the present application. DETAILED DESCRIPTION

[0029] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of a method for controlling takeoff of a drone or an apparatus for controlling takeoff of a drone of the present application can be applied.

[0032] like Figure 1 As shown, the system architecture 100 may include a drone 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the drone 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0033] The drone 101 can interact with the server 103 through the network 102, for example, receiving a signal from the server 103, and can also send its own parameters to the server 103. The drone 101 can be equipped with an accelerometer, a gyroscope or other related sensors to sense the parameters of the drone 101. The drone 101 can be a drone capable of autonomous flight, that is, a drone capable of flying according to a specified flight trajectory without relying on the control of the server 103.

[0034] The server 103 may be a server that provides various services, such as a background server that provides support for the drone 101. The background server may analyze and process the received data such as parameters of the drone 101, and feed back the processing results (such as a function of the flight position changing over time) to the drone 101.

[0035] It should be noted that the server 103 can be hardware or software. When the server 103 is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (for example, for providing distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.

[0036] It should be noted that the method for controlling the take-off of a drone provided in the embodiment of the present application can be executed by the drone 101 itself or by the server 103. Accordingly, the device for controlling the take-off of a drone can be set in the drone 101 itself or in the server 103.

[0037] It should be understood that Figure 1 The number of drones, networks, and servers in the embodiment is only for illustration. Any number of drones, networks, and servers may be provided as required.

[0038] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for controlling the flight of a drone according to the present application. The method for controlling the flight of a drone in this embodiment includes the following steps:

[0039] Step 201, obtaining obstacle detection results for the UAV flight environment.

[0040] In this embodiment, the execution subject (eg Figure 1 The drone 101 or server 103 shown in the figure can obtain the obstacle detection result for the drone flight environment through a wired connection or a wireless connection. It is understandable that various sensors or image acquisition devices can be installed on the drone to collect the flight environment information of the drone. When the execution subject of this embodiment is a drone, the drone can directly analyze the above-mentioned flight environment information to determine the obstacle detection result of the flight environment. When the execution subject of this embodiment is a server, the acquisition device installed on the drone can send the collected flight environment information to the server for the server to determine the obstacle detection result of the flight environment. Alternatively, the drone can directly send the obstacle detection result of the flight environment to the server. It is understandable that the above-mentioned obstacle detection result may include information such as the type of obstacle, the position relative to the drone, and the moving speed.

[0041] It should be noted that the above-mentioned wireless connection methods may include but are not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0042] Step 202: Determine an obstacle avoidance trajectory based on the obstacle detection result.

[0043] In this embodiment, after determining the obstacle detection result, the execution subject can use various algorithms to determine the obstacle avoidance trajectory. For example, the execution subject can first extract the feature points of the obstacle, and then use the obstacle avoidance path planning algorithm (such as Dubins path planning algorithm, Clothoid path planning algorithm, PH path planning algorithm) to determine the obstacle avoidance trajectory. Specifically, the execution subject can first determine the positions of multiple track points, and then perform curve fitting on the positions of the multiple track points to obtain the obstacle avoidance trajectory.

[0044] Step 203: Determine a first function of the flight speed varying with time according to the obstacle avoidance trajectory and preset flight parameters.

[0045] In this embodiment, the execution subject can determine the first function of the change of flight speed over time based on the obstacle avoidance trajectory and preset flight parameters. The above-mentioned flight parameters may include but are not limited to the maximum acceleration, the minimum acceleration, the acceleration change rate, the maximum speed, the flight altitude, etc. The execution subject can pre-set the function of the change of acceleration over time. Then, based on the number of track points included in the obstacle avoidance trajectory or the length of the obstacle avoidance trajectory, combined with the function of the change of acceleration over time, the flight time required to complete the obstacle avoidance trajectory is determined. At the same time, the change of flight speed during the above-mentioned flight time is determined. The change of flight speed during the flight time is the first function.

[0046] Step 204: Determine a second function of the flight position changing with time based on the obstacle avoidance trajectory and the first function.

[0047] In this embodiment, after determining the first function, the execution subject can combine the obstacle avoidance trajectory to determine the second function of the flight position changing over time. Specifically, after determining the obstacle avoidance trajectory and the first function, the execution subject can determine when the drone flies to where on the obstacle avoidance trajectory, thereby determining the second function of the flight position changing over time.

[0048] Step 205, controlling the UAV to fly from the initial position according to the second function and the real-time position of the UAV.

[0049] After the execution subject determines the second function of the flight position changing with time, the desired position of the drone can be determined at any time. Then, the drone is controlled to fly from the initial position according to the real-time position of the drone. It can be understood that at each moment, the execution subject can control the drone to move from the current position to the desired position. Specifically, the execution subject can use various algorithms to control the flight position of the drone. The above algorithm may include a PID algorithm (proportional-integral-derivative algorithm).

[0050] Continue to see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of an application scenario of the method for controlling the flight of a drone according to this embodiment. Figure 3 In the application scenario, the sensors and image sensors installed on the drone collect information about the drone's flight environment. The drone determines obstacles in the drone's flight environment based on the collected information. Then, the processing of steps 202 to 204 is performed to determine a second function of the flight position changing over time. Then, based on the second function and the real-time position of the drone, the drone is controlled to fly from the initial position. This enables the drone to fly online in a curved line.

[0051] The method for controlling the flight of a drone provided by the above-mentioned embodiment of the present application can first obtain the obstacle detection result for the drone flight environment. Then, based on the obstacle detection result, determine the obstacle avoidance trajectory. And based on the obstacle avoidance trajectory and the preset flight parameters, determine the first function of the flight speed changing with time. Based on the obstacle avoidance trajectory and the first function, determine the second function of the flight position changing with time. Finally, based on the second function and the real-time position of the drone, control the drone to fly from the initial position. The method for controlling the flight of a drone of this embodiment can control the drone to smoothly avoid obstacles and achieve smooth flight.

[0052] Continue to see Figure 4 , which shows a process 400 of another embodiment of the method for controlling the flight of a drone according to the present application. Figure 4 As shown, the method for controlling the flight of a drone in this embodiment includes the following steps:

[0053] Step 401, obtaining obstacle detection results for the UAV flight environment.

[0054] The principle of step 401 is similar to that of step 201 and will not be described again here.

[0055] Step 402: Determine the position of the obstacle relative to the drone based on the obstacle detection result.

[0056] In this embodiment, the execution subject can determine the position of the obstacle relative to the drone based on the obstacle detection result. It is understandable that the obstacle detection result may include information such as the type of obstacle, the position relative to the drone, and the moving speed.

[0057] Step 403: determine the position of at least one track point that avoids obstacles.

[0058] Based on the position of the obstacle relative to the drone, various path planning algorithms can be used to determine the position of at least one track point that avoids the obstacle. For example, the execution entity can determine the positions of 50 track points within a preset distance of the drone.

[0059] Step 404: Fit the position of at least one track point to determine an obstacle avoidance trajectory.

[0060] The execution subject can use various fitting algorithms to fit the position of at least one track point to obtain a fitting curve with each track point. This fitting curve is the curve trajectory function f(x,y,z), where x0≤x≤x1, y0≤y≤y1, z0≤z≤z1. (x0,y0,z0) is the initial position of the drone, x1 is the observable distance of the drone in the x-axis direction, y1 is the observable distance of the drone in the y-axis direction, and z1 is the observable distance of the drone in the z-axis direction. This fitting curve f(x,y,z) is the obstacle avoidance trajectory. It can be understood that the drone can avoid obstacles by flying along the obstacle avoidance trajectory.

[0061] Step 405, determining the length of the obstacle avoidance trajectory.

[0062] After obtaining the above obstacle avoidance trajectory f(x, y, z), the execution subject can use the first type curve integral to obtain the length L of the obstacle avoidance trajectory, where L = ∫f(x, y, z)ds.

[0063] Step 406, determining a first function according to the length of the obstacle avoidance trajectory and preset flight parameters.

[0064] The execution entity can determine the first function according to the length of the obstacle avoidance trajectory and the preset flight parameters. The above-mentioned flight parameters may include the maximum acceleration a1, the minimum acceleration a2, the acceleration change rate k, and the maximum speed v0. It can be understood that a1 is a positive value, a2 is a negative value, k can be a fixed value or a variable value, and v0 is a positive value. When k is a variable value, it can be a function k(t) that changes with time t. It can be understood that the slope of k(t) can be a curve function whose absolute value is less than a preset threshold.

[0065] For example, the absolute value of k can be a fixed value. The acceleration versus time curve can be as follows: Figure 5 The acceleration can be expressed by the following formula (1).

[0066]

[0067] From the above formula (1), we can get:

[0068]

[0069] Integrating the above acceleration function gives the velocity function (Formula (3)):

[0070]

[0071] Combined with the velocity boundary condition v(t3)=v0, we can get:

[0072]

[0073] Similarly,

[0074]

[0075] Further get the function of velocity changing with time:

[0076]

[0077] According to the conditions The time parameter of the uniform speed process can be obtained as t4-t3=Δt.

[0078] Then the time parameter in formula (6) is:

[0079]

[0080]

[0081] Step 407: Select at least one target point from the obstacle avoidance trajectory, and determine the position of the at least one target point.

[0082] After determining the first function, the execution subject can select at least one target point from the obstacle avoidance trajectory f(x, y, z). And determine the position P(x p ,y p ,z p ).

[0083] Step 408, for at least one target point, perform the following steps: determine the trajectory length from the initial position to the target point based on the obstacle avoidance trajectory; determine the time to fly from the initial position to the target point based on the trajectory length and the first function.

[0084] After determining the position of each target point, the first type of curve integration can be used to obtain the distance from the initial position (x0, y0, z0) to P (x p ,y p ,z p ) The trajectory length can be calculated by formula (7):

[0085]

[0086] Combined with the path length, the time to reach the target point can be obtained by integrating the speed function. According to the formula You can get the time t p .

[0087] Step 409: determine a second function according to the position of at least one target point and the determined at least one time.

[0088] After determining the position of each target point and the time to reach each target point, the second function can be determined.

[0089] In some optional implementations of this embodiment, the execution subject can Figure 4 The second function is determined by the following steps not shown in the figure: determining the position-time coordinates of at least one target point according to the position of at least one target point and at least one determined time; fitting the position-time coordinates of at least one target point to determine the second function.

[0090] In this implementation, the execution subject can combine the position of each target point and the time to the target point to obtain the position-time coordinates of each target point. Then, the execution subject can fit the position-time coordinates to determine the second function. Specifically, the execution subject can fit the position-time coordinates to obtain the function of the three coordinates of the target point changing with time:

[0091]

[0092] Step 410, during the flight of the drone, determine the time difference between the current moment and the initial moment.

[0093] After determining the second function, during the flight of the drone, the time difference t between the current moment and the initial moment can be determined first. n .

[0094] Step 411, determining the expected flight position corresponding to the current moment according to the second function and the time difference.

[0095] Then, the execution subject can convert the above time difference t n Substitute into the second function to determine the expected flight position (x(t n ),y(t n ),z(t n )).

[0096] Step 412, controlling the flight of the drone according to the desired flight position and the current position of the drone.

[0097] Finally, the execution subject can use the PID algorithm to perform curved flight control according to the desired flight position and the current position of the drone.

[0098] The method for controlling the flight of a drone provided by the above-mentioned embodiments of the present application can reduce the sense of hysteresis during the flight of the drone, enable the drone to perform coherent flight actions, and improve the stability during the flight.

[0099] Further references Figure 6As an implementation of the methods shown in the above figures, the present application provides an embodiment of a device for controlling the flight of a drone, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0100] like Figure 6 As shown, the device 600 for controlling the flight of a drone in this embodiment includes: a detection result determination unit 601, an obstacle avoidance trajectory determination unit 602, a first function determination unit 603, a second function determination unit 604 and a flight control unit 605.

[0101] The detection result determination unit 601 is configured to obtain obstacle detection results for the UAV flight environment.

[0102] The obstacle avoidance trajectory determination unit 602 is configured to determine an obstacle avoidance trajectory according to the obstacle detection result.

[0103] The first function determination unit 603 is configured to determine a first function of the flight speed varying with time according to the obstacle avoidance trajectory and preset flight parameters.

[0104] The second function determination unit 604 is configured to determine a second function of the flight position changing with time according to the obstacle avoidance trajectory and the first function.

[0105] The flight control unit 605 is configured to control the UAV to fly from an initial position according to the second function and the real-time position of the UAV.

[0106] In some optional implementations of this embodiment, the obstacle avoidance trajectory determination unit 602 can be further configured to: determine the position of the obstacle relative to the drone based on the obstacle detection result; determine the position of at least one track point for avoiding the obstacle; and fit the position of at least one track point to determine the obstacle avoidance trajectory.

[0107] In some optional implementations of this embodiment, the first function determination unit 603 may be further configured to: determine the length of the obstacle avoidance trajectory; and determine the first function according to the length of the obstacle avoidance trajectory and preset flight parameters.

[0108] In some optional implementations of this embodiment, the flight parameters include: maximum acceleration, minimum acceleration, acceleration change rate, and maximum speed.

[0109] In some optional implementations of this embodiment, the second function determination unit 604 can be further configured to: select at least one target point from the obstacle avoidance trajectory, and determine the position of at least one target point; for the target point among the at least one target point, perform the following steps: determine the trajectory length from the initial position to the target point based on the obstacle avoidance trajectory; determine the time to fly from the initial position to the target point based on the trajectory length and the first function; determine the second function based on the position of at least one target point and at least one determined time.

[0110] In some optional implementations of this embodiment, the second function determination unit 604 can be further configured to: determine the position-time coordinates of at least one target point based on the position of at least one target point and at least one determined time; and fit the position-time coordinates of at least one target point to determine the second function.

[0111] In some optional implementations of this embodiment, the flight control unit 605 is further configured to: during the flight of the UAV, determine the time difference between the current moment and the initial moment; determine the expected flight position corresponding to the current moment based on the second function and the time difference; and control the flight of the UAV based on the expected flight position and the current position of the UAV.

[0112] It should be understood that the units 601 to 605 described in the device 600 for controlling the flight of an unmanned aerial vehicle are respectively the same as those described in reference 6. Figure 2 Therefore, the operations and features described above for the method for controlling the flight of a drone are also applicable to the device 600 and the units contained therein, and will not be described in detail here.

[0113] Reference below Figure 7 , which shows an electronic device (eg, Figure 1 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The terminal device / server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0114] like Figure 7As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0115] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7 The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 7 Each block shown in the figure may represent one device, or may represent multiple devices as required.

[0116] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through a communication device 709, or installed from a storage device 708, or installed from a ROM 702. When the computer program is executed by the processing device 701, the above functions defined in the method of the embodiment of the present disclosure are executed. It should be noted that the computer-readable medium described in the embodiment of the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In an embodiment of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus, or a device. In an embodiment of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus, or a device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wire, optical cable, RF (radio frequency), etc., or any suitable combination of the foregoing.

[0117] The computer-readable medium may be included in the electronic device; or it may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains obstacle detection results for the flight environment of the UAV; determines an obstacle avoidance trajectory according to the obstacle detection results; determines a first function of the flight speed changing with time according to the obstacle avoidance trajectory and preset flight parameters; determines a second function of the flight position changing with time according to the obstacle avoidance trajectory and the first function; and controls the UAV to fly from the initial position according to the second function and the real-time position of the UAV.

[0118] Computer program code for performing the operations of embodiments of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as a separate software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a detection result determination unit, an obstacle avoidance trajectory determination unit, a first function determination unit, a second function determination unit and a flight control unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the detection result determination unit may also be described as a "unit for obtaining obstacle detection results for the drone flight environment".

[0121] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) to form a technical solution.

Claims

1. A method for controlling the flight of an unmanned aerial vehicle, comprising: Obtain obstacle detection results for the drone's flight environment; Determining an obstacle avoidance trajectory according to the obstacle detection result; determining a length of the obstacle avoidance trajectory; Determining the flight time required to complete the obstacle avoidance trajectory based on the length and an expression of a curve of acceleration versus time preset according to flight parameters; Determine a first function of the flight speed varying with time based on the flight time and the expression, wherein the flight parameter is a parameter that affects the acceleration and / or speed of the drone; Determine a second function of the change of the flight position over time according to the obstacle avoidance trajectory and the first function; According to the second function and the real-time position of the UAV, the UAV is controlled to fly from an initial position.

2. The method according to claim 1, wherein: Determining the obstacle avoidance trajectory according to the obstacle detection result includes: Determining the position of the obstacle relative to the drone based on the obstacle detection result; determining a position of at least one track point that avoids the obstacle; The position of the at least one track point is fitted to determine an obstacle avoidance trajectory.

3. The method according to claim 1, wherein: The flight parameters include: maximum acceleration, minimum acceleration, acceleration change rate, and maximum speed.

4. The method according to claim 1, wherein: Determining a second function of a flight position changing over time according to the obstacle avoidance trajectory and the first function includes: Selecting at least one target point from the obstacle avoidance trajectory, and determining a position of the at least one target point; For a target point among the at least one target point, the following steps are performed: determining a trajectory length from the initial position to the target point according to the obstacle avoidance trajectory; determining a time to fly from the initial position to the target point according to the trajectory length and the first function; The second function is determined based on the position of the at least one target point and the determined at least one time.

5. The method according to claim 4, wherein: The determining the second function according to the position of the at least one target point and the determined at least one time comprises: Determine the position time coordinate of the at least one target point according to the position of the at least one target point and the determined at least one time; The position-time coordinates of the at least one target point are fitted to determine the second function.

6. The method according to claim 1, wherein: The step of controlling the flight of the drone according to the second function and the real-time position of the drone comprises: During the flight of the drone, determining a time difference between a current moment and an initial moment; determining an expected flight position corresponding to the current moment according to the second function and the time difference; The UAV is controlled to fly according to the expected flight position and the current position of the UAV.

7. A device for controlling the flight of an unmanned aerial vehicle, comprising: A detection result determination unit, configured to obtain an obstacle detection result for the UAV flight environment; an obstacle avoidance trajectory determination unit, configured to determine an obstacle avoidance trajectory according to the obstacle detection result; A first function determination unit, configured to determine the length of the obstacle avoidance trajectory; Determine the flight time required to complete the obstacle avoidance trajectory based on the length and an expression of a curve of acceleration versus time preset according to a flight parameter; determine a first function of a flight speed versus time based on the flight time and the expression, wherein the flight parameter is a parameter that affects the acceleration and / or speed of the drone; A second function determination unit is configured to determine a second function of a flight position changing with time according to the obstacle avoidance trajectory and the first function; The flight control unit is configured to control the UAV to fly from an initial position according to the second function and the real-time position of the UAV.

8. A device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, wherein: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.