Unmanned aerial vehicle management method and device, electronic equipment and readable storage medium

By establishing shadow services in the drone cluster for real-time storage and detection of status and task data, the drone task data is automatically transferred, which solves the problem of cumbersome task transfer steps in the drone failure and improves the drone cluster's Automation level and response speed.

CN119148729APending Publication Date: 2024-12-17BEIJING DIGITAL HEAVEN INFORMATION & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411136414.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, drone clusters have cumbersome tasks when a single drone fails, and manual intervention is required to re-plan tasks and issue instructions, resulting in inefficiency and high risk of task interruption.

Method used

By establishing a shadow service mapping relationship between the drone and the server side, storing and detecting drone status and task data in real time, automatically detecting abnormal states and selecting candidate drones for task data transfer, avoiding manual intervention and ensuring task continuity and efficiency .

Benefits of technology

The automated transfer and response speed of drone cluster tasks have been achieved, reducing the risk of task interruption, eliminating the steps of manual intervention, and improving the automation level of drone clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119148729A_ABST
    Figure CN119148729A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things, and provides an unmanned aerial vehicle management method and device, electronic equipment and a readable storage medium. The method comprises the following steps: acquiring shadow services corresponding to each unmanned aerial vehicle; performing state detection on each unmanned aerial vehicle according to the state data stored in each shadow service, and when an abnormal unmanned aerial vehicle with an abnormal state is detected, determining a target unmanned aerial vehicle according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal unmanned aerial vehicle; and the shadow service corresponding to the abnormal unmanned aerial vehicle sends the task data to the target shadow service corresponding to the target unmanned aerial vehicle, so that the target shadow service sends the task data to the target unmanned aerial vehicle, the target unmanned aerial vehicle continues to execute the task corresponding to the task data based on the task data, and task data transfer is automatically completed through the shadow service. Manual intervention is avoided, and the automation level and the response speed of task execution of the unmanned aerial vehicle cluster are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a management method, device, electronic device and readable storage medium for drones. Background Art

[0002] The Internet of Things aims to achieve the interconnection of all things by integrating various network technologies such as body area networks, device-to-device communication (D2D communication), and satellite networks. It can provide any service at any location and using any network, and has huge potential for civil and military applications. Drones also play an extremely important role in the field of the Internet of Things due to their dynamic deployment, convenient configuration, and high degree of autonomy. Drones can collect data or perform other remote tasks through onboard Internet of Things devices (including sensors and cameras). With the continuous deepening and rapid development of Internet of Things applications, the application of Internet of Things drones has gradually developed from a single task service to many task services completed by drone clusters (such as urban pollution monitoring, prevention and control of geological disasters, military "swarm" drone technology, etc.), which can complete Internet of Things tasks that a single drone cannot complete due to limited energy and computing resources. However, in the existing technology, if a single drone in a drone cluster fails, it is necessary to first find a suitable drone and re-issue the command. After a single drone fails, manual intervention is required to transfer the task. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a drone management method, device, electronic device and readable storage medium to solve the problem in the prior art that the task transfer steps are complicated when a drone fails.

[0004] According to a first aspect of an embodiment of the present application, a method for managing a drone is provided, comprising: obtaining a shadow service corresponding to each drone, the shadow service being used to store status data and mission data of the drone;

[0005] Perform status detection on each drone according to the status data stored in each shadow service. When an abnormal drone with an abnormal status is detected, determine the target drone according to the status data in each candidate shadow service and the status data in the shadow service corresponding to the abnormal drone.

[0006] A first indication message is sent to the shadow service corresponding to the abnormal UAV, and the first indication message is used to instruct the shadow service corresponding to the abnormal UAV to send the task data to the target shadow service corresponding to the target UAV, so that the target shadow service sends the task data to the target UAV, and the target UAV continues to execute the task corresponding to the task data based on the task data.

[0007] A second aspect of the embodiments of the present application provides a management device for a drone, including:

[0008] An acquisition module is configured to acquire a shadow service corresponding to each drone, where the shadow service is used to store status data and mission data of the drone;

[0009] A state detection module is configured to perform state detection on each drone according to the state data stored in each shadow service, and when an abnormal drone with an abnormal state is detected, determine the target drone according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal drone;

[0010] The task handover module is configured to send a first indication message to the shadow service corresponding to the abnormal UAV, and the first indication message is used to instruct the shadow service corresponding to the abnormal UAV to send the task data to the target shadow service corresponding to the target UAV, so that the target shadow service sends the task data to the target UAV, and the target UAV continues to execute the task corresponding to the task data based on the task data.

[0011] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0012] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0013] Compared with the prior art, the beneficial effects of the embodiments of the present application are as follows: by establishing a mapping relationship between each drone and the shadow service on the server side, each drone has a shadow service corresponding to it on the server side, which runs on the server and can be used to store the drone's status data (such as location, power, flight status, etc.) and task data (such as flight path, target data, task instructions, etc.). The drone status and task data are updated and stored in real time through the shadow service, providing a basis for subsequent intelligent decision-making. The server performs real-time status detection on the status data stored by each shadow service, and realizes status detection of each drone by performing real-time status detection on the status data stored by each shadow service, automatically detecting whether the drone is in an abnormal state, and can timely discover the abnormal situation of the drone, reducing the risk of task interruption. When an abnormal state of a drone is detected, a candidate drone in an idle state is automatically selected as the target drone according to the status data of the candidate shadow service corresponding to the candidate drone and the status data in the abnormal shadow service corresponding to the abnormal drone, and the shadow service corresponding to the target drone is determined as the target shadow service. The server sends a first instruction message to the shadow service of the abnormal drone, instructing the abnormal shadow service of the abnormal drone to send the task data to the shadow service of the target drone, and the shadow service of the target drone sends the task data to the target drone, and the target drone continues to perform the original task based on the received task data. The shadow service automatically completes the transfer of task data, avoids manual intervention, ensures the continuity and efficiency of the task, solves the problem of cumbersome task transfer steps in the prior art when a drone fails, saves the cumbersome process of manually re-planning tasks and re-issuing instructions, and greatly improves the automation level and response speed of drone cluster task execution. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0015] Figure 1 It is a flowchart of a method for managing a drone provided in an embodiment of the present application;

[0016] Figure 2 It is a structural schematic diagram of a drone management device provided in an embodiment of the present application;

[0017] Figure 3 is a flow chart of another method for managing a drone provided in an embodiment of the present application;

[0018] Figure 4 It is a structural schematic diagram of another drone management device provided in an embodiment of the present application;

[0019] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0021] A method and device for managing a drone according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0022] Figure 1 FIG. 1 is a flow chart of a method for managing a drone provided in an embodiment of the present application. Figure 1 As shown, the management method of the drone includes:

[0023] Step 101, obtain the shadow service corresponding to each drone, the shadow service is used to store the status data and mission data of the drone.

[0024] In some embodiments, in the management of drone clusters, obtaining the shadow service corresponding to each drone can be the basis for building an intelligent and automated drone cluster management system. On the server side, the shadow service is a virtual body of the drone server side. Each drone is set up with a corresponding shadow service on the server side. The shadow service can provide a virtual mirror or proxy for each drone to store and reflect the status data and task data of the drone in real time. Each drone continuously sends real-time status data to the corresponding shadow service. The status data includes power, position, flight speed, flight attitude information, etc., to achieve real-time status information synchronization. The status data of each drone can be stored in the corresponding shadow service, so that even if the drone temporarily loses connection, the shadow service can retain its last known state. The task data may include flight arrival position, deployment information, etc. The task data is very important for the execution of drone tasks. The client sends the task data to the shadow service corresponding to each drone, and sends it to the corresponding drone through the shadow service, which helps each drone to perform tasks according to the predetermined plan to achieve the management of the drone cluster. At the same time, the task data will also be stored in the shadow service. The status data and task data of the drone are stored in the shadow service in JavaScript Object Notation (JSON). In the embodiment of the present application, the shadow service corresponding to the drone can receive status updates from the drone, send commands to the drone, receive data from the client and send corresponding data to the client, so as to realize remote control and management of the drone cluster. By real-time monitoring of the shadow service corresponding to each drone, the real-time status detection of each drone is realized. After detecting that the drone status is abnormal, the server can automatically select a drone with a suitable location as a replacement based on the status data stored in the shadow service of other candidate drones, so as to realize rapid task transfer, send the task data of the abnormal drone to the shadow service of the candidate drone, and the latter will send the task data to the candidate drone, so as to realize seamless handover of task data and seamless connection of drone tasks, and solve the problem of requiring active intervention by the operator.

[0025] Step 102, perform status detection on each drone based on the status data stored in each shadow service. When an abnormal drone with an abnormal status is detected, determine the target drone based on the status data in each candidate shadow service and the status data in the shadow service corresponding to the abnormal drone.

[0026] In some embodiments, each shadow service stores the status data of the corresponding drone, and the server performs real-time status detection on the status data stored in each shadow service to realize status detection of each drone. Specifically, the status detection can compare the target parameter in the current status data with the preset threshold value corresponding to the target parameter. When a target parameter of the status data in the shadow service exceeds the preset threshold value, the shadow service is determined to be an abnormal shadow service, and the corresponding drone is an abnormal drone, thereby realizing automatic identification of abnormal drones in the drone cluster. For example, the above-mentioned target parameter can be power, and the corresponding target parameter exceeding the preset threshold value can be too low power. The candidate drone can be all the drones in the idle state near the abnormal drone. The candidate shadow service corresponding to the candidate drone stores the status data of the candidate drone. According to the preset rules or algorithms (such as the closest distance), based on the status data in each candidate shadow service and the status data in the shadow service corresponding to the abnormal drone, the most suitable candidate drone can be selected as the target drone. After determining the target drone, the shadow service corresponding to the abnormal drone sends the task data of the abnormal drone to the shadow service of the target drone, and then forwards the task data to the target drone, realizing automatic handover of the task and inheritance of the task. Through the above steps, the status data of drones can be automatically detected, and abnormal drones can be quickly identified and target drones can be automatically selected, reducing the need for manual monitoring and operation, while shortening the time required for task transfer. Automated task handover facilitates the continuous execution of tasks. Even in the event of a drone failure, task execution can be quickly restored through shadow services, effectively solving the cumbersome problem of task transfer after a drone failure in the existing technology, and improving the intelligence and automation level of drone cluster management.

[0027] Step 103, sending a first indication message to the shadow service corresponding to the abnormal UAV, the first indication message is used to instruct the shadow service corresponding to the abnormal UAV to send the task data to the target shadow service corresponding to the target UAV, so that the target shadow service sends the task data to the target UAV, and the target UAV continues to execute the task corresponding to the task data based on the task data.

[0028] In some embodiments, the first indication information instructs the shadow service of the abnormal drone to send the stored task data (including the details of the currently executed task, the flight path, the flight arrival position, etc.) to the shadow service determined as the target drone. After receiving the task data, the shadow service of the target drone sends the task data to the target drone, so that the target drone can continue to perform the original task based on the received task data, and achieve seamless connection of tasks. In the prior art, when a drone in a cluster fails, it is usually necessary to go through a series of cumbersome steps such as manual detection, evaluation, selection of alternative drones, and re-planning of task paths to complete the task transfer. The process is time-consuming and may also cause task interruption or delay, reducing the efficiency of task execution. Through the drone management method of the present application, abnormal drones can be automatically identified, target drones can be automatically selected, and task data can be automatically transferred. The entire process does not require human participation. At the same time, the automated process significantly speeds up the speed of task transfer, helps the continuous execution of tasks, and improves the overall efficiency and success rate of task execution.

[0029] Based on the management method of drones proposed in this application, by establishing a mapping relationship between each drone and the shadow service on the server side, each drone has a shadow service corresponding to it on the server side. The service runs on the server and can be used to store the drone's status data (such as location, power, flight status, etc.) and task data (such as flight path, target data, task instructions, etc.). The drone status and task data are updated and stored in real time through the shadow service to provide a basis for subsequent intelligent decision-making. The server performs real-time status detection on the status data stored by each shadow service, and realizes the status detection of each drone by performing real-time status detection on the status data stored by each shadow service. It automatically detects whether the drone is in an abnormal state, and can timely discover the abnormal situation of the drone, reducing the risk of task interruption. After detecting that a drone is abnormal, according to the status data of the candidate shadow service corresponding to the candidate drone and the status data in the abnormal shadow service corresponding to the abnormal drone, an idle candidate drone is automatically selected as the target drone, and the shadow service corresponding to the target drone is determined as the target shadow service. The server sends a first instruction message to the shadow service of the abnormal drone, instructing the abnormal shadow service of the abnormal drone to send the task data to the shadow service of the target drone, and the shadow service of the target drone sends the task data to the target drone, and the target drone continues to perform the original task based on the received task data. The shadow service automatically completes the transfer of task data, avoids manual intervention, ensures the continuity and efficiency of the task, solves the problem of cumbersome task transfer steps in the prior art when a drone fails, eliminates the cumbersome process of manually re-planning tasks and re-issuing instructions, and greatly improves the automation level and response speed of drone cluster task execution.

[0030] In some embodiments, obtaining the shadow service corresponding to each drone includes:

[0031] Receive identification information of each drone, and generate shadow services corresponding to each drone according to the identification information of each drone and the shadow template corresponding to each identification information; drones with the same identification correspond to one shadow template;

[0032] Each shadow service establishes a communication connection with the client and the corresponding drone, which is used to receive status data reported by the corresponding drone and receive mission data of the corresponding drone sent by the client.

[0033] In some embodiments, the identification information of the drone may be the model of the drone, and a general drone shadow template is created for drones of the same model. Drones of the same model share the same shadow template, which helps to standardize the processing flow and reduce resource consumption. The shadow template may contain the basic information framework of the drone of this model, such as the basic information of the drone's camera, gimbal, model, etc. Each shadow template presets certain resource requirements, including the required memory, computing power and storage space, which will be allocated on demand when creating a shadow service instance. When a drone with identification information joins a cluster, the shadow template corresponding to the identification information can be called according to the identification information of the drone, and the corresponding resources can be allocated to meet the requirements defined in the template, and the shadow service corresponding to the drone can be quickly instantiated. Each drone in the cluster has a shadow service on the server side. After the shadow service is established, the shadow service establishes a communication connection with the actual drone and the client. The shadow service can receive and store the status data sent by the corresponding drone and the mission data of the corresponding drone sent by the client. The status data includes the location, power, flight speed, etc. of the drone, and the mission data may include the flight arrival position, deployment information, etc. Specifically, the deployment information may be an image of a target vehicle or a target person that needs to be deployed. By establishing communication connections between drones and shadow services, and between shadow services and clients, real-time data interaction between drones, shadow services, and clients is achieved, which helps to smoothly execute and monitor tasks, obtain the status data of each drone in real time, promptly detect drone anomalies and take corresponding solutions to prevent mission interruption. The drone transmits status data to the shadow service in real time, and the shadow service transmits the received drone status data to the client and displays it on the client's display screen, which can more intuitively display the real-time information of the drone.

