WO2020199055A1 - Communication method, apparatus and system - Google Patents

Communication method, apparatus and system Download PDF

Info

Publication number
WO2020199055A1
WO2020199055A1 PCT/CN2019/080686 CN2019080686W WO2020199055A1 WO 2020199055 A1 WO2020199055 A1 WO 2020199055A1 CN 2019080686 W CN2019080686 W CN 2019080686W WO 2020199055 A1 WO2020199055 A1 WO 2020199055A1
Authority
WO
WIPO (PCT)
Prior art keywords
wireless network
network
communication connection
identifier
access information
Prior art date
Application number
PCT/CN2019/080686
Other languages
French (fr)
Chinese (zh)
Inventor
李小军
杨连祥
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to PCT/CN2019/080686 priority Critical patent/WO2020199055A1/en
Priority to CN201980005416.3A priority patent/CN111742567A/en
Publication of WO2020199055A1 publication Critical patent/WO2020199055A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • H04W76/16Involving different core network technologies, e.g. a packet-switched [PS] bearer in combination with a circuit-switched [CS] bearer

Definitions

  • the present invention relates to the field of control terminals and movable equipment, and in particular to a communication method, device and system.
  • control terminals and movable devices such as smart cars, smart robots, unmanned aerial vehicles and other movable devices controlled by the control terminal.
  • the following methods are usually used to control the movable device: firstly, the control terminal and the movable device are frequency-matched so that the control terminal and the movable device can communicate on the same frequency; after that, the user can use The operation control terminal realizes the control of the movable equipment. Or, add the control terminal and the mobile device to the local area network by connecting to the local area network hotspot.
  • problems such as slow network access speed and low flexibility of communication establishment.
  • network access errors may occur, especially when there are multiple control terminals connected to multiple mobile devices, the probability of errors is greater.
  • the embodiments of the present invention provide a communication method, device, and system, which are used to solve the problem of low accuracy and flexibility in establishing communication between a control terminal and a movable device in the prior art.
  • an embodiment of the present invention provides a communication method applied to a first device, including: one of a control terminal and a movable device is used as the first device, and the other is used as the second device.
  • the first device is based on The wireless network to which it is connected indicates access information to the second device, and the access information includes at least login information of the wireless network, so that the second device can access the wireless network according to the access information.
  • Network after the second device accesses the wireless network, the first device receives an interaction request from the second device in the wireless network for establishing the first device and the second device The communication connection of the device.
  • an embodiment of the present invention provides a communication method applied to a second device, including: one of a control terminal and a movable device is used as a first device, and the other is used as a second device, and the second device is connected
  • the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network so that the second device can access the Wireless network; the second device accesses the wireless network according to the access information; the second device sends an interaction request to the first device in the wireless network for establishing the first device Communication connection with the second device.
  • an embodiment of the present invention provides a communication method, including: controlling one of a terminal and a movable device as a first device, and the other as a second device.
  • the first device is connected according to the first device.
  • the second device obtains the access information, and accesses the wireless network according to the access information; the first device interacts with the second device in the wireless network to establish the first device Communication connection with the second device.
  • an embodiment of the present invention provides a communication device applied to a first device, including: a processor and a communication interface, one of a control terminal and a movable device is used as the first device, and the other is used as the second device
  • the processor is configured to indicate access information to the second device according to the wireless network to which the first device is connected, where the access information includes at least login information of the wireless network, so that the first device
  • the second device accesses the wireless network according to the access information
  • the processor is further configured to receive the wireless network through the communication interface after the second device accesses the wireless network
  • the interaction request of the second device is used to establish a communication connection between the first device and the second device.
  • an embodiment of the present invention provides a communication device applied to a second device, including: a processor and a communication interface, one of the control terminal and the movable device is used as the first device, and the other is used as the second device
  • the processor is configured to obtain access information, the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network, So that the second device accesses the wireless network according to the access information; the processor is further configured to access the wireless network according to the access information; the processor is further configured to access the wireless network
  • the communication interface sends an interaction request to the first device in the wireless network for establishing a communication connection between the first device and the second device.
  • an embodiment of the present invention provides a communication system, including: a first device and a second device, one of a control terminal and a movable device is used as the first device, and the other is used as the second device;
  • the first device indicates access information to the second device according to the wireless network to which it is connected, and the access information includes at least login information of the wireless network, so that the second device can according to the access information Access the wireless network;
  • the second device obtains the access information and accesses the wireless network according to the access information;
  • the first device interacts with the second device in the wireless network Establish a communication connection between the first device and the second device.
  • an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control all The computer executes the communication method according to any one of the first aspect.
  • an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control all The computer executes the communication method according to any one of the second aspect.
  • the first device indicates access information to the second device according to the wireless network to which the first device is connected, and the access information includes at least the login information of the wireless network, So that the second device accesses the wireless network according to the access information.
  • the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device. Communication connection.
  • the first device indicates access information after accessing the wireless network, and after the second device accesses the wireless network according to the access information, the first device and the second device are established through interaction with the second device in the wireless network.
  • the communication establishment method of the communication connection of the two devices improves the accuracy and flexibility of the communication establishment between the control terminal and the movable device.
  • FIGS. 1A to 4C are schematic diagrams of application scenarios of an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a communication method provided by another embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a communication method provided by another embodiment of the present invention.
  • FIG. 8 is a schematic flowchart of a communication method provided by another embodiment of the present invention.
  • FIG. 9 is a schematic flowchart of a communication method provided by another embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a communication device provided by another embodiment of the present invention.
  • this application scenario may include a first device x1 and a second device x2.
  • the first device x1 can be connected to a wireless network.
  • the first device x1 may indicate access information for accessing the wireless network.
  • the second device x2 can access the wireless network according to the access information.
  • the first device x1 and the second device x2 can establish a communication connection between the first device x1 and the second device x2 in the wireless network.
  • the present invention may not limit the specific type of wireless network (Wireless network, WN).
  • the wireless network may specifically be a wireless local area network (Wireless Local Area Network, LAN).
  • the first device x1 and the second device x2 are devices that have a control and controlled relationship.
  • One of the control terminal and the movable device serves as the first device x1, and the other serves as the second device x2.
  • the first device x1 can control the second device x2, or the second device x2 can control the first device x1.
  • the first device x1 may be a movable device
  • the second device x2 may be a control terminal for controlling the movable device
  • the first device x1 may be a control for controlling the movable device
  • the terminal, the second device x2 may be the movable device.
  • control terminal may be a remote control and/or a mobile phone.
  • control terminal may be a remote control or a mobile phone, or the remote control and the mobile phone may jointly form a control terminal, which is not limited here.
  • the movable device may specifically be any device that can communicate with the control device and is controlled by the control terminal.
  • the movable device includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  • the numbers of the first device and the second device in FIG. 1 are only examples. In the embodiment of the present invention, the number of the first device and/or the second device may be multiple, and the relationship between the first device and the second device may be one-to-one, one-to-many, or many-to-one.
  • the application scenario may include a first device a1, a first device a2, a second device b1, and a second device b2.
  • the first device a1 and the first device a2 may be connected to a wireless network.
  • both the first device a1 and the second device a2 can indicate access information for accessing the wireless network.
  • the second device b1 can access the wireless network according to the access information indicated by the first device a1, and the second device b2 can access the wireless network according to the access information indicated by the first device a2.
  • the first device a1 and the second device b1 can establish a communication connection between the two in the wireless network, and the first device a2 and the second device b2 can establish both in the wireless network. Communication connection between.
  • one of the first device a1 and the first device a2 can indicate the access information
  • the second device b1 and the second device b2 can indicate the access information according to the same first device. Access information to access the network.
  • the application scenario may include a first device c1, a second device d1, and a second device d2.
  • the first device c1 may be connected to a wireless network.
  • the first device c1 may indicate access information for accessing the wireless network.
  • both the second device d1 and the second device d2 can access the wireless network according to the access information indicated by the first device c1.
  • the first device c1 and the second device d1 can establish a communication connection between the two in the wireless network, and the first device c1 and the second device d2 can establish both in the wireless network. Communication connection between.
  • this application scenario may include a first device e1, a first device e2, and a second device f1.
  • the first device e1 and the first device e2 may be connected to a wireless network.
  • both the first device e1 and the second device e2 can indicate access information for accessing the wireless network.
  • the second device f1 can access the wireless network according to the access information indicated by the first device e1 or the first device e2.
  • the first device e1 and the second device f1 can establish a communication connection between the two in the wireless network, and the first device e2 and the second device f1 can establish both in the wireless network. Communication connection between.
  • the first device or the second device is within the coverage of the wireless network, which can also be understood as the first device or the second device connected to the wireless network.
  • the first device or the second device is outside the coverage of the wireless network, which can also be understood as the first device or the second device not connected to the wireless network.
  • the first device indicates access information according to the wireless network to which the first device is connected, and after the second device accesses the wireless network according to the access information, the first device and the second device are in the wireless network Interaction to establish a communication connection between the first device and the second device, which improves the accuracy and flexibility of establishing communication between the control terminal and the movable device and the control device.
  • FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present invention. This embodiment mainly describes the implementation of the first device. As shown in FIG. 5, the method of this embodiment may include:
  • Step 501 The first device indicates access information to the second device according to the wireless network to which it is connected, and the access information includes at least the login information of the wireless network, so that the second device can according to the access information. Access to the wireless network.
  • the present invention may not limit the specific type of the access information indicated by the first device to the second device.
  • the access information may be indicated to the second device by displaying the access information to the second device.
  • the first device is provided with a display screen, or the first device is connected with a display screen externally, through which the display screen indicates the access information to the second device; of course, the first device may also be provided with a display including the access information
  • the display image for example, the display image is directly displayed on the outer surface of the first device by printing, pasting, etc., to indicate the access information to the second device.
  • the access information may be indicated to the second device by sending the access information to the second device.
  • the first device may be provided with an input device through which the user inputs the access information. The first device receives the access information input by the user and sends it to the second device to indicate the access information to the second device. ⁇ Entry information.
  • the access information includes at least login information of the wireless network, and the specific content of the wireless network may be related to the type of the wireless network. For example, taking the wireless network as a wireless local area network as an example, the wireless network
  • the login information includes the service set identifier (SSID) of the wireless network. Further optionally, the login information of the wireless network further includes password information of the wireless network.
  • SSID service set identifier
  • the access information may include part or all of the information that the second device needs to access the wireless network. Further, optionally, the access information may also include information related to the first device.
  • the first device may actively indicate access information after being connected to the wireless network; or, the first device may indicate access when connected to the wireless network and a first trigger condition is met. information. It needs to be said that the present invention may not limit the specific type of the first trigger condition.
  • the first trigger condition may be one or more of user input trigger, time trigger, location trigger, etc.
  • the first device may stop indicating the access information when the second trigger condition is satisfied.
  • the second trigger condition may be, for example, one or more of a user input trigger, a duration indicator trigger, and the like.
  • Step 502 After the second device accesses the wireless network, the first device receives an interaction request from the second device in the wireless network for establishing the first device and the second device. 2. The communication connection of the device.
  • the first device interacts with the second device in the wireless network, and only the first device and the second device can participate in the process of establishing a communication connection between the first device and the second device; or, The first device interacts with the second device in the wireless network, and in the process of establishing a communication connection between the first device and the second device, not only the first device and the second device can participate, but also the first device and/or the second device can participate.
  • the user of the second device participates; or, the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device. Not only can the first device and the second device participate, but also There may also be the participation of other devices besides the first device and the second device.
  • the first device may broadcast its own information in the wireless network in the wireless network.
  • a network identifier After receiving the network identifier of the first device, the second device may initiate a connection to the first device in the wireless network.
  • each first device in the multiple first devices may broadcast its presence in the wireless network
  • each second device in the multiple second devices can receive the network identification and device identification sent by the multiple first devices; further, each second device can receive The device identification of each first device is displayed to the user, and the user selects the first device with which to establish a communication connection, and each second device can initiate an initiation to the first device selected by the user in the wireless network according to the network identification of the first device connection.
  • the first device indicates access information according to the wireless network to which the first device is connected.
  • the access information is used by the second device to access the wireless network.
  • the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device, so that the first device instructs the access information after accessing the wireless network, and the second device according to the access
  • the communication establishment method of the communication connection between the first device and the second device is established through the interaction with the second device in the wireless network, thereby improving the accuracy and flexibility of the communication establishment between the control terminal and the movable device Sex.
  • FIG. 6 is a schematic flowchart of a communication method provided by another embodiment of the present invention. This embodiment mainly describes the implementation of the second device. As shown in FIG. 6, the method of this embodiment may include:
  • Step 601 The second device obtains access information.
  • the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least the login information of the wireless network so that The second device accesses the wireless network.
  • the specific manner in which the second device obtains the access information corresponds to the specific manner in which the first device indicates the access information.
  • the access information may be indicated to the second device by displaying the access information to the second device.
  • the access information may be indicated to the second device by sending the access information to the second device.
  • the second device may obtain access information after being connected to the wireless network; or, the second device may obtain the access information when connected to the wireless network and a third trigger condition is satisfied. It needs to be said that the present invention may not limit the specific type of the third trigger condition.
  • the third trigger condition may be one or more of user input trigger, time trigger, position trigger, and the like.
  • the first device may stop obtaining the access information when the fourth trigger condition is satisfied.
  • the present invention may not limit the specific type of the fourth trigger condition.
  • the fourth trigger condition may be a user input trigger.
  • the types of the third trigger condition and the first trigger condition may be the same or different, and the comparison of the present invention may not be limited.
  • the first trigger condition is a time trigger
  • the second trigger condition can be a user input trigger.
  • Step 602 The second device accesses the wireless network according to the access information.
  • the second device can access the wireless network according to the access information.
  • the second device may only access the wireless network according to the access information, or the second device may access the wireless network according to the access information and other information other than the access information (for example, the password of the wireless network entered by the user) to access the wireless network.
  • the specific manner in which the second device accesses the wireless network according to the access information may not be limited in the present invention.
  • Step 603 The second device sends an interaction request to the first device in the wireless network to establish a communication connection between the first device and the second device.
  • the second device interacts with the first device in the wireless network, and in the process of establishing a communication connection between the first device and the second device, only the first device and the second device may participate; or
  • a device interacts with a second device in a wireless network, and in the process of establishing a communication connection between the first device and the second device, not only the first device and the second device can participate, but also the first device and/or the second device The user of the device participates; or, the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device. Not only can the first device and the second device participate, but also There may be the participation of devices other than the first device and the second device.
  • the second device may broadcast its own information in the wireless network in the wireless network.
  • a network identifier After receiving the network identifier of the second device, the first device can initiate a connection to the second device in the wireless network.
  • each second device in the multiple second devices may broadcast its presence in the wireless network
  • each of the multiple first devices can receive the network identification and device identification sent by the multiple second devices; further, each first device can receive The device identification of each second device is displayed to the user, and the user selects the second device with which it establishes a communication connection.
  • Each first device can initiate an initiation to the second device selected by the user in the wireless network according to the network identification of the second device. connection.
  • the access information is obtained through the second device.
  • the second device accesses the wireless network according to the access information.
  • the second device interacts with the first device in the wireless network to establish a communication connection between the first device and the second device.
  • the establishment method improves the accuracy and flexibility of the communication establishment between the control terminal and the mobile device.
  • FIG. 7 is a schematic flowchart of a communication method provided by another embodiment of the present invention.
  • this embodiment mainly describes the interaction process between the first device and the second device.
  • the method of this embodiment may include:
  • Step 701 The first device generates a barcode carrying the access information according to the wireless network to which the first device is connected.
  • the access information may include the device identifier of the first device. Further optionally, the access information may also include a basic service set identifier BSSID of the wireless network. Wherein, the access information includes the device identification of the first device, so that the first device can carry the device identification for identifying the first device in the access information. It should be noted that the device identifier may specifically be any type of identifier that can uniquely identify the first device to the second device, and the present invention may not limit the specific type of the device identifier.
  • the first device may first obtain the access information in the form of a character string, and obtain the barcode according to the access information in the form of the character string, so that the barcode carries the access information.
  • the barcode may be a one-dimensional barcode, or a two-dimensional barcode, or other barcodes carrying the access information.
  • step 701 may specifically include: the first device encrypts the access information to obtain the encrypted access information; the first device encrypts The subsequent access information generates a barcode carrying the encrypted access information.
  • the first device may first obtain the access information in the form of a character string, and encrypt the access information in the form of the character string to obtain the encrypted access information in the form of a character string.
  • the access information in the form of a character string is obtained by obtaining the barcode, so that the access information is carried in the barcode.
  • the present invention may not limit the specific manner in which the first device encrypts the access information.
  • the first device may use a preset secret key to encrypt access information to obtain the encrypted access information.
  • Step 702 The first device displays the barcode.
  • the present invention may not limit the specific manner in which the first device displays the barcode.
  • the barcode may be displayed under the display screen of the first device, or the first device may send the barcode to a display device capable of providing a display function, and the display device displays the barcode.
  • Step 703 The second device scans the barcode through a camera.
  • the second device may scan the barcode through a camera of the second device, or the second device may scan through a scanning device connected to the second device and including a camera.
  • the barcode may be read from a camera of the second device, or the second device may scan through a scanning device connected to the second device and including a camera.
  • the present invention may not limit the specific implementation manner in which the second device scans the barcode through the camera.
  • Step 704 The second device obtains the access information according to the scanned barcode.
  • the second device may obtain the access information in the form of a character string according to the barcode.
  • step 704 may specifically include: the second device obtains the encrypted access information according to the barcode; the second device obtains the encrypted access information according to the encrypted access information; ⁇ Access information.
  • the first device may first obtain the access information in the form of an encrypted character string according to the barcode, and further may decrypt the access information in the form of the encrypted character string to obtain the decryption The access information in the form of a character string.
  • the specific way for the second device to decrypt the access information corresponds to the specific way for the first device to encrypt the access information.
  • the second device may use a preset secret key (for example, it may be the same as the preset secret key used by the first device) to decrypt the access information to obtain the decoded access information.
  • Step 705 The second device accesses the wireless network according to the access information.
  • step 705 is similar to step 602 and will not be repeated here.
  • Step 706 The first device interacts with the second device in the wireless network, and establishes a communication connection between the first device and the second device.
  • step 706 has the same meaning as that of the second device interacting with the first device in the wireless network to establish a communication connection between the first device and the second device, and both are In the wireless network, the first device and the second device interact to establish a communication connection between the first device and the second device.
  • step 706 may specifically include step 801 to step 803 shown in FIG. 8.
  • Step 801 The second device sends first broadcast information in the wireless network.
  • the first broadcast information includes the network identification of the second device in the wireless network; the first broadcast information is used by the first device to initiate to the second device in the wireless network connection.
  • the present invention may not limit the protocol on which the second device sends the first broadcast information in the wireless network.
  • the second device may send the first broadcast information based on the User Datagram Protocol (UDP).
  • UDP User Datagram Protocol
  • the second device may send broadcast information in the wireless network according to a certain rule, for example, may periodically send broadcast information in the wireless network with a preset duration as a period.
  • the broadcast information may include the first broadcast information or the second broadcast information described below.
  • Step 802 The first device receives the first broadcast information in the wireless network.
  • the specific manner in which the first device receives the first broadcast information in the wireless network corresponds to the specific manner in which the second device sends the first broadcast information in the wireless network.
  • the second device may receive the first broadcast information based on UDP.
  • Step 803 The first device initiates a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and The communication connection of the second device.
  • the network identification of the first device and the network identification of the second device may specifically be any type of identification that can uniquely identify the device in the wireless network.
  • the network identification may be an Internet Protocol (IP) address.
  • IP Internet Protocol
  • the present invention may not limit the protocol on which the first device initiates a connection to the second device in the wireless network according to the network identifiers of the first device and the second device.
  • the first device initiates a TCP connection to the second device in the wireless network according to the network identifiers of the first device and the second device and based on a Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection.
  • step 803 may specifically include:
  • the first device will use the network ID of the first device and the network ID of the second device in the wireless Initiating a connection to the second device in the network.
  • the device identifier of the first target device is the same as the device identifier of the first device, it can be understood that the device that the second device expects to communicate with is the first device.
  • the device identifier of the first target device is different from the device identifier of the first device, it can be understood that the device with which the second device expects to establish a communication connection is not the first device.
  • step 803 may further include:
  • the first device determines whether the first device has established a communication connection with the second device;
  • the first device disconnects the communication connection with the second device.
  • the access information of a first device includes the device identification of the first device, and when the second device obtains the access information, the second device may obtain the second device expectation according to the access information.
  • the device identifier of the first target device that establishes the communication connection is the access information of the first device.
  • the access information of the first device a1 may include the device identification of the first device a1
  • the second device b1 may include the first device in obtaining the access information of the first device a1.
  • the first device a1 can be understood as the device that the second device b1 expects to establish a communication connection.
  • the access information of a first device includes the device identification of the first device, so that the second device can obtain the device that the second device expects to establish a communication connection through the access information of the first device.
  • the convenience of the second device in determining the device identifier of the first target device that the second device desires to establish a communication connection can be improved.
  • the second device may determine the device identification of the first target device that the second device expects to establish a communication connection through user input.
  • the first broadcast information further includes: the device identifier of the second device.
  • steps A to D may be further included.
  • Step A The second device sends second broadcast information in the wireless network.
  • the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the second device Device ID.
  • the device identifier of the second target device included in the second broadcast information may be the same as or different from the device identifier of the first target device included in the first broadcast information.
  • Step B After the first device is reconnected to the wireless network, the first device receives the second broadcast information.
  • reconnecting the first device to the wireless network may specifically include: disconnecting the first device on the basis of establishing a communication connection between the first device and the second device in the wireless network After connecting to the wireless network, the first device reconnects to the wireless network. It should be noted that after the first device and the second device establish a communication connection in the wireless network, and the first device disconnects from the wireless network, then the first device The communication connection between the device and the second device must be disconnected.
  • Step C The first device determines whether the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device establishes a communication connection with the first device by default Whether the device IDs of the devices are the same.
  • the device identifier of the second target device is the same as the device identifier of the first device, it can be understood that the device to which the second device expects to be connected in communication is the first device.
  • the device identifier of the second target device is different from the device identifier of the first device, it can be understood that the device with which the second device expects to establish a communication connection is not the first device.
  • the device identifier of the second device is the same as the device identifier of the device that establishes a communication connection preset by the first device, which may indicate that the device to which the first device expects to establish a connection is the second device.
  • the device identifier of the second device is different from the device identifier of the device preset to establish a communication connection by the first device, it may indicate that the device to which the first device expects to establish a connection is not the second device.
  • Step D if the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the device with which the first device presets the communication connection , The first device initiates a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device.
  • the present invention may not limit the specific manner for determining the device identifier of the device preset to establish a communication connection by the first device.
  • the first device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
  • the second broadcast information is sent through the second device in the wireless network.
  • the first device receives the second broadcast information after disconnecting from the wireless network, and the device identification of the second target device and the first device in the second broadcast information
  • the device ID of the second device in the second broadcast information is the same as the device ID of the device preset to establish a communication connection by the first device, according to the network ID of the first device and the network ID of the second device, Initiating a connection to the second device in the wireless network realizes that after the communication connection between the first device and the second device is disconnected due to the disconnection of the first device from the wireless network, the first device can connect to the wireless network again.
  • the communication connection between the first device and the second device is re-established directly according to the information broadcast by the second device, thereby reducing the time consumption for re-establishing the communication connection between the first device and the second device and improving user experience.
  • the present invention may not limit the specific reasons that cause the first device to disconnect from the wireless network.
  • the first device may be disconnected from the wireless network due to shutdown of the first device.
  • the first broadcast information further includes: preemption information of the second device, and the preemption information is used to instruct the second device to preempt outside the second device The ability of other devices to establish communication connections.
  • the first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
  • the first device has established a communication connection with another device other than the second device;
  • the first device disconnects the communication connection with the other device, and according to the first device
  • the network identification of a device and the network identification of the second device initiate a connection to the second device in the wireless network.
  • the ability of the second device to preempt communication connections established by other devices other than the second device is enabled, which can be understood as the second device being able to preempt other devices other than the second device has Established communication connection. If the ability of the second device to preempt the communication connection established by other devices other than the second device is not enabled (or may be referred to as disabled), it can be understood that the second device cannot preempt the first device. 2. A communication connection established by a device other than the device.
  • step 706 may specifically include step 901 to step 903 shown in FIG. 9.
  • Step 901 The first device sends third broadcast information in the wireless network.
  • the third broadcast information includes the network identification of the first device in the wireless network; the third broadcast information is used by the second device to initiate to the first device in the wireless network connection.
  • the present invention may not limit the protocol on which the first device sends the third broadcast information in the wireless network.
  • the first device may send the third broadcast information based on UDP.
  • the first device may send broadcast information in the wireless network according to a certain rule, for example, may periodically send broadcast information in the wireless network with a preset duration as a period.
  • the broadcast information may include the third broadcast information or the following fourth broadcast information.
  • Step 902 The second device receives the third broadcast information in the wireless network.
  • the specific manner in which the second device receives the third broadcast information in the wireless network corresponds to the specific manner in which the first device sends the third broadcast information in the wireless network.
  • the second device may receive the third broadcast information based on UDP.
  • Step 903 The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and The communication connection of the second device.
  • the present invention may not limit the protocol on which the second device initiates a connection to the first device in the wireless network according to the network identifiers of the first device and the second device.
  • the second device initiates a TCP connection to the first device in the wireless network according to the network identifiers of the first device and the second device and based on TCP.
  • the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection.
  • step 903 may specifically include:
  • the second device determines whether the device identifier of the third target device is the same as the device identifier of the second device;
  • the second device will use the network ID of the first device and the network ID of the second device in the wireless Initiating a connection to the first device in the network.
  • the device identifier of the third target device is the same as the device identifier of the second device, it can be understood that the device that the first device expects to communicate with is the second device.
  • the device ID of the third target device is different from the device ID of the second device, it can be understood that the device with which the first device expects to establish a communication connection is not the second device.
  • step 903 may further include:
  • the second device determines whether the second device has established a communication connection with the first device
  • the second device disconnects the communication connection with the first device.
  • the specific manner in which the first device determines the device identifier of the third target device may not be limited in the present invention.
  • the first device may determine the device identification of the third target device that the first device expects to establish a communication connection through user input.
  • the third broadcast information further includes: the device identifier of the first device.
  • the following steps E to H may be further included.
  • Step E The first device sends fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the first device Device ID.
  • the device identifier of the fourth target device included in the fourth broadcast information may be the same as or different from the device identifier of the third target device included in the third broadcast information.
  • Step F After the second device is reconnected to the wireless network, the second device receives the fourth broadcast information.
  • reconnecting the second device to the wireless network may specifically include: disconnecting the second device based on the establishment of a communication connection between the first device and the second device in the wireless network After connecting to the wireless network, the second device reconnects to the wireless network. It should be noted that, based on the establishment of a communication connection between the first device and the second device in the wireless network, and the second device disconnects from the wireless network, then the first device The communication connection between the device and the second device must be disconnected.
  • Step G The second device determines whether the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is preset to establish a communication connection with the second device Whether the device IDs of the devices are the same.
  • the device identifier of the fourth target device is the same as the device identifier of the second device, it can be understood that the device that the first device expects to communicate with is the second device.
  • the device identifier of the fourth target device is different from the device identifier of the second device, it can be understood that the device with which the first device expects to establish a communication connection is not the second device.
  • the device identifier of the first device When the device identifier of the first device is the same as the device identifier of the device that establishes a communication connection preset by the second device, it may indicate that the device that the second device expects to establish a connection is the first device. When the device identifier of the first device is different from the device identifier of the device that establishes a communication connection preset by the second device, it may indicate that the device to which the second device expects to establish a connection is not the first device.
  • Step H if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device , The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device.
  • the present invention may not limit the specific manner for determining the device identifier of the device preset to establish a communication connection by the second device.
  • the second device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
  • the fourth broadcast information is sent through the first device in the wireless network, and the second device receives the fourth broadcast information after disconnecting from the wireless network.
  • the device identification of the fourth target device and the second device When the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device in the fourth broadcast information, according to the network ID of the first device and the network ID of the second device, Initiating a connection to the first device in the wireless network realizes that after the communication connection between the first device and the second device is disconnected due to the disconnection of the second device from the wireless network, the second device can connect to the wireless network again.
  • the communication connection between the first device and the second device is re-established directly according to the information broadcast by the first device, thereby reducing the time consumption for re-establishing the communication connection between the first device and the second device and improving user experience.
  • the present invention may not limit the specific reasons that cause the second device to disconnect from the wireless network.
  • the second device may be disconnected from the wireless network due to the shutdown of the second device.
  • the third broadcast information further includes: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communication connections established by other devices Ability.
  • the second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
  • the second device disconnects the communication connection with the other device, and according to the first device
  • the network identifier of a device and the network identifier of the second device initiate a connection to the first device in the wireless network.
  • the ability of the first device to preempt the communication connection established by other devices other than the first device is enabled. It can be understood that the first device can preempt other devices other than the first device. Established communication connection. If the ability of the first device to preempt the communication connection established by other devices other than the first device is not enabled (or can be called prohibited), it can be understood that the first device cannot preempt the first device. A communication connection established by a device other than one device.
  • the method when the access information includes the BSSID of the wireless network, before the second device accesses the wireless network according to the access information, the method further includes:
  • the second device exits the network where it is currently located.
  • the second device when the BSSID of the wireless network included in the access information is different from the BSSID of the network where the second device is currently located, it may indicate that the network where the second device is currently located is not the second device Desired access network. Therefore, the second device can exit the current network.
  • the second device may further access the wireless network according to the access information.
  • the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located, it may indicate that the network where the second device is currently located is that the second device expects to access network of. At this time, the second device may no longer perform the step of accessing the wireless network according to the access information.
  • the second device may no longer perform access based on the access information.
  • the steps of the wireless network can avoid the time consumption caused by the second device first exiting the wireless network and then accessing the wireless network, thereby increasing the speed of the second device accessing the wireless network.
  • the ability of the first device to preempt the communication connection established by other devices other than the first device is prohibited. At that time, the first device no longer interacts with devices in the wireless network to establish a communication connection.
  • the first device generates a barcode carrying access information according to the wireless network to which the first device is connected and displays the barcode
  • the second device scans the barcode through the camera, obtains the access information according to the scanned barcode and then
  • the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device, which realizes the implementation of the second device accessing the wireless network according to the barcode displayed by the first device , Improve the accuracy, flexibility and convenience of the second device to access the wireless network.
  • FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present invention.
  • one of the control terminal and the movable device serves as the first device, and the other serves as the second device.
  • the apparatus 1000 provided in this embodiment may be applied to a first device, and becomes part or all of the first device through software, hardware, or a combination of software and hardware.
  • the apparatus may include: a processor 1001 and a communication interface 1002;
  • the processor 1001 is configured to indicate access information to the second device according to the wireless network to which the first device is connected, where the access information includes at least login information of the wireless network, so that the 2.
  • the device accesses the wireless network according to the access information;
  • the processor 1001 is further configured to send an interaction request to the second device in the wireless network through the communication interface 1002 after the second device accesses the wireless network according to the access information , Used to establish a communication connection between the first device and the second device.
  • the processor 1001 is configured to indicate access information according to the wireless network to which the first device is connected, which specifically includes:
  • the processor 1001 is configured to generate a barcode carrying the access information according to the wireless network to which the first device is connected, which specifically includes:
  • a barcode carrying the encrypted access information is generated.
  • the access information includes: the device identifier of the first device.
  • the access information further includes a basic service set identifier BSSID of the wireless network.
  • the processor 1001 is configured to send an interaction request to the second device in the wireless network through the communication interface 1002, and is used to establish the first device and the second device.
  • the communication connection of the device includes:
  • the network identification of the first device and the network identification of the second device initiate a connection to the second device in the wireless network to establish a communication connection between the first device and the second device .
  • the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection;
  • the processor 1001 is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
  • the device identity of the first target device is the same as the device identity of the first device, then according to the network identity of the first device and the network identity of the second device, report to the wireless network The second device initiates a connection.
  • the processor 1001 is further configured to:
  • the device identifier of the first target device is not the same as the device identifier of the first device, determining whether the first device has established a communication connection with the second device;
  • the first broadcast information further includes: the device identifier of the second device;
  • the processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is used for the communication connection between the first device and the second device, and is also used for :
  • the second broadcast information is received through the communication interface 1002;
  • the second broadcast information includes the information of the second target device that the second device expects to establish a communication connection Device identification and the device identification of the second device;
  • the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the device preset to establish a communication connection by the first device, then The network identification of the first device and the network identification of the second device initiate a connection to the second device in the wireless network.
  • the first device presets the device identifier of the device that establishes the communication connection as: a preset device identifier or the device identifier of the device that establishes a communication connection last time.
  • the first broadcast information further includes: preemption information of the second device, and the preemption information is used to indicate that the second device has preempted other devices other than the second device.
  • the processor 1001 is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
  • the processor 1001 has established a communication connection with another device other than the second device;
  • the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the second device in the wireless network.
  • the network identifier is an Internet Protocol address (IP address).
  • IP address Internet Protocol address
  • the processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is configured to establish the first device and the second device.
  • the communication connection of the device includes:
  • the third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used by the second device in the wireless network. Initiating a connection to the first device in the wireless network.
  • the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection.
  • the third broadcast information further includes: the device identifier of the first device;
  • the processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is configured to further use after establishing a communication connection between the first device and the second device in:
  • Send fourth broadcast information in the wireless network where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the device identifier of the first device.
  • the third broadcast information further includes: preemption information of the first device, and the preemption information is used to indicate the ability of the first device to preempt communication connections established by other devices.
  • the network identifier is an Internet Protocol address (IP address).
  • IP address Internet Protocol address
  • control terminal includes: a remote controller and/or a mobile phone; and/or, the movable device includes: an intelligent car, an intelligent robot, or an unmanned aerial vehicle.
  • the device provided in this embodiment can be used to implement the technical solutions on the first device side of the embodiment shown in FIG. 5 to FIG. 9, and its implementation principles and technical effects are similar, and will not be repeated here.
  • FIG. 11 is a schematic structural diagram of a communication device provided by another embodiment of the present invention.
  • one of the control terminal and the movable device serves as the first device, and the other serves as the second device.
  • the apparatus 1100 provided in this embodiment may be applied to a second device, and becomes part or all of the first device through software, hardware, or a combination of software and hardware.
  • the apparatus may include: a processor 1101 and a communication interface 1102;
  • the processor 1101 is configured to obtain access information, where the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network, So that the second device can access the wireless network;
  • the processor 1101 is further configured to access the wireless network according to the access information
  • the processor 1101 is further configured to receive an interaction request of the first device in the wireless network through the communication interface 1102, and is configured to establish a communication connection between the first device and the second device.
  • the processor 1101 is configured to obtain access information, which specifically includes:
  • the access information is obtained.
  • the barcode carries the encrypted access information
  • the processor 1101 is configured to obtain the access information according to the scanned barcode, which specifically includes:
  • the access information includes: the device identifier of the first device.
  • the access information includes a basic service set identifier BSSID of the wireless network
  • the processor 1101 is configured to before accessing the wireless network according to the access information, and is further configured to:
  • the BSSID of the wireless network included in the access information is not the same as the BSSID of the network where the second device is currently located, exit the current network.
  • the processor 1101 is configured to log out of the current network, and is further configured to access the wireless network according to the access information.
  • the processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, for establishing the first device and the second device.
  • the communication connection of the device includes:
  • first broadcast information is sent through the communication interface 1102.
  • the first broadcast information includes the network identifier of the second device in the wireless network; the first broadcast information is used for the The first device initiates a connection to the second device in the wireless network.
  • the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection.
  • the first broadcast information further includes: the device identifier of the second device;
  • the processor 1101 is configured to send an interaction request to the first device in the wireless network, and is configured to: after establishing a communication connection between the first device and the second device:
  • the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device.
  • the first broadcast information further includes: preemption information of the second device, and the preemption information is used to indicate that the second device has preempted other devices other than the second device. The ability to establish a communication connection.
  • the network identifier is an Internet Protocol address (IP address).
  • IP address Internet Protocol address
  • the processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, for establishing the first device and the second device.
  • the communication connection of the device includes:
  • the network identification of the first device and the network identification of the second device initiate a connection to the first device in the wireless network to establish a communication connection between the first device and the second device .
  • the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection;
  • the processor 1101 is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
  • the device identity of the third target device is the same as the device identity of the second device, then according to the network identity of the first device and the network identity of the second device, report to the wireless network The first device initiates a connection.
  • the processor 1101 is further configured to:
  • the device identifier of the third target device is not the same as the device identifier of the second device, determining whether the second device has established a communication connection with the first device;
  • the third broadcast information further includes: the device identifier of the first device;
  • the processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, and is configured to use the communication interface 1102 to establish a communication connection between the first device and the second device.
  • the fourth broadcast information is received via the communication interface 1102;
  • the fourth broadcast information includes the device of the fourth target device that the first device expects to establish a communication connection Identification and the device identification of the first device;
  • the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device, then The network identification of the first device and the network identification of the second device initiate a connection to the first device in the wireless network.
  • the second device presets the device identifier of the device that establishes the communication connection as: a preset device identifier or the device identifier of the device that establishes a communication connection last time.
  • the third broadcast information further includes: preemption information of the first device, where the preemption information is used to indicate the ability of the first device to preempt communication connections established by other devices;
  • the processor 1101 is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
  • the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the first device in the wireless network.
  • the network identifier is an Internet Protocol address (IP address).
  • IP address Internet Protocol address
  • control terminal includes: a remote controller and/or a mobile phone
  • movable device includes: a smart car, a smart robot, or an unmanned aerial vehicle.
  • the device provided in this embodiment can be used to implement the technical solutions on the second device side of the embodiments shown in FIGS. 5-9.
  • the implementation principles and technical effects are similar, and will not be repeated here.
  • An embodiment of the present invention also provides a communication system including a first device and a second device.
  • the first device includes the communication device as shown in FIG. 10
  • the second device includes the communication device as shown in FIG. 11.
  • the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control the computer to execute The method on the first device side in the above method embodiment.
  • the embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control the computer to execute The method on the second device side in the above method embodiment.
  • a person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the steps including the foregoing method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

A communication method, apparatus and system. One of a control terminal and a movable device is used as a first device, and the other one is used as a second device. The method comprises: (501) the first device, according to a wireless network connected by the first device, indicates access information to the second device, the access information at least comprising login information of the wireless network, so that the second device accesses the wireless network according to the access information; and (502) after the second device accesses the wireless network, the first device receives an interactive request of the second device in the wireless network for establishing a communication connection between the first device and the second device. The present invention improves the accuracy and flexibility of communication establishment between the control terminal and the movable device.

Description

通信方法、装置及系统Communication method, device and system 技术领域Technical field
本发明涉及控制终端和可移动设备领域,尤其涉及一种通信方法、装置及系统。The present invention relates to the field of control terminals and movable equipment, and in particular to a communication method, device and system.
背景技术Background technique
随着社会的发展,控制终端和可移动设备的种类越来越多,例如通过控制终端控制的智能小车、智能机器人、无人飞行器等可移动设备。With the development of society, there are more and more types of control terminals and movable devices, such as smart cars, smart robots, unmanned aerial vehicles and other movable devices controlled by the control terminal.
现有技术中,通常采用如下方法对可移动设备进行控制:首先,将控制终端和可移动设备进行对频,使得控制终端和可移动设备可以在同一个频率上进行通信;之后,用户可以通过操作控制终端实现对可移动设备的控制。或者,将控制终端和可移动设备通过连接局域网热点的方法加入到局域网中。但是,现有技术中,在加入局域网的过程中,存在入网速度较慢,通信建立的灵活性较低等问题。此外,当存在多个局域网的情况下,有可能出现入网错误,特别是当有多个控制终端与多个可移动设备连接的时候,出现错误的几率更大。In the prior art, the following methods are usually used to control the movable device: firstly, the control terminal and the movable device are frequency-matched so that the control terminal and the movable device can communicate on the same frequency; after that, the user can use The operation control terminal realizes the control of the movable equipment. Or, add the control terminal and the mobile device to the local area network by connecting to the local area network hotspot. However, in the prior art, in the process of joining the local area network, there are problems such as slow network access speed and low flexibility of communication establishment. In addition, when there are multiple local area networks, network access errors may occur, especially when there are multiple control terminals connected to multiple mobile devices, the probability of errors is greater.
发明内容Summary of the invention
本发明实施例提供一种通信方法、装置及系统,用于解决现有技术中控制终端和可移动设备通信建立的准确性和灵活性较低的问题。The embodiments of the present invention provide a communication method, device, and system, which are used to solve the problem of low accuracy and flexibility in establishing communication between a control terminal and a movable device in the prior art.
第一个面,本发明实施例提供一种通信方法,应用于第一设备,包括:控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;在所述第二设备接入所述无线网络后,所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。On the first aspect, an embodiment of the present invention provides a communication method applied to a first device, including: one of a control terminal and a movable device is used as the first device, and the other is used as the second device. The first device is based on The wireless network to which it is connected indicates access information to the second device, and the access information includes at least login information of the wireless network, so that the second device can access the wireless network according to the access information. Network; after the second device accesses the wireless network, the first device receives an interaction request from the second device in the wireless network for establishing the first device and the second device The communication connection of the device.
第二方面,本发明实施例提供一种通信方法,应用于第二设备,包括: 控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第二设备获得接入信息,所述接入信息是第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备接入所述无线网络;所述第二设备根据所述接入信息接入所述无线网络;所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。In a second aspect, an embodiment of the present invention provides a communication method applied to a second device, including: one of a control terminal and a movable device is used as a first device, and the other is used as a second device, and the second device is connected The access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network so that the second device can access the Wireless network; the second device accesses the wireless network according to the access information; the second device sends an interaction request to the first device in the wireless network for establishing the first device Communication connection with the second device.
第三方面,本发明实施例提供一种通信方法,包括:控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第一设备根据所述第一设备所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;所述第二设备获得所述接入信息,并根据所述接入信息接入所述无线网络;所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。In a third aspect, an embodiment of the present invention provides a communication method, including: controlling one of a terminal and a movable device as a first device, and the other as a second device. The first device is connected according to the first device. Indicates access information to the second device, where the access information includes at least login information of the wireless network, so that the second device can access the wireless network according to the access information; The second device obtains the access information, and accesses the wireless network according to the access information; the first device interacts with the second device in the wireless network to establish the first device Communication connection with the second device.
第四方面,本发明实施例提供一种通信装置,应用于第一设备,包括:处理器和通信接口,控制终端和可移动设备中的一个作为所述第一设备,另一个作为第二设备;所述处理器,用于根据所述第一设备所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;所述处理器,还用于在所述第二设备接入所述无线网络后,通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。In a fourth aspect, an embodiment of the present invention provides a communication device applied to a first device, including: a processor and a communication interface, one of a control terminal and a movable device is used as the first device, and the other is used as the second device The processor is configured to indicate access information to the second device according to the wireless network to which the first device is connected, where the access information includes at least login information of the wireless network, so that the first device The second device accesses the wireless network according to the access information; the processor is further configured to receive the wireless network through the communication interface after the second device accesses the wireless network The interaction request of the second device is used to establish a communication connection between the first device and the second device.
第五方面,本发明实施例提供一种通信装置,应用于第二设备,包括:处理器和通信接口,控制终端和可移动设备中的一个作为第一设备,另一个作为所述第二设备;所述处理器,用于获得接入信息,所述接入信息是第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;所述处理器,还用于根据所述接入信息接入所述无线网络;所述处理器,还用于通过所述通信接口在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。In a fifth aspect, an embodiment of the present invention provides a communication device applied to a second device, including: a processor and a communication interface, one of the control terminal and the movable device is used as the first device, and the other is used as the second device The processor is configured to obtain access information, the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network, So that the second device accesses the wireless network according to the access information; the processor is further configured to access the wireless network according to the access information; the processor is further configured to access the wireless network The communication interface sends an interaction request to the first device in the wireless network for establishing a communication connection between the first device and the second device.
第六方面,本发明实施例提供一种通信系统,包括:第一设备和第二设 备,控制终端和可移动设备中的一个作为所述第一设备,另一个作为所述第二设备;所述第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;所述第二设备获得所述接入信息并根据所述接入信息接入所述无线网络;所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。In a sixth aspect, an embodiment of the present invention provides a communication system, including: a first device and a second device, one of a control terminal and a movable device is used as the first device, and the other is used as the second device; The first device indicates access information to the second device according to the wireless network to which it is connected, and the access information includes at least login information of the wireless network, so that the second device can according to the access information Access the wireless network; the second device obtains the access information and accesses the wireless network according to the access information; the first device interacts with the second device in the wireless network Establish a communication connection between the first device and the second device.
第七方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如第一方面任一项所述的通信方法。In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control all The computer executes the communication method according to any one of the first aspect.
第八方面,本发明实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如第二方面任一项所述的通信方法。In an eighth aspect, an embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control all The computer executes the communication method according to any one of the second aspect.
本发明实施例提供的通信方法、装置及系统,通过第一设备根据第一设备所连接的无线网络,向第二设备指示接入信息,该接入信息至少包括所述无线网络的登录信息,以便第二设备根据该接入信息接入无线网络,在第二设备根据接入信息接入无线网络后,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接。如此,实现了第一设备在接入无线网络后指示接入信息,并在第二设备根据接入信息接入无线网络后,通过在无线网络中与第二设备的交互建立第一设备和第二设备的通信连接的通信建立方式,从而提高了控制终端和可移动设备之间通信建立的准确性和灵活性。In the communication method, device and system provided by the embodiments of the present invention, the first device indicates access information to the second device according to the wireless network to which the first device is connected, and the access information includes at least the login information of the wireless network, So that the second device accesses the wireless network according to the access information. After the second device accesses the wireless network according to the access information, the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device. Communication connection. In this way, it is realized that the first device indicates access information after accessing the wireless network, and after the second device accesses the wireless network according to the access information, the first device and the second device are established through interaction with the second device in the wireless network. The communication establishment method of the communication connection of the two devices improves the accuracy and flexibility of the communication establishment between the control terminal and the movable device.
附图说明Description of the drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings used in the description of the embodiments or the prior art. Obviously, the drawings in the following description These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1A至图4C为本发明实施例的应用场景示意图;1A to 4C are schematic diagrams of application scenarios of an embodiment of the present invention;
图5为本发明一实施例提供的通信方法的流程示意图;FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present invention;
图6为本发明另一实施例提供的通信方法的流程示意图;FIG. 6 is a schematic flowchart of a communication method provided by another embodiment of the present invention;
图7为本发明又一实施例提供的通信方法的流程示意图;FIG. 7 is a schematic flowchart of a communication method provided by another embodiment of the present invention;
图8为本发明又一实施例提供的通信方法的流程示意图;FIG. 8 is a schematic flowchart of a communication method provided by another embodiment of the present invention;
图9为本发明又一实施例提供的通信方法的流程示意图;FIG. 9 is a schematic flowchart of a communication method provided by another embodiment of the present invention;
图10为本发明一实施例提供的通信装置的结构示意图;FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present invention;
图11为本发明另一实施例提供的通信装置的结构示意图。FIG. 11 is a schematic structural diagram of a communication device provided by another embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of the embodiments of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
图1A至图1C为本发明实施例的应用场景示意图。如图1A至图1C所示,该应用场景中可以包括第一设备x1和第二设备x2。具体的,首先,如图1A所示,第一设备x1可以连接至无线网络。然后,如图1A所示,第一设备x1可以指示用于接入该无线网络的接入信息。之后,如图1B所示,第二设备x2可以根据该接入信息接入无线网络。最后,如图1C所示,第一设备x1和第二设备x2可以在该无线网络中建立第一设备x1和第二设备x2的通信连接。1A to 1C are schematic diagrams of application scenarios of embodiments of the present invention. As shown in FIGS. 1A to 1C, this application scenario may include a first device x1 and a second device x2. Specifically, first, as shown in FIG. 1A, the first device x1 can be connected to a wireless network. Then, as shown in FIG. 1A, the first device x1 may indicate access information for accessing the wireless network. Thereafter, as shown in FIG. 1B, the second device x2 can access the wireless network according to the access information. Finally, as shown in FIG. 1C, the first device x1 and the second device x2 can establish a communication connection between the first device x1 and the second device x2 in the wireless network.
其中,对于无线网络(Wireless network,WN)的具体类型本发明可以不作限定。示例性的,所述无线网络具体可以为无线局域网(Wireless Local Area Network,LAN)。Among them, the present invention may not limit the specific type of wireless network (Wireless network, WN). Exemplarily, the wireless network may specifically be a wireless local area network (Wireless Local Area Network, LAN).
需要说明的是,第一设备x1和第二设备x2是存在控制与被控制关系的设备,所述控制终端和所述可移动设备中的一个作为第一设备x1,另一个作为第二设备x2。具体的,第一设备x1可以控制第二设备x2,或者第二设备x2可以控制第一设备x1。可选的,第一设备x1可以为可移动设备,第二设备x2可以为用于对该可移动设备进行控制的控制终端;或者,第一设备x1为用于对可移动设备进行控制的控制终端,第二设备x2可以为该可移动设备。It should be noted that the first device x1 and the second device x2 are devices that have a control and controlled relationship. One of the control terminal and the movable device serves as the first device x1, and the other serves as the second device x2. . Specifically, the first device x1 can control the second device x2, or the second device x2 can control the first device x1. Optionally, the first device x1 may be a movable device, and the second device x2 may be a control terminal for controlling the movable device; or the first device x1 may be a control for controlling the movable device The terminal, the second device x2 may be the movable device.
需要说明的是,对于所述控制终端的具体类型,本发明可以不作限定。 例如,可以为遥控器和/或手机,具体地,控制终端可以是遥控器,也可以是手机,也可以是遥控器和手机共同组成控制终端,在此不作限定。It should be noted that the present invention may not limit the specific type of the control terminal. For example, it may be a remote control and/or a mobile phone. Specifically, the control terminal may be a remote control or a mobile phone, or the remote control and the mobile phone may jointly form a control terminal, which is not limited here.
其中,所述可移动设备具体可以为任意能够与控制设备进行通信,并由控制终端进行控制的设备。示例性的,所述可移动设备包括:智能小车、智能机器人或无人飞行器。Wherein, the movable device may specifically be any device that can communicate with the control device and is controlled by the control terminal. Exemplarily, the movable device includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
需要说明的是,图1中第一设备和第二设备的个数仅为举例。本发明实施例中第一设备和/或第二设备的个数可以为多个,且第一设备与第二设备之间的关系可以为一对一、一对多或多对一。It should be noted that the numbers of the first device and the second device in FIG. 1 are only examples. In the embodiment of the present invention, the number of the first device and/or the second device may be multiple, and the relationship between the first device and the second device may be one-to-one, one-to-many, or many-to-one.
例如,如图2A至图2C所示,该应用场景中可以包括第一设备a1、第一设备a2、第二设备b1和第二设备b2。示例性的,首先,如图2A所示,第一设备a1和第一设备a2可以连接至无线网络。然后,如图2A所示,第一设备a1和第二设备a2均可以指示用于接入该无线网络的接入信息。之后,如图2B所示,第二设备b1可以根据该第一设备a1指示的接入信息接入无线网络,第二设备b2可以根据该第一设备a2指示的接入信息接入无线网络。最后,如图2C所示,第一设备a1和第二设备b1可以在该无线网络中建立两者之间的通信连接,第一设备a2和第二设备b2可以在该无线网络中建立两者之间的通信连接。For example, as shown in FIGS. 2A to 2C, the application scenario may include a first device a1, a first device a2, a second device b1, and a second device b2. Exemplarily, first, as shown in FIG. 2A, the first device a1 and the first device a2 may be connected to a wireless network. Then, as shown in FIG. 2A, both the first device a1 and the second device a2 can indicate access information for accessing the wireless network. After that, as shown in FIG. 2B, the second device b1 can access the wireless network according to the access information indicated by the first device a1, and the second device b2 can access the wireless network according to the access information indicated by the first device a2. Finally, as shown in Figure 2C, the first device a1 and the second device b1 can establish a communication connection between the two in the wireless network, and the first device a2 and the second device b2 can establish both in the wireless network. Communication connection between.
可以理解的是,接入信息与第一设备无关时,第一设备a1和第一设备a2中的一个可以指示接入信息,第二设备b1和第二设备b2可以根据同一个第一设备指示的接入信息接入网络。It is understandable that when the access information is not related to the first device, one of the first device a1 and the first device a2 can indicate the access information, and the second device b1 and the second device b2 can indicate the access information according to the same first device. Access information to access the network.
例如,如图3A至图3C所示,该应用场景中可以包括第一设备c1、第二设备d1和第二设备d2。示例性的,首先,如图3A所示,第一设备c1可以连接至无线网络。然后,如图3A所示,第一设备c1可以指示用于接入该无线网络的接入信息。之后,如图3B所示,第二设备d1和第二设备d2均可以根据第一设备c1指示的接入信息接入无线网络。最后,如图3C所示,第一设备c1和第二设备d1可以在该无线网络中建立两者之间的通信连接,第一设备c1和第二设备d2可以在该无线网络中建立两者之间的通信连接。For example, as shown in FIGS. 3A to 3C, the application scenario may include a first device c1, a second device d1, and a second device d2. Exemplarily, first, as shown in FIG. 3A, the first device c1 may be connected to a wireless network. Then, as shown in FIG. 3A, the first device c1 may indicate access information for accessing the wireless network. Thereafter, as shown in FIG. 3B, both the second device d1 and the second device d2 can access the wireless network according to the access information indicated by the first device c1. Finally, as shown in Figure 3C, the first device c1 and the second device d1 can establish a communication connection between the two in the wireless network, and the first device c1 and the second device d2 can establish both in the wireless network. Communication connection between.
例如,如图4A至图4C所示,该应用场景中可以包括第一设备e1、第一设备e2和第二设备f1。示例性的,首先,如图4A所示,第一设备e1和第一设备e2可以连接至无线网络。然后,如图4A所示,第一设备e1和第二设备 e2均可以指示用于接入该无线网络的接入信息。之后,如图4B所示,第二设备f1可以根据第一设备e1或第一设备e2指示的接入信息接入无线网络。最后,如图4C所示,第一设备e1和第二设备f1可以在该无线网络中建立两者之间的通信连接,第一设备e2和第二设备f1可以在该无线网络中建立两者之间的通信连接。For example, as shown in FIGS. 4A to 4C, this application scenario may include a first device e1, a first device e2, and a second device f1. Exemplarily, first, as shown in FIG. 4A, the first device e1 and the first device e2 may be connected to a wireless network. Then, as shown in Fig. 4A, both the first device e1 and the second device e2 can indicate access information for accessing the wireless network. Thereafter, as shown in FIG. 4B, the second device f1 can access the wireless network according to the access information indicated by the first device e1 or the first device e2. Finally, as shown in Figure 4C, the first device e1 and the second device f1 can establish a communication connection between the two in the wireless network, and the first device e2 and the second device f1 can establish both in the wireless network. Communication connection between.
需要说明的是,图1A至图4C中,第一设备或第二设备在所述无线网络的覆盖范围内,也可以理解为第一设备或第二设备与所述无线网络连接。图1A至图4C中,第一设备或第二设备在所述无线网络的覆盖范围外,也可以理解为第一设备或第二设备未与所述无线网络连接。It should be noted that, in FIGS. 1A to 4C, the first device or the second device is within the coverage of the wireless network, which can also be understood as the first device or the second device connected to the wireless network. In FIGS. 1A to 4C, the first device or the second device is outside the coverage of the wireless network, which can also be understood as the first device or the second device not connected to the wireless network.
本发明实施例中,通过第一设备根据第一设备所连接的无线网络指示接入信息,并在第二设备根据接入信息接入无线网络后,第一设备和第二设备在无线网络中交互,建立第一设备和第二设备的通信连接,提高了控制终端和可移动设备与控制设备之间建立通信的准确性和灵活性。In the embodiment of the present invention, the first device indicates access information according to the wireless network to which the first device is connected, and after the second device accesses the wireless network according to the access information, the first device and the second device are in the wireless network Interaction to establish a communication connection between the first device and the second device, which improves the accuracy and flexibility of establishing communication between the control terminal and the movable device and the control device.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
图5为本发明一实施例提供的通信方法的流程示意图。本实施例主要描述了第一设备的实现方式,如图5所示,本实施例的方法可以包括:FIG. 5 is a schematic flowchart of a communication method provided by an embodiment of the present invention. This embodiment mainly describes the implementation of the first device. As shown in FIG. 5, the method of this embodiment may include:
步骤501,第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络。Step 501: The first device indicates access information to the second device according to the wireless network to which it is connected, and the access information includes at least the login information of the wireless network, so that the second device can according to the access information. Access to the wireless network.
本步骤中,对于所述第一设备向所述第二设备指示所述接入信息的具体类型,本发明可以不作限定。例如,可以通过向所述第二设备显示所述接入信息的方式,向所述第二设备指示所述接入信息。具体地,第一设备设有显示屏,或者第一设备外接有显示屏,通过该显示屏向第二设备指示所述接入信息;当然,第一设备也可以设有包括该接入信息的显示图像,例如该显示图像通过印刷、粘贴等方式直接显示在第一设备的外表面,以向第二设备指示所述接入信息。又例如,可以通过将所述接入信息发送至所述第二设备的方式,向所述第二设备指示所述接入信息。具体地,第一设备可以设有输入装置,用户通过该输入装置输入所述接入信息,第一设备接收用户输入的接入信息后发送至第二设备,以向第二设备指示所述接入信息。In this step, the present invention may not limit the specific type of the access information indicated by the first device to the second device. For example, the access information may be indicated to the second device by displaying the access information to the second device. Specifically, the first device is provided with a display screen, or the first device is connected with a display screen externally, through which the display screen indicates the access information to the second device; of course, the first device may also be provided with a display including the access information The display image, for example, the display image is directly displayed on the outer surface of the first device by printing, pasting, etc., to indicate the access information to the second device. For another example, the access information may be indicated to the second device by sending the access information to the second device. Specifically, the first device may be provided with an input device through which the user inputs the access information. The first device receives the access information input by the user and sends it to the second device to indicate the access information to the second device.入信息。 Entry information.
所述接入信息至少包括所述无线网络的登录信息,所述无线网络的具体内容可以与所述无线网络的类型相关,例如,以所述无线网络为无线局域网为例,所述无线网络的登录信息包括所述无线网络的服务集标识符(Service Set Identifier,SSID)。进一步可选的,所述无线网络的登录信息还包括所述无线网络的密码信息。The access information includes at least login information of the wireless network, and the specific content of the wireless network may be related to the type of the wireless network. For example, taking the wireless network as a wireless local area network as an example, the wireless network The login information includes the service set identifier (SSID) of the wireless network. Further optionally, the login information of the wireless network further includes password information of the wireless network.
所述接入信息中可以包括所述第二设备需要接入所述无线网络的部分或全部信息,进一步可选的,所述接入信息中还可以包括与所述第一设备相关的信息。The access information may include part or all of the information that the second device needs to access the wireless network. Further, optionally, the access information may also include information related to the first device.
可选的,所述第一设备可以在连接至所述无线网络后,主动指示接入信息;或者,所述第一设备可以在连接至所述无线网络并满足第一触发条件时指示接入信息。需要说的是,对于第一触发条件的具体类型,本发明可以不作限定,示例性的,第一触发条件例如可以为用户输入触发、时间触发、位置触发等的一种或多种。Optionally, the first device may actively indicate access information after being connected to the wireless network; or, the first device may indicate access when connected to the wireless network and a first trigger condition is met. information. It needs to be said that the present invention may not limit the specific type of the first trigger condition. Illustratively, the first trigger condition may be one or more of user input trigger, time trigger, location trigger, etc.
可选的,所述第一设备在指示接入信息后,可以在满足第二触发条件停止指示接入信息。需要说的是,对于第二触发条件的具体类型,本发明可以不作限定,示例性的,第二触发条件例如可以为用户输入触发、指示时长触发等的一种或多种。Optionally, after indicating the access information, the first device may stop indicating the access information when the second trigger condition is satisfied. It needs to be said that the present invention may not limit the specific type of the second trigger condition. Illustratively, the second trigger condition may be, for example, one or more of a user input trigger, a duration indicator trigger, and the like.
步骤502,在所述第二设备接入所述无线网络后,所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。Step 502: After the second device accesses the wireless network, the first device receives an interaction request from the second device in the wireless network for establishing the first device and the second device. 2. The communication connection of the device.
本步骤中,可选的,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接的过程中,可以仅有第一设备和第二设备参与;或者,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接的过程中,可以不仅有第一设备和第二设备参与,而且可以有第一设备和/或第二设备的使用者参与;或者,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接的过程中,可以不仅有第一设备和第二设备参与,而且还可以有第一设备和第二设备之外的其他设备的参与。In this step, optionally, the first device interacts with the second device in the wireless network, and only the first device and the second device can participate in the process of establishing a communication connection between the first device and the second device; or, The first device interacts with the second device in the wireless network, and in the process of establishing a communication connection between the first device and the second device, not only the first device and the second device can participate, but also the first device and/or the second device can participate. The user of the second device participates; or, the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device. Not only can the first device and the second device participate, but also There may also be the participation of other devices besides the first device and the second device.
示例性的,在所述无线网络中所述第一设备和所述第二设备的个数均为一个时,所述第一设备可以在所述无线网络中广播自身在所述无线网络中的网络标识,所述第二设备在接收到第一设备的网络标识后,可以在所述无线 网络中向所述第一设备发起连接。Exemplarily, when the number of the first device and the number of the second device in the wireless network is one, the first device may broadcast its own information in the wireless network in the wireless network. A network identifier. After receiving the network identifier of the first device, the second device may initiate a connection to the first device in the wireless network.
示例性的,在所述无线网络中所述第一设备和所述第二设备的个数均为多个时,多个第一设备中各第一设备可以在所述无线网络中广播自身在所述无线网络中的网络标识以及自身的设备标识,多个第二设备中各第二设备可以接收到多个第一设备发送的网络标识和设备标识;进一步的,各第二设备可以将接收到的各第一设备的设备标识显示给用户,由用户选择与其建立通信连接的第一设备,各第二设备可以根据第一设备的网络标识,在无线网络中向用户选择的第一设备发起连接。Exemplarily, when the number of the first device and the number of the second device is multiple in the wireless network, each first device in the multiple first devices may broadcast its presence in the wireless network For the network identification and its own device identification in the wireless network, each second device in the multiple second devices can receive the network identification and device identification sent by the multiple first devices; further, each second device can receive The device identification of each first device is displayed to the user, and the user selects the first device with which to establish a communication connection, and each second device can initiate an initiation to the first device selected by the user in the wireless network according to the network identification of the first device connection.
本实施例中,通过第一设备根据第一设备所连接的无线网络,指示接入信息,接入信息用于第二设备接入无线网络,在第二设备根据接入信息接入无线网络后,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接,实现了第一设备在接入无线网络后指示接入信息,并在第二设备根据接入信息接入无线网络后,通过在无线网络中与第二设备的交互建立第一设备和第二设备的通信连接的通信建立方式,从而提高了控制终端和可移动设备通信建立的准确性和灵活性。In this embodiment, the first device indicates access information according to the wireless network to which the first device is connected. The access information is used by the second device to access the wireless network. After the second device accesses the wireless network according to the access information , The first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device, so that the first device instructs the access information after accessing the wireless network, and the second device according to the access After the information is connected to the wireless network, the communication establishment method of the communication connection between the first device and the second device is established through the interaction with the second device in the wireless network, thereby improving the accuracy and flexibility of the communication establishment between the control terminal and the movable device Sex.
图6为本发明另一实施例提供的通信方法的流程示意图。本实施例主要描述了第二设备的实现方式,如图6所示,本实施例的方法可以包括:FIG. 6 is a schematic flowchart of a communication method provided by another embodiment of the present invention. This embodiment mainly describes the implementation of the second device. As shown in FIG. 6, the method of this embodiment may include:
步骤601,第二设备获得接入信息,所述接入信息是第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备接入所述无线网络。Step 601: The second device obtains access information. The access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least the login information of the wireless network so that The second device accesses the wireless network.
本步骤中,所述第二设备获得接入信息的具体方式与第一设备指示接入信息的具体方式对应。例如,可以通过向所述第二设备显示所述接入信息的方式,向所述第二设备指示所述接入信息。又例如,可以通过将所述接入信息发送至所述第二设备的方式,向所述第二设备指示所述接入信息。In this step, the specific manner in which the second device obtains the access information corresponds to the specific manner in which the first device indicates the access information. For example, the access information may be indicated to the second device by displaying the access information to the second device. For another example, the access information may be indicated to the second device by sending the access information to the second device.
需要说明的是,关于接入信息的具体说明,可以参见图5所示实施例的相关描述,在此不再赘述。It should be noted that for the specific description of the access information, reference may be made to the related description of the embodiment shown in FIG. 5, which will not be repeated here.
所述第二设备可以在连接至所述无线网络后,获取接入信息;或者,所述第二设备可以在连接至所述无线网络并满足第三触发条件时获得接入信息。需要说的是,对于第三触发条件的具体类型,本发明可以不作限定,示例性的,第三触发条件例如可以为用户输入触发、时间触发、位置触发等的一种 或多种。The second device may obtain access information after being connected to the wireless network; or, the second device may obtain the access information when connected to the wireless network and a third trigger condition is satisfied. It needs to be said that the present invention may not limit the specific type of the third trigger condition. Illustratively, the third trigger condition may be one or more of user input trigger, time trigger, position trigger, and the like.
可选的,所述第一设备获得接入信息后,可以在满足第四触发条件时,停止获得接入信息。需要说的是,对于第四触发条件的具体类型,本发明可以不作限定,示例性的,第四触发条件例如可以为用户输入触发。Optionally, after the first device obtains the access information, it may stop obtaining the access information when the fourth trigger condition is satisfied. It needs to be said that the present invention may not limit the specific type of the fourth trigger condition. Illustratively, the fourth trigger condition may be a user input trigger.
需要说明的是,所述第三触发条件与上述第一触发条件的类型可以相同,也可以不同,本发明对比可以不作限定。例如,第一触发条件为时间触发、第二触发条件可以为用户输入触发。It should be noted that the types of the third trigger condition and the first trigger condition may be the same or different, and the comparison of the present invention may not be limited. For example, the first trigger condition is a time trigger, and the second trigger condition can be a user input trigger.
步骤602,所述第二设备根据所述接入信息接入所述无线网络。Step 602: The second device accesses the wireless network according to the access information.
本步骤中,由于所述接入信息可以用于第二设备接入无线网络,因此第二设备可以根据所述接入信息接入所述无线网络。可选的,所述第二设备可以只根据所述接入信息接入所述无线网络,或者,所述第二设备可以根据所述接入信息以及所述接入信息之外的其他信息(例如,用户输入的所述无线网络的密码)接入所述无线网络。In this step, since the access information can be used by the second device to access the wireless network, the second device can access the wireless network according to the access information. Optionally, the second device may only access the wireless network according to the access information, or the second device may access the wireless network according to the access information and other information other than the access information ( For example, the password of the wireless network entered by the user) to access the wireless network.
需要说明的是,对于所述第二设备根据所述接入信息接入所述无线网络的具体方式,本发明可以不作限定。It should be noted that the specific manner in which the second device accesses the wireless network according to the access information may not be limited in the present invention.
步骤603,所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。Step 603: The second device sends an interaction request to the first device in the wireless network to establish a communication connection between the first device and the second device.
本步骤中,类似的,第二设备在无线网络中与第一设备交互,建立第一设备和第二设备的通信连接的过程中,可以仅有第一设备和第二设备参与;或者,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接的过程中,可以不仅有第一设备和第二设备参与,而且可以有第一设备和/或第二设备的使用者参与;或者,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接的过程中,可以不仅有第一设备和第二设备参与,而且还可以有第一设备和第二设备之外的其他设备的参与。In this step, similarly, the second device interacts with the first device in the wireless network, and in the process of establishing a communication connection between the first device and the second device, only the first device and the second device may participate; or A device interacts with a second device in a wireless network, and in the process of establishing a communication connection between the first device and the second device, not only the first device and the second device can participate, but also the first device and/or the second device The user of the device participates; or, the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device. Not only can the first device and the second device participate, but also There may be the participation of devices other than the first device and the second device.
示例性的,在所述无线网络中所述第一设备和所述第二设备的个数均为一个时,所述第二设备可以在所述无线网络中广播自身在所述无线网络中的网络标识,所述第一设备在接收到第二设备的网络标识后,可以在所述无线网络中向所述第二设备发起连接。Exemplarily, when the number of the first device and the number of the second device in the wireless network is one, the second device may broadcast its own information in the wireless network in the wireless network. A network identifier. After receiving the network identifier of the second device, the first device can initiate a connection to the second device in the wireless network.
示例性的,在所述无线网络中所述第一设备和所述第二设备的个数均为多个时,多个第二设备中各第二设备可以在所述无线网络中广播自身在所述 无线网络中的网络标识以及自身的设备标识,多个第一设备中各第一设备可以接收到多个第二设备发送的网络标识和设备标识;进一步的,各第一设备可以将接收到的各第二设备的设备标识显示给用户,由用户选择与其建立通信连接的第二设备,各第一设备可以根据第二设备的网络标识,在无线网络中向用户选择的第二设备发起连接。Exemplarily, when the number of the first device and the number of the second device is multiple in the wireless network, each second device in the multiple second devices may broadcast its presence in the wireless network For the network identification and its own device identification in the wireless network, each of the multiple first devices can receive the network identification and device identification sent by the multiple second devices; further, each first device can receive The device identification of each second device is displayed to the user, and the user selects the second device with which it establishes a communication connection. Each first device can initiate an initiation to the second device selected by the user in the wireless network according to the network identification of the second device. connection.
本实施例中,通过第二设备获得接入信息,第二设备根据接入信息接入无线网络,第二设备在无线网络中与第一设备交互,建立第一设备和第二设备的通信连接,实现了第二设备根据第一设备在接入无线网络指示的接入信息接入无线网络,并通过在无线网络中与第二设备的交互建立第一设备和第二设备的通信连接的通信建立方式,从而提高了控制终端和可移动设备通信建立的准确性和灵活性。In this embodiment, the access information is obtained through the second device. The second device accesses the wireless network according to the access information. The second device interacts with the first device in the wireless network to establish a communication connection between the first device and the second device. , Realizes that the second device accesses the wireless network according to the access information indicated by the first device in accessing the wireless network, and establishes the communication connection between the first device and the second device through interaction with the second device in the wireless network The establishment method improves the accuracy and flexibility of the communication establishment between the control terminal and the mobile device.
图7为本发明又一实施例提供的通信方法的流程示意图。本实施例在上述实施例的基础上,主要描述了第一设备和第二设备的交互过程。如图7所示,本实施例的方法可以包括:FIG. 7 is a schematic flowchart of a communication method provided by another embodiment of the present invention. On the basis of the foregoing embodiments, this embodiment mainly describes the interaction process between the first device and the second device. As shown in FIG. 7, the method of this embodiment may include:
步骤701,所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码。Step 701: The first device generates a barcode carrying the access information according to the wireless network to which the first device is connected.
本步骤中,可选的,所述接入信息可以包括所述第一设备的设备标识。进一步可选的,所述接入信息还可以包括所述无线网络的基本服务集标识BSSID。其中,通过所述接入信息包括所述第一设备的设备标识,使得所述第一设备可以将用于标识所述第一设备的设备标识携带在所述接入信息中。需要说明的是,所述设备标识具体可以为能够向所述第二设备唯一标识第一设备的任意类型的标识,对于所述设备标识的具体类型本发明可以不作限定。In this step, optionally, the access information may include the device identifier of the first device. Further optionally, the access information may also include a basic service set identifier BSSID of the wireless network. Wherein, the access information includes the device identification of the first device, so that the first device can carry the device identification for identifying the first device in the access information. It should be noted that the device identifier may specifically be any type of identifier that can uniquely identify the first device to the second device, and the present invention may not limit the specific type of the device identifier.
示例性的,所述第一设备可以先获得字符串形式的接入信息,并根据字符串形式的接入信息得到所述条码,实现所述条码中携带所述接入信息。Exemplarily, the first device may first obtain the access information in the form of a character string, and obtain the barcode according to the access information in the form of the character string, so that the barcode carries the access information.
示例性的,该条码可以是一维条码,也可以是二维条码,或其他携带有所述接入信息的条码。Exemplarily, the barcode may be a one-dimensional barcode, or a two-dimensional barcode, or other barcodes carrying the access information.
可选的,为了提高接入信息的安全性,步骤701具体可以包括:所述第一设备对所述接入信息进行加密,获得加密后的所述接入信息;所述第一设备根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码。Optionally, in order to improve the security of the access information, step 701 may specifically include: the first device encrypts the access information to obtain the encrypted access information; the first device encrypts The subsequent access information generates a barcode carrying the encrypted access information.
示例性的,所述第一设备可以先获得字符串形式的接入信息,并对字符 串形式的接入信息进行加密,获得加密后的字符串形式的接入信息,进一步的可以根据加密后的字符串形式的接入信息得到所述条码,实现所述条码中携带所述接入信息。Exemplarily, the first device may first obtain the access information in the form of a character string, and encrypt the access information in the form of the character string to obtain the encrypted access information in the form of a character string. The access information in the form of a character string is obtained by obtaining the barcode, so that the access information is carried in the barcode.
需要说明的是,对于第一设备对接入信息进行加密的具体方式,本发明可以不作限定。例如,第一设备可以使用预先设置的秘钥对接入信息进行加密,得到加密后的所述接入信息。It should be noted that the present invention may not limit the specific manner in which the first device encrypts the access information. For example, the first device may use a preset secret key to encrypt access information to obtain the encrypted access information.
步骤702,所述第一设备显示所述条码。Step 702: The first device displays the barcode.
本步骤中,对于所述第一设备显示所述条码的具体方式,本发明可以不作限定。例如,可以通过所述第一设备的显示屏下显示所述条码,或者,所述第一设备可以将所述条码发送至能够提供显示功能的显示设备,并由该显示设备显示所述条码。In this step, the present invention may not limit the specific manner in which the first device displays the barcode. For example, the barcode may be displayed under the display screen of the first device, or the first device may send the barcode to a display device capable of providing a display function, and the display device displays the barcode.
步骤703,所述第二设备通过摄像头扫描所述条码。Step 703: The second device scans the barcode through a camera.
本步骤中,可选的,所述第二设备可以通过所述第二设备的摄像头扫描所述条码,或者,所述第二设备可以通过与所述第二设备连接且包括摄像头的扫描设备扫描所述条码。In this step, optionally, the second device may scan the barcode through a camera of the second device, or the second device may scan through a scanning device connected to the second device and including a camera. The barcode.
需要说明的是,对于所述第二设备通过摄像头扫描所述条码的具体实现方式,本发明可以不作限定。It should be noted that the present invention may not limit the specific implementation manner in which the second device scans the barcode through the camera.
步骤704,所述第二设备根据扫描得到的所述条码,获得所述接入信息。Step 704: The second device obtains the access information according to the scanned barcode.
本步骤中,示例性的,所述第二设备可以根据所述条码得到字符串形式的所述接入信息。In this step, illustratively, the second device may obtain the access information in the form of a character string according to the barcode.
可选的,与步骤702对应,步骤704具体可以包括:所述第二设备根据所述条码,获得加密后的所述接入信息;所述第二设备根据加密后的接入信息,获得所述接入信息。Optionally, corresponding to step 702, step 704 may specifically include: the second device obtains the encrypted access information according to the barcode; the second device obtains the encrypted access information according to the encrypted access information;述Access information.
示例性的,所述第一设备可以先根据所述条码得到加密后的字符串形式的所述接入信息,进一步的可以对加密后的字符串形式的所述接入信息进行解密,得到解密后的字符串形式的所述接入信息。Exemplarily, the first device may first obtain the access information in the form of an encrypted character string according to the barcode, and further may decrypt the access information in the form of the encrypted character string to obtain the decryption The access information in the form of a character string.
需要说明的是,对于第二设备对接入信息进行解密的具体方式,与第一设备对接入信息进行加密的具体方式对应。例如,第二设备可以使用预先设置的秘钥(例如,可以与第一设备使用的预先设置的秘钥相同)对接入信息进行解密,得到解码后的所述接入信息。It should be noted that the specific way for the second device to decrypt the access information corresponds to the specific way for the first device to encrypt the access information. For example, the second device may use a preset secret key (for example, it may be the same as the preset secret key used by the first device) to decrypt the access information to obtain the decoded access information.
步骤705,所述第二设备根据所述接入信息接入所述无线网络。Step 705: The second device accesses the wireless network according to the access information.
需要说明的是,步骤705与步骤602类似,在此不再赘述。It should be noted that step 705 is similar to step 602 and will not be repeated here.
步骤706,所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。Step 706: The first device interacts with the second device in the wireless network, and establishes a communication connection between the first device and the second device.
可以理解的是,步骤706与所述第二设备在所述无线网络中与所述第一设备交互,建立所述第一设备和所述第二设备的通信连接所表示的含义相同,均为在所述无线网络中,所述第一设备和所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。It is understandable that step 706 has the same meaning as that of the second device interacting with the first device in the wireless network to establish a communication connection between the first device and the second device, and both are In the wireless network, the first device and the second device interact to establish a communication connection between the first device and the second device.
示例性的,步骤706具体可以包括图8所示的步骤801至步骤803。Exemplarily, step 706 may specifically include step 801 to step 803 shown in FIG. 8.
步骤801,所述第二设备在所述无线网络中发送第一广播信息。Step 801: The second device sends first broadcast information in the wireless network.
其中,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接。Wherein, the first broadcast information includes the network identification of the second device in the wireless network; the first broadcast information is used by the first device to initiate to the second device in the wireless network connection.
需要说明的是,对于所述第二设备在所述无线网络中发送第一广播信息的所基于的协议,本发明可以不作限定。示例性的,第二设备可以基于用户数据报协议(User Datagram Protocol,UDP)发送第一广播信息。It should be noted that the present invention may not limit the protocol on which the second device sends the first broadcast information in the wireless network. Exemplarily, the second device may send the first broadcast information based on the User Datagram Protocol (UDP).
可选的,所述第二设备可以按照一定规律在所述无线网络中发送广播信息,例如可以以预设时长为周期,周期性在所述无线网络中发送广播信息。这里,该广播信息可以包括所述第一广播信息或者下述第二广播信息。Optionally, the second device may send broadcast information in the wireless network according to a certain rule, for example, may periodically send broadcast information in the wireless network with a preset duration as a period. Here, the broadcast information may include the first broadcast information or the second broadcast information described below.
步骤802,所述第一设备在所述无线网络中接收所述第一广播信息。Step 802: The first device receives the first broadcast information in the wireless network.
其中,所述第一设备在所述无线网络中接收所述第一广播信息的具体方式与所述第二设备在所述无线网络中发送第一广播信息的具体方式对应。示例性的,第二设备可以基于UDP接收第一广播信息。Wherein, the specific manner in which the first device receives the first broadcast information in the wireless network corresponds to the specific manner in which the second device sends the first broadcast information in the wireless network. Exemplarily, the second device may receive the first broadcast information based on UDP.
步骤803,所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所述第二设备的通信连接。Step 803: The first device initiates a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and The communication connection of the second device.
其中,对于第一设备的网络标识和所述第二设备的网络标识具体可以为能够在所述无线网络中唯一标识设备的任意类型的标识。示例性的,所述网络标识可以为互联网协议(Internet Protocol,IP)地址。The network identification of the first device and the network identification of the second device may specifically be any type of identification that can uniquely identify the device in the wireless network. Exemplarily, the network identification may be an Internet Protocol (IP) address.
需要说明的是,对于所述第一设备根据第一设备和第二设备的网络标识, 在所述无线网络中向所述第二设备发起连接的所基于的协议,本发明可以不作限定。示例性的,所述第一设备根据第一设备和第二设备的网络标识并基于传输控制协议(Transmission Control Protocol,TCP),在所述无线网络中向所述第二设备发起TCP连接。It should be noted that the present invention may not limit the protocol on which the first device initiates a connection to the second device in the wireless network according to the network identifiers of the first device and the second device. Exemplarily, the first device initiates a TCP connection to the second device in the wireless network according to the network identifiers of the first device and the second device and based on a Transmission Control Protocol (TCP).
可选的,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识。Optionally, the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection.
相应的,步骤803具体可以包括:Correspondingly, step 803 may specifically include:
所述第一设备确定所述第一目标设备的设备标识与所述第一设备的设备标识是否相同;Determining, by the first device, whether the device identifier of the first target device is the same as the device identifier of the first device;
若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the device ID of the first target device is the same as the device ID of the first device, the first device will use the network ID of the first device and the network ID of the second device in the wireless Initiating a connection to the second device in the network.
这里,在所述第一目标设备的设备标识与所述第一设备的设备标识相同时,可以理解为所述第二设备期望通信连接的设备为所述第一设备。在所述第一目标设备的设备标识与所述第一设备的设备标识不相同时,可以理解为所述第二设备期望建立通信连接的设备不为所述第一设备。Here, when the device identifier of the first target device is the same as the device identifier of the first device, it can be understood that the device that the second device expects to communicate with is the first device. When the device identifier of the first target device is different from the device identifier of the first device, it can be understood that the device with which the second device expects to establish a communication connection is not the first device.
在所述第一目标设备的设备标识与所述第一设备的设备标识不相同时,可以结束。或者,为了实现一对一连接,步骤803还可以包括:When the device identifier of the first target device is different from the device identifier of the first device, the process may end. Or, in order to achieve a one-to-one connection, step 803 may further include:
若所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则所述第一设备确定所述第一设备是否已与所述第二设备建立通信连接;If the device identifier of the first target device is different from the device identifier of the first device, the first device determines whether the first device has established a communication connection with the second device;
若所述第一设备已与所述第二设备建立通信连接,则所述第一设备断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, the first device disconnects the communication connection with the second device.
可选的,在一个第一设备的接入信息中包括该第一设备的设备标识,且第二设备获得该接入信息时,该第二设备可以根据该接入信息获得该第二设备期望建立通信连接的第一目标设备的设备标识为该第一设备的接入信息。例如,如图3A至图3C所示,第一设备a1的接入信息中可以包括第一设备a1的设备标识,第二设备b1在获得第一设备a1的接入信息中可以包括第一设备a1的设备标识,此时,第一设备a1可以理解为第二设备b1期望建立通信连接的设备。可以看出,通过一个第一设备的接入信息中包括该第一设备的设备标识,使得第二设备可以通过该第一设备的接入信息得到第二设备期 待建立通信连接的设备。Optionally, the access information of a first device includes the device identification of the first device, and when the second device obtains the access information, the second device may obtain the second device expectation according to the access information. The device identifier of the first target device that establishes the communication connection is the access information of the first device. For example, as shown in FIGS. 3A to 3C, the access information of the first device a1 may include the device identification of the first device a1, and the second device b1 may include the first device in obtaining the access information of the first device a1. The device identifier of a1. At this time, the first device a1 can be understood as the device that the second device b1 expects to establish a communication connection. It can be seen that the access information of a first device includes the device identification of the first device, so that the second device can obtain the device that the second device expects to establish a communication connection through the access information of the first device.
这里,通过所述接入信息中包括所述第一设备的设备标识,可以提高所述第二设备确定所述第二设备期望建立通信连接的第一目标设备的设备标识的便利性。Here, by including the device identifier of the first device in the access information, the convenience of the second device in determining the device identifier of the first target device that the second device desires to establish a communication connection can be improved.
可替换的,所述第二设备可以通过用户输入确定所述第二设备期望建立通信连接的第一目标设备的设备标识。Alternatively, the second device may determine the device identification of the first target device that the second device expects to establish a communication connection through user input.
可选的,为了减小重新建立第一设备和第二设备建立通信连接的耗时,所述第一广播信息还包括:所述第二设备的设备标识。Optionally, in order to reduce the time consumption for re-establishing the communication connection between the first device and the second device, the first broadcast information further includes: the device identifier of the second device.
相应的,所述建立所述第一设备和所述第二设备的通信连接之后,还可以包括如下步骤A至步骤D。Correspondingly, after establishing the communication connection between the first device and the second device, the following steps A to D may be further included.
步骤A,所述第二设备在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识。Step A: The second device sends second broadcast information in the wireless network. The second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the second device Device ID.
这里,所述第二广播信息中包括的第二目标设备的设备标识可以与所述第一广播信息中包括的第一目标设备的设备标识可以相同,也可以不同。Here, the device identifier of the second target device included in the second broadcast information may be the same as or different from the device identifier of the first target device included in the first broadcast information.
需要说明的是,这里第二设备发送第二广播信息的具体方式,与所述第二设备发送第一广播信息的具体方式类似,在此不再赘述。It should be noted that the specific manner in which the second device sends the second broadcast information here is similar to the specific manner in which the second device sends the first broadcast information, and will not be repeated here.
步骤B,在所述第一设备重新与所述无线网络连接之后,所述第一设备接收所述第二广播信息。Step B: After the first device is reconnected to the wireless network, the first device receives the second broadcast information.
其中,所述第一设备重新与所述无线网络连接具体可以包括:在所述第一设备与所述第二设备在所述无线网络中建立通信连接的基础上,所述第一设备断开与所述无线网络的连接,之后,所述第一设备又重新连接所述无线网络。需要说明的是,在所述第一设备与所述第二设备在所述无线网络中建立通信连接的基础上,所述第一设备断开与所述无线网络的连接,则所述第一设备与所述第二设备之间的通信连接必然断开。Wherein, reconnecting the first device to the wireless network may specifically include: disconnecting the first device on the basis of establishing a communication connection between the first device and the second device in the wireless network After connecting to the wireless network, the first device reconnects to the wireless network. It should be noted that after the first device and the second device establish a communication connection in the wireless network, and the first device disconnects from the wireless network, then the first device The communication connection between the device and the second device must be disconnected.
需要说明的是,这里第一设备接收第二广播信息的具体方式,与所述第一设备接收第一广播信息的具体方式类似,在此不再赘述。It should be noted that the specific manner in which the first device receives the second broadcast information here is similar to the specific manner in which the first device receives the first broadcast information, and will not be repeated here.
步骤C,所述第一设备确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同。Step C: The first device determines whether the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device establishes a communication connection with the first device by default Whether the device IDs of the devices are the same.
这里,在所述第二目标设备的设备标识与所述第一设备的设备标识相同时,可以理解为所述第二设备期望通信连接的设备为所述第一设备。在所述第二目标设备的设备标识与所述第一设备的设备标识不相同时,可以理解为所述第二设备期望建立通信连接的设备不为所述第一设备。Here, when the device identifier of the second target device is the same as the device identifier of the first device, it can be understood that the device to which the second device expects to be connected in communication is the first device. When the device identifier of the second target device is different from the device identifier of the first device, it can be understood that the device with which the second device expects to establish a communication connection is not the first device.
在所述的第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,可以表示所述第一设备期望建立连接的设备为所述第二设备。在所述的第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识不相同,可以表示所述第一设备期望建立连接的设备不为所述第二设备。The device identifier of the second device is the same as the device identifier of the device that establishes a communication connection preset by the first device, which may indicate that the device to which the first device expects to establish a connection is the second device. When the device identifier of the second device is different from the device identifier of the device preset to establish a communication connection by the first device, it may indicate that the device to which the first device expects to establish a connection is not the second device.
步骤D,若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。Step D, if the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the device with which the first device presets the communication connection , The first device initiates a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device.
需要说明的是,对于确定所述第一设备预设建立通信连接的设备的设备标识的具体方式,本发明可以不作限定。示例性的,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。It should be noted that the present invention may not limit the specific manner for determining the device identifier of the device preset to establish a communication connection by the first device. Exemplarily, the first device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
通过第二设备在无线网络中发送第二广播信息,第一设备在断开与无线网络的连接之后接收第二广播信息,并在第二广播信息中第二目标设备的设备标识与第一设备的设备标识相同,且第二广播信息中第二设备的设备标识与第一设备预设建立通信连接的设备的设备标识相同时,根据第一设备的网络标识以及第二设备的网络标识,在无线网络中向第二设备发起连接,实现了在由于第一设备与无线网络断开而导致第一设备和第二设备的通信连接断开后,第一设备在重新与无线网络连接后,可以直接根据第二设备广播的信息,重新建立第一设备和第二设备通信连接,从而减小了重新建立第一设备和第二设备建立通信连接的耗时,提高了用户体验。The second broadcast information is sent through the second device in the wireless network. The first device receives the second broadcast information after disconnecting from the wireless network, and the device identification of the second target device and the first device in the second broadcast information When the device ID of the second device in the second broadcast information is the same as the device ID of the device preset to establish a communication connection by the first device, according to the network ID of the first device and the network ID of the second device, Initiating a connection to the second device in the wireless network realizes that after the communication connection between the first device and the second device is disconnected due to the disconnection of the first device from the wireless network, the first device can connect to the wireless network again. The communication connection between the first device and the second device is re-established directly according to the information broadcast by the second device, thereby reducing the time consumption for re-establishing the communication connection between the first device and the second device and improving user experience.
需要说明的是,对于导致第一设备断开与无线网络连接的具体原因,本发明可以不作限定。例如,可以由于第一设备关机导致第一设备断开与无线网络的连接。It should be noted that the present invention may not limit the specific reasons that cause the first device to disconnect from the wireless network. For example, the first device may be disconnected from the wireless network due to shutdown of the first device.
可选的,为了提高建立通信的灵活性,所述第一广播信息还包括:所述 第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力。Optionally, in order to improve the flexibility of establishing communication, the first broadcast information further includes: preemption information of the second device, and the preemption information is used to instruct the second device to preempt outside the second device The ability of other devices to establish communication connections.
相应的,所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:Correspondingly, the first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
所述第一设备已与所述第二设备之外的其他设备建立通信连接;The first device has established a communication connection with another device other than the second device;
根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力是否被使能;Determine, according to the preemption information, whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则所述第一设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the first device disconnects the communication connection with the other device, and according to the first device The network identification of a device and the network identification of the second device initiate a connection to the second device in the wireless network.
这里,所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,可以理解为所述第二设备能够抢占所述第二设备之外的其他设备已建立的通信连接。所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力未被使能(或者可以称为被禁止),可以理解为所述第二设备不能够抢占所述第二设备之外的其他设备已建立的通信连接。Here, the ability of the second device to preempt communication connections established by other devices other than the second device is enabled, which can be understood as the second device being able to preempt other devices other than the second device has Established communication connection. If the ability of the second device to preempt the communication connection established by other devices other than the second device is not enabled (or may be referred to as disabled), it can be understood that the second device cannot preempt the first device. 2. A communication connection established by a device other than the device.
或者,示例性的,步骤706具体可以包括图9所示的步骤901至步骤903。Or, as an example, step 706 may specifically include step 901 to step 903 shown in FIG. 9.
步骤901,所述第一设备在所述无线网络中发送第三广播信息。Step 901: The first device sends third broadcast information in the wireless network.
其中,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接。Wherein, the third broadcast information includes the network identification of the first device in the wireless network; the third broadcast information is used by the second device to initiate to the first device in the wireless network connection.
需要说明的是,对于所述第一设备在所述无线网络中发送第三广播信息的所基于的协议,本发明可以不作限定。示例性的,第一设备可以基于UDP发送第三广播信息。It should be noted that the present invention may not limit the protocol on which the first device sends the third broadcast information in the wireless network. Exemplarily, the first device may send the third broadcast information based on UDP.
可选的,所述第一设备可以按照一定规律在所述无线网络中发送广播信息,例如可以以预设时长为周期,周期性在所述无线网络中发送广播信息。这里,该广播信息可以包括所述第三广播信息或者下述第四广播信息。Optionally, the first device may send broadcast information in the wireless network according to a certain rule, for example, may periodically send broadcast information in the wireless network with a preset duration as a period. Here, the broadcast information may include the third broadcast information or the following fourth broadcast information.
步骤902,所述第二设备在所述无线网络中接收所述第三广播信息。Step 902: The second device receives the third broadcast information in the wireless network.
其中,所述第二设备在所述无线网络中接收所述第三广播信息的具体方式与所述第一设备在所述无线网络中发送第三广播信息的具体方式对应。示 例性的,第二设备可以基于UDP接收第三广播信息。The specific manner in which the second device receives the third broadcast information in the wireless network corresponds to the specific manner in which the first device sends the third broadcast information in the wireless network. Illustratively, the second device may receive the third broadcast information based on UDP.
步骤903,所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。Step 903: The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and The communication connection of the second device.
需要说明的是,对于所述第二设备根据第一设备和第二设备的网络标识,在所述无线网络中向所述第一设备发起连接的所基于的协议,本发明可以不作限定。示例性的,所述第二设备根据第一设备和第二设备的网络标识并基于TCP,在所述无线网络中向所述第一设备发起TCP连接。It should be noted that the present invention may not limit the protocol on which the second device initiates a connection to the first device in the wireless network according to the network identifiers of the first device and the second device. Exemplarily, the second device initiates a TCP connection to the first device in the wireless network according to the network identifiers of the first device and the second device and based on TCP.
可选的,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识。Optionally, the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection.
相应的,步骤903具体可以包括:Correspondingly, step 903 may specifically include:
所述第二设备确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同;The second device determines whether the device identifier of the third target device is the same as the device identifier of the second device;
若所述第三目标设备的设备标识与所述第二设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the device ID of the third target device is the same as the device ID of the second device, the second device will use the network ID of the first device and the network ID of the second device in the wireless Initiating a connection to the first device in the network.
这里,在所述第三目标设备的设备标识与所述第二设备的设备标识相同时,可以理解为所述第一设备期望通信连接的设备为所述第二设备。在所述第三目标设备的设备标识与所述第二设备的设备标识不相同时,可以理解为所述第一设备期望建立通信连接的设备不为所述第二设备。Here, when the device identifier of the third target device is the same as the device identifier of the second device, it can be understood that the device that the first device expects to communicate with is the second device. When the device ID of the third target device is different from the device ID of the second device, it can be understood that the device with which the first device expects to establish a communication connection is not the second device.
在所述第三目标设备的设备标识与所述第二设备的设备标识不相同时,可以结束。或者,为了实现一对一连接,步骤903还可以包括:When the device identifier of the third target device is different from the device identifier of the second device, the process may end. Or, in order to realize a one-to-one connection, step 903 may further include:
若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则所述第二设备确定所述第二设备是否已与所述第一设备建立通信连接;If the device identifier of the third target device is not the same as the device identifier of the second device, the second device determines whether the second device has established a communication connection with the first device;
若所述第二设备已与所述第一设备建立通信连接,则所述第二设备断开与所述第一设备的通信连接。If the second device has established a communication connection with the first device, the second device disconnects the communication connection with the first device.
需要说明的是,对于所述第一设备确定所述第三目标设备的设备标识的具体方式,本发明可以不作限定。示例性的,所述第一设备可以通过用户输入确定所述第一设备期望建立通信连接的第三目标设备的设备标识。It should be noted that the specific manner in which the first device determines the device identifier of the third target device may not be limited in the present invention. Exemplarily, the first device may determine the device identification of the third target device that the first device expects to establish a communication connection through user input.
可选的,为了减小重新建立第一设备和第二设备建立通信连接的耗时, 所述第三广播信息还包括:所述第一设备的设备标识。Optionally, in order to reduce the time consumption for re-establishing the communication connection between the first device and the second device, the third broadcast information further includes: the device identifier of the first device.
相应的,所述建立所述第一设备和所述第二设备的通信连接之后,还可以包括如下步骤E至步骤H。Correspondingly, after establishing the communication connection between the first device and the second device, the following steps E to H may be further included.
步骤E,所述第一设备在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识。Step E: The first device sends fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the first device Device ID.
这里,所述第四广播信息中包括的第四目标设备的设备标识可以与所述第三广播信息中包括的第三目标设备的设备标识可以相同,也可以不同。Here, the device identifier of the fourth target device included in the fourth broadcast information may be the same as or different from the device identifier of the third target device included in the third broadcast information.
需要说明的是,这里第一设备发送第四广播信息的具体方式,与所述第一设备发送第三广播信息的具体方式类似,在此不再赘述。It should be noted that the specific manner in which the first device sends the fourth broadcast information here is similar to the specific manner in which the first device sends the third broadcast information, and will not be repeated here.
步骤F,在所述第二设备重新与所述无线网络连接之后,所述第二设备接收所述第四广播信息。Step F: After the second device is reconnected to the wireless network, the second device receives the fourth broadcast information.
其中,所述第二设备重新与所述无线网络连接具体可以包括:在所述第一设备与所述第二设备在所述无线网络中建立通信连接的基础上,所述第二设备断开与所述无线网络的连接,之后,所述第二设备又重新连接所述无线网络。需要说明的是,在所述第一设备与所述第二设备在所述无线网络中建立通信连接的基础上,所述第二设备断开与所述无线网络的连接,则所述第一设备与所述第二设备之间的通信连接必然断开。Wherein, reconnecting the second device to the wireless network may specifically include: disconnecting the second device based on the establishment of a communication connection between the first device and the second device in the wireless network After connecting to the wireless network, the second device reconnects to the wireless network. It should be noted that, based on the establishment of a communication connection between the first device and the second device in the wireless network, and the second device disconnects from the wireless network, then the first device The communication connection between the device and the second device must be disconnected.
需要说明的是,这里第二设备接收第四广播信息的具体方式,与所述第二设备接收第三广播信息的具体方式类似,在此不再赘述。It should be noted that the specific manner in which the second device receives the fourth broadcast information here is similar to the specific manner in which the second device receives the third broadcast information, and will not be repeated here.
步骤G,所述第二设备确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同。Step G: The second device determines whether the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is preset to establish a communication connection with the second device Whether the device IDs of the devices are the same.
这里,在所述第四目标设备的设备标识与所述第二设备的设备标识相同时,可以理解为所述第一设备期望通信连接的设备为所述第二设备。在所述第四目标设备的设备标识与所述第二设备的设备标识不相同时,可以理解为所述第一设备期望建立通信连接的设备不为所述第二设备。Here, when the device identifier of the fourth target device is the same as the device identifier of the second device, it can be understood that the device that the first device expects to communicate with is the second device. When the device identifier of the fourth target device is different from the device identifier of the second device, it can be understood that the device with which the first device expects to establish a communication connection is not the second device.
在所述的第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,可以表示所述第二设备期望建立连接的设备为所述第一设备。在所述的第一设备的设备标识与所述第二设备预设建立通信连接的设备 的设备标识不相同,可以表示所述第二设备期望建立连接的设备不为所述第一设备。When the device identifier of the first device is the same as the device identifier of the device that establishes a communication connection preset by the second device, it may indicate that the device that the second device expects to establish a connection is the first device. When the device identifier of the first device is different from the device identifier of the device that establishes a communication connection preset by the second device, it may indicate that the device to which the second device expects to establish a connection is not the first device.
步骤H,若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。Step H, if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device , The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device.
需要说明的是,对于确定所述第二设备预设建立通信连接的设备的设备标识的具体方式,本发明可以不作限定。示例性的,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。It should be noted that the present invention may not limit the specific manner for determining the device identifier of the device preset to establish a communication connection by the second device. Exemplarily, the second device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
通过第一设备在无线网络中发送第四广播信息,第二设备在断开与无线网络的连接之后接收第四广播信息,并在第四广播信息中第四目标设备的设备标识与第二设备的设备标识相同,且第四广播信息中第一设备的设备标识与第二设备预设建立通信连接的设备的设备标识相同时,根据第一设备的网络标识以及第二设备的网络标识,在无线网络中向第一设备发起连接,实现了在由于第二设备与无线网络断开而导致第一设备和第二设备的通信连接断开后,第二设备在重新与无线网络连接后,可以直接根据第一设备广播的信息,重新建立第一设备和第二设备通信连接,从而减小了重新建立第一设备和第二设备建立通信连接的耗时,提高了用户体验。The fourth broadcast information is sent through the first device in the wireless network, and the second device receives the fourth broadcast information after disconnecting from the wireless network. In the fourth broadcast information, the device identification of the fourth target device and the second device When the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device in the fourth broadcast information, according to the network ID of the first device and the network ID of the second device, Initiating a connection to the first device in the wireless network realizes that after the communication connection between the first device and the second device is disconnected due to the disconnection of the second device from the wireless network, the second device can connect to the wireless network again. The communication connection between the first device and the second device is re-established directly according to the information broadcast by the first device, thereby reducing the time consumption for re-establishing the communication connection between the first device and the second device and improving user experience.
需要说明的是,对于导致第二设备断开与无线网络连接的具体原因,本发明可以不作限定。例如,可以由于第二设备关机导致第二设备断开与无线网络的连接。It should be noted that the present invention may not limit the specific reasons that cause the second device to disconnect from the wireless network. For example, the second device may be disconnected from the wireless network due to the shutdown of the second device.
可选的,为了提高建立通信的灵活性,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力。Optionally, in order to improve the flexibility of establishing communication, the third broadcast information further includes: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communication connections established by other devices Ability.
相应的,所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:Correspondingly, the second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
所述第二设备确定已与所述第一设备之外的其他设备建立通信连接;Determining that the second device has established a communication connection with another device other than the first device;
根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则所述第二设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the second device disconnects the communication connection with the other device, and according to the first device The network identifier of a device and the network identifier of the second device initiate a connection to the first device in the wireless network.
这里,所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,可以理解为所述第一设备能够抢占所述第一设备之外的其他设备已建立的通信连接。所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力未被使能(或者可以称为被禁止),可以理解为所述第一设备不能够抢占所述第一设备之外的其他设备已建立的通信连接。Here, the ability of the first device to preempt the communication connection established by other devices other than the first device is enabled. It can be understood that the first device can preempt other devices other than the first device. Established communication connection. If the ability of the first device to preempt the communication connection established by other devices other than the first device is not enabled (or can be called prohibited), it can be understood that the first device cannot preempt the first device. A communication connection established by a device other than one device.
可选的,在上述实施例中,当所述接入信息包括所述无线网络的BSSID时,所述第二设备根据所述接入信息接入所述无线网络之前,还包括:Optionally, in the foregoing embodiment, when the access information includes the BSSID of the wireless network, before the second device accesses the wireless network according to the access information, the method further includes:
所述第二设备确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同;Determining, by the second device, whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located;
若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则所述第二设备退出所述当前所处网络。If the BSSID of the wireless network included in the access information is not the same as the BSSID of the network where the second device is currently located, the second device exits the network where it is currently located.
其中,在所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同时,可以表示所述第二设备当前所处网络不是所述第二设备期望接入的网络。因此,第二设备可以退出所述当前所处网络。Wherein, when the BSSID of the wireless network included in the access information is different from the BSSID of the network where the second device is currently located, it may indicate that the network where the second device is currently located is not the second device Desired access network. Therefore, the second device can exit the current network.
进一步可选的,在所述第二设备退出所述当前所处网络之后,所述第二设备进一步的可以根据所述接入信息接入所述无线网络。Further optionally, after the second device exits the current network, the second device may further access the wireless network according to the access information.
在所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID相同时,可以表示所述第二设备当前所处网络是所述第二设备期望接入的网络。此时,所述第二设备可以不再执行根据所述接入信息接入所述无线网络的步骤。When the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located, it may indicate that the network where the second device is currently located is that the second device expects to access network of. At this time, the second device may no longer perform the step of accessing the wireless network according to the access information.
这里,通过在所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID相同时,所述第二设备可以不再执行根据所述接入信息接入所述无线网络的步骤,可以避免所述第二设备先退出所述无线网络再接入所述无线网络所带来的耗时,从而提高了第二设备接入所述无线网络的速度。Here, when the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located, the second device may no longer perform access based on the access information. The steps of the wireless network can avoid the time consumption caused by the second device first exiting the wireless network and then accessing the wireless network, thereby increasing the speed of the second device accessing the wireless network.
进一步可选的,当第一设备在无线网络中建立和第二设备的通信连接后, 所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被禁止,此时所述第一设备不再与无线网络中的设备进行交互以建立通信连接。Further optionally, after the first device establishes a communication connection with the second device in the wireless network, the ability of the first device to preempt the communication connection established by other devices other than the first device is prohibited. At that time, the first device no longer interacts with devices in the wireless network to establish a communication connection.
本实施例中,通过第一设备根据第一设备所连接的无线网络生成携带接入信息的条码并显示条码,第二设备通过摄像头扫描条码,根据扫描得到的条码获得接入信息并根据接入信息接入无线网络,第一设备在无线网络中与第二设备交互,建立第一设备和第二设备的通信连接,实现了第二设备根据第一设备显示的条码接入无线网络的实现方式,提高了第二设备接入无线网络的准确性、灵活性以及便利性。In this embodiment, the first device generates a barcode carrying access information according to the wireless network to which the first device is connected and displays the barcode, and the second device scans the barcode through the camera, obtains the access information according to the scanned barcode and then When the information is connected to the wireless network, the first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device, which realizes the implementation of the second device accessing the wireless network according to the barcode displayed by the first device , Improve the accuracy, flexibility and convenience of the second device to access the wireless network.
图10为本发明一实施例提供通信装置的结构示意图。如上所述,所述控制终端和所述可移动设备中的一个作为所述第一设备,另一个作为第二设备。本实施例提供的装置1000可以应用于第一设备,通过软件、硬件或者软硬结合的方式,成为第一设备的部分或全部。如图10所示,该装置可以包括:处理器1001和通信接口1002;FIG. 10 is a schematic structural diagram of a communication device provided by an embodiment of the present invention. As described above, one of the control terminal and the movable device serves as the first device, and the other serves as the second device. The apparatus 1000 provided in this embodiment may be applied to a first device, and becomes part or all of the first device through software, hardware, or a combination of software and hardware. As shown in FIG. 10, the apparatus may include: a processor 1001 and a communication interface 1002;
所述处理器1001,用于根据所述第一设备所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;The processor 1001 is configured to indicate access information to the second device according to the wireless network to which the first device is connected, where the access information includes at least login information of the wireless network, so that the 2. The device accesses the wireless network according to the access information;
所述处理器1001,还用于在所述第二设备根据所述接入信息接入所述无线网络后,通过所述通信接口1002在所述无线网络中向所述第二设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。The processor 1001 is further configured to send an interaction request to the second device in the wireless network through the communication interface 1002 after the second device accesses the wireless network according to the access information , Used to establish a communication connection between the first device and the second device.
在一种可能的实现中,所述处理器1001用于根据所述第一设备所连接的无线网络,指示接入信息,具体包括:In a possible implementation, the processor 1001 is configured to indicate access information according to the wireless network to which the first device is connected, which specifically includes:
根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码;Generating a barcode carrying the access information according to the wireless network to which the first device is connected;
显示所述条码。Display the barcode.
在一种可能的实现中,所述处理器1001用于根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码,具体包括:In a possible implementation, the processor 1001 is configured to generate a barcode carrying the access information according to the wireless network to which the first device is connected, which specifically includes:
对所述接入信息进行加密,获得加密后的所述接入信息;Encrypting the access information to obtain the encrypted access information;
根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码。According to the encrypted access information, a barcode carrying the encrypted access information is generated.
在一种可能的实现中,所述接入信息包括:所述第一设备的设备标识。In a possible implementation, the access information includes: the device identifier of the first device.
在一种可能的实现中,所述接入信息还包括所述无线网络的基本服务集标识BSSID。In a possible implementation, the access information further includes a basic service set identifier BSSID of the wireless network.
在一种可能的实现中,所述处理器1001用于通过所述通信接口1002在所述无线网络中向所述第二设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:In a possible implementation, the processor 1001 is configured to send an interaction request to the second device in the wireless network through the communication interface 1002, and is used to establish the first device and the second device. The communication connection of the device includes:
在所述无线网络中通过所述通信接口1002接收第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;Receiving first broadcast information through the communication interface 1002 in the wireless network, where the first broadcast information includes the network identifier of the second device in the wireless network;
根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所述第二设备的通信连接。According to the network identification of the first device and the network identification of the second device, initiate a connection to the second device in the wireless network to establish a communication connection between the first device and the second device .
在一种可能的实现中,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识;In a possible implementation, the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection;
所述处理器1001用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,具体包括:The processor 1001 is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
确定所述第一目标设备的设备标识与所述第一设备的设备标识是否相同;Determining whether the device identifier of the first target device is the same as the device identifier of the first device;
若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the device identity of the first target device is the same as the device identity of the first device, then according to the network identity of the first device and the network identity of the second device, report to the wireless network The second device initiates a connection.
在一种可能的实现中,所述处理器1001还用于:In a possible implementation, the processor 1001 is further configured to:
若所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则确定所述第一设备是否已与所述第二设备建立通信连接;If the device identifier of the first target device is not the same as the device identifier of the first device, determining whether the first device has established a communication connection with the second device;
若所述第一设备已与所述第二设备建立通信连接,则断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, disconnect the communication connection with the second device.
在一种可能的实现中,所述第一广播信息还包括:所述第二设备的设备标识;In a possible implementation, the first broadcast information further includes: the device identifier of the second device;
所述处理器1001用于通过所述通信接口1002在所述无线网络中接收所述第二设备的交互请求,用于所述第一设备和所述第二设备的通信连接之后,还用于:The processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is used for the communication connection between the first device and the second device, and is also used for :
在所述第一设备重新与所述无线网络的连接之后,通过所述通信接口1002接收第二广播信息;所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识;After the first device reconnects to the wireless network, the second broadcast information is received through the communication interface 1002; the second broadcast information includes the information of the second target device that the second device expects to establish a communication connection Device identification and the device identification of the second device;
确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同, 且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同;Determining whether the device identity of the second target device is the same as the device identity of the first device, and whether the device identity of the second device is the same as the device identity of the device preset to establish a communication connection by the first device;
若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the device preset to establish a communication connection by the first device, then The network identification of the first device and the network identification of the second device initiate a connection to the second device in the wireless network.
在一种可能的实现中,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。In a possible implementation, the first device presets the device identifier of the device that establishes the communication connection as: a preset device identifier or the device identifier of the device that establishes a communication connection last time.
在一种可能的实现中,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力;In a possible implementation, the first broadcast information further includes: preemption information of the second device, and the preemption information is used to indicate that the second device has preempted other devices other than the second device. The ability to establish a communication connection;
所述处理器1001用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,具体包括:The processor 1001 is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
所述处理器1001已与所述第二设备之外的其他设备建立通信连接;The processor 1001 has established a communication connection with another device other than the second device;
根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力是否被使能;Determine, according to the preemption information, whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the second device in the wireless network.
在一种可能的实现中,所述网络标识为互联网协议地址(IP地址)。In a possible implementation, the network identifier is an Internet Protocol address (IP address).
在一种可能的实现中,所述处理器1001用于通过所述通信接口1002在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:In a possible implementation, the processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is configured to establish the first device and the second device. The communication connection of the device includes:
在所述无线网络中发送第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接。Send third broadcast information in the wireless network. The third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used by the second device in the wireless network. Initiating a connection to the first device in the wireless network.
在一种可能的实现中,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识。In a possible implementation, the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection.
在一种可能的实现中,所述第三广播信息还包括:所述第一设备的设备 标识;In a possible implementation, the third broadcast information further includes: the device identifier of the first device;
所述处理器1001用于通过所述通信接口1002在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:The processor 1001 is configured to receive an interaction request of the second device in the wireless network through the communication interface 1002, and is configured to further use after establishing a communication connection between the first device and the second device in:
在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识。Send fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the device identifier of the first device.
在一种可能的实现中,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力。In a possible implementation, the third broadcast information further includes: preemption information of the first device, and the preemption information is used to indicate the ability of the first device to preempt communication connections established by other devices.
在一种可能的实现中,所述网络标识为互联网协议地址(IP地址)。In a possible implementation, the network identifier is an Internet Protocol address (IP address).
在一种可能的实现中,所述控制终端包括:遥控器和/或手机;和/或,所述可移动设备包括:智能小车、智能机器人或无人飞行器。In a possible implementation, the control terminal includes: a remote controller and/or a mobile phone; and/or, the movable device includes: an intelligent car, an intelligent robot, or an unmanned aerial vehicle.
本实施例提供的装置,可以用于执行图5-图9所示实施例在第一设备侧的技术方案,其实现原理和技术效果类似,此处不再赘述。The device provided in this embodiment can be used to implement the technical solutions on the first device side of the embodiment shown in FIG. 5 to FIG. 9, and its implementation principles and technical effects are similar, and will not be repeated here.
图11为本发明另一实施例提供的通信装置的结构示意图。如上所述,所述控制终端和所述可移动设备中的一个作为第一设备,另一个作为所述第二设备。本实施例提供的装置1100可以应用于第二设备,通过软件、硬件或者软硬结合的方式,成为第一设备的部分或全部。如图11所示,该装置可以包括:处理器1101和通信接口1102;FIG. 11 is a schematic structural diagram of a communication device provided by another embodiment of the present invention. As described above, one of the control terminal and the movable device serves as the first device, and the other serves as the second device. The apparatus 1100 provided in this embodiment may be applied to a second device, and becomes part or all of the first device through software, hardware, or a combination of software and hardware. As shown in FIG. 11, the apparatus may include: a processor 1101 and a communication interface 1102;
所述处理器1101,用于获得接入信息,所述接入信息是第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备接入所述无线网络;The processor 1101 is configured to obtain access information, where the access information is an indication of the wireless network to which the first device is connected by the first device, and the access information includes at least login information of the wireless network, So that the second device can access the wireless network;
所述处理器1101,还用于根据所述接入信息接入所述无线网络;The processor 1101 is further configured to access the wireless network according to the access information;
所述处理器1101,还用于通过所述通信接口1102在所述无线网络中接收所述第一设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。The processor 1101 is further configured to receive an interaction request of the first device in the wireless network through the communication interface 1102, and is configured to establish a communication connection between the first device and the second device.
在一种可能的实现中,所述处理器1101用于获得接入信息,具体包括:In a possible implementation, the processor 1101 is configured to obtain access information, which specifically includes:
通过摄像头扫描所述第一设备显示的条码,所述条码携带所述接入信息;Scanning the barcode displayed by the first device through a camera, the barcode carrying the access information;
根据扫描得到的所述条码,获得所述接入信息。According to the barcode obtained by scanning, the access information is obtained.
在一种可能的实现中,所述条码携带加密后的所述接入信息;In a possible implementation, the barcode carries the encrypted access information;
所述处理器1101用于根据扫描得到的所述条码,获得所述接入信息,具体包括:The processor 1101 is configured to obtain the access information according to the scanned barcode, which specifically includes:
根据所述条码,获得加密后的所述接入信息;Obtaining the encrypted access information according to the barcode;
根据加密后的接入信息,获得所述接入信息。Obtain the access information according to the encrypted access information.
在一种可能的实现中,所述接入信息包括:所述第一设备的设备标识。In a possible implementation, the access information includes: the device identifier of the first device.
在一种可能的实现中,所述接入信息包括所述无线网络的基本服务集标识BSSID;In a possible implementation, the access information includes a basic service set identifier BSSID of the wireless network;
所述处理器1101用于根据所述接入信息接入所述无线网络之前,还用于:The processor 1101 is configured to before accessing the wireless network according to the access information, and is further configured to:
确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同;Determining whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located;
若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则退出所述当前所处网络。If the BSSID of the wireless network included in the access information is not the same as the BSSID of the network where the second device is currently located, exit the current network.
在一种可能的实现中,所述处理器1101用于退出所述当前所处网络之后,还用于根据所述接入信息接入所述无线网络。In a possible implementation, the processor 1101 is configured to log out of the current network, and is further configured to access the wireless network according to the access information.
在一种可能的实现中,所述处理器1101用于通过所述通信接口1102在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:In a possible implementation, the processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, for establishing the first device and the second device. The communication connection of the device includes:
在所述无线网络中通过所述通信接口1102发送第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接。In the wireless network, first broadcast information is sent through the communication interface 1102. The first broadcast information includes the network identifier of the second device in the wireless network; the first broadcast information is used for the The first device initiates a connection to the second device in the wireless network.
在一种可能的实现中,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识。In a possible implementation, the first broadcast information further includes: the device identifier of the first target device that the second device expects to establish a communication connection.
在一种可能的实现中,所述第一广播信息还包括:所述第二设备的设备标识;In a possible implementation, the first broadcast information further includes: the device identifier of the second device;
所述处理器1101用于在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:The processor 1101 is configured to send an interaction request to the first device in the wireless network, and is configured to: after establishing a communication connection between the first device and the second device:
在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识。Sending second broadcast information in the wireless network, where the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device.
在一种可能的实现中,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力。In a possible implementation, the first broadcast information further includes: preemption information of the second device, and the preemption information is used to indicate that the second device has preempted other devices other than the second device. The ability to establish a communication connection.
在一种可能的实现中,所述网络标识为互联网协议地址(IP地址)。In a possible implementation, the network identifier is an Internet Protocol address (IP address).
在一种可能的实现中,所述处理器1101用于通过所述通信接口1102在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:In a possible implementation, the processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, for establishing the first device and the second device. The communication connection of the device includes:
在所述无线网络中通过所述通信接口1102接收第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;Receiving third broadcast information through the communication interface 1102 in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network;
根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。According to the network identification of the first device and the network identification of the second device, initiate a connection to the first device in the wireless network to establish a communication connection between the first device and the second device .
在一种可能的实现中,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识;In a possible implementation, the third broadcast information further includes: the device identifier of the third target device that the first device expects to establish a communication connection;
所述处理器1101用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,具体包括:The processor 1101 is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同;Determine whether the device identifier of the third target device is the same as the device identifier of the second device;
若所述第三目标设备的设备标识与所述第二设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the device identity of the third target device is the same as the device identity of the second device, then according to the network identity of the first device and the network identity of the second device, report to the wireless network The first device initiates a connection.
在一种可能的实现中,所述处理器1101还用于:In a possible implementation, the processor 1101 is further configured to:
若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则确定所述第二设备是否已与所述第一设备建立通信连接;If the device identifier of the third target device is not the same as the device identifier of the second device, determining whether the second device has established a communication connection with the first device;
若所述第二设备已与所述第一设备建立通信连接,则断开与所述第一设备的通信连接。If the second device has established a communication connection with the first device, disconnect the communication connection with the first device.
在一种可能的实现中,所述第三广播信息还包括:所述第一设备的设备标识;In a possible implementation, the third broadcast information further includes: the device identifier of the first device;
所述处理器1101用于通过所述通信接口1102在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:The processor 1101 is configured to send an interaction request to the first device in the wireless network through the communication interface 1102, and is configured to use the communication interface 1102 to establish a communication connection between the first device and the second device. in:
在所述第二设备重新与所述无线网络连接之后,通过所述通信接口1102接收第四广播信息;所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识;After the second device reconnects to the wireless network, the fourth broadcast information is received via the communication interface 1102; the fourth broadcast information includes the device of the fourth target device that the first device expects to establish a communication connection Identification and the device identification of the first device;
确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同;Determining whether the device identity of the fourth target device is the same as the device identity of the second device, and whether the device identity of the first device is the same as the device identity of the device with which the second device presets a communication connection;
若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is the same as the device ID of the device preset to establish a communication connection by the second device, then The network identification of the first device and the network identification of the second device initiate a connection to the first device in the wireless network.
在一种可能的实现中,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。In a possible implementation, the second device presets the device identifier of the device that establishes the communication connection as: a preset device identifier or the device identifier of the device that establishes a communication connection last time.
在一种可能的实现中,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力;In a possible implementation, the third broadcast information further includes: preemption information of the first device, where the preemption information is used to indicate the ability of the first device to preempt communication connections established by other devices;
所述处理器1101用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,具体包括:The processor 1101 is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
确定已与所述第一设备之外的其他设备建立通信连接;Determining that a communication connection has been established with a device other than the first device;
根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the first device in the wireless network.
在一种可能的实现中,所述网络标识为互联网协议地址(IP地址)。In a possible implementation, the network identifier is an Internet Protocol address (IP address).
在一种可能的实现中,所述控制终端包括:遥控器和/或手机,和/或,所述可移动设备包括:智能小车、智能机器人或无人飞行器。In a possible implementation, the control terminal includes: a remote controller and/or a mobile phone, and/or, the movable device includes: a smart car, a smart robot, or an unmanned aerial vehicle.
本实施例提供的装置,可以用于执行图5-图9所示实施例在第二设备侧的技术方案,其实现原理和技术效果类似,此处不再赘述。The device provided in this embodiment can be used to implement the technical solutions on the second device side of the embodiments shown in FIGS. 5-9. The implementation principles and technical effects are similar, and will not be repeated here.
本发明实施例还提供一种通信系统包括第一设备和第二设备。其中,所 述第一设备包括如图10所示的的通信装置,所述第二设备包括如图11所示的通信装置。An embodiment of the present invention also provides a communication system including a first device and a second device. Wherein, the first device includes the communication device as shown in FIG. 10, and the second device includes the communication device as shown in FIG. 11.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行上述方法实施例中第一设备侧的方法。The embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control the computer to execute The method on the first device side in the above method embodiment.
本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行上述方法实施例中第二设备侧的方法。The embodiment of the present invention also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, the at least one piece of code can be executed by a computer to control the computer to execute The method on the second device side in the above method embodiment.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person of ordinary skill in the art can understand that all or part of the steps in the foregoing method embodiments can be implemented by a program instructing relevant hardware. The aforementioned program can be stored in a computer readable storage medium. When the program is executed, the steps including the foregoing method embodiments are executed; and the foregoing storage medium includes: ROM, RAM, magnetic disk, or optical disk and other media that can store program codes.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: It is still possible to modify the technical solutions described in the foregoing embodiments, or equivalently replace some or all of the technical features; these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention range.

