CN116347664A - Equipment pairing method and device - Google Patents

Equipment pairing method and device Download PDF

Info

Publication number
CN116347664A
CN116347664A CN202310304652.3A CN202310304652A CN116347664A CN 116347664 A CN116347664 A CN 116347664A CN 202310304652 A CN202310304652 A CN 202310304652A CN 116347664 A CN116347664 A CN 116347664A
Authority
CN
China
Prior art keywords
electronic device
pairing
interaction channel
electronic
information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310304652.3A
Other languages
Chinese (zh)
Inventor
张明平
王学金
蔡海南
蔡志艺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202310304652.3A priority Critical patent/CN116347664A/en
Publication of CN116347664A publication Critical patent/CN116347664A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

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

Abstract

The application provides a device pairing method and device, wherein in the scheme, a first electronic device determines a second electronic device connected with the first electronic device through a first interaction channel; determining at least one third electronic device connected with the second electronic device through a second interaction channel; based on the second electronic device, a pairing relation between the first electronic device and the third electronic device is established, and the pairing relation is used for establishing a third interaction channel between the first electronic device and the third electronic device.

Description

Equipment pairing method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a device pairing method and apparatus.
Background
In order to improve the convenience of interaction between two electronic devices, an interconnection channel can be established between the two electronic devices by using a device interconnection technology.
In order to realize the interconnection of devices between two electronic devices, the two electronic devices need to be paired first. At present, the process of device pairing between two electronic devices is as follows: one electronic device scans the two-dimensional code generated by the other electronic device, and pairing is completed based on pairing information contained in the two-dimensional code. However, under the condition that the user has a plurality of electronic devices and needs to establish device interconnection among the plurality of electronic devices, multiple scans of the two-dimensional code may be involved, and pairing of every two electronic devices among the plurality of electronic devices can be completed, so that pairing complexity among the electronic devices in the device interconnection process is higher.
Disclosure of Invention
In one aspect, the present application provides a device pairing method, applied to a first electronic device, including:
determining a second electronic device connected with the first electronic device through a first interaction channel;
determining at least one third electronic device connected with the second electronic device through a second interaction channel;
and establishing a pairing relation between the first electronic device and the third electronic device based on the second electronic device, wherein the pairing relation is used for establishing a third interaction channel between the first electronic device and the third electronic device.
In one possible implementation manner, the first interaction channel is an interaction channel constructed based on first pairing information between the first electronic device and the second electronic device;
the second interaction channel is an interaction channel constructed based on second pairing information between the second electronic device and the third electronic device.
In yet another possible implementation manner, the determining a third electronic device connected to the second electronic device through a second interaction channel includes:
obtaining a paired device list of the second electronic device through the first interaction channel, wherein the paired device list indicates that: and at least one third electronic device connected with the second electronic device through a second interaction channel.
In yet another possible implementation manner, before obtaining the paired device list of the second electronic device through the first interaction channel, the method further includes:
outputting an active pairing prompt, wherein the active pairing prompt is used for prompting a user to confirm whether to start equipment pairing;
the obtaining, through the first interaction channel, a paired device list of the second electronic device includes:
and after the confirmation pairing indication aiming at the active pairing prompt is detected, acquiring a paired device list of the second electronic device through the first interaction channel.
In yet another possible implementation manner, the establishing, based on the second electronic device, a pairing relationship between the first electronic device and a third electronic device includes:
generating target pairing information between the first electronic device and the third electronic device;
and transmitting the target pairing information to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relation based on the target pairing information.
In yet another possible implementation manner, the generating the target pairing information between the first electronic device and the third electronic device includes:
Generating a communication key between the first electronic device and a third electronic device;
the transmitting the target pairing information to the third electronic device based on the second electronic device includes:
and transmitting the device identification and the communication key of the first electronic device to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relationship based on the communication key.
In yet another possible implementation manner, before transmitting the target pairing information to the third electronic device, the method further includes:
determining an IP address and a port number of the first electronic device;
simultaneously or after transmitting the target pairing information to the third electronic device, the method further comprises:
and transmitting the IP address and the port number of the first electronic device to the third electronic device based on the second electronic device, so that the third electronic device can establish a third interaction channel with the first electronic device based on the pairing relationship.
In yet another aspect, the present application further provides another device pairing method applied to a second electronic device, including:
Determining a first electronic device connected with a second electronic device through a first interaction channel;
determining at least one third electronic device connected with the second electronic device through a second interaction channel;
and establishing a pairing relation between the first electronic equipment and the third electronic equipment, wherein the pairing relation is used for establishing a third interaction channel between the first electronic equipment and the third electronic equipment.
In still another aspect, the present application further provides a device pairing apparatus, which is applied to a first electronic device, including:
the first device determining unit is used for determining a second electronic device connected with the first electronic device through a first interaction channel;
a second device determining unit, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing processing unit is used for establishing a pairing relation between the first electronic device and the third electronic device based on the second electronic device, and the pairing relation is used for establishing a third interaction channel between the first electronic device and the third electronic device.
In yet another aspect, the present application further provides another device pairing apparatus applied to a second electronic device, including:
The first determining unit is used for determining a first electronic device connected with the second electronic device through a first interaction channel;
a second determining unit, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing establishing unit is used for establishing a pairing relation between the first electronic equipment and the third electronic equipment, and the pairing relation is used for establishing a third interaction channel between the first electronic equipment and the third electronic equipment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a device pairing method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a device pairing method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a device pairing method according to an embodiment of the present disclosure;
Fig. 4 is a schematic flow chart of another device pairing method according to an embodiment of the disclosure;
fig. 5 is a schematic flow interaction diagram of a device pairing method according to an embodiment of the present application;
fig. 6 is a schematic diagram showing a composition structure of a device pairing apparatus according to an embodiment of the present application;
fig. 7 is a schematic diagram showing a composition structure of a device pairing apparatus according to an embodiment of the present application;
fig. 8 shows a schematic diagram of a component architecture of an electronic device according to an embodiment of the present application.
Detailed Description
The scheme of the embodiment of the application is suitable for establishing the pairing relation for constructing the interaction channel between different electronic devices, and reduces the pairing complexity between the electronic devices.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without undue burden, are within the scope of the present application.
Fig. 1 is a schematic flow chart of a device pairing method according to an embodiment of the present application, where in order to distinguish an electronic device from other electronic devices that establish an interaction channel with the electronic device and establish a pairing relationship, the electronic device is referred to as a first electronic device. The first electronic device may be a tablet, a mobile phone, a notebook computer, or the like, which is not limited thereto.
The method of the embodiment can comprise the following steps:
s101, determining a second electronic device connected with the first electronic device through a first interaction channel.
In the application, the interaction channel established between two electronic devices may also be referred to as a device interconnection channel or a device direct connection channel, which refers to an interaction channel between two electronic devices capable of directly transmitting data without using a third party device to forward data.
For example, the interaction channel may be a direct channel established between two electronic devices based on Wi-Fi (Wireless Fidelity ) direct connection, a P2P direct channel established based on a P2P (peer-to-peer) technology, or a direct channel established by means of a wireless network or the same local area network, etc., which is not limited.
Through the interaction channel between the two electronic devices, the operations such as file transmission, screen projection, mutual control and the like can be realized between the two electronic devices, and the method is not limited.
For convenience of distinction, the interaction channel established between the first electronic device and the second electronic device is referred to as a first interaction channel, and the interaction channel established between the subsequent second electronic device and the third electronic device is referred to as a second interaction channel.
It is understood that after the first electronic device establishes the first interaction channel with the second electronic device, the first electronic device may determine the second electronic device connected to the first electronic device through the first interaction channel.
S102, determining at least one third electronic device connected with the second electronic device through a second interaction channel.
In the application, on the premise that the second electronic device and the third electronic device establish a second interaction channel, the first electronic device can determine the third electronic device connected by the second electronic device through the second interaction channel.
For example, on the premise that the first electronic device and the second electronic device establish a first interaction channel, the first electronic device may request, through the first interaction channel, device information that the second electronic device is connected through the interaction channel, to the second electronic device, so as to determine information of each third electronic device that the second electronic device is connected through the second interaction channel.
For another example, on the premise that the second electronic device and the third electronic device establish a second interaction channel and the second electronic device and the first electronic device also establish a first interaction channel, the second electronic device may actively report information of the third electronic device connected by the second electronic device through the second interaction channel to the first electronic device through the first interaction channel, so that the first electronic device confirms each third electronic device connected by the second electronic device through the second interaction channel.
S103, based on the second electronic device, a pairing relation between the first electronic device and the third electronic device is established.
The pairing relationship between the first electronic device and the third electronic device is used for establishing a third interaction channel between the first electronic device and the third electronic device.
The third interaction channel which can be established based on the pairing relationship between the first electronic device and the third electronic device is also the device interconnection channel or the device direct connection channel.
It is understood that the third interaction channel may be the same type of interaction channel as the first interaction channel and the second interaction channel, or may be a different type of interaction channel, which is not limited.
It can be understood that the first electronic device realizes pairing between the first electronic device and the third electronic device through the second electronic device, and basically, the pairing between the first electronic device and the third electronic device connected with the second electronic device can be completed by means of the second electronic device which has an interaction channel established with the first electronic device, so that a pairing relationship is established without manual operation by means of two-dimensional code scanning between the first electronic device and the third electronic device.
In the present application, any two electronic devices of the first electronic device, the second electronic device, and the third electronic device may be the same type of electronic device, or may be different types of electronic devices, which is not limited.
It can be known from the above that, in the embodiment of the present application, on the premise that the first electronic device and the second electronic device establish the first interaction channel, the first electronic device may determine at least one third electronic device connected to the second electronic device through the second interaction channel, and on this basis, the first electronic device may establish a pairing relationship between the first electronic device and the third electronic device through the second electronic device, so that a user does not need to manually complete pairing between the first electronic device and the third electronic device by scanning the two-dimensional code, and complexity of pairing between different electronic devices is reduced.
The pairing between the first electronic device and the third electronic device connected with the second electronic device can be achieved through various specific implementations, for example, the first electronic device can achieve information interaction required by pairing through the first interaction channel and the second interaction channel between the second electronic device and the third electronic device, and related pairing is completed.
For ease of understanding, the device pairing method of the present application is described below by taking an implementation as an example.
As shown in fig. 2, which shows a further flowchart of a device pairing method provided in an embodiment of the present application, the method of the present embodiment is applied to a first electronic device, and the method of the present embodiment may include:
s201, determining a second electronic device connected with the first electronic device through a first interaction channel.
S202, determining at least one third electronic device connected with the second electronic device through a second interaction channel.
The above two steps may be referred to related descriptions of other embodiments of the present application, and are not described herein.
In one possible implementation manner, in order to enable the first electronic device to distinguish each third electronic device connected to the second electronic device, the first electronic device may determine, through the second electronic device, a device identifier of each third electronic device connected to the second electronic device through the second interaction channel.
S203, for each third electronic device, generating target pairing information between the first electronic device and the third electronic device.
The target pairing information is information which is generated by the first electronic device for the third electronic device and used for constructing a pairing relation. The target pairing information generated by the first electronic device is different for different third electronic devices.
In one possible implementation, the target pairing information includes at least a communication key between the first electronic device and the third electronic device. The communication key is used by the first electronic device to confirm that the third electronic device is a trusted electronic device. Similarly, after the third electronic device establishes a pairing relationship with the first electronic device, the third electronic device may also identify the first electronic device as a trusted communication device based on the communication key.
For example, an interaction channel can be established between the first electronic device and the third electronic device based on the communication key and data transmission can be performed based on the interaction channel.
Of course, the target pairing information may further include: the name of the first electronic device, other information, etc., are not limited thereto.
And S204, transmitting the target pairing information to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relation based on the target pairing information.
For example, the first electronic device may instruct the second electronic device to transmit target pairing information to the third electronic device.
It can be understood that, because the first interaction channel is established between the first electronic device and the second electronic device, the first electronic device may transmit the target pairing information to the second electronic device through the first interaction channel, so that the second electronic device may send the target pairing information to the third electronic device through the second interaction channel.
For example, the first electronic device sends an information forwarding request to the second electronic device through the first interaction channel, where the information forwarding request carries the target pairing information and the device identifier of the third electronic device. Correspondingly, the second electronic equipment responds to the information forwarding request, and forwards the target pairing information to the corresponding third electronic equipment according to the equipment identification of the third electronic equipment.
As described above, the pairing relationship between the first electronic device and the third electronic device is used to establish a third interaction channel between the first electronic device and the third electronic device.
After the third electronic device receives the target pairing information, the target pairing information can be stored as the pairing information of the first electronic device and the second electronic device, so that the pairing relationship between the first electronic device and the second electronic device is established.
In one possible implementation manner, in order to enable the third electronic device to learn the first electronic device corresponding to the target pairing information, the first electronic device may further transmit, based on the second electronic device, the device identifier of the first electronic device and the communication key to the third electronic device together, so that a pairing relationship based on the communication key exists between the first electronic device and the third electronic device.
Accordingly, the third electronic device may store the device identification of the first electronic device in association with the communication key to establish a pairing relationship between the third electronic device and the first electronic device.
Of course, in practical application, after the first electronic device sends the target pairing information (such as the communication key) to the second electronic device, the second electronic device can determine the information of the sender of the target pairing information, that is, can determine the device identifier of the first electronic device. Based on this, the first electronic device may only send the target pairing information to the second electronic device, and the second electronic device may send the target pairing information and the device identifier of the first electronic device to the third electronic device.
It may be appreciated that, in order to enable the first electronic device to confirm that the third electronic device is an electronic device paired with the first electronic device based on the target pairing information, the first electronic device may further store the target pairing information between the first electronic device and the third electronic device after generating the target pairing information or after the step S204.
For example, the first electronic device may store the device identification of the third electronic device in association with the target pairing information to complete pairing between the first electronic device and the third electronic device.
It can be appreciated that in any embodiment of the present application, after the first electronic device sends the target pairing information to the third electronic device through the second electronic device, a pairing relationship based on the target pairing information is established between the first electronic device and the third electronic device. On the basis, the first electronic device and the third electronic device can construct an interaction channel based on the target pairing information.
In practical application, an interaction channel can be constructed between the first electronic device and the third electronic device after the pairing relationship is established; or the first electronic device (or the third electronic device) can construct the interaction channel with the third electronic device (or the first electronic device) based on the target pairing information under the condition that the subsequent user needs to construct the interaction channel between the first electronic device and the second electronic device.
The method for establishing the third interaction channel between the first electronic device and the third electronic device based on the target pairing information may also have multiple possibilities, which is not limited in this application.
To facilitate understanding, one possible scenario is illustrated:
taking the case that the first electronic device side actively establishes an interaction channel with the third electronic device side, and the target pairing information at least comprises a communication key as an example:
The first electronic device may scan for the third electronic device via bluetooth, e.g. scan for an electronic device whose device identifier is the device identifier of the third electronic device. On the basis, the first electronic device obtains the current IP address and port number of the third electronic device through Bluetooth communication, the first electronic device can send a channel establishment request encrypted by the communication key to the third electronic device based on the IP address and the port number, the third electronic device decrypts the communication establishment request by using the stored communication key corresponding to the first electronic device, and if decryption is successful, a third interaction channel can be established between the first electronic device and the third electronic device.
Of course, this is merely for ease of understanding, and a way of establishing the interaction channel is described as an example, and there is no limitation in this application as to how and when the third interaction channel based on the target pairing information is established between the first electronic device and the third electronic device.
In one possible implementation manner, in order to timely and conveniently construct the third interaction channel between the first electronic device and the third electronic device after the pairing relationship is established between the first electronic device and the third electronic device, before the first electronic device transmits the target pairing information to the third electronic device based on the second electronic device, the first electronic device may further determine an IP address and a port number of the first electronic device.
Correspondingly, while or after the first electronic device transmits the target pairing information to the third electronic device, the first electronic device may further transmit the IP address and the port number of the first electronic device to the third electronic device based on the second electronic device, so that the third electronic device may establish a third interaction channel with the first electronic device based on the pairing relationship.
It can be understood that, because the first electronic device sends the target pairing information to the third electronic device and simultaneously or later sends the IP address and the port number of the first electronic device to the third electronic device, after the third electronic device obtains the target pairing information with the first electronic device, if there is a need to establish an interaction channel with the first electronic device through the third electronic device, the third electronic device does not need to scan or acquire the IP address and the port number of the first electronic device through bluetooth or other wireless communication technologies, and the interaction channel can be established with the first electronic device directly based on the IP address and the port number of the first electronic device, so that not only can the establishment efficiency of the interaction channel be reduced, but also the resource consumption caused by multiple times of interaction data between the first electronic device and the second electronic device can be reduced.
It can be understood that, in the present application, the third interaction channel that can be established by the first electronic device and the third electronic device based on the target pairing information may be the same type of interaction channel as the first interaction channel and the second interaction channel, or may be a different type of interaction channel.
In one possible implementation, the first interaction channel is an interaction channel constructed based on first pairing information between the first electronic device and the second electronic device. Correspondingly, the second interaction channel is an interaction channel constructed based on second pairing information between the second electronic device and the third electronic device.
It is understood that the pairing relationship between the first electronic device and the second electronic device is established before the first interaction channel is established between the first electronic device and the second electronic device.
In the application, establishing a pairing relationship between the first electronic device and the second electronic device means that the first electronic device and the second electronic device both obtain first pairing information between the first electronic device and the second electronic device, where the first pairing information is information for establishing a first interaction channel.
It may be appreciated that the pairing relationship between the first electronic device and the second electronic device may be established historically, or may be established in order to establish the first interaction channel. Accordingly, the first interaction channel may be an interaction channel established for the first time between the first electronic device and the second electronic device based on the first pairing information, or may be an interaction channel established for the non-first time, which is not limited.
It will be appreciated that the first interconnection channel may be established by the first electronic device, or may be established by the second electronic device, which is not limited thereto.
In the present application, a pairing relationship is established between the first electronic device and the second electronic device, that is, a specific implementation process of specifically obtaining the first pairing information may have multiple possibilities, which is not limited in this application.
For example, the first electronic device may obtain the two-dimensional code including first pairing information between the first electronic device and the second electronic device by scanning the two-dimensional code generated by the second electronic device; or the first electronic equipment generates a two-dimensional code containing pairing information, and the second electronic equipment obtains the pairing information by scanning the two-dimensional code to complete pairing between the first electronic equipment and the second electronic equipment.
Taking the two-dimensional code which is generated by the first electronic device through scanning the second electronic device and contains the first pairing information as an example: the second electronic device may generate a two-dimensional code including first pairing information, where the first pairing information may include at least: the second electronic device is configured to pair with the first communication key and a unique identification of the second electronic device (e.g., a MAC address of the second electronic device, etc.). Based on the two-dimensional code, the first electronic device scans the two-dimensional code of the second electronic device, so that the first pairing information can be obtained, and the pairing with the second electronic device is completed by storing the first pairing information.
In most cases, if a pairing relationship is not established between the first electronic device and the second electronic device, and the user needs to establish an interaction channel between the first electronic device and the second electronic device, the user needs to scan the two-dimensional code generated by the second electronic device by using the first electronic device to complete pairing. Therefore, the two-dimensional code generated by the second electronic device may further include: the second electronic device is currently IP address and port number. Correspondingly, the first electronic device can initiate the establishment of the interaction channel to the second electronic device based on the IP address and the port number of the first electronic device and the first communication key, and the second electronic device agrees to establish the interaction channel and also stores the device identifier of the first electronic device, so that the interaction channel is established while the pairing is completed.
On the premise that the first electronic device and the second electronic device have established a pairing relationship, if the first electronic device (or the second electronic device) needs to establish an interaction channel with the second electronic device (or the first electronic device) again, the first electronic device (or the second electronic device) can obtain the current IP address and port number of the second electronic device (or the first electronic device) through wireless technology such as Bluetooth so as to establish the interaction channel again.
As another example, the first electronic device and the second electronic device may also be in a pairing relationship completed by the fourth electronic device by using the scheme of the present application.
Of course, the first electronic device and the second electronic device may also complete pairing in other manners, which is not limited in this application.
Similarly, the pairing relationship between the second electronic device and the third electronic device is already established before the second interaction channel is established, and the specific implementation manner of establishing the pairing relationship between the second electronic device and the third electronic device may refer to the manner of establishing the pairing relationship between the first electronic device and the second electronic device, which is not limited in particular.
It may be appreciated that, on the premise that the first interaction channel and the second interaction channel are both interaction channels established based on corresponding pairing information, the first electronic device may determine that the third electronic device to which the second electronic device is connected may be at least a third electronic device that determines that the second electronic device is paired and that has established the second interaction channel.
The following description is directed to a specific implementation.
Fig. 3 is a schematic flow chart of a device pairing method according to an embodiment of the present application, where the method may include:
S301, a first interconnection channel between the first electronic device and the second electronic device is established based on the paired first pairing information between the first electronic device and the second electronic device.
It may be appreciated that, in the case where the first electronic device establishes the first interaction channel with the second electronic device, the first electronic device may naturally determine the second electronic device to which the first interaction channel is connected.
The establishment of the first interaction channel may be initiated by the first electronic device or initiated by the second electronic device, which is not limited in the foregoing.
S302, obtaining a paired device list of the second electronic device through the first interaction channel.
Wherein the paired device list indicates that: at least one third electronic device connected to the second electronic device through a second interaction channel. The second interaction channel is an interaction channel constructed based on second pairing information between the second electronic device and the third electronic device.
For example, the paired device list may include: and the device identification of each third electronic device connected with the second electronic device through the second interaction channel.
It will be appreciated that in practical applications, there are many possibilities to obtain the paired device list.
For example, after the first electronic device confirms that the second electronic device is connected through the first interaction channel, the first electronic device may send a paired list request to the second electronic device, where the paired list request is used to request a paired device list of the second electronic device. Accordingly, the second electronic device returns the paired list to the first electronic device in response to the list request.
For another example, after the first electronic device establishes the first interaction channel with the second electronic device, the second electronic device may actively send its paired device list to the first electronic device through the first interaction channel.
In one possible implementation, to avoid pairing electronic devices that the user does not want to pair without the user's knowledge, the first electronic device may also output an active pairing reminder to prompt the user to confirm whether to initiate device pairing before obtaining the paired device list. Of course, the active pairing reminder may also indicate that there is information such as a device name and a device identifier of the second electronic device on which the automatic pairing depends, which is not limited.
Correspondingly, after the confirmation pairing indication aiming at the active pairing prompt is detected, a paired device list of the second electronic device is obtained through the first interaction channel. The confirmation pairing instruction indicates that the user confirms that the pairing of the first electronic device and other electronic devices is achieved based on the second electronic device.
S303, based on the second electronic device, a pairing relation between the first electronic device and the third electronic device is established.
The pairing relationship is used for establishing a third interaction channel between the first electronic device and the third electronic device.
This step S303 can be referred to in the description of the previous embodiment, and is not limited thereto.
In the embodiment of the application, when the second electronic device is paired with the first electronic device and the first interaction channel is established, and the second electronic device is paired with the third electronic device and the second interaction channel is established, the first electronic device can be paired with the third electronic device based on the second electronic device without manually establishing the pairing between the first electronic device and the third electronic device.
Based on the method, under the condition that the user has a plurality of electronic devices, after pairing and interaction channels are established between one electronic device and other electronic devices, the other electronic devices of the user can be respectively paired with the devices of the user through the electronic devices, so that the pairing complexity between the electronic devices is greatly improved.
Illustrating:
taking the example that the user has 10 electronic devices, assume that 5 electronic devices of the user are respectively the electronic device 1 to the electronic device 5.
If the pairing is completed in a traditional pairing mode, two-dimension codes of any two electronic devices need to be scanned once, and then the code scanning pairing between every two electronic devices in 5 electronic devices is completed, so that a user is required to scan the two-dimension codes for 10 times. Of course, when the number of electronic devices that the user has is larger, the number of times of scanning the two-dimensional code is larger, for example, if the user has 6 electronic devices, the user is required to scan 16 two-dimensional codes after pairing between the 6 electronic devices is completed.
In the embodiment of the application, only the two-dimensional codes generated by the other four electronic devices are required to be scanned by the device 1, so that the pairing of the electronic device 1 with the electronic device 2, the electronic device 3, the electronic device 4 and the electronic device 5 is realized, and the establishment of the interaction channel is completed. On the basis, by using the scheme of the application, the electronic device 2 can establish pairing with the electronic device 3, the electronic device 4 and the electronic device 5 through the electronic device 1, and similarly, the electronic device 3 can also complete pairing with the electronic device 4 and the electronic device 5 through the electronic device 1, and the electronic device 4 can also complete pairing with the electronic device 5 through the electronic device 1. Therefore, the pairing between every two of 5 pieces of equipment is realized through the scheme of the application, and only 4 times of two-dimensional codes are required to be scanned, so that the pairing complexity between a plurality of pieces of electronic equipment is greatly reduced.
The device pairing method of the present application is described below from the second electronic device side. Fig. 4 is a schematic flow chart illustrating an implementation of the device pairing method provided by the embodiment of the present application on a second electronic device side, where the method of the embodiment is applied to the second electronic device, and the embodiment may include:
s401, determining a first electronic device connected with a second electronic device through a first interaction channel.
For example, based on the first pairing information already paired between the first electronic device and the second electronic device, a first interaction channel between the first electronic device and the second electronic device is established, so that the second electronic device confirms that the first electronic device is connected through the first interaction channel.
The step S401 is similar to the specific implementation of the first electronic device to determine the second electronic device connected through the first interaction channel, and will not be described herein.
S402, determining at least one third electronic device connected with the second electronic device through a second interaction channel.
And establishing a second interaction channel between the second electronic device and the third electronic device based on the paired first pairing information between the second electronic device and the third electronic device, so as to obtain the third electronic device connected by the second electronic device through the second interaction channel.
It can be understood that the second interaction channels, through which the second electronic device is connected to each third electronic device, are different, and this application refers to, for convenience of distinction, all electronic devices, which are external to the first electronic device and the second electronic device and are connected to the second electronic device through the interaction channels, as third electronic devices.
The first interaction channel and the second interaction channel may also be referred to in the related description of the previous embodiments, and will not be described herein.
S403, establishing a pairing relation between the first electronic device and the third electronic device.
The pairing relationship between the first electronic device and the third electronic device is used for establishing a third interaction channel between the first electronic device and the third electronic device.
For example, in one possible implementation manner, the second electronic device may send, through the first interaction channel, information of at least one third electronic device connected by the second electronic device through the second interaction channel to the first electronic device. On the basis, the first electronic device can send target pairing information to the second electronic device through the first interaction channel, and the second electronic device sends the target pairing information to the third electronic device so as to construct a pairing relation between the first electronic device and the second electronic device based on the target pairing information.
The specific manner in which the second electronic device sends the information of the at least one third electronic device to the first electronic device may be referred to in the foregoing embodiment, for example, the second electronic device may send the paired device list to the first electronic device, which is not described herein.
In order to facilitate understanding of the solution and related benefits of the present application, the following description will be given by taking, as an example, a case where a first electronic device is interconnected with a second electronic device through a first interaction channel, and a second electronic device is interconnected with two third electronic devices through a second interaction channel. In order to facilitate distinguishing the two third electronic devices, the two third electronic devices are referred to as a third electronic device a and a third electronic device B, respectively.
Fig. 5 is a schematic flow interaction diagram of a device pairing method according to an embodiment of the present application. The method of the embodiment can comprise the following steps:
s501, a first interaction channel between the first electronic device and the second electronic device is established based on the paired first pairing information between the first electronic device and the second electronic device.
S502, a second interaction channel A between the second electronic device and the third electronic device A is established based on the paired second pairing information A between the second electronic device and the third electronic device A.
S503, based on the paired second pairing information B between the second electronic device and the third electronic device B, a second interaction channel B between the second electronic device and the third electronic device B is established.
It will be appreciated that the sequence of the above three steps is not limited to that shown in fig. 5, and in practical application, the three interaction channels may be established synchronously according to practical situations, or may be interchanged in sequence, which is not limited.
S504, the first electronic device confirms that the second electronic device is connected through the first interaction channel, and sends a matched list request to the second electronic device through the first interaction channel.
Wherein the paired list request is for requesting a paired device list of the second electronic device.
S505, the second electronic device responds to the paired list request and sends a paired device list to the first electronic device through the first interaction channel.
The paired device list includes: the device identifier of each third electronic device paired with the second electronic device and connected to the interaction channel, and thus, in this embodiment, the paired device list includes: device identification of the third electronic device a and device identification of the third electronic device B.
It may be understood that step S504 is described by taking the example that the first electronic device requests the paired device list of the second electronic device, and in practical application, the second electronic device may actively send the paired device list to the first electronic device after connecting the first electronic device.
S506, aiming at the third electronic equipment A in the paired equipment list, the first electronic equipment generates a communication key A corresponding to the third electronic equipment A, stores the communication key A as pairing information corresponding to the equipment identification of the third electronic equipment A, and sends the communication key A corresponding to the equipment identification of the third electronic equipment A to the second electronic equipment through a first interaction channel.
The sending communication key a may indicate that the device to be received is the third electronic device a, so that the second electronic device may send the communication key a to the third electronic device through the second interaction channel a.
S507, the second electronic device sends the device identifier of the first electronic device and the communication key A to the third electronic device A through the second interaction channel A, so that the third electronic device A stores the communication key A as pairing information corresponding to the device identifier of the first electronic device.
S508, for the third electronic device B in the paired device list, the first electronic device generates a communication key B corresponding to the third electronic device B, stores the communication key B as pairing information corresponding to the device identifier of the third electronic device B, and sends the communication key B corresponding to the device identifier of the third electronic device B to the second electronic device through the first interaction channel.
S509, the second electronic device sends the device identifier of the first electronic device and the communication key B to the third electronic device B through the second interaction channel B, so that the third electronic device B stores the communication key B as pairing information corresponding to the device identifier of the first electronic device.
According to the embodiment, under the condition that the first interaction channel is established between the first electronic device and the second electronic device, the first electronic device can establish a pairing relationship with two third electronic devices connected with the second electronic device through the second electronic device, so that a user does not need to manually scan two-dimension codes generated by the two third electronic devices respectively through the first electronic device to finish pairing, and the complexity of equipment pairing is reduced.
Corresponding to the operation of the device pairing method on the first electronic device side, the application also provides a device pairing device.
Fig. 6 is a schematic structural diagram of a device pairing apparatus according to an embodiment of the present application, where the apparatus of the embodiment is applied to a first electronic device. The apparatus may include:
a first device determining unit 601, configured to determine a second electronic device connected to the first electronic device through a first interaction channel;
A second device determining unit 602, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing processing unit 603 is configured to establish a pairing relationship between the first electronic device and the third electronic device based on the second electronic device, where the pairing relationship is used to establish a third interaction channel between the first electronic device and the third electronic device.
In one possible implementation manner, the first interaction channel is an interaction channel constructed based on first pairing information between the first electronic device and the second electronic device;
the second interaction channel is an interaction channel constructed based on second pairing information between the second electronic device and the third electronic device.
In yet another possible implementation manner, the second device determining unit includes:
a device list determining unit, configured to obtain, through the first interaction channel, a paired device list of the second electronic device, where the paired device list indicates: and at least one third electronic device connected with the second electronic device through a second interaction channel.
In yet another possible implementation, the apparatus further includes:
The reminding output unit is used for outputting an active pairing reminding before the equipment list determining unit obtains the paired equipment list of the second electronic equipment through the first interaction channel, wherein the active pairing reminding is used for reminding a user of confirming whether equipment pairing is started or not;
the device list determination unit includes:
and the equipment list determining subunit is used for acquiring a paired equipment list of the second electronic equipment through the first interaction channel after detecting the confirmation pairing instruction aiming at the active pairing prompt.
In yet another possible implementation, the pairing processing unit includes:
an information generating unit, configured to generate target pairing information between the first electronic device and a third electronic device;
and the information transmission unit is used for transmitting the target pairing information to the third electronic equipment based on the second electronic equipment so that the first electronic equipment and the third electronic equipment have a pairing relation based on the target pairing information.
In yet another possible implementation manner, the information generating unit includes:
a key generation subunit, configured to generate a communication key between the first electronic device and a third electronic device;
The information transmission unit includes:
and the information transmission subunit is used for transmitting the device identification and the communication key of the first electronic device to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relation based on the communication key.
In yet another possible implementation, the apparatus further includes:
an auxiliary information determining unit configured to determine an IP address and a port number of the first electronic device before the information transmitting unit transmits the target pairing information to the third electronic device;
and the auxiliary information sending unit is used for transmitting the IP address and the port number of the first electronic equipment to the third electronic equipment based on the second electronic equipment at the same time or after the information transmission unit transmits the target pairing information to the third electronic equipment, so that the third electronic equipment can establish a third interaction channel with the first electronic equipment based on the pairing relation.
In another aspect, the present application further provides another device pairing apparatus corresponding to the operation of the device pairing method in the present application on the second electronic device side.
As shown in fig. 7, a schematic diagram of a composition structure of yet another device pairing apparatus provided in an embodiment of the present application is shown, where the apparatus is applied to a second electronic device, and includes:
a first determining unit 701, configured to determine a first electronic device connected to a second electronic device through a first interaction channel;
a second determining unit 702, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing-set-up unit 703 is configured to set up a pairing relationship between the first electronic device and the third electronic device, where the pairing relationship is used to set up a third interaction channel between the first electronic device and the third electronic device.
In yet another aspect, the present application further provides an electronic device, as shown in fig. 8, which shows a schematic structural diagram of the electronic device, where the electronic device may be any type of electronic device, and the electronic device includes at least a processor 801 and a memory 802;
wherein the processor 801 is configured to perform the device pairing method according to any one of the embodiments above.
The memory 802 is used to store programs needed for the processor to perform operations.
It is understood that the electronic device may further comprise a display unit 803 and an input unit 804.
Of course, the electronic device may also have more or fewer components than in fig. 8, without limitation.
In another aspect, the present application further provides a computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which are loaded and executed by a processor to implement the device pairing method according to any one of the embodiments above.
The present application also proposes a computer program comprising computer instructions stored in a computer readable storage medium. The computer program is for performing the device pairing method in any one of the embodiments above when running on an electronic device.
It should be understood that in this application, the terms "first," "second," "third," "fourth," and the like in the description and in the claims and in the above figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the present application described herein may be implemented in other sequences than those illustrated herein.
It should be noted that, in the present specification, each embodiment is described in a progressive manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other. Meanwhile, the features described in the embodiments of the present specification may be replaced with or combined with each other to enable those skilled in the art to make or use the present application. For the apparatus class embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference is made to the description of the method embodiments for relevant points.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.

Claims (10)

1. The device pairing method is applied to a first electronic device and comprises the following steps:
determining a second electronic device connected with the first electronic device through a first interaction channel;
determining at least one third electronic device connected with the second electronic device through a second interaction channel;
and establishing a pairing relation between the first electronic device and the third electronic device based on the second electronic device, wherein the pairing relation is used for establishing a third interaction channel between the first electronic device and the third electronic device.
2. The method of claim 1, the first interaction channel being an interaction channel constructed based on first pairing information between the first electronic device and a second electronic device;
the second interaction channel is an interaction channel constructed based on second pairing information between the second electronic device and the third electronic device.
3. The method of claim 2, the determining a third electronic device connected to the second electronic device through a second interaction channel, comprising:
obtaining a paired device list of the second electronic device through the first interaction channel, wherein the paired device list indicates that: and at least one third electronic device connected with the second electronic device through a second interaction channel.
4. The method of claim 3, further comprising, prior to obtaining the paired device list of the second electronic device through the first interaction channel:
outputting an active pairing prompt, wherein the active pairing prompt is used for prompting a user to confirm whether to start equipment pairing;
the obtaining, through the first interaction channel, a paired device list of the second electronic device includes:
and after the confirmation pairing indication aiming at the active pairing prompt is detected, acquiring a paired device list of the second electronic device through the first interaction channel.
5. The method according to any one of claims 1 to 4, wherein the establishing, based on the second electronic device, a pairing relationship between the first electronic device and a third electronic device includes:
generating target pairing information between the first electronic device and the third electronic device;
and transmitting the target pairing information to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relation based on the target pairing information.
6. The method of claim 5, the generating target pairing information between the first electronic device and a third electronic device, comprising:
generating a communication key between the first electronic device and a third electronic device;
the transmitting the target pairing information to the third electronic device based on the second electronic device includes:
and transmitting the device identification and the communication key of the first electronic device to the third electronic device based on the second electronic device so that the first electronic device and the third electronic device have a pairing relationship based on the communication key.
7. The method of claim 5, further comprising, prior to transmitting the target pairing information to the third electronic device:
Determining an IP address and a port number of the first electronic device;
simultaneously or after transmitting the target pairing information to the third electronic device, the method further comprises:
and transmitting the IP address and the port number of the first electronic device to the third electronic device based on the second electronic device, so that the third electronic device can establish a third interaction channel with the first electronic device based on the pairing relationship.
8. The device pairing method is applied to a second electronic device and comprises the following steps:
determining a first electronic device connected with a second electronic device through a first interaction channel;
determining at least one third electronic device connected with the second electronic device through a second interaction channel;
and establishing a pairing relation between the first electronic equipment and the third electronic equipment, wherein the pairing relation is used for establishing a third interaction channel between the first electronic equipment and the third electronic equipment.
9. A device pairing apparatus applied to a first electronic device, comprising:
the first device determining unit is used for determining a second electronic device connected with the first electronic device through a first interaction channel;
A second device determining unit, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing processing unit is used for establishing a pairing relation between the first electronic device and the third electronic device based on the second electronic device, and the pairing relation is used for establishing a third interaction channel between the first electronic device and the third electronic device.
10. A device pairing apparatus applied to a second electronic device, comprising:
the first determining unit is used for determining a first electronic device connected with the second electronic device through a first interaction channel;
a second determining unit, configured to determine at least one third electronic device connected to the second electronic device through a second interaction channel;
the pairing establishing unit is used for establishing a pairing relation between the first electronic equipment and the third electronic equipment, and the pairing relation is used for establishing a third interaction channel between the first electronic equipment and the third electronic equipment.
CN202310304652.3A 2023-03-27 2023-03-27 Equipment pairing method and device Pending CN116347664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310304652.3A CN116347664A (en) 2023-03-27 2023-03-27 Equipment pairing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310304652.3A CN116347664A (en) 2023-03-27 2023-03-27 Equipment pairing method and device

