CN105516183B - Equipment connection method and device - Google Patents

Equipment connection method and device Download PDF

Info

Publication number
CN105516183B
CN105516183B CN201511028547.3A CN201511028547A CN105516183B CN 105516183 B CN105516183 B CN 105516183B CN 201511028547 A CN201511028547 A CN 201511028547A CN 105516183 B CN105516183 B CN 105516183B
Authority
CN
China
Prior art keywords
equipment
pairing
information
communication connection
connection
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
CN201511028547.3A
Other languages
Chinese (zh)
Other versions
CN105516183A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201511028547.3A priority Critical patent/CN105516183B/en
Publication of CN105516183A publication Critical patent/CN105516183A/en
Application granted granted Critical
Publication of CN105516183B publication Critical patent/CN105516183B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1069Session establishment or de-establishment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

The disclosure provides a device connection method and device, and belongs to the technical field of terminals. The method comprises the following steps: when a pairing instruction is received, broadcasting a specified message, wherein the specified message at least comprises a specified field and identification information of first equipment; receiving a connection establishment request sent by second equipment, wherein the connection establishment request carries identification information of the second equipment, and the connection establishment request is sent by the second equipment after the second equipment detects that the specified message comprises the specified field; establishing a communication connection with the second device in response to the connection establishment request; detecting the triggering operation of each function key on the first equipment to obtain a detection result; and determining whether to pair with the second equipment or not according to the detection result. The method and the device can realize one-to-one connection between the devices, and avoid the situation of control disorder caused by the existence of other devices around the first device and the second device.

Description