Claims (138)

  1. 一种通信方法,应用于第一设备,其特征在于,所述方法包括:A communication method applied to a first device, characterized in that the method includes:
    控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;One of the control terminal and the movable device serves as the first device, and the other serves as the second device. The first device indicates access information to the second device according to the wireless network to which it is connected. The access information Include at least login information of the wireless network, so that the second device can access the wireless network according to the access information;
    在所述第二设备接入所述无线网络后,所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。After the second device accesses the wireless network, the first device receives an interaction request from the second device in the wireless network, and is used to establish a connection between the first device and the second device Communication connection.
  2. 根据权利要求1所述的方法,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,指示接入信息,包括:The method according to claim 1, wherein the first device instructs access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码;Generating, by the first device, a barcode carrying the access information according to the wireless network to which the first device is connected;
    所述第一设备显示所述条码。The first device displays the barcode.
  3. 根据权利要求2所述的方法,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码,包括:The method according to claim 2, wherein the first device generates the barcode carrying the access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备对所述接入信息进行加密,获得加密后的所述接入信息;Encrypting the access information by the first device to obtain the encrypted access information;
    所述第一设备根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码。The first device generates a barcode carrying the encrypted access information according to the encrypted access information.
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述接入信息还包括所述第一设备的设备标识。The method according to any one of claims 1-3, wherein the access information further includes a device identifier of the first device.
  5. 根据权利要求4所述的方法,其特征在于,所述接入信息还包括所述无线网络的基本服务集标识BSSID。The method according to claim 4, wherein the access information further includes a basic service set identifier (BSSID) of the wireless network.
  6. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 1-3, wherein the first device receives an interaction request from the second device in the wireless network, and is used to establish the first device and the The communication connection of the second device includes:
    所述第一设备在所述无线网络中接收第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;Receiving, by the first device, first broadcast information in the wireless network, where the first broadcast information includes a network identifier of the second device in the wireless network;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所 述第二设备的通信连接。The first device initiates a connection to the second device in the wireless network according to the network identity of the first device and the network identity of the second device to establish the first device and the second device. 2. The communication connection of the device.
  7. 根据权利要求6所述的方法,其特征在于,所述接入信息还包括所述第一设备的设备标识,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识;The method according to claim 6, wherein the access information further includes the device identifier of the first device, and the first broadcast information further includes: the first device that the second device expects to establish a communication connection. Device ID of the target device;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备确定所述第一目标设备的设备标识与所述第一设备的设备标识是否相同。The first device determines whether the device identifier of the first target device is the same as the device identifier of the first device.
  8. 根据权利要求7所述的方法,其特征在于,若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。8. The method according to claim 7, wherein if the device identifier of the first target device is the same as the device identifier of the first device, the first device is based on the network identifier of the first device and The network identifier of the second device initiates a connection to the second device in the wireless network.
  9. 根据权利要求7或8所述的方法,其特征在于,所述方法还包括:The method according to claim 7 or 8, wherein the method further comprises:
    若所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则所述第一设备确定所述第一设备是否已与所述第二设备建立通信连接;If the device identifier of the first target device is different from the device identifier of the first device, the first device determines whether the first device has established a communication connection with the second device;
    若所述第一设备已与所述第二设备建立通信连接,则所述第一设备断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, the first device disconnects the communication connection with the second device.
  10. 根据权利要求9所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The method according to claim 9, wherein the first broadcast information further comprises: a device identifier of the second device;
    所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还包括:After the first device receives the interaction request of the second device in the wireless network, and is used to establish a communication connection between the first device and the second device, the method further includes:
    在所述第一设备重新与所述无线网络的连接之后,所述第一设备接收第二广播信息;所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识;After the first device reconnects to the wireless network, the first device receives second broadcast information; the second broadcast information includes the device of the second target device that the second device expects to establish a communication connection Identification and the device identification of the second device;
    所述第一设备确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同。The first device determines whether the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is preset with the device ID of the first device to establish a communication connection. Whether the device IDs are the same.
  11. 根据权利要求10所述的方法,其特征在于,若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则所述第一设备根据 所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The method according to claim 10, wherein if the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the first device. Assuming that the device IDs of the devices that establish a communication connection are the same, the first device initiates a connection to the second device in the wireless network according to the network ID of the first device and the network ID of the second device .
  12. 根据权利要求10所述的方法,其特征在于,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The method according to claim 10, wherein the device identifier of the device that establishes the communication connection preset by the first device is: a preset device identifier or the device identifier of the device that established the communication connection last time.
  13. 根据权利要求6所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力;The method according to claim 6, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability of communication connections established by other equipment outside;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备已与所述第二设备之外的其他设备建立通信连接;The first device has established a communication connection with another device other than the second device;
    根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力是否被使能;Determine, according to the preemption information, whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
    若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则所述第一设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the first device disconnects the communication connection with the other device, and according to the first device The network identification of a device and the network identification of the second device initiate a connection to the second device in the wireless network.
  14. 根据权利要求6所述的方法,其特征在于,所述网络标识为互联网协议地址。The method according to claim 6, wherein the network identifier is an Internet Protocol address.
  15. 根据权利要求1-3任一项所述的方法,其特征在于,所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 1-3, wherein the first device receives an interaction request from the second device in the wireless network, and is used to establish the first device and the The communication connection of the second device includes:
    所述第一设备在所述无线网络中发送第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接。The first device sends third broadcast information in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used for the first device The second device initiates a connection to the first device in the wireless network.
  16. 根据权利要求15所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识。The method according to claim 15, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection.
  17. 根据权利要求16所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The method according to claim 16, wherein the third broadcast information further comprises: a device identifier of the first device;
    所述第一设备在所述无线网络中接收所述第二设备的交互请求,用于建 立所述第一设备和所述第二设备的通信连接之后,还包括:After the first device receives the interaction request of the second device in the wireless network for establishing a communication connection between the first device and the second device, the method further includes:
    所述第一设备在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识。The first device sends fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the device identifier of the first device .
  18. 根据权利要求15所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力。The method according to claim 15, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communications established by other devices The ability to connect.
  19. 根据权利要求15所述的方法,其特征在于,所述网络标识为互联网协议地址。The method according to claim 15, wherein the network identifier is an Internet Protocol address.
  20. 根据权利要求1-3任一项所述的方法,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The method according to any one of claims 1-3, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  21. 一种通信方法,应用于第二设备,其特征在于,所述方法包括:A communication method applied to a second device, characterized in that the method includes:
    控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第二设备获得接入信息,所述接入信息是所述第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备接入所述无线网络;One of the control terminal and the movable device is used as the first device, and the other is used as the second device. The second device obtains access information, and the access information is that the first device is connected to the first device according to The wireless network indication of the access information includes at least login information of the wireless network, so that the second device can access the wireless network;
    所述第二设备根据所述接入信息接入所述无线网络;The second device accesses the wireless network according to the access information;
    所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。The second device sends an interaction request to the first device in the wireless network to establish a communication connection between the first device and the second device.
  22. 根据权利要求21所述的方法,其特征在于,所述第二设备获得接入信息,包括:The method according to claim 21, wherein the obtaining of the access information by the second device comprises:
    所述第二设备通过摄像头扫描所述第一设备显示的条码,所述条码携带所述接入信息;The second device scans the barcode displayed by the first device through a camera, and the barcode carries the access information;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息。The second device obtains the access information according to the barcode obtained by scanning.
  23. 根据权利要求22所述的方法,其特征在于,所述条码携带加密后的所述接入信息;The method according to claim 22, wherein the barcode carries the encrypted access information;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息,包括:The second device obtaining the access information according to the scanned barcode includes:
    所述第二设备根据所述条码,获得加密后的所述接入信息;Obtaining, by the second device, the encrypted access information according to the barcode;
    所述第二设备根据加密后的所述接入信息,获得所述接入信息。The second device obtains the access information according to the encrypted access information.
  24. 根据权利要求21-23任一项所述的方法,其特征在于,所述接入信息还包括所述第一设备的设备标识。The method according to any one of claims 21-23, wherein the access information further includes a device identifier of the first device.
  25. 根据权利要求24所述的方法,其特征在于,所述接入信息包括所述无线网络的基本服务集标识BSSID;The method according to claim 24, wherein the access information includes a basic service set identifier (BSSID) of the wireless network;
    所述第二设备根据所述接入信息接入所述无线网络之前,还包括:Before the second device accesses the wireless network according to the access information, the method further includes:
    所述第二设备确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同。The second device determines whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located.
  26. 根据权利要求25所述的方法,其特征在于,若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则所述第二设备退出所述当前所处网络。The method according to claim 25, wherein if the BSSID of the wireless network included in the access information is different from the BSSID of the network where the second device is currently located, the second device exits The current network.
  27. 根据权利要求26所述的方法,其特征在于,所述第二设备退出所述当前所处网络之后,根据所述接入信息接入所述无线网络。The method according to claim 26, wherein after the second device exits the current network, it accesses the wireless network according to the access information.
  28. 根据权利要求21-23任一项所述的方法,其特征在于,所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 21-23, wherein the second device sends an interaction request to the first device in the wireless network for establishing the first device and the The communication connection of the second device includes:
    所述第二设备在所述无线网络中发送第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接。The second device sends first broadcast information in the wireless network. The first broadcast information includes the network identifier of the second device in the wireless network; the first broadcast information is used for the first broadcast information. A device initiates a connection to the second device in the wireless network.
  29. 根据权利要求28所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识。The method according to claim 28, wherein the first broadcast information further comprises: a device identifier of the first target device that the second device expects to establish a communication connection.
  30. 根据权利要求29所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The method according to claim 29, wherein the first broadcast information further comprises: a device identifier of the second device;
    所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还包括:After the second device sends an interaction request to the first device in the wireless network for establishing a communication connection between the first device and the second device, the method further includes:
    所述第二设备在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识。The second device sends second broadcast information in the wireless network, where the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device .
  31. 根据权利要求28所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力。The method according to claim 28, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability to establish a communication connection with other devices.
  32. 根据权利要求28所述的方法,其特征在于,所述网络标识为互联网协议地址。The method of claim 28, wherein the network identifier is an Internet Protocol address.
  33. 根据权利要求21-23任一项所述的方法,其特征在于,所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 21-23, wherein the second device sends an interaction request to the first device in the wireless network for establishing the first device and the The communication connection of the second device includes:
    所述第二设备在所述无线网络中接收第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;Receiving, by the second device, third broadcast information in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and the second device. 2. The communication connection of the device.
  34. 根据权利要求33所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识;The method according to claim 33, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同。The second device determines whether the device identifier of the third target device is the same as the device identifier of the second device.
  35. 根据权利要求34所述的方法,其特征在于,若所述第三目标设备的设备标识与所述第二设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The method according to claim 34, wherein if the device identification of the third target device is the same as the device identification of the second device, the second device is based on the network identification of the first device and The network identifier of the second device initiates a connection to the first device in the wireless network.
  36. 根据权利要求34或35所述的方法,其特征在于,所述方法还包括:The method according to claim 34 or 35, wherein the method further comprises:
    若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则所述第二设备确定所述第二设备是否已与所述第一设备建立通信连接;If the device identifier of the third target device is not the same as the device identifier of the second device, the second device determines whether the second device has established a communication connection with the first device;
    若所述第二设备已与所述第一设备建立通信连接,则所述第二设备断开与所述第一设备的通信连接。If the second device has established a communication connection with the first device, the second device disconnects the communication connection with the first device.
  37. 根据权利要求36所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The method according to claim 36, wherein the third broadcast information further comprises: a device identifier of the first device;
    所述第二设备在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还包括:After the second device sends an interaction request to the first device in the wireless network for establishing a communication connection between the first device and the second device, the method further includes:
    在所述第二设备重新与所述无线网络连接之后,所述第二设备接收第四 广播信息;所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识;After the second device reconnects to the wireless network, the second device receives fourth broadcast information; the fourth broadcast information includes the device identification of the fourth target device that the first device expects to establish a communication connection And the device identification of the first device;
    所述第二设备确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同。The second device determines whether the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device presets the device ID of the device that establishes a communication connection with the second device. Whether the device IDs are the same.
  38. 根据权利要求37所述的方法,其特征在于,若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The method according to claim 37, wherein if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is preset to the second device Assuming that the device IDs of the devices that establish a communication connection are the same, the second device initiates a connection to the first device in the wireless network according to the network ID of the first device and the network ID of the second device .
  39. 根据权利要求38所述的方法,其特征在于,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The method according to claim 38, wherein the device identifier of the device that establishes the communication connection preset by the second device is: a preset device identifier or the device identifier of the device that established the communication connection last time.
  40. 根据权利要求33所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力;The method according to claim 33, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communications established by other devices Ability to connect
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定已与所述第一设备之外的其他设备建立通信连接;Determining that the second device has established a communication connection with another device other than the first device;
    根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
    若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则所述第二设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the second device disconnects the communication connection with the other device, and according to the first device The network identifier of a device and the network identifier of the second device initiate a connection to the first device in the wireless network.
  41. 根据权利要求33所述的方法,其特征在于,所述网络标识为互联网协议地址。The method according to claim 33, wherein the network identifier is an Internet Protocol address.
  42. 根据权利要求21-23任一项所述的方法,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The method according to any one of claims 21-23, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  43. 一种通信方法,其特征在于,所述方法包括:A communication method, characterized in that the method includes:
    控制终端和可移动设备中的一个作为第一设备,另一个作为第二设备,所述第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;One of the control terminal and the movable device serves as the first device, and the other serves as the second device. The first device indicates access information to the second device according to the wireless network to which it is connected. The access information Include at least login information of the wireless network, so that the second device can access the wireless network according to the access information;
    所述第二设备获得所述接入信息,并根据所述接入信息接入所述无线网络;The second device obtains the access information, and accesses the wireless network according to the access information;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。The first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device.
  44. 根据权利要求43所述的方法,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,指示接入信息,包括:The method according to claim 43, wherein the first device instructs access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码;Generating, by the first device, a barcode carrying the access information according to the wireless network to which the first device is connected;
    所述第一设备显示所述条码;Displaying the barcode on the first device;
    所述第二设备获得所述接入信息,包括:The obtaining of the access information by the second device includes:
    所述第二设备通过摄像头扫描所述第一设备显示的所述条码;Scanning the barcode displayed by the first device by the second device through a camera;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息。The second device obtains the access information according to the barcode obtained by scanning.
  45. 根据权利要求44所述的方法,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码,包括:The method according to claim 44, wherein the first device generates the barcode carrying the access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备对所述接入信息进行加密,获得加密后的所述接入信息;Encrypting the access information by the first device to obtain the encrypted access information;
    所述第一设备根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码;Generating, by the first device, a barcode carrying the encrypted access information according to the encrypted access information;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息,包括:The second device obtaining the access information according to the scanned barcode includes:
    所述第二设备根据所述条码,获得加密后的所述接入信息;Obtaining, by the second device, the encrypted access information according to the barcode;
    所述第二设备根据加密后的所述接入信息,获得所述接入信息。The second device obtains the access information according to the encrypted access information.
  46. 根据权利要求43-45任一项所述的方法,其特征在于,所述接入信息还包括所述第一设备的设备标识。The method according to any one of claims 43-45, wherein the access information further includes a device identifier of the first device.
  47. 根据权利要求46所述的方法,其特征在于,所述接入信息包括所述无线网络的基本服务集标识BSSID;The method according to claim 46, wherein the access information includes a basic service set identifier (BSSID) of the wireless network;
    所述第二设备根据所述接入信息接入所述无线网络之前,还包括:Before the second device accesses the wireless network according to the access information, the method further includes:
    所述第二设备确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同。The second device determines whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located.
  48. 根据权利要求47所述的方法,其特征在于,若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则所述第二设备退出所述当前所处网络。The method according to claim 47, wherein if the BSSID of the wireless network included in the access information is different from the BSSID of the network where the second device is currently located, the second device exits The current network.
  49. 根据权利要求48所述的方法,其特征在于,所述第二设备退出所述当前所处网络之后,根据所述接入信息接入所述无线网络。The method according to claim 48, wherein after the second device exits the current network, it accesses the wireless network according to the access information.
  50. 根据权利要求43-45任一项所述的方法,其特征在于,所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 43-45, wherein the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device Communication connections include:
    所述第二设备在所述无线网络中发送第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接;The second device sends first broadcast information in the wireless network. The first broadcast information includes the network identifier of the second device in the wireless network; the first broadcast information is used for the first broadcast information. A device initiates a connection to the second device in the wireless network;
    所述第一设备在所述无线网络中接收所述第一广播信息;Receiving, by the first device, the first broadcast information in the wireless network;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所述第二设备的通信连接。The first device initiates a connection to the second device in the wireless network according to the network identity of the first device and the network identity of the second device to establish the first device and the second device. 2. The communication connection of the device.
  51. 根据权利要求50所述的方法,其特征在于,所述接入信息还包括所述第一设备的设备标识,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识;The method according to claim 50, wherein the access information further includes the device identifier of the first device, and the first broadcast information further includes: the first device that the second device desires to establish a communication connection. Device ID of the target device;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备确定所述第一目标设备的设备标识与所述第一设备的设备标识是否相同。The first device determines whether the device identifier of the first target device is the same as the device identifier of the first device.
  52. 根据权利要求51所述的方法,其特征在于,若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The method according to claim 51, wherein if the device identification of the first target device is the same as the device identification of the first device, the first device is based on the network identification of the first device and The network identifier of the second device initiates a connection to the second device in the wireless network.
  53. 根据权利要求51或52所述的方法,其特征在于,所述方法还包括:The method according to claim 51 or 52, wherein the method further comprises:
    若所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则 所述第一设备确定所述第一设备是否已与所述第二设备建立通信连接;If the device identifier of the first target device is not the same as the device identifier of the first device, the first device determines whether the first device has established a communication connection with the second device;
    若所述第一设备已与所述第二设备建立通信连接,则所述第一设备断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, the first device disconnects the communication connection with the second device.
  54. 根据权利要求53所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The method according to claim 53, wherein the first broadcast information further comprises: a device identifier of the second device;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接之后,还包括:After the first device interacts with the second device in the wireless network and establishes a communication connection between the first device and the second device, the method further includes:
    所述第二设备在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识;The second device sends second broadcast information in the wireless network, where the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device ;
    在所述第一设备重新与所述无线网络的连接之后,所述第一设备接收所述第二广播信息;After the first device reconnects to the wireless network, the first device receives the second broadcast information;
    所述第一设备确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同。The first device determines whether the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is preset with the device ID of the first device to establish a communication connection. Whether the device IDs are the same.
  55. 根据权利要求54所述的方法,其特征在于,若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The method of claim 54, wherein if the device identifier of the second target device is the same as the device identifier of the first device, and the device identifier of the second device is the same as the device identifier of the first device. Assuming that the device IDs of the devices that establish a communication connection are the same, the first device initiates a connection to the second device in the wireless network according to the network ID of the first device and the network ID of the second device .
  56. 根据权利要求54所述的方法,其特征在于,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The method according to claim 54, wherein the device identifier of the device that establishes the communication connection preset by the first device is: a preset device identifier or the device identifier of the device that established the communication connection last time.
  57. 根据权利要求50所述的方法,其特征在于,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力;The method according to claim 50, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability of communication connections established by other equipment outside;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备已与所述第二设备之外的其他设备建立通信连接;The first device has established a communication connection with another device other than the second device;
    根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设 备已建立的通信连接的能力是否被使能;According to the preemption information, determine whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
    若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则所述第一设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the first device disconnects the communication connection with the other device, and according to the first device The network identification of a device and the network identification of the second device initiate a connection to the second device in the wireless network.
  58. 根据权利要求50所述的方法,其特征在于,所述网络标识为互联网协议地址。The method of claim 50, wherein the network identifier is an Internet Protocol address.
  59. 根据权利要求43-45任一项所述的方法,其特征在于,所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接包括:The method according to any one of claims 43-45, wherein the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device Communication connections include:
    所述第一设备在所述无线网络中发送第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接;The first device sends third broadcast information in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used for the first device The second device initiates a connection to the first device in the wireless network;
    所述第二设备在所述无线网络中接收所述第三广播信息;Receiving, by the second device, the third broadcast information in the wireless network;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and the second device. 2. The communication connection of the device.
  60. 根据权利要求59所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识;The method according to claim 59, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同。The second device determines whether the device identifier of the third target device is the same as the device identifier of the second device.
  61. 根据权利要求60所述的方法,其特征在于,若所述第三目标设备的设备标识与所述第二设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The method according to claim 60, wherein if the device identification of the third target device is the same as the device identification of the second device, the second device is based on the network identification of the first device and The network identifier of the second device initiates a connection to the first device in the wireless network.
  62. 根据权利要求60或61所述的方法,其特征在于,所述方法还包括:The method according to claim 60 or 61, wherein the method further comprises:
    若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则所述第二设备确定所述第二设备是否已与所述第一设备建立通信连接;If the device identifier of the third target device is not the same as the device identifier of the second device, the second device determines whether the second device has established a communication connection with the first device;
    若所述第二设备已与所述第一设备建立通信连接,则所述第二设备断开与所述第一设备的通信连接。If the second device has established a communication connection with the first device, the second device disconnects the communication connection with the first device.
  63. 根据权利要求62所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The method according to claim 62, wherein the third broadcast information further comprises: a device identifier of the first device;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接之后,还包括:After the first device interacts with the second device in the wireless network and establishes a communication connection between the first device and the second device, the method further includes:
    所述第一设备在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识;The first device sends fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the device identifier of the first device ;
    在所述第二设备重新与所述无线网络连接之后,所述第二设备接收所述第四广播信息;After the second device is reconnected to the wireless network, the second device receives the fourth broadcast information;
    所述第二设备确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同。The second device determines whether the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device presets the device ID of the device that establishes a communication connection with the second device. Whether the device IDs are the same.
  64. 根据权利要求63所述的方法,其特征在于,若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The method according to claim 63, wherein if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is pre-configured with the second device Assuming that the device IDs of the devices that establish a communication connection are the same, the second device initiates a connection to the first device in the wireless network according to the network ID of the first device and the network ID of the second device .
  65. 根据权利要求63所述的方法,其特征在于,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The method according to claim 63, wherein the second device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
  66. 根据权利要求59所述的方法,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力;The method according to claim 59, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communications established by other devices Ability to connect
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定已与所述第一设备之外的其他设备建立通信连接;Determining that the second device has established a communication connection with another device other than the first device;
    根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
    若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则所述第二设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the second device disconnects the communication connection with the other device, and according to the first device The network identifier of a device and the network identifier of the second device initiate a connection to the first device in the wireless network.
  67. 根据权利要求59所述的方法,其特征在于,所述网络标识为互联网协议地址。The method of claim 59, wherein the network identifier is an Internet Protocol address.
  68. 根据权利要求43-45任一项所述的方法,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The method according to any one of claims 43-45, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  69. 一种通信装置,应用于第一设备,其特征在于,包括:处理器和通信接口,控制终端和可移动设备中的一个作为所述第一设备,另一个作为第二设备;A communication device applied to a first device, characterized by comprising: a processor and a communication interface, one of a control terminal and a movable device as the first device, and the other as the second device;
    所述处理器,用于根据所述第一设备所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入信息接入所述无线网络;The processor is configured to indicate access information to the second device according to the wireless network to which the first device is connected, where the access information includes at least login information of the wireless network so that the second device The device accesses the wireless network according to the access information;
    所述处理器,还用于在所述第二设备接入所述无线网络后,通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接。The processor is further configured to receive an interaction request of the second device in the wireless network through the communication interface after the second device accesses the wireless network, and is configured to establish the first A communication connection between the device and the second device.
  70. 根据权利要求69所述的装置,其特征在于,所述处理器用于根据所述第一设备所连接的无线网络,指示接入信息,具体包括:The apparatus according to claim 69, wherein the processor is configured to indicate access information according to the wireless network to which the first device is connected, and specifically comprises:
    根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码;Generating a barcode carrying the access information according to the wireless network to which the first device is connected;
    显示所述条码。Display the barcode.
  71. 根据权利要求70所述的装置,其特征在于,所述处理器用于根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码,具体包括:The apparatus according to claim 70, wherein the processor is configured to generate a barcode carrying the access information according to the wireless network to which the first device is connected, and specifically comprises:
    对所述接入信息进行加密,获得加密后的所述接入信息;Encrypting the access information to obtain the encrypted access information;
    根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码。According to the encrypted access information, a barcode carrying the encrypted access information is generated.
  72. 根据权利要求69-71任一项所述的装置,其特征在于,所述接入信息还包括所述第一设备的设备标识。The apparatus according to any one of claims 69-71, wherein the access information further includes a device identifier of the first device.
  73. 根据权利要求72所述的装置,其特征在于,所述接入信息还包括所述无线网络的基本服务集标识BSSID。The device according to claim 72, wherein the access information further comprises a basic service set identifier (BSSID) of the wireless network.
  74. 根据权利要求69-71任一项所述的装置,其特征在于,通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:The apparatus according to any one of claims 69-71, wherein the interaction request of the second device is received in the wireless network through the communication interface, and is used to establish the first device and the The communication connection of the second device specifically includes:
    在所述无线网络中通过所述通信接口接收第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;Receiving first broadcast information in the wireless network through the communication interface, where the first broadcast information includes the network identifier of the second device in the wireless network;
    根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所述第二设备的通信连接。According to the network identification of the first device and the network identification of the second device, initiate a connection to the second device in the wireless network to establish a communication connection between the first device and the second device .
  75. 根据权利要求74所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识;The apparatus according to claim 74, wherein the first broadcast information further comprises: a device identifier of the first target device that the second device expects to establish a communication connection;
    所述处理器用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,具体包括:The processor is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
    确定所述第一目标设备的设备标识与所述第一设备的设备标识是否相同。Determine whether the device identifier of the first target device is the same as the device identifier of the first device.
  76. 根据权利要求75所述的装置,其特征在于,若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The apparatus according to claim 75, wherein if the device ID of the first target device is the same as the device ID of the first device, then according to the network ID of the first device and the second device The network identifier of, initiates a connection to the second device in the wireless network.
  77. 根据权利要求75或76所述的装置,其特征在于,所述处理器还用于:The device according to claim 75 or 76, wherein the processor is further configured to:
    若所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则确定所述第一设备是否已与所述第二设备建立通信连接;If the device identifier of the first target device is not the same as the device identifier of the first device, determining whether the first device has established a communication connection with the second device;
    若所述第一设备已与所述第二设备建立通信连接,则断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, disconnect the communication connection with the second device.
  78. 根据权利要求77所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The apparatus according to claim 77, wherein the first broadcast information further comprises: a device identifier of the second device;
    通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:After receiving the interaction request of the second device in the wireless network through the communication interface, it is used to establish a communication connection between the first device and the second device, and is further used to:
    在所述第一设备重新与所述无线网络的连接之后,通过所述通信接口接收第二广播信息;所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识;After the first device reconnects to the wireless network, receive second broadcast information through the communication interface; the second broadcast information includes the device of the second target device that the second device expects to establish a communication connection Identification and the device identification of the second device;
    确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同, 且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同。It is determined whether the device identification of the second target device is the same as the device identification of the first device, and whether the device identification of the second device is the same as the device identification of the device with which the first device presets a communication connection.
  79. 根据权利要求78所述的装置,其特征在于,若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The apparatus according to claim 78, wherein if the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the first device Assuming that the device identities of the devices that establish the communication connection are the same, a connection is initiated to the second device in the wireless network according to the network identity of the first device and the network identity of the second device.
  80. 根据权利要求79所述的装置,其特征在于,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The apparatus according to claim 79, wherein the first device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
  81. 根据权利要求74所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力;The apparatus according to claim 74, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability of communication connections established by other equipment outside;
    所述处理器用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,具体包括:The processor is configured to initiate a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
    所述处理器已与所述第二设备之外的其他设备建立通信连接;The processor has established a communication connection with a device other than the second device;
    根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力是否被使能;Determine, according to the preemption information, whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
    若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the second device in the wireless network.
  82. 根据权利要求74所述的装置,其特征在于,所述网络标识为互联网协议地址。The device of claim 74, wherein the network identifier is an Internet Protocol address.
  83. 根据权利要求69-71任一项所述的装置,其特征在于,通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:The apparatus according to any one of claims 69-71, wherein the interaction request of the second device is received in the wireless network through the communication interface, and is used to establish the first device and the The communication connection of the second device specifically includes:
    在所述无线网络中发送第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接。Send third broadcast information in the wireless network. The third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used by the second device in the wireless network. Initiating a connection to the first device in the wireless network.
  84. 根据权利要求83所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识。The apparatus according to claim 83, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection.
  85. 根据权利要求84所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The apparatus according to claim 84, wherein the third broadcast information further comprises: a device identifier of the first device;
    通过所述通信接口在所述无线网络中接收所述第二设备的交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:After receiving the interaction request of the second device in the wireless network through the communication interface, it is used to establish a communication connection between the first device and the second device, and is further used to:
    在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识。Send fourth broadcast information in the wireless network, where the fourth broadcast information includes the device identifier of the fourth target device that the first device expects to establish a communication connection and the device identifier of the first device.
  86. 根据权利要求83所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力。The apparatus according to claim 83, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communications established by other devices The ability to connect.
  87. 根据权利要求83所述的装置,其特征在于,所述网络标识为互联网协议地址。The device of claim 83, wherein the network identifier is an Internet Protocol address.
  88. 根据权利要求69-71任一项所述的装置,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The device according to any one of claims 69-71, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  89. 一种通信装置,应用于第二设备,其特征在于,包括:处理器和通信接口,控制终端和可移动设备中的一个作为第一设备,另一个作为所述第二设备;A communication device applied to a second device, characterized by comprising: a processor and a communication interface, one of a control terminal and a movable device as the first device, and the other as the second device;
    所述处理器,用于获得接入信息,所述接入信息是第一设备根据所述第一设备所连接的无线网络指示,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备接入所述无线网络;The processor is configured to obtain access information, where the access information is an indication by the first device according to the wireless network to which the first device is connected, and the access information includes at least login information of the wireless network, so that Accessing the wireless network by the second device;
    所述处理器,还用于根据所述接入信息接入所述无线网络;The processor is further configured to access the wireless network according to the access information;
    所述处理器,还用于通过所述通信接口在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接。The processor is further configured to send an interaction request to the first device in the wireless network through the communication interface, for establishing a communication connection between the first device and the second device.
  90. 根据权利要求89所述的装置,其特征在于,所述处理器用于获得接入信息,具体包括:The device according to claim 89, wherein the processor is configured to obtain access information, specifically comprising:
    通过摄像头扫描所述第一设备显示的条码,所述条码携带所述接入信息;Scanning the barcode displayed by the first device through a camera, the barcode carrying the access information;
    根据扫描得到的所述条码,获得所述接入信息。According to the barcode obtained by scanning, the access information is obtained.
  91. 根据权利要求90所述的装置,其特征在于,所述条码携带加密后的所述接入信息;The device of claim 90, wherein the barcode carries the encrypted access information;
    所述处理器用于根据扫描得到的所述条码,获得所述接入信息,具体包括:The processor is configured to obtain the access information according to the scanned barcode, which specifically includes:
    根据所述条码,获得加密后的所述接入信息;Obtaining the encrypted access information according to the barcode;
    根据加密后的所述接入信息,获得所述接入信息。Obtain the access information according to the encrypted access information.
  92. 根据权利要求89-91任一项所述的装置,其特征在于,所述接入信息还包括所述第一设备的设备标识。The apparatus according to any one of claims 89-91, wherein the access information further comprises a device identifier of the first device.
  93. 根据权利要求92所述的装置,其特征在于,所述接入信息包括所述无线网络的基本服务集标识BSSID;The device according to claim 92, wherein the access information includes a basic service set identifier (BSSID) of the wireless network;
    所述处理器用于根据所述接入信息接入所述无线网络之前,还用于:The processor is configured to before accessing the wireless network according to the access information, and is further configured to:
    确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同。Determine whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located.
  94. 根据权利要求93所述的装置,其特征在于,若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则退出所述当前所处网络。The apparatus according to claim 93, wherein if the BSSID of the wireless network included in the access information is not the same as the BSSID of the network where the second device is currently located, exit from the current location The internet.
  95. 根据权利要求94所述的装置,其特征在于,所述处理器用于退出所述当前所处网络之后,还用于根据所述接入信息接入所述无线网络。The device according to claim 94, wherein the processor is configured to log out of the current network, and is further configured to access the wireless network according to the access information.
  96. 根据权利要求89-91任一项所述的装置,其特征在于,所述处理器用于通过所述通信接口在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:The apparatus according to any one of claims 89-91, wherein the processor is configured to send an interaction request to the first device in the wireless network through the communication interface, and is configured to establish the first device The communication connection between a device and the second device specifically includes:
    在所述无线网络中通过所述通信接口发送第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接。In the wireless network, first broadcast information is sent through the communication interface, where the first broadcast information includes the network identification of the second device in the wireless network; the first broadcast information is used for the first A device initiates a connection to the second device in the wireless network.
  97. 根据权利要求96所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识。The apparatus according to claim 96, wherein the first broadcast information further comprises: a device identifier of the first target device that the second device expects to establish a communication connection.
  98. 根据权利要求97所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The apparatus according to claim 97, wherein the first broadcast information further comprises: a device identifier of the second device;
    所述处理器用于在所述无线网络中与所述第一设备交互,建立所述第一设备和所述第二设备的通信连接之后,还用于:The processor is configured to interact with the first device in the wireless network, and after establishing a communication connection between the first device and the second device, is further configured to:
    在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识。Sending second broadcast information in the wireless network, where the second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device.
  99. 根据权利要求96所述的装置,其特征在于,所述第一广播信息还包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力。The apparatus according to claim 96, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability to establish a communication connection with other devices.
  100. 根据权利要求96所述的装置,其特征在于,所述网络标识为互联网协议地址。The device of claim 96, wherein the network identifier is an Internet Protocol address.
  101. 根据权利要求89-91任一项所述的装置,其特征在于,所述处理器用于通过所述通信接口在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接,具体包括:The apparatus according to any one of claims 89-91, wherein the processor is configured to send an interaction request to the first device in the wireless network through the communication interface, and is configured to establish the first device The communication connection between a device and the second device specifically includes:
    在所述无线网络中通过所述通信接口接收第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;Receiving third broadcast information through the communication interface in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network;
    根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。According to the network identification of the first device and the network identification of the second device, initiate a connection to the first device in the wireless network to establish a communication connection between the first device and the second device .
  102. 根据权利要求101所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识;The apparatus according to claim 101, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection;
    所述处理器用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,具体包括:The processor is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
    确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同。It is determined whether the device identifier of the third target device is the same as the device identifier of the second device.
  103. 根据权利要求102所述的装置,其特征在于,若所述第三目标设备的设备标识与所述第二设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The apparatus according to claim 102, wherein if the device ID of the third target device is the same as the device ID of the second device, then according to the network ID of the first device and the second device The network identifier of, initiates a connection to the first device in the wireless network.
  104. 根据权利要求102或103所述的装置,其特征在于,所述处理器还用于:The device according to claim 102 or 103, wherein the processor is further configured to:
    若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则确定所述第二设备是否已与所述第一设备建立通信连接;If the device identifier of the third target device is not the same as the device identifier of the second device, determining whether the second device has established a communication connection with the first device;
    若所述第二设备已与所述第一设备建立通信连接,则断开与所述第一设 备的通信连接。If the second device has established a communication connection with the first device, the communication connection with the first device is disconnected.
  105. 根据权利要求104所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The apparatus according to claim 104, wherein the third broadcast information further comprises: a device identifier of the first device;
    所述处理器用于通过所述通信接口在所述无线网络中向所述第一设备发送交互请求,用于建立所述第一设备和所述第二设备的通信连接之后,还用于:The processor is configured to send an interaction request to the first device in the wireless network through the communication interface, and is configured to establish a communication connection between the first device and the second device, and is further configured to:
    在所述第二设备重新与所述无线网络连接之后,通过所述通信接口接收第四广播信息;所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识;After the second device is reconnected to the wireless network, the fourth broadcast information is received through the communication interface; the fourth broadcast information includes the device identification of the fourth target device that the first device expects to establish a communication connection And the device identification of the first device;
    确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同。It is determined whether the device identification of the fourth target device is the same as the device identification of the second device, and whether the device identification of the first device is the same as the device identification of the device with which the second device presets a communication connection.
  106. 根据权利要求105所述的装置,其特征在于,若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The apparatus according to claim 105, wherein if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is pre-determined with the second device Assuming that the device identities of the devices that establish the communication connection are the same, a connection is initiated to the first device in the wireless network according to the network identity of the first device and the network identity of the second device.
  107. 根据权利要求106所述的装置,其特征在于,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The apparatus according to claim 106, wherein the device identifier of the device that establishes the communication connection preset by the second device is: a preset device identifier or the device identifier of the device that established the communication connection last time.
  108. 根据权利要求101所述的装置,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力;The apparatus according to claim 101, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communication established by other devices Ability to connect
    所述处理器用于根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,具体包括:The processor is configured to initiate a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device, which specifically includes:
    确定已与所述第一设备之外的其他设备建立通信连接;Determining that a communication connection has been established with a device other than the first device;
    根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
    若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则断开与所述其他设备的通信连接,并根据所述第一设备的网 络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the communication connection with the other device is disconnected, and the network identification of the first device And the network identifier of the second device, initiating a connection to the first device in the wireless network.
  109. 根据权利要求100所述的装置,其特征在于,所述网络标识为互联网协议地址。The device of claim 100, wherein the network identifier is an Internet Protocol address.
  110. 根据权利要求89-91任一项所述的装置,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The device according to any one of claims 89-91, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  111. 一种通信系统,其特征在于,包括:第一设备和第二设备,控制终端和可移动设备中的一个作为所述第一设备,另一个作为所述第二设备;A communication system, characterized by comprising: a first device and a second device, one of a control terminal and a movable device as the first device, and the other as the second device;
    所述第一设备根据自身所连接的无线网络,向所述第二设备指示接入信息,所述接入信息至少包括所述无线网络的登录信息,以便所述第二设备根据所述接入所述无线网络;The first device indicates access information to the second device according to the wireless network to which it is connected, and the access information includes at least the login information of the wireless network, so that the second device can according to the access The wireless network;
    所述第二设备获得所述接入信息,并根据所述接入信息接入所述无线网络;The second device obtains the access information, and accesses the wireless network according to the access information;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接。The first device interacts with the second device in the wireless network to establish a communication connection between the first device and the second device.
  112. 根据权利要求111所述的系统,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,指示接入信息,包括:The system according to claim 111, wherein the first device indicates the access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码;Generating, by the first device, a barcode carrying the access information according to the wireless network to which the first device is connected;
    所述第一设备显示所述条码;Displaying the barcode on the first device;
    所述第二设备获得所述接入信息,包括:The obtaining of the access information by the second device includes:
    所述第二设备通过摄像头扫描所述第一设备显示的所述条码;Scanning the barcode displayed by the first device by the second device through a camera;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息。The second device obtains the access information according to the barcode obtained by scanning.
  113. 根据权利要求112所述的系统,其特征在于,所述第一设备根据所述第一设备所连接的无线网络,生成携带所述接入信息的条码,包括:The system according to claim 112, wherein the first device generates a barcode carrying the access information according to the wireless network to which the first device is connected, comprising:
    所述第一设备对所述接入信息进行加密,获得加密后的所述接入信息;Encrypting the access information by the first device to obtain the encrypted access information;
    所述第一设备根据加密后的所述接入信息,生成携带加密后的所述接入信息的条码;Generating, by the first device, a barcode carrying the encrypted access information according to the encrypted access information;
    所述第二设备根据扫描得到的所述条码,获得所述接入信息,包括:The second device obtaining the access information according to the scanned barcode includes:
    所述第二设备根据所述条码,获得加密后的所述接入信息;Obtaining, by the second device, the encrypted access information according to the barcode;
    所述第二设备根据加密后的所述接入信息,获得所述接入信息。The second device obtains the access information according to the encrypted access information.
  114. 根据权利要求111-113任一项所述的系统,其特征在于,所述接入信息还包括所述第一设备的设备标识。The system according to any one of claims 111-113, wherein the access information further includes a device identifier of the first device.
  115. 根据权利要求114所述的系统,其特征在于,所述接入信息包括所述无线网络的基本服务集标识BSSID;The system according to claim 114, wherein the access information includes a basic service set identifier (BSSID) of the wireless network;
    所述第二设备根据所述接入信息接入所述无线网络之前,确定所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID是否相同。Before the second device accesses the wireless network according to the access information, determine whether the BSSID of the wireless network included in the access information is the same as the BSSID of the network where the second device is currently located.
  116. 根据权利要求115所述的系统,其特征在于,若所述接入信息中包括的所述无线网络的BSSID与所述第二设备当前所处网络的BSSID不相同,则退出所述当前所处网络。The system according to claim 115, wherein if the BSSID of the wireless network included in the access information is not the same as the BSSID of the network where the second device is currently located, then exit from the current location The internet.
  117. 根据权利要求116所述的系统,其特征在于,所述第二设备退出所述当前所处网络之后,根据所述接入信息接入所述无线网络。The system according to claim 116, wherein after the second device exits the current network, it accesses the wireless network according to the access information.
  118. 根据权利要求111-113任一项所述的系统,其特征在于,所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接包括:The system according to any one of claims 111-113, wherein the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device Communication connections include:
    所述第二设备在所述无线网络中发送第一广播信息,所述第一广播信息包括所述第二设备在所述无线网络中的网络标识;所述第一广播信息用于所述第一设备在所述无线网络中向所述第二设备发起连接;The second device sends first broadcast information in the wireless network. The first broadcast information includes the network identifier of the second device in the wireless network; the first broadcast information is used for the first broadcast information. A device initiates a connection to the second device in the wireless network;
    所述第一设备在所述无线网络中接收所述第一广播信息;Receiving, by the first device, the first broadcast information in the wireless network;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,以建立所述第一设备和所述第二设备的通信连接。The first device initiates a connection to the second device in the wireless network according to the network identity of the first device and the network identity of the second device to establish the first device and the second device. 2. The communication connection of the device.
  119. 根据权利要求118所述的系统,其特征在于,所述接入信息还包括所述第一设备的设备标识,所述第一广播信息还包括:所述第二设备期望建立通信连接的第一目标设备的设备标识;The system according to claim 118, wherein the access information further includes the device identifier of the first device, and the first broadcast information further includes: the first device that the second device expects to establish a communication connection. Device ID of the target device;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备确定所述第一目标设备的设备标识与所述第一设备的设备 标识是否相同。The first device determines whether the device identifier of the first target device is the same as the device identifier of the first device.
  120. 根据权利要求119所述的系统,其特征在于,若所述第一目标设备的设备标识与所述第一设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The system according to claim 119, wherein if the device identification of the first target device is the same as the device identification of the first device, the first device is based on the network identification of the first device and The network identifier of the second device initiates a connection to the second device in the wireless network.
  121. 根据权利要求119或120所述的系统,其特征在于,所述第一目标设备的设备标识与所述第一设备的设备标识不相同,则所述第一设备确定所述第一设备是否已与所述第二设备建立通信连接;The system according to claim 119 or 120, wherein the device ID of the first target device is different from the device ID of the first device, then the first device determines whether the first device has Establishing a communication connection with the second device;
    若所述第一设备已与所述第二设备建立通信连接,则所述第一设备断开与所述第二设备的通信连接。If the first device has established a communication connection with the second device, the first device disconnects the communication connection with the second device.
  122. 根据权利要求121所述的系统,其特征在于,所述第一广播信息还包括:所述第二设备的设备标识;The system according to claim 121, wherein the first broadcast information further comprises: a device identifier of the second device;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接之后,在所述无线网络中发送第二广播信息,所述第二广播信息包括所述第二设备期望建立通信连接的第二目标设备的设备标识以及所述第二设备的设备标识;The first device interacts with the second device in the wireless network, and after establishing a communication connection between the first device and the second device, sends second broadcast information in the wireless network, the The second broadcast information includes the device identifier of the second target device that the second device expects to establish a communication connection and the device identifier of the second device;
    在所述第一设备重新与所述无线网络的连接之后,所述第一设备接收所述第二广播信息;After the first device reconnects to the wireless network, the first device receives the second broadcast information;
    所述第一设备确定所述第二目标设备的设备标识与所述第一设备的设备标识是否相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识是否相同。The first device determines whether the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is preset with the device ID of the first device to establish a communication connection. Whether the device IDs are the same.
  123. 根据权利要求122所述的系统,其特征在于,若所述第二目标设备的设备标识与所述第一设备的设备标识相同,且所述第二设备的设备标识与所述第一设备预设建立通信连接的设备的设备标识相同,则所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。The system according to claim 122, wherein if the device ID of the second target device is the same as the device ID of the first device, and the device ID of the second device is the same as the device ID of the first device. Assuming that the device IDs of the devices that establish a communication connection are the same, the first device initiates a connection to the second device in the wireless network according to the network ID of the first device and the network ID of the second device .
  124. 根据权利要求122所述的系统,其特征在于,所述第一设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The system according to claim 122, wherein the device identifier of the device that establishes the communication connection preset by the first device is: a preset device identifier or the device identifier of the device that established the communication connection last time.
  125. 根据权利要求118所述的系统,其特征在于,所述第一广播信息还 包括:所述第二设备的抢占信息,所述抢占信息用于指示所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力;The system according to claim 118, wherein the first broadcast information further comprises: preemption information of the second device, and the preemption information is used to instruct the second device to preempt the second device. The ability of communication connections established by other equipment outside;
    所述第一设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接,包括:The first device initiating a connection to the second device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第一设备已与所述第二设备之外的其他设备建立通信连接;The first device has established a communication connection with another device other than the second device;
    根据所述抢占信息,确定所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力是否被使能;Determine, according to the preemption information, whether the ability of the second device to preempt the established communication connection of a device other than the second device is enabled;
    若所述第二设备抢占所述第二设备之外的其他设备已建立的通信连接的能力被使能,则所述第一设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第二设备发起连接。If the ability of the second device to preempt the communication connection established by another device other than the second device is enabled, the first device disconnects the communication connection with the other device, and according to the first device The network identification of a device and the network identification of the second device initiate a connection to the second device in the wireless network.
  126. 根据权利要求118所述的系统,其特征在于,所述网络标识为互联网协议地址。The system of claim 118, wherein the network identifier is an Internet Protocol address.
  127. 根据权利要求111-113任一项所述的系统,其特征在于,所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接包括:The system according to any one of claims 111-113, wherein the first device interacts with the second device in the wireless network to establish a connection between the first device and the second device Communication connections include:
    所述第一设备在所述无线网络中发送第三广播信息,所述第三广播信息包括所述第一设备在所述无线网络中的网络标识;所述第三广播信息用于所述第二设备在所述无线网络中向所述第一设备发起连接;The first device sends third broadcast information in the wireless network, where the third broadcast information includes the network identifier of the first device in the wireless network; the third broadcast information is used for the first device The second device initiates a connection to the first device in the wireless network;
    所述第二设备在所述无线网络中接收所述第三广播信息;Receiving, by the second device, the third broadcast information in the wireless network;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,以建立所述第一设备和所述第二设备的通信连接。The second device initiates a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device to establish the first device and the second device. 2. The communication connection of the device.
  128. 根据权利要求127所述的系统,其特征在于,所述第三广播信息还包括:所述第一设备期望建立通信连接的第三目标设备的设备标识;The system according to claim 127, wherein the third broadcast information further comprises: a device identifier of a third target device that the first device expects to establish a communication connection;
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定所述第三目标设备的设备标识与所述第二设备的设备标识是否相同。The second device determines whether the device identifier of the third target device is the same as the device identifier of the second device.
  129. 根据权利要求128所述的系统,其特征在于,若所述第三目标设备 的设备标识与所述第二设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The system according to claim 128, wherein if the device ID of the third target device is the same as the device ID of the second device, the second device is based on the network ID of the first device and The network identifier of the second device initiates a connection to the first device in the wireless network.
  130. 根据权利要求128或129所述的系统,其特征在于,若所述第三目标设备的设备标识与所述第二设备的设备标识不相同,则所述第二设备确定所述第二设备是否已与所述第一设备建立通信连接;The system according to claim 128 or 129, wherein if the device ID of the third target device is different from the device ID of the second device, the second device determines whether the second device Has established a communication connection with the first device;
    若所述第二设备已与所述第一设备建立通信连接,则所述第二设备断开与所述第一设备的通信连接。If the second device has established a communication connection with the first device, the second device disconnects the communication connection with the first device.
  131. 根据权利要求130所述的系统,其特征在于,所述第三广播信息还包括:所述第一设备的设备标识;The system according to claim 130, wherein the third broadcast information further comprises: a device identifier of the first device;
    所述第一设备在所述无线网络中与所述第二设备交互,建立所述第一设备和所述第二设备的通信连接之后,在所述无线网络中发送第四广播信息,所述第四广播信息包括所述第一设备期望建立通信连接的第四目标设备的设备标识以及所述第一设备的设备标识;The first device interacts with the second device in the wireless network, and after establishing a communication connection between the first device and the second device, sends fourth broadcast information in the wireless network, the The fourth broadcast information includes the device identification of the fourth target device that the first device expects to establish a communication connection and the device identification of the first device;
    在所述第二设备重新与所述无线网络连接之后,所述第二设备接收所述第四广播信息;After the second device is reconnected to the wireless network, the second device receives the fourth broadcast information;
    所述第二设备确定所述第四目标设备的设备标识与所述第二设备的设备标识是否相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识是否相同。The second device determines whether the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device presets the device ID of the device that establishes a communication connection with the second device. Whether the device IDs are the same.
  132. 根据权利要求131所述的系统,其特征在于,若所述第四目标设备的设备标识与所述第二设备的设备标识相同,且所述第一设备的设备标识与所述第二设备预设建立通信连接的设备的设备标识相同,则所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。The system according to claim 131, wherein if the device ID of the fourth target device is the same as the device ID of the second device, and the device ID of the first device is preset to the second device Assuming that the device IDs of the devices that establish a communication connection are the same, the second device initiates a connection to the first device in the wireless network according to the network ID of the first device and the network ID of the second device .
  133. 根据权利要求131所述的系统,其特征在于,所述第二设备预设建立通信连接的设备的设备标识为:预先设置的设备标识、或者上一次建立通信连接的设备的设备标识。The system according to claim 131, wherein the second device presets the device identification of the device that establishes the communication connection as: a preset device identification or the device identification of the device that established the communication connection last time.
  134. 根据权利要求127所述的系统,其特征在于,所述第三广播信息还包括:所述第一设备的抢占信息,所述抢占信息用于指示所述第一设备抢占其他设备已建立的通信连接的能力;The system according to claim 127, wherein the third broadcast information further comprises: preemption information of the first device, and the preemption information is used to instruct the first device to preempt communication established by other devices Ability to connect
    所述第二设备根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接,包括:The second device initiating a connection to the first device in the wireless network according to the network identification of the first device and the network identification of the second device includes:
    所述第二设备确定已与所述第一设备之外的其他设备建立通信连接;Determining that the second device has established a communication connection with another device other than the first device;
    根据所述抢占信息,确定所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力是否被使能;Determining, according to the preemption information, whether the ability of the first device to preempt the communication connection established by the device other than the first device is enabled;
    若所述第一设备抢占所述第一设备之外的其他设备已建立的通信连接的能力被使能,则所述第二设备断开与所述其他设备的通信连接,并根据所述第一设备的网络标识以及所述第二设备的网络标识,在所述无线网络中向所述第一设备发起连接。If the ability of the first device to preempt the communication connection established by another device other than the first device is enabled, the second device disconnects the communication connection with the other device, and according to the first device The network identifier of a device and the network identifier of the second device initiate a connection to the first device in the wireless network.
  135. 根据权利要求127所述的系统,其特征在于,所述网络标识为互联网协议地址。The system of claim 127, wherein the network identifier is an Internet Protocol address.
  136. 根据权利要求111-113任一项所述的系统,其特征在于,所述控制终端包括:遥控器和/或手机,和/或The system according to any one of claims 111-113, wherein the control terminal comprises: a remote control and/or a mobile phone, and/or
    所述可移动设备包括:智能小车、智能机器人或无人飞行器。The movable equipment includes: an intelligent car, an intelligent robot or an unmanned aerial vehicle.
  137. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如权利要求1-20任一项所述的通信方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control the computer to execute The communication method described in any one of 1-20 is required.
  138. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序包含至少一段代码,所述至少一段代码可由计算机执行,以控制所述计算机执行如权利要求21-42任一项所述的通信方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, the computer program includes at least one piece of code, and the at least one piece of code can be executed by a computer to control the computer to execute The communication method described in any one of 21-42 is required.
PCT/CN2019/080686 2019-03-29 2019-03-29 Communication method, apparatus and system WO2020199055A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/080686 WO2020199055A1 (en) 2019-03-29 2019-03-29 Communication method, apparatus and system
CN201980005416.3A CN111742567A (en) 2019-03-29 2019-03-29 Communication method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/080686 WO2020199055A1 (en) 2019-03-29 2019-03-29 Communication method, apparatus and system

Publications (1)

Publication Number Publication Date
WO2020199055A1 true WO2020199055A1 (en) 2020-10-08

Family

ID=72646031

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/080686 WO2020199055A1 (en) 2019-03-29 2019-03-29 Communication method, apparatus and system

Country Status (2)

Country Link
CN (1) CN111742567A (en)
WO (1) WO2020199055A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100115262A1 (en) * 2008-01-07 2010-05-06 Yamaha Corporation Wireless Network System and Wireless Communicaton Method
CN104375497A (en) * 2014-12-15 2015-02-25 广东美的厨房电器制造有限公司 Smart home, smart home control method, control system and electronic equipment
CN105722087A (en) * 2016-04-06 2016-06-29 微景天下(北京)科技有限公司 Wireless network access system and wireless network access method
CN107979730A (en) * 2017-12-25 2018-05-01 横琴国际知识产权交易中心有限公司 A kind of wireless network connecting method and system of wireless camera equipment
CN108449357A (en) * 2018-04-08 2018-08-24 武汉斗鱼网络科技有限公司 A kind of mandate login method, device, smart machine and storage medium
US20190069330A1 (en) * 2017-08-22 2019-02-28 AI Incorporated Methods and systems for pairing mobile robotic device docking stations with a wireless router and cloud service

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105228147A (en) * 2015-09-17 2016-01-06 小米科技有限责任公司 Method for connecting network, Apparatus and system
CN108811179B (en) * 2018-05-28 2020-12-18 北京小米移动软件有限公司 Wireless network connection method, device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100115262A1 (en) * 2008-01-07 2010-05-06 Yamaha Corporation Wireless Network System and Wireless Communicaton Method
CN104375497A (en) * 2014-12-15 2015-02-25 广东美的厨房电器制造有限公司 Smart home, smart home control method, control system and electronic equipment
CN105722087A (en) * 2016-04-06 2016-06-29 微景天下(北京)科技有限公司 Wireless network access system and wireless network access method
US20190069330A1 (en) * 2017-08-22 2019-02-28 AI Incorporated Methods and systems for pairing mobile robotic device docking stations with a wireless router and cloud service
CN107979730A (en) * 2017-12-25 2018-05-01 横琴国际知识产权交易中心有限公司 A kind of wireless network connecting method and system of wireless camera equipment
CN108449357A (en) * 2018-04-08 2018-08-24 武汉斗鱼网络科技有限公司 A kind of mandate login method, device, smart machine and storage medium

