UAV communication method, system and storage medium
By introducing a new UAV communication method in the UAV communication system, the address accumulation mechanism is used to automatically solve the duplication and illegal problems of bus unit addresses in the CAN bus system, and the problem of time-consuming address configuration in the prior art is solved. , improves development efficiency.
Patent Information
- Application Number
- CN202211313691.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2042-10-25
AI Technical Summary
In the prior art, the configuration of the bus unit address in the CAN bus system requires manual operation, resulting in the need to redevelop flight control computer software when the bus unit is added, the address is duplicated, illegal or confused, which takes a long time.
By introducing a new drone communication method in the drone communication system, the first bus unit receives the communication address sent by other bus units, and generates its own CAN bus address based on the address and sends it to the second bus unit. , until the flight control computer ensures the uniqueness and legality of the address.
It realizes automatic resolution of duplicate and illegal address problems in the CAN bus system, reduces the time for manual configuration and software development, and improves development efficiency.
Smart Images

Figure CN115632904B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a drone communication method, system and storage medium. Background Art
[0002] UAVs have many communication links, among which the communication links between the flight control computer and each sensor unit and each power unit inside the UAV play a decisive role in the performance and safety of the UAV. The Controller Area Network (CAN) bus is one of the most widely used buses in the world and is often used for communication and interconnection between the flight control computer of UAVs and each sensor unit and each power unit.
[0003] At present, the address configuration of each bus unit in the CAN bus system is mainly done manually. Each bus unit is configured with an address separately. It is necessary to plan the address of each bus unit in advance and associate the bus unit type with the address in advance during the flight control computer software development.
[0004] However, when a new bus unit is added, illegal or chaotic, the bus unit address needs to be reconfigured; and reconfiguring the bus unit address requires redeveloping the flight control computer software, which takes a long time. Summary of the invention
[0005] The present application provides a drone communication method, system and storage medium, aiming to solve the problem of time-consuming development of resetting bus unit addresses.
[0006] The present application provides a drone communication method, the drone communication method comprising:
[0007] The first bus unit receives a communication address sent by another bus unit other than itself, and generates a CAN bus address of the first bus unit according to the communication address;
[0008] Sending the CAN bus address to the second bus unit;
[0009] When the second bus unit determines that the communication condition is met according to the CAN bus address, it establishes a communication connection with the first bus unit.
[0010] Optionally, the other bus unit includes a first sensor unit or a first power unit, and the generating of the CAN bus address of the first bus unit according to the communication address includes:
[0011] generating a CAN bus address of the first bus unit according to the communication address of the first sensor unit and the accumulated value; or,
[0012] A CAN bus address of the first bus unit is generated according to the communication address of the first power unit and the accumulated value.
[0013] Optionally, when the other bus unit is a flight control computer, the step of the first bus unit receiving a communication address sent by other bus units other than itself, and generating a CAN bus address of the first bus unit according to the communication address includes:
[0014] The first bus unit receives a communication address sent by the flight control computer, wherein the communication address is a preset address of the flight control computer;
[0015] The preset address is determined as the CAN bus address of the first bus unit.
[0016] Optionally, the first bus unit includes a second sensor unit or a second power unit.
[0017] Optionally, after the step of sending the CAN bus address to the second bus unit, the method further includes:
[0018] detecting a type of the second bus unit;
[0019] When the second bus unit is a flight control computer, the flight control computer establishes a communication connection with the first bus unit when determining that the communication condition is met according to the CAN bus address.
[0020] Optionally, after the step of detecting the type of the second bus unit, the method further includes:
[0021] When the second bus unit is a third sensor unit or a third power unit, the third sensor unit or the third power unit receives the CAN bus address of the first bus unit, and generates the CAN bus address of the second bus unit according to the CAN bus address of the first bus unit.
[0022] Optionally, the step of generating the CAN bus address of the second bus unit according to the CAN bus address of the first bus unit includes:
[0023] The third sensor unit or the third power unit determines the CAN bus address of the third sensor unit or the CAN bus address of the third power unit according to the CAN bus address of the first bus unit and the accumulated value;
[0024] The CAN bus address of the first bus unit is updated by using the CAN bus address of the third sensor unit or the CAN bus address of the third power unit.
[0025] Optionally, when the flight control computer determines that the communication condition is met according to the CAN bus address, establishing a communication connection with the first bus unit includes:
[0026] The flight control computer determines the number of bus units according to the CAN bus address;
[0027] When the number reaches a preset number, a communication connection with the first bus unit is established.
[0028] Optionally, when the number reaches a preset number, the step of establishing a communication connection with the first bus unit includes:
[0029] When the number reaches a preset number, generating a communication instruction of the first bus unit;
[0030] The communication instruction is sent to the first bus unit to establish a communication connection with the first bus unit.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also provides a UAV communication system, which includes a first bus unit and a second bus unit, and the second bus unit is connected to the first bus unit.
[0032] Optionally, when the second bus unit is a flight control computer, the receiving end of the flight control computer is connected to the sending end of the first bus unit.
[0033] Optionally, the flight control computer includes: a memory, a processor, and a drone communication program stored in the memory and executable on the processor, wherein the drone communication program implements the steps of the above-mentioned drone communication method when executed by the processor.
[0034] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a drone communication program is stored, and when the drone communication program is executed by a processor, the steps of the above-mentioned drone communication method are implemented.
[0035] The present application provides a technical solution of a drone communication method, system and storage medium, wherein a first bus unit receives a communication address sent by other bus units other than itself, and accumulates the CAN bus address of the first bus unit based on the communication address; then the accumulated CAN bus address of the first bus unit is sent to the second bus unit; wherein the CAN bus address of the first bus unit will overwrite the original address of the second bus unit; after receiving the CAN bus address of the first bus unit, the second bus unit will determine whether the communication conditions are met according to the CAN bus address of the first bus unit. If the communication conditions are met, a communication connection between the second bus unit and the first bus unit is established. Compared with the related art, when there are problems such as the addition of new bus units, duplicate addresses, illegality or confusion, the bus address is manually reset; through the above solution, if one or more bus units in the CAN bus have duplicate addresses or illegal addresses, they will be overwritten by a new unique address during the address accumulation process, ensuring the uniqueness of the addresses of each unit in the CAN bus and the legitimacy of the addresses of each unit, thereby improving the development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flow chart of the first embodiment of the UAV communication method of the present invention;
[0037] Figure 2 This is a communication connection diagram of the UAV communication system of the present invention;
[0038] Figure 3 This is a flow chart of a second embodiment of the UAV communication method of the present invention;
[0039] Figure 4 4 is a flow chart of the third embodiment of the UAV communication method of the present invention.
[0040] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The above-mentioned drawings are only an embodiment diagram, not the entire invention. DETAILED DESCRIPTION
[0041] In the related technology, before developing the flight control computer software, each bus needs to plan the addresses of all units in the CAN bus in advance, ensure the uniqueness of the addresses, and establish a corresponding table between the addresses and the unit types and numbers before starting the flight control computer software development. Therefore, when the following situations occur, the bus unit address needs to be reset to avoid communication abnormalities. For example:
[0042] In one scenario, if two or more unit addresses are repeated in the CAN bus, causing the communication interface to be abnormal, the flight control computer software cannot automatically correct it and the unit address needs to be manually reset.
[0043] In one scenario, if two or more units in the CAN bus have illegal addresses or cannot match the addresses recorded in the flight control computer software, resulting in an abnormal communication interface, the flight control computer software cannot automatically correct it and it is necessary to manually reset the unit address or modify and upgrade the flight control computer software.
[0044] In one scenario, if a new unit needs to be added to the CAN bus, the flight control computer software cannot be directly compatible. It is necessary to add a new unit address based on the previously established correspondence table between the address and the unit type and number, and then modify and upgrade the flight control computer software.
[0045] From the above scenarios, it can be seen that when the bus unit address needs to be modified, the unit address is generally reset manually or the flight control computer software is modified, which reduces the upgrade or development efficiency.
[0046] Based on the defects of the related art, the present application proposes a new UAV communication method. The present application adds a set of serial communication interfaces. That is, the transmitting end of the last bus unit in the bus unit module is connected to the receiving end of the flight control computer. After the bus unit module is connected to the system, each bus unit can become an address accumulator and pass the accumulated new address to the next unit. After the flight control computer receives the bus address of the last bus unit, when the communication conditions are met according to the bus address of the last bus unit, the flight control computer establishes a connection with the bus unit. The advantages of such a communication interface design method are:
[0047] 1) Before developing the flight control computer software, there is no need to plan the unit addresses in the CAN bus in advance.
[0048] 2) If one or more units in the CAN bus have duplicate addresses, they will be overwritten by new unique addresses during the address accumulation process, automatically ensuring the uniqueness of the addresses of each unit in the CAN bus.
[0049] 3) If an illegal address appears in the CAN bus, it will be overwritten by a new unique address during the address accumulation process, automatically ensuring the legitimacy of the address of each unit in the CAN bus.
[0050] 4) If a new unit needs to be added to the CAN bus, there is no need to modify or upgrade the flight control computer software. After connecting to the bus, the new address sent by the previous unit will be received, and the address is unique and legal.
[0051] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0052] First embodiment
[0053] like Figure 1 As shown, in the first embodiment of the present application, the communication method mentioned in the present application can be used on a drone; the communication method mentioned in the present application can also be used in fields such as ships or vehicles.
[0054] The present application takes a drone communication method as an example. The communication method of the present application is applied to a drone communication system, which includes a flight control computer and a bus unit module. Among them, the bus unit module includes multiple bus units. The flight control computer is a bus unit independent of the bus unit module. The flight control computer and each bus unit in the bus unit module are cascaded via a CAN bus, and the cascaded bus units are sequentially connected via address lines.
[0055] The bus unit of the present application may be at least one. The bus unit may be a flight control computer independent of the bus unit module; the bus unit may also be a sensor unit connected to the flight control computer in the bus unit module, such as an image acquisition sensor unit, an infrared sensor unit, a light sensor unit, etc.; the bus unit may also be a power unit connected to the flight control computer in the bus unit module and used to provide power to the flight control computer, etc. Figure 2 When there are multiple bus units, the flight control computer and each sensor unit and power unit can be connected through CAN bus communication, and each bus unit can be connected through CAN bus communication. Among them, a set of serial communication lines in series is added between the flight control computer and the last bus unit; the serial communication line is used to connect the sending end of the last bus unit with the receiving end of the flight control computer. Optionally, the serial chain communication of the serial communication line can adopt communication methods including but not limited to RS232 chain, SPI chain, USB chain, I2C chain, etc.
[0056] Specifically, the drone communication method of the present application includes the following steps:
[0057] Step S110: The first bus unit receives a communication address sent by another bus unit other than itself, and generates a CAN bus address of the first bus unit according to the communication address.
[0058] In this embodiment, the other bus units may be sensor units, power units or flight control computers, such as the first power unit and the first sensor unit. The first bus unit may be the second power unit or the second sensor unit.
[0059] In one embodiment, when the other bus unit is a sensor unit or a power unit, and the other bus unit includes a first sensor unit or a first power unit, there are implementations including: Optionally, when the first bus unit receives the communication address of the first sensor unit other than itself, the CAN bus address of the first bus unit is generated according to the communication address of the first sensor unit and the accumulated value. Optionally, when the first bus unit receives the communication address of the first power unit other than itself, the CAN bus address of the first bus unit is generated according to the communication address of the first power unit and the accumulated value.
[0060] Optionally, when the above-mentioned first bus unit includes a second sensor unit or a second power unit, there are implementations including: Optionally, when the second sensor unit receives the communication address of the first sensor unit outside itself, the CAN bus address of the second sensor unit is generated according to the communication address of the first sensor unit and the accumulated value. Optionally, when the second sensor unit receives the communication address of the first power unit outside itself, the CAN bus address of the second sensor unit is generated according to the communication address of the first power unit and the accumulated value. Optionally, when the second power unit receives the communication address of the first power unit outside itself, the CAN bus address of the second power unit is generated according to the communication address of the first power unit and the accumulated value. Optionally, when the second power unit receives the communication address of the first sensor unit outside itself, the CAN bus address of the second power unit is generated according to the communication address of the first sensor unit and the accumulated value.
[0061] The above-mentioned accumulated value may be set according to actual conditions, for example, the accumulated value may be set to "1".
[0062] According to the above technical solution, when other bus units include a first sensor unit or a first power unit, and the first bus unit includes a second sensor unit or a second power unit, when duplicate addresses, illegal addresses or chaotic addresses occur, each bus unit can become an address accumulator after being connected to the system and pass the accumulated new address to the next unit, thereby ensuring the uniqueness of the address of each unit in the CAN bus and the legitimacy of the address of each unit.
[0063] In one embodiment, when the other bus unit is a flight control computer, the first bus unit can receive a communication address sent by the flight control computer. The communication address is a preset address of the flight control computer. The flight control computer will send the preset address as an initial address to the first bus unit. Assuming that the first bus unit is the first bus unit, the CAN bus address of the first bus unit is the preset address of the flight control computer.
[0064] Optionally, when the other bus unit is a flight control computer, and the first bus unit is a sensor unit or a power unit, the following implementations exist:
[0065] Optionally, when the first bus unit is a sensor unit, the sensor unit may receive a communication address sent by a flight control computer other than itself, and determine the communication address as the CAN bus address of the first bus unit. Optionally, when the first bus unit is a sensor unit, the sensor unit may receive a communication address sent by a flight control computer other than itself, and determine the communication address as the CAN bus address of the first bus unit. Optionally, when the first bus unit is a power unit, the power unit may receive a communication address sent by a flight control computer other than itself, and determine the communication address as the CAN bus address of the first bus unit. Optionally, when the first bus unit is a power unit, the power unit may also receive a communication address sent by a flight control computer other than itself, and determine the communication address as the CAN bus address of the first bus unit.
[0066] According to the above technical solution, when the other bus units include a flight control computer and the first bus unit includes a second sensor unit or a second power unit, the first bus unit can receive a preset address of the flight control computer and then transmit it.
[0067] Step S120, sending the CAN bus address to the second bus unit.
[0068] In this embodiment, the second bus unit may be a flight control computer, or a sensor unit or a power unit. When the second bus unit is a sensor unit or a power unit, the sensor unit may be a third sensor unit, and the power unit may be a third power unit.
[0069] Optionally, the third sensor unit may receive the CAN bus address of the first bus unit. Optionally, the third power unit may receive the CAN bus address of the first bus unit. Optionally, the flight control computer may receive the CAN bus address of the first bus unit. The first bus unit here may be the second sensor unit or the second power unit.
[0070] Optionally, after the first bus unit sends the CAN bus address of the first bus unit to the second bus unit, since the second bus unit may be one of the third sensor unit, the third power unit or the flight control computer, it is necessary to first determine the type of the second bus unit. Different types of bus units correspond to different processing strategies. If the second bus unit is a flight control computer, the flight control computer will establish a communication connection with the first bus unit when the communication conditions are met based on the CAN bus address of the first bus unit.
[0071] If the second bus unit is a third sensor unit or a third power unit, after receiving the CAN bus address of the first bus unit, the third sensor unit or the third power unit accumulates the CAN bus address of the first bus unit and sends it to the next bus unit. Optionally, the process of accumulating the address of the second bus unit is consistent with the process of accumulating the address of the first bus unit. Specifically, the second bus unit determines the CAN bus address of the second bus unit based on the CAN bus address of the first bus unit and the accumulated value; after obtaining the CAN bus address of the second bus unit, the CAN bus address of the second bus unit is used to update the original CAN bus address of the first bus unit, that is, the CAN bus address of the second bus unit is obtained.
[0072] By analogy, assuming that there is a next bus unit behind the second bus unit, and the next bus unit is a sensor unit or a power unit, a similar address accumulation method as the first bus unit and the second bus unit is adopted. Assuming that the bus unit behind the second bus unit is a flight control computer, the flight control computer can determine that the communication conditions are met according to the CAN bus address, and then establish a communication connection with the first bus unit and the second bus unit. Then, through the above method, the addresses of all bus units can be accumulated by the previous bus address, and the addresses of all bus units are unique and legal.
[0073] For example, refer to Figure 2 , there are a flight control computer, a sensor unit 1, a sensor unit 2, a power unit 1 and a power unit 2. The receiving end of the flight control computer is connected to the transmitting end of the power unit 2, and the receiving end and the transmitting end of each bus unit are connected in sequence. The bus address of the sensor unit 1 is the preset address of the flight control computer, and the bus address of the sensor unit 2 is determined according to the preset address of the sensor unit 1 and the accumulated value. The bus address of the power unit 1 is determined according to the bus address of the sensor unit 2 and the accumulated value, etc. The bus address of the power unit 2 is determined according to the bus address of the power unit 1 and the accumulated value. Since the address of each bus unit needs to be determined according to the address of the previous bus unit, the address of each bus unit is unique.
[0074] Step S130: When the second bus unit determines that the communication condition is met according to the CAN bus address, it establishes a communication connection with the first bus unit.
[0075] In this embodiment, the second bus unit here is a flight control computer. The flight control computer determines whether the communication conditions are met according to the CAN bus address fed back by the first bus unit. If so, a communication connection between the flight control computer and the first bus unit is established. After receiving the CAN bus address fed back by the first bus unit, the flight control computer parses the CAN bus address to obtain the number of bus units. Then, it is confirmed whether the number meets the CAN bus communication requirements.
[0076] Optionally, the communication condition may be that when the number of the bus units reaches a preset number, it is determined that the communication requirement is met. The preset number may be determined according to the number of currently connected bus units. Figure 2 , since the receiving end of the flight control computer is connected to the sending end of the last bus unit through a serial port, the unit number, unit type and bus address of the last bus unit are known. Therefore, after the flight control computer receives the CAN bus address, the CAN bus address can be parsed to obtain the number of all bus units. Assuming that the preset number of bus units is 8, when the number of bus units currently parsed is 7, it means that there is a problem with the current bus unit and further analysis and processing are required. Optionally, when the current bus unit is abnormal, an addresser can be connected externally, and all bus units are addressed through the addresser, and the abnormal bus unit is modified according to the addressing result. Assuming that the number of bus units currently parsed is 8, it means that the current bus unit is normal and meets the communication conditions.
[0077] Optionally, when the number of bus units reaches a preset number, a communication instruction for each bus unit may be generated, and the communication instruction may be sent to the bus unit to establish a communication connection with each bus unit. For example, the flight control computer generates a communication instruction for the first bus unit, and sends the communication instruction to the first bus unit to establish a communication connection with the first bus unit; wherein the first bus unit may be a second sensor unit or a second power unit.
[0078] According to the above technical solution, the first bus unit receives the communication address sent by other bus units other than itself, and accumulates the CAN bus address of the first bus unit on the basis of the communication address; then the accumulated CAN bus address of the first bus unit is sent to the second bus unit; wherein, the CAN bus address of the first bus unit will overwrite the original address of the second bus unit; after receiving the CAN bus address of the first bus unit, the second bus unit will determine whether the communication conditions are met according to the CAN bus address of the first bus unit. If the communication conditions are met, a communication connection between the second bus unit and the first bus unit is established. Compared with the related art, when there are problems such as the addition of new bus units, duplicate addresses, illegal or chaotic addresses, the bus address is manually reset; through the above solution, if one or more bus units in the CAN bus have duplicate addresses or illegal addresses, they will be overwritten by a new unique address during the address accumulation process, ensuring the uniqueness of the addresses of each unit in the CAN bus and the legitimacy of the addresses of each unit; thereby improving the development efficiency.
[0079] Second embodiment
[0080] Based on the first embodiment, refer to Figure 2-Figure 3 In the second embodiment of the present application, taking the flight control computer as an example, the drone communication method of the present application includes:
[0081] First, the flight control computer sends the initial address to the first CAN bus unit through the serial port, and waits to receive the final address sent back by the last CAN bus unit.
[0082] Next, the last address sent back by the last CAN bus unit is received and the number of CAN bus units is calculated.
[0083] Finally, confirm whether the quantity meets the CAN bus communication requirements; after meeting the communication requirements, start CAN bus communication with each unit.
[0084] According to the above technical solution, the flight control computer can determine whether the communication requirements are met based on the number of CAN bus units received in this embodiment, and then when the communication requirements are met, the flight control computer can communicate normally with each bus unit.
[0085] Third embodiment
[0086] Based on the first and second embodiments, refer to Figure 2 and Figure 4 In the third embodiment of the present application, taking the bus unit as an example, the drone communication method of the present application includes:
[0087] First, the bus unit receives the address sent by the previous CAN bus unit or flight control computer through the serial port, and stores the address as its own CAN bus address.
[0088] Then, a new address is accumulated based on the address and sent to the next bus unit or flight control computer).
[0089] Finally, after receiving the CAN bus communication instruction from the flight control computer, the bus unit starts CAN bus communication with the flight control computer.
[0090] According to the above technical solution, since each bus unit adopts the address accumulation method, if one or more bus units in the CAN bus have duplicate addresses or illegal addresses, they will be overwritten by new unique addresses during the address accumulation process, thereby ensuring the uniqueness of each unit address in the CAN bus and the legitimacy of each unit address, thereby improving development efficiency.
[0091] An embodiment of the present invention provides an embodiment of a drone communication method. It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown here.
[0092] Based on the same inventive concept, Figure 2 As shown, the present application provides a drone communication system, comprising: a first bus unit and a second bus unit, wherein the second bus unit is connected to the first bus unit. When there are multiple bus units, the receiving end and the transmitting end of each bus unit are connected in sequence. Among them, the first bus unit can be a sensor unit or a power unit. The second bus unit can be one of a sensor unit, a power unit, or a flight control computer. When the second bus unit is a flight control computer, the receiving end of the flight control computer is connected to the transmitting end of the first bus unit.
[0093] Optionally, the flight control computer may include: a processor, such as a CPU, a memory, a network interface, and a CAN communication bus. The CAN communication bus is used to realize the connection and communication between the flight control computer and the bus unit. The memory may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory may also be a storage device independent of the aforementioned processor.
[0094] The memory as a storage medium may include an operating system, a network communication module, a user interface module, and a UAV communication program. The operating system is a program that manages and controls the flight control computer hardware and software resources, the UAV communication program, and the operation of other software or programs.
[0095] The user interface is mainly used to connect to the terminal and communicate data with the terminal; the network interface is mainly used for the background server and communicates data with the background server; the processor can be used to call the drone communication program stored in the memory.
[0096] In this embodiment, the flight control computer includes: a memory, a processor, and a UAV communication program stored in the memory and executable on the processor, wherein:
[0097] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0098] The first bus unit receives a communication address sent by another bus unit other than itself, and generates a CAN bus address of the first bus unit according to the communication address;
[0099] Sending the CAN bus address to the second bus unit;
[0100] When the second bus unit determines that the communication condition is met according to the CAN bus address, it establishes a communication connection with the first bus unit.
[0101] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0102] generating a CAN bus address of the first bus unit according to the communication address of the first sensor unit and the accumulated value;
[0103] Alternatively, the CAN bus address of the first bus unit is generated according to the communication address of the first power unit and the accumulated value.
[0104] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0105] The first bus unit receives a communication address sent by the flight control computer, wherein the communication address is a preset address of the flight control computer;
[0106] The preset address is determined as the CAN bus address of the first bus unit.
[0107] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0108] The first bus unit includes a second sensor unit or a second power unit.
[0109] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0110] detecting a type of the second bus unit;
[0111] When the second bus unit is a flight control computer, the flight control computer establishes a communication connection with the first bus unit when determining that the communication condition is met according to the CAN bus address.
[0112] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0113] When the second bus unit is a third sensor unit or a third power unit, the third sensor unit or the third power unit receives the CAN bus address of the first bus unit, and generates the CAN bus address of the second bus unit according to the CAN bus address of the first bus unit.
[0114] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0115] The third sensor unit or the third power unit determines the CAN bus address of the third sensor unit or the CAN bus address of the third power unit according to the CAN bus address of the first bus unit and the accumulated value;
[0116] The CAN bus address of the first bus unit is updated by using the CAN bus address of the third sensor unit or the CAN bus address of the third power unit.
[0117] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0118] The flight control computer determines the number of bus units according to the CAN bus address;
[0119] When the number reaches a preset number, a communication connection with the first bus unit is established.
[0120] When the processor calls the drone communication program stored in the memory, it performs the following operations:
[0121] When the number reaches a preset number, generating a communication instruction of the first bus unit;
[0122] The communication instruction is sent to the first bus unit to establish a communication connection with the first bus unit.
[0123] The specific implementation of the drone communication system of the present invention is basically the same as the above-mentioned drone communication method embodiments, and will not be repeated here.
[0124] Based on the same inventive concept, an embodiment of the present application also provides a computer-readable storage medium, which stores a drone communication program. When the drone communication program is executed by a processor, it implements the various steps of the drone communication method described above and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0125] Since the storage medium provided in the embodiments of the present application is the storage medium used to implement the method of the embodiments of the present application, based on the method introduced in the embodiments of the present application, the person skilled in the art can understand the specific structure and deformation of the storage medium, so it is not repeated here. All storage media used in the methods of the embodiments of the present application belong to the scope of protection of this application.
[0126] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0127] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0129] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A drone communication method, characterized in that: The method comprises: The first bus unit receives a communication address sent by another bus unit other than itself, and generates a CAN bus address of the first bus unit according to the communication address; Sending the CAN bus address to the second bus unit; detecting a type of the second bus unit; When the second bus unit is a flight control computer, the second bus unit establishes a communication connection with the first bus unit when determining that the communication condition is met according to the CAN bus address.
2. The method according to claim 1, characterized in that The other bus unit includes a first sensor unit or a first power unit, and the generating of the CAN bus address of the first bus unit according to the communication address includes: generating a CAN bus address of the first bus unit according to the communication address of the first sensor unit and the accumulated value; or, A CAN bus address of the first bus unit is generated according to the communication address of the first power unit and the accumulated value.
3. The method according to claim 1, characterized in that When the other bus unit is a flight control computer, the step of the first bus unit receiving a communication address sent by other bus units other than itself and generating a CAN bus address of the first bus unit according to the communication address comprises: The first bus unit receives a communication address sent by the flight control computer, wherein the communication address is a preset address of the flight control computer; The preset address is determined as the CAN bus address of the first bus unit.
4. The method according to claim 2 or 3, characterized in that The first bus unit includes a second sensor unit or a second power unit.
5. The method according to claim 1, characterized in that After the step of detecting the type of the second bus unit, the method further comprises: When the second bus unit is a third sensor unit or a third power unit, the third sensor unit or the third power unit receives the CAN bus address of the first bus unit, and generates the CAN bus address of the second bus unit according to the CAN bus address of the first bus unit.
6. The method according to claim 5, characterized in that The step of generating the CAN bus address of the second bus unit according to the CAN bus address of the first bus unit comprises: The third sensor unit or the third power unit determines the CAN bus address of the third sensor unit or the CAN bus address of the third power unit according to the CAN bus address of the first bus unit and the accumulated value; The CAN bus address of the first bus unit is updated by using the CAN bus address of the third sensor unit or the CAN bus address of the third power unit.
7. The method according to claim 1, characterized in that When the flight control computer determines that the communication condition is met according to the CAN bus address, establishing a communication connection with the first bus unit includes: The flight control computer determines the number of bus units according to the CAN bus address; When the number reaches a preset number, a communication connection with the first bus unit is established.
8. The method according to claim 7, characterized in that When the number reaches a preset number, the step of establishing a communication connection with the first bus unit comprises: When the number reaches a preset number, generating a communication instruction of the first bus unit; The communication instruction is sent to the first bus unit to establish a communication connection with the first bus unit.
9. A UAV communication system, characterized in that: The UAV communication system comprises a first bus unit and a second bus unit, wherein the second bus unit is connected to the first bus unit via a CAN bus communication; When the second bus unit is a flight control computer, the flight control computer includes: a memory, a processor, and a drone communication program stored in the memory and executable on the processor. When the drone communication program is executed by the processor, the steps of the drone communication method as described in any one of claims 1 to 8 are implemented.
10. The system according to claim 9, characterized in that The receiving end of the flight control computer is connected to the sending end of the first bus unit.
11. A computer-readable storage medium, characterized in that: The storage medium stores a drone communication program, and when the drone communication program is executed by the processor, the steps of the drone communication method described in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
CAN-based train network control system and method
CN108205305A
Bus equipment addressing method and computer readable storage medium
CN113111018A