Equipment connection method and device
Technical Field
The present disclosure relates to the field of terminal technologies, and in particular, to a device connection method and apparatus.
Background
With the continuous development of terminal technology, the connection establishment mode between terminals is changed from wired connection to wireless connection, and the wireless connection method comprises the following steps: bluetooth connection, infrared connection, and WiFi (Wireless Fidelity) connection, etc.
For example, taking the connection between the remote controller and the smart tv as an example for explanation, the connection method between the remote controller and the smart tv may be: and within the preset distance, if the remote controller sends a connection request to the intelligent television, establishing connection between the remote controller and the intelligent television, wherein the connection can realize the control of the remote controller on the intelligent television.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a device connection method and apparatus.
According to a first aspect of embodiments of the present disclosure, there is provided a device connection method, including:
when a pairing instruction is received, broadcasting a specified message, wherein the specified message at least comprises a specified field and identification information of first equipment;
receiving a connection establishment request sent by second equipment, wherein the connection establishment request carries identification information of the second equipment, and the connection establishment request is sent by the second equipment after detecting that the specified message comprises the specified field;
establishing a communication connection with the second device in response to the connection establishment request;
detecting the triggering operation of each function key on the first equipment to obtain a detection result;
and determining whether to pair with the second equipment or not according to the detection result.
In a first possible implementation manner of the first aspect of the present disclosure, determining whether to pair with the second device according to the detection result includes:
when the detection result is that the triggering operation of the first appointed function key is detected, the first appointed function key is paired with the second equipment, the pairing information of the second equipment is stored, the pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
In a second possible implementation manner of the first aspect of the present disclosure, after the establishing a communication connection with the second device in response to the connection establishment request, the method further includes:
pairing with the second equipment, and pre-storing the pairing information of the first equipment by the second equipment;
accordingly, determining whether to pair with the second device according to the detection result comprises:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
In a third possible implementation manner of the first aspect of the present disclosure, after the broadcasting the specific packet when the pairing instruction is received, the method further includes:
and if the connection establishment request is not received within the preset time length, stopping broadcasting.
According to a second aspect of the embodiments of the present disclosure, there is provided a device connection method including:
when receiving a specified message broadcasted by first equipment, detecting whether the specified message comprises a specified field, wherein the specified message carries identification information of the first equipment;
if the message contains the appointed field, sending a connection establishing request to the first equipment;
establishing a communication connection with the first device;
displaying a countdown interface, wherein the countdown interface displays a countdown process according to a preset time length;
and if the pairing confirmation information sent by the first equipment is received before the countdown is finished, pairing the first equipment and the first equipment, and storing the pairing information of the first equipment.
In a first possible implementation manner of the second aspect of the present disclosure, a countdown interface is displayed, where after the countdown interface displays the countdown process according to a preset time length, the method further includes:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is ended, disconnecting the communication connection with the first equipment.
In a second possible implementation manner of the second aspect of the present disclosure, after establishing the communication connection with the first device, the method further includes:
and pairing with the first equipment, and pre-storing the pairing information of the first equipment.
In a third possible implementation manner of the second aspect of the present disclosure, a countdown interface is displayed, where after the countdown interface displays the countdown process according to a second preset time length, the method further includes:
and if a disconnection request sent by the first equipment is received before the countdown is finished, disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment.
According to a third aspect of the embodiments of the present disclosure, there is provided a device connecting apparatus including:
the broadcast module is used for broadcasting an appointed message when receiving the pairing instruction, wherein the appointed message at least comprises an appointed field and identification information of the first equipment;
a receiving module, configured to receive a connection establishment request sent by a second device, where the connection establishment request carries identification information of the second device, and the connection establishment request is sent by the second device after detecting that the specified packet includes the specified field;
the communication connection module is used for responding to the connection establishment request and establishing communication connection with the second equipment;
the detection module is used for detecting the triggering operation of each function key on the first equipment to obtain a detection result;
and the determining module is used for determining whether to pair with the second equipment or not according to the detection result.
In a first possible implementation manner of the third aspect of the present disclosure, the determining module is configured to:
when the detection result is that the triggering operation of the first appointed function key is detected, the first appointed function key is paired with the second equipment, the pairing information of the second equipment is stored, the pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
In a second possible implementation manner of the third aspect of the present disclosure, the apparatus further includes:
the pairing module is used for pairing with the second equipment, and the second equipment prestores the pairing information of the first equipment;
accordingly, the determination module is to:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
In a third possible implementation manner of the third aspect of the present disclosure, the apparatus further includes:
and the processing module is used for stopping broadcasting if the connection establishing request is not received within the preset time length.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an apparatus connecting device including:
the detection module is used for detecting whether the appointed message comprises an appointed field or not when the appointed message broadcasted by the first equipment is received, wherein the appointed message carries the identification information of the first equipment;
a sending module, configured to send a connection establishment request to the first device if the message includes the specified field;
the communication connection module is used for establishing communication connection with the first equipment;
the display module is used for displaying a countdown interface, and the countdown interface displays a countdown process according to preset duration;
and the pairing module is used for pairing with the first equipment and storing the pairing information of the first equipment if the pairing confirmation information sent by the first equipment is received before the countdown is finished.
In a first possible implementation manner of the fourth aspect of the present disclosure, the apparatus further includes a disconnection module configured to:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is ended, disconnecting the communication connection with the first equipment.
In a second possible implementation manner of the fourth aspect of the present disclosure, the apparatus further includes:
and the processing module is used for pairing with the first equipment and prestoring pairing information of the first equipment.
In a third possible implementation manner of the fourth aspect of the present disclosure, the apparatus further includes:
and the disconnection module is used for disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment if a disconnection request sent by the first equipment is received before the countdown is finished.
In a fifth aspect, there is also provided a device connecting apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a pairing instruction is received, broadcasting a specified message, wherein the specified message at least comprises a specified field and identification information of first equipment;
receiving a connection establishment request sent by second equipment, wherein the connection establishment request carries identification information of the second equipment, and the connection establishment request is sent by the second equipment after detecting that the specified message comprises the specified field;
establishing a communication connection with the second device in response to the connection establishment request;
detecting the triggering operation of each function key on the first equipment to obtain a detection result;
and determining whether to pair with the second equipment or not according to the detection result.
In a sixth aspect, there is also provided a device connecting apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when receiving a specified message broadcasted by first equipment, detecting whether the specified message comprises a specified field, wherein the specified message carries identification information of the first equipment;
if the message contains the appointed field, sending a connection establishing request to the first equipment;
establishing a communication connection with the first device;
displaying a countdown interface, wherein the countdown interface displays a countdown process according to a preset time length;
and if the pairing confirmation information sent by the first equipment is received before the countdown is finished, pairing the first equipment and the first equipment, and storing the pairing information of the first equipment.
The technical scheme provided by the embodiment of the disclosure has the following beneficial effects:
according to the method, the designated message is broadcasted by the first equipment, the second equipment receives the designated message through scanning, if the designated message is detected to include the designated field, communication connection is established firstly to realize basic communication between the first equipment and the second equipment, pairing is completed on the basis of the communication connection to realize that the first equipment sends a control instruction to the second equipment, the purpose of controlling the second equipment is achieved, one-to-one connection between the equipment can be realized, and the condition that control is disordered due to the fact that other multiple equipment exist around the first equipment and the second equipment is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a method of device connection according to an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of device connection according to an example embodiment;
FIG. 3 is a flow chart illustrating a method of device connection according to an example embodiment;
FIG. 4 is a flow chart illustrating a method of device connection according to an example embodiment;
FIG. 5 is a block diagram illustrating a device connection apparatus in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a device connection apparatus in accordance with an exemplary embodiment;
fig. 7 is a block diagram illustrating a device connection apparatus 700 according to an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flow chart illustrating a device connection method according to an exemplary embodiment, as shown in fig. 1, including the following steps.
In step 101, when a pairing instruction is received, a specific message is broadcast, the specific message at least including a specific field and identification information of a first device.
In step 102, a connection establishment request sent by a second device is received, where the connection establishment request carries identification information of the second device, and the connection establishment request is sent by the second device after detecting that the specified packet includes the specified field.
In step 103, a communication connection is established with the second device in response to the establish connection request.
In step 104, the triggering operation of each function key on the first device is detected to obtain a detection result.
In step 105, it is determined whether to pair with the second device according to the detection result.
According to the method provided by the embodiment of the disclosure, a designated message is broadcast by the first device, the second device receives the designated message by scanning, if the designated message is detected to include a designated field, communication connection is established first to realize basic communication between the first device and the second device, and then pairing is completed on the basis of the communication connection to realize that the first device sends a control instruction to the second device, so that the purpose of controlling the second device is achieved, one-to-one connection between devices can be realized, and the situation that control is disordered due to the existence of other devices around the first device and the second device is avoided.
In a first possible implementation manner of the present disclosure, determining whether to pair with the second device according to the detection result includes:
when the detection result is that the triggering operation of the first appointed function key is detected, the first appointed function key is paired with the second equipment, the pairing information of the second equipment is stored, the pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
In a second possible implementation manner of the present disclosure, after establishing a communication connection with the second device in response to the connection establishment request, the method further includes:
pairing with the second equipment, and pre-storing the pairing information of the first equipment by the second equipment;
accordingly, determining whether to pair with the second device according to the detection result comprises:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
In a third possible implementation manner of the present disclosure, after the broadcasting the designated packet when the pairing instruction is received, the method further includes:
and if the connection establishment request is not received within the preset time length, stopping broadcasting.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 2 is a flow chart illustrating a device connection method according to an example embodiment, as shown in fig. 2, including the following steps.
In step 201, when receiving a specific message broadcasted by a first device, detecting whether the specific message includes a specific field, where the specific message carries identification information of the first device.
In step 202, if the message contains the specified field, a request for establishing a connection is sent to the first device.
In step 203, a communication connection is established with the first device.
In step 204, a countdown interface is displayed, which displays a countdown procedure according to a preset duration.
In step 205, if the pairing check information sent by the first device is received before the countdown is finished, pairing with the first device is performed, and the pairing information of the first device is saved.
According to the method provided by the embodiment of the disclosure, a designated message is broadcast by the first device, the second device receives the designated message by scanning, if the designated message is detected to include a designated field, communication connection is established first to realize basic communication between the first device and the second device, and then pairing is completed on the basis of the communication connection to realize that the first device sends a control instruction to the second device, so that the purpose of controlling the second device is achieved, one-to-one connection between devices can be realized, and the situation that control is disordered due to the existence of other devices around the first device and the second device is avoided.
In a first possible implementation manner of the present disclosure, a countdown interface is displayed, and after the countdown interface displays a countdown process according to a preset time length, the method further includes:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is ended, disconnecting the communication connection with the first equipment.
In a second possible implementation manner of the present disclosure, after establishing the communication connection with the first device, the method further includes:
and pairing with the first equipment, and pre-storing the pairing information of the first equipment.
In a third possible implementation manner of the present disclosure, a countdown interface is displayed, and after the countdown interface displays the countdown process according to a second preset time length, the method further includes:
and if a disconnection request sent by the first equipment is received before the countdown is finished, disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
Fig. 3 is a flow chart illustrating a method of device connection according to an example embodiment. Referring to fig. 3, this embodiment specifically includes:
in step 301, when the first device receives the pairing instruction, a specific message is broadcast, and the specific message at least includes a specific field and identification information of the first device.
The first device is used as a control device, and may be a bluetooth remote controller, or may be another control device, which is not limited in this disclosure. The specific message at least includes a specific field and identification information of the first device, where the specific field is used to indicate that the request is a request for implementing a pairing process, the identification information of the first device may be an Identity (ID) of the first device, and is used to uniquely identify the first device, and the identification information of the first device may also be other information capable of uniquely identifying the first device, which is not limited in this embodiment of the disclosure. The specific message may include other information besides the specific field and the identification information of the first device, which is not limited in this disclosure.
The method for triggering the pairing instruction can comprise the following steps: detecting the triggering operation of a designated function key on the first equipment, and if the triggering operation of the designated function key is detected, triggering the pairing instruction, so that the first equipment receives the pairing instruction; the designated function key may be a combined function key formed by a Menu (Menu) function key and a Home (Home) function key, or may be other function keys, which is not limited in this disclosure. If the first device supports a voice function, the receiving method of the pairing instruction may further be: detecting whether the first equipment receives the appointed voice, if so, triggering the pairing instruction, and receiving the pairing instruction by the first equipment; the pairing instruction may also be triggered by other methods, and the triggering manner of the pairing instruction is not limited in the embodiments of the present disclosure.
In step 302, when receiving a specific message broadcasted by a first device, a second device detects whether the specific message includes a specific field, where the specific message carries identification information of the first device. If the specified message includes the specified field, go to step 303; if the specified field is not included in the specified message, the second device resumes the scan state.
The second device is used as a controlled device, and may be a smart television, a television set-top box, or other devices such as a smart phone, which is not limited in the embodiment of the present disclosure; the designated field may be set to a designated value by setting a designated bit in the designated message, and the designated field may also be composed of a character string or a special symbol, and the embodiment of the present disclosure does not limit the composition form of the designated field; the designated field is used for indicating that the first device sending the designated message needs to be paired with other devices so as to control the devices paired with the first device.
It should be noted that before receiving no specific message broadcast by the first device, the second device is in a scanning state to wait for receiving a specific message broadcast by a device that needs to establish a connection; the second device is in a scanning state, so that the condition that the specified message cannot be received can be avoided, and the condition that the connection with other devices cannot be established through the device connection method provided by the disclosure can be further avoided.
In another embodiment of the disclosure, if the second device has established a connection with either device, the second device does not scan until disconnected from the device. So as to avoid receiving other message information and influencing the control of the second device by the device which has established connection with the second device.
The method for the second device to detect whether the designated message includes the designated field may be: and pre-storing information matched with the designated field in the second equipment, matching the information in the designated message with the information pre-stored in the second equipment when the designated message is received, determining that the designated field is included in the designated message if the matching is successful, and determining that the designated field is not included in the designated message if the matching is unsuccessful. Of course, the process of detecting whether the designated message includes the designated field may also be implemented by other methods, which is not limited in this disclosure.
In step 303, if the message contains the specified field, the second device sends a request for establishing a connection to the first device.
The connection establishment request is used for establishing an initial communication connection between the first device and the second device so as to transmit information such as a request without encryption, an instruction and the like.
In another embodiment of the present disclosure, if the connection establishment request is not received within a preset time period, the broadcast is stopped. The preset time length may be determined as any fixed time length, or may be determined by using other methods, which is not limited in the embodiment of the present disclosure. After the preset time length of broadcasting is reached, the connection establishing request is not received, and then broadcasting is stopped, so that energy loss of broadcasting equipment can be reduced, and interference caused by long-time broadcasting to other signals can be avoided.
In step 304, the first device establishes a communication connection with the second device in response to the establish connection request.
The first device receives a connection establishment request sent by a second device, wherein the connection establishment request carries identification information of the second device, and the connection establishment request is sent by the second device after detecting that the designated message comprises the designated field. The identification information of the second device may be a device ID of the second device, or may be other information that can uniquely represent the second device, which is not limited in this embodiment of the disclosure.
After receiving the connection establishment request, the first device responds to the connection establishment request according to the identification information of the second device carried by the connection establishment request, and establishes a communication connection with the second device, wherein the communication connection is used for transmitting information such as a request and an instruction which do not need to be encrypted between the first device and the second device. It should be noted that, after the initial communication connection is established, the first device cannot send a control command to the second device.
The first device establishes communication connection with the second device by responding to the connection establishment request, so that the transmission of unencrypted information between the devices is realized, the basic communication between the first device and the second device can be realized, the first device and the second device are prevented from sending and receiving information in a broadcasting and scanning mode, and the interference to other signals can be avoided.
In step 305, the second device displays a countdown interface, which displays a countdown procedure according to a preset duration.
The preset time length may be determined as any fixed value, or may be determined by other methods, which is not limited in the embodiment of the present disclosure. When the countdown interface displays the countdown process according to the preset time length, the countdown process can be displayed in a designated animation mode, and other display modes can also be used for displaying, which is not limited by the embodiment of the disclosure. In this embodiment of the present disclosure, after the pairing is completed, the first device may send a control instruction to the second device, so as to control the second device.
It should be noted that, if the second device is a device without a display screen, the countdown process with a preset time length and the reminder message whether to confirm pairing may be played in a voice form, and the countdown and reminder purposes may also be achieved by other methods, which is not limited in this disclosure.
In step 306, the first device detects a trigger operation of each function key on the first device to obtain a detection result.
Within the preset time length, the first equipment detects the triggering operation of each function key on the first equipment; and when the triggering operation of different functional keys is detected, the obtained detection results are different.
In step 307, the first device determines whether to pair with the second device according to the detection result.
When the detection result is that the triggering operation of the first appointed function key is detected, the first appointed function key is paired with the second equipment, the pairing information of the second equipment is stored, the pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment; and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment. Wherein the disconnection communication connection request is used for causing the second device to disconnect the communication connection established with the first device; the first designated function key may be an OK function key, or may be another function key, or a combined function key, which is not limited in the embodiment of the present disclosure; the pairing confirmation information may be any character string or any symbol, and the form of the pairing confirmation information is not limited in the embodiment of the present disclosure.
It should be noted that the pairing information of the second device stored by the first device at least includes device information capable of being used to uniquely identify the second device, and may also include other information, which is not limited in this disclosure. Similarly, the pairing information of the first device stored by the second device at least includes device information capable of being used to uniquely identify the first device, and may also include other information, which is not limited by the embodiment of the present disclosure.
In another embodiment of the present disclosure, if the first device does not detect the triggering operation of the function key within the preset duration, the second device automatically disconnects the established communication connection and returns to the scanning state again to receive a new message or other information; the method and the device can avoid the situation that the first equipment cannot send pairing confirmation information to the second equipment due to the fact that the first equipment does not detect the triggering operation of the function key for a long time, and then the second equipment cannot be connected with other equipment.
For example, when the first device is a remote controller, the second device is a smart television, the designated function key is an OK function key, and the preset time duration is 5 minutes, after the initial communication connection is established between the remote controller and the smart television, the screen of the intelligent television displays a countdown process starting from 5 minutes, displays a prompt message whether to confirm the pairing or not, prompts to click an OK function key on a remote controller if the pairing is confirmed, before the countdown is finished, if the remote controller detects that the trigger operation is executed on the OK function key on the remote controller, the step of sending pairing confirmation information to the intelligent television is executed, if the triggering operation of the function keys except the OK function key on the remote controller is detected, a disconnection communication connection request is sent to the intelligent television, if the triggering operation of any function key is not detected, the intelligent television automatically disconnects the established communication connection with the remote controller.
In another embodiment of the present disclosure, since the first device detects the triggering operation of different function keys and sends different information to the second device, the second device may further determine, according to the information received within the preset time duration, the triggered function key in the first device, so as to determine whether to pair with the first device.
For example, when the first device is a remote controller, the second device is a smart television, and the first designated function key is an OK function key, the remote controller detects that information sent by performing a trigger operation on the OK function key is pairing confirmation information, and information sent by performing a trigger operation on a function key other than the OK function key is a request for disconnecting communication connection, if the smart television receives information sent by triggering the OK function key on the remote controller within a preset time period, a subsequent step of establishing connection is executed, and if information sent by triggering the OK function key on the remote controller is not received, or information sent by triggering other function keys other than the OK function key on the remote controller is received, a step of disconnecting established communication connection is executed.
After the second device stores the pairing information of the first device, the connection between the first device and the second device can realize one-to-one connection between the first device and the second device, and can realize the purpose that the first device sends a control instruction to the second device to control the second device; the pairing information of the first device may be a device ID of the first device, a device name that is set for the first device by a user and is different from other devices, or other information, which is not limited in this disclosure.
For example, when the first device is a remote controller and the second device is a smart television, after the smart television stores the pairing information of the remote controller, the remote controller may control the on/off operation of the smart television, and may also control the channel switching operation, the volume adjustment operation, the network connection operation, and the like of the smart television. The operation that the first device can control the second device differs according to the difference between the first device and the second device, and the embodiment of the present disclosure does not limit this.
It should be noted that, after receiving the pairing confirmation information sent by the first device, the method for implementing the pairing procedure between the first device and the second device may be: the first device and the second device respectively generate symmetric keys according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric keys, so that the first device can only control the second device during pairing with the second device; that is, even if there are other control devices or controlled devices around the first device and the second device, the first device can perform one-to-one control of the second device, and the result of control disorder can be avoided. The generated keys may be stored as pairing information in the first device and the second device, respectively.
The pairing process between the first device and the second device may also be implemented by other methods, and the generated key may also be an asymmetric key pair.
It should be noted that, in the above step 305, the process of the second device executing the display countdown may also be performed after the second device and the first device complete an initial pairing process, where the initial pairing process refers to a process of the second device pairing with the first device after establishing a communication connection with the first device, and pre-storing pairing information of the first device. Referring specifically to fig. 4, fig. 4 is a flowchart illustrating a device connection method according to an exemplary embodiment, where the embodiment specifically includes:
in step 401, when the first device receives the pairing instruction, a specific message is broadcast, and the specific message at least includes a specific field and identification information of the first device.
The receiving method of the pairing instruction, the form of the designated message, and the content indicated by the identification information of the first device are the same as the corresponding parts in step 301, and are not described herein again.
In step 402, when receiving a specific message broadcasted by a first device, a second device detects whether the specific message includes a specific field, where the specific message carries identification information of the first device.
Wherein, detecting whether the designated message includes the designated field and the content included in the designated field is the same as the corresponding part in step 302, which is not described herein again.
In step 403, if the message includes the specified field, the second device sends a request for establishing connection to the first device.
The connection establishment request is used for establishing a communication connection between the first device and the second device so as to transmit information such as a request without encryption, an instruction and the like.
In another embodiment of the present disclosure, if the connection establishment request is not received within a preset time period, the broadcast is stopped. The preset time length may be determined as any fixed time length, or may be determined by using other methods, which is not limited in the embodiment of the present disclosure. After the preset time length of broadcasting is reached, the connection establishing request is not received, and then broadcasting is stopped, so that energy loss of broadcasting equipment can be reduced, and interference caused by long-time broadcasting to other signals can be avoided.
In step 404, the first device receives a connection establishment request sent by a second device, where the connection establishment request carries identification information of the second device, and the connection establishment request is sent by the second device after detecting that the specified packet includes the specified field.
After the first device receives the connection establishment request sent by the second device, the first device establishes a communication connection with the second device in response to the connection establishment request. The communication connection is used for transmitting information such as requests, instructions, etc. without encryption between the first device and the second device. It should be noted that, after the communication connection is established, the first device cannot send a control instruction to the second device.
In step 405, the second device is paired with the first device, and the pairing information of the first device is pre-stored.
After the second device prestores the pairing information of the first device, an initial pairing process is completed between the first device and the second device, so that one-to-one connection between the first device and the second device can be realized, and the purpose that the first device sends a control instruction to the second device to control the second device can be realized through the connection. The process of completing the pairing between the second device and the first device is the same as the method of implementing the pairing in step 307, which is not described herein again.
In step 406, the second device displays a countdown interface, which displays a countdown procedure according to a preset duration.
The method for displaying the countdown process by the second device is similar to that of step 305, and is not described herein again. The preset duration may be determined as any fixed value, or may be determined by other methods, which is not limited in this disclosure.
It should be noted that the preset time period may be the same as or different from the preset time period in step 305, and the embodiment of the present invention does not limit this.
Within the preset time length, the first equipment detects the triggering operation of each function key on the first equipment; and if the triggering operation of other function keys except the specified function key is detected, sending a disconnection request to the second equipment. The disconnection request is used to disconnect the connection already established between the first device and the second device, and the specific function key pointed by the designated function key is the same as the corresponding part in step 305, which is not described herein again.
In another embodiment of the present disclosure, if the first device does not detect the triggering operation on any function key on the first device within the preset time period, a disconnection request is sent to the second device, and if the triggering operation on the specified function key is detected, the connection that has been established between the first device and the second device is maintained.
In step 407, the first device detects a trigger operation of each function key on the first device to obtain a detection result.
Within the preset time length, the first equipment detects the triggering operation of each function key on the first equipment; and when the triggering operation of different functional keys is detected, the obtained detection results are different.
In step 408, the first device determines whether to pair with the second device according to the detection result.
When the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment; and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment. Wherein the disconnection communication connection request is used for causing the second device to disconnect the communication connection established with the first device; the first designated function key may be an OK function key, or may be another function key, or a combined function key, which is not limited in the embodiment of the present disclosure; the pairing confirmation information may be any character string or any symbol, and the form of the pairing confirmation information is not limited in the embodiment of the present disclosure.
Specifically, from the perspective of the second device, the following three cases can be used to describe different processing methods for different detection results:
in the first case, if the second device receives the pairing confirmation information sent by the first device before the countdown is finished, the second device pairs with the first device, and stores the pairing information of the first device.
It should be noted that the storage space where the pairing information of the first device is stored after being stored may be the same as or different from the storage space where the pairing information of the first device is pre-stored in step 406. If the data are the same, the data can be prevented from being stored again, so that the result of pairing failure caused by errors in the storage process can be reduced; if the pairing information of the first device is different, the pairing information of the first device may be stored in a certain cache region in the second device when being pre-stored, so as to reduce occupation of other storage spaces, and when the second device receives the pairing confirmation information sent by the first device, the region in which the pairing information of the first device is stored may be a certain fixed storage region in the second device, so as to avoid a situation that the pairing information is lost due to being covered by other storage information.
And in the second case, if the second device receives a disconnection request sent by the first device before the countdown is finished, the communication connection with the first device is disconnected, and the prestored pairing information of the first device is deleted.
It should be noted that, after the communication connection between the first device and the second device is disconnected, the key generated when the connection is established is deleted, the second device resumes the scanning state, and the first device detects whether a pairing instruction is received to wait for establishing a new connection between the devices. The pairing information of the first device stored in the second device can be reserved, so that the connection speed can be increased when the connection with the first device is established again; the pairing information of the first device may also be deleted to reduce the memory usage amount in the second device, and the embodiment of the present disclosure does not limit how the pairing information of the first device that is stored in the second device is processed after the first device and the second device are disconnected.
In the third situation, if the second device does not receive any information sent by the first device before the countdown is finished, the communication connection with the first device is disconnected, and the pre-stored pairing information of the first device is deleted; the specific process is the same as the second case, and is not described herein.
After the information sent by the first equipment is not received before the countdown is finished, the communication connection between the first equipment and the second equipment is disconnected, and the situation that the second equipment cannot finish the pairing process with the first equipment and cannot be paired with other equipment due to the fact that the first equipment cannot detect the triggering operation of the function key for a long time and cannot send pairing confirmation information to the second equipment can be avoided.
According to the method provided by the embodiment of the disclosure, a designated message is broadcast by a first device, the second device receives the designated message by scanning, if the designated message is detected to include a designated field, communication connection is established first to realize basic communication between the first device and the second device, and pairing is completed on the basis of the communication connection to realize that the first device sends a control instruction to the second device, so that the purpose of controlling the second device is achieved, one-to-one connection between the devices can be realized, and the situation that control is disordered due to the existence of other devices around the first device and the second device is avoided; furthermore, after the preset time length of broadcasting is reached, the connection establishment request is not received, and then broadcasting is stopped, so that the energy loss of broadcasting equipment can be reduced, and interference to other signals caused by long-time broadcasting can be avoided; the countdown interface is displayed through the second equipment, so that the purpose of reminding a user can be achieved, and whether the second equipment is the equipment which the first equipment wants to establish connection or not is determined.
FIG. 5 is a block diagram illustrating a device connection apparatus according to an example embodiment. Referring to fig. 5, the apparatus includes a broadcasting module 501, a receiving module 502, a communication connection module 503, a detecting module 504, and a determining module 505.
A broadcasting module 501, configured to broadcast a specific message when receiving a pairing instruction, where the specific message at least includes a specific field and identification information of a first device;
a receiving module 502, configured to receive a connection establishment request sent by a second device, where the connection establishment request carries identification information of the second device, and the connection establishment request is sent by the second device after detecting that the specified packet includes the specified field;
a communication connection module 503, configured to establish a communication connection with the second device in response to the connection establishment request;
a detection module 504, configured to detect a trigger operation of each function key on the first device, to obtain a detection result;
a determining module 505, configured to determine whether to pair with the second device according to the detection result.
In a first possible implementation manner provided by the present disclosure, the determining module 505 is configured to:
when the detection result is that the triggering operation of the first appointed function key is detected, the first appointed function key is paired with the second equipment, the pairing information of the second equipment is stored, the pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
In a second possible implementation manner provided by the present disclosure, the apparatus further includes:
the pairing module is used for pairing with the second equipment, and the second equipment prestores the pairing information of the first equipment;
accordingly, the determining module 505 is configured to:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
In a third possible implementation manner provided by the present disclosure, the apparatus further includes:
and the processing module is used for stopping broadcasting if the connection establishing request is not received within the preset time length.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating a device connection apparatus according to an example embodiment. Referring to fig. 6, the apparatus includes a detection module 601, a transmission module 602, a communication connection module 603, a display module 604, and a pairing module 605.
A detecting module 601, configured to detect whether a specified message broadcasted by a first device includes a specified field when the specified message is received, where the specified message carries identification information of the first device;
a sending module 602, configured to send a connection establishment request to the first device if the message includes the specified field;
a communication connection module 603, configured to establish a communication connection with the first device;
a display module 604, configured to display a countdown interface, where the countdown interface displays a countdown process according to a preset duration;
the pairing module 605 is configured to pair with the first device and store the pairing information of the first device if the pairing confirmation information sent by the first device is received before the countdown is finished.
In a first possible implementation manner provided by the present disclosure, the apparatus further includes a disconnection module, configured to:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is ended, disconnecting the communication connection with the first equipment.
In a second possible implementation manner provided by the present disclosure, the apparatus further includes:
and the processing module is used for pairing with the first equipment and prestoring pairing information of the first equipment.
In a third possible implementation manner provided by the present disclosure, the apparatus further includes:
and the disconnection module is used for disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment if a disconnection request sent by the first equipment is received before the countdown is finished.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram illustrating a device connection apparatus 700 according to an example embodiment. For example, the apparatus 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like; it should be noted that the apparatus may be used to implement the operation performed by the first device in the device connection method provided in this disclosure, and may also be used to implement the operation performed by the second device in the device connection process.
Referring to fig. 7, apparatus 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 704, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the apparatus 700. Examples of such data include instructions for any application or method operating on device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the device 700. The power components 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 700.
The multimedia component 708 includes a screen that provides an output interface between the device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, audio component 710 includes a Microphone (MIC) configured to receive external audio signals when apparatus 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing status assessment of various aspects of the apparatus 700. For example, sensor assembly 714 may detect an open/closed state of device 700, the relative positioning of components, such as a display and keypad of device 700, sensor assembly 714 may also detect a change in position of device 700 or a component of device 700, the presence or absence of user contact with device 700, orientation or acceleration/deceleration of device 700, and a change in temperature of device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the apparatus 700 and other devices. The apparatus 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described device connection methods.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform the above-described device connection method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (17)

