Waypoint mission information storage method, reading method and unmanned aerial vehicle
By nesting, storing and verifying waypoint mission information in the drone, the problem of abnormal operation caused by reading incorrect information is solved, and the reliability of the drone and the execution accuracy of the waypoint mission are improved.
Patent Information
- Application Number
- CN202010590890.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-24
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-06-24
AI Technical Summary
When the UAV reads incorrect waypoint mission information, it may cause the flight route to deviate and operate abnormally, affecting its reliability.
By storing waypoint task information, waypoint content and action information in nested data structures respectively, and performing verification and analysis when reading, the correctness of the information is ensured and operating abnormalities caused by error information are avoided.
It improves the reliability of UAV operation, avoids flight abnormalities caused by erroneous information, and improves the accuracy of waypoint mission execution.
Smart Images

Figure CN111752948B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of unmanned aerial vehicles, and in particular to a waypoint mission information storage method, a reading method and an unmanned aerial vehicle. Background Art
[0002] With the rapid development of drone technology, drones have been widely used in many fields. Drones perform waypoint missions, such as high-voltage line cruise, aerial survey, waypoint flight, etc., based on the waypoint mission information stored in the storage medium. However, if the waypoint mission information is stored incorrectly or abnormally damaged, the drone reads the wrong waypoint mission information from the storage medium. When performing the waypoint mission based on the waypoint mission information, problems such as flight route deviation and uncontrolled drone may occur, resulting in abnormal operation of the drone. Summary of the invention
[0003] The embodiments of the present invention aim to provide a waypoint mission information storage method, a reading method and a drone, which can avoid abnormal operation of the drone due to reading erroneous waypoint mission information and improve the reliability of the drone operation.
[0004] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0005] In a first aspect, an embodiment of the present invention provides a method for storing waypoint mission information, comprising:
[0006] Acquire task information of a waypoint task, and store the task information in a data structure 1, wherein the data structure 1 is used to store task information of a waypoint task including at least one waypoint;
[0007] Obtaining waypoint contents of each waypoint of the waypoint mission, and storing the waypoint contents in data structure 2 respectively;
[0008] Obtaining action information of each waypoint of the waypoint mission, and storing the action information in data structure three respectively;
[0009] Among them, the data structure one, the data structure two and the data structure three are nested, the data structure one, the data structure two and the data structure three all include the same waypoint task ID, and the data structure two and the data structure three include the same waypoint ID.
[0010] In some embodiments, the mission information includes a first waypoint mission ID, a mission type, and the number of waypoints, and the mission type includes waypoint content corresponding to each waypoint;
[0011] The waypoint content includes the second waypoint task ID, the first waypoint ID and the number of actions included in the waypoint;
[0012] The action information includes the third waypoint task ID, the second waypoint ID, the action ID and the action type of the action;
[0013] Among them, the first waypoint mission ID, the second waypoint mission ID and the third waypoint mission ID are the same, and the first waypoint ID and the second waypoint ID are the same.
[0014] In a second aspect, an embodiment of the present invention provides a method for reading waypoint mission information, comprising:
[0015] Acquire a data structure 1 of the waypoint mission information, parse the data structure 1, and obtain mission information of the waypoint mission, wherein the data structure 1 is used to store mission information of the waypoint mission including at least one waypoint;
[0016] Acquire at least one data structure 2 according to the task information, parse the data structure 2, and obtain the waypoint content of the data structure 2, wherein the data structure 2 is used to store the waypoint content of the waypoint;
[0017] Detecting the waypoint content, and when the waypoint content is correct, acquiring data structure three according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint;
[0018] Parsing the data structure three to obtain the action information of the waypoint;
[0019] The action information is detected, and if the action information is correct, the action of the waypoint is read from the action information.
[0020] In some embodiments, the method further comprises:
[0021] When the waypoint content is erroneous, generating a warning message indicating that the waypoint mission information reading failed; and / or,
[0022] If the action information is wrong, a warning message indicating that the waypoint mission information reading failed is generated.
[0023] In some embodiments, the mission information includes a first waypoint mission ID and the number of waypoints;
[0024] The obtaining of at least one data structure 2 according to the task information comprises:
[0025] At least one data structure 2 is obtained according to the first waypoint mission ID and the number of waypoints, wherein the number of the data structures 2 is consistent with the number of waypoints.
[0026] In some embodiments, the waypoint content includes a second waypoint task ID, a first waypoint ID, and the number of actions included in the waypoint, and detecting the waypoint content includes:
[0027] Determine whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information;
[0028] If they are inconsistent, it is determined that the waypoint content is incorrect;
[0029] If they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are in ascending order;
[0030] If it is not increasing in sequence, return to the step of determining that the waypoint content is wrong;
[0031] If the order is increasing, it is determined that the waypoint content is correct. In some embodiments, the waypoint content includes the second waypoint task ID, the first waypoint ID and the number of actions included in the waypoint, and the detecting of the waypoint content includes:
[0032] Determine whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information;
[0033] If they are inconsistent, it is determined that the waypoint content is incorrect;
[0034] If they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are in ascending order;
[0035] If it is not increasing in sequence, return to the step of determining that the waypoint content is wrong;
[0036] If the sequence is increasing, a CRC check is performed on the waypoint content;
[0037] Determine whether the CRC check passes;
[0038] If not, return to the step of determining that the waypoint content is incorrect;
[0039] If passed, it is determined that the waypoint content is correct.
[0040] In some embodiments, the data structure three is obtained according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint, including:
[0041] According to the second waypoint task ID, the first waypoint ID and the number of actions, a data structure three is obtained, wherein the data structure three is used to store the action information of the waypoint.
[0042] In some embodiments, the action information includes a third waypoint mission ID, a second waypoint ID, an action ID, and an action type of the action, and detecting the action information includes:
[0043] Determine whether the third waypoint task ID of the action information is consistent with the first task ID of the task information; if they are inconsistent, determine that the action information is wrong;
[0044] If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence;
[0045] If it is not increasing in sequence, return to the step of determining that the action information is wrong;
[0046] If the sequence is increasing, it is determined that the action information is correct.
[0047] In some embodiments, the action information includes a third waypoint mission ID, a second waypoint ID, an action ID, and an action type of the action, and detecting the action information includes:
[0048] Determine whether the third waypoint task ID of the action information is consistent with the first task ID of the task information;
[0049] If they are inconsistent, it is determined that the action information is wrong;
[0050] If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence;
[0051] If it is not increasing in sequence, return to the step of determining that the action information is wrong;
[0052] If the sequence is increasing, a CRC check is performed on the action information;
[0053] Determine whether the CRC check passes;
[0054] If not, return to the step of determining the error of the action information;
[0055] If passed, it is determined that the action information is correct.
[0056] In a third aspect, an embodiment of the present invention provides a drone, including:
[0057] at least one processor; and,
[0058] a memory communicatively connected to the at least one processor; wherein,
[0059] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the waypoint mission information storage method as described in any of the above items, and / or the waypoint mission information reading method as described in any of the above items.
[0060] In a fourth aspect, an embodiment of the present invention further provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a drone to execute a waypoint mission information storage method as described in any one of the above items, and / or a waypoint mission information reading method as described in any one of the above items.
[0061] The beneficial effect of the embodiment of the present invention is: different from the prior art, the embodiment of the present invention provides a waypoint mission information storage method, a reading method and a drone, wherein the waypoint mission information reading method obtains data structure 1 of the waypoint mission information, parses data structure 1, obtains mission information of the waypoint mission, data structure 1 is used to store mission information of the waypoint mission including at least one waypoint, obtains at least one data structure 2 according to the mission information, parses data structure 2, obtains the waypoint content of data structure 2, data structure 2 is used to store the waypoint content of the waypoint, detects the waypoint content, and when the waypoint content is correct, obtains data structure 3 according to the waypoint content, data structure 3 is used to store the action information of the waypoint, parses data structure 3, obtains the action information of the waypoint, detects the action information, and if the action information is correct, reads the action of the waypoint from the action information. Therefore, the embodiment of the present invention avoids the situation where the drone operates abnormally due to reading incorrect waypoint mission information, thereby improving the reliability of the drone operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0063] Figure 1 is a method flow chart of a method for storing waypoint mission information provided by an embodiment of the present invention;
[0064] Figure 2 is a method flow chart of a method for reading waypoint mission information provided by an embodiment of the present invention;
[0065] Figure 3 It is a flowchart of a method for reading waypoint mission information provided by an embodiment of the present invention;
[0066] Figure 4 yes Figure 2 A method flow chart of step S33;
[0067] Figure 5 yes Figure 2 Another method flow chart of step S33;
[0068] Figure 6 yes Figure 2 A method flow chart of step S35;
[0069] Figure 7 yes Figure 2 Another method flow chart of step S35;
[0070] Figure 8 is a method flow chart of another method for reading waypoint mission information provided by an embodiment of the present invention;
[0071] Fig. 9 It is a structural schematic diagram of a waypoint mission information storage device provided by an embodiment of the present invention;
[0072] Fig.10 It is a structural schematic diagram of a waypoint mission information reading device provided by an embodiment of the present invention;
[0073] Fig.11 It is a structural schematic diagram of a drone provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0075] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flow chart. In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance.
[0076] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0077] It should be noted that the waypoint mission information storage method and / or waypoint mission information reading method provided in the embodiments of the present invention is applied to unmanned aerial vehicles, i.e., unmanned aerial vehicles controlled by radio remote control equipment and self-provided program control devices. In this embodiment, unmanned aerial vehicles include unmanned fixed-wing aircraft, unmanned vertical take-off and landing aircraft, unmanned airships, unmanned helicopters, unmanned multi-rotor aircraft, unmanned paragliders, etc.
[0078] In some application scenarios of drones, the application scenarios include drones, and their working principles are as follows: receiving a read instruction; according to the read instruction, reading waypoint mission information based on the waypoint mission information reading method provided in any of the following embodiments, wherein the waypoint mission information is pre-stored in the SD card or flash memory of the drone using the waypoint mission information storage method provided in any of the following embodiments; executing the waypoint mission according to the waypoint mission information.
[0079] In some application scenarios of drones, the application scenarios include drones and terminal devices, and the drones and terminal devices are connected in communication. The drones and terminal devices are connected in communication via communication lines established by wireless technologies such as Bluetooth, WIFI, and 4G, so as to realize data interaction and functional applications between the drones and the terminal devices.
[0080] When the terminal device is a computer with a display function such as a smart phone, a tablet computer, a laptop computer or a car, it includes a data processing module, a wireless communication module, an input-output module and a display module. When the terminal device is a computer without a display function such as a remote control, it includes a data processing module, a wireless communication module and an input-output module. It can be understood that the terminal device is not limited to the two configuration methods disclosed above. According to the type of smart terminal and application requirements, its functional modules can be expanded and changed. For example, when the terminal device is a smart phone, in addition to the data processing module, the wireless communication module, the input-output module and the display module, it also includes a fingerprint recognition module, a GPS positioning module, an audio module, a camera module, etc.
[0081] On the drone side, its working principle is as follows: receiving a storage instruction sent by a terminal device; according to the storage instruction, using the waypoint mission information storage method provided in any of the following embodiments, storing the waypoint mission information in the SD card or flash memory of the drone; receiving a read instruction; according to the read instruction, reading the waypoint mission information from the SD card or flash memory based on the waypoint mission information reading method provided in any of the following embodiments; executing the waypoint mission according to the waypoint mission information; returning the execution result to the terminal device. Among them, the execution result includes the state data of the drone, the image data taken by the drone, the environmental data collected by the drone, etc. Specifically, the state data includes the position, coordinates, attitude angle, heading angle, angular velocity, etc. of the drone. Environmental data includes the wind direction, airflow, weather, air, spectrum, light intensity, etc. of the current environment of the drone.
[0082] In some embodiments, the drone includes at least one working mode, and the at least one working mode includes a mission mode. Accordingly, before receiving the read instruction, the process further includes: receiving a mode switching instruction; and switching the current working mode to the mission mode according to the mode switching instruction.
[0083] See also Figure 1 , is a method flow chart of a method for storing waypoint mission information provided by an embodiment of the present invention. Figure 1 As shown, the waypoint mission information storage method can be applied to a drone, and the method S100 includes:
[0084] S11. Obtain task information of a waypoint task, and store the task information in data structure 1, wherein the data structure 1 is used to store task information of a waypoint task including at least one waypoint.
[0085] The mission information includes a first waypoint mission ID, a mission type, and the number of waypoints, and the mission type includes the waypoint content corresponding to each waypoint.
[0086] S12, obtaining waypoint contents of each waypoint of the waypoint mission, and storing the waypoint contents in data structure 2 respectively.
[0087] The waypoint content includes the second waypoint task ID, the first waypoint ID, and the number of actions included in the waypoint.
[0088] S13, obtaining action information of each waypoint of the waypoint mission, and storing the action information in data structure three respectively, wherein the data structure one, the data structure two and the data structure three are nested, the data structure one, the data structure two and the data structure three all include the same waypoint mission ID, and the data structure two and the data structure three include the same waypoint ID.
[0089] The action information includes a third waypoint task ID, a second waypoint ID, an action ID, and an action type of the action. The first waypoint task ID is used to identify the storage location of the data structure 1. When reading the waypoint task information, the data structure 1 of the waypoint task information can be obtained according to the first waypoint task ID to obtain the task information of the waypoint task information.
[0090] In this embodiment, there are four types of missions, namely: no waypoint mission, normal waypoint mission, polygonal waypoint mission and rectangular waypoint mission. The waypoint content corresponding to each waypoint involved in the present invention corresponds to the mission type of the normal waypoint mission.
[0091] Since data structure one is used to store task information of waypoint tasks including at least one waypoint, the task information includes a first waypoint task ID, a task type, and the number of waypoints, the task type includes waypoint content corresponding to each waypoint, and step S12 discloses obtaining the waypoint content of each waypoint of the waypoint task, and storing the waypoint content in data structure two respectively, the number of data structures two is equal to the number of waypoints, and each data structure two stores the waypoint content of one waypoint, that is, data structure two is nested in data structure one.
[0092] Under normal circumstances, the second waypoint task ID of the waypoint content should be consistent with the first waypoint task ID of the task information, and the first waypoint ID of the waypoint content corresponding to each waypoint should increase sequentially. Therefore, whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information, and whether the first waypoint ID of the waypoint content corresponding to each waypoint increases sequentially, can be used as one of the judgment conditions for whether there is a storage error or information damage in the storage process of the waypoint task information.
[0093] Since data structure two is used to store the waypoint content of each waypoint, the waypoint content includes the second waypoint task ID, the first waypoint ID and the number of actions included in the waypoint, the number of actions corresponds to a number of action IDs and the action type of each action, and step S13 discloses the action information of each waypoint of the waypoint task, and the action information is stored in data structure three respectively, that is, data structure three is nested in data structure two.
[0094] Under normal circumstances, the third waypoint task ID of the action information, the second waypoint task ID of the waypoint content and the first waypoint task ID of the task information should be consistent. Assuming that a waypoint needs to perform multiple actions, such as taking pictures, recording videos, hovering, etc., the second waypoint ID of the action information corresponding to the waypoint should increase sequentially. Therefore, whether the third waypoint task ID of the action information is consistent with the first waypoint task ID of the task information or the second waypoint task ID of the waypoint content, and the second waypoint ID of the action information corresponding to the waypoint should increase sequentially, can be used as one of the judgment conditions whether there is a storage error or information damage during the storage process of the waypoint task information.
[0095] In summary, the first waypoint mission ID, the second waypoint mission ID and the third waypoint mission ID are the same, and the first waypoint ID and the second waypoint ID are the same. It can be understood that the data storage method of data structure one, data structure two and data structure three is not limited to the nested storage method disclosed in this embodiment. For example, since data structure one, data structure two and data structure three are associated with each other, waypoint mission information can be stored based on other associated storage methods, and the associated data structures can be obtained in sequence through ID addressing and other methods. After data detection, it is determined whether the waypoint mission information stored in data structure one, data structure two and data structure three is accurate, and when the waypoint mission information is correct, the operation of reading the waypoint mission information is triggered.
[0096] A method for storing waypoint mission information provided by an embodiment of the present invention stores the mission information, waypoint content, and action information of the waypoint mission in data structure one, data structure two, and data structure three, respectively, so that when reading the waypoint mission information, the mission information is obtained through data structure one, at least one data structure two is obtained through the mission information, the waypoint content of the waypoint is obtained by parsing data structure two, the waypoint content is detected, and when the waypoint content is correct, data structure three is obtained, the action information of the waypoint is obtained by parsing data structure three, the action information of the waypoint is detected, and when the action information is correct, the action of the waypoint is read. Therefore, the embodiment of the present invention avoids the situation where the drone operation is abnormal due to reading incorrect waypoint mission information, thereby improving the reliability of the drone operation.
[0097] See also Figure 2 , Figure 2 FIG. 1 is a flowchart of a method for reading waypoint mission information provided by an embodiment of the present invention. Figure 2 As shown, the waypoint mission information reading method can be applied to a drone, and the method S200 includes:
[0098] S21. Acquire a data structure 1 of the waypoint mission information, parse the data structure 1, and obtain mission information of the waypoint mission, wherein the data structure 1 is used to store mission information of the waypoint mission including at least one waypoint.
[0099] S22. Acquire at least one data structure 2 according to the task information, parse the data structure 2, and obtain waypoint content of the data structure 2, wherein the data structure 2 is used to store the waypoint content of the waypoint.
[0100] Please also read Figure 3The mission information includes a first waypoint mission ID and the number of waypoints. The obtaining of at least one data structure 2 according to the mission information includes: obtaining at least one data structure 2 according to the first waypoint mission ID and the number of waypoints, wherein the number of the data structures 2 is consistent with the number of waypoints.
[0101] S23, detecting the waypoint content, and when the waypoint content is correct, obtaining data structure three according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint.
[0102] The waypoint content includes a second waypoint mission ID, a first waypoint ID, and the number of actions included in the waypoint. The acquiring data structure three according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint, includes: acquiring data structure three according to the second waypoint mission ID, the first waypoint ID, and the number of actions, wherein the data structure three is used to store the action information of the waypoint.
[0103] As one of the embodiments of the present invention, please refer to Figure 4 , the detecting the waypoint content includes:
[0104] S231, determining whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information.
[0105] S232: If they are inconsistent, determine that the waypoint content is incorrect.
[0106] S233: If they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are increasing in sequence.
[0107] If it is not increasing sequentially, return to step S232.
[0108] S234: If the sequence is increasing, determine that the waypoint content is correct.
[0109] In the above-mentioned implementation, by judging whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information, it can be judged whether the waypoint content of the data structure 2 is consistent with the waypoint content of the corresponding waypoint in the waypoint task. If the waypoint content of the data structure 2 is inconsistent with the waypoint content of the corresponding waypoint in the waypoint task, it is determined that the waypoint content is wrong; if the waypoint content of the data structure 2 is consistent with the waypoint content of the corresponding waypoint in the waypoint task, it is further judged whether the first waypoint ID corresponding to each waypoint is sequentially increased. If the first waypoint ID corresponding to each waypoint is not sequentially increased, it means that there is a storage error or information damage in the waypoint task information, and it is also determined that the waypoint content is wrong; if the first waypoint ID corresponding to each waypoint is sequentially increased, it means that there is no storage error or information damage in the waypoint content in the data structure 2, and it is determined that the waypoint content of the waypoint is correct.
[0110] As one of the embodiments of the present invention, please refer to Figure 5 , the detecting the waypoint content includes:
[0111] S231, determining whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information.
[0112] S232: If they are inconsistent, determine that the waypoint content is incorrect.
[0113] S233, if they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are in ascending order;
[0114] If it is not increasing sequentially, return to step S232.
[0115] S235: If the sequence is increasing, perform CRC check on the waypoint content.
[0116] S236: Determine whether the CRC check passes.
[0117] If not passed, return to step S232.
[0118] S234: If passed, determine that the waypoint content is correct.
[0119] In this embodiment, the storage structure of the waypoint mission information includes the data structure 1, data structure 2 and data structure 3 described above, and also includes data bits and check bits, the data bits are used to store magic words, and the check bits are used to store CRC check values. To avoid the same magic words, a unique magic word is usually generated by a random method. Generally speaking, the magic word will use the serial number, network address or clock of the drone.
[0120] When storing waypoint mission information, a CRC check is performed on the content stored in data structure 1, the content stored in data structure 2, the content stored in data structure 3 and the magic word in the storage structure to obtain a first CRC check value, and the first CRC check value is stored in the check bit of the storage structure.
[0121] When the first waypoint IDs corresponding to each waypoint are sequentially increased, the CRC check on the waypoint content includes: when the first waypoint IDs corresponding to each waypoint are sequentially increased, the waypoint content and the magic word are CRC checked to obtain a second CRC check value. Correspondingly, the determination of whether the CRC check is passed includes: obtaining the first CRC check value; comparing the second CRC check value with the first CRC check value; if the second CRC check value is equal to the first CRC check value, the CRC check is passed; if the second CRC check value is not equal to the first CRC check value, the CRC check is not passed. The second CRC check value is equal to the first CRC check value, indicating that the waypoint content stored in the data structure 2 is consistent with the waypoint content of the corresponding waypoint in the waypoint task, indicating that the waypoint task information has not been damaged during the storage process.
[0122] S24, parsing the data structure three to obtain the action information of the waypoint.
[0123] S25, detecting the action information, and if the action information is correct, reading the action of the waypoint from the action information.
[0124] The action information includes the third waypoint task ID, the second waypoint ID, the action ID and the action type of the action.
[0125] As one of the embodiments of the present invention, please refer to Figure 6 , the detecting the action information comprises:
[0126] S251, determining whether the third waypoint task ID of the action information is consistent with the first task ID of the task information.
[0127] S252: If they are inconsistent, determine that the action information is wrong.
[0128] S253: If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence.
[0129] If it is not increasing sequentially, return to step S252.
[0130] S254: If the sequence is increasing, determine that the action information is correct.
[0131] In the above-mentioned implementation, by judging whether the third waypoint task ID of the action information is consistent with the first task ID of the task information, it can be judged whether the action information of the data structure three is consistent with the action information of the corresponding waypoint in the waypoint task. If it is judged that the action information of the data structure three is inconsistent with the action information of the corresponding waypoint in the waypoint task, it is determined that the action information is wrong; if the action information of the data structure three is consistent with the action information of the corresponding waypoint in the waypoint task, it is further judged whether the action ID of the waypoint is sequentially increased. If the action ID of the waypoint is not sequentially increased, it means that there is a storage error or information damage in the waypoint task information, and the action information is also determined to be wrong; if the action ID of the waypoint is sequentially increased, it means that there is no storage error or information damage in the action information in the data structure three, and the action information of the waypoint is determined to be correct.
[0132] As one of the embodiments of the present invention, please refer to Figure 7 , the detecting the action information comprises:
[0133] S251, determining whether the third waypoint task ID of the action information is consistent with the first task ID of the task information.
[0134] S252: If they are inconsistent, determine that the action information is wrong.
[0135] S253: If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence.
[0136] If it is not increasing sequentially, return to step S252.
[0137] S255: If the sequence is increasing, perform CRC check on the action information.
[0138] S256: Determine whether the CRC check passes.
[0139] If not passed, return to step S252.
[0140] S254: If passed, determine that the action information is correct.
[0141] When the action ID of the waypoint increases in sequence, the CRC check on the action information includes: when the action ID of the waypoint increases in sequence, the action information and the magic word are CRC checked to obtain a third CRC check value. Correspondingly, the judgment on whether the CRC check is passed includes: obtaining the first CRC check value; comparing the third CRC check value with the first CRC check value; if the third CRC check value is equal to the first CRC check value, the CRC check is passed; if the third CRC check value is not equal to the first CRC check value, the CRC check is not passed; the third CRC check value is equal to the first CRC check value, indicating that the action information stored in the data structure three is consistent with the action information of the corresponding waypoint in the waypoint task, indicating that the waypoint task information has not been damaged during the storage process.
[0142] Please refer again Figure 3 , assuming that the waypoint task includes waypoint 1 and waypoint 2, waypoint 1 includes action 1 and action 2, and waypoint 2 includes action 3, the process of the waypoint task information reading method is as follows:
[0143] (1) Obtaining a data structure 1 of waypoint mission information, parsing the data structure 1, and obtaining mission information of the waypoint mission, wherein the mission information includes a first waypoint mission ID and the number of waypoints, wherein the number of waypoints is equal to 2.
[0144] (2) Two data structures 2 are obtained according to the first waypoint task ID and the number of waypoints, and the data structure 2 is parsed to obtain the waypoint content of the data structure 2. The waypoint content of waypoint 1 includes the second waypoint task ID of waypoint 1, the first waypoint ID of waypoint 1, and the number of actions included in waypoint 1, wherein the number of actions included in waypoint 1 is equal to 2. The waypoint content of waypoint 2 includes the second waypoint task ID of waypoint 2, the first waypoint ID of waypoint 2, and the number of actions included in waypoint 2, wherein the number of actions included in waypoint 2 is equal to 1.
[0145] (3) Check the waypoint contents of waypoint 1 and waypoint 2. When the waypoint contents are correct, obtain the corresponding data structure 3 according to the waypoint contents of waypoint 1.
[0146] (4) Parse data structure 3 to obtain the action information of waypoint 1.
[0147] (5) Detect the action information of waypoint 1. If the action information of waypoint 1 is correct, read action 1 and action 2 from the action information.
[0148] (6) Next, the corresponding data structure 3 is obtained according to the waypoint content of waypoint 2.
[0149] (7) Parse data structure 3 to obtain the action information of waypoint 2.
[0150] (8) Detect the action information of waypoint 2. If the action information is correct, read action 3 from the action information of waypoint 2.
[0151] In some embodiments, steps (3)-(8) may be replaced by:
[0152] (9) When the waypoint content is correct, the corresponding data structure 3 is obtained according to the waypoint content of waypoint 1 and the corresponding data structure 3 is obtained according to the waypoint content of waypoint 2.
[0153] (10) Parse the two data structures 3 to obtain the action information of waypoint 1 and the action information of waypoint 2.
[0154] (11) Detect the action information of waypoint 1 and waypoint 2. If the action information of waypoint 1 is correct, read action 1 and action 2 from the action information of waypoint 1. If the action information of waypoint 2 is correct, read action 3 from the action information of waypoint 2.
[0155] The embodiment of the present invention provides a method for reading waypoint mission information, which obtains data structure 1 of waypoint mission information, parses data structure 1, obtains mission information of waypoint mission, data structure 1 is used to store mission information of waypoint mission including at least one waypoint, obtains at least one data structure 2 according to the mission information, parses data structure 2, obtains waypoint content of data structure 2, data structure 2 is used to store waypoint content of waypoint, detects waypoint content, and when waypoint content is correct, obtains data structure 3 according to waypoint content, data structure 3 is used to store action information of waypoint, parses data structure 3, obtains action information of waypoint, detects action information, and reads the action of waypoint from action information if the action information is correct. Therefore, the embodiment of the present invention avoids the situation that the drone operation is abnormal due to reading wrong waypoint mission information, thereby improving the reliability of drone operation.
[0156] See also Figure 8 , is a method flow chart of another method for reading waypoint mission information provided by an embodiment of the present invention. Figure 8 As shown, the waypoint mission information reading method S300 also includes:
[0157] S31, when the waypoint content is wrong, generating a warning message indicating that the waypoint mission information reading failed. And / or,
[0158] S32: If the action information is wrong, generate a warning message indicating that the waypoint mission information reading failed.
[0159] A method for reading waypoint mission information provided by an embodiment of the present invention fails to read the waypoint mission information when the waypoint content and / or action information is erroneous, and generates a warning message of the failure to read the waypoint mission information, thereby prompting a user that the waypoint mission information storage is erroneous or abnormally damaged. The user can re-store the waypoint mission information or use a correction algorithm to correct the waypoint mission information based on the warning message, thereby improving the user's usage experience.
[0160] See also Fig. 9 , is a schematic diagram of the structure of a waypoint mission information storage device provided by an embodiment of the present invention. Fig. 9 As shown, the waypoint mission information storage device 400 includes a first storage module 401 , a second storage module 402 and a third storage module 403 .
[0161] The first storage module 401 is used to obtain task information of a waypoint task and store the task information in a data structure 1, wherein the data structure 1 is used to store task information of a waypoint task including at least one waypoint.
[0162] The second storage module 402 is used to obtain the waypoint content of each waypoint of the waypoint mission and store the waypoint content in the data structure 2.
[0163] The third storage module 403 is used to obtain the action information of each waypoint of the waypoint mission, and store the action information in data structure three respectively, wherein the data structure one, the data structure two and the data structure three are nested, the data structure one, the data structure two and the data structure three all include the same waypoint mission ID, and the data structure two and the data structure three include the same waypoint ID D.
[0164] The mission information includes a first waypoint mission ID, a mission type, and the number of waypoints, and the mission type includes the waypoint content corresponding to each waypoint. The waypoint content includes a second waypoint mission ID, a first waypoint ID, and the number of actions included in the waypoint. The action information includes a third waypoint mission ID, a second waypoint ID, an action ID, and the action type of the action. The first waypoint mission ID, the second waypoint mission ID, and the third waypoint mission ID are the same, and the first waypoint ID and the second waypoint ID are the same.
[0165] The embodiment of the present invention provides a waypoint mission information storage device, which stores the mission information of the waypoint mission information in data structure one through the first storage module 401, stores the waypoint contents of the waypoint mission information in data structure two respectively through the second storage module 402, and stores the action information of the waypoint mission information in data structure three respectively through the third storage module 403, so that when reading the waypoint mission information, the mission information is obtained through data structure one, at least one data structure two is obtained through the mission information, the waypoint contents of the waypoint are obtained by parsing the data structure two, the waypoint contents are detected, and when the waypoint contents are correct, the data structure three is obtained, the action information of the waypoint is obtained by parsing the data structure three, the action information is detected, and when the action information is correct, the action of the waypoint is read. Therefore, the embodiment of the present invention avoids the situation where the drone operation is abnormal due to reading the wrong waypoint mission information, thereby improving the reliability of the drone operation.
[0166] See also Fig.10 , is a schematic diagram of the structure of a waypoint mission information reading device provided by an embodiment of the present invention. Fig.10 As shown, the waypoint mission information reading device 500 includes a first acquisition module 501 , a second acquisition module 502 , a first detection module 503 , a third acquisition module 504 and a second detection module 505 .
[0167] The first acquisition module 501 is used to acquire a data structure 1 of the waypoint mission information, parse the data structure 1, and obtain mission information of the waypoint mission, wherein the data structure 1 is used to store mission information of the waypoint mission including at least one waypoint.
[0168] The second acquisition module 502 is used to acquire at least one data structure 2 according to the task information, parse the data structure 2, and obtain the waypoint content of the data structure 2, wherein the data structure 2 is used to store the waypoint content of the waypoint.
[0169] The mission information includes a first waypoint mission ID and the number of waypoints, and obtaining at least one data structure two based on the mission information includes: obtaining at least one data structure two based on the first waypoint mission ID and the number of waypoints, wherein the number of the data structures two is consistent with the number of waypoints.
[0170] The first detection module 503 is used to detect the waypoint content. When the waypoint content is correct, a data structure three is obtained according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint.
[0171] The waypoint content includes a second waypoint mission ID, a first waypoint ID, and the number of actions included in the waypoint. The acquiring data structure three according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint, includes: acquiring data structure three according to the second waypoint mission ID, the first waypoint ID, and the number of actions, wherein the data structure three is used to store the action information of the waypoint.
[0172] As one implementation of the present invention, the first detection module 503 includes a first judgment unit 5031 , a first determination unit 5032 , a second judgment unit 5033 and a second determination unit 5034 .
[0173] The first judging unit 5031 is used to judge whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information.
[0174] The first determining unit 5032 is configured to determine that the waypoint content is incorrect if the second waypoint task ID of the waypoint content is inconsistent with the first waypoint task ID of the task information or the first waypoint IDs corresponding to the waypoints do not increase sequentially.
[0175] The second judgment unit 5033 is used to judge whether the first waypoint IDs corresponding to each waypoint are increasing in sequence if the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information.
[0176] The second determining unit 5034 is configured to determine that the waypoint content is correct if the first waypoint IDs corresponding to the waypoints are in increasing order.
[0177] As one implementation of the present invention, the first detection module 503 further includes a first verification unit 5035 and a third judgment unit 5036 .
[0178] The first verification unit 5035 is used to perform CRC verification on the waypoint content if the first waypoint IDs corresponding to the waypoints are in increasing order.
[0179] The third judgment unit 5036 is used to judge whether the CRC check passes.
[0180] At this time, the first determination unit 5032 is further used to determine that the waypoint content is wrong if the CRC check fails. The second determination unit 5034 is further used to determine that the waypoint content is correct if the CRC check passes.
[0181] The third acquisition module 504 is used to parse the data structure three to obtain the action information of the waypoint.
[0182] The second detection module 505 is used to detect the action information, and if the action information is correct, read the action of the waypoint from the action information.
[0183] The action information includes the third waypoint task ID, the second waypoint ID, the action ID and the action type of the action.
[0184] As one implementation of the present invention, the second detection module 505 includes a fourth judgment unit 5051 , a third determination unit 5052 , a fifth judgment unit 5053 and a fourth determination unit 5054 .
[0185] The fourth judgment unit 5051 is used to judge whether the third waypoint task ID of the action information is consistent with the first task ID of the task information.
[0186] The third determining unit 5052 is configured to determine that the action information is wrong if the third waypoint task ID of the action information is inconsistent with the first task ID of the task information or the action IDs of the waypoints do not increase sequentially.
[0187] The fifth judgment unit 5053 is used to judge whether the action IDs of the waypoints are increasing in sequence if the third waypoint task ID of the action information is consistent with the first task ID of the task information.
[0188] The fourth determining unit 5054 is configured to determine that the action information is correct if the action IDs of the waypoints are in increasing order.
[0189] As one implementation of the present invention, the second detection module 505 further includes a second verification unit 5055 and a sixth judgment unit 5056 .
[0190] The second verification unit 5055 is used to perform a CRC check on the action information if the action IDs of the waypoints are in increasing order.
[0191] The sixth judgment unit 5056 is used to judge whether the CRC check is passed.
[0192] At this time, the third determination unit 5052 is further configured to determine that the action information is wrong if the CRC check fails. The fourth determination unit 5054 is further configured to determine that the action information is correct if the CRC check passes.
[0193] The embodiment of the present invention provides a waypoint mission information reading device, wherein the first acquisition module 501 acquires the data structure 1 of the waypoint mission information, parses the data structure 1, and obtains the mission information of the waypoint mission; the second acquisition module 502 acquires at least one data structure 2 according to the mission information, parses the data structure 2, and obtains the waypoint content of the data structure 2; the first detection module 503 detects the waypoint content, and when the waypoint content is correct, acquires the data structure 3 according to the waypoint content; the third acquisition module 504 parses the data structure 3 to obtain the action information of the waypoint; the second detection module 505 detects the action information, and if the action information is correct, reads the action of the waypoint from the action information, thereby, before executing the waypoint mission, the waypoint mission information is detected based on the nested storage structure of the data structure 1, the data structure 2, and the data structure 3, and the correctness of the read waypoint mission information is ensured. Therefore, the embodiment of the present invention avoids the situation where the drone operation is abnormal due to reading the wrong waypoint mission information, thereby improving the reliability of the drone operation.
[0194] In some embodiments, the waypoint mission information reading device 500 further includes a first generating module 506 and / or a second generating module 507 .
[0195] The first generating module 506 is used to generate a warning message indicating that the waypoint mission information reading fails when the waypoint content is erroneous.
[0196] The second generating module 507 is used to generate a warning message indicating that the waypoint mission information reading fails if the action information is wrong.
[0197] An embodiment of the present invention provides a waypoint mission information reading device. When the waypoint content and / or action information are erroneous, the waypoint mission information reading fails, and the first generation module 506 and / or the second generation module 507 generates a warning message of the waypoint mission information reading failure, prompting the user that the waypoint mission information storage is erroneous or abnormally damaged. The user can re-store the waypoint mission information or use a correction algorithm to correct the waypoint mission information based on the warning message, thereby improving the user's usage experience.
[0198] See also Fig.11 , Fig.11 Schematic diagram of the structure of a drone provided by an embodiment of the present invention. Fig.11 As shown, the drone 600 includes at least one processor 601 and a memory 602 that is communicatively connected to the at least one processor 601. Fig.11Herein, a processor 601 is used as an example. The memory 602 stores instructions that can be executed by the at least one processor 601, and the instructions are executed by the at least one processor 601 so that the at least one processor 601 can perform the waypoint mission information storage method and / or the waypoint mission information reading method as described in the above method embodiment.
[0199] The processor 601 and the memory 602 may be connected via a bus or other means. Fig.11 The example of connecting through bus is taken in the following.
[0200] The memory 602 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the waypoint mission information storage method and / or the waypoint mission information reading method in the embodiment of the present invention, for example, Fig. 9 or attached Fig.10 The processor 601 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 602, that is, implements the waypoint mission information storage method and / or waypoint mission information reading method described in the above method embodiment.
[0201] The memory 602 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of a waypoint mission information storage device and / or a waypoint mission information reading device, etc. In addition, the memory 602 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 602 may optionally include a memory remotely arranged relative to the processor 601, and these remote memories may be connected to a device for controlling the driving of the unmanned vehicle via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0202] The one or more modules are stored in the memory 602, and when executed by the one or more processors 601, the waypoint mission information storage method and / or the waypoint mission information reading method in any of the above method embodiments are executed, for example, the waypoint mission information storage method and / or the waypoint mission information reading method described above are executed. Figure 1 to Figure 2 , Figures 4 to 8 Steps to achieve Fig. 9 or Fig.10 The functions of each module and unit in it.
[0203] The above-mentioned drone can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0204] An embodiment of the present invention also provides a non-volatile computer-readable storage medium, which stores computer-executable instructions, which are executed by one or more processors, and the computer-executable instructions are used to enable a drone to execute the waypoint mission information storage method described in any of the above embodiments, and / or the waypoint mission information reading method described in any of the above embodiments.
[0205] The embodiment of the present invention further provides a computer program product, including a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the waypoint mission information storage method and / or the waypoint mission information reading method described in any of the above method embodiments, for example, executing the above described Figure 1 to Figure 2 , Figures 4 to 8 Steps to achieve Fig. 9 or Fig.10 The functions of each module and unit in it.
[0206] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be 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.
[0207] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0208] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for reading waypoint mission information, characterized in that: include: Acquire a data structure 1 of the waypoint mission information, parse the data structure 1, and obtain mission information of the waypoint mission, wherein the data structure 1 is used to store mission information of the waypoint mission including at least one waypoint; Acquire at least one data structure 2 according to the task information, parse the data structure 2, and obtain the waypoint content of the data structure 2, wherein the data structure 2 is used to store the waypoint content of the waypoint, and the waypoint content includes the second waypoint task ID, the first waypoint ID, and the number of actions included in the waypoint; Detecting the waypoint content, and when the waypoint content is correct, acquiring data structure three according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint; Parsing the data structure three to obtain the action information of the waypoint, the action information including the third waypoint task ID, the second waypoint ID, the action ID and the action type of the action; detecting the action information, and if the action information is correct, reading the action of the waypoint from the action information; The detecting the waypoint content includes: Determine whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information; If they are inconsistent, it is determined that the waypoint content is incorrect; If they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are in ascending order; If it is not increasing in sequence, return to the step of determining that the waypoint content is wrong; If the order is increasing, it is determined that the waypoint content is correct; The detecting the action information comprises: Determine whether the third waypoint task ID of the action information is consistent with the first task ID of the task information; if they are inconsistent, determine that the action information is wrong; If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence; If it is not increasing in sequence, return to the step of determining that the action information is wrong; If the sequence is increasing, it is determined that the action information is correct.
2. The method according to claim 1, characterized in that: The method further comprises: When the waypoint content is erroneous, generating a warning message indicating that the waypoint mission information reading failed; and / or, If the action information is wrong, a warning message indicating that the waypoint mission information reading failed is generated.
3. The method according to claim 1 or 2, characterized in that: The mission information includes the first waypoint mission ID and the number of waypoints; The obtaining of at least one data structure 2 according to the task information comprises: At least one data structure 2 is obtained according to the first waypoint mission ID and the number of waypoints, wherein the number of the data structures 2 is consistent with the number of waypoints.
4. The method according to claim 3, characterized in that The detecting the waypoint content includes: Determine whether the second waypoint task ID of the waypoint content is consistent with the first waypoint task ID of the task information; If they are inconsistent, it is determined that the waypoint content is incorrect; If they are consistent, determine whether the first waypoint IDs corresponding to each waypoint are in ascending order; If it is not increasing in sequence, return to the step of determining that the waypoint content is wrong; If the order is increasing, a CRC check is performed on the waypoint content; Determine whether the CRC check passes; If not, return to the step of determining that the waypoint content is incorrect; If passed, it is determined that the waypoint content is correct.
5. The method according to claim 1 or 4, characterized in that: The data structure three is obtained according to the waypoint content, wherein the data structure three is used to store the action information of the waypoint, including: According to the second waypoint task ID, the first waypoint ID and the number of actions, a data structure three is obtained, wherein the data structure three is used to store the action information of the waypoint.
6. The method according to claim 3, characterized in that The detecting the action information comprises: Determine whether the third waypoint task ID of the action information is consistent with the first task ID of the task information; If they are inconsistent, it is determined that the action information is wrong; If they are consistent, determine whether the action IDs of the waypoints are increasing in sequence; If it is not increasing in sequence, return to the step of determining that the action information is wrong; If the sequence is increasing, a CRC check is performed on the action information; Determine whether the CRC check passes; If not, return to the step of determining the error of the action information; If passed, it is determined that the action information is correct.
7. A drone, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the waypoint mission information reading method according to any one of claims 1 to 6.
8. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the drone to execute the waypoint mission information reading method according to any one of claims 1 to 6.