Also Published As

Publication number Publication date
CN111742567A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
US20230155977A1 (en) Communication apparatus, methods, and non-transitory computer-readable media for determining ip addresses for use in different networks
US9907016B2 (en) Communication device
US11531505B2 (en) Non-transitory computer-readable medium storing computer-readable instructions for terminal device and terminal device
EP3151628B1 (en) Method, device and system for accessing a wireless network
CN106454822B (en) Communication apparatus and control method thereof
US10887804B2 (en) Pre-roaming security key distribution for faster roaming transitions over cloud-managed Wi-Fi networks of heterogeneous IP subnets
CN107567017B (en) Wireless connection system, device and method
TWI415501B (en) Wireless network system and wireless access point device thereof
US10420156B2 (en) Wireless communication terminal, wireless communication system, wireless communication method, and non-transitory medium saving program
US20180069726A1 (en) Communication device, communication method, communication system, and computer program product
US11736274B2 (en) Terminal device and non-transitory computer-readable medium storing computer-readable instructions for terminal device
CN110855677A (en) Network distribution method and device, electronic equipment and storage medium
WO2016029772A1 (en) Communication method and device
CN114390491A (en) Networking method, device and system
US10567353B2 (en) Information processing apparatus, wireless communication system, and communication method
KR20090083211A (en) Security setting system and the control method for using clurster function in wireless network system
US11172415B2 (en) Wireless communication management and handoffs
JP2013187644A (en) Communication device, control method therefor, and program
WO2012026932A1 (en) Method and apparatus for over-the-air configuration of a wireless device
US20230156467A1 (en) Terminal device and non-transitory computer-readable recording medium storing computer readable instructions for terminal device
WO2015157947A1 (en) Software defined network based networking method and device
US9661497B2 (en) Control and enhancement of direct wireless service communications
WO2020199055A1 (en) Communication method, apparatus and system
EP3817330B1 (en) Media interaction method in dect network cluster
TWI767202B (en) Device and method for enrolling a wireless access point into a map wireless network

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19923133

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19923133

Country of ref document: EP

Kind code of ref document: A1