Publications (1)

Publication Number Publication Date
CN116347664A true CN116347664A (en) 2023-06-27

Family

ID=86885273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310304652.3A Pending CN116347664A (en) 2023-03-27 2023-03-27 Equipment pairing method and device

Country Status (1)

Country Link
CN (1) CN116347664A (en)

Similar Documents

Publication Publication Date Title
US11709639B2 (en) Non-transitory computer-readable medium storing computer-readable instructions for terminal device and terminal device
EP3823329A1 (en) Network configuration method and device
US8068866B2 (en) Group communication server
US20180359106A1 (en) Onboarding devices for use in conference room
CN111328076B (en) Equipment network distribution method, device and medium
US10462319B2 (en) Image reading apparatus transmitting device identification information and reading information to push notification server, and method for controlling the image reading apparatus
JP2019114910A (en) Communication apparatus and control method thereof
JP2015534336A (en) Information processing method, priority information transmission method and apparatus
US20070217382A1 (en) Ad hoc network, terminal apparatus, and ad hoc network configuration method used for the same
US10284657B2 (en) Application connection for devices in a network
KR20110028353A (en) Network system, communication terminal, communication method, and communication program
WO2015184689A1 (en) File sharing method based on wireless communication and wireless communication terminal
US11350358B2 (en) Communication device and non-transitory computer-readable medium storing computer-readable instructions for communication device
CN105636166A (en) Method and apparatus for discovery between devices
CN104243765A (en) Image transmission system, image reading communication apparatus, mobile terminal, and method for transmitting image
US9537832B2 (en) Method, system and device for establishing link
JP5609608B2 (en) Information processing apparatus, group generation system, group generation method, and program
KR102197851B1 (en) Method and apparatus for discovery target in device-to-device direct communication
JP2017073747A (en) Communication device, communication device control method, and program
CN116347664A (en) Equipment pairing method and device
CN114826591A (en) Cross-device data transmission method, system and terminal
CN106453574A (en) Mobile terminal broadcast hotspot file sharing method and terminal
JP2005277593A (en) Radio terminal unit, and service search method
CN112269550A (en) Data transmission method and device, terminal equipment and storage medium
JP6724129B2 (en) Imaging terminal, imaging system, imaging method, and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination