Intelligent control method for unmanned aerial vehicle
The neural network model is used to convert the user's voice input into text input, and regular expression template matching is used to solve the problems of operational complexity and matching stability in the automatic operation control of UAVs, and achieve efficient and high-efficiency intelligent control of UAVs. Convenience.
Patent Information
- Application Number
- CN202411135558.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-10-11
AI Technical Summary
In existing UAV automatic operation control, users need to manually select or enter preset commands and parameters, resulting in reduced operational complexity and user experience, and it is difficult to stably achieve control information matching in complex natural languages.
A neural network model is used to convert user voice input into text input, and UAV control information is obtained through regular expression templates and neural network matching, including sequence output neural network, RNN, LSTM, GRU, Attention-Based RNN and Transformer models. Combined with machine learning models, it is used to process complex text input to obtain drone control instructions.
It improves the convenience of drone operation and the reliability of control, ensuring stable matching and efficiency under complex input conditions.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicle control, and in particular to an intelligent control method for unmanned aerial vehicle. Background Art
[0002] In the prior art of automatic operation control of drones, users are required to manually select or input preset commands and parameters through a ground station. Due to the flexibility and complexity of drone operations, complicated automatic operation settings will bring a large operating burden to users and reduce user experience. In response to the above problems, a Chinese patent with publication number CN104865856B discloses a voice control method suitable for drones, including: a remote control device receives voice commands; sends voice commands to the control unit of the drone; the control unit of the drone decomposes the voice commands into several separate action commands; the drone control unit rehearses the several separate action commands; the drone provides feedback information to the remote control device based on the rehearsal results. Although the above patent eliminates the need for drones to ensure high-reliability transmission requirements for their own flight parameters and operating parameters, it still cannot guarantee that control information matching can be stably achieved in complex and changeable natural languages. Summary of the invention
[0003] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a method for intelligent control of a drone, which is a specific method for obtaining drone control information based on text input, can convert complex text input into drone control information, and ensure the reliability and efficiency of drone voice control.
[0004] The technical solution adopted by the present invention is: the intelligent control method of the unmanned aerial vehicle of the present invention comprises the following steps: ① The ground station receives user voice input through the input device; ②Convert user voice input into text input; ③Get drone control information based on text input; ④Send the drone control information to the drone; In step ②, the method for converting user voice input into text input is: constructing a first neural network, the first neural network is a sequence output neural network, collecting voice-text pair training data, training the first neural network, and using the first neural network to convert user voice input into text input; or collecting voice-phoneme pair training data, first training the neural network, using the first neural network to convert user voice input into a phoneme sequence, and then using a pre-constructed dictionary to map the phoneme sequence into text to obtain text input.
[0005] Furthermore, the first neural network adopts an RNN neural network model, or an LSTM neural network model, or a GRU neural network model, or an Attention-Based RNN neural network model, or a Transformer neural network model.
[0006] Furthermore, the first neural network adopts a hybrid model of the above neural network model and the machine learning model.
[0007] In step ③, the method for obtaining the drone control information according to the text input is: define a regular expression template set; the regular expression template set includes a control command regular expression template subset and a control parameter regular expression template subset; the control command regular expression template is used to match the control command related text in the text input, and the control parameter regular expression template is used to match the control parameter related text in the text input. Through the predefined regular expression template set, the text input is matched with each regular expression template in the set respectively, and the drone control information corresponding to each regular expression in the text input can be obtained.
[0008] Before performing template matching on the text input, the text input is subjected to word normalization processing. The method for performing word normalization processing on the text input is as follows: constructing a standard word list, which includes standard words; obtaining a text corpus, which records language data in the field of drones and includes all standard words in the standard word list; converting the words in the corpus into word vectors through a word embedding method; obtaining word vectors of all standard words, and finding word vectors whose Cosine distance to the word vector of each standard word is less than a specific threshold; obtaining the words corresponding to these word vectors, using these words as associated words of the corresponding standard words, and constructing a "standard word-associated word" word list, which includes the corresponding relationship between standard words, associated words, and associated words of standard words; before performing template matching on the text input, finding all associated words in the text input, and replacing all associated words with corresponding standard words.
[0009] 1. In step ③, the method for obtaining the control information of the UAV according to the text input is as follows: constructing a second neural network and defining a label set; the second neural network is a neural network that outputs sequences and classifications at the same time; the label set includes a control command label subset, a control parameter label subset and an empty label; collecting text corpus related to the field of UAV control, marking each word in the text corpus as an empty label or a different control parameter label, and marking each sentence in the text corpus as an empty label or a different control command label; using the above corpus and labels to train the second neural network, specifically, using the sentence corpus and the corresponding control command label to train the second neural network for classification output, and using the word corpus and the corresponding control parameter label to train the second neural network for sequence output; using the trained second neural network, inputting text into the second neural network, classifying the output of the second neural network as a control command, and obtaining the control parameters and control parameter types according to the text input and the output sequence of the second neural network.
[0010] Furthermore, the following steps are also included between step ② and step ③: determining the parameter complexity of the input text, specifically, matching the text input using a control parameter type template and / or a control parameter template, and determining whether the number of matches is greater than a specific threshold; when the number of control parameters and / or control parameter types in the match is less than a specific threshold, obtaining the control information of the UAV by using the text input of a regular expression template set, and obtaining the control information of the UAV according to the text input; when the number of control parameters and / or control parameter types in the match is greater than a specific threshold, obtaining the control information of the UAV by using the text input of a second neural network, and obtaining the control information of the UAV according to the text input.
[0011] The following steps are also included between step ② and step ③: constructing a third neural network, the third neural network is a sequence output neural network, the third neural network is used to segment the text input to obtain multiple text input clauses; the multiple text input clauses obtained are used to extract control information separately to obtain a combination control instruction of multiple control instructions.
[0012] The method for constructing the third neural network is: collecting corpus, marking the words in the corpus, each word is marked with a truncated or non-truncated segmentation label, and using the collected corpus and segmentation labels to train the neural network; using the trained neural network to process the text input to obtain the corresponding segmentation label of each word in the text input; using the truncation label in the segmentation label to divide the text input into clauses to obtain multiple text input clauses.
[0013] The following steps are also included between step ② and step ③: determining the command complexity of the input text, specifically, using a set of regular expressions to match control commands, and determining whether the number of matched control commands is greater than a specific threshold; when the control commands are greater than the specific threshold, using a third neural network to segment the text input to obtain multiple text input clauses, and extracting control information from each text input clause; when the number of control commands is less than or equal to a specific threshold, directly extracting control information from the text input, such as using a regular expression template for processing, or using a second neural network for processing, or using a method for determining the parameter complexity of the input text for processing. DETAILED DESCRIPTION
[0014] Embodiment 1 The present invention is a drone intelligent control method, which can improve the convenience of drone operation, and includes the following steps: ① receiving user voice input; ② converting the voice input into text input through a first neural network; ③ obtaining drone control information based on the text input; ④ sending the drone control information to the drone to control the drone to perform operations.
[0015] The specific implementation of the drone intelligent control method of the present invention is as follows: Step ①: The ground station receives user voice input through an input device.
[0016] Step ②, convert the user's voice input into text input. Specifically, construct a first neural network, the first neural network is a sequence output neural network, and the first neural network can adopt a neural network model such as RNN, LSTM, GRU, Attention-Based RNN or Transformer. In some embodiments, the first neural network can also adopt a hybrid model of the above neural network and a machine learning model, such as a hybrid model of the above neural network HMM hidden Markov model.
[0017] Furthermore, speech-text pair training data is collected; a first neural network is trained, and the user speech input is converted into text input using the first neural network.
[0018] In this embodiment, speech-phoneme pair training data may also be collected to train a neural network, and the user speech input may be converted into a phoneme sequence using a first neural network, and then the phoneme sequence may be mapped into text using a pre-built dictionary to obtain text input.
[0019] Step ③, obtain drone control information based on text input.
[0020] In this embodiment, the method for obtaining drone control information based on text input is: define a regular expression template set, the regular expression template set includes a control command regular expression template subset and a control parameter regular expression template subset. The control command regular expression template is used to match control command related text in the text input. For example, the regular expression template [takeoff] matches the text input "let the drone take off to a height of 10 meters", and the template successfully matches "takeoff" in the text input. The control parameter regular expression template is used to match control parameter related text in the text input. For example, the regular expression [number, unit] matches the text input "let the drone take off to a height of 10 meters", and the template successfully matches "10 meters" in the text input. Thus, through the predefined regular expression template set, the text input is matched with each regular expression template in the set respectively, and the drone control information corresponding to each regular expression in the text input can be obtained.
[0021] Furthermore, before performing template matching on the text input, the text input is subjected to word normalization. Specifically, a standardized word list is constructed, which includes standardized words; a text corpus is obtained, which records language data in the field of drones and includes all standardized words in the standardized word list; the words in the corpus are converted into word vectors through word embedding methods such as CBOW or Skipgram; the word vectors of all standardized words are obtained, and the word vectors whose Cosine distance with each standardized word vector is less than a specific threshold are found; the words corresponding to these word vectors are obtained, and these words are used as the associated words of the corresponding standardized words, and a "standard word-associated word" word list is constructed, which includes the corresponding relationship between standardized words, associated words, and the associated words of standardized words; before performing template matching on the text input, all associated words in the text input are found, and all associated words are replaced with the corresponding standardized words.
[0022] Step ④ sends the drone control information to the drone. Specifically, the MavLink protocol data is generated according to the drone control information, and the MavLink protocol data is sent to the drone.
[0023] Embodiment 2 In this embodiment, the difference between this embodiment and the above embodiment is that: in this embodiment, the method for obtaining drone control information according to text input is: constructing a second neural network, and the second neural network is a neural network that outputs sequences and classifications at the same time. In some embodiments, the second neural network may also include a sequence output neural network and a classification output neural network. The second neural network may adopt a neural network model such as RNN / LSTM / Attention-Base RNN / Transformer.
[0024] Define a label set, including a control command label subset, a control parameter label subset and an empty label; collect text corpus related to the field of drone control, mark each word in the text corpus as an empty label or a different control parameter label, and mark each sentence in the text corpus as an empty label or a different control command label; use the above corpus and labels to train the second neural network, specifically, use the sentence corpus and the corresponding control command labels to train the neural network for classification output, and use the word corpus and the corresponding control parameter labels to train the neural network for sequence output; use the trained neural network to input text into the neural network, classify the output of the neural network as a control command, and obtain the control parameters and control parameter types according to the text input and the output sequence of the neural network.
[0025] For example, the text input is "Let the drone take off to a height of 10 meters", the neural network outputs the classification "take off", and the neural network outputs the sequence "air / air / air / air / height / air / air". Thus, the control command is take off, the control parameter type is height, and the parameter value is 10 meters.
[0026] Embodiment 3 In this embodiment, the difference between this embodiment and the above embodiment is that: in this embodiment, the method for obtaining the control information of the drone according to the text input is: judging the parameter complexity of the input text. Specifically, the text input is matched using the control parameter type template and / or the control parameter template to judge whether the number of matches is greater than a specific threshold. In the case where the number of control parameters and / or control parameter types in the match is less than a specific threshold, the control information of the drone is obtained according to the text input using the template matching method described in the first embodiment; in the case where the number of control parameters and / or control parameter types in the match is greater than a specific threshold, the control information of the drone is obtained according to the text input using the second neural network described in the second embodiment.
[0027] Embodiment 4 In this embodiment, the difference between this embodiment and the above embodiment is that: in this embodiment, the method for obtaining drone control information according to text input is: constructing a third neural network, the third neural network is a sequence output neural network, and the third neural network can adopt a neural network model such as RNN / LSTM / Attention-Based RNN / Transform. The third neural network is used to segment the text input to obtain multiple text input clauses. The obtained multiple text input clauses are used to extract control information respectively to obtain a combination control instruction of multiple control instructions.
[0028] Taking the Attention-Based RNN network model as an example, an Attention-Based RNN network model is constructed; corpus is collected, and the words in the corpus are annotated. Each word is annotated with a truncated or non-truncated segmentation label, and the neural network is trained using the collected corpus and segmentation labels; the text input is processed using the trained neural network to obtain the corresponding segmentation label for each word in the text input. The text input is divided into clauses using the truncated labels in the segmentation label to obtain multiple text input clauses.
[0029] Embodiment 5 In this embodiment, the difference between this embodiment and the above embodiment is that: in this embodiment, the method for obtaining drone control information based on text input is: judging the command complexity of the input text. Specifically, a set of regular expressions is used to match control commands, and it is judged whether the number of matched control commands is greater than a specific threshold. When the control command is greater than a specific threshold, the third neural network is used to segment the text input to obtain multiple text input clauses, and control information is extracted for each text input clause; when the number of control commands is less than or equal to a specific threshold, control information is directly extracted from the text input. When extracting control information, the regular expression template or the second neural network processing as described in the first embodiment, the second embodiment or the third embodiment is used.
[0030] Although the embodiments of the present invention are described with practical solutions, they do not constitute limitations on the meaning of the present invention. For those skilled in the art, it is obvious to modify the implementation scheme and combine it with other solutions based on this description.
Claims
1. A method for intelligent control of a drone, comprising the following steps: ① The ground station receives user voice input through the input device; ②Convert user voice input into text input; ③Get drone control information based on text input; ④Send the drone control information to the drone; Features: In step ②, the method for converting user voice input into text input is: constructing a first neural network, the first neural network is a sequence output neural network, collecting voice-text pair training data, training the first neural network, and using the first neural network to convert user voice input into text input; or collecting voice-phoneme pair training data, first training the neural network, using the first neural network to convert user voice input into a phoneme sequence, and then using a pre-constructed dictionary to map the phoneme sequence into text to obtain text input.
2. The intelligent control method of a drone according to claim 1, characterized in that: The first neural network adopts an RNN neural network model, or an LSTM neural network model, or a GRU neural network model, or an Attention-BasedRNN neural network model, or a Transformer neural network model.
3. The intelligent control method of a drone according to claim 2, characterized in that: The first neural network adopts a hybrid model of the neural network model in claim 2 and the machine learning model.
4. The intelligent control method of a drone according to claim 1, characterized in that: In step ③, the method for obtaining the drone control information according to the text input is: defining a regular expression template set; the regular expression template set includes a control command regular expression template subset and a control parameter regular expression template subset; The control command regular expression template is used to match the control command related text in the text input, and the control parameter regular expression template is used to match the control parameter related text in the text input. Through the predefined regular expression template set, the text input is matched with each regular expression template in the set respectively, and the drone control information corresponding to each regular expression in the text input can be obtained.
5. The intelligent control method of a drone according to claim 4, characterized in that: Before performing template matching on the text input, the text input is subjected to word normalization processing. The method for performing word normalization processing on the text input is as follows: constructing a standard word list, which contains standard words; obtaining a text corpus, which records language data in the field of drones and contains all standard words in the standard word list; converting the words in the corpus into word vectors through a word embedding method; obtaining word vectors of all standard words, and finding word vectors whose Cosine distance to the word vector of each standard word is less than a specific threshold; Get the words corresponding to these word vectors, use these words as the associated words of the corresponding standard words, and build a "standard word-associated word" vocabulary, which contains the corresponding relationship between standard words, associated words, and the associated words of standard words; before performing template matching on the text input, find all the associated words in the text input and replace all the associated words with the corresponding standard words.
6. The intelligent control method of a drone according to claim 1, characterized in that: In step ③, the method for obtaining the control information of the UAV according to the text input is as follows: constructing a second neural network and defining a label set; the second neural network is a neural network that outputs sequences and classifications at the same time; the label set includes a control command label subset, a control parameter label subset, and an empty label; collecting text corpus related to the field of UAV control, marking each word in the text corpus as an empty label or a different control parameter label, and marking each sentence in the text corpus as an empty label or a different control command label; using the above corpus and labels to train the second neural network, specifically, using the sentence corpus and the corresponding control command label to train the second neural network for classification output, and using the word corpus and the corresponding control parameter label to train the second neural network for sequence output; using the trained second neural network, inputting text into the second neural network, classifying the output of the second neural network as a control command, and obtaining the control parameters and control parameter types according to the text input and the output sequence of the second neural network.
7. The intelligent control method of a drone according to claim 1, characterized in that: The following steps are also included between step ② and step ③: determining the parameter complexity of the input text, specifically, matching the text input using a control parameter type template and / or a control parameter template, and determining whether the number of matches is greater than a specific threshold; when the number of control parameters and / or control parameter types in the match is less than a specific threshold, obtaining the control information of the drone by using the method for obtaining the control information of the drone by using the text input as described in claim 4, and obtaining the control information of the drone according to the text input; when the number of control parameters and / or control parameter types in the match is greater than a specific threshold, obtaining the control information of the drone by using the method for obtaining the control information of the drone by using the text input as described in claim 6, and obtaining the control information of the drone according to the text input.
8. The intelligent control method of a drone according to claim 1, characterized in that: The following steps are also included between step ② and step ③: constructing a third neural network, the third neural network is a sequence output neural network, the third neural network is used to segment the text input to obtain multiple text input clauses; the multiple text input clauses obtained are used to extract control information separately to obtain a combination control instruction of multiple control instructions.
9. The intelligent control method of a drone according to claim 8, characterized in that: The method for constructing the third neural network is: collecting corpus, marking the words in the corpus, each word is marked with a truncated or non-truncated segmentation label, and using the collected corpus and segmentation labels to train the neural network; using the trained neural network to process the text input to obtain the corresponding segmentation label of each word in the text input; using the truncation label in the segmentation label to divide the text input into clauses to obtain multiple text input clauses.
10. The intelligent control method of a drone according to claim 1, characterized in that: The following steps are also included between step ② and step ③: determining the command complexity of the input text, specifically, using a set of regular expressions to match control commands, and determining whether the number of matched control commands is greater than a specific threshold; when the control command is greater than the specific threshold, using the third neural network described in claim 8 to segment the text input to obtain multiple text input clauses, and extracting control information from each text input clause; when the number of control commands is less than or equal to the specific threshold, directly extracting control information from the text input, using the regular expression template processing as in claim 4, or using the second neural network processing as in claim 6, or using the parameter complexity method for determining the input text as in claim 7 for processing.
