CN107801253B - Device pairing method, device pairing apparatus and computer-readable storage medium - Google Patents

Device pairing method, device pairing apparatus and computer-readable storage medium Download PDF

Info

Publication number
CN107801253B
CN107801253B CN201710979616.1A CN201710979616A CN107801253B CN 107801253 B CN107801253 B CN 107801253B CN 201710979616 A CN201710979616 A CN 201710979616A CN 107801253 B CN107801253 B CN 107801253B
Authority
CN
China
Prior art keywords
controlled device
remote control
controlled
rssi value
signal
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.)
Active
Application number
CN201710979616.1A
Other languages
Chinese (zh)
Other versions
CN107801253A (en
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.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co 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 Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201710979616.1A priority Critical patent/CN107801253B/en
Publication of CN107801253A publication Critical patent/CN107801253A/en
Application granted granted Critical
Publication of CN107801253B publication Critical patent/CN107801253B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength

Abstract

The invention discloses a device pairing method and device and a computer readable storage medium, and belongs to the technical field of communication. The method is applied to a first controlled device and comprises the following steps: scanning short-range communication signals broadcast by other devices except the first controlled device; when scanning the short-range communication signal broadcast by the remote control equipment, acquiring the physical address of the remote control equipment from the short-range communication signal broadcast by the remote control equipment; when receiving the directive signal sent by the remote control device, the signal receiving angle range of the directive signal is located in the preset angle range based on the physical address of the remote control device and the pairing of the remote control device and the directive signal. According to the invention, other devices except the controlled device in the signal emission direction of the directional signal are less interfered by the directional signal, so that only the controlled device receiving the directional signal is paired with the remote control device, the remote control device can be more accurately paired to the controlled device expected by a user, and the device pairing accuracy is higher.

Description

Device pairing method, device pairing apparatus and computer-readable storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a device pairing method, an apparatus, and a computer-readable storage medium.
Background
With the development of communication technology, two devices can conveniently realize remote control through short-range communication, such as bluetooth remote control through bluetooth technology, and the device capable of controlling of the two devices can be referred to as a remote control device, and the device to be controlled can be referred to as a controlled device. When the remote control device controls the controlled device, the remote control device needs to be paired with the controlled device to authenticate each other, and after the authentication is successful, the remote control device establishes communication connection with the controlled device to control the controlled device through the communication connection.
In the related art, when the remote control device is paired with a controlled device, the remote control device determines, from among a plurality of scanned controlled devices, a controlled device having a maximum RSSI (Received Signal strength indication) value with the remote control device, determines the controlled device having the maximum RSSI value as the controlled device closest to the remote control device, and finally pairs the controlled device closest to the remote control device.
However, the uncertainty of the distribution of the obstacles and the echoes in the environment makes the RSSI value susceptible to environmental interference, and thus the RSSI value may not accurately reflect the distance, for example, the RSSI value between the remote control device and the controlled device at a closer distance may be smaller than the RSSI value between the remote control device and the controlled device at a farther distance. In this case, the RSSI value is directly used to measure the distance in the pairing process and then the pairing operation is performed, so that the remote control device cannot be accurately paired with the controlled device desired by the user, and the device pairing accuracy is low.
Disclosure of Invention
The embodiment of the invention provides a device pairing method, a device and a computer readable storage medium, which can solve the problem of low device pairing accuracy rate in the related art. The technical scheme is as follows:
in a first aspect, a device pairing method is provided, which is applied to a first controlled device, and includes:
scanning short-range communication signals broadcast by devices other than the first controlled device;
when scanning a short-range communication signal broadcast by a remote control device, acquiring a physical address of the remote control device from the short-range communication signal broadcast by the remote control device;
when the directional signal sent by the remote control equipment is received, the signal receiving angle range of the directional signal is located in a preset angle range based on the physical address of the remote control equipment and the remote control equipment for pairing.
Optionally, when receiving the directional signal sent by the remote control device, pairing with the remote control device based on the physical address of the remote control device includes:
when the directional signal sent by the remote control equipment is received, a client interface and a server interface are created;
acquiring a first RSSI value and a second RSSI value based on the client interface and the server interface, wherein the first RSSI value is an RSSI value between the first controlled device and the remote control device, the second RSSI value is an RSSI value between a second controlled device and the remote control device, and the second controlled device is a controlled device which is except the first controlled device and receives the directional signal;
when the first RSSI value and the second RSSI value are successfully acquired, and the maximum RSSI value in the first RSSI value and the second RSSI value is the first RSSI value, pairing with the remote control equipment based on the physical address of the remote control equipment.
Optionally, the obtaining a first RSSI value and a second RSSI value based on the client interface and the server interface includes:
when scanning a short-range communication signal broadcasted by a third controlled device, acquiring a physical address of the third controlled device from the short-range communication signal broadcasted by the third controlled device, wherein the third controlled device is a controlled device except the first controlled device;
connecting with the third controlled device through the client interface and the server interface based on the physical address of the third controlled device;
and when the connection with the third controlled device is successful, taking the third controlled device as the second controlled device, acquiring the first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving the second RSSI value sent by the second controlled device through the server interface.
In a second aspect, a device pairing method is provided, which is applied to a remote control device, and includes:
when a sending instruction for sending a directional signal is received, sending the directional signal, wherein the signal receiving angle range of the directional signal is within a preset angle range;
scanning short-range communication signals broadcast by devices other than the remote control device;
when scanning a short-range communication signal broadcasted by at least one controlled device, selecting one target controlled device from at least one target controlled device in the at least one controlled device as a paired controlled device, wherein the at least one target controlled device is the controlled device which receives the directional signal;
and acquiring the physical address of the paired controlled equipment from the short-range communication signal broadcast by the paired controlled equipment, and pairing the paired controlled equipment based on the physical address of the paired controlled equipment.
Optionally, the directional signal is used to instruct a controlled device receiving the directional signal to create a client interface; when scanning short-range communication signals broadcast by at least one controlled device, selecting one target controlled device from at least one target controlled device in the at least one controlled device as a paired controlled device, including:
when scanning short-range communication signals broadcast by at least one controlled device, creating a server interface;
based on the server interface, obtaining an RSSI value between at least one target controlled device in the at least one controlled device and the remote control device;
and selecting the target controlled device with the maximum RSSI value with the remote control device from the at least one target controlled device as a paired controlled device.
Optionally, the obtaining, based on the server interface, an RSSI value between at least one target controlled device in the at least one controlled device and the remote control device includes:
for each controlled device of the at least one controlled device, acquiring a physical address of the controlled device from a short-range communication signal broadcast by the controlled device;
based on the physical address of the controlled equipment, connecting with the controlled equipment through the server interface;
and when the connection with the controlled equipment is successful, the controlled equipment is used as target controlled equipment, and the RSSI value between the target controlled equipment and the remote control equipment, which is sent by the target controlled equipment, is received through the server interface.
In a third aspect, an apparatus for pairing devices is provided, which is applied to a first controlled device, and includes:
a scanning module for scanning short-range communication signals broadcast by devices other than the first controlled device;
the acquisition module is used for acquiring the physical address of the remote control equipment from the short-range communication signal broadcast by the remote control equipment when the short-range communication signal broadcast by the remote control equipment is scanned;
and the pairing module is used for pairing the remote control equipment based on the physical address of the remote control equipment when receiving the directional signal sent by the remote control equipment, wherein the signal receiving angle range of the directional signal is within a preset angle range.
Optionally, the pairing module comprises:
the creating submodule is used for creating a client interface and a server interface when the directional signal sent by the remote control equipment is received;
an obtaining submodule, configured to obtain a first Received Signal Strength Indication (RSSI) value and a second RSSI value based on the client interface and the server interface, where the first RSSI value is an RSSI value between the first controlled device and the remote control device, the second RSSI value is an RSSI value between a second controlled device and the remote control device, and the second controlled device is a controlled device that receives the directional signal except the first controlled device;
and the pairing sub-module is used for pairing the remote control equipment based on the physical address of the remote control equipment when the first RSSI value and the second RSSI value are successfully acquired and the maximum RSSI value in the first RSSI value and the second RSSI value is the first RSSI value.
Optionally, the obtaining sub-module is configured to:
when scanning a short-range communication signal broadcasted by a third controlled device, acquiring a physical address of the third controlled device from the short-range communication signal broadcasted by the third controlled device, wherein the third controlled device is a controlled device except the first controlled device;
connecting with the third controlled device through the client interface and the server interface based on the physical address of the third controlled device;
and when the connection with the third controlled device is successful, taking the third controlled device as the second controlled device, acquiring the first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving the second RSSI value sent by the second controlled device through the server interface.
In a fourth aspect, an apparatus for pairing devices is provided, which is applied to a remote control device, and includes:
the device comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending a directional signal when receiving a sending instruction for sending the directional signal, and the signal receiving angle range of the directional signal is positioned in a preset angle range;
a scanning module for scanning short-range communication signals broadcast by devices other than the remote control device;
the selecting module is used for selecting one target controlled device from at least one target controlled device in the at least one controlled device as a paired controlled device when scanning a short-range communication signal broadcasted by the at least one controlled device, wherein the at least one target controlled device is the controlled device which receives the directional signal;
and the pairing module is used for acquiring the physical address of the paired controlled equipment from the short-range communication signal broadcast by the paired controlled equipment and pairing the paired controlled equipment based on the physical address of the paired controlled equipment.
Optionally, the directional signal is used to instruct a controlled device receiving the directional signal to create a client interface; the selection module comprises:
the creating sub-module is used for creating a server interface when scanning short-range communication signals broadcast by at least one controlled device;
an obtaining submodule, configured to obtain, based on the server interface, a Received Signal Strength Indication (RSSI) value between at least one target controlled device of the at least one controlled device and the remote control device;
and the selection sub-module is used for selecting the target controlled device with the maximum RSSI value with the remote control device from the at least one target controlled device as a paired controlled device.
Optionally, the obtaining sub-module is configured to:
for each controlled device of the at least one controlled device, acquiring a physical address of the controlled device from a short-range communication signal broadcast by the controlled device;
based on the physical address of the controlled equipment, connecting with the controlled equipment through the server interface;
and when the connection with the controlled equipment is successful, the controlled equipment is used as target controlled equipment, and the RSSI value between the target controlled equipment and the remote control equipment, which is sent by the target controlled equipment, is received through the server interface.
In a fifth aspect, a computer-readable storage medium is provided, which has instructions stored thereon, and when executed by a processor, implements the steps of the device pairing method of the first aspect.
In a sixth aspect, a computer-readable storage medium is provided, which has instructions stored thereon, and when executed by a processor, implements the steps of the device pairing method of the second aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects: when the first controlled device scans the short-range communication signal broadcasted by the remote control device and receives the directional signal sent by the remote control device, the first controlled device can be paired with the remote control device. Since the signal receiving angle range of the directional signal is small, other devices except the controlled device in the signal transmitting direction of the directional signal are less interfered by the directional signal, and therefore only the controlled device receiving the directional signal is paired with the remote control device, the remote control device can be paired to the controlled device expected by the user more accurately, and the device pairing accuracy is high.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment related to a device pairing method provided by an embodiment of the present invention;
fig. 2A is a flowchart of a device pairing method according to an embodiment of the present invention;
fig. 2B is a schematic diagram of a directional signal according to an embodiment of the present invention;
fig. 2C is a schematic diagram of a device pairing process provided by an embodiment of the present invention;
fig. 2D is a schematic diagram of another device pairing process provided by the embodiment of the invention;
fig. 3A is a flowchart of another device pairing method provided by an embodiment of the present invention;
fig. 3B is a schematic diagram of another device pairing process provided by the embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus pairing device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another device pairing apparatus provided in the embodiment of the present invention;
fig. 6 is a schematic structural diagram of another device pairing apparatus provided in the embodiment of the present invention;
fig. 7 is a schematic structural diagram of another apparatus pairing device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
For convenience of understanding, before explaining the embodiments of the present invention in detail, application scenarios and implementation environments related to the embodiments of the present invention will be described.
First, an application scenario according to an embodiment of the present invention will be described.
The embodiment of the invention can be applied to remote control scenes, in particular to scenes in which a user uses the remote control equipment to remotely control the controlled equipment. In daily life, in order to facilitate a user to control the device in a long distance, the remote control device and the controlled device can be paired to be authenticated with each other, after authentication is successful, the remote control device can be in communication connection with the controlled device, and after communication connection is successfully established, the remote control device can control the controlled device. This scenario is illustrated next.
For example, if the user wants to watch a television program, the user can operate the remote controller to pair the remote controller and the television to authenticate each other, the remote controller can establish communication connection with the television after the authentication is successful, and the user can use the remote controller to send a remote control signal to the television after the communication connection is successfully established, so as to control the television to perform operations such as channel switching, volume adjustment, program searching and the like.
Of course, the embodiment of the present invention may be applied not only to the above remote control scenario, but also to other remote control scenarios in practical application, and is not listed here.
Next, an embodiment environment according to the embodiment of the present invention will be described.
Fig. 1 is a schematic diagram of an implementation environment related to a device pairing method according to an embodiment of the present invention. Referring to fig. 1, the implementation environment includes: a remote control device 101 and a controlled device 102.
The remote control device 101 is a device that can control other devices at a distance, and the remote control device 101 can control other devices by sending remote control signals to other devices, for example, the remote control device 101 may be a mobile phone, a remote controller, or the like; the controlled device 102 refers to a device that can be controlled by other devices, and the controlled device 102 can receive a remote control signal sent by other devices and execute operations corresponding to the remote control signal, for example, the controlled device 102 may be a television, an air conditioner, or the like.
The remote control device 101 and the controlled device 102 may be paired in the following two ways.
The first mode is as follows: the remote control device 101 may broadcast a short-range communication signal and transmit a directional signal; the controlled device 102 may pair with the remote control device 101 when scanning a short-range communication signal broadcast by the remote control device 101 and receiving a directional signal transmitted by the remote control device 101.
The second mode is as follows: the remote control device 101 may broadcast a short-range communication signal and transmit a directional signal; the controlled device 102 may broadcast a short-range communication signal; the remote control device 101 may pair with the controlled device 102 when scanning for a short-range communication signal broadcast by the controlled device 102 and determining that the controlled device 102 receives a directional signal.
After the application scenario and the implementation environment related to the embodiment of the present invention are introduced, the following explains the device pairing method provided in the embodiment of the present invention in detail.
Fig. 2A is a flowchart of a device pairing method provided in an embodiment of the present invention, and referring to fig. 2A, the method includes the following steps:
step 201: the remote control device broadcasts a short-range communication signal.
Before the remote control device controls the controlled device, the remote control device needs to broadcast the short-range communication signal, so that the subsequent controlled device can be paired with the remote control device after scanning the short-range communication signal broadcast by the remote control device.
It should be noted that the short-range communication signal refers to a signal used for short-range communication, for example, the short-range communication signal may be a bluetooth signal, a WiFi (Wireless Fidelity) signal, a ZigBee (ZigBee) signal, or the like. The short-range communication signal may carry device-related information for broadcasting the short-range communication signal, such as a physical address, a device identifier, a control identifier, and the like of the device for broadcasting the short-range communication signal.
In addition, the physical address of the device is used to identify the device in the network, which may be a hardware address of a network card in the device, for example, the physical address of the device may be a Media Access Control (MAC) address of the device, and the like. The device identifier of the device is used to uniquely identify the device, and for example, the device identifier of the device may be a name, a model, a factory serial number, and the like of the device. The control identifier of the device is used to indicate whether the device is a remote control device or a controlled device, and when the device is a remote control device, the control identifier of the device may be a preset first identifier, and when the device is a controlled device, the control identifier of the device may be a preset second identifier.
Step 202: when the remote control device receives a transmission instruction for transmitting a directional signal, the directional signal is transmitted.
It should be noted that the transmission instruction is used for transmitting the directional signal, and the transmission instruction may be triggered by a user, and the user may trigger the transmission instruction by a designation operation, and the designation operation may be a click operation, a slide operation, a voice operation, or the like.
In addition, the directional signal has directivity, that is, the directional signal can be transmitted point to point, in other words, the signal receiving angle range of the directional signal is within a preset angle range, and only the controlled device within the signal receiving angle range can receive the directional signal, for example, the directional signal may be an infrared signal, an NFC (Near Field Communication) signal, a LiFi (Light Fidelity) signal, or the like.
Furthermore, the preset angle range may be preset, and the preset angle range may be set to be smaller, for example, the preset angle range may be 5 degrees, 10 degrees, and the like.
For example, as shown in fig. 2B, the preset angle range is 5 degrees, and the signal transmission direction of the directional signal transmitted by the remote control device is
Figure BDA0001439071550000091
The signal reception angle range of the directional signal may be located in the direction
Figure BDA0001439071550000092
The left and right are shifted by 2.5 degrees, and only the devices within the signal receiving angle range can receive the directional signal.
After the remote control device broadcasts a short-range communication signal and transmits the directional signal, for any one controlled device, the controlled device can be paired with the remote control device through the following steps 203-205. For convenience of description, the controlled device will be referred to as a first controlled device hereinafter.
Step 203: the first controlled device scans for short-range communication signals broadcast by devices other than the first controlled device.
It should be noted that the other devices except the first controlled device may be the remote control device, and may also be other controlled devices.
Further, the first controlled device may broadcast the short-range communication signal while scanning the short-range communication signal broadcast by other devices except the first controlled device, and the short-range communication signal broadcast by the first controlled device may carry a physical address, a device identifier, and the like of the first controlled device, or may carry a physical address, a second identifier, and the like of the first controlled device.
Step 204: when the first controlled device scans the short-range communication signal broadcast by the remote control device, the physical address of the remote control device is obtained from the short-range communication signal broadcast by the remote control device.
It should be noted that the short-range communication signal broadcast by the remote control device may carry a physical address, a device identifier, and the like of the remote control device, or may carry a physical address, a first identifier, and the like of the remote control device.
Specifically, when the first controlled device scans the short-range communication signal broadcast by the other device, if the scanned short-range communication signal carries the device identifier or the first identifier of the remote control device, it may be determined that the short-range communication signal broadcast by the remote control device is scanned, and then, the physical address of the remote control device may be obtained from the short-range communication signal broadcast by the remote control device.
Step 205: when the first controlled device receives the directional signal sent by the remote control device, the first controlled device is paired with the remote control device based on the physical address of the remote control device.
It should be noted that, in the embodiment of the present invention, only the controlled device that receives the directional signal may be paired with the remote control device, and at this time, if a user wants to remotely control a certain controlled device, the user may directly aim the remote control device at the controlled device to send the directional signal to the controlled device, so that the controlled device may be paired with the remote control device after receiving the directional signal. Because the signal receiving angle range of the directional signal is smaller, signal interference on other devices except the controlled device aimed at by the remote control device is smaller, so that the remote control device can be paired to the controlled device expected by the user more accurately, and the device pairing accuracy is higher.
Specifically, when the first controlled device receives the directional signal, the first controlled device may be paired with the remote control device directly based on the physical address of the remote control device. Or, when the first controlled device receives the directional signal, a client interface and a server interface can be created; acquiring a first RSSI value and a second RSSI value based on the client interface and the server interface; when the first RSSI value and the second RSSI value are successfully obtained, and the maximum RSSI value in the first RSSI value and the second RSSI value is the first RSSI value, pairing with the remote control equipment based on the physical address of the remote control equipment; and when the first RSSI value and the second RSSI value are not successfully acquired, pairing with the remote control equipment directly based on the physical address of the remote control equipment.
Further, when the first controlled device successfully acquires the first RSSI value and the second RSSI value, but the maximum RSSI value of the first RSSI value and the second RSSI value is not the first RSSI value, the first controlled device may not be paired with the remote control device.
It should be noted that the first RSSI value is an RSSI value between the first controlled device and the remote control device, that is, the first RSSI value is an RSSI value of a signal received by the first controlled device and sent by the remote control device.
In addition, the second RSSI value is an RSSI value between the second controlled device and the remote control device, that is, the second RSSI value is an RSSI value of a signal transmitted by the remote control device and received by the second controlled device, and the second controlled device is a controlled device other than the first controlled device and receiving the directional signal.
Furthermore, when the first controlled device successfully acquires the second RSSI value, it indicates that the second controlled device exists, that is, at this time, a plurality of controlled devices all receive the directional signal; when the first controlled device does not successfully acquire the second RSSI value, it indicates that there is no second controlled device, that is, only one controlled device (i.e., the first controlled device) receives the directional signal.
It should be noted that when a plurality of controlled devices all receive the directional signal, the signal receiving angle range of the directional signal is small, so the positions of the controlled devices receiving the directional signal are relatively close, and the RSSI values between the controlled devices and the remote control device are subjected to the same environmental interference, so the RSSI values between the controlled devices and the remote control device can relatively accurately reflect the distances between the controlled devices and the remote control device. In this case, in the embodiment of the present invention, the controlled device with the largest RSSI value between the plurality of controlled devices and the remote control device is paired with the remote control device, that is, the controlled device with the closest distance between the plurality of controlled devices and the remote control device is paired with the remote control device, so that the remote control device can be accurately paired with the controlled device desired by the user, and the device pairing accuracy is high.
It should be noted that the client interface may be an interface used by the client, and the client may send a message to the server through the client interface; the server interface may be an interface used by the server, and the server may receive a message sent by the client through the server interface and respond to the client through the server interface. The client and the server can be created based on a specified communication protocol, the specified communication protocol can be set in advance, for example, the specified communication protocol can be an OBEX (Object Exchange) protocol, at this time, the client can be an OBEX client, the client interface can be an OBEX socket, the server can be an OBEX server, and the server interface can be an OBEX server socket.
For example, the client may send a request to the server through the client interface, and after receiving the request through the server interface, the server may return an agreement message to the client through the server interface, indicating that the request is agreed. For another example, the client may send information to the server through the client interface, and after receiving the information through the server interface, the server may return a confirmation message to the client through the server interface, indicating that the information has been received.
When the first controlled device acquires the first RSSI value and the second RSSI value based on the client interface and the server interface, the first controlled device may acquire a physical address of a third controlled device from a short-range communication signal broadcast by the third controlled device when scanning the short-range communication signal broadcast by the third controlled device; based on the physical address of the third controlled device, connecting with the third controlled device through the client interface and the server interface; and when the connection with the third controlled device is successful, taking the third controlled device as a second controlled device, acquiring a first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving a second RSSI value sent by the second controlled device through the server interface.
Further, when the first controlled device is not successfully connected to the third controlled device, it may be determined that the first RSSI value and the second RSSI value are not successfully acquired.
It should be noted that the third controlled device is a controlled device other than the first controlled device. Only the controlled device receiving the directional signal can create the client interface and the server interface, and only when two controlled devices both have the client interface and the server interface, the two controlled devices can be successfully connected and mutually transmit information. Therefore, when the first controlled device is successfully connected with a third controlled device, it indicates that the third controlled device has the client interface and the server interface, that is, it indicates that the third controlled device receives the directional signal, so that the third controlled device can be regarded as the second controlled device at this time.
In addition, the first controlled device sends the first RSSI value to the second controlled device through the client interface, so that after the second controlled device receives the first RSSI value, the first RSSI value can be compared with the second RSSI value as the first controlled device, and whether the remote control device is paired or not can be determined based on the comparison result.
When the first controlled device scans the short-range communication signal broadcast by other devices, if the scanned short-range communication signal carries the device identifier or the second identifier of the third controlled device, it may be determined that the short-range communication signal broadcast by the third controlled device is scanned, and then, the physical address of the third controlled device may be obtained from the short-range communication signal broadcast by the third controlled device.
When the first controlled device is connected to the third controlled device through the client interface and the server interface based on the physical address of the third controlled device, the connection between the client interface of the first controlled device and the server interface of the third controlled device may be established based on the physical address of the third controlled device, and the connection between the server interface of the first controlled device and the client interface of the third controlled device may be established, so as to connect the first controlled device and the third controlled device.
When the first controlled device establishes connection between the client interface of the first controlled device and the server interface of the third controlled device, the client of the first controlled device can send a connection request to the server of the third controlled device through the client interface of the first controlled device; when the server of the third controlled device receives the connection request through the server interface of the third controlled device, an agreement message can be returned to the client of the first controlled device through the server interface of the third controlled device; when the client of the first controlled device receives the agreement message through the client interface of the first controlled device, the client interface of the first controlled device successfully establishes connection with the server interface of the third controlled device.
When the first controlled device establishes the connection between the server interface of the first controlled device and the client interface of the third controlled device, the server of the first controlled device can receive a connection request sent by the client of the third controlled device through the client interface of the third controlled device through the server interface of the first controlled device, and returns an agreement message to the client of the third controlled device through the server interface of the first controlled device; when the client of the third controlled device receives the agreement message through the client interface of the third controlled device, the server interface of the first controlled device successfully establishes connection with the client interface of the third controlled device.
It should be noted that, because the first controlled device needs to be paired with the remote control device based on the physical address of the remote control device, in order to avoid that the first controlled device fails to successfully acquire the physical address of the remote control device from the short-range communication signal broadcast by the remote control device, and thus cannot be paired with the remote control device subsequently, the remote control device may also actively send its own physical address to the first controlled device. Specifically, after the remote control device sends the directional signal, a client interface may be created, and then, when the remote control device scans a short-range communication signal broadcast by the first controlled device, a physical address of the first controlled device may be obtained from the short-range communication signal broadcast by the first controlled device, and then, based on the physical address of the first controlled device, a connection between the client interface of the remote control device and the server interface of the first controlled device is established, and when the connection between the client interface of the remote control device and the server interface of the first controlled device is successfully established, the remote control device may send its own physical address to the first controlled device through the client interface of the remote control device.
In addition, in the embodiment of the present invention, a controlled device created with a client interface and a server interface is actually determined as a controlled device that receives the directional signal, so to avoid an erroneous determination of the controlled device that receives the directional signal in the next pairing process, for each controlled device in at least one controlled device (i.e., a first controlled device and a second controlled device) that receives the directional signal in the pairing process, the controlled device may delete the client interface and the server interface after obtaining the first RSSI value and the second RSSI value based on the client interface and the server interface, so that it can be ensured that the controlled device having the client interface and the server interface in each pairing process is the controlled device that receives the directional signal in the pairing process.
Further, if the controlled device is a controlled device paired with the remote control device, in order to avoid that the controlled device is unsuccessfully paired with the remote control device, the controlled device may also delete the client interface and the server interface after acquiring the first RSSI value and the second RSSI value based on the client interface and the server interface, but delete the client interface and the server interface after successfully paired with the remote control device. In this case, if the pairing between the controlled device and the remote control device fails, the controlled device may receive, through the server interface of the controlled device, a pairing failure message sent by the remote control device through the client interface of the remote control device, and perform pairing operation again according to the pairing failure message, so that successful pairing between the controlled device and the remote control device may be ensured.
In an embodiment of the present invention, the remote control device may broadcast a short-range communication signal and transmit a directional signal. When the first controlled device scans the short-range communication signal broadcasted by the remote control device and receives the directional signal sent by the remote control device, the first controlled device can be paired with the remote control device. Since the signal receiving angle range of the directional signal is small, other devices except the controlled device in the signal transmitting direction of the directional signal are less interfered by the directional signal, and therefore only the controlled device receiving the directional signal is paired with the remote control device, the remote control device can be paired to the controlled device expected by the user more accurately, and the device pairing accuracy is high.
For ease of understanding, the device pairing method provided by the above embodiment is illustrated below with reference to fig. 2C and 2D. Assuming that the remote control device is a bluetooth remote controller R, the controlled device is a television TV, the short-range communication signal is a bluetooth signal, and the directional signal is an infrared signal, the following two cases will be described.
In the first case: as shown in fig. 2C, if the user wants to remotely control the TV1, the user can direct the bluetooth remote controller R to the TV1 to emit an infrared signal, which is received by only the TV1, since the distance between the TVs is long, and thus the infrared signal does not interfere with other TVs. In this case, the device pairing process may include the following
Step (1) to step (5).
(1) The Bluetooth remote controller R broadcasts a Bluetooth signal and sends an infrared signal.
(2) The television TV1 scans for bluetooth signals broadcast by other bluetooth devices than itself.
(3) When the television TV1 scans the bluetooth signal broadcast by the bluetooth remote controller R, the physical address of the bluetooth remote controller R is acquired from the bluetooth signal broadcast by the bluetooth remote controller R.
(4) When the television TV1 receives an infrared signal transmitted from the bluetooth remote controller R, a client interface and a server interface are created.
(5) When the TV1 does not successfully acquire the first RSSI value and the second RSSI value based on the client interface and the server interface, it is paired with the bluetooth remote controller R1 based on the physical address of the bluetooth remote controller R.
It should be noted that after the bluetooth remote controller R sends the infrared signal, a client interface may be created, and the physical address of the client interface is sent to the television TV1, so as to ensure that the television TVI can complete subsequent pairing operation based on the physical address of the bluetooth remote controller R.
In the second case: as shown in fig. 2D, if the user wants to remotely control the TV1, the user can direct the bluetooth remote controller R to the TV1 to emit an infrared signal, which will interfere with other TV sets because of the close distance between the TV sets, and the TV sets 1-TVn all receive the infrared signal. In this case, the device pairing process may include the following steps (6) to (10).
(6) The Bluetooth remote controller R broadcasts a Bluetooth signal and sends an infrared signal.
(7) The television TV1 scans for bluetooth signals broadcast by other bluetooth devices than itself.
(8) When the television TV1 scans the bluetooth signal broadcast by the bluetooth remote controller R, the physical address of the bluetooth remote controller R is acquired from the bluetooth signal broadcast by the bluetooth remote controller R.
(9) When the television TV1 receives an infrared signal transmitted from the bluetooth remote controller R, a client interface and a server interface are created.
(10) When the TV1 successfully acquires the RSSI value between the TV1 and the bluetooth remote controller R and the RSSI values between the TV2-TVn and the bluetooth remote controller R based on the client interface and the server interface, if the RSSI value between the TV1 and the bluetooth remote controller R is the largest RSSI value among the acquired RSSI values, it is paired with the bluetooth remote controller R based on the physical address of the bluetooth remote controller R.
It should be noted that after the bluetooth remote controller R sends the infrared signal, a client interface may be created, and the physical address of the client interface is sent to the TV1-TVn, so as to ensure that the TV with the maximum RSSI value between the TV TVI-TVn and the bluetooth remote controller R can complete the subsequent pairing operation based on the physical address of the bluetooth remote controller R.
Fig. 3A is a flowchart of a device pairing method according to an embodiment of the present invention, and referring to fig. 3A, the method includes the following steps:
step 301: when the remote control device receives a transmission instruction for transmitting the directional signal, the directional signal is transmitted.
It should be noted that the transmission instruction is used for transmitting the directional signal, and the transmission instruction may be triggered by a user, and the user may trigger the transmission instruction by a designation operation, and the designation operation may be a click operation, a slide operation, a voice operation, or the like.
In addition, the directional signal has directivity, that is, the directional signal can be transmitted point to point, in other words, the signal receiving angle range of the directional signal is within the preset angle range, and only the controlled device within the signal receiving angle range can receive the directional signal, for example, the directional signal may be an infrared signal, an NFC signal, a LiFi signal, or the like.
Furthermore, the preset angle range may be preset, and the preset angle range may be set to be smaller, for example, the preset angle range may be 5 degrees, 10 degrees, and the like.
Step 302: the remote control device scans for short-range communication signals broadcast by devices other than the remote control device.
It should be noted that the short-range communication signal refers to a signal used for short-range communication, for example, the short-range communication signal may be a bluetooth signal, a WiFi signal, a ZigBee signal, or the like. The short-range communication signal may carry device-related information for broadcasting the short-range communication signal, such as a physical address, a device identifier, a control identifier, and the like of the device for broadcasting the short-range communication signal.
In addition, the physical address of the device is used to identify the device in the network, which may be a hardware address of a network card in the device, for example, the physical address of the device may be a MAC address of the device. The device identifier of the device is used to uniquely identify the device, and for example, the device identifier of the device may be a name, a model, a factory serial number, and the like of the device. The control identifier of the device is used to indicate whether the device is a remote control device or a controlled device, and when the device is a remote control device, the control identifier of the device may be a preset first identifier, and when the device is a controlled device, the control identifier of the device may be a preset second identifier.
Further, the remote control device may broadcast a short-range communication signal while scanning a short-range communication signal broadcast by another device other than the remote control device, where the short-range communication signal broadcast by the remote control device may carry a physical address, a device identifier, and the like of the remote control device, or may carry a physical address, a first identifier, and the like of the remote control device.
Step 303: when the remote control device scans the short-range communication signal broadcast by at least one controlled device, one target controlled device is selected from at least one target controlled device in the at least one controlled device to be used as a matched controlled device.
It should be noted that the short-range communication signal broadcast by each controlled device of the at least one controlled device may carry a physical address and a device identifier of the controlled device, or may carry a physical address and a second identifier of the controlled device.
In addition, the at least one target controlled device is a controlled device that receives the directional signal, and since the signal receiving angle range of the directional signal is small, the at least one target controlled device that receives the directional signal is located closer. The paired controlled device is the controlled device with which the remote control device will be paired subsequently.
When the remote control device scans the short-range communication signal broadcast by other devices, if the scanned short-range communication signal carries the device identifier or the second identifier of the controlled device, it can be determined that the short-range communication signal broadcast by the controlled device is scanned.
The directional signal may be used to instruct the controlled device that receives the directional signal to create a client interface, that is, after the remote control device sends the directional signal, if a certain controlled device receives the directional signal, a client interface may be created. In this case, the operation of step 303 may be: when the remote control device scans the short-range communication signals broadcast by at least one controlled device, a server interface is created; based on the server interface, obtaining an RSSI value between at least one target controlled device in the at least one controlled device and the remote control device; and selecting the target controlled device with the maximum RSSI value with the remote control device from the at least one target controlled device as a paired controlled device.
It should be noted that, since the location of the at least one target controlled device receiving the directional signal is relatively close, the RSSI value between the remote control device and the at least one target controlled device is subjected to the same environmental interference, and thus the RSSI value between the remote control device and the at least one target controlled device can relatively accurately reflect the distance between the remote control device and the at least one target controlled device. In this case, in the embodiment of the present invention, the target controlled device with the largest RSSI value between the remote control device and the at least one target controlled device is used as the paired controlled device, and is subsequently paired with the paired controlled device, that is, the target controlled device closest to the remote control device in the at least one target controlled device is subsequently paired with the remote control device, so that the remote control device can be accurately paired to the controlled device desired by the user, and the device pairing accuracy is high.
It should be noted that the client interface may be an interface used by the client, and the client may send a message to the server through the client interface; the server interface may be an interface used by the server, and the server may receive a message sent by the client through the server interface and respond to the client through the server interface. The client and the server can be realized based on a specified communication protocol, the specified communication protocol can be set in advance, if the specified communication protocol can be an OBEX protocol, the client can be an OBEX client at the moment, a client interface can be an OBEX client socket, the server can be an OBEX server, and a server interface can be an OBEX server socket.
For example, the client may send a request to the server through the client interface, and after receiving the request through the server interface, the server may return an agreement message to the client through the server interface, indicating that the request is agreed. For another example, the client may send information to the server through the client interface, and after receiving the information through the server interface, the server may return a confirmation message to the client through the server interface, indicating that the information has been received.
When the remote control device acquires the RSSI value between at least one target controlled device in the at least one controlled device and the remote control device based on the server interface, for each controlled device in the at least one controlled device, the physical address of the controlled device may be acquired from the short-range communication signal broadcast by the controlled device; based on the physical address of the controlled device, connecting with the controlled device through the server interface; and when the connection with the controlled device is successful, the controlled device is used as a target controlled device, and the RSSI value between the target controlled device and the remote control device, which is sent by the target controlled device, is received through the server interface.
Further, when the remote control device is not successfully connected with the controlled device, it may be determined that the controlled device is not the target controlled device.
Because only the controlled device receiving the directional signal can create the client interface, only when the remote control device has the server interface and the controlled device has the client interface, the remote control device can be successfully connected with the controlled device, and the controlled device can send a message to the remote control device through the client interface. Therefore, when the remote control device is successfully connected with a certain controlled device, the client interface is provided on the controlled device, that is, the directional signal is received by the controlled device, so that the controlled device can be taken as a target controlled device at this time.
It should be noted that, when the remote control device is successfully connected to the controlled device, the controlled device is a target controlled device, and at this time, the target controlled device may send the RSSI between the target controlled device and the remote control device to the remote control device through the client interface of the target controlled device, so that the remote control device may receive the RSSI value through the server interface of the remote control device.
In addition, since the subsequent remote control device needs to be paired with the target controlled device based on the physical address of the target controlled device, in order to avoid the situation that the subsequent remote control device fails to acquire the physical address of the target controlled device from the short-range communication signal broadcast by the target controlled device and cannot be paired with the target controlled device, the target controlled device may send the physical address of the target controlled device to the remote control device through the client interface while sending the RSSI value between the target controlled device and the remote control device to the remote control device through the client interface of the target controlled device.
Furthermore, in the embodiment of the present invention, in practice, the controlled device with the client interface created therein is determined as the target controlled device that receives the directional signal, so to avoid an erroneous determination of the target controlled device in the next pairing process, for each target controlled device in the at least one target controlled device that receives the directional signal in the current pairing process, after the target controlled device sends the RSSI value between the target controlled device and the remote control device to the remote control device through the client interface of the target controlled device, the client interface of the target controlled device may also be deleted, so that it can be ensured that the controlled device with the client interface in each pairing process is the target controlled device that receives the directional signal in the current pairing process.
When the remote control device is connected with the controlled device through the server interface based on the physical address of the controlled device, the connection between the server interface of the remote control device and the client interface of the controlled device can be established based on the physical address of the controlled device. Specifically, the server of the remote control device may receive, through the server interface of the remote control device, a connection request sent by the client of the controlled device through the client interface of the controlled device, and return an agreement message to the client of the controlled device through the server interface of the remote control device; when the client of the controlled device receives the agreement message through the client interface of the controlled device, the server interface of the remote control device successfully establishes connection with the client interface of the controlled device.
Step 304: the remote control device acquires the physical address of the paired controlled device from the short-range communication signal broadcast by the paired controlled device, and performs pairing with the paired controlled device based on the physical address of the paired controlled device.
It should be noted that, in the embodiment of the present invention, the remote control device is only paired with the controlled device that receives the directional signal, and at this time, if a user wants to remotely control a certain controlled device, the user may directly aim the remote control device at the controlled device to send the directional signal to the controlled device, so that the remote control device may be paired with the controlled device that receives the directional signal. Because the signal receiving angle range of the directional signal is smaller, signal interference on other devices except the controlled device aimed at by the remote control device is smaller, so that the remote control device can be paired to the controlled device expected by the user more accurately, and the device pairing accuracy is higher.
In the embodiment of the present invention, after the remote control device sends the directional signal, if a short-range communication signal broadcasted by at least one controlled device is scanned, one target controlled device is selected from at least one target controlled device in the at least one controlled device as a paired controlled device, and is paired with the paired controlled device. Since the at least one target controlled device is the controlled device which receives the directional signal, and the signal receiving angle range of the directional signal is small, the interference of other devices except the controlled device in the signal transmitting direction of the directional signal by the directional signal is small, so that the remote control device is only paired with the controlled device which receives the directional signal at this time, the remote control device can be paired to the controlled device desired by the user more accurately, and the device pairing accuracy is high.
For ease of understanding, the device pairing method provided in the above embodiment is illustrated in the following with reference to fig. 3B. Suppose that the remote control device is a bluetooth remote controller R, the controlled device is a television TV, the short-range communication signal is a bluetooth signal, the directional signal is an infrared signal, and suppose that at least one target television receives the infrared signal. As shown in fig. 3B, if the user wants to remotely control the TV1, the user can direct the bluetooth remote controller R to the TV1 to emit an infrared signal, which will interfere with other TV sets because of the close distance between the TV sets, and the TV sets 1-TVn all receive the infrared signal. In this case, the device pairing process may include the following steps a-E.
Step A: the bluetooth remote controller R sends an infrared signal.
And B: the TV TVs 1-TVn create a client interface upon receiving the infrared signal transmitted by the Bluetooth remote controller R.
And C: the bluetooth remote controller R scans bluetooth signals broadcast by other bluetooth devices than itself.
Step D: the bluetooth remote controller R scans a bluetooth signal of at least one TV broadcast, creates a server interface, acquires an RSSI value between at least one target TV1-TVn of the at least one TV and the bluetooth remote controller R based on the server interface, and selects a target TV1 having a maximum RSSI value with the bluetooth remote controller R from the at least one target TV1-TVn as a paired TV 1.
Step E: the bluetooth remote controller R acquires the physical address of the paired television TV1 from the bluetooth signal broadcast from the paired television TV1, and pairs with the paired television TV1 based on the physical address of the paired television TV 1.
After the specific implementation process of the device pairing method is described in the above embodiment, the device pairing apparatus according to the embodiment of the present invention is described below.
Fig. 4 is a schematic structural diagram of an apparatus pairing device according to an embodiment of the present invention, which is applied to a first controlled apparatus. Referring to fig. 4, the apparatus includes: a scanning module 401, an obtaining module 402 and a pairing module 403.
A scanning module 401, configured to scan short-range communication signals broadcast by devices other than the first controlled device;
an obtaining module 402, configured to, when scanning a short-range communication signal broadcast by a remote control device, obtain a physical address of the remote control device from the short-range communication signal broadcast by the remote control device;
the pairing module 403 is configured to pair with the remote control device based on the physical address of the remote control device when receiving the directional signal sent by the remote control device, where a signal receiving angle range of the directional signal is within a preset angle range.
Optionally, comprising:
the creating submodule is used for creating a client interface and a server interface when the directional signal sent by the remote control equipment is received;
the acquisition submodule is used for acquiring a first RSSI value and a second RSSI value based on the client interface and the server interface, wherein the first RSSI value is an RSSI value between the first controlled equipment and the remote control equipment, the second RSSI value is an RSSI value between the second controlled equipment and the remote control equipment, and the second controlled equipment is controlled equipment which is except the first controlled equipment and receives the directional signal;
and the pairing submodule is used for pairing the remote control equipment based on the physical address of the remote control equipment when the first RSSI value and the second RSSI value are successfully acquired and the maximum RSSI value in the first RSSI value and the second RSSI value is the first RSSI value.
Optionally, the obtaining sub-module is configured to:
when scanning a short-range communication signal broadcasted by a third controlled device, acquiring a physical address of the third controlled device from the short-range communication signal broadcasted by the third controlled device, wherein the third controlled device is a controlled device except the first controlled device;
based on the physical address of the third controlled device, connecting with the third controlled device through the client interface and the server interface;
and when the connection with the third controlled device is successful, taking the third controlled device as the second controlled device, acquiring a first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving a second RSSI value sent by the second controlled device through the server interface.
In the embodiment of the present invention, when the first controlled device scans the short-range communication signal broadcast by the remote control device and receives the directional signal sent by the remote control device, the first controlled device may pair with the remote control device. Since the signal receiving angle range of the directional signal is small, other devices except the controlled device in the signal transmitting direction of the directional signal are less interfered by the directional signal, and therefore only the controlled device receiving the directional signal is paired with the remote control device, the remote control device can be paired to the controlled device expected by the user more accurately, and the device pairing accuracy is high.
Fig. 5 is a schematic structural diagram of an apparatus pairing device according to an embodiment of the present invention, which is applied to a remote control apparatus. Referring to fig. 5, the apparatus includes: a sending module 501, a scanning module 502, a selecting module 503 and a pairing module 504.
A sending module 501, configured to send a directional signal when a sending instruction for sending the directional signal is received, where a signal receiving angle range of the directional signal is within a preset angle range;
a scanning module 502 for scanning short-range communication signals broadcast by devices other than the remote control device;
a selecting module 503, configured to select, when scanning the short-range communication signal broadcast by at least one controlled device, one target controlled device from at least one target controlled device in the at least one controlled device as a paired controlled device, where the at least one target controlled device is the controlled device that receives the directional signal;
a pairing module 504, configured to obtain a physical address of the paired controlled device from the short-range communication signal broadcast by the paired controlled device, and pair with the paired controlled device based on the physical address of the paired controlled device.
Optionally, the directional signal is used to instruct the controlled device receiving the directional signal to create a client interface; the selection module 503 includes:
the creating sub-module is used for creating a server interface when scanning short-range communication signals broadcast by at least one controlled device;
the obtaining submodule is used for obtaining an RSSI value between at least one target controlled device in the at least one controlled device and the remote control device based on the server interface;
and the selection sub-module is used for selecting the target controlled device with the maximum RSSI value with the remote control device from the at least one target controlled device as a paired controlled device.
Optionally, the obtaining sub-module is configured to:
for each controlled device in the at least one controlled device, acquiring a physical address of the controlled device from the short-range communication signal broadcast by the controlled device;
based on the physical address of the controlled device, connecting with the controlled device through the server interface;
and when the connection with the controlled device is successful, the controlled device is used as a target controlled device, and the RSSI value between the target controlled device and the remote control device, which is sent by the target controlled device, is received through the server interface.
In the embodiment of the present invention, after the remote control device sends the directional signal, if a short-range communication signal broadcasted by at least one controlled device is scanned, one target controlled device is selected from at least one target controlled device in the at least one controlled device as a paired controlled device, and is paired with the paired controlled device. Since the at least one target controlled device is the controlled device which receives the directional signal, and the signal receiving angle range of the directional signal is small, the interference of other devices except the controlled device in the signal transmitting direction of the directional signal by the directional signal is small, so that the remote control device is only paired with the controlled device which receives the directional signal at this time, the remote control device can be paired to the controlled device desired by the user more accurately, and the device pairing accuracy is high.
It should be noted that: in the device pairing apparatus provided in the above embodiment, only the division of the above functional modules is used for illustration when pairing, and in practical applications, the above function allocation may be completed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the above described functions. In addition, the device pairing apparatus and the device pairing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments in detail and are not described herein again.
Fig. 6 is a schematic structural diagram of an apparatus for device pairing according to an embodiment of the present invention, where the apparatus may be a first controlled device, and referring to fig. 6, the apparatus includes at least one processor 601, a communication bus 602, a memory 603, and at least one communication interface 604.
The processor 601 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to control the execution of the routines of the present invention.
The communication bus 602 may include a path that conveys information between the aforementioned components.
The Memory 603 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by the apparatus, but is not limited to such. The memory 603 may be separate and coupled to the processor 601 through a communication bus 602. The memory 603 may also be integrated with the processor 601.
The communication interface 604 may be any device, such as a transceiver, for communicating with other devices or communication Networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
In particular implementations, processor 601 may include one or more CPUs such as CPU0 and CPU1 shown in fig. 6 as an example.
In particular implementations, the apparatus may include multiple processors, such as processor 601 and processor 605 shown in FIG. 6, for example, as an example. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
Wherein, the memory 603 is used for storing the program code 610 for executing the embodiment of the present invention, and the processor 601 is used for executing the program code 610 stored in the memory 603. The apparatus may implement the operations performed by the first controlled device in the embodiment of fig. 2A through the processor 601 and the program code 610 in the memory 603.
Fig. 7 is a schematic structural diagram of an apparatus for pairing devices, which may be a remote control device according to an embodiment of the present invention, and referring to fig. 7, the apparatus includes at least one processor 701, a communication bus 702, a memory 703 and at least one communication interface 704.
The processor 701 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to control the execution of routines according to the present invention.
The communication bus 702 may include a path that conveys information between the aforementioned components.
The Memory 703 may be, but is not limited to, a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by the apparatus. The memory 703 may be separate and coupled to the processor 701 via a communication bus 702. The memory 703 may also be integrated with the processor 701.
The communication interface 704 may be any device, such as a transceiver, for communicating with other devices or communication Networks, such as ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
In particular implementations, processor 701 may include one or more CPUs such as CPU0 and CPU1 shown in fig. 7 for one embodiment.
In particular implementations, the apparatus may include multiple processors, such as processor 701 and processor 705 shown in fig. 7, for example, as an example. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
The memory 703 is used for storing program codes 710 for executing the embodiment of the present invention, and the processor 701 is used for executing the program codes 710 stored in the memory 703. The apparatus may implement the operations performed by the remote control device in the embodiment of fig. 3A described above through the processor 701 and the program code 710 in the memory 703.
In the above embodiments, the implementation may be wholly or partly realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with embodiments of the invention, to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., Digital Versatile Disk (DVD)), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A device pairing method is applied to a first controlled device, and comprises the following steps:
scanning short-range communication signals broadcast by devices other than the first controlled device; when scanning a short-range communication signal broadcast by a remote control device, acquiring a physical address of the remote control device from the short-range communication signal broadcast by the remote control device;
when a directional signal sent by the remote control equipment is received, a client interface and a server interface are created, a first Received Signal Strength Indication (RSSI) value and a second RSSI value are obtained based on the client interface and the server interface, when the first RSSI value and the second RSSI value are successfully obtained and the maximum RSSI value in the first RSSI value and the second RSSI value is the first RSSI value, the remote control equipment is paired based on a physical address of the remote control equipment, and when the first RSSI value and the second RSSI value are not successfully obtained, the remote control equipment is paired based on the physical address of the remote control equipment;
the directional signal has directivity, and a signal receiving angle range of the directional signal is within a preset angle range, the first RSSI value is an RSSI value between the first controlled device and the remote control device, the second RSSI value is an RSSI value between the second controlled device and the remote control device, and the second controlled device is a controlled device other than the first controlled device that receives the directional signal;
after obtaining the first RSSI value and the second RSSI value based on the client interface and the server interface, the method further comprises:
deleting the client interface and the server interface;
the obtaining a first Received Signal Strength Indication (RSSI) value and a second RSSI value based on the client interface and the server interface comprises:
when scanning a short-range communication signal broadcasted by a third controlled device, acquiring a physical address of the third controlled device from the short-range communication signal broadcasted by the third controlled device, wherein the third controlled device is a controlled device except the first controlled device; connecting with the third controlled device through the client interface and the server interface based on the physical address of the third controlled device;
and when the connection with the third controlled device is successful, taking the third controlled device as the second controlled device, acquiring the first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving the second RSSI value sent by the second controlled device through the server interface.
2. A device pairing method, applied to a remote control device, the method comprising:
when a sending instruction for sending a directional signal is received, sending the directional signal, wherein the directional signal has directivity, the signal receiving angle range of the directional signal is within a preset angle range, and the directional signal is used for indicating a controlled device receiving the directional signal to create a client interface based on a specified communication protocol;
scanning short-range communication signals broadcast by devices other than the remote control device; when scanning short-range communication signals broadcast by at least one controlled device, creating a server interface; acquiring a Received Signal Strength Indication (RSSI) value between at least one target controlled device in the at least one controlled device and the remote control device based on the server interface; selecting a target controlled device with the maximum RSSI value with the remote control device from at least one target controlled device in the at least one controlled device as a paired controlled device, wherein the at least one target controlled device is the controlled device which receives the directional signal;
the method comprises the steps that a physical address of paired controlled equipment is obtained from a short-range communication signal broadcasted by the paired controlled equipment, and the paired controlled equipment is paired with the paired controlled equipment based on the physical address of the paired controlled equipment, the paired controlled equipment is used for deleting a client interface and a server interface after a first Received Signal Strength Indication (RSSI) value and a second RSSI value are obtained based on the client interface and the server interface, the at least one controlled equipment comprises a first controlled equipment, the first RSSI value is an RSSI value between the first controlled equipment and the remote control equipment, the second RSSI value is an RSSI value between a second controlled equipment and the remote control equipment, and the second controlled equipment is a controlled equipment which is except the first controlled equipment and receives a directional signal;
the obtaining, based on the server interface, an RSSI value between at least one target controlled device of the at least one controlled device and the remote control device includes:
for each controlled device of the at least one controlled device, acquiring a physical address of the controlled device from a short-range communication signal broadcast by the controlled device; based on the physical address of the controlled equipment, connecting with the controlled equipment through the server interface; and when the connection with the controlled equipment is successful, the controlled equipment is used as target controlled equipment, and the RSSI value between the target controlled equipment and the remote control equipment, which is sent by the target controlled equipment, is received through the server interface.
3. An apparatus for pairing devices, applied to a first controlled device, the apparatus comprising:
a scanning module for scanning short-range communication signals broadcast by devices other than the first controlled device;
the acquisition module is used for acquiring the physical address of the remote control equipment from the short-range communication signal broadcast by the remote control equipment when the short-range communication signal broadcast by the remote control equipment is scanned;
a pairing module, configured to create a client interface and a server interface when a directional signal sent by the remote control device is received, acquire a first Received Signal Strength Indication (RSSI) value and a second RSSI value based on the client interface and the server interface, pair with the remote control device based on a physical address of the remote control device when the first RSSI value and the second RSSI value are successfully acquired and a maximum RSSI value of the first RSSI value and the second RSSI value is the first RSSI value, and pair with the remote control device based on the physical address of the remote control device when the first RSSI value and the second RSSI value are not successfully acquired;
the directional signal has directivity, and the signal receiving angle range of the directional signal is within a preset angle range, the first RSSI value is an RSSI value between the first controlled device and the remote control device, the second RSSI value is an RSSI value between the second controlled device and the remote control device, and the second controlled device is a controlled device other than the first controlled device that receives the directional signal;
the apparatus further comprises means for deleting the client interface and the server interface after obtaining a first received signal strength indication, RSSI, value and a second RSSI value based on the client interface and the server interface;
the pairing module is further to:
when scanning a short-range communication signal broadcasted by a third controlled device, acquiring a physical address of the third controlled device from the short-range communication signal broadcasted by the third controlled device, wherein the third controlled device is a controlled device except the first controlled device; connecting with the third controlled device through the client interface and the server interface based on the physical address of the third controlled device;
and when the connection with the third controlled device is successful, taking the third controlled device as the second controlled device, acquiring the first RSSI value, sending the first RSSI value to the second controlled device through the client interface, and receiving the second RSSI value sent by the second controlled device through the server interface.
4. An apparatus for pairing devices, applied to a remote control device, the apparatus comprising:
the device comprises a sending module, a receiving module and a processing module, wherein the sending module is used for sending a directional signal when receiving a sending instruction for sending the directional signal, the directional signal has directivity, the signal receiving angle range of the directional signal is located in a preset angle range, and the directional signal is used for indicating a controlled device receiving the directional signal to create a client interface based on a specified communication protocol;
a scanning module for scanning short-range communication signals broadcast by devices other than the remote control device;
the selection module is used for creating a server interface when scanning short-range communication signals broadcast by at least one target controlled device; acquiring a Received Signal Strength Indication (RSSI) value between at least one target controlled device in the at least one controlled device and the remote control device based on the server interface; selecting a target controlled device with the maximum RSSI value with the remote control device from the at least one target controlled device as a paired controlled device, wherein the at least one target controlled device is the controlled device which receives the directional signal;
a pairing module, configured to acquire a physical address of a paired controlled device from a short-range communication signal broadcast by the paired controlled device, and pair the paired controlled device with the paired controlled device based on the physical address of the paired controlled device, where the paired controlled device is configured to delete a client interface and a server interface after acquiring a first Received Signal Strength Indication (RSSI) value and a second RSSI value based on the client interface and the server interface, where the at least one controlled device includes a first controlled device, the first RSSI value is an RSSI value between the first controlled device and the remote control device, the second RSSI value is an RSSI value between a second controlled device and the remote control device, and the second controlled device is a controlled device other than the first controlled device that receives the directional signal;
the selection module is further configured to:
for each controlled device of the at least one controlled device, acquiring a physical address of the controlled device from a short-range communication signal broadcast by the controlled device; based on the physical address of the controlled equipment, connecting with the controlled equipment through the server interface; and when the connection with the controlled equipment is successful, the controlled equipment is used as target controlled equipment, and the RSSI value between the target controlled equipment and the remote control equipment, which is sent by the target controlled equipment, is received through the server interface.
5. A computer readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of the method of claim 1.
6. A computer readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the steps of the method of claim 2.
CN201710979616.1A 2017-10-19 2017-10-19 Device pairing method, device pairing apparatus and computer-readable storage medium Active CN107801253B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710979616.1A CN107801253B (en) 2017-10-19 2017-10-19 Device pairing method, device pairing apparatus and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710979616.1A CN107801253B (en) 2017-10-19 2017-10-19 Device pairing method, device pairing apparatus and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN107801253A CN107801253A (en) 2018-03-13
CN107801253B true CN107801253B (en) 2021-02-09

Family

ID=61533541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710979616.1A Active CN107801253B (en) 2017-10-19 2017-10-19 Device pairing method, device pairing apparatus and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN107801253B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109697840A (en) * 2018-12-28 2019-04-30 东莞亿动智能科技有限公司 Automatic frequency aligning method and device
JP7147638B2 (en) * 2019-03-11 2022-10-05 トヨタ自動車株式会社 Communication system and information processing program
CN112261572A (en) * 2020-10-14 2021-01-22 北京小米移动软件有限公司 Information interaction method and device and storage medium
CN112333510A (en) * 2020-11-13 2021-02-05 四川长虹电器股份有限公司 Method for optimizing pairing of Bluetooth remote controllers by using nfc

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202816137U (en) * 2012-06-07 2013-03-20 敦樸企业股份有限公司 Remote controller pairing system
CN105589345A (en) * 2014-11-18 2016-05-18 小米科技有限责任公司 Apparatus control method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954979A (en) * 2014-03-27 2015-09-30 张兆龙 Wireless network authentication and authorization method and apparatus
CN105407453A (en) * 2015-11-23 2016-03-16 深圳还是威健康科技有限公司 Bluetooth pairing method and device
CN106204817B (en) * 2016-06-24 2018-05-01 福建求实智能股份有限公司 A kind of control method of control of bluetooth access
CN107067695A (en) * 2017-05-15 2017-08-18 深圳市冠旭电子股份有限公司 A kind of intelligent distant control method, system and intelligent remote controller

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202816137U (en) * 2012-06-07 2013-03-20 敦樸企业股份有限公司 Remote controller pairing system
CN105589345A (en) * 2014-11-18 2016-05-18 小米科技有限责任公司 Apparatus control method and device