1. A device connection method, the method comprising:
when a pairing instruction is received, broadcasting an appointed message, wherein the appointed message at least comprises an appointed field and identification information of first equipment, and the identification information of the first equipment is used for uniquely identifying the first equipment; if the connection establishing request is not received within the preset time length, the broadcasting is stopped; establishing a connection request for establishing an initial communication connection between the first device and the second device;
receiving a connection establishment request sent by second equipment, wherein the connection establishment request carries identification information of the second equipment, the connection establishment request is sent by the second equipment after detecting that the specified message comprises the specified field, the specified field is used for indicating that the connection establishment request is a request for realizing a pairing process, and information matched with the specified field is prestored in the second equipment;
responding to the connection establishment request, establishing an initial communication connection with the second equipment, wherein the initial communication connection is used for transmitting a request or instruction information which does not need encryption between the first equipment and the second equipment, and after the initial communication connection is established, the first equipment cannot send a control instruction to the second equipment;
detecting the triggering operation of each function key on the first equipment to obtain a detection result;
determining whether to pair with the second device or not according to the detection result, wherein when the detection result is that a trigger operation corresponding to a designated function key on the first device is detected, the second device receives pairing confirmation information sent by the first device, the first device and the second device respectively generate symmetric keys according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric keys, so that the first device controls the second device in a one-to-one mode in a manner of sending the control instruction during the pairing of the first device and the second device; and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
2. The method of claim 1, wherein determining whether to pair with the second device according to the detection result comprises:
when the detection result is that the triggering operation of a first appointed function key is detected, pairing with the second equipment, storing pairing information of the second equipment, sending pairing confirmation information to the second equipment, and storing the pairing information of the first equipment by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
3. The method of claim 1, wherein after establishing a communication connection with the second device in response to the connection establishment request, the method further comprises:
pairing with the second equipment, and pre-storing the pairing information of the first equipment by the second equipment;
correspondingly, determining whether to pair with the second device according to the detection result comprises:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
4. A device connection method, the method comprising:
when receiving an appointed message broadcasted by first equipment, detecting whether the appointed message comprises an appointed field, wherein the appointed message carries identification information of the first equipment, the identification information of the first equipment is used for uniquely identifying the first equipment, and information matched with the appointed field is prestored in second equipment; if the first equipment does not receive the connection establishment request within the preset time length, the first equipment stops broadcasting; establishing a connection request for establishing an initial communication connection between the first device and the second device;
if the message contains the specified field, sending a connection establishment request to the first device, wherein the specified field is used for indicating that the connection establishment request is a request for realizing a pairing process;
establishing an initial communication connection with the first device, wherein the initial communication connection is used for transmitting a request or instruction information which does not need to be encrypted between the first device and the second device, and after the initial communication connection is established, the first device cannot send a control instruction to the second device;
displaying a countdown interface, wherein the countdown interface displays a countdown process according to preset time length;
if the pairing confirmation information sent by the first equipment is received before the countdown is finished, pairing with the first equipment and storing the pairing information of the first equipment, wherein the first equipment and the second equipment respectively generate a symmetric key according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric key so as to realize one-to-one control of the first equipment on the second equipment in a mode of sending the control instruction during the pairing of the first equipment and the second equipment;
and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
5. The method of claim 4, wherein a countdown interface is displayed, wherein the countdown interface displays the countdown process at a preset duration, and wherein the method further comprises:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is finished, disconnecting the communication connection with the first equipment.
6. The method of claim 4, wherein after establishing the communication connection with the first device, the method further comprises:
and pairing the first equipment, and pre-storing the pairing information of the first equipment.
7. The method of claim 6, wherein displaying a countdown interface that displays the countdown procedure after a second predetermined length of time, the method further comprising:
and if a disconnection request sent by the first equipment is received before the countdown is finished, disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment.
8. An apparatus for connecting devices, the apparatus comprising:
the device comprises a broadcast module, a matching module and a matching module, wherein the broadcast module is used for broadcasting an appointed message when receiving a matching instruction, the appointed message at least comprises an appointed field and identification information of first equipment, and the identification information of the first equipment is used for uniquely identifying the first equipment;
the processing module is used for stopping broadcasting if the connection establishing request is not received within the preset time length, and the connection establishing request is used for establishing initial communication connection between the first equipment and the second equipment;
a receiving module, configured to receive a connection establishment request sent by a second device, where the connection establishment request carries identification information of the second device, the connection establishment request is sent by the second device after detecting that the specified packet includes the specified field, the specified field is used to indicate that the connection establishment request is a request for implementing a pairing process, and information matched with the specified field is pre-stored in the second device;
a communication connection module, configured to establish an initial communication connection with the second device in response to the connection establishment request, where the initial communication connection is used to transmit a request or instruction information that does not need to be encrypted between the first device and the second device, and after the initial communication connection is established, the first device cannot send a control instruction to the second device;
the detection module is used for detecting the triggering operation of each function key on the first equipment to obtain a detection result; a determining module, configured to determine whether to pair with the second device according to the detection result, where when the detection result is that a trigger operation corresponding to a function key specified on the first device is detected, the second device receives pairing confirmation information sent by the first device, and the first device and the second device respectively generate symmetric keys according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric keys, so that the first device performs one-to-one control on the second device in a manner of sending the control instruction during pairing with the second device; and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
9. The apparatus of claim 8, wherein the determining module is configured to:
when the detection result is that the triggering operation of a first appointed function key is detected, pairing with the second equipment, storing pairing information of the second equipment, sending pairing confirmation information to the second equipment, and storing the pairing information of the first equipment by the second equipment;
and if the triggering operation of other function keys except the first appointed function key is detected, sending a disconnection request to the second equipment.
10. The apparatus of claim 8, further comprising:
the pairing module is used for pairing with the second equipment, and the second equipment prestores the pairing information of the first equipment;
accordingly, the determination module is configured to:
when the detection result is that the triggering operation of a second specified function key is detected, the pairing information of the second equipment is stored, pairing confirmation information is sent to the second equipment, and the pairing information of the first equipment is stored by the second equipment;
and if the trigger operation of other function keys except the second specified function key is detected, sending a disconnection request to the second equipment, and deleting the pre-stored pairing information of the first equipment by the second equipment.
11. An apparatus for connecting devices, the apparatus comprising:
the device comprises a detection module, a first device and a second device, wherein the detection module is used for detecting whether a specified field is included in a specified message when the specified message broadcasted by the first device is received, the specified message carries identification information of the first device, the identification information of the first device is used for uniquely identifying the first device, and information matched with the specified field is prestored in the second device; if the first equipment does not receive the connection establishment request within the preset time length, the first equipment stops broadcasting; establishing a connection request for establishing an initial communication connection between the first device and the second device;
a sending module, configured to send a connection establishment request to the first device if the designated field is included in the message, where the designated field is used to indicate that the connection establishment request is a request for implementing a pairing procedure;
a communication connection module, configured to establish an initial communication connection with the first device, where the initial communication connection is used to transmit a request or instruction information that does not need to be encrypted between the first device and the second device, and after the initial communication connection is established, the first device cannot send a control instruction to the second device;
the display module is used for displaying a countdown interface, and the countdown interface displays a countdown process according to preset duration;
the pairing module is used for pairing with the first equipment and storing the pairing information of the first equipment if the pairing confirmation information sent by the first equipment is received before the countdown is finished, the first equipment and the second equipment respectively generate a symmetric key according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric key; and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
12. The apparatus of claim 11, further comprising a disconnection module to:
if the pairing confirmation information sent by the first equipment is not received before the countdown is finished, disconnecting the communication connection with the first equipment; or the like, or, alternatively,
and if a disconnection request sent by the first equipment is received before the countdown is finished, disconnecting the communication connection with the first equipment.
13. The apparatus of claim 11, further comprising:
and the processing module is used for pairing with the first equipment and pre-storing the pairing information of the first equipment.
14. The apparatus of claim 13, further comprising:
and the disconnection module is used for disconnecting the communication connection with the first equipment and deleting the pre-stored pairing information of the first equipment if a disconnection request sent by the first equipment is received before the countdown is finished.
15. An apparatus connecting device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when a pairing instruction is received, broadcasting an appointed message, wherein the appointed message at least comprises an appointed field and identification information of first equipment, and the identification information of the first equipment is used for uniquely identifying the first equipment; if the connection establishing request is not received within the preset time length, stopping broadcasting, wherein the connection establishing request is used for establishing initial communication connection between the first equipment and the second equipment;
receiving a connection establishment request sent by second equipment, wherein the connection establishment request carries identification information of the second equipment, the connection establishment request is sent by the second equipment after detecting that the specified message comprises the specified field, the specified field is used for indicating that the connection establishment request is a request for realizing a pairing process, and information matched with the specified field is prestored in the second equipment; responding to the connection establishment request, establishing an initial communication connection with the second equipment, wherein the initial communication connection is used for transmitting a request or instruction information which does not need encryption between the first equipment and the second equipment, and after the initial communication connection is established, the first equipment cannot send a control instruction to the second equipment;
detecting the triggering operation of each function key on the first equipment to obtain a detection result;
determining whether to pair with the second equipment or not according to the detection result; when the detection result is that the trigger operation corresponding to the designated function key on the first equipment is detected, the second equipment receives pairing confirmation information sent by the first equipment, the first equipment and the second equipment respectively generate a symmetric key according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric key; and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
16. An apparatus connecting device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
when receiving an appointed message broadcasted by first equipment, detecting whether the appointed message comprises an appointed field, wherein the appointed message carries identification information of the first equipment, the identification information of the first equipment is used for uniquely identifying the first equipment, and information matched with the appointed field is prestored in second equipment; if the first equipment does not receive the connection establishment request within the preset time length, the first equipment stops broadcasting; establishing a connection request for establishing an initial communication connection between the first device and the second device;
if the message contains the specified field, sending a connection establishment request to the first equipment, wherein the identification information of the first equipment is used for uniquely identifying the first equipment;
establishing an initial communication connection with the first device, wherein the initial communication connection is used for transmitting a request or instruction information which does not need to be encrypted between the first device and the second device, and after the initial communication connection is established, the first device cannot send a control instruction to the second device;
displaying a countdown interface, wherein the countdown interface displays a countdown process according to preset time length;
if the pairing confirmation information sent by the first equipment is received before the countdown is finished, pairing with the first equipment and storing the pairing information of the first equipment, wherein the first equipment and the second equipment respectively generate a symmetric key according to the same basic data and the same algorithm, and encrypt and decrypt a control instruction by using the symmetric key so as to realize one-to-one control of the first equipment on the second equipment in a mode of sending the control instruction during the pairing of the first equipment and the second equipment; and if the first equipment does not detect the triggering operation of the function key within the preset time length, the second equipment automatically disconnects the established communication connection and returns to the scanning state again.
17. A computer-readable storage medium storing at least one instruction which, when executed by a processor, implements the device connection method of any one of claims 1-3 or the device connection method of any one of claims 4-7.
CN201511028547.3A 2015-12-30 2015-12-30 Equipment connection method and device Active CN105516183B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201511028547.3A CN105516183B (en) 2015-12-30 2015-12-30 Equipment connection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201511028547.3A CN105516183B (en) 2015-12-30 2015-12-30 Equipment connection method and device

Publications (2)

Publication Number Publication Date
CN105516183A CN105516183A (en) 2016-04-20
CN105516183B true CN105516183B (en) 2020-03-03

Family

ID=55723819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201511028547.3A Active CN105516183B (en) 2015-12-30 2015-12-30 Equipment connection method and device

Country Status (1)

Country Link
CN (1) CN105516183B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105933742A (en) * 2016-04-29 2016-09-07 镇江惠通电子有限公司 Remote control terminal and method for paring same with primary device
CN108307367A (en) * 2018-01-29 2018-07-20 上海康斐信息技术有限公司 A kind of method and system after remote controler upgrading with set-top box Hui Lian
CN109582253B (en) * 2018-10-31 2022-04-22 厦门喵宝科技有限公司 Connection method and device of Bluetooth printer, printer and storage medium
CN110324143B (en) * 2019-05-24 2022-03-11 平安科技(深圳)有限公司 Data transmission method, electronic device and storage medium
CN110223500A (en) * 2019-06-27 2019-09-10 北京小米移动软件有限公司 Infrared equipment control method and device
CN111800890B (en) * 2020-06-30 2023-09-19 联想(北京)有限公司 Processing method and input device
CN114125837A (en) * 2020-08-31 2022-03-01 Oppo广东移动通信有限公司 Equipment network distribution method and device, intelligent desk lamp and storage medium
CN113038449B (en) * 2021-02-01 2022-11-25 深圳创维-Rgb电子有限公司 Device pairing method, device, storage medium and device
CN113055873B (en) * 2021-03-11 2022-09-09 Oppo广东移动通信有限公司 Method and device for identifying devices, electronic device and storage medium
CN113114783B (en) * 2021-04-29 2024-03-26 山西云芯新一代信息技术研究院有限公司 Computer data migration device and method
CN115315025A (en) * 2021-05-08 2022-11-08 广州视源电子科技股份有限公司 Equipment connection method, device, equipment and storage medium
CN115174652B (en) * 2022-06-23 2024-04-02 深圳市元征科技股份有限公司 Communication connection establishment method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505380A (en) * 2008-02-04 2009-08-12 索尼株式会社 Remote controlling apparatus, reception apparatus, and remote control method
CN103544823A (en) * 2012-07-13 2014-01-29 珠海格力电器股份有限公司 Matching method and device for radio frequency remote controller and household appliance
CN103686283A (en) * 2013-12-12 2014-03-26 成都优芯微电子技术有限公司 Smart television remote controller man-machine interaction method
CN105094541A (en) * 2015-06-30 2015-11-25 小米科技有限责任公司 Method, device and system for terminal control

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716901B (en) * 2012-09-28 2017-07-28 联发科技(新加坡)私人有限公司 Method, system and the relevant device connected between equipment
CN103368617A (en) * 2013-06-28 2013-10-23 东莞宇龙通信科技有限公司 Intelligent equipment interactive system and intelligent equipment interactive method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101505380A (en) * 2008-02-04 2009-08-12 索尼株式会社 Remote controlling apparatus, reception apparatus, and remote control method
CN103544823A (en) * 2012-07-13 2014-01-29 珠海格力电器股份有限公司 Matching method and device for radio frequency remote controller and household appliance
CN103686283A (en) * 2013-12-12 2014-03-26 成都优芯微电子技术有限公司 Smart television remote controller man-machine interaction method
CN105094541A (en) * 2015-06-30 2015-11-25 小米科技有限责任公司 Method, device and system for terminal control

Also Published As

Publication number Publication date
CN105516183A (en) 2016-04-20

Similar Documents

Publication Publication Date Title
CN105516183B (en) Equipment connection method and device
EP3038397B1 (en) Method and device for p2p wifi connection
US9769667B2 (en) Methods for controlling smart device
JP6266111B2 (en) Usage authority acquisition method and apparatus
US20160210105A1 (en) Method, device and system for projection on screen
EP3062196A1 (en) Method and apparatus for operating and controlling smart devices with hand gestures
EP3136648A1 (en) Method and device for determining control authority on user device
EP3076716A1 (en) Method and apparatus for network access
CN106453052B (en) Message interaction method and device
EP2978234A1 (en) Method and apparatus for sharing video information
EP3226432B1 (en) Method and devices for sharing media data between terminals
CN106790043B (en) Method and device for sending message in live broadcast application
US10205776B2 (en) Method and device for wireless connection
EP2981116B1 (en) Method and apparatus for accessing wi-fi network and computer program product
EP3076632B1 (en) Method and apparatus for accessing a network
EP3076745B1 (en) Methods and apparatuses for controlling wireless access point
US20170034776A1 (en) Method, apparatus, and system for smart device to access router
CN109451877B (en) Unmanned aerial vehicle control method and device, unmanned aerial vehicle and remote control equipment
EP3182746A1 (en) Method and apparatus for transmitting routing information
EP3048508A1 (en) Methods, apparatuses and devices for transmitting data
US20200067920A1 (en) Method for outputting networking authentication information, networking method, apparatus and storage medium
CN108718439B (en) Data transmission method and device
CN111010721A (en) Wireless network distribution method, wireless network distribution device and computer readable storage medium
EP3896982A1 (en) Method and apparatus for inputting information on display interface, and storage medium
CN107277422B (en) Video call method, device and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant