Device matching method, device and computer-readable storage medium
1. A device matching method is applied to a server, and comprises the following steps:
receiving a pairing request sent by a terminal, wherein the pairing request carries an emergency code of an aircraft and geographical position information of the terminal, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
determining that the aircraft is within the geographical position range controlled by the terminal based on the emergency code of the aircraft and the geographical position information of the terminal, and acquiring a communication key of the terminal;
and sending the communication key of the terminal to the aircraft, and establishing a pairing relation between the aircraft and the terminal based on the communication key of the terminal.
2. The method of claim 1, wherein determining that the aircraft is within the geographic location range controlled by the terminal based on the emergency code for the aircraft and the geographic location information for the terminal comprises:
acquiring current geographical position information of the aircraft based on the emergency code of the aircraft;
determining a geographical position range controlled by the terminal based on the geographical position information of the terminal;
determining that the aircraft is within the terminal-controlled geographic location range in response to the current geographic location information of the aircraft being within the terminal-controlled geographic location range.
3. The method of claim 1, wherein after determining that the aircraft is within the geographic location range controlled by the terminal based on the emergency code for the aircraft and the geographic location information for the terminal, the method further comprises:
and sending a notification message to the terminal, wherein the notification message carries the aircraft identifier of the aircraft, and the notification message is used for indicating that the terminal is authorized to control the aircraft.
4. The method according to claim 1, wherein the pairing request further carries a terminal identifier of the terminal, and the server stores a correspondence between the terminal identifier and a communication key of the terminal;
the acquiring the communication key of the terminal includes:
and acquiring the communication key of the terminal based on the terminal identification of the terminal and the corresponding relation between the terminal identification and the communication key of the terminal.
5. The method according to any one of claims 1 to 4, wherein before the receiving the pairing request sent by the terminal, the method further comprises:
receiving an aircraft identification sent by the aircraft;
generating a communication key for the aircraft in response to the aircraft identification being legitimate;
sending a communication key for the aircraft to the aircraft.
6. The method of claim 5, wherein after sending the communication key for the aircraft to the aircraft, the method further comprises:
receiving an emergency information acquisition request sent by the aircraft, wherein the emergency information acquisition request carries a communication key of the aircraft, and the emergency information acquisition request is used for acquiring an emergency code of the aircraft;
generating an emergency code for the aircraft based on the communication key for the aircraft;
and sending the emergency code of the aircraft to the aircraft.
7. The method according to any one of claims 1 to 4, wherein before the receiving the pairing request sent by the terminal, the method further comprises:
receiving a terminal identifier sent by the terminal;
responding to the terminal identification to be legal, and generating a communication key of the terminal;
and sending the communication key of the terminal to the terminal.
8. A device matching method, applied to an aircraft, the method comprising:
determining a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state;
broadcasting the first code with an optical signal, wherein the first code is used for a terminal to send a pairing request to a server;
receiving a communication key of the terminal sent by the terminal;
receiving a communication key of the terminal sent by the server;
and in response to the fact that the communication key of the terminal sent by the terminal is consistent with the communication key of the terminal sent by the server, establishing a pairing relation with the terminal.
9. The method of claim 8, wherein determining the first code based on the emergency code for the aircraft comprises:
and adding a frame header and a frame tail in the emergency coding of the aircraft to obtain the first code.
10. The method of claim 8 or 9, wherein prior to determining the first code based on the emergency code for the aircraft, the method further comprises:
sending an aircraft identification of the aircraft to the server;
and receiving a communication key of the aircraft returned by the server based on the aircraft identification.
11. The method of claim 10, wherein after receiving the communication key for the aircraft returned by the server based on the aircraft identification, the method further comprises:
generating an emergency information acquisition request, wherein the emergency information acquisition request carries a communication key of the aircraft, and the emergency information acquisition request is used for acquiring an emergency code of the aircraft;
sending the emergency information acquisition request to the server;
and receiving the emergency code of the aircraft returned by the server based on the emergency information acquisition request.
12. A device matching method is applied to a terminal, and comprises the following steps:
acquiring a first code of the aircraft;
analyzing the first code to obtain an emergency code of the aircraft, wherein the emergency code is used for indicating that the aircraft is in an uncontrolled state;
and sending a pairing request to a server, wherein the pairing request carries the emergency code of the aircraft and the geographical position information of the terminal, and the pairing request is used for controlling the aircraft and the terminal to establish a pairing relation through the server.
13. The method of claim 12, wherein obtaining the first code for the aerial vehicle comprises:
calling a camera device to shoot the aircraft to obtain a multimedia resource, wherein the multimedia resource is any one of a picture or a video containing the aircraft;
and analyzing the multimedia resource to obtain a first code of the aircraft.
14. The method of claim 12, wherein after sending the pairing request to the server, the method further comprises:
receiving a notification message returned by the server based on the pairing request, wherein the notification message carries an identifier of the aircraft, and the notification message is used for indicating that the terminal is authorized to control the aircraft;
and sending the communication key of the terminal to the aircraft based on the identification of the aircraft, and establishing a pairing relation with the terminal by the aircraft based on the communication key of the terminal.
15. The method of any of claims 12-14, wherein prior to obtaining the first code for the aircraft, the method further comprises:
sending a terminal identification of the terminal to the server;
and receiving the communication key of the terminal returned by the server based on the terminal identification.
16. An apparatus matching device, the apparatus comprising:
the terminal comprises a receiving module and a matching module, wherein the receiving module is used for receiving a matching request sent by the terminal, the matching request carries an emergency code of an aircraft and geographical position information of the terminal, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
a determining module, configured to determine that the aircraft is within the geographic location range controlled by the terminal based on the emergency code of the aircraft and the geographic location information of the terminal;
the acquisition module is used for acquiring a communication key of the terminal;
and the sending module is used for sending the communication key of the terminal to the aircraft, and the aircraft establishes a pairing relation with the terminal based on the communication key of the terminal.
17. An apparatus matching device, the apparatus comprising:
a determination module to determine a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state;
the broadcast module is used for broadcasting the first code by using an optical signal, and the first code is used for the terminal to send a pairing request to a server;
a receiving module, configured to receive a communication key of the terminal sent by the terminal; receiving a communication key of the terminal sent by the server;
and the pairing module is used for responding to the consistency of the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server and establishing the pairing relation with the terminal.
18. An apparatus matching device, the apparatus comprising:
the acquiring module is used for acquiring a first code of the aircraft;
the analysis module is used for analyzing the first code to obtain an emergency code of the aircraft, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
the terminal comprises a sending module and a matching module, wherein the sending module is used for sending a matching request to a server, the matching request carries the emergency code of the aircraft and the geographical position information of the terminal, and the matching request is used for controlling the aircraft and the terminal to establish a matching relation through the server.
19. A server, characterized in that the server comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to cause the server to implement the device matching method according to any one of claims 1 to 7.
20. An electronic device comprising a processor and a memory, wherein at least one program code is stored in the memory, and wherein the at least one program code is loaded into and executed by the processor to cause the electronic device to implement the device matching method according to any one of claims 8 to 11, or to cause the electronic device to implement the device matching method according to any one of claims 12 to 15.
Background
An aircraft, including but not limited to an Unmanned Aerial Vehicle (UAV), is an Unmanned aircraft that is operated using a radio remote control device and self-contained program control. As aircraft technology has matured, aircraft have become more widely available.
In the related art, the aircraft needs to be paired with the first terminal before takeoff, so that the first terminal can be used for controlling the aircraft after takeoff. However, when the aircraft flies into an area that cannot be controlled by the first terminal, the flight safety factor of the aircraft is reduced because the aircraft is not controlled by the first terminal. Therefore, when the aircraft flies into an area that cannot be controlled by the first terminal, an equipment matching method is urgently needed to re-match a terminal for the aircraft, so that the re-matched terminal can control the aircraft, and the flight safety factor of the aircraft is improved.
Disclosure of Invention
The embodiment of the application provides a device matching method, a device and a computer readable storage medium, which can be used for solving the problems in the related art. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an apparatus matching method, where the method includes:
receiving a pairing request sent by a terminal, wherein the pairing request carries an emergency code of an aircraft and geographical position information of the terminal, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
determining that the aircraft is within the geographical position range controlled by the terminal based on the emergency code of the aircraft and the geographical position information of the terminal, and acquiring a communication key of the terminal;
and sending the communication key of the terminal to the aircraft, and establishing a pairing relation between the aircraft and the terminal based on the communication key of the terminal.
In one possible implementation, the determining that the aircraft is within the geographic location range controlled by the terminal based on the emergency code of the aircraft and the geographic location information of the terminal includes:
acquiring current geographical position information of the aircraft based on the emergency code of the aircraft; determining a geographical position range controlled by the terminal based on the geographical position information of the terminal; determining that the aircraft is within the terminal-controlled geographic location range in response to the current geographic location information of the aircraft being within the terminal-controlled geographic location range.
In one possible implementation, after determining that the aircraft is within the geographic location range controlled by the terminal based on the emergency code of the aircraft and the geographic location information of the terminal, the method further includes:
and sending a notification message to the terminal, wherein the notification message carries the aircraft identifier of the aircraft, and the notification message is used for indicating that the terminal is authorized to control the aircraft.
In a possible implementation manner, the pairing request further carries a terminal identifier of the terminal, and the server stores a correspondence between the terminal identifier and a communication key of the terminal;
the acquiring the communication key of the terminal includes:
and acquiring the communication key of the terminal based on the terminal identification of the terminal and the corresponding relation between the terminal identification and the communication key of the terminal.
In a possible implementation manner, before the receiving the pairing request sent by the terminal, the method further includes:
receiving an aircraft identification sent by the aircraft; generating a communication key for the aircraft in response to the aircraft identification being legitimate; sending a communication key for the aircraft to the aircraft.
In one possible implementation, after the sending the communication key of the aircraft to the aircraft, the method further includes:
receiving an emergency information acquisition request sent by the aircraft, wherein the emergency information acquisition request carries a communication key of the aircraft, and the emergency information acquisition request is used for acquiring an emergency code of the aircraft; generating an emergency code for the aircraft based on the communication key for the aircraft; and sending the emergency code of the aircraft to the aircraft.
In a possible implementation manner, before the receiving the pairing request sent by the terminal, the method further includes:
receiving a terminal identifier sent by the terminal; responding to the terminal identification to be legal, and generating a communication key of the terminal; and sending the communication key of the terminal to the terminal.
In a second aspect, an embodiment of the present application provides an apparatus matching method, where the method includes:
determining a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state;
broadcasting the first code with an optical signal, wherein the first code is used for a terminal to send a pairing request to a server;
receiving a communication key of the terminal sent by the terminal;
receiving a communication key of the terminal sent by the server;
and in response to the fact that the communication key of the terminal sent by the terminal is consistent with the communication key of the terminal sent by the server, establishing a pairing relation with the terminal.
In one possible implementation, the determining a first code based on the emergency code of the aircraft includes:
and adding a frame header and a frame tail in the emergency coding of the aircraft to obtain the first code.
In one possible implementation, before determining the first code based on the emergency code of the aircraft, the method further includes:
sending an aircraft identification of the aircraft to the server; and receiving a communication key of the aircraft returned by the server based on the aircraft identification.
In one possible implementation, after receiving the communication key of the aircraft returned by the server based on the aircraft identification, the method further includes:
generating an emergency information acquisition request, wherein the emergency information acquisition request carries a communication key of the aircraft, and the emergency information acquisition request is used for acquiring an emergency code of the aircraft; sending the emergency information acquisition request to the server; and receiving the emergency code of the aircraft returned by the server based on the emergency information acquisition request.
In a third aspect, an embodiment of the present application provides an apparatus matching method, where the method includes:
acquiring a first code of the aircraft;
analyzing the first code to obtain an emergency code of the aircraft, wherein the emergency code is used for indicating that the aircraft is in an uncontrolled state;
and sending a pairing request to a server, wherein the pairing request carries the emergency code of the aircraft and the geographical position information of the terminal, and the pairing request is used for controlling the aircraft and the terminal to establish a pairing relation through the server.
In one possible implementation, the obtaining the first code of the aircraft includes:
calling a camera device to shoot the aircraft to obtain a multimedia resource, wherein the multimedia resource is any one of a picture or a video containing the aircraft;
and analyzing the multimedia resource to obtain a first code of the aircraft.
In a possible implementation manner, after the sending the pairing request to the server, the method further includes:
receiving a notification message returned by the server based on the pairing request, wherein the notification message carries an identifier of the aircraft, and the notification message is used for indicating that the terminal is authorized to control the aircraft; and sending the communication key of the terminal to the aircraft based on the identification of the aircraft, and establishing a pairing relation with the terminal by the aircraft based on the communication key of the terminal.
In a possible implementation manner, the analyzing the first code to obtain an emergency code of the aircraft includes:
and performing frame removal operation on the first code to obtain the emergency code of the aircraft.
In one possible implementation, before obtaining the first code of the aircraft, the method further includes:
sending a terminal identification of the terminal to the server; and receiving the communication key of the terminal returned by the server based on the terminal identification.
In a fourth aspect, an embodiment of the present application provides an apparatus matching device, where the apparatus includes:
the terminal comprises a receiving module and a matching module, wherein the receiving module is used for receiving a matching request sent by the terminal, the matching request carries an emergency code of an aircraft and geographical position information of the terminal, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
a determining module, configured to determine that the aircraft is within the geographic location range controlled by the terminal based on the emergency code of the aircraft and the geographic location information of the terminal;
the acquisition module is used for acquiring a communication key of the terminal;
and the sending module is used for sending the communication key of the terminal to the aircraft, and the aircraft establishes a pairing relation with the terminal based on the communication key of the terminal.
In a possible implementation manner, the determining module is configured to obtain current geographic location information of the aircraft based on an emergency code of the aircraft; determining a geographical position range controlled by the terminal based on the geographical position information of the terminal; determining that the aircraft is within the terminal-controlled geographic location range in response to the current geographic location information of the aircraft being within the terminal-controlled geographic location range.
In a possible implementation manner, the sending module is further configured to send a notification message to the terminal, where the notification message carries an aircraft identifier of the aircraft, and the notification message is used to indicate that the terminal is authorized to control the aircraft.
In a possible implementation manner, the pairing request further carries a terminal identifier of the terminal, and the server stores a correspondence between the terminal identifier and a communication key of the terminal;
the obtaining module is configured to obtain the communication key of the terminal based on the terminal identifier of the terminal and a correspondence between the terminal identifier and the communication key of the terminal.
In a possible implementation manner, the receiving module is configured to receive an aircraft identifier sent by the aircraft;
the device further comprises:
a generating module, configured to generate a communication key of the aircraft in response to the aircraft identifier being legitimate;
the sending module is further configured to send the communication key of the aircraft to the aircraft.
In a possible implementation manner, the receiving module is further configured to receive an emergency information obtaining request sent by the aircraft, where the emergency information obtaining request carries a communication key of the aircraft, and the emergency information obtaining request is used to obtain an emergency code of the aircraft;
the generating module is further used for generating an emergency code of the aircraft based on the communication key of the aircraft;
the sending module is further used for sending the emergency code of the aircraft to the aircraft.
In a possible implementation manner, the receiving module is further configured to receive a terminal identifier sent by the terminal;
the generating module is further configured to generate a communication key of the terminal in response to that the terminal identifier is legal;
the sending module is further configured to send the communication key of the terminal to the terminal.
In a fifth aspect, an embodiment of the present application provides an apparatus matching device, where the apparatus includes:
a determination module to determine a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state;
the broadcast module is used for broadcasting the first code by using an optical signal, and the first code is used for the terminal to send a pairing request to a server;
a receiving module, configured to receive a communication key of the terminal sent by the terminal; receiving a communication key of the terminal sent by the server;
and the pairing module is used for responding to the consistency of the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server and establishing the pairing relation with the terminal.
In a possible implementation manner, the determining module is configured to add a frame header and a frame trailer to the emergency coding of the aircraft to obtain the first coding.
In one possible implementation, the apparatus further includes:
a sending module, configured to send an aircraft identifier of the aircraft to the server;
the receiving module is further configured to receive a communication key of the aircraft returned by the server based on the aircraft identifier.
In one possible implementation, the apparatus further includes:
the generating module is used for generating an emergency information obtaining request, wherein the emergency information obtaining request carries a communication key of the aircraft, and the emergency information obtaining request is used for obtaining an emergency code of the aircraft;
the sending module is further configured to send the emergency information acquisition request to the server;
the receiving module is further configured to receive an emergency code of the aircraft, which is returned by the server based on the emergency information acquisition request.
In a sixth aspect, an embodiment of the present application provides an apparatus matching device, where the apparatus includes:
the acquiring module is used for acquiring a first code of the aircraft;
the analysis module is used for analyzing the first code to obtain an emergency code of the aircraft, and the emergency code is used for indicating that the aircraft is in an uncontrolled state;
the terminal comprises a sending module and a matching module, wherein the sending module is used for sending a matching request to a server, the matching request carries the emergency code of the aircraft and the geographical position information of the terminal, and the matching request is used for controlling the aircraft and the terminal to establish a matching relation through the server.
In a possible implementation manner, the obtaining module is configured to call a camera to shoot the aircraft, so as to obtain a multimedia resource, where the multimedia resource includes any one of a picture and a video of the aircraft; and analyzing the multimedia resource to obtain a first code of the aircraft.
In one possible implementation, the apparatus further includes:
a receiving module, configured to receive a notification message returned by the server based on the pairing request, where the notification message carries an identifier of the aircraft, and the notification message is used to instruct the terminal to be authorized to control the aircraft;
the sending module is further configured to send the communication key of the terminal to the aircraft based on the identifier of the aircraft, and the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In a possible implementation manner, the parsing module is configured to perform a frame removal operation on the first code to obtain an emergency code of the aircraft.
In a possible implementation manner, the sending module is further configured to send a terminal identifier of the terminal to the server;
the receiving module is further configured to receive a communication key of the terminal returned by the server based on the terminal identifier.
In a seventh aspect, an embodiment of the present application provides a server, where the server includes a processor and a memory, where the memory stores at least one program code, and the at least one program code is loaded and executed by the processor, so as to enable the server to implement the device matching method according to any implementation manner of the first aspect and the first aspect.
In an eighth aspect, an embodiment of the present application provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores at least one program code, and the at least one program code is loaded and executed by the processor, so as to enable the electronic device to implement the device matching method according to any one of the second and second aspects, or to enable the electronic device to implement the device matching method according to any one of the third and third aspects.
In a ninth aspect, a computer-readable storage medium is further provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement any of the above-mentioned device matching methods.
In a tenth aspect, a computer program or a computer program product is further provided, where at least one computer instruction is stored, and the at least one computer instruction is loaded and executed by a processor to implement any one of the above-mentioned device matching methods.
The technical scheme provided by the embodiment of the application at least has the following beneficial effects:
according to the technical scheme, the pairing request of the terminal is processed to judge whether the aircraft which the terminal wants to pair is within the geographical position range controlled by the terminal, and if so, the communication key of the terminal is sent to the aircraft, so that the aircraft establishes the pairing relation based on the communication key of the terminal and the terminal. The equipment matching mode is used for matching the aircraft with the terminal again under the uncontrolled state of the aircraft, so that the equipment matching is more flexible. Moreover, through the equipment matching mode, the terminal matched with the aircraft is arranged at any time to control the aircraft, so that the aircraft can fly more safely and reliably, and the flight safety factor of the aircraft is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a device matching method provided in an embodiment of the present application;
fig. 2 is a flowchart of a device matching method provided in an embodiment of the present application;
fig. 3 is a flowchart of an identification process provided in an embodiment of the present application;
fig. 4 is a flowchart of a device matching method provided in an embodiment of the present application;
fig. 5 is a flowchart of a device matching method provided in an embodiment of the present application;
fig. 6 is a flowchart of a device matching method provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of an apparatus matching device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an apparatus matching device provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an apparatus matching device provided in an embodiment of the present application;
fig. 10 is a schematic structural diagram of a server provided in an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of an apparatus matching method provided in an embodiment of the present application, and as shown in fig. 1, the implementation environment includes: terminal 101, aircraft 102, and server 103.
The terminal 101 may be at least one of a smart phone, a game console, a desktop computer, a tablet computer, an e-book reader, an MP3(Moving Picture Experts Group Audio Layer III, motion Picture Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, motion Picture Experts compression standard Audio Layer 4) player, and a laptop computer. The terminal 101 and the aircraft 102 are in communication connection with the server 103 through a wired or wireless network respectively, so that the configuration matching is realized through interaction with the server 103.
The aircraft 102 may be any type of aircraft, and the embodiments of the present application are not limited thereto.
The server 103 may be one server, or a server cluster formed by multiple servers, or may be any one of a cloud computing center or a virtualization platform, which is not limited in this embodiment of the present application.
Based on the foregoing implementation environment, the embodiment of the present application provides a device matching method, which may be illustrated by the interaction among the terminal 101, the aircraft 102, and the server 103 in fig. 1, taking a flowchart of the device matching method provided in the embodiment of the present application as shown in fig. 2 as an example. As shown in fig. 2, the method comprises the steps of:
in step 201, the aircraft determines a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state.
In one possible implementation, the aircraft needs to determine an emergency code of the aircraft, which is the only emergency code generated by the server for the aircraft. The process of determining the emergency code of the aircraft is as follows:
the aircraft obtains its own aircraft identifier, where the aircraft identifier includes at least one of a serial number of the aircraft and a serial number of the aircraft, or any other aircraft identifier that can uniquely represent the aircraft, which is not limited in this embodiment of the application. The serial number of the aircraft is also called a machine code, an authentication code and a registration application code of the aircraft, the serial number of the aircraft is a unique number made for the aircraft during aircraft production, the serial number of the aircraft is equivalent to a human identification number, and one serial number uniquely corresponds to one aircraft. The aircraft number uniquely corresponds to the aircraft serial number.
The aircraft sends the aircraft identification of the aircraft to the server, the server receives the aircraft identification of the aircraft, whether the aircraft identification is legal is determined, and the communication key of the aircraft is generated in response to the fact that the aircraft identification is legal. The server sends the communication key of the aircraft to the aircraft. The server may also store the aircraft identification of the aircraft and the communication key correspondence of the aircraft in a storage space of the server. The aircraft receives the communication key of the aircraft returned by the server. The aircraft generates an emergency information acquisition request based on the communication key of the aircraft, the emergency information acquisition request carries the communication key of the aircraft, and the emergency information acquisition request is used for acquiring the emergency code of the aircraft. The server receives an emergency information acquisition request sent by the aircraft, analyzes the emergency request to obtain a communication key of the aircraft, generates an emergency code of the aircraft based on the communication key of the aircraft, and sends the emergency code of the aircraft to the aircraft. The server may also store the aircraft identification of the aircraft and the emergency code correspondence of the aircraft in a storage space of the server. The aircraft receives the emergency code of the aircraft returned by the server, and the emergency code is stored in an emergency management module of the aircraft, so that the emergency code of the aircraft can be acquired from the emergency management module when the emergency situation occurs in the subsequent aircraft.
It should be noted that the determination process of the communication key of the aircraft is an identification process of the aircraft.
In one possible implementation manner, the process of acquiring the aircraft identifier of the aircraft by the aircraft is as follows: the aircraft identification of the aircraft is stored in the setting function of the aircraft, and the aircraft acquires the aircraft identification of the aircraft by accessing the setting function of the aircraft.
In a possible implementation manner, after the server acquires the communication key of the aircraft and the emergency code of the aircraft, the server needs to correspondingly store the aircraft identifier of the aircraft with the communication key of the aircraft and the emergency code of the aircraft, so that after the communication key of the aircraft and the emergency code of the aircraft are acquired, the aircraft identifier of the aircraft, the communication key of the aircraft and the emergency code of the aircraft can be correspondingly stored. The following table is a schematic table for storing an aircraft identifier of an aircraft, a communication key of the aircraft, and an emergency code of the aircraft according to the embodiment of the present application.
Watch 1
Aircraft identification
Communication key for aircraft
Emergency coding for aircraft
Aircraft 1
ABCD
1234
As shown in table one above, the aircraft is identified as aircraft one, the corresponding communication key is ABCD, and the corresponding emergency code is 1234.
It should be noted that the communication key of the aircraft may be composed of numbers, letters, or both numbers and letters, or may be in other forms, and the form of the communication key of the aircraft is not limited in the embodiments of the present application. The emergency code of the aircraft can be composed of numbers, letters, numbers and letters, and can also be in other forms.
In one possible implementation manner, the server receives the aircraft identifier of the aircraft, and the process of determining whether the aircraft identifier of the aircraft is legal is: and after receiving the aircraft identifier of the aircraft, the server searches based on the aircraft identifier, and if the corresponding aircraft is searched, namely the aircraft producing the identifier exists, the server indicates that the aircraft identifier of the aircraft is legal. If the corresponding aircraft is not searched, that is, the aircraft which does not produce the identification, the aircraft identification of the aircraft is not legal.
In response to the aircraft identification of the aircraft being illegal, the aircraft's communication key need not be generated for the aircraft.
In one possible implementation manner, the aircraft acquires an emergency code of the aircraft, and based on the emergency code of the aircraft, the process of determining the first code is as follows: and adding a frame head and a frame tail in the emergency coding of the aircraft to obtain a first code.
Illustratively, if the emergency code of the aircraft is 1234, the frame header is 0, and the frame trailer is 0, then the first code obtained after adding the frame header and the frame trailer to the emergency code of the aircraft is 012340.
It should be noted that the frame header and the frame trailer may have the same content or may have different contents. The frame header and the frame trailer may be other contents, which are not limited in this embodiment. The contents of the frame head and the frame tail are the contents known by the aircraft, the terminal and the server.
It should also be noted that the aircraft has a self-check function, where the self-check function is used to determine whether an emergency situation occurs in the aircraft, and the aircraft will only acquire the first code in response to the emergency situation occurring in the aircraft. The emergency situation may be that the aircraft flies into an area that cannot be controlled by the original terminal, so that the aircraft cannot be connected to the original terminal, or that a problem occurs in a component of the aircraft, or that a navigation signal of the aircraft is weak, or that other problems may harm the safety of the aircraft, which is not limited in the embodiment of the present application.
In step 202, the aircraft broadcasts a first code in an optical signal.
In one possible implementation, after the aircraft determines the first code, the aircraft broadcasts the first code as an optical signal, i.e., the first code is displayed on an exterior surface of the aircraft. The first code is displayed to serve as a visual notification, namely, a signal that the aircraft is in an emergency is sent out, so that the terminal can collect the signal, determine that the aircraft is in the emergency based on the signal, and further establish a pairing relationship with the aircraft through the server.
In one possible implementation, the aircraft may broadcast the first code in an optical signal cyclically on its outer surface to ensure that the terminal can acquire the first code.
It should be noted that, after the aircraft and the terminal establish the pairing relationship, the aircraft stops broadcasting the first code with the optical signal.
In step 203, the terminal obtains a first code for the aircraft.
In a possible implementation manner, the terminal is any type of terminal that is handheld by a user on the ground, the terminal includes a camera device, and when the user finds that there is an aircraft that is broadcasted with an optical signal in the sky, the user obtains a multimedia resource by calling the camera device to shoot the aircraft, where the multimedia resource may be a video or a picture. The multimedia resource comprises a picture of the outer surface of the aircraft, and the first code of the aircraft is also included in the multimedia resource because the outer surface of the aircraft is displayed with the first code broadcasted in the optical signal. And analyzing the multimedia resource to obtain a first code of the aircraft. The first code is used for the terminal to send a pairing request to the server. The camera device may be a front camera of the terminal or a rear camera of the terminal, which is not limited in the embodiment of the present application.
In step 204, the terminal parses the first code to obtain an emergency code for the aircraft.
In a possible implementation manner, since the terminal knows the contents of the frame header and the frame trailer, after the terminal acquires the first code, the terminal performs a frame removal operation on the first code to obtain an emergency code of the aircraft, where the frame removal operation includes a frame header removal operation and a frame trailer removal operation, the frame header removal operation is to remove the contents of the frame header in the first code, and the frame trailer removal operation is to remove the contents of the frame trailer in the first code.
Illustratively, the first code of the aircraft is 012340, the frame header content is 0, the frame tail content is also 0, and after the frame removal operation is performed on the first code of the aircraft, the emergency code of the aircraft is 1234.
In step 205, the terminal sends a pairing request to the server, wherein the pairing request carries the emergency code of the aircraft and the geographical position information of the terminal.
In a possible implementation manner, the terminal acquires an emergency code of the aircraft, that is, determines that the aircraft is in an emergency, and therefore applies for controlling the aircraft. An application program for acquiring the geographical position information of the terminal is run in the terminal, and based on the application program, the geographical position information of the terminal is acquired, where the geographical position information may be GPS (Global Positioning System) position information or RTK (Real time kinematic) position information.
In a possible implementation manner, in order to ensure that the terminal controls the aircraft legally and safely, the terminal needs to send a pairing request to the server, where the pairing request carries the geographic position information of the terminal and the emergency code of the aircraft. The terminal can control the aircraft only after being allowed by the server.
In step 206, the server receives the pairing request sent by the terminal, analyzes the pairing request to obtain the emergency code of the aircraft and the geographical location information of the terminal, and obtains the communication key of the terminal in response to the fact that the aircraft is within the geographical location range controlled by the terminal.
In a possible implementation manner, after receiving a pairing request sent by a terminal, a server analyzes the pairing request to obtain an emergency code of an aircraft and geographical location information of the terminal, and verifies the emergency code of the aircraft and the geographical location information of the terminal, where the verification process is used to determine whether the aircraft is within a geographical location range controlled by the terminal, and the verification process is as follows:
determining current geographic position information of the aircraft based on the emergency code of the aircraft, determining a geographic position range controlled by the terminal based on the geographic position information of the terminal, and passing the verification in response to the current geographic position information of the aircraft being within the geographic position range controlled by the terminal.
The server is used for sending the geographical position information of the aircraft to the server at intervals of a target time period in the flying process of the aircraft, so that the server can control the flying condition of the aircraft and the flying route of the aircraft. And after receiving the geographical position information returned by the aircraft, the server stores the geographical position information of the aircraft. After receiving the pairing request sent by the terminal, the server determines geographical position information with the shortest time from the geographical position information returned by the aircraft stored in the server based on the time of receiving the pairing request, and determines the geographical position information as the current geographical position information of the aircraft.
In a possible implementation manner, the process of determining the geographical location range controlled by the terminal by the server based on the geographical location information of the terminal is as follows: and taking the geographical position information of the terminal as a circle center, taking the target length as a radius to form a target circle, and determining the range in the target circle as the geographical position range controlled by the terminal.
Exemplarily, the geographical location information of the terminal is used as a center of a circle, a target circle is made with a radius of 500 meters, and a range within the target circle is determined as the geographical location range controlled by the terminal.
The target length is set based on experience, or adjusted according to different application scenarios, which is not limited in the embodiment of the present application. For example, the target length is 100 meters, and for example, the target length is 500 meters.
It should be noted that other shapes may also be adopted to determine the geographic location range controlled by the terminal, and the embodiment of the present application is only explained by taking the target circle as an example, and is not used to limit the shape of the geographic location range controlled by the terminal.
In a possible implementation manner, before the server obtains the communication key of the terminal, a communication key is generated for the terminal, and the communication key generated for the terminal and the terminal identifier of the terminal are correspondingly stored in the storage space of the server, where the process of the server generating the communication key for the terminal is as follows:
the terminal acquires a terminal identifier of the terminal, wherein the terminal identifier is account information of an account logged in the terminal, or any other identifier which can uniquely represent the terminal. The terminal sends the terminal identification of the terminal to the server, the server determines whether the terminal identification is legal after receiving the terminal identification of the terminal, a communication key of the terminal is generated for the terminal in response to the terminal identification being legal, and the server correspondingly stores the terminal identification of the terminal and the communication key of the terminal in a storage space of the server. The server may also transmit the communication key of the terminal to the terminal. The following table two is a table of correspondence between a terminal identifier and a communication key of a terminal stored in the server according to the embodiment of the present application.
Watch two
Terminal identification
Communication key of terminal
Terminal one
abcd
Terminal two
cdef
Terminal three
xx##
In the above table two, when the terminal identifier is terminal one, the communication key of the terminal is abcd, when the terminal identifier is terminal two, the communication key of the terminal is cdef, and when the terminal identifier is terminal three, the communication key of the terminal is xx # #.
It should be noted that the communication key of the terminal may be composed of numbers, letters, or both numbers and letters, or may be in other forms, and the form of the communication key of the terminal is not limited in the embodiments of the present application. The second table is also only a correspondence relationship between several terminal identifiers and communication keys of the terminals, which are stored in the server according to the embodiment of the present application, and the number of the terminal identifiers and the number of the communication keys of the terminals, which are stored in the server, are not limited.
It should be further noted that the generation process of the communication key of the terminal is an identification process of the terminal.
Before sending the terminal identifier to the server, the terminal registers an account number through the server, wherein the account number is used for being used in the control of the aircraft. The process of determining whether the terminal identification is legal is as follows: and responding to the terminal identification inquired in the server, wherein the terminal identification is legal, and responding to the terminal identification which is not inquired in the server, the terminal identification is illegal.
In a possible implementation manner, the pairing request further carries a terminal identifier of the terminal, and the process of the server acquiring the communication key of the terminal is as follows: and determining the communication key of the terminal based on the terminal identifier of the terminal and the corresponding relation between the terminal identifier and the communication key.
Illustratively, the terminal identifier of the terminal is a terminal one, and the communication key of the terminal is determined to be abcd based on the terminal identifier of the terminal and the correspondence between the terminal identifier and the communication key of the terminal shown in the table two.
In step 207, the server sends the communication key of the terminal to the aircraft, and the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In a possible implementation manner, the terminal passes the verification, that is, the aircraft is within the geographical position range controlled by the terminal, so that the terminal can control the aircraft, and the server sends the communication key of the terminal to the aircraft, so that the aircraft and the terminal establish a pairing relationship, that is, the terminal controls the aircraft.
In step 208, the server sends a notification message to the terminal, the notification message carrying the aircraft identification of the aircraft, the notification message being used to instruct the terminal to control the aircraft.
In a possible implementation manner, since the terminal passes the verification, that is, the aircraft is within the control range of the terminal, the terminal can control the aircraft, and the server sends a notification message to the terminal to notify the terminal that the terminal is authorized to control the aircraft. The notification message carries an aircraft identifier of the aircraft, and the aircraft identifier of the aircraft is used for informing the terminal which aircraft the controllable aircraft is.
It should be noted that the execution sequence of step 207 and step 208 may be switched, that is, the server sends the notification message to the terminal first, and then sends the communication key of the terminal to the aircraft. Of course, step 207 and step 208 may also be performed synchronously, that is, the server sends the communication key of the terminal to the aircraft while sending the notification message to the terminal. The execution order of step 207 and step 208 is not limited in the embodiment of the present application.
In step 209, the terminal receives the notification message sent by the server, and the terminal sends the communication key of the terminal to the aircraft.
In a possible implementation manner, the terminal receives the notification message sent by the server, that is, the terminal knows that the terminal has the right to control the aircraft, the terminal analyzes the notification message to obtain the aircraft identifier carried in the notification message, so as to know which aircraft the terminal can control, and the terminal sends the communication key of the terminal to the aircraft corresponding to the aircraft identifier, so that the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In step 210, the aircraft receives the terminal's communication key sent by the terminal and the terminal's communication key sent by the server.
In one possible implementation manner, the aircraft receives the communication key of the terminal sent by the terminal and simultaneously receives the communication key of the terminal sent by the server, and the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server are stored in the storage space of the aircraft, so that whether the pairing relation is established with the terminal or not is determined based on the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server.
In step 211, the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server.
In a possible implementation manner, in response to that the communication key of the terminal sent by the terminal is consistent with the communication key of the terminal sent by the server, the terminal selected by the server for controlling the aircraft is indicated to be the same terminal as the terminal which wants to control the aircraft when the aircraft is monitored to have an emergency. Therefore, the aircraft establishes a pairing relationship with the terminal, that is, the terminal controls the aircraft.
Illustratively, the communication key of the terminal sent by the terminal is abcd, and the communication key of the terminal sent by the server is abcd. Since the communication key of the terminal transmitted by the terminal is consistent with the communication key of the terminal transmitted by the server, the aircraft establishes a pairing relationship with the terminal.
In a possible implementation manner, in response to the fact that the communication key of the terminal sent by the terminal is not consistent with the communication key of the terminal sent by the server, the terminal selected by the server for controlling the aircraft is indicated, and the terminal which is monitored to be in the emergency situation and wants to control the aircraft is not the same terminal. Therefore, the aircraft does not establish a pairing relationship with the terminal, that is, the terminal cannot control the aircraft.
Illustratively, the communication key of the terminal sent by the terminal is abcd, and the communication key of the terminal sent by the server is bcda. The communication key of the terminal sent by the terminal is inconsistent with the communication key of the terminal sent by the server. Therefore, the aircraft does not establish a pairing relationship with the terminal.
In one possible implementation, in response to the aircraft establishing a pairing relationship with the terminal, that is, the aircraft is controlled by the terminal, the aircraft sends a feedback message to the terminal, where the feedback message is used to inform the terminal that the aircraft can be controlled at the time when the feedback message is received and at a later time. And after the terminal receives the feedback message sent by the aircraft, the terminal further controls the aircraft.
According to the method provided by the embodiment of the application, the pairing request of the terminal is processed to judge whether the aircraft which the terminal wants to pair is within the geographical position range controlled by the terminal, and if so, the communication key of the terminal is sent to the aircraft, so that the aircraft establishes the pairing relation based on the communication key of the terminal and the terminal. The equipment matching mode is used for matching the aircraft with the terminal again under the uncontrolled state of the aircraft, so that the equipment matching is more flexible. Moreover, through the equipment matching mode, the terminal matched with the aircraft is arranged at any time to control the aircraft, so that the aircraft can fly more safely and reliably, and the flight safety factor of the aircraft is improved.
Fig. 3 is a schematic diagram illustrating an identification process according to an embodiment of the present application, where in fig. 3, identification includes identification of an aircraft and identification of a terminal. The steps 1 to 7 are the process of identifying the aircraft, and the steps 8 to 10 are the process of identifying the terminal. The identification process of the aircraft comprises the following steps: the aircraft sends an aircraft identification of the aircraft to the server. And after receiving the aircraft identification, the server generates a communication key of the aircraft in response to the aircraft identification being legal. The server sends the communication key of the aircraft to the aircraft. The aircraft receives the communication key of the aircraft, generates an emergency code obtaining request, the emergency code obtaining request carries the communication key of the aircraft, and the aircraft sends the emergency code obtaining request to the server. The server generates an emergency code of the aircraft based on the emergency code acquisition request. The server sends the emergency code of the aircraft to the aircraft. The aircraft receives the emergency code of the aircraft and stores the emergency code of the aircraft in the emergency management module. The service link through which the aircraft sends the message to the server and the service link through which the server sends the message to the aircraft may be one service link or different service links. For example, the traffic link through which the aircraft sends the message to the server is a first link, and the traffic link through which the server sends the message to the aircraft is a second link. For another example, the traffic link through which the aircraft sends the message to the server is the first link, and the traffic link through which the server sends the message to the aircraft is also the first link.
The identity recognition process of the terminal comprises the following steps: and the terminal sends the terminal identification of the terminal to the server. And the server receives the terminal identification and generates a communication key of the terminal in response to the legality of the terminal identification. The server transmits the communication key of the terminal to the terminal. After the terminal receives the communication key of the terminal sent by the server, the communication key of the terminal can be stored in the terminal.
Fig. 4 shows a device matching method provided in an embodiment of the present application, where an execution subject of the method is a server, and the method includes the following steps:
in step 401, a pairing request sent by a terminal is received, where the pairing request carries an emergency code of an aircraft and geographical location information of the terminal, and the emergency code is used to indicate that the aircraft is in an uncontrolled state.
In a possible implementation manner, the process of the server receiving the pairing request sent by the terminal is consistent with the step 206, and is not described herein again.
In step 402, the communication key of the terminal is acquired by determining that the aircraft is within the geographical position range controlled by the terminal based on the emergency code of the aircraft and the geographical position information of the terminal.
In a possible implementation manner, the process of the server obtaining the communication key of the terminal is consistent with the step 206, and is not described herein again.
In step 403, the communication key of the terminal is sent to the aircraft, and the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In a possible implementation manner, the process of sending the communication key of the terminal to the aircraft by the server is consistent with the process of step 207 described above, and is not described herein again.
The method comprises the steps of processing a pairing request of a terminal to judge whether an aircraft which the terminal wants to be paired is within a geographical position range controlled by the terminal, and if so, sending a communication key of the terminal to the aircraft so that the aircraft establishes a pairing relation with the terminal based on the communication key of the terminal. The equipment matching mode is used for matching the aircraft with the terminal again under the uncontrolled state of the aircraft, so that the equipment matching is more flexible. Moreover, through the equipment matching mode, the terminal matched with the aircraft is arranged at any time to control the aircraft, so that the aircraft can fly more safely and reliably, and the flight safety factor of the aircraft is improved.
Fig. 5 shows an apparatus matching method provided in an embodiment of the present application, where an execution subject of the method is an aircraft, and the method includes the following steps:
in step 501, a first code is determined based on a panic code for the aircraft, the panic code indicating that the aircraft is in an uncontrolled state.
In a possible implementation manner, the process of determining the first code based on the emergency code of the aircraft is identical to the process of step 201, and is not described herein again.
In step 502, a first code is broadcast in an optical signal, the first code being for a terminal to send a pairing request to a server.
In a possible implementation manner, the process of broadcasting the first code with the optical signal is identical to the process of step 202, and is not described herein again.
In step 503, the communication key of the terminal transmitted by the terminal is received.
In a possible implementation, the procedure of the aircraft receiving the communication key sent by the terminal is identical to the procedure of step 210, and is not described here again.
In step 504, the communication key of the terminal transmitted by the server is received.
In a possible implementation manner, the process of the aircraft receiving the communication key of the terminal sent by the server is identical to the process of step 210, and is not described herein again.
In step 505, in response to the correspondence between the communication key of the terminal sent by the terminal and the communication key of the terminal sent by the server, a pairing relationship with the terminal is established.
In a possible implementation manner, the process of establishing the pairing relationship between the aircraft and the terminal is the same as the process in step 211, and is not described herein again.
According to the method, the first code of the aircraft is displayed on the aircraft in a visual notification mode, so that the terminal can acquire the first code and send the pairing request to the server based on the first code, after the aircraft receives the communication key of the terminal, the pairing relation with the terminal is established based on the communication key of the terminal, the terminal controls the aircraft, and the flight safety factor of the aircraft is improved.
Fig. 6 is a device matching method provided in an embodiment of the present application, where an execution subject of the method is a terminal, and the method includes the following steps:
in step 601, a first code of an aircraft is acquired.
In a possible implementation manner, the process of acquiring the first code of the aircraft by the terminal is identical to the process of step 203, and is not described herein again.
In step 602, the first code is parsed to obtain an emergency code of the aircraft, and the emergency code is used to indicate that the aircraft is in an uncontrolled state.
In a possible implementation manner, the process of analyzing the first code by the terminal to obtain the emergency code of the aircraft is consistent with the process of step 204, and is not described herein again.
In step 603, a pairing request is sent to the server, the pairing request carries the emergency code of the aircraft and the geographical location information of the terminal, and the pairing request is used for controlling the aircraft and the terminal to establish a pairing relationship through the server.
In a possible implementation manner, the process of sending the pairing request from the terminal to the server is consistent with the process of step 205, and is not described herein again.
According to the method, the emergency code of the aircraft is obtained through the analysis process of the first code of the aircraft, namely the aircraft is in an uncontrolled state, and the aircraft is requested to be controlled in a mode of sending a pairing request to the server, so that the flight safety factor of the aircraft is improved.
Fig. 7 is a schematic structural diagram of an apparatus matching device according to an embodiment of the present application, and as shown in fig. 7, the apparatus includes:
a receiving module 701, configured to receive a pairing request sent by a terminal, where the pairing request carries an emergency code of an aircraft and geographic location information of the terminal, and the emergency code is used to indicate that the aircraft is in an uncontrolled state;
a determining module 702 for determining that the aircraft is within the geographical location range controlled by the terminal based on the emergency code of the aircraft and the geographical location information of the terminal;
an obtaining module 703, configured to obtain a communication key of the terminal;
a sending module 704, configured to send the communication key of the terminal to the aircraft, where the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In a possible implementation manner, the determining module 702 is configured to obtain current geographic location information of the aircraft based on an emergency code of the aircraft; determining a geographical position range controlled by the terminal based on the geographical position information of the terminal; determining that the aircraft is within the terminal-controlled geographic location range in response to the current geographic location information of the aircraft being within the terminal-controlled geographic location range.
In a possible implementation manner, the sending module 704 is further configured to send a notification message to the terminal, where the notification message carries an aircraft identifier of the aircraft, and the notification message is used to indicate that the terminal is authorized to control the aircraft.
In a possible implementation manner, the pairing request further carries a terminal identifier of the terminal, and the server stores a corresponding relationship between the terminal identifier and a communication key of the terminal;
the obtaining module 703 is configured to obtain the communication key of the terminal based on the terminal identifier of the terminal and the corresponding relationship between the terminal identifier and the communication key of the terminal.
In a possible implementation manner, the receiving module 701 is configured to receive an aircraft identifier sent by the aircraft;
the device also includes:
the generating module is used for responding to the legality of the aircraft identification and generating a communication key of the aircraft;
the sending module 704 is further configured to send the communication key of the aircraft to the aircraft.
In a possible implementation manner, the receiving module 701 is further configured to receive an emergency information obtaining request sent by the aircraft, where the emergency information obtaining request carries a communication key of the aircraft, and the emergency information obtaining request is used to obtain an emergency code of the aircraft;
the generating module is further used for generating an emergency code of the aircraft based on the communication key of the aircraft;
the transmitting module 704 is further configured to transmit the emergency code of the aircraft to the aircraft.
In a possible implementation manner, the receiving module 701 is further configured to receive a terminal identifier sent by the terminal;
the generating module is further used for responding to the terminal identification being legal and generating a communication key of the terminal;
the sending module 704 is further configured to send the communication key of the terminal to the terminal.
Fig. 8 is a schematic structural diagram of an apparatus matching device according to an embodiment of the present application, and as shown in fig. 8, the apparatus includes:
a determining module 801 for determining a first code based on an emergency code for the aircraft, the emergency code indicating that the aircraft is in an uncontrolled state;
a broadcasting module 802, configured to broadcast the first code with an optical signal, where the first code is used for a terminal to send a pairing request to a server;
a receiving module 803, configured to receive a communication key of the terminal sent by the terminal; receiving a communication key of the terminal sent by the server;
the pairing module 804 is configured to establish a pairing relationship with the terminal in response to that the communication key of the terminal sent by the terminal is consistent with the communication key of the terminal sent by the server.
In a possible implementation manner, the determining module 801 is configured to add a frame header and a frame trailer to the emergency coding of the aircraft to obtain the first coding.
In one possible implementation, the apparatus further includes:
a sending module, configured to send an aircraft identifier of the aircraft to the server;
the receiving module 803 is further configured to receive a communication key of the aircraft returned by the server based on the aircraft identifier.
In one possible implementation, the apparatus further includes:
the generating module is used for generating an emergency information obtaining request, wherein the emergency information obtaining request carries a communication key of the aircraft, and the emergency information obtaining request is used for obtaining an emergency code of the aircraft;
the sending module is further configured to send the emergency information acquisition request to the server;
the receiving module is further used for receiving the emergency code of the aircraft returned by the server based on the emergency information acquisition request.
Fig. 9 is a schematic structural diagram of an apparatus matching device according to an embodiment of the present application, and as shown in fig. 9, the apparatus includes:
an obtaining module 901, configured to obtain a first code of an aircraft;
the analysis module 902 is configured to analyze the first code to obtain an emergency code of the aircraft, where the emergency code is used to indicate that the aircraft is in an uncontrolled state;
a sending module 903, configured to send a pairing request to a server, where the pairing request carries an emergency code of the aircraft and geographic location information of the terminal, and the pairing request is used to control the aircraft and the terminal to establish a pairing relationship through the server.
In a possible implementation manner, the obtaining module is configured to call a camera to shoot the aircraft to obtain a multimedia resource, where the multimedia resource includes any one of a picture or a video of the aircraft; and analyzing the multimedia resource to obtain a first code of the aircraft.
In one possible implementation, the apparatus further includes:
a receiving module, configured to receive a notification message returned by the server based on the pairing request, where the notification message carries an identifier of the aircraft, and the notification message is used to indicate that the terminal is authorized to control the aircraft;
the sending module is further configured to send the communication key of the terminal to the aircraft based on the identifier of the aircraft, and the aircraft establishes a pairing relationship with the terminal based on the communication key of the terminal.
In a possible implementation manner, the parsing module 902 is configured to perform a frame removal operation on the first code to obtain an emergency code of the aircraft.
In a possible implementation manner, the sending module 903 is further configured to send a terminal identifier of the terminal to the server;
the receiving module is further configured to receive a communication key of the terminal returned by the server based on the terminal identifier.
The device provided by the embodiment of the application judges whether the aircraft which the terminal wants to pair is within the geographical position range controlled by the terminal by processing the pairing request of the terminal, and if so, sends the communication key of the terminal to the aircraft, so that the aircraft establishes the pairing relation based on the communication key of the terminal and the terminal. The equipment matching mode is used for matching the aircraft with the terminal again under the uncontrolled state of the aircraft, so that the equipment matching is more flexible. Moreover, through the equipment matching mode, the terminal matched with the aircraft is arranged at any time to control the aircraft, so that the aircraft can fly more safely and reliably, and the flight safety factor of the aircraft is improved.
It should be understood that, when the above-mentioned apparatus is provided to implement its functions, it is only illustrated by the division of the above-mentioned functional modules, and in practical applications, the above-mentioned functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Fig. 10 is a schematic structural diagram of a server according to an embodiment of the present application, where the server 1000 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1001 and one or more memories 1002, where at least one program code is stored in the one or more memories 1002, and is loaded and executed by the one or more processors 1001 to implement the device matching method according to the foregoing method embodiments. Of course, the server 1000 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 1000 may also include other components for implementing the functions of the device, which are not described herein again.
Fig. 11 shows a block diagram of an electronic device 1100 according to an exemplary embodiment of the present application. The electronic device 1100 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The electronic device 1100 may also be referred to by other names such as user equipment, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the electronic device 1100 includes: a processor 1101 and a memory 1102.
Processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and rendering content that the display screen needs to display. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 1102 may include one or more computer-readable storage media, which may be non-transitory. Memory 1102 can also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1102 is used to store at least one instruction for execution by processor 1101 to implement the device matching method provided by the method embodiments herein.
In some embodiments, the electronic device 1100 may also optionally include: a peripheral interface 1103 and at least one peripheral. The processor 1101, memory 1102 and peripheral interface 1103 may be connected by a bus or signal lines. Various peripheral devices may be connected to the peripheral interface 1103 by buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1104, display screen 1105, camera assembly 1106, audio circuitry 1107, positioning assembly 1108, and power supply 1109.
The peripheral interface 1103 may be used to connect at least one peripheral associated with I/O (Input/Output) to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, memory 1102, and peripheral interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102 and the peripheral device interface 1103 may be implemented on separate chips or circuit boards, which is not limited by this embodiment.
The Radio Frequency circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1104 converts an electric signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electric signal. Optionally, the radio frequency circuit 1104 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1104 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 1104 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1105 is a touch display screen, the display screen 1105 also has the ability to capture touch signals on or over the surface of the display screen 1105. The touch signal may be input to the processor 1101 as a control signal for processing. At this point, the display screen 1105 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 1105 may be one, disposed on the front panel of the electronic device 1100; in other embodiments, the display screens 1105 may be at least two, respectively disposed on different surfaces of the electronic device 1100 or in a folded design; in other embodiments, the display 1105 may be a flexible display disposed on a curved surface or a folded surface of the electronic device 1100. Even further, the display screen 1105 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 1105 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
Camera assembly 1106 is used to capture images or video. Optionally, camera assembly 1106 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 1106 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio circuitry 1107 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1101 for processing or inputting the electric signals to the radio frequency circuit 1104 to achieve voice communication. For stereo capture or noise reduction purposes, multiple microphones may be provided, each at a different location of the electronic device 1100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1107 may also include a headphone jack.
The positioning component 1108 is used to locate a current geographic Location of the electronic device 1100 for navigation or LBS (Location Based Service). The Positioning component 1108 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The power supply 1109 is used to provide power to the various components within the electronic device 1100. The power supply 1109 may be alternating current, direct current, disposable or rechargeable. When the power supply 1109 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the electronic device 1100 also includes one or more sensors 1110. The one or more sensors 1110 include, but are not limited to: acceleration sensor 1111, gyro sensor 1112, pressure sensor 1113, fingerprint sensor 1114, optical sensor 1115, and proximity sensor 1116.
The acceleration sensor 1111 may detect the magnitude of acceleration on three coordinate axes of a coordinate system established with the electronic device 1100. For example, the acceleration sensor 1111 may be configured to detect components of the gravitational acceleration in three coordinate axes. The processor 1101 may control the display screen 1105 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1111. The acceleration sensor 1111 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 1112 may detect a body direction and a rotation angle of the electronic device 1100, and the gyro sensor 1112 may cooperate with the acceleration sensor 1111 to acquire a 3D motion of the user on the electronic device 1100. From the data collected by gyroscope sensor 1112, processor 1101 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 1113 may be disposed on a side bezel of the electronic device 1100 and/or on an underlying layer of the display screen 1105. When the pressure sensor 1113 is disposed on the side frame of the electronic device 1100, the holding signal of the user to the electronic device 1100 can be detected, and the processor 1101 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1113. When the pressure sensor 1113 is disposed at the lower layer of the display screen 1105, the processor 1101 controls the operability control on the UI interface according to the pressure operation of the user on the display screen 1105. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 1114 is configured to collect a fingerprint of the user, and the processor 1101 identifies the user according to the fingerprint collected by the fingerprint sensor 1114, or the fingerprint sensor 1114 identifies the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the user is authorized by the processor 1101 to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying for and changing settings, etc. The fingerprint sensor 1114 may be disposed on the front, back, or side of the electronic device 1100. When a physical button or vendor Logo is provided on the electronic device 1100, the fingerprint sensor 1114 may be integrated with the physical button or vendor Logo.
Optical sensor 1115 is used to collect ambient light intensity. In one embodiment, the processor 1101 may control the display brightness of the display screen 1105 based on the ambient light intensity collected by the optical sensor 1115. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1105 is increased; when the ambient light intensity is low, the display brightness of the display screen 1105 is reduced. In another embodiment, processor 1101 may also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity collected by optical sensor 1115.
The proximity sensor 1116, also referred to as a distance sensor, is typically disposed on the front panel of the electronic device 1100. The proximity sensor 1116 is used to capture the distance between the user and the front of the electronic device 1100. In one embodiment, the processor 1101 controls the display screen 1105 to switch from a bright screen state to a dark screen state when the proximity sensor 1116 detects that the distance between the user and the front face of the electronic device 1100 is gradually decreasing; when the proximity sensor 1116 detects that the distance between the user and the front face of the electronic device 1100 becomes progressively larger, the display screen 1105 is controlled by the processor 1101 to switch from a breath-screen state to a light-screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 11 does not constitute a limitation of the electronic device 1100, and may include more or fewer components than those shown, or combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, there is also provided a computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to implement any of the above-described device matching methods.
Alternatively, the computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program or a computer program product is also provided, in which at least one computer instruction is stored, the at least one computer instruction being loaded and executed by a processor to implement any one of the above-mentioned device matching methods.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The above description is only exemplary of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like that are made within the spirit and principle of the present application should be included in the protection scope of the present application.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:一种登录方法、装置、设备和介质