Also Published As

Publication number Publication date
CN107801253A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN107801253B (en) Device pairing method, device pairing apparatus and computer-readable storage medium
CN110267327B (en) Service transmission method and device
US9014094B2 (en) Main hub, sub hub, and sensor node communicating in wireless body area network (WBAN) including at least one sub hub, and communication method thereof
CN103067055A (en) Bluetooth connecting method and mobile terminal
WO2020024756A1 (en) Communication method and apparatus
US20120249300A1 (en) Determination of location using rssi and transmit power
US10154384B2 (en) Systems and methods for back channel communication
KR20210034270A (en) Electronic device for determinig path of line of sight(los) and method for the same
US11582606B2 (en) Terminal verification method, and AP device, terminal and system
CN111903177B (en) Method and device for identifying target equipment
US9894616B2 (en) Delegating WiFi network discovery and traffic monitoring
CN106455049B (en) Positioning method and device based on wireless local area network
CN103458057A (en) Resource acquiring method, device and server
KR20190043017A (en) Electronic device for controlling data communication of external electronic device and communication system thereof
US20220225254A1 (en) Method for processing timing advance ta of terminal, and apparatus
CN108809496B (en) Information processing method and equipment
US9161330B2 (en) Method of enabling single chain ranging operations
US20140286323A1 (en) Wireless network system and connecting method thereof
US20230106424A1 (en) Method of reporting received signal strength on per frame basis in wi-fi network
US11457446B2 (en) Method, terminal device and computer storage medium for beam selection based on geographical positions of terminal devices
EP2631989B1 (en) Managing antennas on an access point in a wireless network
US10045272B2 (en) Method for connecting to access point in WLAN system and electronic device thereof
GB2514548A (en) Method of configuring a high-frequency radio module, associated multiband radio communication device and system
KR20200133587A (en) Apparatus and method for providing different service according to area based on beam book information
US10206234B2 (en) D2D communication control method, D2D communication method, and apparatuses thereof

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
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co., Ltd

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: HISENSE ELECTRIC Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant