Autonomous decision-making method and device for unmanned aerial vehicle based on Transformer neural network state prediction

By using the Transformer neural network to combine UAV state prediction and reinforcement learning algorithms in a virtual simulation environment, the problems of high computational overhead and low sample efficiency in UAV autonomous decision-making are solved, and efficient and stable autonomous flight decision-making is achieved.

CN117192998BActive Publication Date: 2024-10-22NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311229832.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-21
Publication Date
2024-10-22
Estimated Expiration
2043-09-21

AI Technical Summary

Technical Problem

In autonomous UAV decision-making tasks, existing reinforcement learning methods have high computational overhead, low sample efficiency, and difficulty in convergence, which limits the accuracy and efficiency of UAV autonomous flight.

Method used

A state prediction method based on Transformer neural network is used to construct an autonomous UAV flight mission in a virtual simulation environment. Reinforcement learning algorithms are used to compress the state space and predict flight trajectories. Decisions are made through potential state characteristics at low latitudes and based on predictions. flight path correction decisions.

Benefits of technology

It reduces the computational overhead and sample requirements for autonomous UAV decision-making, improves the accuracy and efficiency of decision-making, and ensures the efficiency and stability of UAV autonomous decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117192998B_ABST
    Figure CN117192998B_ABST
Patent Text Reader

Abstract

The present invention relates to artificial intelligence technology, and discloses a method for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction, comprising: in a virtual simulation environment, according to the flight strategy of the unmanned aerial vehicle, sending a preset number of control instructions to the unmanned aerial vehicle model, and collecting sample data of the unmanned aerial vehicle model in the process of performing a flight mission according to the control instructions; using the sample data to pre-train the Transformer model to obtain a pre-trained Transformer model; using the sample data to train a reinforcement learning model constructed by the pre-trained Transformer model and an intelligent agent model to generate an updated unmanned aerial vehicle flight strategy; in the virtual simulation environment, generating new sample data according to the updated unmanned aerial vehicle flight strategy, and training the Transformer model until the reinforcement learning model converges. The present invention also proposes an unmanned aerial vehicle autonomous decision-making device based on Transformer neural network state prediction. The present invention can improve the accuracy of unmanned aerial vehicle autonomous decision-making.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to artificial intelligence measurement technology, and in particular to a method and device for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction. Background Art

[0002] In recent years, drones have been widely used in military and civilian fields due to their low price, high safety, long endurance, and simple structure. As the application scenarios of drones continue to expand and the flight quality continues to improve, the requirements for their autonomy are also getting higher and higher. The sequential decision model is a key technology to achieve autonomous flight of drones. The sequential decision model can make accurate decisions based on the external environment perceived by the drone.

[0003] With the rapid development of current artificial intelligence technology, reinforcement learning methods have achieved remarkable results as a key technology for solving sequential decision-making models. Reinforcement learning methods continuously improve their own strategies through interaction with the environment, enabling them to effectively respond to tasks where the environment changes in real time, providing new options for autonomous decision-making of drones. In the high-dimensional continuous control decision-making tasks of drones, reinforcement learning methods can quickly extract effective information from complex high-dimensional state features and perform actions in continuous action spaces to maximize cumulative rewards. Since the dimensions of the state and action spaces in drone tasks are very high and autonomous decisions need to be made in high-dimensional continuous state spaces, there are situations in which the computational overhead is high, the sample efficiency is low, and it is difficult to converge in drone autonomous decision-making tasks. Therefore, it is very difficult to achieve fast and accurate autonomous flight of drones. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction, the main purpose of which is to improve the accuracy of autonomous decision-making of unmanned aerial vehicles.

[0005] To achieve the above object, the present invention proposes a UAV autonomous decision-making method based on Transformer neural network state prediction, comprising:

[0006] Step A: According to the actual mission scenario of the UAV, a virtual simulation environment of the UAV is constructed, the flight strategy of the UAV is initialized, and a public data buffer pool is constructed;

[0007] Step B: in the virtual simulation environment, according to the UAV flight strategy, sending a preset number of control instructions to the UAV model, collecting sample data of the UAV model performing the flight mission according to the control instructions, and storing the sample data in the public data buffer pool;

[0008] Step C: pre-training the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model;

[0009] Step D: using the sample data in the public data buffer pool to train a reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model;

[0010] Step E: Determine whether the reinforcement learning model converges;

[0011] When the reinforcement learning model does not converge, return to the above step B, send a preset number of control instructions to the drone model in the virtual simulation environment according to the updated drone flight strategy, collect sample data of the drone model performing the flight mission according to the control instructions, and store the sample data in the public data buffer pool;

[0012] When the reinforcement learning model converges, the Transformer model in the reinforcement learning model is used to make autonomous decisions during the flight of the UAV.

[0013] Optionally, step B comprises:

[0014] Initialize the current time to t = 0, and start from t = 0 to the preset maximum simulation step t = T e In the time period when the moment ends, control instructions are sent to the unmanned model according to the unmanned aerial vehicle flight strategy;

[0015] The actions, state information and reward feedback of the drone model in the process of executing the flight mission according to the control instruction are collected, and sequence data is generated, and the sequence data is stored in the public data buffer pool.

[0016] Optionally, step C comprises:

[0017] Randomly sampling b pieces of sequence data without duplication from the public data buffer pool;

[0018] According to each of the sequence data, using the Transformer model to generate predicted sequence data, and according to the predicted sequence data, generating a predicted action trajectory;

[0019] updating the Transformer model according to the predicted action trajectory and the real sequence data in the public data buffer pool;

[0020] When the update operation of the Transformer model reaches M times, the last updated Transformer model is output as the pre-trained Transformer model.

[0021] Optionally, the using the sample data in the public data buffer pool to train the reinforcement learning model to generate an updated UAV flight strategy includes:

[0022] Acquire state information from the public data buffer pool, and input the state information into an encoder of a pre-trained Transformer model to obtain potential state features;

[0023] Inputting the latent state features into the decoder of the Transformer model to obtain predicted action trajectories and predicted actions;

[0024] Inputting the potential state features and predicted action trajectories into the agent model and outputting the strategy actions;

[0025] The Q function values ​​corresponding to the predicted action and the strategic action are calculated respectively, and the action with a high Q function value is selected from the predicted action and the strategic action as the execution action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

[0026] Optionally, respectively calculating the Q function values ​​corresponding to the predicted action and the strategy action includes:

[0027] The Q function value is calculated using the following method:

[0028] Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a')))

[0029] Among them, α is the learning rate, r is the immediate reward after taking action a under state information s, γ is the discount factor, s' is the next state information, and a' is the optimal action under state information s'.

[0030] To achieve the above object, the present invention also proposes a UAV autonomous decision-making device based on Transformer neural network state prediction, which is characterized by comprising:

[0031] The initial construction module is used to build a virtual simulation environment for the drone according to the actual mission scenario of the drone, initialize the drone flight strategy, and build a public data buffer pool;

[0032] A sample generation module, in the virtual simulation environment, sends a preset number of control instructions to the drone model according to the drone flight strategy, collects sample data of the drone model during the flight execution of the task according to the control instructions, and stores the sample data in the public data buffer pool;

[0033] A model training module, used to pre-train a Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model, and to train a reinforcement learning model using the sample data in the public data buffer pool to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-constructed agent model;

[0034] The model output module is used to notify the sample generation module to continue to generate sample data according to the updated UAV flight strategy and store it in the public data buffer pool when the reinforcement learning model has not converged, and to use the Transformer model in the reinforcement learning model to make autonomous decisions during the UAV flight process when the reinforcement learning model converges.

[0035] Optionally, the sample generation module generates sample data by the following method:

[0036] Initialize the current time to t = 0, and start from t = 0 to the preset maximum simulation step t = T e In the time period when the moment ends, control instructions are sent to the unmanned model according to the unmanned aerial vehicle flight strategy;

[0037] The actions, state information and reward feedback of the drone model in the process of executing the flight mission according to the control instruction are collected, and sequence data is generated, and the sequence data is stored in the public data buffer pool.

[0038] Optionally, the model training module trains the Transformer model by the following method:

[0039] Randomly sampling b pieces of sequence data without duplication from the public data buffer pool;

[0040] According to each of the sequence data, using the Transformer model to generate predicted sequence data, and according to the predicted sequence data, generating a predicted action trajectory;

[0041] updating the Transformer model according to the predicted action trajectory and the real sequence data in the public data buffer pool;

[0042] When the update operation of the Transformer model reaches M times, the last updated Transformer model is output as the pre-trained Transformer model.

[0043] Optionally, use the model training module to train the reinforcement learning model using the following method to generate an updated drone flight strategy:

[0044] Acquire state information from the public data buffer pool, and input the state information into an encoder of a pre-trained Transformer model to obtain potential state features;

[0045] Inputting the latent state features into the decoder of the Transformer model to obtain predicted action trajectories and predicted actions;

[0046] Inputting the potential state features and predicted action trajectories into the agent model and outputting the strategy actions;

[0047] The Q function values ​​corresponding to the predicted action and the strategic action are calculated respectively, and the action with a high Q function value is selected from the predicted action and the strategic action as the execution action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

[0048] Optionally, respectively calculating the Q function values ​​corresponding to the predicted action and the strategy action includes:

[0049] The Q function value is calculated using the following method:

[0050] Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a')))

[0051] Among them, α is the learning rate, r is the immediate reward after taking action a under state information s, γ is the discount factor, s' is the next state information, and a' is the optimal action under state information s'.

[0052] The embodiment of the present invention constructs an autonomous UAV flight mission in a virtual simulation environment, and uses a reinforcement learning algorithm based on Transformer state prediction to compress the UAV state space and predict the flight trajectory. The reinforcement learning method makes decisions based on low-dimensional potential state characteristics, reducing computational overhead and sample requirements; and corrects the decision based on the predicted flight trajectory to improve the accuracy of the decision. This solves the problem of high computational overhead, low sample efficiency and difficulty in convergence of the reinforcement learning method in the autonomous decision-making task of the UAV, and ensures the efficiency and stability of the autonomous decision-making of the UAV. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1A flowchart of a method for autonomous decision-making of a UAV based on Transformer neural network state prediction provided by an embodiment of the present invention;

[0054] Figures 2 to 4 They are respectively a detailed implementation flow diagram of one of the steps in the autonomous decision-making method for a UAV based on Transformer neural network state prediction provided by an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of a module of a UAV autonomous decision-making device based on Transformer neural network state prediction provided by an embodiment of the present invention;

[0056] Figure 6 A schematic diagram of the internal structure of an electronic device for implementing a method for autonomous decision-making of a drone based on Transformer neural network state prediction provided by an embodiment of the present invention;

[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0059] The embodiment of the present invention provides a method for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction. The execution subject of the method for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for autonomous decision-making of unmanned aerial vehicles based on Transformer neural network state prediction can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0060] Reference Figure 1The flowchart of the autonomous decision-making method of a UAV based on Transformer neural network state prediction provided by an embodiment of the present invention is shown. In the embodiment of the present invention, the autonomous decision-making method of a UAV based on Transformer neural network state prediction includes:

[0061] S1. Build a virtual simulation environment for the drone based on the actual mission scenario of the drone;

[0062] The virtual simulation environment of a drone refers to the use of computers to simulate the behavior and environment of a drone in different mission scenarios in order to test, train and optimize the performance and algorithms of the drone.

[0063] In the embodiment of the present invention, the virtual simulation environment of the drone is constructed according to the actual mission scenario of the drone, including:

[0064] Establish a corresponding virtual environment based on the actual mission scenario of the drone; and

[0065] In the virtual environment, a drone model is generated based on the actual initial position of the drone to complete the construction of the virtual simulation environment.

[0066] The virtual environment includes terrain, buildings, obstacles, etc. The embodiment of the present invention can use Geographic Information System (GIS) data, three-dimensional modeling software, etc. to generate a virtual environment corresponding to the actual mission scenario. Further, the generating of the drone model includes: establishing a virtual drone model according to the physical characteristics and dynamic model of the drone, and establishing a sensor model of the drone according to the sensors carried by the drone.

[0067] Among them, the embodiment of the present invention simulates the flight control, sensor, communication and other systems of the drone and the actual parameters of the drone to establish a virtual drone model; and establishes a corresponding sensor model based on the sensors carried by the drone, such as cameras and lidars, to simulate the working principles, data collection and processing processes of the sensors, so as to perceive and navigate the virtual scene.

[0068] The virtual simulation environment can provide the state information s of the UAV model at the current time t t (including basic environmental features, drone position and posture), and the actions performed by the drone model according to the control instructions. t , reward feedback after action execution r t (including, for example, negative rewards for colliding with obstacles and positive rewards for reaching the target), and based on the state information st and reward feedback rt, further control instructions such as acceleration, deceleration, steering and yaw are issued to the drone model through the virtual simulation environment.

[0069] By building a virtual simulation environment for drones, the cost of development and testing can be effectively reduced, the safety and reliability of drones can be improved, and a flexible and controllable platform can be provided for the application and research of drones.

[0070] S2, initialize the UAV flight strategy and build a public data buffer pool;

[0071] In the embodiment of the present invention, the random strategy of the drone is initialized according to the mission and environmental requirements of the drone to obtain the flight strategy of the drone. The random strategy can be a set of randomly generated actions or decision rules for the drone to explore and learn in the initial stage.

[0072] Furthermore, the public data buffer pool is used to store sample data collected by the drone model during the execution of the task, such as the actions or decisions generated by the drone model according to the random strategy, as well as feedback, etc. The embodiment of the present invention stores sample data such as the state, action, reward and next state of each time step in the public data buffer pool. During initialization, an empty public data buffer pool can be created and the maximum capacity of the public data buffer pool can be set.

[0073] In the embodiment of the present invention, control instructions are sent to the drone through the random strategy, the drone model performs actions in the virtual simulation environment according to the control instructions, and the data generated by the execution of the actions is stored in the public data buffer pool.

[0074] S3, in the virtual simulation environment, according to the UAV flight strategy, sending a preset number of control instructions to the UAV model, collecting sample data of the UAV model in the process of executing the task according to the control instructions, and storing the sample data in the public data buffer pool;

[0075] For details, see Figure 2 As shown, according to the random strategy, a preset number of control instructions are sent to the drone model, and sample data of the drone model performing tasks according to the control instructions are collected, including:

[0076] S30, set the number of loops N and the maximum simulation step length T e ;

[0077] The simulation step size refers to the size of each time step in the simulation process. During the simulation process, the state of the system will be updated according to certain rules and equations, and the simulation step size is the time interval that controls each update.

[0078] S31, initialize the current time to t=0, and start from t=0 to t=T eIn the time period ending at the moment, a control instruction is sent to the drone model according to the drone flight strategy, and the action a of the drone model in the process of executing the task according to the control instruction is collected. t , status information t and reward feedback t , and generate sequence data (s0, a0, r0, s1, a1, r1, …s Te , a Te , r Te ), storing the sequence data in the public data buffer pool.

[0079] Among them, s0, a0, r0 are the state information s at time t = 0 t , action a t and reward feedback t , and s Te , a Te , r Te t=T e Status information at the moment t , action a t and reward feedback t .

[0080] S32: Determine whether the execution times of the above step S31 reaches N times.

[0081] If the number of executions of step S31 has not reached N times, the process returns to the above step S31 ; if the number of executions of step S31 has reached N times, the sample data collection is terminated.

[0082] S4. Pre-training the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model.

[0083] For details, see Figure 3 As shown, the S4 specifically includes:

[0084] S40, randomly sampling b pieces of sequence data (s0, a0, r0, s1, a1, r1, ... s t , a t , r t …s b-1 , a b-1 , r b-1 );

[0085] S41, according to each of the sequence data (s t , a t , r t ), using the Transformer model to generate prediction sequence data (s t+1, a t+1 , r t+1 ), and generate a predicted action trajectory (s 1’ , a 1’ , r 1’ ,…s t’ , a t’ , r t’ …s b’ , a b’ , r b’ );

[0086] In the embodiment of the present invention, each piece of the sequence data is converted into a token form, wherein the current state information s t As the first token, and the current action a t and reward feedback t The first token and the second token are concatenated into a vector as the second token, and the first token and the second token are input into the Transformer model. The encoder output of the Transformer model is used to compress the low-dimensional potential state code zt of the first token and the second token, and according to the state code zt, the decoder output of the Transformer model is used to predict the action trajectory.

[0087] Among them, token refers to a discrete text unit, which can be a word, punctuation mark, number or other language elements, which are used as the basic unit for training and generating text.

[0088] In the embodiment of the present invention, the low-dimensional potential state encoding z t It refers to the implicit and indirect feature representation in the model. Through the latent state information, the important features of the data can be extracted. For example, the token includes the 100-dimensional drone state, and the low-dimensional latent state feature z after the encoder output of the Transformer model is t Transformed into 10-dimensional drone state.

[0089] S42, according to the predicted action trajectory (s 1’ , a 1’ , r 1’ ,…s t’ , a t’ , r t’ …s b’ , a b’ , r b’ ) and the real sequence data (s1, a1, r1, ...s t , a t , r t …sb , a b , r b ), update the Transformer model;

[0090] In the embodiment of the present invention, S43, determine whether the update operation of the Transformer model has reached M times?

[0091] If the update operation of the Transformer model does not reach M times, return to the above S40;

[0092] If the update operation of the Transformer model reaches M times, then S44, output the Transformer model updated for the last time as the pre-trained Transformer model.

[0093] S5. Use the sample data in the public data buffer pool to train a reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model.

[0094] The agent model refers to a computing entity that resides in a certain environment, can continuously and autonomously function, and has characteristics such as residency, responsiveness, sociality, initiative, etc. In the embodiment of the present invention, the agent is intended to learn the best behavior strategy through interaction with the environment, and by learning the best behavior strategy, the agent obtains the maximum cumulative reward in the interaction with the environment.

[0095] For details, see Figure 4 As shown, the method of using the sample data in the public data buffer pool to train the reinforcement learning model to generate an updated UAV flight strategy includes:

[0096] S50, obtaining status information s from the public data buffer pool t , the state information s t Input into the encoder of the pre-trained Transformer model to obtain the potential state feature z t ;

[0097] S51, the potential state feature z t Input into the decoder of the Transformer model to obtain the predicted action trajectory and predicted action a' t .

[0098] S52, the potential state feature z t and the predicted action trajectory are input into the agent model, and the policy action a is output t ;

[0099] S53, respectively calculate the predicted action a' t and strategy action a t The corresponding Q function value is selected from the predicted actions and the strategy actions as the execution action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

[0100] In the embodiment of the present invention, the Q-function is used to estimate the cumulative reward under a given state and action. When training the reinforcement learning model, the agent model learns the optimal behavior strategy through interaction with the environment, and the Q-function is used to estimate the cumulative reward after taking action a under a certain state information s, which is recorded as Q(s,a). The Q-function can be calculated by the following formula:

[0101] Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a')))

[0102] Among them, α is the learning rate, which determines the impact of the newly observed reward on the Q value; r is the immediate reward after taking action a under state information s; γ is the discount factor, which is used to measure the impact of future rewards on the current Q value; s' is the next state, and a' is the optimal action under the next state s'.

[0103] In the embodiment of the present invention, the optimal execution action that maximizes the cumulative reward can be found through the Q function.

[0104] S6. Determine whether the reinforcement learning model converges.

[0105] In one embodiment of the present invention, in the prediction action a' t and strategy action a t If the same, it is determined that the reinforcement learning model has converged. If the reinforcement learning model has not converged, return to the above S3;

[0106] When the reinforcement learning model converges, S7, using the Transformer model in the reinforcement learning model to make autonomous decisions during the flight of the UAV.

[0107] In an embodiment of the present invention, a reinforcement learning model strategy is used in a simulation environment to control the data generated by the execution of the reinforcement learning strategy in the simulation environment, and the data is used to continue training the Transformer model; then the Transformer model is maintained to continue training the reinforcement learning model, and the alternating training is repeated until a high-performance decision model is learned.

[0108] In view of the problems of high computational overhead, low sample efficiency and difficulty in convergence when making autonomous decisions in high-dimensional continuous state space, the embodiments of the present invention construct autonomous flight missions for drones in a virtual simulation environment, and use a reinforcement learning algorithm based on Transformer state prediction to compress the drone state space and predict the flight trajectory. The reinforcement learning method makes decisions based on low-dimensional potential state characteristics, reducing computational overhead and sample requirements; and corrects the decision based on the predicted flight trajectory to improve the accuracy of the decision. This solves the problems of high computational overhead, low sample efficiency and difficulty in convergence of reinforcement learning methods in autonomous decision-making tasks for drones, and ensures the efficiency and stability of autonomous decision-making for drones.

[0109] like Figure 4 , which is a functional module diagram of the UAV autonomous decision-making device based on Transformer neural network state prediction of the present invention.

[0110] The autonomous decision-making device 100 for unmanned aerial vehicle based on Transformer neural network state prediction of the present invention can be installed in an electronic device. According to the functions to be implemented, the autonomous decision-making device for unmanned aerial vehicle based on Transformer neural network state prediction can include an initial construction module 101, a sample generation module 102, a model training module 103 and a model output module 104. The module described in the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0111] In this embodiment, the functions of each module / unit are as follows:

[0112] The initial construction module 101 is used to construct a virtual simulation environment of the drone according to the actual mission scenario of the drone, initialize the drone flight strategy, and build a public data buffer pool;

[0113] The sample generation module 102, in the virtual simulation environment, sends a preset number of control instructions to the drone model according to the drone flight strategy, collects sample data of the drone model in the process of executing the task according to the control instructions, and stores the sample data in the public data buffer pool;

[0114] The model training module 103 is used to pre-train the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model, and to train the reinforcement learning model using the sample data in the public data buffer pool to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-constructed agent model;

[0115] The model output module 104 is used to notify the sample generation module to continue generating sample data according to the updated UAV flight strategy and store it in the public data buffer pool when the reinforcement learning model has not converged, and to use the Transformer model in the reinforcement learning model to make autonomous decisions during the UAV flight process when the reinforcement learning model converges.

[0116] In detail, the specific implementation of each module of the knowledge-driven hierarchical intelligent decision model training device 100 is as follows:

[0117] Step 1: The initial construction module 101 constructs a virtual simulation environment of the drone according to the actual mission scenario of the drone;

[0118] The virtual simulation environment of a drone refers to the use of computers to simulate the behavior and environment of a drone in different mission scenarios in order to test, train and optimize the performance and algorithms of the drone.

[0119] In the embodiment of the present invention, the virtual simulation environment of the drone is constructed according to the actual mission scenario of the drone, including:

[0120] Establish a corresponding virtual environment based on the actual mission scenario of the drone; and

[0121] In the virtual environment, a drone model is generated based on the actual initial position of the drone to complete the construction of the virtual simulation environment.

[0122] The virtual environment includes terrain, buildings, obstacles, etc. The embodiment of the present invention can use Geographic Information System (GIS) data, three-dimensional modeling software, etc. to generate a virtual environment corresponding to the actual mission scenario. Further, the generating of the drone model includes: establishing a virtual drone model according to the physical characteristics and dynamic model of the drone, and establishing a sensor model of the drone according to the sensors carried by the drone.

[0123] Among them, the embodiment of the present invention simulates the flight control, sensor, communication and other systems of the drone and the actual parameters of the drone to establish a virtual drone model; and establishes a corresponding sensor model based on the sensors carried by the drone, such as cameras and lidars, to simulate the working principles, data collection and processing processes of the sensors, so as to perceive and navigate the virtual scene.

[0124] The virtual simulation environment can provide the state information s of the drone model at the current time t t (including basic environmental features, drone position and posture), and the actions performed by the drone model according to the control instructions. t , reward feedback after action execution r t (including, for example, negative rewards for colliding with obstacles and positive rewards for reaching the target), and based on the state information st and reward feedback rt, further control instructions such as acceleration, deceleration, steering and yaw are issued to the drone model through the virtual simulation environment.

[0125] By building a virtual simulation environment for drones, the cost of development and testing can be effectively reduced, the safety and reliability of drones can be improved, and a flexible and controllable platform can be provided for the application and research of drones.

[0126] Step 2: Initial construction module 101 initializes the UAV flight strategy and builds a public data buffer pool;

[0127] In the embodiment of the present invention, the initial construction module 101 initializes the random strategy of the drone according to the mission and environmental requirements of the drone to obtain the flight strategy of the drone. The random strategy can be a set of randomly generated actions or decision rules for the drone to explore and learn in the initial stage.

[0128] Furthermore, the public data buffer pool is used to store sample data collected by the drone model during the execution of the task, such as the actions or decisions generated by the drone model according to the random strategy, as well as feedback, etc. The embodiment of the present invention stores sample data such as the state, action, reward and next state of each time step in the public data buffer pool. During initialization, an empty public data buffer pool can be created and the maximum capacity of the public data buffer pool can be set.

[0129] In the embodiment of the present invention, control instructions are sent to the drone through the random strategy, the drone model performs actions in the virtual simulation environment according to the control instructions, and the data generated by the execution of the actions is stored in the public data buffer pool.

[0130] Step 3, the sample generation module 102 sends a preset number of control instructions to the drone model in the virtual simulation environment according to the drone flight strategy, collects sample data of the drone model in the process of executing the task according to the control instructions, and stores the sample data in the public data buffer pool;

[0131] For details, see Figure 2 As shown, the sample generation module 102 generates sample data using the following method:

[0132] S30, set the number of loops N and the maximum simulation step length T e ;

[0133] The simulation step size refers to the size of each time step in the simulation process. During the simulation process, the state of the system will be updated according to certain rules and equations, and the simulation step size is the time interval that controls each update.

[0134] S31, initialize the current time to t=0, and start from t=0 to t=T e In the time period ending at the moment, a control instruction is sent to the drone model according to the drone flight strategy, and the action a of the drone model in the process of executing the task according to the control instruction is collected. t , status information t and reward feedback t , and generate sequence data (s0, a0, r0, s1, a1, r1, …s Te , a Te , r Te ), storing the sequence data in the public data buffer pool.

[0135] Among them, s0, a0, r0 are the state information s at time t = 0 t , action a t and reward feedback t , and s Te , a Te , r Te t=T e Status information at the moment t , action a t and reward feedback t .

[0136] S32: Determine whether the execution times of the above step S31 reaches N times.

[0137] If the number of executions of step S31 has not reached N times, the process returns to the above step S31 ; if the number of executions of step S31 has reached N times, the sample data collection is terminated.

[0138] Step 4: The model training module 103 uses the sample data in the public data buffer pool to pre-train the Transformer model to obtain a pre-trained Transformer model.

[0139] For details, see Figure 3 As shown, the model training module 103 uses the following method to train the Transformer model:

[0140] S40, randomly sampling b pieces of sequence data (s0, a0, r0, s1, a1, r1, ... s t , a t , r t …s b-1 , a b-1 , r b-1 );

[0141] S41, according to each of the sequence data (s t , a t , r t ), using the Transformer model to generate prediction sequence data (s t+1 , a t+1 , r t+1 ), and generate a predicted action trajectory (s 1’ , a 1’ , r 1’ ,…s t’ , a t’ , r t’ …s b’ , a b’ , r b’ );

[0142] In the embodiment of the present invention, each piece of the sequence data is converted into a token form, wherein the current state information s t As the first token, and the current action a t and reward feedback t The first token and the second token are concatenated into a vector as the second token, and the first token and the second token are input into the Transformer model. The encoder output of the Transformer model is used to compress the low-dimensional potential state code zt of the first token and the second token, and according to the state code zt, the decoder output of the Transformer model is used to predict the action trajectory.

[0143] Among them, token refers to a discrete text unit, which can be a word, punctuation mark, number or other language elements, which are used as the basic unit for training and generating text.

[0144] In the embodiment of the present invention, the low-dimensional potential state encoding z t It refers to the implicit and indirect feature representation in the model. Through the latent state information, the important features of the data can be extracted. For example, the token includes the 100-dimensional drone state, and the low-dimensional latent state feature z after the encoder output of the Transformer model is t Transformed into 10-dimensional drone state.

[0145] S42, according to the predicted action trajectory (s 1’ , a 1’ , r 1’ ,…s t’ , a t’ , r t’ …s b’ , a b’ , r b’ ) and the real sequence data (s1, a1, r1, ...s t , a t , r t …s b , a b , r b ), update the Transformer model;

[0146] In the embodiment of the present invention, S43, determine whether the update operation of the Transformer model has reached M times?

[0147] If the update operation of the Transformer model does not reach M times, return to the above S40;

[0148] If the update operation of the Transformer model reaches M times, then S44, output the Transformer model updated for the last time as the pre-trained Transformer model.

[0149] Step 5: The model training module 103 uses the sample data in the public data buffer pool to train the reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model.

[0150] The agent model refers to a computing entity that resides in a certain environment, can continuously and autonomously function, and has characteristics such as residency, responsiveness, sociality, initiative, etc. In the embodiment of the present invention, the agent is intended to learn the best behavior strategy through interaction with the environment, and by learning the best behavior strategy, the agent obtains the maximum cumulative reward in the interaction with the environment.

[0151] For details, see Figure 4 As shown, the model training module 103 uses the following method to train the reinforcement learning model to generate an updated UAV flight strategy:

[0152] S50, obtaining status information s from the public data buffer pool t , the state information s t Input into the encoder of the pre-trained Transformer model to obtain the potential state feature z t ;

[0153] S51, the potential state feature z t Input into the decoder of the Transformer model to obtain the predicted action trajectory and predicted action a' t .

[0154] S52, the potential state feature z t and the predicted action trajectory are input into the agent model, and the policy action a is output t ;

[0155] S53, respectively calculate the predicted action a' t and strategy action a t The corresponding Q function value is selected from the predicted actions and the strategy actions as the execution action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

[0156] In the embodiment of the present invention, the Q-function is used to estimate the cumulative reward under a given state and action. When training the reinforcement learning model, the agent model learns the optimal behavior strategy through interaction with the environment, and the Q-function is used to estimate the cumulative reward after taking action a under a certain state information s, which is recorded as Q(s,a). The Q-function can be calculated by the following formula:

[0157] Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a')))

[0158] Among them, α is the learning rate, which determines the impact of the newly observed reward on the Q value; r is the immediate reward after taking action a under state information s; γ is the discount factor, which is used to measure the impact of future rewards on the current Q value; s' is the next state, and a' is the optimal action under the next state s'.

[0159] In the embodiment of the present invention, the optimal execution action that maximizes the cumulative reward can be found through the Q function.

[0160] Step 6: The model output module 104 determines whether the reinforcement learning model has converged.

[0161] In one embodiment of the present invention, in the prediction action a' t and strategy action a t If the same, the model output module 104 determines that the reinforcement learning model has converged. If the reinforcement learning model has not converged, the model training module 103 is notified to continue to perform sample data collection according to the updated UAV flight strategy;

[0162] When the reinforcement learning model converges, the model output module 104 uses the Transformer model in the reinforcement learning model to make autonomous decisions during the flight of the drone.

[0163] In an embodiment of the present invention, a reinforcement learning model strategy is used in a simulation environment to control the data generated by the execution of the reinforcement learning strategy in the simulation environment, and the data is used to continue training the Transformer model; then the Transformer model is maintained to continue training the reinforcement learning model, and the alternating training is repeated until a high-performance decision model is learned.

[0164] like Figure 5 , which is a schematic diagram of the structure of an electronic device for realizing the autonomous decision-making method of a UAV based on Transformer neural network state prediction according to the present invention.

[0165] The electronic device may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a drone autonomous decision-making program based on Transformer neural network state prediction.

[0166] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of the autonomous decision-making program of the drone based on the state prediction of the Transformer neural network, but also can be used to temporarily store data that has been output or is to be output.

[0167] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as autonomous decision-making programs for drones based on Transformer neural network state prediction, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0168] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The communication bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0169] Figure 5Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0170] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure classification circuits, power converters or inverters, power status indicators, etc. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0171] Optionally, the communication interface 13 may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices.

[0172] Optionally, the communication interface 13 may also include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0173] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0174] The autonomous decision-making program for the drone based on Transformer neural network state prediction stored in the memory 11 of the electronic device is a combination of multiple computer programs. When running in the processor 10, the following can be achieved:

[0175] Step A: According to the actual mission scenario of the UAV, a virtual simulation environment of the UAV is constructed, the flight strategy of the UAV is initialized, and a public data buffer pool is constructed;

[0176] Step B: in the virtual simulation environment, according to the UAV flight strategy, sending a preset number of control instructions to the UAV model, collecting sample data of the UAV model in the process of executing the task according to the control instructions, and storing the sample data in the public data buffer pool;

[0177] Step C: pre-training the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model;

[0178] Step D: using the sample data in the public data buffer pool to train a reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model;

[0179] Step E: Determine whether the reinforcement learning model converges;

[0180] When the reinforcement learning model does not converge, return to the above step B, send a preset number of control instructions to the drone model in the virtual simulation environment according to the updated drone flight strategy, collect sample data of the drone model in the process of executing the task according to the control instructions, and store the sample data in the public data buffer pool;

[0181] When the reinforcement learning model converges, the Transformer model in the reinforcement learning model is used to make autonomous decisions during the flight of the UAV.

[0182] Specifically, the specific implementation method of the processor 10 for the above-mentioned computer program can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0183] Furthermore, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable medium can be non-volatile or volatile. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM).

[0184] An embodiment of the present invention may further provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program may implement:

[0185] Step A: According to the actual mission scenario of the UAV, a virtual simulation environment of the UAV is constructed, the flight strategy of the UAV is initialized, and a public data buffer pool is constructed;

[0186] Step B: in the virtual simulation environment, according to the UAV flight strategy, sending a preset number of control instructions to the UAV model, collecting sample data of the UAV model in the process of executing the task according to the control instructions, and storing the sample data in the public data buffer pool;

[0187] Step C: pre-training the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model;

[0188] Step D: using the sample data in the public data buffer pool to train a reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model;

[0189] Step E: Determine whether the reinforcement learning model converges;

[0190] When the reinforcement learning model does not converge, return to the above step B, send a preset number of control instructions to the drone model in the virtual simulation environment according to the updated drone flight strategy, collect sample data of the drone model in the process of executing the task according to the control instructions, and store the sample data in the public data buffer pool;

[0191] When the reinforcement learning model converges, the Transformer model in the reinforcement learning model is used to make autonomous decisions during the flight of the UAV.

[0192] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0193] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0194] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0195] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0196] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0197] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0198] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0199] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A UAV autonomous decision-making method based on Transformer neural network state prediction, characterized in that: The method comprises: Step A: According to the actual mission scenario of the UAV, a virtual simulation environment of the UAV is constructed, the flight strategy of the UAV is initialized, and a public data buffer pool is constructed; Step B: in the virtual simulation environment, according to the UAV flight strategy, sending a preset number of control instructions to the UAV model, collecting sample data of the UAV model performing the flight mission according to the control instructions, and storing the sample data in the public data buffer pool; Step C: pre-training the Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model; Step D: using the sample data in the public data buffer pool to train a reinforcement learning model to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-built agent model; Step E: Determine whether the reinforcement learning model converges; When the reinforcement learning model does not converge, return to the above step B, send a preset number of control instructions to the drone model in the virtual simulation environment according to the updated drone flight strategy, collect sample data of the drone model performing the flight mission according to the control instructions, and store the sample data in the public data buffer pool; When the reinforcement learning model converges, the Transformer model in the reinforcement learning model is used to make autonomous decisions during the flight of the UAV; The method of using the sample data in the public data buffer pool to train the reinforcement learning model and generate an updated UAV flight strategy includes: Acquire state information from the public data buffer pool, and input the state information into an encoder of a pre-trained Transformer model to obtain potential state features; Inputting the latent state features into the decoder of the Transformer model to obtain predicted action trajectories and predicted actions; Inputting the potential state features and predicted action trajectories into the agent model and outputting the strategy actions; The Q function values ​​corresponding to the predicted action and the strategic action are calculated respectively, and the action with a high Q function value is selected from the predicted action and the strategic action as the execution flight action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

2. The autonomous decision-making method for unmanned aerial vehicle based on Transformer neural network state prediction as claimed in claim 1, characterized in that: The step B comprises: Initialize the current time to t = 0, and start from t = 0 to the preset maximum simulation step t = T e In the time period when the moment ends, control instructions are sent to the drone model according to the drone flight strategy; The actions, state information and reward feedback of the drone model in the process of executing the flight mission according to the control instruction are collected, and sequence data is generated, and the sequence data is stored in the public data buffer pool.

3. The autonomous decision-making method for unmanned aerial vehicle based on Transformer neural network state prediction as claimed in claim 1, characterized in that: The step C comprises: Randomly sampling b pieces of sequence data without duplication from the public data buffer pool; According to each of the sequence data, using the Transformer model to generate predicted sequence data, and according to the predicted sequence data, generating a predicted action trajectory; performing an updating operation on the Transformer model according to the predicted action trajectory and the real sequence data in the public data buffer pool; When the update operation of the Transformer model reaches M times, the last updated Transformer model is output as the pre-trained Transformer model.

4. The autonomous decision-making method for unmanned aerial vehicle based on Transformer neural network state prediction as claimed in claim 1, characterized in that: The respectively calculating the Q function values ​​corresponding to the predicted action and the strategy action includes: The Q function value is calculated using the following method: Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a'))) Among them, α is the learning rate, r is the immediate reward after taking action a under state information s, γ is the discount factor, s' is the next state information, and a' is the optimal action under state information s'.

5. A UAV autonomous decision-making device based on Transformer neural network state prediction, characterized in that: include: The initial construction module is used to build a virtual simulation environment for the drone according to the actual mission scenario of the drone, initialize the drone flight strategy, and build a public data buffer pool; A sample generation module, in the virtual simulation environment, sends a preset number of control instructions to the drone model according to the drone flight strategy, collects sample data of the drone model in the process of performing the flight mission according to the control instructions, and stores the sample data in the public data buffer pool; A model training module, used to pre-train a Transformer model using the sample data in the public data buffer pool to obtain a pre-trained Transformer model, and to train a reinforcement learning model using the sample data in the public data buffer pool to generate an updated UAV flight strategy, wherein the reinforcement learning model is constructed based on the pre-trained Transformer model and the pre-constructed agent model; A model output module, used to notify the sample generation module to continue to generate sample data according to the updated UAV flight strategy and store it in the public data buffer pool when the reinforcement learning model has not converged, and to use the Transformer model in the reinforcement learning model to make autonomous decisions during the UAV flight process when the reinforcement learning model has converged; The method of using the sample data in the public data buffer pool to train the reinforcement learning model and generate an updated UAV flight strategy includes: Acquire state information from the public data buffer pool, and input the state information into an encoder of a pre-trained Transformer model to obtain potential state features; Inputting the latent state features into the decoder of the Transformer model to obtain predicted action trajectories and predicted actions; Inputting the potential state features and predicted action trajectories into the agent model and outputting the strategy actions; The Q function values ​​corresponding to the predicted action and the strategic action are calculated respectively, and the action with a high Q function value is selected from the predicted action and the strategic action as the execution flight action of the UAV model in the virtual simulation environment to obtain an updated UAV flight strategy.

6. The autonomous decision-making device for unmanned aerial vehicle based on Transformer neural network state prediction as claimed in claim 5, characterized in that: The sample generation module generates sample data by the following method: Initialize the current time to t = 0, and start from t = 0 to the preset maximum simulation step t = T e In the time period when the moment ends, control instructions are sent to the drone model according to the drone flight strategy; The actions, state information and reward feedback of the drone model in the process of executing the flight mission according to the control instruction are collected, and sequence data is generated, and the sequence data is stored in the public data buffer pool.

7. The autonomous decision-making device for unmanned aerial vehicle based on Transformer neural network state prediction as claimed in claim 5, characterized in that: The model training module trains the Transformer model by the following method: Randomly sampling b pieces of sequence data without duplication from the public data buffer pool; According to each of the sequence data, using the Transformer model to generate predicted sequence data, and according to the predicted sequence data, generating a predicted action trajectory; performing an updating operation on the Transformer model according to the predicted action trajectory and the real sequence data in the public data buffer pool; When the update operation of the Transformer model reaches M times, the last updated Transformer model is output as the pre-trained Transformer model.

8. The autonomous decision-making device for unmanned aerial vehicles based on Transformer neural network state prediction as claimed in claim 5, characterized in that: The respectively calculating the Q function values ​​corresponding to the predicted action and the strategy action includes: The Q function value is calculated using the following method: Q(s,a)=(1-α)*Q(s,a)+α*(r+γ*max(Q(s',a'))) Among them, α is the learning rate, r is the immediate reward after taking action a under state information s, γ is the discount factor, s' is the next state information, and a' is the optimal action under state information s'.