[0034] In some embodiments, the shadow service and the actual drone can communicate bidirectionally through a lightweight message publish / subscribe (Message Queuing Telemetry Transport, MQTT) protocol. During data transmission, the Protobuf serialization protocol can be used to serialize the transmitted status data and task data instructions. Protobuf uses Varint and ZigZa compression algorithms to make binary data more compact, thereby reducing the amount of data, reducing network IO, and thus reducing the time consumed by network transmission and speeding up transmission.

[0035] In some embodiments, to further improve the reliability and efficiency of communications, an MQTT cluster server can be used to transmit status data and task data. The MQTT cluster server has the characteristics of high throughput and low latency, and can handle a large number of concurrent connections and message transmissions. By link multiplexing and increasing bandwidth, the MQTT cluster server can improve transmission capabilities, which helps drones to stably receive and send data over long distances or in unstable signal environments. The MQTT cluster server can be an enterprise-level message queue extension (Eclipse Middware for the Internet of Things X, EMQX). EMQX is an open source message broker used to handle message transmission between drones and servers. Figure 2As shown, EMQX (message middleware) receives MQTT uplink messages (status data) from drones and forwards the status data to the specified topic, namely ($shadow / operation / ${domain} / ${productId} / ${deviceName}); EMQX is also responsible for receiving MQTT downlink messages (task data) from the server and sending them to drones, namely ($shadow / operation / result / ${domain} / ${productId} / ${deviceName}) to ensure smooth two-way communication. EMQX can form a cluster, and each EMQX instance in the cluster can work together to process a large amount of message data, provide high availability and scalability, and ensure the stability and reliability of message transmission. Shadow microservices can be used to create, update, and obtain the shadow status documents of drones. The documents can be stored in Redis and MongoDB databases and can be used to save and query the status data of drones in real time. Redis and MongoDB can provide data caching and persistent storage functions, so that the status data will not be lost even when the drone is offline. In addition, EMQX can also be used to transmit video streaming data of drones. EMQX supports multiple protocols, including MQTT, WebSockets, and CoAP. Through the EMQX cluster service, efficient message transmission can be achieved to ensure that drones receive mission instructions in a timely manner, such as deployment, early warning, and tracking. Through the Restful API, shadow services and EMQX can realize message transmission. Through WebSocket or Restful API, the client can obtain the status information of the drone from the shadow service to achieve real-time monitoring and visualization of the drone status data. REST (Representational State Transfer) is an architectural style for designing network applications. RESTful API is an interface that follows the REST style.

[0036] In some embodiments, the status of each drone is detected according to the status data stored by each shadow service, including:

[0037] Identify the target parameters in the status data stored by each shadow service, and when the value of the target parameter exceeds the preset threshold value corresponding to the target parameter, determine the corresponding drone as an abnormal drone;

[0038] or,

[0039] When the heartbeat information sent by a drone is not received for more than a first preset time, the drone is determined to be an abnormal drone.

[0040] In some embodiments, each shadow service stores the status data of the corresponding drone, including but not limited to the drone battery power, flight altitude, speed, global positioning system (GPS) coordinates, sensor readings, etc. The key indicator in the status data is the target parameter, which is very important for determining whether the drone is operating normally. One or more preset thresholds are set for each target parameter of the drone. The preset threshold is determined according to factors such as the design specifications of the drone and the flight mission requirements. The preset threshold defines the normal range of the target parameter. Once the value of a parameter exceeds the above range, it means that the drone may have encountered a problem, such as low battery power, sensor failure, etc. The obtained target parameter value is compared with the preset threshold to determine whether it is within the normal range. If any target parameter is detected to exceed its preset threshold, the corresponding drone is determined as an abnormal drone, indicating that the drone may have a fault. In addition to identifying the target parameter, each drone also sends a heartbeat message (Heartbeat) to the corresponding shadow service at regular intervals to confirm the online status. If a heartbeat message sent by a drone is not received for more than a preset time interval (first preset time), the drone is determined as an abnormal drone, indicating that the drone has lost contact or cannot communicate normally. By automating the status detection of drones, drone anomalies can be discovered in a timely manner. When a drone is identified as an abnormal drone, the mission data can be automatically transferred from the abnormal drone to a candidate drone without human intervention, simplifying the task transfer process and achieving rapid handover of tasks.

[0041] In some embodiments, the state data includes location information of the drone, and determining the target drone according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal drone includes:

[0042] According to the location information in each candidate shadow service and the location information in the shadow service corresponding to the abnormal drone, the distance between each candidate drone corresponding to each candidate shadow service and the abnormal drone is calculated, and the candidate drone is a drone that is currently in an idle state or a drone that can switch to an idle state within a preset time;

[0043] According to each distance, the candidate UAV corresponding to the smallest distance value is determined as the target UAV.

[0044] In some embodiments, the location information in the status data is a real-time update of the current coordinates of the drone, and the location information is very important for locating the drone and evaluating its position relative to other drones. The candidate drone is a drone that is currently in an idle state or can complete the task within a preset time and enter an idle state. The distance between all candidate drones and the abnormal drone is calculated, and the candidate drone closest to the abnormal drone is selected as the target drone. The closest target drone can reach the mission area the fastest or take over the task of the abnormal drone most efficiently. Automatically calculating the distance and selecting the closest candidate drone as the target drone not only saves time, but also reduces energy consumption. Through the mechanism of automatically selecting the target drone based on location information, the drone management method proposed in this application can respond to single drone failures more efficiently and intelligently, avoid cumbersome manual task transfer steps, and improve overall efficiency and continuity of task execution.

[0045] In some embodiments, the task data includes executed task data and pending task data, and the shadow service corresponding to the abnormal drone sends the task data to the target shadow service corresponding to the target drone, including:

[0046] The shadow service corresponding to the abnormal drone copies the stored task data to the target shadow service, so that the target shadow service sends the executed task data and the task data to be executed to the target drone, and the target drone continues to execute the task corresponding to the task data according to the task data to be executed.

[0047] In some embodiments, the executed task data may include the details of the tasks that the drone has completed, such as the flight path that has been flown, the images or videos that have been captured, the data collected, etc. The pending task data may include the task instructions that the drone has not yet completed, such as the remaining flight route, the target area, the operations to be performed, etc. When an abnormal drone is detected, the shadow service of the abnormal drone will copy the task data stored in it (including the executed task data and the pending task data) to the target shadow service, and all relevant information will be accurately transmitted. After receiving the copied task data, the target shadow service will synchronize the data to reduce the risk of data loss caused by the abnormal drone failure. The target shadow service will send the executed task data and the pending task data to the target drone, so that the target drone can understand the historical status of the task and the instructions for future tasks. The target drone receives the task data and continues to perform the task according to the pending task data, which helps the continuity and integrity of the task. The above-mentioned automated task data replication and transfer process reduces the dependence on manual intervention and improves the efficiency and accuracy of task transfer.

[0048] In some embodiments, a preset container management tool is used to perform container management on the processing nodes on the server. The preset container management tool includes a Kubernetes tool or a Rancher tool. One processing node corresponds to one or more shadow services.

[0049] In some embodiments, in drone cluster management, a preset container management tool (such as Kubernetes or Rancher) is used to manage containers on processing nodes on the server, which can significantly improve the flexibility, scalability and responsiveness of the method through automation and standardization.

[0050] Specifically, Kubernetes is an open source container orchestration platform that can automatically deploy, expand, and manage containerized applications. In the drone cluster management scenario, Kubernetes can be used to manage shadow services, which helps shadow services run efficiently and stably, regardless of how the number of drones changes. The operation of shadow services depends on server resources, including CPU, memory, and network IO. By monitoring the load of each service node through Kubernetes, it can intelligently determine when to increase or decrease service nodes. The load of a service node is the degree of use of the central processing unit (CPU), graphics processing unit (GPU), or any hardware unit that performs computing tasks. Each drone has a corresponding shadow service for storing the drone's status data and task data. The scheduling task of the shadow service depends on the service node for execution. A service node can correspond to one or more shadow services. A service node is an entity in the system architecture that processes requests, stores data, executes business logic, or provides other services. As the size of the drone cluster expands or shrinks, the number of shadow services also increases or decreases accordingly. Kubernetes has the ability to automatically load balance and scale horizontally, and can dynamically adjust the number of service nodes to cope with changes in the load of the drone cluster. When the drone cluster expands, the load of the service node will increase. For example, when there are 10 drones in the drone cluster, there are five service nodes in total, and each service node corresponds to two shadow services. When the drone cluster increases to 30 drones, each of the five service nodes will correspond to six shadow services. Kubernetes can detect the increase in the load pressure of the service node and automatically start more service nodes to distribute the shadow service load and ensure the response time and stability of each shadow service. When the size of the drone cluster decreases and no longer needs so many service nodes, Kubernetes can automatically reduce the service nodes and release computing, memory and storage resources so that these resources can be reallocated to other services or saved in the resource pool for future use. Through Kubernetes's automated management and resource scaling capabilities, service nodes can flexibly adapt to changes in the size of the drone cluster, optimize resource usage, and avoid over-configuration or insufficient resources. Rancher is an open source Kubernetes management platform that provides a unified interface to manage multiple Kubernetes clusters and can support multi-cloud and hybrid cloud environments. Kubernetes or Rancher can automatically deploy shadow service containers. When new drones are added or the number of drones changes, the shadow services on the processing nodes can be automatically expanded or contracted to adapt to the changing workload.

[0051] In some embodiments, after obtaining the shadow service corresponding to each drone, the method further includes:

[0052] When it is determined that a shadow service has received warning information, one or more coordinated drones of the warning drone corresponding to the warning shadow service are determined based on the status data in each candidate shadow service and the status data in the warning shadow service that has received the warning information;

[0053] A second indication message is sent to the early warning shadow service, and the second indication message is used to instruct the early warning shadow service to send the early warning message to the shadow service corresponding to the cooperative UAV, so that the shadow service corresponding to the cooperative UAV controls the movement of the cooperative UAV based on the early warning message.

[0054] In some embodiments, when a shadow service receives an early warning message, it may indicate that the drone (early warning drone) has discovered a target object that needs to be controlled and needs other drones to assist in completing a specific task. The early warning message may include the location information of the controlled object when it is discovered and the image information of the controlled object taken by the early warning drone. A comprehensive evaluation is performed based on the status data (such as location, power, task status, etc.) in each candidate shadow service and the status data in the early warning shadow service to determine which candidate drones can effectively serve as collaborative drones for support. Based on the evaluation of the status data, one or more candidate drones with close locations and sufficient power can be selected as collaborative drones to ensure that the collaborative drones can respond quickly and provide effective support. The server sends a second indication message to the early warning shadow service, and the second indication message instructs the early warning shadow service to forward the early warning message to the collaborative shadow service corresponding to the collaborative drone. The collaborative shadow service generates collaborative task data based on the early warning information, and the collaborative shadow service sends the collaborative task data to the corresponding collaborative drone, so that the collaborative drone performs corresponding actions based on the received collaborative task data, such as changing the flight route, searching or shooting, etc. Through the information transmission between shadow services, task coordination between drones is realized, the overall operation capability of the drone cluster is enhanced, and the overall efficiency and task completion of the drone cluster are improved.

[0055] In some embodiments, a method for managing a drone is applied to a shadow service, wherein the mission data includes control data and mission instructions, including:

[0056] Receive the mission data of the corresponding drone sent by the client, and send the mission data to the drone, where each shadow service corresponds to a drone, and the mission data includes deployment data and mission instructions. The drone collects surrounding environment data according to the mission instructions, and compares the surrounding environment data with the deployment data. If the comparison result shows that the surrounding environment matches the deployment data, it sends warning information to the shadow service;

[0057] Receive the receiving confirmation command sent by the drone after receiving the mission data, and send the receiving confirmation command to the client;

[0058] Receive the warning information sent by the drone and send it to the client, which will display it on the display page.

[0059] In some embodiments, the shadow service receives the task data sent by the client, and the task data includes control data and task instructions. The control data can be an image of the target object to be controlled, and the task instruction can be the flight path, collection frequency, etc. of the drone. The task target and execution details of the drone are clarified by receiving the task data. The shadow service sends the received task data to the corresponding drone. After receiving the task data, the drone sends a reception confirmation instruction to the shadow service to confirm that the task instruction has been received and is ready to be executed. The shadow service then forwards the reception confirmation instruction to the client to let the client know that the task has been successfully issued. The drone starts to execute the task according to the task instruction, for example, flying along a specified route, collecting surrounding environment data and comparing it with the control data. If it is determined that the surrounding environment matches the control data, that is, the target is identified or the special conditions are met, the drone sends an early warning message to the shadow service. After receiving the early warning message sent by the drone, the shadow service immediately sends the early warning message to the client, and the client displays the early warning message on the display page, so that the operator can monitor the execution of the drone in real time and respond to the early warning message in time.

[0060] In some embodiments, reference Figure 3 ,A drone management method is applied to drones, shadow services and clients, characterized in that,

[0061] Step 301, the client sends the drone's mission data to the shadow service corresponding to the drone;

[0062] Step 302, the shadow service sends the task data to the corresponding drone;

[0063] Step 303, the drone sends a reception confirmation command to the shadow service;

[0064] Step 304, the shadow service sends a receipt confirmation instruction to the client;

[0065] Step 305, the UAV collects surrounding environment data according to the mission instruction in the mission data, and compares the surrounding environment data with the control data in the mission data to obtain a comparison result;

[0066] Step 306, when the comparison result shows that the surrounding environment matches the control data, the drone sends a warning message to the shadow service;

[0067] Step 307, the shadow service sends the warning information to the client;

[0068] Step 308: The client receives the warning information and displays the warning information on the display page.

[0069] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0070] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0071] Figure 4 Schematic diagram of a drone management device provided in an embodiment of the present application. Figure 4 As shown, the management device of the drone includes:

[0072] The acquisition module 401 is configured to acquire the shadow service corresponding to each drone, where the shadow service is used to store the status data and task data of the drone;

[0073] The state detection module 402 is configured to perform state detection on each drone according to the state data stored in each shadow service, and when an abnormal drone with an abnormal state is detected, determine the target drone according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal drone;

[0074] The task handover module 403 is configured to send a first indication message to the shadow service corresponding to the abnormal UAV, and the first indication message is used to instruct the shadow service corresponding to the abnormal UAV to send the task data to the target shadow service corresponding to the target UAV, so that the target shadow service sends the task data to the target UAV, and the target UAV continues to execute the task corresponding to the task data based on the task data.

[0075] According to the technical solution provided by the embodiment of the present application, by establishing a mapping relationship between each drone and the shadow service on the server side, each drone has a shadow service corresponding to it on the server side. The service runs on the server and can be used to store the drone's status data (such as location, power, flight status, etc.) and task data (such as flight path, target data, task instructions, etc.). The drone status and task data are updated and stored in real time through the shadow service to provide a basis for subsequent intelligent decision-making. The server performs real-time status detection on the status data stored by each shadow service, and realizes the status detection of each drone by performing real-time status detection on the status data stored by each shadow service. It automatically detects whether the drone is in an abnormal state, and can promptly discover the abnormal situation of the drone, reducing the risk of task interruption. After detecting that a drone is abnormal, according to the status data of the candidate shadow service corresponding to the candidate drone and the status data in the abnormal shadow service corresponding to the abnormal drone, an idle candidate drone is automatically selected as the target drone, and the shadow service corresponding to the target drone is determined as the target shadow service. The server sends a first instruction message to the shadow service of the abnormal drone, instructing the abnormal shadow service of the abnormal drone to send the task data to the shadow service of the target drone, and the shadow service of the target drone sends the task data to the target drone, and the target drone continues to perform the original task based on the received task data. The shadow service automatically completes the transfer of task data, avoids manual intervention, ensures the continuity and efficiency of the task, solves the problem of cumbersome task transfer steps in the prior art when a drone fails, eliminates the cumbersome process of manually re-planning tasks and re-issuing instructions, and greatly improves the automation level and response speed of drone cluster task execution.

[0076] In some embodiments, the acquisition module 401 is configured to receive identification information of each drone, and generate a shadow service corresponding to each drone based on the identification information of each drone and the shadow template corresponding to each identification information; wherein drones with the same identification correspond to one shadow template; each shadow service establishes a communication connection with the client and the corresponding drone, for receiving status data reported by the corresponding drone, and receiving mission data of the corresponding drone sent by the client.

[0077] In some embodiments, the status detection module 402 is configured to identify the target parameters in the status data stored by each shadow service, and when the value of the target parameter exceeds a preset threshold corresponding to the target parameter, the corresponding drone is determined to be an abnormal drone; or, when the heartbeat information sent by a drone is not received for more than a first preset time, the drone is determined to be an abnormal drone.

[0078] In some embodiments, the status data includes the location information of the drone, and the status detection module 402 is configured to calculate the distance between each candidate drone corresponding to each candidate shadow service and the abnormal drone based on the location information in each candidate shadow service and the location information in the shadow service corresponding to the abnormal drone. The candidate drone is a drone that is currently in an idle state or a drone that can switch to an idle state within a preset time; based on each distance, the candidate drone corresponding to the one with the smallest distance value is determined as the target drone.

[0079] In some embodiments, the task data includes executed task data and to-be-executed task data. The task handover module 403 is configured so that the shadow service corresponding to the abnormal drone copies the stored task data to the target shadow service, so that the target shadow service sends the executed task data and to-be-executed task data to the target drone, and the target drone continues to execute the task corresponding to the task data according to the to-be-executed task data.

[0080] In some embodiments, the management device of the drone is configured to use a preset container management tool to perform container management on the processing nodes on the server. The preset container management tool includes a Kubernetes tool or a Rancher tool, and one processing node corresponds to one or more shadow services.

[0081] In some embodiments, after obtaining the shadow services corresponding to each drone, the drone management device is configured to, when it is determined that a shadow service has received warning information, determine one or more collaborative drones of the warning drone corresponding to the warning shadow service based on the status data in each candidate shadow service and the status data in the warning shadow service that received the warning information; and send a second indication message to the warning shadow service, the second indication message being used to instruct the warning shadow service to send the warning information to the shadow service corresponding to the collaborative drone, so that the shadow service corresponding to the collaborative drone controls the movement of the collaborative drone based on the warning information.

[0082] In some embodiments, the management device of the drone is configured to receive mission data of the corresponding drone sent by the client and send the mission data to the drone, wherein each shadow service corresponds to a drone, and the mission data includes deployment data and mission instructions. The drone collects surrounding environment data according to the mission instructions, and compares the surrounding environment data with the deployment data. When the comparison result shows that the surrounding environment matches the deployment data, an early warning message is sent to the shadow service; receive a reception confirmation instruction sent by the drone after receiving the mission data, and send the reception confirmation instruction to the client; receive the early warning information sent by the drone, and send the early warning information to the client, and the client displays the early warning information on the display page.

[0083] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0084] Figure 5 Schematic diagram of an electronic device 5 provided in an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0085] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include, but is not limited to, a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5 The electronic device 5 is merely an example and does not limit the electronic device 5 , and may include more or less components than those shown in the figure, or different components.

[0086] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0087] The memory 502 may be an internal storage unit of the electronic device 5, for example, a hard disk or memory of the electronic device 5. The memory 502 may also be an external storage device of the electronic device 5, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. The memory 502 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device.

[0088] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0090] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for managing drones, applied to a server, characterized in that: include: Obtain a shadow service corresponding to each drone, wherein the shadow service is used to store status data and mission data of the drone; Performing status detection on each drone according to the status data stored in each shadow service, and when an abnormal drone with an abnormal status is detected, determining the target drone according to the status data in each candidate shadow service and the status data in the shadow service corresponding to the abnormal drone; A first indication message is sent to the shadow service corresponding to the abnormal drone, wherein the first indication message is used to instruct the shadow service corresponding to the abnormal drone to send task data to the target shadow service corresponding to the target drone, so that the target shadow service sends the task data to the target drone, and the target drone continues to execute the task corresponding to the task data based on the task data.

2. The method according to claim 1, characterized in that The step of obtaining the shadow service corresponding to each drone includes: Receive identification information of each drone, and generate shadow services corresponding to each drone according to the identification information of each drone and the shadow template corresponding to each identification information; drones with the same identification correspond to one shadow template; Each of the shadow services establishes a communication connection with the client and the corresponding drone, and is used to receive status data reported by the corresponding drone and receive mission data of the corresponding drone sent by the client.

3. The method according to claim 1, characterized in that The state detection of each drone according to the state data stored in each shadow service includes: Identify the target parameter in the state data stored by each shadow service, and when the value of the target parameter exceeds the preset threshold value corresponding to the target parameter, determine the corresponding drone as the abnormal drone; or, When the heartbeat information sent by a drone is not received for more than a first preset time, the drone is determined as the abnormal drone.

4. The method according to claim 1, characterized in that The state data includes location information of the drone, and determining the target drone according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal drone includes: According to the location information in each candidate shadow service and the location information in the shadow service corresponding to the abnormal drone, the distance between each candidate drone corresponding to each candidate shadow service and the abnormal drone is calculated, and the candidate drone is a drone that is currently in an idle state or a drone that can switch to an idle state within a preset time; According to each of the distances, the candidate UAV corresponding to the smallest distance value is determined as the target UAV.

5. The method according to claim 1, characterized in that: The task data includes executed task data and to-be-executed task data, and the shadow service corresponding to the abnormal drone sends the task data to the target shadow service corresponding to the target drone, including: The shadow service corresponding to the abnormal drone copies the stored task data to the target shadow service, so that the target shadow service sends the executed task data and the task data to be executed to the target drone, and the target drone continues to execute the task corresponding to the executed task data according to the task data to be executed.

6. The method according to claim 1, characterized in that include: A preset container management tool is used to perform container management on the processing nodes on the server. The preset container management tool includes a Kubernetes tool or a Rancher tool. One of the processing nodes corresponds to one or more shadow services.

7. The method according to claim 1, characterized in that After obtaining the shadow service corresponding to each drone, the method further includes: When it is determined that a shadow service has received warning information, one or more coordinated drones of the warning drone corresponding to the warning shadow service are determined based on the status data in each candidate shadow service and the status data in the warning shadow service that has received the warning information; A second indication message is sent to the early warning shadow service, wherein the second indication message is used to instruct the early warning shadow service to send the early warning message to the shadow service corresponding to the cooperative UAV, so that the shadow service corresponding to the cooperative UAV controls the movement of the cooperative UAV based on the early warning message.

8. A method for managing drones, applied to shadow services, characterized in that: Mission data includes deployment data and mission instructions, including: Receive the mission data of the corresponding drone sent by the client, and send the mission data to the drone, wherein each shadow service corresponds to a drone, the mission data includes control data and mission instructions, the drone collects surrounding environment data according to the mission instructions, and compares the surrounding environment data with the control data, and sends warning information to the shadow service when the comparison result shows that the surrounding environment matches the control data; Receiving a reception confirmation instruction sent by the drone after receiving the task data, and sending the reception confirmation instruction to the client; The warning information sent by the drone is received, and the warning information is sent to the client, and the client displays the warning information on a display page.

9. A drone management device, characterized in that: include: An acquisition module is configured to acquire a shadow service corresponding to each drone, wherein the shadow service is used to store status data and mission data of the drone; A state detection module is configured to perform state detection on each drone according to the state data stored in each shadow service, and when an abnormal drone with an abnormal state is detected, determine the target drone according to the state data in each candidate shadow service and the state data in the shadow service corresponding to the abnormal drone; The task handover module is configured to send a first indication message to the shadow service corresponding to the abnormal drone, and the first indication message is used to instruct the shadow service corresponding to the abnormal drone to send the task data to the target shadow service corresponding to the target drone, so that the target shadow service sends the task data to the target drone, and the target drone continues to execute the task corresponding to the task data based on the task data.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.