WO2016082512A1 - Bluetooth pairing method, device and system - Google Patents
Bluetooth pairing method, device and system Download PDFInfo
- Publication number
- WO2016082512A1 WO2016082512A1 PCT/CN2015/080605 CN2015080605W WO2016082512A1 WO 2016082512 A1 WO2016082512 A1 WO 2016082512A1 CN 2015080605 W CN2015080605 W CN 2015080605W WO 2016082512 A1 WO2016082512 A1 WO 2016082512A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bluetooth device
- bluetooth
- pairing information
- pairing
- matching
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000033001 locomotion Effects 0.000 claims abstract description 221
- 230000004044 response Effects 0.000 claims description 80
- 238000004891 communication Methods 0.000 claims description 27
- 238000013507 mapping Methods 0.000 claims description 4
- 230000002093 peripheral effect Effects 0.000 abstract 1
- 230000009471 action Effects 0.000 description 31
- 230000001133 acceleration Effects 0.000 description 24
- 238000010586 diagram Methods 0.000 description 17
- 230000005484 gravity Effects 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009466 transformation Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B5/00—Near-field transmission systems, e.g. inductive or capacitive transmission systems
Definitions
- the present invention relates to the field of communications, and in particular, to a Bluetooth pairing method, apparatus, and system.
- Bluetooth is a radio technology that supports short-range communication of devices. Two Bluetooth devices can pair the matching codes input by the user after the Bluetooth function is turned on, and then wirelessly connect through Bluetooth.
- a MAC (Media Access Control) address of a Bluetooth device can be exchanged through a device other than the Bluetooth module, thereby acquiring a MAC address of another Bluetooth device, and then performing Bluetooth matching, for example, two A Bluetooth device is connected to the smart hub, and the MAC address of another Bluetooth device is obtained through the smart hub, so that the two Bluetooth devices can perform Bluetooth matching; the MAC address of the Bluetooth device is converted into sound wave transmission through the voice input/transmit device, and the other Bluetooth device After receiving the sound wave, it performs conversion, searches for the matching MAC address, and then performs Bluetooth matching.
- the prior art needs to add new hardware to the original Bluetooth module, which increases the cost, and the Bluetooth matching process is inefficient.
- the embodiment of the invention provides a Bluetooth pairing method, device and system, which improves the convenience of Bluetooth pairing, reduces the cost, and improves the efficiency of the Bluetooth matching process.
- a first aspect of the embodiments of the present invention provides a Bluetooth pairing method, including:
- the first Bluetooth device acquires a first motion trajectory of the first Bluetooth device
- the first Bluetooth device generates first pairing information corresponding to the first motion track
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information.
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:
- the first Bluetooth device sends the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines when the second pairing information matching the first pairing information is detected. Successfully matching with the first Bluetooth device Bluetooth;
- the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:
- the first Bluetooth device receives the second pairing information sent by the second Bluetooth device, where the second pairing information is the third motion track of the second Bluetooth device acquired by the second Bluetooth device Generated pairing information;
- the first Bluetooth device determines that the Bluetooth matching with the second Bluetooth device is successful.
- the method before the first Bluetooth device acquires the first motion track of the first Bluetooth device, the method further include:
- the first Bluetooth device when detecting that the second motion track is consistent with the preset initialization track, broadcasts a Bluetooth device search request to determine a connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device .
- the first Bluetooth device sends the first pairing information to the second Bluetooth device, so that When detecting the second pairing information that matches the first pairing information, the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful, including:
- the first Bluetooth device determines to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
- the method include:
- the first Bluetooth device starts the permission search mode when detecting that the second motion track is consistent with the preset initialization track
- the first Bluetooth device determines to be a connectable Bluetooth device and transmits the second pairing information to the connectable Bluetooth device.
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, where After detecting that the first pairing information is matched with the second pairing information, the first Bluetooth device determines that the Bluetooth matching with the second Bluetooth device is successful, and further includes:
- the first Bluetooth device sends a matching success response to the second Bluetooth device, so that when the second Bluetooth device receives the matching success response, it determines to establish a Bluetooth communication connection with the first Bluetooth device.
- the acquiring, by the first Bluetooth device, the first motion track of the first Bluetooth device includes:
- the first Bluetooth device generates the first motion trajectory of the first Bluetooth device by using motion parameter data of the first Bluetooth device.
- the first pairing information includes: a first pairing code
- the first Bluetooth device generates the first pairing information corresponding to the first motion track, including:
- the first Bluetooth device maps the first motion trajectory to the first pairing code.
- a second aspect of the embodiment of the present invention provides a Bluetooth pairing device, including:
- An acquiring module configured to acquire a first motion track of the first Bluetooth device
- a generating module configured to generate first pairing information corresponding to the first motion track
- a Bluetooth matching module configured to perform Bluetooth matching with the second Bluetooth device according to the first pairing information.
- the Bluetooth matching module includes:
- a sending unit configured to send the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines, when detecting the second pairing information that matches the first pairing information, The first Bluetooth device Bluetooth matching is successful;
- the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- the Bluetooth matching module includes:
- a receiving unit configured to receive second pairing information sent by the second Bluetooth device, where the second pairing information is generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device Pairing information;
- a determining unit configured to determine that the Bluetooth matching with the second Bluetooth device is successful when detecting that the first pairing information matches the second pairing information.
- the device further includes: a search module;
- the acquiring module is further configured to acquire a second motion track of the first Bluetooth device
- the search module is further configured to: when detecting that the second motion track is consistent with a preset initialization track, broadcast a Bluetooth device search request, determine a connectable Bluetooth device, and the connectable Bluetooth device includes the second Bluetooth device.
- the sending unit is specifically configured to:
- the Bluetooth matching module further includes:
- a determining unit configured to determine to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is in the pair When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
- the device further includes: a search module and a response module;
- the acquiring module is further configured to acquire a second motion track of the first Bluetooth device
- the searching module is configured to enable an allowable search mode when detecting that the second motion track is consistent with a preset initialization track;
- the response module is configured to, when receiving the Bluetooth device search request sent by the second Bluetooth device, return an allow search response to the second Bluetooth device, so that the second Bluetooth device responds according to the allowed search Determining the first Bluetooth device as a connectable Bluetooth device, and The connected Bluetooth device transmits the second pairing information.
- the Bluetooth matching module further includes:
- a sending unit configured to send a matching success response to the second Bluetooth device, to enable the second Bluetooth device to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
- the acquiring module includes:
- a parameter obtaining unit configured to acquire motion parameter data of the first Bluetooth device
- a trajectory generating unit configured to generate, by the motion parameter data of the first Bluetooth device, the first motion trajectory of the first Bluetooth device.
- the first pairing information includes: a first pairing code
- the generating, by the generating module, the first pairing information corresponding to the first motion track specifically includes: mapping the first motion track to the first pairing code.
- a third aspect of the embodiments of the present invention provides a Bluetooth pairing system, including a first Bluetooth device and a second Bluetooth device, and the first Bluetooth device, such as the device of the second aspect.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
- FIG. 1 is a schematic diagram of a Bluetooth pairing method according to a first embodiment of the present invention
- FIG. 2A is a schematic diagram of a Bluetooth pairing method according to a second embodiment of the present invention.
- 2B is a schematic diagram of Bluetooth pairing according to an embodiment of the present invention.
- 3A is a schematic diagram of a Bluetooth pairing method according to a third embodiment of the present invention.
- FIG. 3B is a schematic diagram of another Bluetooth pairing according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a motion trajectory according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a Bluetooth pairing apparatus according to an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a Bluetooth device according to an embodiment of the present disclosure.
- FIG. 7 is a schematic structural diagram of a Bluetooth pairing system according to an embodiment of the present invention.
- Embodiments of the present invention provide a Bluetooth pairing method, apparatus, and system.
- the Bluetooth pairing device in the implementation of the present invention may include: a smart phone, a wearable device, and the like, including a Bluetooth device. Further, the Bluetooth pairing device in the embodiment of the present invention may further include: a Bluetooth pairing client in the terminal device, etc. .
- the Bluetooth pairing solution provided by the embodiment of the present invention can be applied to the following scenarios: fast pairing between two personal Bluetooth devices to mutually transfer files; in the medical field, the Bluetooth pairing device provided by the embodiment of the present invention can be conveniently Entering a user with difficulty (for example, a disabled person) to perform Bluetooth pairing of the Bluetooth device; in the field of sports, the Bluetooth pairing device provided by the embodiment of the present invention can facilitate the mobile user to quickly perform Bluetooth pairing of the Bluetooth device; in the field of early childhood education
- the Bluetooth pairing device provided by the embodiment of the invention can facilitate the child to quickly perform Bluetooth pairing of the Bluetooth device, does not need an input interface, is simple and easy to use, and the like.
- the MAC address of the Bluetooth device can be exchanged through other devices than the Bluetooth module, so that the MAC address of another Bluetooth device is obtained, and then Bluetooth matching is performed.
- the pairing information can be generated by the motion track of the Bluetooth device, thereby enabling Bluetooth device pairing by the motion track of the Bluetooth device, without adding new hardware, the cost is low, and the Bluetooth matching efficiency is improved. Further, for the absence of display screens, keyboards, keys, etc.
- the Bluetooth device can perform Bluetooth device pairing by the motion track of the Bluetooth device through the embodiment of the present invention, thereby improving the convenience of Bluetooth pairing. The following description will be made by way of specific examples.
- FIG. 1 is a flowchart of a Bluetooth pairing method according to a first embodiment of the present invention.
- a specific process of the Bluetooth pairing method is described from the first Bluetooth device side, and the method may include the following steps: S101 to S103.
- the first Bluetooth device acquires a first motion track of the first Bluetooth device.
- the first Bluetooth device may acquire the first motion trajectory of the first Bluetooth device by using a sensor, such as an acceleration sensor or the like, which is not specifically limited by the embodiment of the present invention.
- the acquiring, by the first Bluetooth device, the first motion track of the first Bluetooth device may include: acquiring, by the first Bluetooth device, motion parameter data of the first Bluetooth device; and determining, by the first Bluetooth device, motion parameter data of the first Bluetooth device A first motion trajectory of the first Bluetooth device is generated.
- the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like.
- the first Bluetooth device may acquire an acceleration vector of the first Bluetooth device by using the acceleration sensor, and obtain a gravity acceleration vector of the first Bluetooth device by using the acceleration sensor. .
- the first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data.
- the acquired acceleration vector and the gravity acceleration vector may be an input vector
- the output vector is a motion trajectory vector.
- the user can hold the Bluetooth device and trigger a certain action, so that the Bluetooth device can obtain the motion track.
- the Bluetooth device can include the first Bluetooth device and the second Bluetooth device.
- the user 1 can Holding the first Bluetooth device and the second Bluetooth device together, triggering the customized action 1 or the user 1 holding the first Bluetooth device and the user 2 holding the second Bluetooth device, both the user 1 and the user 2 triggering the customized action 2 .
- FIG. 4 is a schematic diagram of a motion trajectory according to an embodiment of the present invention.
- the first Bluetooth device may be a mobile phone 401
- the second Bluetooth device may be a wristband 402.
- the first Bluetooth device 401 and the second Bluetooth device 402 are triggered to trigger a customized action, so that the first Bluetooth device and the second Bluetooth device can respectively acquire the motion track.
- the user 12 can hold the first Bluetooth device 401
- the user 13 can hold the second Bluetooth device 402. Both the user 12 and the user 13 trigger a customized action, so that the first Bluetooth device and the second Bluetooth device can respectively acquire the motion track. .
- the first Bluetooth device generates first pairing information corresponding to the first motion track.
- the first Bluetooth device may generate first pairing information corresponding to the first motion track, where the first pairing information may include: a first pairing code, where the first Bluetooth device generates the first motion
- the first pairing information corresponding to the track may specifically include: the first Bluetooth device maps the first motion track to the first pairing code.
- the first pairing code may be calculated by a pairing code generation algorithm. For example, the acceleration ai and the gravity direction gi at each moment are both a three-dimensional vector, and a spatial rotation transformation Pi is sought, so that the gravity direction gi is transformed by spatial rotation. Pi, converted to unit vector i.
- the acceleration vector ai in the relative coordinate system is transformed into the acceleration vector bi in the absolute coordinate system, the acceleration vector bi is encoded, and the direction component of the acceleration vector is mapped to a value, and finally a certain value can be obtained.
- the length string is used as the pairing code for the Bluetooth device.
- the first Bluetooth device can map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm. Further, if the motion trajectories are the same, the generated pairing information is the same.
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information.
- the first Bluetooth device is the master device
- the second Bluetooth device is the slave device
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, which may include: Sending, by the Bluetooth device, the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful when detecting the second pairing information that matches the first pairing information; wherein, the second device
- the pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- the first Bluetooth device may map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm
- the second Bluetooth device may map the third motion track to the second pairing code Pcode_B by using a pairing code generation algorithm.
- the first pairing code Pcode_A is identical to the second pairing code Pcode_B
- the second Bluetooth device can detect that the first pairing information matches the second pairing information, thereby determining
- the second Bluetooth device successfully matches the Bluetooth of the first Bluetooth device.
- the matching precision may be set.
- the first motion trajectory is a circle having a diameter R1
- the third motion trajectory is a circle having a diameter R2. If the difference between R1 and R2 is within the allowable range of the matching precision, the calculation is performed.
- the obtained first pairing code is consistent with the second pairing code.
- the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, which may include: Receiving, by the second Bluetooth device, the second pairing information sent by the second Bluetooth device; wherein the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device; the first Bluetooth device is detecting When the first pairing information matches the second pairing information, It is determined that the Bluetooth match with the second Bluetooth device is successful.
- the first Bluetooth device may map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm
- the second Bluetooth device may map the third motion track to the second pairing code Pcode_B by using a pairing code generation algorithm.
- the first pairing code Pcode_A is the same as the second pairing code Pcode_B
- the first pairing device matches the first pairing information with the first pairing information after receiving the second pairing information.
- the information is compared, and then the first pairing information is matched with the second pairing information, so that the Bluetooth matching between the first Bluetooth device and the second Bluetooth device can be determined to be successful.
- the initialization action may be triggered by the user, and the initialization track corresponding to the initialization action may be acquired. If the initialization track is consistent with the preset initialization track, the Bluetooth function may be enabled, and the Bluetooth search mode or the search mode may be enabled. .
- the Bluetooth pairing method provided by the embodiment of the present invention may further include the following steps:
- the first Bluetooth device acquires a second motion trajectory of the first Bluetooth device
- the first Bluetooth device When detecting that the second motion track is consistent with the preset initialization track, the first Bluetooth device broadcasts a Bluetooth device search request to determine a connectable Bluetooth device, and the connectable device includes the second device.
- the user holds the first Bluetooth device and triggers a certain initialization action, and the first Bluetooth device acquires a preset initialization track corresponding to the initialization action.
- the first Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request may be broadcasted. If other Bluetooth devices have enabled the Bluetooth enabled search mode, the Bluetooth device may receive the Bluetooth device search. The request can return a search response, and the returned search response can determine the connectable Bluetooth device.
- the first Bluetooth device sends the first pairing information to the second Bluetooth device, so that when the second pairing information that matches the first pairing information is detected, the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful.
- the first Bluetooth device sends the first pairing information to the connectable Bluetooth device to enable the connectable Bluetooth device to verify the first pairing information, wherein the second Bluetooth device detects the second pairing that matches the first pairing information Sending a matching success response to the first Bluetooth device when the information is;
- the first Bluetooth device determines to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device.
- the first Bluetooth device is the slave device.
- the Bluetooth pairing method provided by the embodiment of the present invention may further include the following steps:
- the first Bluetooth device acquires a second motion trajectory of the first Bluetooth device
- the first Bluetooth device turns on the allowable search mode when detecting that the second motion trajectory coincides with the first preset initialization trajectory
- the first Bluetooth device When receiving the Bluetooth device search request sent by the second Bluetooth device, the first Bluetooth device returns an allow search response to the second Bluetooth device, so that the second Bluetooth device determines the first Bluetooth device as connectable Bluetooth according to the allowed search response.
- the device sends the second pairing information to the connectable Bluetooth device.
- determining that the Bluetooth matching with the first Bluetooth device succeeds may specifically include:
- the first Bluetooth device sends a matching success response to the second Bluetooth device, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
- the Bluetooth device that initiates the search may initiate the search, and the Bluetooth device that initiates the search is the master device, and the other Bluetooth device is the slave device, and the master device starts the Bluetooth search.
- Mode the device allows the search mode to be turned on.
- the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
- the first Bluetooth device enables the search mode, and the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
- An embodiment of the present invention provides a Bluetooth pairing method, where a first Bluetooth device can acquire a first motion track of a first Bluetooth device, and generate first pairing information corresponding to the first motion track, and further, according to the first pairing information and the first Two Bluetooth devices perform Bluetooth matching.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved.
- the convenience of pairing is the case where
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
- FIG. 2A is a schematic diagram of a Bluetooth pairing method according to a second embodiment of the present invention.
- a first Bluetooth device is a master device
- a second Bluetooth device is a slave device.
- the Bluetooth pairing method provided by the embodiment of the present invention may include the following steps: S201-S212.
- the first Bluetooth device acquires a second motion track of the first Bluetooth device.
- the first Bluetooth device may acquire a second motion track of the first Bluetooth device.
- the user may hold the first Bluetooth device and trigger a customized initialization action, so that the first Bluetooth
- the device can obtain a second motion track corresponding to the initialization action.
- the second motion trajectory can be acquired by the acceleration sensor.
- the first Bluetooth device broadcasts a Bluetooth device search request when detecting that the second motion track is consistent with the preset initialization track.
- the first Bluetooth device when detecting that the second motion track is consistent with the preset initialization track, the first Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request is broadcasted, and the other Bluetooth devices enable the search if the Bluetooth device is enabled. Mode, can receive Bluetooth device search request.
- the second Bluetooth device returns an allow search response to the first Bluetooth device when receiving the Bluetooth device search request.
- the second Bluetooth device has turned on the Bluetooth allow search mode, can receive the Bluetooth device search request, and can return an allow search response to the first Bluetooth device.
- the user may hold the second Bluetooth device to trigger a certain initialization action, and the second Bluetooth device acquires the preset initialization track corresponding to the initialization action.
- the second Bluetooth device acquires a fourth motion track, and when the second Bluetooth device detects that the fourth motion track is consistent with the preset initialization track, triggering the open permission search mode, and receiving the Bluetooth device search request.
- the first Bluetooth determines a connectable Bluetooth device by allowing a search response, and the connectable Bluetooth device includes a second Bluetooth device.
- the first Bluetooth device determines the connectable Bluetooth device according to the received permission search response, wherein the allowed search response may include the identifier of the connectable Bluetooth device, and then the first Bluetooth device may determine that A list of connected Bluetooth devices, wherein the connectable Bluetooth device includes a second Bluetooth device.
- the connectable Bluetooth device may further include a third Bluetooth device, wherein the third Bluetooth device returns an allow search response to the first Bluetooth device after receiving the Bluetooth device search request broadcast by the first Bluetooth device, and then the first The Bluetooth device can respond according to the permission allowed by the third Bluetooth device.
- the third Bluetooth device should be added to the list of connectable Bluetooth devices.
- the first Bluetooth device acquires a first motion track of the first Bluetooth device.
- the first Bluetooth device acquires the motion parameter data of the first Bluetooth device, and the first Bluetooth device generates the first motion track of the first Bluetooth device by using the motion parameter data of the first Bluetooth device.
- the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like.
- the first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data.
- the first Bluetooth device generates first pairing information corresponding to the first motion track.
- the first pairing information may include: a first pairing code, where the first pairing information that the first Bluetooth device generates the first motion track may specifically include: the first Bluetooth device will use the first motion track Map to the first pairing code.
- the first Bluetooth device sends the first pairing information to the connectable Bluetooth device.
- the first Bluetooth device sends the first pairing information to the connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device and the third Bluetooth device, and the first Bluetooth device respectively goes to the second The Bluetooth device and the third Bluetooth device send the first pairing information.
- the second Bluetooth device acquires a third motion trajectory of the second Bluetooth device.
- the user holds the first Bluetooth device to trigger a certain customized action W
- the first Bluetooth device acquires the first motion track
- the user holds the second Bluetooth device trigger and the customized action W.
- the second Bluetooth device can acquire the third motion trajectory.
- the second Bluetooth device generates second pairing information corresponding to the third motion track.
- the second pairing information may include: a second pairing code
- the second pairing information generated by the second Bluetooth device to generate the third motion track may specifically include: the second Bluetooth device uses the third motion track Map to the second pairing code.
- the second Bluetooth device receives the first pairing information, and detects that the first pairing information matches the second pairing information.
- the device that is connectable to the first Bluetooth device includes a second Bluetooth device, and the second Bluetooth device can receive the first pairing information sent by the first Bluetooth device, and the second Bluetooth device When the second pairing information matching the first pairing information is detected, it can be confirmed that the second Bluetooth device matches the first Bluetooth device successfully.
- the second Bluetooth device sends a matching success response to the first Bluetooth device.
- the second Bluetooth device is confirmed to be matched with the first Bluetooth device.
- a matching success response can be returned to the first Bluetooth device.
- the first Bluetooth device determines, by the matching success response, establishing a Bluetooth communication connection with the second Bluetooth device.
- the first Bluetooth device may determine that the Bluetooth communication connection with the second Bluetooth device is supervised, and the Bluetooth device may perform the Bluetooth communication with the second Bluetooth device.
- the transmission of data for Bluetooth communication may be performed.
- the third Bluetooth device there is no pairing information matching the first pairing information, and the second pairing information in the second Bluetooth device is matched with the first pairing information, and the first Bluetooth device and the second Bluetooth device may be Successful Bluetooth matching.
- FIG. 2B is a schematic diagram of Bluetooth pairing provided by an embodiment of the present invention.
- the first Bluetooth device 21 is a master device
- the connectable Bluetooth device includes: a second Bluetooth device 22 and The third Bluetooth device 23, the second Bluetooth device 22 is a slave device, and the third Bluetooth device 23 is a slave device.
- the first Bluetooth device 21 sends the first pairing information to the connectable Bluetooth device, and after detecting the second Bluetooth information that matches the first pairing information, the second Bluetooth device 22 returns a matching success response to the first Bluetooth device 21,
- the third Bluetooth device 23 does not have the pairing information matching the first pairing information, and the first Bluetooth device 21 only receives the matching success response sent by the second Bluetooth device 22, so that the Bluetooth communication can be established with the second Bluetooth device by the matching success response. connection.
- the embodiment of the present invention provides a Bluetooth pairing method.
- the first Bluetooth device detects that the second motion track is consistent with the preset initialization track
- the first Bluetooth device broadcasts a Bluetooth device search request, thereby determining a connectable Bluetooth device to the connectable Bluetooth device.
- the match is successfully responded so that the first Bluetooth device can determine to establish a Bluetooth communication connection with the second Bluetooth device by the match success response.
- the user can trigger the initialization action by holding the Bluetooth device, and the first Bluetooth device can enter the search mode, thereby turning on the Bluetooth through the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, thereby improving the convenience of Bluetooth pairing.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of Bluetooth pairing.
- FIG. 3A is a schematic diagram of a Bluetooth matching method according to a third embodiment of the present invention.
- the second Bluetooth device is the master device
- the first Bluetooth device is the slave device.
- the resource leakage detecting method provided by the embodiment of the present invention may include steps S301 to S314. among them:
- the first Bluetooth device acquires a second motion track of the first Bluetooth device.
- the first Bluetooth device may acquire a second motion track of the first Bluetooth device.
- the user may hold the first Bluetooth device and trigger a customized initialization action, so that the first Bluetooth
- the device can obtain a second motion track corresponding to the initialization action.
- the second motion trajectory can be acquired by the acceleration sensor.
- the first Bluetooth device turns on the permission search mode when detecting that the second motion track is consistent with the first preset initialization track.
- the first Bluetooth device when detecting that the second motion track is consistent with the first preset initialization track, the first Bluetooth device triggers the enable search mode, that is, when the Bluetooth is enabled and the search mode is allowed, the Bluetooth may be received. Device search request.
- the second Bluetooth device acquires a fourth motion track of the second Bluetooth device.
- the second Bluetooth device may acquire a fourth motion track of the second Bluetooth device.
- the user may hold the second Bluetooth device to trigger a customized initialization action, so that the second Bluetooth The device can obtain a fourth motion track corresponding to the initialization action.
- the fourth motion trajectory can be acquired by the acceleration sensor.
- the second Bluetooth device broadcasts a Bluetooth device search request when detecting that the fourth motion track is consistent with the second preset initialization track.
- the second Bluetooth device when detecting that the fourth motion track is consistent with the second preset initialization track, the second Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request may be broadcasted.
- the first Bluetooth device returns an allow search response to the second Bluetooth device when receiving the Bluetooth device search request.
- the Bluetooth device search request broadcasted by the second Bluetooth device may be received. Further, the first Bluetooth device may perform the second request according to the Bluetooth device search request. The Bluetooth device sends a search response that allows it.
- the second Bluetooth device determines a connectable Bluetooth device by allowing a search response, and the connectable Bluetooth device comprises a first Bluetooth device.
- the second Bluetooth device may determine the connectable Bluetooth device by the received permission search response, wherein the search enable response may include an identifier of the connectable Bluetooth device, and then the first Bluetooth device may determine A list of connected Bluetooth devices, wherein the connectable Bluetooth device includes a second Bluetooth device.
- the connectable device further includes a third Bluetooth device, and the third Bluetooth device can receive the Bluetooth device search request sent by the second Bluetooth device, and send an allow search response to the second Bluetooth device.
- the second Bluetooth device acquires a third motion trajectory of the second Bluetooth device.
- the user holds the first Bluetooth device to trigger a certain customized action W
- the first Bluetooth device acquires the first motion track
- the user holds the second Bluetooth device trigger and the customized action W.
- the second Bluetooth device can acquire the third motion trajectory.
- the second Bluetooth device generates second pairing information corresponding to the third motion track.
- the second pairing information may include: a second pairing code
- the second pairing information generated by the second Bluetooth device to generate the third motion track may specifically include: the second Bluetooth device uses the third motion track Map to the second pairing code.
- the second Bluetooth device sends the second pairing information to the connectable Bluetooth device.
- the second Bluetooth device may send the second pairing information to the connectable Bluetooth device, where the connectable Bluetooth device includes the first Bluetooth device and the third Bluetooth device, and then the first Bluetooth device is The device sends the second pairing information, and the second pairing information can be sent to the third Bluetooth device.
- the first Bluetooth device acquires a first motion track of the first Bluetooth device.
- the first Bluetooth device generates first pairing information corresponding to the first motion track.
- the first Bluetooth device receives the second pairing information, and detects that the first pairing information matches the second pairing information.
- the first Bluetooth device sends a matching success response to the second Bluetooth device.
- the second Bluetooth device determines, by the matching success response, establishing a Bluetooth communication connection with the first Bluetooth device.
- the third Bluetooth device there is no pairing information that matches the second pairing information, and the first pairing information that matches the second pairing information exists in the first Bluetooth device, and the first Bluetooth device And the second Bluetooth device can successfully perform Bluetooth matching.
- FIG. 3B is a schematic diagram of another Bluetooth pairing provided by the embodiment of the present invention.
- the second Bluetooth device 32 is a master device
- the connectable Bluetooth device includes: a first Bluetooth device 31.
- the third Bluetooth device 33 and the fourth Bluetooth device 34 are the slave device, the third Bluetooth device 33 is the slave device, and the fourth Bluetooth device 34 is the slave device.
- the second Bluetooth device 31 sends the first pairing information to the connectable Bluetooth device. After detecting the second Bluetooth information that matches the first pairing information, the first Bluetooth device 32 returns a matching success response to the second Bluetooth device 32.
- the third Bluetooth device 33 and the fourth Bluetooth device 34 do not have pairing information that matches the first pairing information, and the second Bluetooth device 32 only receives the matching success response sent by the first Bluetooth device 31, so that the matching success response can be determined and A Bluetooth device establishes a Bluetooth communication connection.
- the embodiment of the present invention provides a Bluetooth pairing method.
- the Bluetooth device searches for a request, so that the second Bluetooth device determines the connectable Bluetooth device, and sends the second pairing information to the connectable Bluetooth device, where the first Bluetooth device detects the first pairing information and When the second pairing information is matched, the matching success response may be returned to the second Bluetooth device, so that the second Bluetooth device may determine to establish a Bluetooth communication connection with the first Bluetooth device by the matching success response. Therefore, the user can trigger the initialization action by holding the Bluetooth device, and the first Bluetooth device can enter the allowable search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, thereby improving the convenience of Bluetooth pairing.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
- the Bluetooth pairing device provided by the embodiment of the present invention will be described in detail below with reference to FIG.
- a Bluetooth pairing device in the implementation of the present invention may include a terminal device including a Bluetooth function, such as a smart phone, a tablet computer, and a wearable device.
- FIG. 5 is a schematic structural diagram of a Bluetooth pairing apparatus according to an embodiment of the present invention.
- the Bluetooth pairing apparatus provided by the embodiment of the present invention may include: an obtaining module 51, a generating module 52, and a Bluetooth matching module 53.
- the obtaining module 51 is configured to acquire a first motion track of the first Bluetooth device.
- the acquiring module 51 may acquire the first motion trajectory of the first Bluetooth device by using a sensor, such as an acceleration sensor or the like, which is not specifically limited by the embodiment of the present invention.
- the obtaining module 51 may include: a parameter acquiring unit and a trajectory generating unit. among them:
- a parameter obtaining unit configured to acquire motion parameter data of the first Bluetooth device
- a trajectory generating unit configured to generate, by the motion parameter data of the first Bluetooth device, a first motion trajectory of the first Bluetooth device.
- the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like.
- the first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data.
- the acquired acceleration vector and the gravity acceleration vector may be an input vector, and the output vector is a motion trajectory vector.
- the generating module 52 is configured to generate first pairing information corresponding to the first motion track.
- the first pairing information includes: a first pairing code
- the generating, by the generating module 51, the first pairing information corresponding to the first motion track may include: mapping the first motion track to the first pairing code . Further, if the motion trajectories are the same, the generated pairing information is the same.
- the Bluetooth matching module 53 is configured to perform Bluetooth matching with the second Bluetooth device according to the first pairing information.
- the Bluetooth matching module 53 may perform Bluetooth matching with the second Bluetooth device according to the first pairing information, and if the device is the master device, send the first pairing information to the second Bluetooth device, to And causing the second Bluetooth device to verify the first pairing information and the second pairing information. If the device is a slave device, and the first Bluetooth device is the master device, the device may receive the second pairing information sent by the second Bluetooth device. , thereby verifying the first pairing information and the second pairing information.
- the device may enable a Bluetooth search mode and actively broadcast a Bluetooth device search request.
- the present invention The apparatus provided by the embodiment may further include: a search module 54.
- the obtaining module 51 is further configured to acquire a second motion track of the first Bluetooth device
- the searching module 54 is further configured to: when the second motion track is detected to be consistent with the preset initialization track, broadcast a Bluetooth device search request, and determine a connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device.
- the Bluetooth matching module 53 may include a sending unit.
- a sending unit configured to send the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful when detecting the second pairing information that matches the first pairing information;
- the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- the sending unit may be specifically configured to: send the first pairing information to the connectable Bluetooth device, so that the connectable Bluetooth device verifies the first pairing information.
- the Bluetooth matching module 53 may further include: a determining unit.
- a determining unit configured to determine to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device performs verification and detection on the first pairing information When the second pairing information matches the first pairing information, the matching sent to the first Bluetooth device is successfully responded.
- the Bluetooth matching module 53 may further include: a receiving unit and a determining unit.
- a receiving unit configured to receive second pairing information sent by the second Bluetooth device, where the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device;
- a determining unit configured to determine that the Bluetooth matching with the second Bluetooth device is successful when detecting that the first pairing information matches the second pairing information.
- the apparatus provided by the embodiment of the present invention may further include: a response module 55.
- the obtaining module 51 is further configured to acquire a second motion track of the first Bluetooth device
- the searching module 54 is configured to enable the search mode when the second motion track is consistent with the preset initialization track;
- the response module 55 is configured to: when receiving the Bluetooth device search request sent by the second Bluetooth device, return an allow search response to the second Bluetooth device, so that the second Bluetooth device determines that the first Bluetooth device is connectable according to the allow search response. Bluetooth device and send a second to a connectable Bluetooth device Pairing information.
- the Bluetooth matching module 53 may further include: a sending unit.
- a sending unit configured to send a matching success response to the second Bluetooth device, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
- the Bluetooth device that initiates the search may initiate the search, and the Bluetooth device that initiates the search is the master device, and the other Bluetooth device is the slave device, and the master device starts the Bluetooth search.
- Mode the device allows the search mode to be turned on.
- the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
- the first Bluetooth device enables the search mode, and the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
- the device provided by the embodiment of the present invention may further include a Bluetooth module 56.
- the Bluetooth module 56 may be respectively connected to the search module 54, the Bluetooth matching module 53, and the response module 55, so that the search module 54 can broadcast Bluetooth through the Bluetooth module 56.
- the device search request, the Bluetooth matching module 53 may send the first pairing information, receive the second pairing information, or receive a matching success response or the like through the Bluetooth module 56.
- the Bluetooth module 56 may include a Bluetooth IC (Integated Circuit) chip.
- the response module 55 can receive the Bluetooth device search request via the Bluetooth module 56 and send an allow search response.
- the embodiment of the present invention provides a Bluetooth pairing device, where the acquiring module can acquire the first motion track of the first Bluetooth device, and the generating module generates first pairing information corresponding to the first motion track, and the Bluetooth matching module can be based on the first pairing information.
- the second Bluetooth device performs Bluetooth matching.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved.
- the convenience of pairing is the case where
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
- the acquiring module, the generating module, and the Bluetooth matching module in this embodiment may be separately set up processors, or may be implemented in one processor of the Bluetooth device, or may be in the form of program code. It is stored in the memory of the Bluetooth device, and the implementation of the search module and the response module is the same as the acquisition module, and is not repeated here.
- the function of the above module is called and executed by one of the processors of the Bluetooth device.
- the processor described herein may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated systems configured to implement embodiments of the present invention. Circuit.
- FIG. 6 is a schematic structural diagram of a Bluetooth device according to an embodiment of the present invention.
- the Bluetooth device provided in this embodiment corresponds to the method shown in any of FIG. 1 to FIG. The specific implementation is as shown in FIG. 6.
- the Bluetooth device in the embodiment of the present invention includes: a receiver 601, a transmitter 602, a memory 603, and a processor 604, wherein the receiver 601, the transmitter 602, the memory 603, and the processor are The 604 connection, for example, can be connected via a bus.
- the Bluetooth device may also include a common component such as a sensor 605, an antenna, an input/output device, and the like, and is not specifically limited by the embodiment of the present invention.
- the receiver 601 and the transmitter 602 may further include a Bluetooth module.
- the Bluetooth module may include a Bluetooth IC chip.
- the processor 604 can acquire the motion track of the Bluetooth device through the sensor 605.
- Receiver 601 and transmitter 602 can be integrated to form a transceiver.
- the memory 603 is for storing executable program code, the program code including computer operating instructions.
- the memory 603 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
- Processor 604 can be a central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
- the memory 603 stores a set of program codes
- the processor 604 is configured to call the program code stored in the memory 603 to perform the following operations:
- the processor 604 when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, specifically performs the following steps:
- the transmitter 602 Transmitting, by the transmitter 602, the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines, when detecting the second pairing information that matches the first pairing information, The first Bluetooth device is successfully matched with the Bluetooth; wherein the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- the processor 604 when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, specifically performs the following steps:
- the processor 604 further performs: before performing the acquiring the first motion trajectory of the first Bluetooth device:
- the Bluetooth device search request is broadcast by the transmitter 602, and the connectable Bluetooth device is determined, the connectable Bluetooth device including the second Bluetooth device.
- the processor 604 is configured to transmit the first pairing information to the second Bluetooth device via the transmitter 602 to cause the second Bluetooth device to detect that the first pairing information is matched.
- the second pairing information is determined, when it is determined that the Bluetooth matching with the first Bluetooth device is successful, the following steps are specifically performed:
- the processor 604 specifically performs the following steps:
- the receiver 601 When receiving the matching success response sent by the second Bluetooth device by the receiver 601, determining to establish a Bluetooth communication connection with the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is in the opposite When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching successfully sent to the first Bluetooth device is responded.
- the processor 604 further performs: before receiving, by the receiver 601, the second pairing information sent by the second Bluetooth device:
- the Bluetooth device search request sent by the second Bluetooth device by the receiver 601 Upon receiving the Bluetooth device search request sent by the second Bluetooth device by the receiver 601, returning an allow search response to the second Bluetooth device through the transmitter 602, so that the second Bluetooth device searches according to the permission Responding to determining the first Bluetooth device as a connectable Bluetooth device and transmitting the second pairing information to the connectable Bluetooth device.
- the processor 604 when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, specifically performs the following steps:
- a matching success response is sent to the second Bluetooth device by the transmitter 602, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
- the processor 604 when performing the acquiring the first motion trajectory of the first Bluetooth device, the processor 604 specifically performs the following steps:
- the first pairing information includes: a first pairing code; the processor 604 performs the following steps when performing the first pairing information corresponding to the first motion track:
- a Bluetooth device including a receiver, a transmitter, a memory, and a processor, and the processor may acquire a first motion track of the first Bluetooth device and generate first pairing information corresponding to the first motion track. And performing Bluetooth matching with the second Bluetooth device according to the first pairing information.
- the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
- the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved.
- the convenience of pairing is the case where
- the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
- FIG. 7 is a schematic structural diagram of a Bluetooth pairing system according to an embodiment of the present invention.
- a Bluetooth pairing system may include: a first Bluetooth device 71 and a second Bluetooth. Device 73.
- the first Bluetooth device 71 may include: a smart phone, a wearable device, and the like, including a Bluetooth device.
- the first Bluetooth device 72 may include: a smart phone, a wearable device, and the like, including a Bluetooth-enabled terminal device, where
- the Bluetooth device provided in this embodiment corresponds to the Bluetooth pairing method shown in any of FIGS. 1 to 3.
- the user may trigger some of the same customized actions of the first Bluetooth device 71 and the second Bluetooth device 72, so that the first Bluetooth device 71 and the second Bluetooth device 72 can obtain corresponding motions. Track for Bluetooth pairing. Further, the user may trigger the first Bluetooth device 71 to initiate an action to trigger the first Bluetooth device 71 to enable the Bluetooth search mode or allow the search mode, and the user may trigger the second Bluetooth device 72 to initiate an action to trigger the second Bluetooth device 72 to turn on the permission. Search mode or Bluetooth search mode.
- the first Bluetooth device 71 may be a master device or a slave device
- the second Bluetooth device 72 may be a master device or a slave device.
- the Bluetooth search mode is enabled, and the search is initiated actively, that is, the Bluetooth device that actively broadcasts the Bluetooth device search request is the master device, and the Bluetooth device that allows the search mode is turned on as the slave device. Further, if the first Bluetooth device and the second Bluetooth device are both the master device, the Bluetooth device that initiates the search may initiate the search, and the other Bluetooth device is the slave device, and the master device turns on the Bluetooth search mode.
- the search mode is enabled from the device.
- the disclosed apparatus and method may be implemented in other manners.
- the device embodiments described above are merely illustrative.
- the division of modules or units is only a logical function division.
- there may be another division manner for example, multiple units or modules may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device, module or unit, or an electrical, mechanical or other form of connection.
- modules or units described as separate components may or may not be physically separate, and the components displayed as modules or units may or may not be physical modules or units, ie may be located in one place, or may be distributed to multiple On a network module or unit. Some or all of the modules or units may be selected according to actual needs to achieve the objectives of the embodiments of the present application. of.
- each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more modules or units may be integrated in In a module or unit.
- the above integrated modules or units can be implemented in the form of hardware or in the form of software functional units.
- An integrated module or unit if implemented in the form of a software functional module or unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- the technical solution of the present application is essential or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Provided in an embodiment of the present invention are a Bluetooth pairing method, device and system, the method comprising: a first Bluetooth device acquiring a first movement track of the first Bluetooth device, generating first pairing information corresponding to a first movement track, and performing Bluetooth pairing with a second Bluetooth device according to the first pairing information. In the embodiment of the present invention, pairing information can be generated via the movement track of the Bluetooth device, thus pairing the Bluetooth device via the movement track of the Bluetooth device, improving convenience of the Bluetooth pairing, without requiring a peripheral device and at low cost, improving the Bluetooth pairing efficiency.
Description
本发明涉及通信领域,尤其涉及一种蓝牙配对方法、装置及系统。The present invention relates to the field of communications, and in particular, to a Bluetooth pairing method, apparatus, and system.
蓝牙,是一种支持设备短距离通信的无线电技术。两个蓝牙设备可在开启蓝牙功能后,将用户输入的匹配码进行配对,进而通过蓝牙进行无线连接。现有技术中,可通过蓝牙模块以外的其他设备,将蓝牙设备的MAC(Media Access Control,介质访问控制)地址进行交换,从而获取另一蓝牙设备的MAC地址,进而进行蓝牙匹配,例如,两个蓝牙设备连接智能集线器,通过智能集线器获取另一蓝牙设备的MAC地址,进而两个蓝牙设备可进行蓝牙匹配;通过声音输入/发送装置将蓝牙设备的MAC地址转换为声波发送,另一蓝牙设备接收到声波后进行转换,搜索匹配的MAC地址,进而进行蓝牙匹配等。但现有技术需在原有蓝牙模块上加设新的硬件,增加了成本,蓝牙匹配过程效率低。Bluetooth is a radio technology that supports short-range communication of devices. Two Bluetooth devices can pair the matching codes input by the user after the Bluetooth function is turned on, and then wirelessly connect through Bluetooth. In the prior art, a MAC (Media Access Control) address of a Bluetooth device can be exchanged through a device other than the Bluetooth module, thereby acquiring a MAC address of another Bluetooth device, and then performing Bluetooth matching, for example, two A Bluetooth device is connected to the smart hub, and the MAC address of another Bluetooth device is obtained through the smart hub, so that the two Bluetooth devices can perform Bluetooth matching; the MAC address of the Bluetooth device is converted into sound wave transmission through the voice input/transmit device, and the other Bluetooth device After receiving the sound wave, it performs conversion, searches for the matching MAC address, and then performs Bluetooth matching. However, the prior art needs to add new hardware to the original Bluetooth module, which increases the cost, and the Bluetooth matching process is inefficient.
发明内容Summary of the invention
本发明实施例提供一种蓝牙配对方法、装置及系统,提升了蓝牙配对的便捷性,可降低成本,提高蓝牙匹配过程效率。The embodiment of the invention provides a Bluetooth pairing method, device and system, which improves the convenience of Bluetooth pairing, reduces the cost, and improves the efficiency of the Bluetooth matching process.
本发明实施例第一方面提供了一种蓝牙配对方法,包括:A first aspect of the embodiments of the present invention provides a Bluetooth pairing method, including:
第一蓝牙设备获取所述第一蓝牙设备的第一运动轨迹;The first Bluetooth device acquires a first motion trajectory of the first Bluetooth device;
所述第一蓝牙设备生成与所述第一运动轨迹对应的第一配对信息;The first Bluetooth device generates first pairing information corresponding to the first motion track;
所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配。The first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information.
在第一方面的第一种可能的实现方式中,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,包括:In a first possible implementation manner of the first aspect, the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:
所述第一蓝牙设备向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定
与所述第一蓝牙设备蓝牙匹配成功;The first Bluetooth device sends the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines when the second pairing information matching the first pairing information is detected.
Successfully matching with the first Bluetooth device Bluetooth;
其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息。The second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
在第一方面的第二种可能的实现方式中,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,包括:In a second possible implementation manner of the first aspect, the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:
所述第一蓝牙设备接收所述第二蓝牙设备发送的第二配对信息;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息;The first Bluetooth device receives the second pairing information sent by the second Bluetooth device, where the second pairing information is the third motion track of the second Bluetooth device acquired by the second Bluetooth device Generated pairing information;
所述第一蓝牙设备在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功。When detecting that the first pairing information matches the second pairing information, the first Bluetooth device determines that the Bluetooth matching with the second Bluetooth device is successful.
结合第一方面的第一种可能实现方式,在第一方面的第三种可能的实现方式中,所述第一蓝牙设备获取所述第一蓝牙设备的第一运动轨迹之前,所述方法还包括:In conjunction with the first possible implementation of the first aspect, in a third possible implementation manner of the first aspect, before the first Bluetooth device acquires the first motion track of the first Bluetooth device, the method further include:
所述第一蓝牙设备获取所述第一蓝牙设备的第二运动轨迹;Obtaining, by the first Bluetooth device, a second motion trajectory of the first Bluetooth device;
所述第一蓝牙设备在检测到所述第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,确定可连接的蓝牙设备,所述可连接的蓝牙设备包括所述第二蓝牙设备。The first Bluetooth device, when detecting that the second motion track is consistent with the preset initialization track, broadcasts a Bluetooth device search request to determine a connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device .
结合第一方面的第三种可能实现方式,在第一方面的第四种可能的实现方式中,所述第一蓝牙设备向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功,包括:In conjunction with the third possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the first Bluetooth device sends the first pairing information to the second Bluetooth device, so that When detecting the second pairing information that matches the first pairing information, the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful, including:
所述第一蓝牙设备向所述可连接的蓝牙设备发送所述第一配对信息,以使所述可连接的蓝牙设备对所述第一配对信息进行验证;Sending, by the first Bluetooth device, the first pairing information to the connectable Bluetooth device, so that the connectable Bluetooth device verifies the first pairing information;
所述第一蓝牙设备在接收到所述第二蓝牙设备发送的匹配成功响应时,确定与所述第二蓝牙设备建立蓝牙通信连接;其中,所述匹配成功响应为所述第二蓝牙设备在对所述第一配对信息进行验证且检测到与所述第一配对信息匹配的第二配对信息时,向所述第一蓝牙设备发送的匹配成功响应。The first Bluetooth device determines to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
结合第一方面的第二种可能实现方式,在第一方面的第五种可能的实现方式中,所述第一蓝牙设备接收所述第二蓝牙设备发送的第二配对信息之前,所述方法包括:In conjunction with the second possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, before the first Bluetooth device receives the second pairing information sent by the second Bluetooth device, the method include:
所述第一蓝牙设备获取所述第一蓝牙设备的第二运动轨迹;
Obtaining, by the first Bluetooth device, a second motion trajectory of the first Bluetooth device;
所述第一蓝牙设备在检测到所述第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模式;The first Bluetooth device starts the permission search mode when detecting that the second motion track is consistent with the preset initialization track;
所述第一蓝牙设备在接收到所述第二蓝牙设备发送的搜索请求时,向所述第二蓝牙设备返回允许搜索响应,以使所述第二蓝牙设备根据所述允许搜索响应将所述第一蓝牙设备确定为可连接的蓝牙设备,并向所述可连接的蓝牙设备发送所述第二配对信息。Receiving, by the first Bluetooth device, a search response response to the second Bluetooth device when receiving the search request sent by the second Bluetooth device, so that the second Bluetooth device responds according to the allowed search response. The first Bluetooth device determines to be a connectable Bluetooth device and transmits the second pairing information to the connectable Bluetooth device.
结合第一方面的第五种可能实现方式,在第一方面的第六种可能的实现方式中,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,在所述第一蓝牙设备在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功之后,还包括:In conjunction with the fifth possible implementation of the first aspect, in a sixth possible implementation manner of the first aspect, the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, where After detecting that the first pairing information is matched with the second pairing information, the first Bluetooth device determines that the Bluetooth matching with the second Bluetooth device is successful, and further includes:
所述第一蓝牙设备向所述第二蓝牙设备发送匹配成功响应,以使所述第二蓝牙设备在接收到所述匹配成功响应时,确定与所述第一蓝牙设备建立蓝牙通信连接。The first Bluetooth device sends a matching success response to the second Bluetooth device, so that when the second Bluetooth device receives the matching success response, it determines to establish a Bluetooth communication connection with the first Bluetooth device.
在第一方面的第七种可能的实现方式中,所述第一蓝牙设备获取所述第一蓝牙设备的第一运动轨迹,包括:In a seventh possible implementation manner of the first aspect, the acquiring, by the first Bluetooth device, the first motion track of the first Bluetooth device includes:
所述第一蓝牙设备获取所述第一蓝牙设备的运动参数数据;Obtaining, by the first Bluetooth device, motion parameter data of the first Bluetooth device;
所述第一蓝牙设备由所述第一蓝牙设备的运动参数数据生成所述第一蓝牙设备的所述第一运动轨迹。The first Bluetooth device generates the first motion trajectory of the first Bluetooth device by using motion parameter data of the first Bluetooth device.
结合第一方面、第一方面第一种~第七种可能实现方式,在第一方面的第八种可能的实现方式中,所述第一配对信息包括:第一配对码;With reference to the first aspect, the first to seventh possible implementation manners of the first aspect, in the eighth possible implementation manner of the first aspect, the first pairing information includes: a first pairing code;
所述第一蓝牙设备生成所述第一运动轨迹对应的第一配对信息,包括:The first Bluetooth device generates the first pairing information corresponding to the first motion track, including:
所述第一蓝牙设备将所述第一运动轨迹映射为所述第一配对码。The first Bluetooth device maps the first motion trajectory to the first pairing code.
本发明实施例第二方面提供了一种蓝牙配对装置,包括:A second aspect of the embodiment of the present invention provides a Bluetooth pairing device, including:
获取模块,用于获取所述第一蓝牙设备的第一运动轨迹;An acquiring module, configured to acquire a first motion track of the first Bluetooth device;
生成模块,用于生成与所述第一运动轨迹对应的第一配对信息;a generating module, configured to generate first pairing information corresponding to the first motion track;
蓝牙匹配模块,用于根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配。And a Bluetooth matching module, configured to perform Bluetooth matching with the second Bluetooth device according to the first pairing information.
在第二方面的第一种可能的实现方式中,所述蓝牙匹配模块包括:In a first possible implementation manner of the second aspect, the Bluetooth matching module includes:
发送单元,用于向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功;
a sending unit, configured to send the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines, when detecting the second pairing information that matches the first pairing information, The first Bluetooth device Bluetooth matching is successful;
其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息。The second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
在第二方面的第二种可能的实现方式中,所述蓝牙匹配模块包括:In a second possible implementation manner of the second aspect, the Bluetooth matching module includes:
接收单元,用于接收所述第二蓝牙设备发送的第二配对信息;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息;a receiving unit, configured to receive second pairing information sent by the second Bluetooth device, where the second pairing information is generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device Pairing information;
确定单元,用于在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功。And a determining unit, configured to determine that the Bluetooth matching with the second Bluetooth device is successful when detecting that the first pairing information matches the second pairing information.
结合第二方面的第一种可能实现方式,在第二方面的第三种可能的实现方式中,所述装置还包括:搜索模块;In conjunction with the first possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the device further includes: a search module;
所述获取模块,还用于获取所述第一蓝牙设备的第二运动轨迹;The acquiring module is further configured to acquire a second motion track of the first Bluetooth device;
所述搜索模块,还用于在检测到所述第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,确定可连接的蓝牙设备,所述可连接的蓝牙设备包括所述第二蓝牙设备。The search module is further configured to: when detecting that the second motion track is consistent with a preset initialization track, broadcast a Bluetooth device search request, determine a connectable Bluetooth device, and the connectable Bluetooth device includes the second Bluetooth device.
结合第二方面的第三种可能实现方式,在第二方面的第四种可能的实现方式中,所述发送单元具体用于:In conjunction with the third possible implementation of the second aspect, in a fourth possible implementation manner of the second aspect, the sending unit is specifically configured to:
向所述可连接的蓝牙设备发送所述第一配对信息,以使所述可连接的蓝牙设备对所述第一配对信息进行验证;Transmitting the first pairing information to the connectable Bluetooth device to enable the connectable Bluetooth device to verify the first pairing information;
所述蓝牙匹配模块还包括:The Bluetooth matching module further includes:
确定单元,用于在接收到所述第二蓝牙设备发送的匹配成功响应时,确定与所述第二蓝牙设备建立蓝牙通信连接;其中,所述匹配成功响应为所述第二蓝牙设备在对所述第一配对信息进行验证且检测到与所述第一配对信息匹配的第二配对信息时,向所述第一蓝牙设备发送的匹配成功响应。a determining unit, configured to determine to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is in the pair When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
结合第二方面的第二种可能实现方式,在第二方面的第五种可能的实现方式中,所述装置还包括:搜索模块和响应模块;With reference to the second possible implementation of the second aspect, in a fifth possible implementation manner of the second aspect, the device further includes: a search module and a response module;
所述获取模块,还用于获取所述第一蓝牙设备的第二运动轨迹;The acquiring module is further configured to acquire a second motion track of the first Bluetooth device;
所述搜索模块,用于在检测到所述第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模式;The searching module is configured to enable an allowable search mode when detecting that the second motion track is consistent with a preset initialization track;
所述响应模块,用于在接收到所述第二蓝牙设备发送的蓝牙设备搜索请求时,向所述第二蓝牙设备返回允许搜索响应,以使所述第二蓝牙设备根据所述允许搜索响应将所述第一蓝牙设备确定为可连接的蓝牙设备,并向各可
连接的蓝牙设备发送所述第二配对信息。The response module is configured to, when receiving the Bluetooth device search request sent by the second Bluetooth device, return an allow search response to the second Bluetooth device, so that the second Bluetooth device responds according to the allowed search Determining the first Bluetooth device as a connectable Bluetooth device, and
The connected Bluetooth device transmits the second pairing information.
结合第二方面的第五种可能实现方式,在第二方面的第六种可能的实现方式中,所述蓝牙匹配模块还包括:In conjunction with the fifth possible implementation of the second aspect, in a sixth possible implementation of the second aspect, the Bluetooth matching module further includes:
发送单元,用于向所述第二蓝牙设备发送匹配成功响应,以使所述第二蓝牙设备在接收到所述匹配成功响应时,确定与所述第一蓝牙设备建立蓝牙通信连接。And a sending unit, configured to send a matching success response to the second Bluetooth device, to enable the second Bluetooth device to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
在第二方面的第七种可能的实现方式中,所述获取模块包括:In a seventh possible implementation manner of the second aspect, the acquiring module includes:
参数获取单元,用于获取所述第一蓝牙设备的运动参数数据;a parameter obtaining unit, configured to acquire motion parameter data of the first Bluetooth device;
轨迹生成单元,用于由所述第一蓝牙设备的运动参数数据生成所述第一蓝牙设备的所述第一运动轨迹。a trajectory generating unit, configured to generate, by the motion parameter data of the first Bluetooth device, the first motion trajectory of the first Bluetooth device.
结合第二方面、第二方面第一种~第七种可能实现方式,在第二方面的第八种可能的实现方式中,所述第一配对信息包括:第一配对码;With reference to the second aspect, the first to the seventh possible implementation manner of the second aspect, in the eighth possible implementation manner of the second aspect, the first pairing information includes: a first pairing code;
所述生成模块生成所述第一运动轨迹对应的第一配对信息具体包括:将所述第一运动轨迹映射为所述第一配对码。The generating, by the generating module, the first pairing information corresponding to the first motion track specifically includes: mapping the first motion track to the first pairing code.
本发明实施例第三方面提供了一种蓝牙配对系统,包括第一蓝牙设备和第二蓝牙设备;所述第一蓝牙设备,如第二方面所述的装置。A third aspect of the embodiments of the present invention provides a Bluetooth pairing system, including a first Bluetooth device and a second Bluetooth device, and the first Bluetooth device, such as the device of the second aspect.
本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。Further, for the Bluetooth device that does not have the input of the display screen, the keyboard, the button, and the like, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明第一实施例提供的一种蓝牙配对方法的示意图;
1 is a schematic diagram of a Bluetooth pairing method according to a first embodiment of the present invention;
图2A为本发明第二实施例提供的一种蓝牙配对方法的示意图;2A is a schematic diagram of a Bluetooth pairing method according to a second embodiment of the present invention;
图2B为本发明实施例提供的一种蓝牙配对示意图;2B is a schematic diagram of Bluetooth pairing according to an embodiment of the present invention;
图3A为本发明第三实施例提供的一种蓝牙配对方法的示意图;3A is a schematic diagram of a Bluetooth pairing method according to a third embodiment of the present invention;
图3B为本发明实施例提供的另一种蓝牙配对示意图;FIG. 3B is a schematic diagram of another Bluetooth pairing according to an embodiment of the present invention; FIG.
图4为本发明实施例提供的一种运动轨迹示意图;4 is a schematic diagram of a motion trajectory according to an embodiment of the present invention;
图5为本发明实施例提供的一种蓝牙配对装置的结构示意图;FIG. 5 is a schematic structural diagram of a Bluetooth pairing apparatus according to an embodiment of the present invention;
图6为本发明实施例提供的一种蓝牙设备的结构示意图;FIG. 6 is a schematic structural diagram of a Bluetooth device according to an embodiment of the present disclosure;
图7为本发明实施例提供的一种蓝牙配对系统的结构示意图。FIG. 7 is a schematic structural diagram of a Bluetooth pairing system according to an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供一种蓝牙配对方法、装置及系统。本发明实施中的蓝牙配对装置可以包括:智能手机、可穿戴设备等包括蓝牙功能的终端设备,进一步的,本发明实施例中的蓝牙配对装置还可以包括:终端设备中的蓝牙配对客户端等。Embodiments of the present invention provide a Bluetooth pairing method, apparatus, and system. The Bluetooth pairing device in the implementation of the present invention may include: a smart phone, a wearable device, and the like, including a Bluetooth device. Further, the Bluetooth pairing device in the embodiment of the present invention may further include: a Bluetooth pairing client in the terminal device, etc. .
本发明实施例提供的蓝牙配对方案可以应用于下述场景中:两个个人蓝牙设备之间的快速配对,以互传文件;在医疗领域,通过本发明实施例提供的蓝牙配对装置,可方便输入有困难的用户(例如残疾人)进行蓝牙设备的蓝牙配对;在运动领域,通过本发明实施例提供的蓝牙配对装置,可方便进行运动的用户快速进行蓝牙设备的蓝牙配对;在幼儿教育领域,通过本发明实施例提供的蓝牙配对装置,可方便幼儿快速进行蓝牙设备的蓝牙配对,不需要输入界面,简单易用等等。The Bluetooth pairing solution provided by the embodiment of the present invention can be applied to the following scenarios: fast pairing between two personal Bluetooth devices to mutually transfer files; in the medical field, the Bluetooth pairing device provided by the embodiment of the present invention can be conveniently Entering a user with difficulty (for example, a disabled person) to perform Bluetooth pairing of the Bluetooth device; in the field of sports, the Bluetooth pairing device provided by the embodiment of the present invention can facilitate the mobile user to quickly perform Bluetooth pairing of the Bluetooth device; in the field of early childhood education The Bluetooth pairing device provided by the embodiment of the invention can facilitate the child to quickly perform Bluetooth pairing of the Bluetooth device, does not need an input interface, is simple and easy to use, and the like.
现有技术中,可通过蓝牙模块以外的其他设备,将蓝牙设备的MAC地址进行交换,从而使得获取另一蓝牙设备的MAC地址,进而进行蓝牙匹配。而本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。进一步地,对于不存在显示屏幕、键盘、按键等输入
的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。下面通过具体实施例进行说明。In the prior art, the MAC address of the Bluetooth device can be exchanged through other devices than the Bluetooth module, so that the MAC address of another Bluetooth device is obtained, and then Bluetooth matching is performed. In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, thereby enabling Bluetooth device pairing by the motion track of the Bluetooth device, without adding new hardware, the cost is low, and the Bluetooth matching efficiency is improved. Further, for the absence of display screens, keyboards, keys, etc.
The Bluetooth device can perform Bluetooth device pairing by the motion track of the Bluetooth device through the embodiment of the present invention, thereby improving the convenience of Bluetooth pairing. The following description will be made by way of specific examples.
请参阅图1,图1为本发明第一实施例提供的一种蓝牙配对方法的流程图。本实施例从第一蓝牙设备侧阐述蓝牙配对方法的具体流程,该方法可以包括以下步骤:S101~S103。Please refer to FIG. 1. FIG. 1 is a flowchart of a Bluetooth pairing method according to a first embodiment of the present invention. In this embodiment, a specific process of the Bluetooth pairing method is described from the first Bluetooth device side, and the method may include the following steps: S101 to S103.
S101,第一蓝牙设备获取第一蓝牙设备的第一运动轨迹。S101. The first Bluetooth device acquires a first motion track of the first Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备可通过传感器获取第一蓝牙设备的第一运动轨迹,传感器例如加速度传感器等,具体不受本发明实施例的限制。As an optional implementation manner, the first Bluetooth device may acquire the first motion trajectory of the first Bluetooth device by using a sensor, such as an acceleration sensor or the like, which is not specifically limited by the embodiment of the present invention.
进一步可选的,第一蓝牙设备获取第一蓝牙设备的第一运动轨迹具体可以包括:第一蓝牙设备获取第一蓝牙设备的运动参数数据;第一蓝牙设备由第一蓝牙设备的运动参数数据生成第一蓝牙设备的第一运动轨迹。具体实现中,运动参数数据例如可以包括加速度向量、重力加速度向量等等,第一蓝牙设备可通过加速度传感器获取第一蓝牙设备的加速度向量,还可通过加速度传感器获取第一蓝牙设备的重力加速度向量。根据获取到运动参数数据由运动轨迹生成算法计算得到第一运动轨迹,具体的,在运动轨迹生成算法中,获取到的加速度向量和重力加速度向量可以为输入向量,输出向量为运动轨迹向量。Further, optionally, the acquiring, by the first Bluetooth device, the first motion track of the first Bluetooth device may include: acquiring, by the first Bluetooth device, motion parameter data of the first Bluetooth device; and determining, by the first Bluetooth device, motion parameter data of the first Bluetooth device A first motion trajectory of the first Bluetooth device is generated. In a specific implementation, the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like. The first Bluetooth device may acquire an acceleration vector of the first Bluetooth device by using the acceleration sensor, and obtain a gravity acceleration vector of the first Bluetooth device by using the acceleration sensor. . The first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data. Specifically, in the motion trajectory generation algorithm, the acquired acceleration vector and the gravity acceleration vector may be an input vector, and the output vector is a motion trajectory vector.
本发明实施例中,用户可手持蓝牙设备,触发某个自定义的动作,从而蓝牙设备可获取到运动轨迹,其中,蓝牙设备可包括第一蓝牙设备和第二蓝牙设备,例如,用户1可一起手握第一蓝牙设备和第二蓝牙设备,触发自定义的动作1或用户1手握第一蓝牙设备且用户2手握第二蓝牙设备,用户1和用户2均触发自定义的动作2。In the embodiment of the present invention, the user can hold the Bluetooth device and trigger a certain action, so that the Bluetooth device can obtain the motion track. The Bluetooth device can include the first Bluetooth device and the second Bluetooth device. For example, the user 1 can Holding the first Bluetooth device and the second Bluetooth device together, triggering the customized action 1 or the user 1 holding the first Bluetooth device and the user 2 holding the second Bluetooth device, both the user 1 and the user 2 triggering the customized action 2 .
参见图4,为本发明实施例提供的一种运动轨迹示意图,如图4所示,其中,第一蓝牙设备可以为手机401,第二蓝牙设备可以为手环402,则用户11可一起手握第一蓝牙设备401和第二蓝牙设备402触发自定义的动作,从而第一蓝牙设备和第二蓝牙设备可分别获取到运动轨迹。用户12可手握第一蓝牙设备401,用户13可手握第二蓝牙设备402,用户12和用户13均触发自定义的动作,从而第一蓝牙设备和第二蓝牙设备可分别获取到运动轨迹。FIG. 4 is a schematic diagram of a motion trajectory according to an embodiment of the present invention. As shown in FIG. 4, the first Bluetooth device may be a mobile phone 401, and the second Bluetooth device may be a wristband 402. The first Bluetooth device 401 and the second Bluetooth device 402 are triggered to trigger a customized action, so that the first Bluetooth device and the second Bluetooth device can respectively acquire the motion track. The user 12 can hold the first Bluetooth device 401, and the user 13 can hold the second Bluetooth device 402. Both the user 12 and the user 13 trigger a customized action, so that the first Bluetooth device and the second Bluetooth device can respectively acquire the motion track. .
S102,第一蓝牙设备生成与第一运动轨迹对应的第一配对信息。
S102. The first Bluetooth device generates first pairing information corresponding to the first motion track.
作为一种可选的实施方式,第一蓝牙设备可生成与第一运动轨迹对应的第一配对信息,其中,第一配对信息可包括:第一配对码,则第一蓝牙设备生成第一运动轨迹对应的第一配对信息具体可以包括:第一蓝牙设备将第一运动轨迹映射为第一配对码。具体实现中,可由配对码生成算法计算得到第一配对码,例如,每一时刻的加速度ai和重力方向gi均为一个三维向量,寻找一个空间旋转变换Pi,使得重力方向gi,通过空间旋转变换Pi,转换为单位向量i。通过空间旋转变换Pi,将相对坐标系中的加速度向量ai,变换为绝对坐标系中的加速度向量bi,对加速度向量bi做编码操作,将加速度向量的方向分量映射为一个值,最终可以得到一定长度的字符串作为蓝牙设备的配对码。则第一蓝牙设备可通过配对码生成算法将第一运动轨迹映射为第一配对码Pcode_A。进一步的,若运动轨迹相同,则生成的配对信息相同。As an optional implementation manner, the first Bluetooth device may generate first pairing information corresponding to the first motion track, where the first pairing information may include: a first pairing code, where the first Bluetooth device generates the first motion The first pairing information corresponding to the track may specifically include: the first Bluetooth device maps the first motion track to the first pairing code. In a specific implementation, the first pairing code may be calculated by a pairing code generation algorithm. For example, the acceleration ai and the gravity direction gi at each moment are both a three-dimensional vector, and a spatial rotation transformation Pi is sought, so that the gravity direction gi is transformed by spatial rotation. Pi, converted to unit vector i. Through the spatial rotation transformation Pi, the acceleration vector ai in the relative coordinate system is transformed into the acceleration vector bi in the absolute coordinate system, the acceleration vector bi is encoded, and the direction component of the acceleration vector is mapped to a value, and finally a certain value can be obtained. The length string is used as the pairing code for the Bluetooth device. Then, the first Bluetooth device can map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm. Further, if the motion trajectories are the same, the generated pairing information is the same.
S103,第一蓝牙设备根据第一配对信息与第二蓝牙设备进行蓝牙匹配。S103. The first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information.
作为一种可选的实施方式,若第一蓝牙设备为主设备,则第二蓝牙设备为从设备,则第一蓝牙设备根据第一配对信息与第二蓝牙设备进行蓝牙匹配具体可以包括:第一蓝牙设备向第二蓝牙设备发送第一配对信息,以使第二蓝牙设备在检测到与第一配对信息匹配的第二配对信息时,确定与第一蓝牙设备蓝牙匹配成功;其中,第二配对信息为第二蓝牙设备由获取到的第二蓝牙设备的第三运动轨迹生成的配对信息。As an optional implementation, if the first Bluetooth device is the master device, the second Bluetooth device is the slave device, and the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, which may include: Sending, by the Bluetooth device, the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful when detecting the second pairing information that matches the first pairing information; wherein, the second device The pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
具体的,例如,第一蓝牙设备可通过配对码生成算法将第一运动轨迹映射为第一配对码Pcode_A,第二蓝牙设备可通过配对码生成算法将第三运动轨迹映射为第二配对码Pcode_B,又第一运动轨迹与第三运动轨迹一致,则第一配对码Pcode_A与第二配对码Pcode_B相同,则第二蓝牙设备可检测到第一配对信息与第二配对信息相匹配,从而可确定第二蓝牙设备与第一蓝牙设备蓝牙匹配成功。进一步的,可设置匹配精度,例如,第一运动轨迹为一直径为R1的圆,第三运动轨迹为一直径为R2的圆,若R1与R2的差值在匹配精度允许范围内,则计算得到的第一配对码和第二配对码相一致。Specifically, for example, the first Bluetooth device may map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm, and the second Bluetooth device may map the third motion track to the second pairing code Pcode_B by using a pairing code generation algorithm. The first pairing code Pcode_A is identical to the second pairing code Pcode_B, and the second Bluetooth device can detect that the first pairing information matches the second pairing information, thereby determining The second Bluetooth device successfully matches the Bluetooth of the first Bluetooth device. Further, the matching precision may be set. For example, the first motion trajectory is a circle having a diameter R1, and the third motion trajectory is a circle having a diameter R2. If the difference between R1 and R2 is within the allowable range of the matching precision, the calculation is performed. The obtained first pairing code is consistent with the second pairing code.
作为一种可选的实施方式,若第二蓝牙设备为主设备,则第一蓝牙设备为从设备,则第一蓝牙设备根据第一配对信息与第二蓝牙设备进行蓝牙匹配具体可以包括:第一蓝牙设备接收第二蓝牙设备发送的第二配对信息;其中,第二配对信息为第二蓝牙设备由获取到的第二蓝牙设备的第三运动轨迹生成的配对信息;第一蓝牙设备在检测到第一配对信息与第二配对信息匹配时,
确定与第二蓝牙设备蓝牙匹配成功。As an optional implementation, if the second Bluetooth device is the master device, the first Bluetooth device is a slave device, and the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, which may include: Receiving, by the second Bluetooth device, the second pairing information sent by the second Bluetooth device; wherein the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device; the first Bluetooth device is detecting When the first pairing information matches the second pairing information,
It is determined that the Bluetooth match with the second Bluetooth device is successful.
具体的,例如,第一蓝牙设备可通过配对码生成算法将第一运动轨迹映射为第一配对码Pcode_A,第二蓝牙设备可通过配对码生成算法将第三运动轨迹映射为第二配对码Pcode_B,又第一运动轨迹与第三运动轨迹一致,则第一配对码Pcode_A与第二配对码Pcode_B相同,则第一蓝牙设备在接收到第二配对信息后,将第二配对信息与第一配对信息进行比较,进而可检测到第一配对信息与第二配对信息相匹配,从而可确定第一蓝牙设备与第二蓝牙设备蓝牙匹配成功。Specifically, for example, the first Bluetooth device may map the first motion track to the first pairing code Pcode_A by using a pairing code generation algorithm, and the second Bluetooth device may map the third motion track to the second pairing code Pcode_B by using a pairing code generation algorithm. The first pairing code Pcode_A is the same as the second pairing code Pcode_B, and the first pairing device matches the first pairing information with the first pairing information after receiving the second pairing information. The information is compared, and then the first pairing information is matched with the second pairing information, so that the Bluetooth matching between the first Bluetooth device and the second Bluetooth device can be determined to be successful.
进一步可选的,还可以通过用户触发初始化动作,进而可获取到初始化动作对应的初始化轨迹,若初始化轨迹与预设初始化轨迹一致,则可开启蓝牙功能,还可以开启蓝牙搜索模式或允许搜索模式。Further, the initialization action may be triggered by the user, and the initialization track corresponding to the initialization action may be acquired. If the initialization track is consistent with the preset initialization track, the Bluetooth function may be enabled, and the Bluetooth search mode or the search mode may be enabled. .
具体实现中,若第一蓝牙设备为主设备,则第二蓝牙设备为从设备,则本发明实施例提供的蓝牙配对方法在步骤S101之前,还可以包括步骤:In a specific implementation, if the first Bluetooth device is the master device, and the second Bluetooth device is the slave device, the Bluetooth pairing method provided by the embodiment of the present invention may further include the following steps:
第一蓝牙设备获取第一蓝牙设备的第二运动轨迹;The first Bluetooth device acquires a second motion trajectory of the first Bluetooth device;
第一蓝牙设备在检测到第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,确定可连接的蓝牙设备,可连接的设备包括第二设备。When detecting that the second motion track is consistent with the preset initialization track, the first Bluetooth device broadcasts a Bluetooth device search request to determine a connectable Bluetooth device, and the connectable device includes the second device.
具体实现中,用户手持第一蓝牙设备,触发某个自定义的初始化动作,第一蓝牙设备获取初始化动作对应的预设初始化轨迹。第一蓝牙设备在检测到第二运动轨迹与预设初始化轨迹一致时,触发开启蓝牙搜索模式,可广播蓝牙设备搜索请求,其他蓝牙设备若已经开启蓝牙允许搜索模式的,可接收到蓝牙设备搜索请求,并可返回搜索响应,由返回的搜索响应可确定可连接的蓝牙设备。In a specific implementation, the user holds the first Bluetooth device and triggers a certain initialization action, and the first Bluetooth device acquires a preset initialization track corresponding to the initialization action. When detecting that the second motion track is consistent with the preset initialization track, the first Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request may be broadcasted. If other Bluetooth devices have enabled the Bluetooth enabled search mode, the Bluetooth device may receive the Bluetooth device search. The request can return a search response, and the returned search response can determine the connectable Bluetooth device.
进一步的,第一蓝牙设备向第二蓝牙设备发送第一配对信息,以使第二蓝牙设备在检测到与第一配对信息匹配的第二配对信息时,确定与第一蓝牙设备蓝牙匹配成功具体可以包括:Further, the first Bluetooth device sends the first pairing information to the second Bluetooth device, so that when the second pairing information that matches the first pairing information is detected, the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful. Can include:
第一蓝牙设备向可连接的蓝牙设备发送第一配对信息,以使可连接的蓝牙设备对第一配对信息进行验证,其中,第二蓝牙设备在检测到与第一配对信息匹配的第二配对信息时,向第一蓝牙设备发送匹配成功响应;The first Bluetooth device sends the first pairing information to the connectable Bluetooth device to enable the connectable Bluetooth device to verify the first pairing information, wherein the second Bluetooth device detects the second pairing that matches the first pairing information Sending a matching success response to the first Bluetooth device when the information is;
第一蓝牙设备在接收到第二蓝牙设备发送的匹配成功响应时,确定与第二蓝牙设备建立蓝牙通信连接。The first Bluetooth device determines to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device.
进一步可选的,若第二蓝牙设备为主设备,则第一蓝牙设备为从设备,
则本发明实施例提供的蓝牙配对方法在步骤S101之前,还可以包括步骤:Further optionally, if the second Bluetooth device is the master device, the first Bluetooth device is the slave device.
The Bluetooth pairing method provided by the embodiment of the present invention may further include the following steps:
第一蓝牙设备获取第一蓝牙设备的第二运动轨迹;The first Bluetooth device acquires a second motion trajectory of the first Bluetooth device;
第一蓝牙设备在检测到第二运动轨迹与第一预设初始化轨迹一致时,开启允许搜索模式;The first Bluetooth device turns on the allowable search mode when detecting that the second motion trajectory coincides with the first preset initialization trajectory;
第一蓝牙设备在接收到第二蓝牙设备发送的蓝牙设备搜索请求时,向第二蓝牙设备返回允许搜索响应,以使第二蓝牙设备根据允许搜索响应将第一蓝牙设备确定为可连接的蓝牙设备,并向可连接的蓝牙设备发送第二配对信息。When receiving the Bluetooth device search request sent by the second Bluetooth device, the first Bluetooth device returns an allow search response to the second Bluetooth device, so that the second Bluetooth device determines the first Bluetooth device as connectable Bluetooth according to the allowed search response. The device sends the second pairing information to the connectable Bluetooth device.
进一步的,第二蓝牙设备在检测到第二配对信息与第一配对信息匹配时,确定与第一蓝牙设备蓝牙匹配成功具体可以包括:Further, when the second Bluetooth device detects that the second pairing information is matched with the first pairing information, determining that the Bluetooth matching with the first Bluetooth device succeeds may specifically include:
第一蓝牙设备向第二蓝牙设备发送匹配成功响应,以使第二蓝牙设备在接收到匹配成功响应时,确定与第一蓝牙设备建立蓝牙通信连接。The first Bluetooth device sends a matching success response to the second Bluetooth device, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
进一步可选的,若第一蓝牙设备、第二蓝牙设备均为主设备,则可由任一发起搜索,发起搜索的蓝牙设备为主设备,另一蓝牙设备为从设备,则主设备开启蓝牙搜索模式,从设备开启允许搜索模式。Further, if the first Bluetooth device and the second Bluetooth device are both the master device, the Bluetooth device that initiates the search may initiate the search, and the Bluetooth device that initiates the search is the master device, and the other Bluetooth device is the slave device, and the master device starts the Bluetooth search. Mode, the device allows the search mode to be turned on.
进一步的,第一蓝牙设备触发蓝牙搜索后,可通过设备的用户界面提示用户,例如振动提示或者语音提示等。进一步的,第一蓝牙设备开启允许搜索模式,可通过设备的用户界面提示用户,例如振动提示或者语音提示等。Further, after the first Bluetooth device triggers the Bluetooth search, the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt. Further, the first Bluetooth device enables the search mode, and the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
本发明实施例提供一种蓝牙配对方法,第一蓝牙设备可获取第一蓝牙设备的第一运动轨迹,并生成与第一运动轨迹对应的第一配对信息,进而可根据第一配对信息与第二蓝牙设备进行蓝牙匹配。本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。An embodiment of the present invention provides a Bluetooth pairing method, where a first Bluetooth device can acquire a first motion track of a first Bluetooth device, and generate first pairing information corresponding to the first motion track, and further, according to the first pairing information and the first Two Bluetooth devices perform Bluetooth matching. In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步的,用户可以手握蓝牙设备触发初始化动作,蓝牙设备可进入蓝牙搜索模式或者允许搜索模式,进而可通过蓝牙设备的运动轨迹开启蓝牙,无需手动开启蓝牙,无需手动搜索蓝牙设备,提升了蓝牙配对的便捷性。Further, the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved. The convenience of pairing.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。
Further, for the Bluetooth device that does not have the input of the display screen, the keyboard, the button, and the like, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
请参阅图2A,图2A为本发明第二实施例提供的一种蓝牙配对方法的示意图,本发明实施例中,第一蓝牙设备为主设备,第二蓝牙设备为从设备。如图2A所示,本发明实施例提供的蓝牙配对方法可包括步骤:S201~S212。Referring to FIG. 2A, FIG. 2A is a schematic diagram of a Bluetooth pairing method according to a second embodiment of the present invention. In the embodiment of the present invention, a first Bluetooth device is a master device, and a second Bluetooth device is a slave device. As shown in FIG. 2A, the Bluetooth pairing method provided by the embodiment of the present invention may include the following steps: S201-S212.
S201,第一蓝牙设备获取第一蓝牙设备的第二运动轨迹。S201. The first Bluetooth device acquires a second motion track of the first Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备可获取第一蓝牙设备的第二运动轨迹,具体的,用户可手握第一蓝牙设备,触发某个自定义的初始化动作,从而第一蓝牙设备可获取到初始化动作对应的第二运动轨迹。进一步的,可通过加速度传感器获取第二运动轨迹。As an optional implementation manner, the first Bluetooth device may acquire a second motion track of the first Bluetooth device. Specifically, the user may hold the first Bluetooth device and trigger a customized initialization action, so that the first Bluetooth The device can obtain a second motion track corresponding to the initialization action. Further, the second motion trajectory can be acquired by the acceleration sensor.
S202,第一蓝牙设备在检测到第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求。S202. The first Bluetooth device broadcasts a Bluetooth device search request when detecting that the second motion track is consistent with the preset initialization track.
作为一种可选的实施方式,第一蓝牙设备在检测到第二运动轨迹与预设初始化轨迹一致时,触发开启蓝牙搜索模式,可广播蓝牙设备搜索请求,其他蓝牙设备若已经开启蓝牙允许搜索模式的,可接收到蓝牙设备搜索请求。As an optional implementation manner, when detecting that the second motion track is consistent with the preset initialization track, the first Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request is broadcasted, and the other Bluetooth devices enable the search if the Bluetooth device is enabled. Mode, can receive Bluetooth device search request.
S203,第二蓝牙设备在接收到蓝牙设备搜索请求时,向第一蓝牙设备返回允许搜索响应。S203. The second Bluetooth device returns an allow search response to the first Bluetooth device when receiving the Bluetooth device search request.
作为一种可选的实施方式,第二蓝牙设备已经开启蓝牙允许搜索模式,可接收到蓝牙设备搜索请求,并可向第一蓝牙设备返回允许搜索响应。As an optional implementation manner, the second Bluetooth device has turned on the Bluetooth allow search mode, can receive the Bluetooth device search request, and can return an allow search response to the first Bluetooth device.
进一步的,还可以为用户手持第二蓝牙设备,触发某个自定义的初始化动作,第二蓝牙设备获取初始化动作对应的预设初始化轨迹。第二蓝牙设备获取第四运动轨迹,第二蓝牙设备在检测到第四运动轨迹与预设初始化轨迹一致时,触发开启允许搜索模式,可接收到蓝牙设备搜索请求。Further, the user may hold the second Bluetooth device to trigger a certain initialization action, and the second Bluetooth device acquires the preset initialization track corresponding to the initialization action. The second Bluetooth device acquires a fourth motion track, and when the second Bluetooth device detects that the fourth motion track is consistent with the preset initialization track, triggering the open permission search mode, and receiving the Bluetooth device search request.
S204,第一蓝牙由允许搜索响应确定可连接的蓝牙设备,可连接的蓝牙设备包括第二蓝牙设备。S204. The first Bluetooth determines a connectable Bluetooth device by allowing a search response, and the connectable Bluetooth device includes a second Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备根据接收到的允许搜索响应确定可连接的蓝牙设备,其中,允许搜索响应可包括可连接的蓝牙设备的标识,则第一蓝牙设备可确定可连接的蓝牙设备的列表,其中,可连接的蓝牙设备包括第二蓝牙设备。As an optional implementation manner, the first Bluetooth device determines the connectable Bluetooth device according to the received permission search response, wherein the allowed search response may include the identifier of the connectable Bluetooth device, and then the first Bluetooth device may determine that A list of connected Bluetooth devices, wherein the connectable Bluetooth device includes a second Bluetooth device.
进一步的,可连接的蓝牙设备还可以包括第三蓝牙设备,其中,第三蓝牙设备在接收到第一蓝牙设备广播的蓝牙设备搜索请求后,向第一蓝牙设备返回允许搜索响应,则第一蓝牙设备可根据第三蓝牙设备发送的允许搜索响
应将第三蓝牙设备添加到可连接的蓝牙设备列表中。Further, the connectable Bluetooth device may further include a third Bluetooth device, wherein the third Bluetooth device returns an allow search response to the first Bluetooth device after receiving the Bluetooth device search request broadcast by the first Bluetooth device, and then the first The Bluetooth device can respond according to the permission allowed by the third Bluetooth device.
The third Bluetooth device should be added to the list of connectable Bluetooth devices.
S205,第一蓝牙设备获取第一蓝牙设备的第一运动轨迹。S205. The first Bluetooth device acquires a first motion track of the first Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备第一蓝牙设备获取第一蓝牙设备的运动参数数据;第一蓝牙设备由第一蓝牙设备的运动参数数据生成第一蓝牙设备的第一运动轨迹,具体实现中,运动参数数据例如可以包括加速度向量、重力加速度向量等等。根据获取到运动参数数据由运动轨迹生成算法计算得到第一运动轨迹。As an optional implementation manner, the first Bluetooth device acquires the motion parameter data of the first Bluetooth device, and the first Bluetooth device generates the first motion track of the first Bluetooth device by using the motion parameter data of the first Bluetooth device. In a specific implementation, the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like. The first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data.
S206,第一蓝牙设备生成与第一运动轨迹对应的第一配对信息。S206. The first Bluetooth device generates first pairing information corresponding to the first motion track.
作为一种可选的实施方式,第一配对信息可包括:第一配对码,则第一蓝牙设备生成第一运动轨迹对应的第一配对信息具体可以包括:第一蓝牙设备将第一运动轨迹映射为第一配对码。As an optional implementation manner, the first pairing information may include: a first pairing code, where the first pairing information that the first Bluetooth device generates the first motion track may specifically include: the first Bluetooth device will use the first motion track Map to the first pairing code.
S207,第一蓝牙设备向可连接的蓝牙设备发送第一配对信息。S207. The first Bluetooth device sends the first pairing information to the connectable Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备向可连接的蓝牙设备发送第一配对信息,可连接的蓝牙设备包括第二蓝牙设备和第三蓝牙设备,则第一蓝牙设备分别向第二蓝牙设备、第三蓝牙设备发送第一配对信息。As an optional implementation manner, the first Bluetooth device sends the first pairing information to the connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device and the third Bluetooth device, and the first Bluetooth device respectively goes to the second The Bluetooth device and the third Bluetooth device send the first pairing information.
S208,第二蓝牙设备获取第二蓝牙设备的第三运动轨迹。S208. The second Bluetooth device acquires a third motion trajectory of the second Bluetooth device.
作为一种可选的实施方式,用户手握第一蓝牙设备触发某个自定义的动作W,第一蓝牙设备获取到第一运动轨迹,用户手握第二蓝牙设备触发与自定义的动作W相同的动作,第二蓝牙设备可获取到第三运动轨迹。As an optional implementation manner, the user holds the first Bluetooth device to trigger a certain customized action W, the first Bluetooth device acquires the first motion track, and the user holds the second Bluetooth device trigger and the customized action W. With the same action, the second Bluetooth device can acquire the third motion trajectory.
S209,第二蓝牙设备生成与第三运动轨迹对应的第二配对信息。S209. The second Bluetooth device generates second pairing information corresponding to the third motion track.
作为一种可选的实施方式,第二配对信息可包括:第二配对码,则第二蓝牙设备生成第三运动轨迹对应的第二配对信息具体可以包括:第二蓝牙设备将第三运动轨迹映射为第二配对码。As an optional implementation manner, the second pairing information may include: a second pairing code, where the second pairing information generated by the second Bluetooth device to generate the third motion track may specifically include: the second Bluetooth device uses the third motion track Map to the second pairing code.
S210,第二蓝牙设备接收到第一配对信息,并检测到第一配对信息与第二配对信息匹配。S210. The second Bluetooth device receives the first pairing information, and detects that the first pairing information matches the second pairing information.
作为一种可选的实施方式,其中,与第一蓝牙设备可连接的设备中包括第二蓝牙设备,则第二蓝牙设备可接收到第一蓝牙设备发送的第一配对信息,第二蓝牙设备检测到与第一配对信息匹配的第二配对信息,则可确认第二蓝牙设备与第一蓝牙设备匹配成功。As an optional implementation manner, the device that is connectable to the first Bluetooth device includes a second Bluetooth device, and the second Bluetooth device can receive the first pairing information sent by the first Bluetooth device, and the second Bluetooth device When the second pairing information matching the first pairing information is detected, it can be confirmed that the second Bluetooth device matches the first Bluetooth device successfully.
S211,第二蓝牙设备向第一蓝牙设备发送匹配成功响应。S211. The second Bluetooth device sends a matching success response to the first Bluetooth device.
作为一种可选的实施方式,第二蓝牙设备在确认与第一蓝牙设备匹配成
功时,可向第一蓝牙设备返回匹配成功响应。As an optional implementation manner, the second Bluetooth device is confirmed to be matched with the first Bluetooth device.
In the case of power, a matching success response can be returned to the first Bluetooth device.
S212,第一蓝牙设备由匹配成功响应确定与第二蓝牙设备建立蓝牙通信连接。S212. The first Bluetooth device determines, by the matching success response, establishing a Bluetooth communication connection with the second Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备在接收到第二蓝牙设备发送的匹配成功响应后,可确定与第二蓝牙设备监理蓝牙通信连接,则可通过蓝牙与与第二蓝牙设备进行数据的传输,以进行蓝牙通信。As an optional implementation manner, after receiving the matching success response sent by the second Bluetooth device, the first Bluetooth device may determine that the Bluetooth communication connection with the second Bluetooth device is supervised, and the Bluetooth device may perform the Bluetooth communication with the second Bluetooth device. The transmission of data for Bluetooth communication.
进一步的,第三蓝牙设备中不存在与第一配对信息匹配的配对信息,而第二蓝牙设备中存在与第一配对信息匹配的第二配对信息,则第一蓝牙设备和第二蓝牙设备可成功进行蓝牙匹配。Further, in the third Bluetooth device, there is no pairing information matching the first pairing information, and the second pairing information in the second Bluetooth device is matched with the first pairing information, and the first Bluetooth device and the second Bluetooth device may be Successful Bluetooth matching.
进一步可选的,参见图2B,是本发明实施例提供的一种蓝牙配对示意图,如图2B所示,第一蓝牙设备21为主设备,可连接的蓝牙设备包括:第二蓝牙设备22以及第三蓝牙设备23,第二蓝牙设备22为从设备,第三蓝牙设备23为从设备。第一蓝牙设备21向可连接的蓝牙设备发送第一配对信息,第二蓝牙设备22在检测到与第一配对信息匹配的第二蓝牙信息后,向第一蓝牙设备21返回匹配成功响应,第三蓝牙设备23不存在与第一配对信息匹配的配对信息,则第一蓝牙设备21仅接收到第二蓝牙设备22发送的匹配成功响应,从而可由匹配成功响应确定与第二蓝牙设备建立蓝牙通信连接。For example, FIG. 2B is a schematic diagram of Bluetooth pairing provided by an embodiment of the present invention. As shown in FIG. 2B, the first Bluetooth device 21 is a master device, and the connectable Bluetooth device includes: a second Bluetooth device 22 and The third Bluetooth device 23, the second Bluetooth device 22 is a slave device, and the third Bluetooth device 23 is a slave device. The first Bluetooth device 21 sends the first pairing information to the connectable Bluetooth device, and after detecting the second Bluetooth information that matches the first pairing information, the second Bluetooth device 22 returns a matching success response to the first Bluetooth device 21, The third Bluetooth device 23 does not have the pairing information matching the first pairing information, and the first Bluetooth device 21 only receives the matching success response sent by the second Bluetooth device 22, so that the Bluetooth communication can be established with the second Bluetooth device by the matching success response. connection.
本发明实施例提供一种蓝牙配对方法,第一蓝牙设备在检测到第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,从而确定可连接的蓝牙设备,向可连接的蓝牙设备发送第一配对信息,其中,第一配对信息与第一蓝牙设备的第一运动轨迹对应,第二蓝牙设备在检测到第一配对信息与第二配对信息匹配时,可向第一蓝牙设备返回匹配成功响应,从而第一蓝牙设备可由匹配成功响应确定与第二蓝牙设备建立蓝牙通信连接。从而用户可以手握蓝牙设备触发初始化动作,第一蓝牙设备可进入搜索模式,进而可通过蓝牙设备的运动轨迹开启蓝牙,无需手动开启蓝牙,无需手动搜索蓝牙设备,提升了蓝牙配对的便捷性。The embodiment of the present invention provides a Bluetooth pairing method. When the first Bluetooth device detects that the second motion track is consistent with the preset initialization track, the first Bluetooth device broadcasts a Bluetooth device search request, thereby determining a connectable Bluetooth device to the connectable Bluetooth device. Sending the first pairing information, where the first pairing information corresponds to the first motion track of the first Bluetooth device, and the second Bluetooth device can return to the first Bluetooth device when detecting that the first pairing information matches the second pairing information The match is successfully responded so that the first Bluetooth device can determine to establish a Bluetooth communication connection with the second Bluetooth device by the match success response. Therefore, the user can trigger the initialization action by holding the Bluetooth device, and the first Bluetooth device can enter the search mode, thereby turning on the Bluetooth through the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, thereby improving the convenience of Bluetooth pairing.
本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过
本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。Further, for a Bluetooth device that does not have an input such as a display screen, a keyboard, a button, etc.,
In the embodiment of the present invention, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of Bluetooth pairing.
请参阅图3A,图3A为本发明第三实施例提供的一种蓝牙匹配方法的示意图。本发明实施例中,第二蓝牙设备为主设备,第一蓝牙设备为从设备。如图3A所示,本发明实施例提供的资源泄漏检测方法可包括步骤S301~S314。其中:Referring to FIG. 3A, FIG. 3A is a schematic diagram of a Bluetooth matching method according to a third embodiment of the present invention. In the embodiment of the present invention, the second Bluetooth device is the master device, and the first Bluetooth device is the slave device. As shown in FIG. 3A, the resource leakage detecting method provided by the embodiment of the present invention may include steps S301 to S314. among them:
S301,第一蓝牙设备获取第一蓝牙设备的第二运动轨迹。S301. The first Bluetooth device acquires a second motion track of the first Bluetooth device.
作为一种可选的实施方式,第一蓝牙设备可获取第一蓝牙设备的第二运动轨迹,具体的,用户可手握第一蓝牙设备,触发某个自定义的初始化动作,从而第一蓝牙设备可获取到初始化动作对应的第二运动轨迹。进一步的,可通过加速度传感器获取第二运动轨迹。As an optional implementation manner, the first Bluetooth device may acquire a second motion track of the first Bluetooth device. Specifically, the user may hold the first Bluetooth device and trigger a customized initialization action, so that the first Bluetooth The device can obtain a second motion track corresponding to the initialization action. Further, the second motion trajectory can be acquired by the acceleration sensor.
S302,第一蓝牙设备在检测到第二运动轨迹与第一预设初始化轨迹一致时,开启允许搜索模式。S302. The first Bluetooth device turns on the permission search mode when detecting that the second motion track is consistent with the first preset initialization track.
作为一种可选的实施方式,第一蓝牙设备在检测到第二运动轨迹与第一预设初始化轨迹一致时,触发开启允许搜索模式,即开启蓝牙并进入允许搜索模式,则可接收到蓝牙设备搜索请求。As an optional implementation manner, when detecting that the second motion track is consistent with the first preset initialization track, the first Bluetooth device triggers the enable search mode, that is, when the Bluetooth is enabled and the search mode is allowed, the Bluetooth may be received. Device search request.
S303,第二蓝牙设备获取第二蓝牙设备的第四运动轨迹。S303. The second Bluetooth device acquires a fourth motion track of the second Bluetooth device.
作为一种可选的实施方式,第二蓝牙设备可获取第二蓝牙设备的第四运动轨迹,具体的,用户可手握第二蓝牙设备,触发某个自定义的初始化动作,从而第二蓝牙设备可获取到初始化动作对应的第四运动轨迹。进一步的,可通过加速度传感器获取第四运动轨迹。As an optional implementation manner, the second Bluetooth device may acquire a fourth motion track of the second Bluetooth device. Specifically, the user may hold the second Bluetooth device to trigger a customized initialization action, so that the second Bluetooth The device can obtain a fourth motion track corresponding to the initialization action. Further, the fourth motion trajectory can be acquired by the acceleration sensor.
S304,第二蓝牙设备在检测到第四运动轨迹与第二预设初始化轨迹一致时,广播蓝牙设备搜索请求。S304. The second Bluetooth device broadcasts a Bluetooth device search request when detecting that the fourth motion track is consistent with the second preset initialization track.
作为一种可选的实施方式,第二蓝牙设备在检测到第四运动轨迹与第二预设初始化轨迹一致时,触发开启蓝牙搜索模式,可广播蓝牙设备搜索请求。As an optional implementation manner, when detecting that the fourth motion track is consistent with the second preset initialization track, the second Bluetooth device triggers the Bluetooth search mode to be enabled, and the Bluetooth device search request may be broadcasted.
S305,第一蓝牙设备在接收到蓝牙设备搜索请求时,向第二蓝牙设备返回允许搜索响应。S305. The first Bluetooth device returns an allow search response to the second Bluetooth device when receiving the Bluetooth device search request.
作为一种可选的实施方式,第一蓝牙设备已开启允许搜索模式,则可接收到第二蓝牙设备广播的蓝牙设备搜索请求,进一步的,第一蓝牙设备可根据蓝牙设备搜索请求向第二蓝牙设备发送允许搜索响应。
As an optional implementation manner, if the first Bluetooth device has enabled the search mode, the Bluetooth device search request broadcasted by the second Bluetooth device may be received. Further, the first Bluetooth device may perform the second request according to the Bluetooth device search request. The Bluetooth device sends a search response that allows it.
S306,第二蓝牙设备由允许搜索响应确定可连接的蓝牙设备,可连接的蓝牙设备包括第一蓝牙设备。S306. The second Bluetooth device determines a connectable Bluetooth device by allowing a search response, and the connectable Bluetooth device comprises a first Bluetooth device.
作为一种可选的实施方式,第二蓝牙设备可由接收到的允许搜索响应确定可连接的蓝牙设备,其中,允许搜索响应可包括可连接的蓝牙设备的标识,则第一蓝牙设备可确定可连接的蓝牙设备的列表,其中,可连接的蓝牙设备包括第二蓝牙设备。As an optional implementation manner, the second Bluetooth device may determine the connectable Bluetooth device by the received permission search response, wherein the search enable response may include an identifier of the connectable Bluetooth device, and then the first Bluetooth device may determine A list of connected Bluetooth devices, wherein the connectable Bluetooth device includes a second Bluetooth device.
进一步的,可连接的设备还包括第三蓝牙设备,第三蓝牙设备可接收到第二蓝牙设备发送的蓝牙设备搜索请求,并向第二蓝牙设备发送允许搜索响应。Further, the connectable device further includes a third Bluetooth device, and the third Bluetooth device can receive the Bluetooth device search request sent by the second Bluetooth device, and send an allow search response to the second Bluetooth device.
S307,第二蓝牙设备获取第二蓝牙设备的第三运动轨迹。S307. The second Bluetooth device acquires a third motion trajectory of the second Bluetooth device.
作为一种可选的实施方式,用户手握第一蓝牙设备触发某个自定义的动作W,第一蓝牙设备获取到第一运动轨迹,用户手握第二蓝牙设备触发与自定义的动作W相同的动作,第二蓝牙设备可获取到第三运动轨迹。As an optional implementation manner, the user holds the first Bluetooth device to trigger a certain customized action W, the first Bluetooth device acquires the first motion track, and the user holds the second Bluetooth device trigger and the customized action W. With the same action, the second Bluetooth device can acquire the third motion trajectory.
S308,第二蓝牙设备生成与第三运动轨迹对应的第二配对信息。S308. The second Bluetooth device generates second pairing information corresponding to the third motion track.
作为一种可选的实施方式,第二配对信息可包括:第二配对码,则第二蓝牙设备生成第三运动轨迹对应的第二配对信息具体可以包括:第二蓝牙设备将第三运动轨迹映射为第二配对码。As an optional implementation manner, the second pairing information may include: a second pairing code, where the second pairing information generated by the second Bluetooth device to generate the third motion track may specifically include: the second Bluetooth device uses the third motion track Map to the second pairing code.
S309,第二蓝牙设备向可连接的蓝牙设备发送第二配对信息。S309. The second Bluetooth device sends the second pairing information to the connectable Bluetooth device.
作为一种可选的实施方式,第二蓝牙设备可向可连接的蓝牙设备发送第二配对信息,其中,可连接的蓝牙设备包括第一蓝牙设备和第三蓝牙设备,则可向第一蓝牙设备发送第二配对信息,可向第三蓝牙设备发送第二配对信息。As an optional implementation manner, the second Bluetooth device may send the second pairing information to the connectable Bluetooth device, where the connectable Bluetooth device includes the first Bluetooth device and the third Bluetooth device, and then the first Bluetooth device is The device sends the second pairing information, and the second pairing information can be sent to the third Bluetooth device.
S310,第一蓝牙设备获取第一蓝牙设备的第一运动轨迹。S310. The first Bluetooth device acquires a first motion track of the first Bluetooth device.
S311,第一蓝牙设备生成与第一运动轨迹对应的第一配对信息。S311. The first Bluetooth device generates first pairing information corresponding to the first motion track.
S312,第一蓝牙设备接收到第二配对信息,并检测到第一配对信息与第二配对信息匹配。S312. The first Bluetooth device receives the second pairing information, and detects that the first pairing information matches the second pairing information.
S313,第一蓝牙设备向第二蓝牙设备发送匹配成功响应。S313. The first Bluetooth device sends a matching success response to the second Bluetooth device.
S314,第二蓝牙设备由匹配成功响应确定与第一蓝牙设备建立蓝牙通信连接。S314. The second Bluetooth device determines, by the matching success response, establishing a Bluetooth communication connection with the first Bluetooth device.
进一步的,第三蓝牙设备中不存在与第二配对信息匹配的配对信息,而第一蓝牙设备中存在与第二配对信息匹配的第一配对信息,则第一蓝牙设备
和第二蓝牙设备可成功进行蓝牙匹配。Further, in the third Bluetooth device, there is no pairing information that matches the second pairing information, and the first pairing information that matches the second pairing information exists in the first Bluetooth device, and the first Bluetooth device
And the second Bluetooth device can successfully perform Bluetooth matching.
进一步可选的,参见图3B,是本发明实施例提供的另一种蓝牙配对示意图,如图3B所示,第二蓝牙设备32为主设备,可连接的蓝牙设备包括:第一蓝牙设备31、第三蓝牙设备33以及第四蓝牙设备34,第一蓝牙设备31为从设备,第三蓝牙设备33为从设备,第四蓝牙设备34为从设备。第二蓝牙设备31向可连接的蓝牙设备发送第一配对信息,第一蓝牙设备32在检测到与第一配对信息匹配的第二蓝牙信息后,向第二蓝牙设备32返回匹配成功响应,第三蓝牙设备33和第四蓝牙设备34不存在与第一配对信息匹配的配对信息,则第二蓝牙设备32仅接收到第一蓝牙设备31发送的匹配成功响应,从而可由匹配成功响应确定与第一蓝牙设备建立蓝牙通信连接。For example, FIG. 3B is a schematic diagram of another Bluetooth pairing provided by the embodiment of the present invention. As shown in FIG. 3B, the second Bluetooth device 32 is a master device, and the connectable Bluetooth device includes: a first Bluetooth device 31. The third Bluetooth device 33 and the fourth Bluetooth device 34 are the slave device, the third Bluetooth device 33 is the slave device, and the fourth Bluetooth device 34 is the slave device. The second Bluetooth device 31 sends the first pairing information to the connectable Bluetooth device. After detecting the second Bluetooth information that matches the first pairing information, the first Bluetooth device 32 returns a matching success response to the second Bluetooth device 32. The third Bluetooth device 33 and the fourth Bluetooth device 34 do not have pairing information that matches the first pairing information, and the second Bluetooth device 32 only receives the matching success response sent by the first Bluetooth device 31, so that the matching success response can be determined and A Bluetooth device establishes a Bluetooth communication connection.
本发明实施例提供一种蓝牙配对方法,第一蓝牙设备在检测到第二运动轨迹与第一预设初始化轨迹一致时,开启允许搜索模式,第二蓝牙设备在检测到第四运动轨迹与第二预设初始化轨迹一致时,广播蓝牙设备搜索请求,从而第二蓝牙设备确定可连接的蓝牙设备,向可连接的蓝牙设备发送第二配对信息,第一蓝牙设备在检测到第一配对信息与第二配对信息匹配时,可向第二蓝牙设备返回匹配成功响应,从而第二蓝牙设备可由匹配成功响应确定与第一蓝牙设备建立蓝牙通信连接。从而用户可以手握蓝牙设备触发初始化动作,第一蓝牙设备可进入允许搜索模式,进而可通过蓝牙设备的运动轨迹开启蓝牙,无需手动开启蓝牙,提升了蓝牙配对的便捷性。The embodiment of the present invention provides a Bluetooth pairing method. When the first Bluetooth device detects that the second motion track is consistent with the first preset initialization track, the first search mode is enabled, and the second Bluetooth device detects the fourth motion track and the second When the two preset initialization tracks are consistent, the Bluetooth device searches for a request, so that the second Bluetooth device determines the connectable Bluetooth device, and sends the second pairing information to the connectable Bluetooth device, where the first Bluetooth device detects the first pairing information and When the second pairing information is matched, the matching success response may be returned to the second Bluetooth device, so that the second Bluetooth device may determine to establish a Bluetooth communication connection with the first Bluetooth device by the matching success response. Therefore, the user can trigger the initialization action by holding the Bluetooth device, and the first Bluetooth device can enter the allowable search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, thereby improving the convenience of Bluetooth pairing.
本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。Further, for the Bluetooth device that does not have the input of the display screen, the keyboard, the button, and the like, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
下面将结合附图5,分别对本发明实施例提供的蓝牙配对装置进行详细介绍。The Bluetooth pairing device provided by the embodiment of the present invention will be described in detail below with reference to FIG.
需要说明的是,附图5所示的蓝牙配对装置,用于执行本发明图1~图3任一所示实施例的方法,为基于图1所述的蓝牙配对方法的执行主体。为了
便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明图1~图3任一所示的实施例。本发明实施中的一种蓝牙配对装置可以包括:智能手机、平板电脑、可穿戴设备等包括蓝牙功能的终端设备。It should be noted that the Bluetooth pairing device shown in FIG. 5 is used to execute the method of the embodiment shown in any of FIG. 1 to FIG. 3, which is an execution body of the Bluetooth pairing method according to FIG. In order
For ease of description, only parts related to the embodiments of the present invention are shown. Without specific details, please refer to the embodiment shown in any of FIGS. 1 to 3 of the present invention. A Bluetooth pairing device in the implementation of the present invention may include a terminal device including a Bluetooth function, such as a smart phone, a tablet computer, and a wearable device.
如图5所示,为本发明实施例提供的一种蓝牙配对装置的结构示意图,本发明实施例提供的蓝牙配对装置可以包括:获取模块51、生成模块52以及蓝牙匹配模块53。FIG. 5 is a schematic structural diagram of a Bluetooth pairing apparatus according to an embodiment of the present invention. The Bluetooth pairing apparatus provided by the embodiment of the present invention may include: an obtaining module 51, a generating module 52, and a Bluetooth matching module 53.
获取模块51,用于获取第一蓝牙设备的第一运动轨迹。The obtaining module 51 is configured to acquire a first motion track of the first Bluetooth device.
作为一种可选的实施方式,获取模块51可通过传感器获取第一蓝牙设备的第一运动轨迹,传感器例如加速度传感器等,具体不受本发明实施例的限制。As an optional implementation manner, the acquiring module 51 may acquire the first motion trajectory of the first Bluetooth device by using a sensor, such as an acceleration sensor or the like, which is not specifically limited by the embodiment of the present invention.
进一步的,获取模块51可以包括:参数获取单元和轨迹生成单元。其中:Further, the obtaining module 51 may include: a parameter acquiring unit and a trajectory generating unit. among them:
参数获取单元,用于获取第一蓝牙设备的运动参数数据;a parameter obtaining unit, configured to acquire motion parameter data of the first Bluetooth device;
轨迹生成单元,用于由第一蓝牙设备的运动参数数据生成第一蓝牙设备的第一运动轨迹。And a trajectory generating unit, configured to generate, by the motion parameter data of the first Bluetooth device, a first motion trajectory of the first Bluetooth device.
具体实现中,运动参数数据例如可以包括加速度向量、重力加速度向量等等。根据获取到运动参数数据由运动轨迹生成算法计算得到第一运动轨迹,具体的,在运动轨迹生成算法中,获取到的加速度向量和重力加速度向量可以为输入向量,输出向量为运动轨迹向量。In a specific implementation, the motion parameter data may include, for example, an acceleration vector, a gravity acceleration vector, and the like. The first motion trajectory is calculated by the motion trajectory generation algorithm according to the acquired motion parameter data. Specifically, in the motion trajectory generation algorithm, the acquired acceleration vector and the gravity acceleration vector may be an input vector, and the output vector is a motion trajectory vector.
生成模块52,用于生成与第一运动轨迹对应的第一配对信息。The generating module 52 is configured to generate first pairing information corresponding to the first motion track.
作为一种可选的实施方式,第一配对信息包括:第一配对码,则生成模块51生成第一运动轨迹对应的第一配对信息具体可以包括:将第一运动轨迹映射为第一配对码。进一步的,若运动轨迹相同,则生成的配对信息相同。As an optional implementation manner, the first pairing information includes: a first pairing code, and the generating, by the generating module 51, the first pairing information corresponding to the first motion track may include: mapping the first motion track to the first pairing code . Further, if the motion trajectories are the same, the generated pairing information is the same.
蓝牙匹配模块53,用于根据第一配对信息与第二蓝牙设备进行蓝牙匹配。The Bluetooth matching module 53 is configured to perform Bluetooth matching with the second Bluetooth device according to the first pairing information.
作为一种可选的实施方式,蓝牙匹配模块53可根据第一配对信息与第二蓝牙设备进行蓝牙匹配,若所述装置为主设备,则可向第二蓝牙设备发送第一配对信息,以使第二蓝牙设备对第一配对信息与第二配对信息进行验证,若所述装置为从设备,第一蓝牙设备为主设备,则所述装置可接收第二蓝牙设备发送的第二配对信息,从而对第一配对信息和第二配对信息进行验证。As an optional implementation manner, the Bluetooth matching module 53 may perform Bluetooth matching with the second Bluetooth device according to the first pairing information, and if the device is the master device, send the first pairing information to the second Bluetooth device, to And causing the second Bluetooth device to verify the first pairing information and the second pairing information. If the device is a slave device, and the first Bluetooth device is the master device, the device may receive the second pairing information sent by the second Bluetooth device. , thereby verifying the first pairing information and the second pairing information.
进一步可选的,若所述装置为主设备,第二蓝牙设备为从设备,则所述装置可开启蓝牙搜索模式,主动广播蓝牙设备搜索请求。具体的,本发明实
施例提供的装置还可以包括:搜索模块54。Further optionally, if the device is a master device and the second Bluetooth device is a slave device, the device may enable a Bluetooth search mode and actively broadcast a Bluetooth device search request. Specifically, the present invention
The apparatus provided by the embodiment may further include: a search module 54.
获取模块51,还用于获取第一蓝牙设备的第二运动轨迹;The obtaining module 51 is further configured to acquire a second motion track of the first Bluetooth device;
搜索模块54,还用于在检测到第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,并确定可连接的蓝牙设备,可连接的蓝牙设备包括第二蓝牙设备。The searching module 54 is further configured to: when the second motion track is detected to be consistent with the preset initialization track, broadcast a Bluetooth device search request, and determine a connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device.
进一步可选的,蓝牙匹配模块53可以包括发送单元。Further optionally, the Bluetooth matching module 53 may include a sending unit.
发送单元,用于向第二蓝牙设备发送第一配对信息,以使第二蓝牙设备在检测到与第一配对信息匹配的第二配对信息时,确定与第一蓝牙设备蓝牙匹配成功;其中,第二配对信息为第二蓝牙设备由获取到的第二蓝牙设备的第三运动轨迹生成的配对信息。a sending unit, configured to send the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines that the Bluetooth matching with the first Bluetooth device is successful when detecting the second pairing information that matches the first pairing information; The second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
进一步的,发送单元可具体用于:向可连接的蓝牙设备发送第一配对信息,以使可连接的蓝牙设备对所述第一配对信息进行验证。Further, the sending unit may be specifically configured to: send the first pairing information to the connectable Bluetooth device, so that the connectable Bluetooth device verifies the first pairing information.
进一步的,蓝牙匹配模块53还可以包括:确定单元。Further, the Bluetooth matching module 53 may further include: a determining unit.
确定单元,用于在接收到第二蓝牙设备发送的匹配成功响应时,确定与第二蓝牙设备建立蓝牙通信连接;其中,匹配成功响应为第二蓝牙设备在对第一配对信息进行验证且检测到与第一配对信息匹配的第二配对信息时,向第一蓝牙设备发送的匹配成功响应。a determining unit, configured to determine to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device performs verification and detection on the first pairing information When the second pairing information matches the first pairing information, the matching sent to the first Bluetooth device is successfully responded.
进一步可选的,若所述装置为从设备,第二蓝牙设备为主设备,则蓝牙匹配模块53还可以包括:接收单元和确定单元。Further, if the device is a slave device and the second Bluetooth device is a master device, the Bluetooth matching module 53 may further include: a receiving unit and a determining unit.
接收单元,用于接收第二蓝牙设备发送的第二配对信息;其中,第二配对信息为第二蓝牙设备由获取到的第二蓝牙设备的第三运动轨迹生成的配对信息;a receiving unit, configured to receive second pairing information sent by the second Bluetooth device, where the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device;
确定单元,用于在检测到第一配对信息与第二配对信息匹配时,确定与第二蓝牙设备蓝牙匹配成功。And a determining unit, configured to determine that the Bluetooth matching with the second Bluetooth device is successful when detecting that the first pairing information matches the second pairing information.
进一步可选的,本发明实施例提供的装置还可以包括:响应模块55。Further, the apparatus provided by the embodiment of the present invention may further include: a response module 55.
获取模块51,还用于获取第一蓝牙设备的第二运动轨迹;The obtaining module 51 is further configured to acquire a second motion track of the first Bluetooth device;
搜索模块54,用于在检测到第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模式;The searching module 54 is configured to enable the search mode when the second motion track is consistent with the preset initialization track;
响应模块55,用于在接收到第二蓝牙设备发送的蓝牙设备搜索请求时,向第二蓝牙设备返回允许搜索响应,以使第二蓝牙设备根据允许搜索响应将第一蓝牙设备确定为可连接的蓝牙设备,并向个可连接的蓝牙设备发送第二
配对信息。The response module 55 is configured to: when receiving the Bluetooth device search request sent by the second Bluetooth device, return an allow search response to the second Bluetooth device, so that the second Bluetooth device determines that the first Bluetooth device is connectable according to the allow search response. Bluetooth device and send a second to a connectable Bluetooth device
Pairing information.
进一步的,蓝牙匹配模块53还可以包括:发送单元。Further, the Bluetooth matching module 53 may further include: a sending unit.
发送单元,用于向第二蓝牙设备发送匹配成功响应,以使第二蓝牙设备在接收到匹配成功响应时,确定与第一蓝牙设备建立蓝牙通信连接。And a sending unit, configured to send a matching success response to the second Bluetooth device, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
进一步可选的,若第一蓝牙设备、第二蓝牙设备均为主设备,则可由任一发起搜索,发起搜索的蓝牙设备为主设备,另一蓝牙设备为从设备,则主设备开启蓝牙搜索模式,从设备开启允许搜索模式。Further, if the first Bluetooth device and the second Bluetooth device are both the master device, the Bluetooth device that initiates the search may initiate the search, and the Bluetooth device that initiates the search is the master device, and the other Bluetooth device is the slave device, and the master device starts the Bluetooth search. Mode, the device allows the search mode to be turned on.
进一步的,第一蓝牙设备触发蓝牙搜索后,可通过设备的用户界面提示用户,例如振动提示或者语音提示等。进一步的,第一蓝牙设备开启允许搜索模式,可通过设备的用户界面提示用户,例如振动提示或者语音提示等。Further, after the first Bluetooth device triggers the Bluetooth search, the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt. Further, the first Bluetooth device enables the search mode, and the user may be prompted by the user interface of the device, such as a vibration prompt or a voice prompt.
进一步可选的,本发明实施例提供的装置还可以包括蓝牙模块56,蓝牙模块56可分别与搜索模块54、蓝牙匹配模块53、响应模块55连接,从而搜索模块54可通过蓝牙模块56广播蓝牙设备搜索请求,蓝牙匹配模块53可通过蓝牙模块56发送第一配对信息、接收第二配对信息或接收匹配成功响应等。具体的,蓝牙模块56可以包括蓝牙IC(Integated Circuit,集成电路)芯片。响应模块55可通过蓝牙模块56接收蓝牙设备搜索请求,并发送允许搜索响应。Further, the device provided by the embodiment of the present invention may further include a Bluetooth module 56. The Bluetooth module 56 may be respectively connected to the search module 54, the Bluetooth matching module 53, and the response module 55, so that the search module 54 can broadcast Bluetooth through the Bluetooth module 56. The device search request, the Bluetooth matching module 53 may send the first pairing information, receive the second pairing information, or receive a matching success response or the like through the Bluetooth module 56. Specifically, the Bluetooth module 56 may include a Bluetooth IC (Integated Circuit) chip. The response module 55 can receive the Bluetooth device search request via the Bluetooth module 56 and send an allow search response.
本发明实施例提供一种蓝牙配对装置,获取模块可获取第一蓝牙设备的第一运动轨迹,生成模块生成与第一运动轨迹对应的第一配对信息,蓝牙匹配模块可根据第一配对信息与第二蓝牙设备进行蓝牙匹配。本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。The embodiment of the present invention provides a Bluetooth pairing device, where the acquiring module can acquire the first motion track of the first Bluetooth device, and the generating module generates first pairing information corresponding to the first motion track, and the Bluetooth matching module can be based on the first pairing information. The second Bluetooth device performs Bluetooth matching. In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步的,用户可以手握蓝牙设备触发初始化动作,蓝牙设备可进入蓝牙搜索模式或者允许搜索模式,进而可通过蓝牙设备的运动轨迹开启蓝牙,无需手动开启蓝牙,无需手动搜索蓝牙设备,提升了蓝牙配对的便捷性。Further, the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved. The convenience of pairing.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。
Further, for the Bluetooth device that does not have the input of the display screen, the keyboard, the button, and the like, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
需要说明的是,本实施例中的获取模块、生成模块以及蓝牙匹配模块可以为单独设立的处理器,也可以集成在蓝牙设备的某一个处理器中实现,此外,也可以以程序代码的形式存储于蓝牙设备的存储器中,搜索模块以及响应模块的实现同获取模块,在此不重复。由蓝牙设备的某一个处理器调用并执行以上模块的功能。这里所述的处理器可以是一个中央处理器(Central Processing Unit,CPU),或者是特定集成电路(Application Specific Integrated Circuit,ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路。It should be noted that the acquiring module, the generating module, and the Bluetooth matching module in this embodiment may be separately set up processors, or may be implemented in one processor of the Bluetooth device, or may be in the form of program code. It is stored in the memory of the Bluetooth device, and the implementation of the search module and the response module is the same as the acquisition module, and is not repeated here. The function of the above module is called and executed by one of the processors of the Bluetooth device. The processor described herein may be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated systems configured to implement embodiments of the present invention. Circuit.
请参见图6,为本发明实施例提供的一种蓝牙设备的结构示意图,其中,本实施例提供的蓝牙设备与图1~图3任一所示的方法相对应。具体的实现形式如图6所示,本发明实施例的蓝牙设备包括:接收机601、发射机602、存储器603和处理器604,其中,接收机601、发射机602、存储器603均和处理器604连接,例如,可以通过总线连接。当然,蓝牙设备还可以包括传感器605、天线、输入输出装置等通用部件,具体不受本发明实施例的限制。进一步的,接收机601、发射机602中还可以包括蓝牙模块。具体的,蓝牙模块可以包括蓝牙IC芯片。具体的,处理器604可通过传感器605获取蓝牙设备的运动轨迹。FIG. 6 is a schematic structural diagram of a Bluetooth device according to an embodiment of the present invention. The Bluetooth device provided in this embodiment corresponds to the method shown in any of FIG. 1 to FIG. The specific implementation is as shown in FIG. 6. The Bluetooth device in the embodiment of the present invention includes: a receiver 601, a transmitter 602, a memory 603, and a processor 604, wherein the receiver 601, the transmitter 602, the memory 603, and the processor are The 604 connection, for example, can be connected via a bus. Of course, the Bluetooth device may also include a common component such as a sensor 605, an antenna, an input/output device, and the like, and is not specifically limited by the embodiment of the present invention. Further, the receiver 601 and the transmitter 602 may further include a Bluetooth module. Specifically, the Bluetooth module may include a Bluetooth IC chip. Specifically, the processor 604 can acquire the motion track of the Bluetooth device through the sensor 605.
接收机601和发射机602可以集成在一起,构成收发机。 Receiver 601 and transmitter 602 can be integrated to form a transceiver.
存储器603用于存储可执行程序代码,该程序代码包括计算机操作指令。存储器603可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 603 is for storing executable program code, the program code including computer operating instructions. The memory 603 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
处理器604可以是一个中央处理器,或者是特定集成电路,或者是被配置成实施本发明实施例的一个或多个集成电路。 Processor 604 can be a central processing unit, or a specific integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
其中,存储器603中存储一组程序代码,且处理器604用于调用存储器603中存储的程序代码,执行以下操作:The memory 603 stores a set of program codes, and the processor 604 is configured to call the program code stored in the memory 603 to perform the following operations:
获取所述第一蓝牙设备的第一运动轨迹;Obtaining a first motion trajectory of the first Bluetooth device;
生成与所述第一运动轨迹对应的第一配对信息;Generating first pairing information corresponding to the first motion track;
根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配。Performing Bluetooth matching with the second Bluetooth device according to the first pairing information.
在一个实施例中,处理器604在执行根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配时,具体执行以下步骤:In an embodiment, when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, the processor 604 specifically performs the following steps:
通过发射机602向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与
所述第一蓝牙设备蓝牙匹配成功;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息。Transmitting, by the transmitter 602, the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines, when detecting the second pairing information that matches the first pairing information,
The first Bluetooth device is successfully matched with the Bluetooth; wherein the second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
在一个实施例中,处理器604在执行根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配时,具体执行以下步骤:In an embodiment, when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, the processor 604 specifically performs the following steps:
通过接收机601接收所述第二蓝牙设备发送的第二配对信息;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息;Receiving, by the receiver 601, the second pairing information sent by the second Bluetooth device, where the second pairing information is generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device Pairing information
在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功。When it is detected that the first pairing information matches the second pairing information, determining that the Bluetooth matching with the second Bluetooth device is successful.
在一个实施例中,处理器604在执行获取所述第一蓝牙设备的第一运动轨迹之前,还执行:In one embodiment, the processor 604 further performs: before performing the acquiring the first motion trajectory of the first Bluetooth device:
获取所述第一蓝牙设备的第二运动轨迹;Obtaining a second motion trajectory of the first Bluetooth device;
在检测到所述第二运动轨迹与预设初始化轨迹一致时,通过发射机602广播蓝牙设备搜索请求,并确定可连接的蓝牙设备,所述可连接的蓝牙设备包括所述第二蓝牙设备。Upon detecting that the second motion trajectory coincides with the preset initialization trajectory, the Bluetooth device search request is broadcast by the transmitter 602, and the connectable Bluetooth device is determined, the connectable Bluetooth device including the second Bluetooth device.
在一个实施例中,处理器604在执行通过发射机602向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功时,具体执行以下步骤:In one embodiment, the processor 604 is configured to transmit the first pairing information to the second Bluetooth device via the transmitter 602 to cause the second Bluetooth device to detect that the first pairing information is matched. When the second pairing information is determined, when it is determined that the Bluetooth matching with the first Bluetooth device is successful, the following steps are specifically performed:
通过发射机602向所述可连接的蓝牙设备发送所述第一配对信息,以使所述可连接的蓝牙设备对所述第一配对信息进行验证;Transmitting, by the transmitter 602, the first pairing information to the connectable Bluetooth device, so that the connectable Bluetooth device verifies the first pairing information;
进一步的,处理器604在执行根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配时,具体执行以下步骤:Further, when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, the processor 604 specifically performs the following steps:
在通过接收机601接收到所述第二蓝牙设备发送的匹配成功响应时,确定与所述第二蓝牙设备建立蓝牙通信连接;其中,所述匹配成功响应为所述第二蓝牙设备在对所述第一配对信息进行验证且检测到与所述第一配对信息匹配的第二配对信息时,向所述第一蓝牙设备发送的匹配成功响应。When receiving the matching success response sent by the second Bluetooth device by the receiver 601, determining to establish a Bluetooth communication connection with the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is in the opposite When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching successfully sent to the first Bluetooth device is responded.
在一个实施例中,处理器604在执行通过接收机601接收所述第二蓝牙设备发送的第二配对信息之前,还执行:In one embodiment, the processor 604 further performs: before receiving, by the receiver 601, the second pairing information sent by the second Bluetooth device:
获取所述第一蓝牙设备的第二运动轨迹;Obtaining a second motion trajectory of the first Bluetooth device;
在检测到所述第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模
式;When the second motion trajectory is detected to be consistent with the preset initialization trajectory, the search mode is enabled.
formula;
在通过接收机601接收到所述第二蓝牙设备发送的蓝牙设备搜索请求时,通过发射机602向所述第二蓝牙设备返回允许搜索响应,以使所述第二蓝牙设备根据所述允许搜索响应将所述第一蓝牙设备确定为可连接的蓝牙设备,并向所述可连接的蓝牙设备发送所述第二配对信息。Upon receiving the Bluetooth device search request sent by the second Bluetooth device by the receiver 601, returning an allow search response to the second Bluetooth device through the transmitter 602, so that the second Bluetooth device searches according to the permission Responding to determining the first Bluetooth device as a connectable Bluetooth device and transmitting the second pairing information to the connectable Bluetooth device.
在一个实施例中,处理器604在执行根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配时,具体执行以下步骤:In an embodiment, when performing the Bluetooth matching with the second Bluetooth device according to the first pairing information, the processor 604 specifically performs the following steps:
通过发射机602向所述第二蓝牙设备发送匹配成功响应,以使所述第二蓝牙设备在接收到所述匹配成功响应时,确定与所述第一蓝牙设备建立蓝牙通信连接。A matching success response is sent to the second Bluetooth device by the transmitter 602, so that the second Bluetooth device determines to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
在一个实施例中,处理器604在执行获取所述第一蓝牙设备的第一运动轨迹时,具体执行以下步骤:In an embodiment, when performing the acquiring the first motion trajectory of the first Bluetooth device, the processor 604 specifically performs the following steps:
获取所述第一蓝牙设备的运动参数数据;Obtaining motion parameter data of the first Bluetooth device;
由所述第一蓝牙设备的运动参数数据生成所述第一蓝牙设备的所述第一运动轨迹。Generating the first motion trajectory of the first Bluetooth device by motion parameter data of the first Bluetooth device.
在一个实施例中,所述第一配对信息包括:第一配对码;处理器604在执行生成所述第一运动轨迹对应的第一配对信息时,具体执行以下步骤:In an embodiment, the first pairing information includes: a first pairing code; the processor 604 performs the following steps when performing the first pairing information corresponding to the first motion track:
将所述第一运动轨迹映射为所述第一配对码。Mapping the first motion trajectory to the first pairing code.
上述技术方案中,提供一种蓝牙设备,包括接收机、发射机、存储器和处理器,处理器可获取第一蓝牙设备的第一运动轨迹,并生成与第一运动轨迹对应的第一配对信息,进而可根据第一配对信息与第二蓝牙设备进行蓝牙匹配。本发明实施例中,可由蓝牙设备的运动轨迹生成配对信息,进而可实现由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性,运动轨迹与配对信息可一一对应,从而可增强蓝牙配对的安全性,又无需增设新到的硬件,成本低,且提高了蓝牙匹配效率。In the above technical solution, a Bluetooth device is provided, including a receiver, a transmitter, a memory, and a processor, and the processor may acquire a first motion track of the first Bluetooth device and generate first pairing information corresponding to the first motion track. And performing Bluetooth matching with the second Bluetooth device according to the first pairing information. In the embodiment of the present invention, the pairing information can be generated by the motion track of the Bluetooth device, and the Bluetooth device can be paired by the motion track of the Bluetooth device, thereby improving the convenience of the Bluetooth pairing, and the motion track and the pairing information can be one-to-one correspondence, thereby Enhance the security of Bluetooth pairing without adding new hardware, low cost, and improved Bluetooth matching efficiency.
进一步的,用户可以手握蓝牙设备触发初始化动作,蓝牙设备可进入蓝牙搜索模式或者允许搜索模式,进而可通过蓝牙设备的运动轨迹开启蓝牙,无需手动开启蓝牙,无需手动搜索蓝牙设备,提升了蓝牙配对的便捷性。Further, the user can trigger the initialization action by holding the Bluetooth device, and the Bluetooth device can enter the Bluetooth search mode or allow the search mode, and then the Bluetooth can be turned on by the motion track of the Bluetooth device, without manually turning on the Bluetooth, without manually searching for the Bluetooth device, and the Bluetooth is improved. The convenience of pairing.
进一步地,对于不存在显示屏幕、键盘、按键等输入的蓝牙设备,通过本发明实施例,可由蓝牙设备的运动轨迹进行蓝牙设备配对,提升了蓝牙配对的便捷性。
Further, for the Bluetooth device that does not have the input of the display screen, the keyboard, the button, and the like, the Bluetooth device can be paired by the motion track of the Bluetooth device, which improves the convenience of the Bluetooth pairing.
请参见图7,为本发明实施例提供的一种蓝牙配对系统的结构示意图,如图所示,本发明实施例还提供的一种蓝牙配对系统可以包括:第一蓝牙设备71和第二蓝牙设备73。其中,第一蓝牙设备71可以包括:智能手机、可穿戴设备等包括蓝牙功能的终端设备,第一蓝牙设备72可以包括:智能手机、可穿戴设备等包括蓝牙功能的终端设备,其中,第一蓝牙设备71的结构和功能可参见图5所示实施例的相关描述,在此不赘述。需要说明的是,本实施例提供的蓝牙设备与图1~3任一所示的蓝牙配对方法相对应。FIG. 7 is a schematic structural diagram of a Bluetooth pairing system according to an embodiment of the present invention. As shown in the figure, a Bluetooth pairing system according to an embodiment of the present invention may include: a first Bluetooth device 71 and a second Bluetooth. Device 73. The first Bluetooth device 71 may include: a smart phone, a wearable device, and the like, including a Bluetooth device. The first Bluetooth device 72 may include: a smart phone, a wearable device, and the like, including a Bluetooth-enabled terminal device, where For the structure and function of the Bluetooth device 71, refer to the related description of the embodiment shown in FIG. 5, and details are not described herein. It should be noted that the Bluetooth device provided in this embodiment corresponds to the Bluetooth pairing method shown in any of FIGS. 1 to 3.
进一步的,具体实施例中,例如用户可触发第一蓝牙设备71和第二蓝牙设备72某个相同的自定义的动作,进而第一蓝牙设备71和第二蓝牙设备72可获取到对应的运动轨迹,以进行蓝牙配对。进一步的,用户可触发第一蓝牙设备71初始化动作,以触发第一蓝牙设备71开启蓝牙搜索模式或允许搜索模式,用户可触发第二蓝牙设备72初始化动作,以触发第二蓝牙设备72开启允许搜索模式或蓝牙搜索模式。Further, in a specific embodiment, for example, the user may trigger some of the same customized actions of the first Bluetooth device 71 and the second Bluetooth device 72, so that the first Bluetooth device 71 and the second Bluetooth device 72 can obtain corresponding motions. Track for Bluetooth pairing. Further, the user may trigger the first Bluetooth device 71 to initiate an action to trigger the first Bluetooth device 71 to enable the Bluetooth search mode or allow the search mode, and the user may trigger the second Bluetooth device 72 to initiate an action to trigger the second Bluetooth device 72 to turn on the permission. Search mode or Bluetooth search mode.
进一步的,第一蓝牙设备71可以为主设备,也可以为从设备,第二蓝牙设备72可以为主设备,也可以为从设备。其中,开启蓝牙搜索模式,主动发起搜索,即主动广播蓝牙设备搜索请求的蓝牙设备为主设备,开启允许搜索模式的蓝牙设备为从设备。进一步的,若第一蓝牙设备、第二蓝牙设备均为主设备,则可由任一发起搜索,发起搜索的蓝牙设备为主设备,另一蓝牙设备为从设备,则主设备开启蓝牙搜索模式,从设备开启允许搜索模式。Further, the first Bluetooth device 71 may be a master device or a slave device, and the second Bluetooth device 72 may be a master device or a slave device. The Bluetooth search mode is enabled, and the search is initiated actively, that is, the Bluetooth device that actively broadcasts the Bluetooth device search request is the master device, and the Bluetooth device that allows the search mode is turned on as the slave device. Further, if the first Bluetooth device and the second Bluetooth device are both the master device, the Bluetooth device that initiates the search may initiate the search, and the other Bluetooth device is the slave device, and the master device turns on the Bluetooth search mode. The search mode is enabled from the device.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或模块可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口、装置、模块或单元的间接耦合或通信连接,也可以是电的,机械的或其它的形式连接。In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or modules may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device, module or unit, or an electrical, mechanical or other form of connection.
作为分离部件说明的模块或单元可以是或者也可以不是物理上分开的,作为模块或单元显示的部件可以是或者也可以不是物理模块或单元,即可以位于一个地方,或者也可以分布到多个网络模块或单元上。可以根据实际的需要选择其中的部分或者全部模块或单元来实现本申请实施例方案的目
的。The modules or units described as separate components may or may not be physically separate, and the components displayed as modules or units may or may not be physical modules or units, ie may be located in one place, or may be distributed to multiple On a network module or unit. Some or all of the modules or units may be selected according to actual needs to achieve the objectives of the embodiments of the present application.
of.
另外,在本申请各个实施例中的各功能模块或单元可以集成在一个处理模块或单元中,也可以是各个模块或单元单独物理存在,也可以是两个或两个以上模块或单元集成在一个模块或单元中。上述集成的模块或单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more modules or units may be integrated in In a module or unit. The above integrated modules or units can be implemented in the form of hardware or in the form of software functional units.
集成的模块或单元如果以软件功能模块或单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分,或者该技术方案的全部或部分可以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。An integrated module or unit, if implemented in the form of a software functional module or unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application is essential or part of the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。
The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalent modification or can be easily conceived by those skilled in the art within the technical scope of the present disclosure. Such modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.
Claims (19)
- 一种蓝牙配对方法,其特征在于,所述方法包括:A Bluetooth pairing method, the method comprising:第一蓝牙设备获取所述第一蓝牙设备的第一运动轨迹;The first Bluetooth device acquires a first motion trajectory of the first Bluetooth device;所述第一蓝牙设备生成与所述第一运动轨迹对应的第一配对信息;The first Bluetooth device generates first pairing information corresponding to the first motion track;所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配。The first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information.
- 如权利要求1所述的方法,其特征在于,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,包括:The method of claim 1, wherein the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:所述第一蓝牙设备向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功;The first Bluetooth device sends the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines the location and the second pairing information that matches the first pairing information. The Bluetooth matching of the first Bluetooth device is successful;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息。The second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- 如权利要求1所述的方法,其特征在于,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,包括:The method of claim 1, wherein the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, including:所述第一蓝牙设备接收所述第二蓝牙设备发送的第二配对信息;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息;The first Bluetooth device receives the second pairing information sent by the second Bluetooth device, where the second pairing information is the third motion track of the second Bluetooth device acquired by the second Bluetooth device Generated pairing information;所述第一蓝牙设备在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功。When detecting that the first pairing information matches the second pairing information, the first Bluetooth device determines that the Bluetooth matching with the second Bluetooth device is successful.
- 如权利要求2所述的方法,其特征在于,所述第一蓝牙设备获取所述第一蓝牙设备的第一运动轨迹之前,所述方法还包括:The method of claim 2, wherein before the first Bluetooth device acquires the first motion trajectory of the first Bluetooth device, the method further includes:所述第一蓝牙设备获取所述第一蓝牙设备的第二运动轨迹;Obtaining, by the first Bluetooth device, a second motion trajectory of the first Bluetooth device;所述第一蓝牙设备在检测到所述第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,确定可连接的蓝牙设备,所述可连接的蓝牙设备包括所述第二蓝牙设备。 The first Bluetooth device, when detecting that the second motion track is consistent with the preset initialization track, broadcasts a Bluetooth device search request to determine a connectable Bluetooth device, where the connectable Bluetooth device includes the second Bluetooth device .
- 如权利要求4所述的方法,其特征在于,所述第一蓝牙设备向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功,包括:The method of claim 4, wherein the first Bluetooth device transmits the first pairing information to the second Bluetooth device to cause the second Bluetooth device to detect the first When the pairing information matches the second pairing information, determining that the Bluetooth matching with the first Bluetooth device is successful, including:所述第一蓝牙设备向所述可连接的蓝牙设备发送所述第一配对信息,以使所述可连接的蓝牙设备对所述第一配对信息进行验证;Sending, by the first Bluetooth device, the first pairing information to the connectable Bluetooth device, so that the connectable Bluetooth device verifies the first pairing information;所述第一蓝牙设备在接收到所述第二蓝牙设备发送的匹配成功响应时,确定与所述第二蓝牙设备建立蓝牙通信连接;其中,所述匹配成功响应为所述第二蓝牙设备在对所述第一配对信息进行验证且检测到与所述第一配对信息匹配的第二配对信息时,向所述第一蓝牙设备发送的匹配成功响应。The first Bluetooth device determines to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
- 如权利要求3所述的方法,其特征在于,所述第一蓝牙设备接收所述第二蓝牙设备发送的第二配对信息之前,所述方法包括:The method according to claim 3, wherein before the first Bluetooth device receives the second pairing information sent by the second Bluetooth device, the method includes:所述第一蓝牙设备获取所述第一蓝牙设备的第二运动轨迹;Obtaining, by the first Bluetooth device, a second motion trajectory of the first Bluetooth device;所述第一蓝牙设备在检测到所述第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模式;The first Bluetooth device starts the permission search mode when detecting that the second motion track is consistent with the preset initialization track;所述第一蓝牙设备在接收到所述第二蓝牙设备发送的蓝牙设备搜索请求时,向所述第二蓝牙设备返回允许搜索响应,以使所述第二蓝牙设备根据所述允许搜索响应将所述第一蓝牙设备确定为可连接的蓝牙设备,并向各可连接的蓝牙设备发送所述第二配对信息。When receiving the Bluetooth device search request sent by the second Bluetooth device, the first Bluetooth device returns an allow search response to the second Bluetooth device, so that the second Bluetooth device responds according to the allowed search response. The first Bluetooth device is determined to be a connectable Bluetooth device, and sends the second pairing information to each connectable Bluetooth device.
- 如权利要求6所述的方法,其特征在于,所述第一蓝牙设备根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配,在所述第一蓝牙设备在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功之后,还包括:The method according to claim 6, wherein the first Bluetooth device performs Bluetooth matching with the second Bluetooth device according to the first pairing information, and the first Bluetooth device detects the first pairing After the information is matched with the second pairing information, after determining that the Bluetooth matching with the second Bluetooth device is successful, the method further includes:所述第一蓝牙设备向所述第二蓝牙设备发送匹配成功响应,以使所述第二蓝牙设备在接收到所述匹配成功响应时,确定与所述第一蓝牙设备建立蓝牙通信连接。The first Bluetooth device sends a matching success response to the second Bluetooth device, so that when the second Bluetooth device receives the matching success response, it determines to establish a Bluetooth communication connection with the first Bluetooth device.
- 如权利要求1所述的方法,其特征在于,所述第一蓝牙设备获取所 述第一蓝牙设备的第一运动轨迹,包括:The method of claim 1 wherein said first Bluetooth device acquires The first motion trajectory of the first Bluetooth device includes:所述第一蓝牙设备获取所述第一蓝牙设备的运动参数数据;Obtaining, by the first Bluetooth device, motion parameter data of the first Bluetooth device;所述第一蓝牙设备由所述第一蓝牙设备的运动参数数据生成所述第一蓝牙设备的所述第一运动轨迹。The first Bluetooth device generates the first motion trajectory of the first Bluetooth device by using motion parameter data of the first Bluetooth device.
- 如权利要求1~8任一所述的方法,其特征在于,所述第一配对信息包括:第一配对码;The method according to any one of claims 1 to 8, wherein the first pairing information comprises: a first pairing code;所述第一蓝牙设备生成所述第一运动轨迹对应的第一配对信息,包括:The first Bluetooth device generates the first pairing information corresponding to the first motion track, including:所述第一蓝牙设备将所述第一运动轨迹映射为所述第一配对码。The first Bluetooth device maps the first motion trajectory to the first pairing code.
- 一种蓝牙配对装置,其特征在于,所述装置包括:A Bluetooth pairing device, characterized in that the device comprises:获取模块,用于获取所述第一蓝牙设备的第一运动轨迹;An acquiring module, configured to acquire a first motion track of the first Bluetooth device;生成模块,用于生成与所述第一运动轨迹对应的第一配对信息;a generating module, configured to generate first pairing information corresponding to the first motion track;蓝牙匹配模块,用于根据所述第一配对信息与第二蓝牙设备进行蓝牙匹配。And a Bluetooth matching module, configured to perform Bluetooth matching with the second Bluetooth device according to the first pairing information.
- 如权利要求10所述的装置,其特征在于,所述蓝牙匹配模块包括:The device of claim 10, wherein the Bluetooth matching module comprises:发送单元,用于向所述第二蓝牙设备发送所述第一配对信息,以使所述第二蓝牙设备在检测到与所述第一配对信息匹配的第二配对信息时,确定与所述第一蓝牙设备蓝牙匹配成功;a sending unit, configured to send the first pairing information to the second Bluetooth device, so that the second Bluetooth device determines, when detecting the second pairing information that matches the first pairing information, The first Bluetooth device Bluetooth matching is successful;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息。The second pairing information is pairing information generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device.
- 如权利要求10所述的装置,其特征在于,所述蓝牙匹配模块包括:The device of claim 10, wherein the Bluetooth matching module comprises:接收单元,用于接收所述第二蓝牙设备发送的第二配对信息;其中,所述第二配对信息为所述第二蓝牙设备由获取到的所述第二蓝牙设备的第三运动轨迹生成的配对信息;a receiving unit, configured to receive second pairing information sent by the second Bluetooth device, where the second pairing information is generated by the second Bluetooth device by the acquired third motion track of the second Bluetooth device Pairing information;确定单元,用于在检测到所述第一配对信息与所述第二配对信息匹配时,确定与所述第二蓝牙设备蓝牙匹配成功。And a determining unit, configured to determine that the Bluetooth matching with the second Bluetooth device is successful when detecting that the first pairing information matches the second pairing information.
- 如权利要求11所述的装置,其特征在于,所述装置还包括:搜索 模块;The device of claim 11 wherein said device further comprises: searching Module所述获取模块,还用于获取所述第一蓝牙设备的第二运动轨迹;The acquiring module is further configured to acquire a second motion track of the first Bluetooth device;所述搜索模块,还用于在检测到所述第二运动轨迹与预设初始化轨迹一致时,广播蓝牙设备搜索请求,确定可连接的蓝牙设备,所述可连接的蓝牙设备包括所述第二蓝牙设备。The search module is further configured to: when detecting that the second motion track is consistent with a preset initialization track, broadcast a Bluetooth device search request, determine a connectable Bluetooth device, and the connectable Bluetooth device includes the second Bluetooth device.
- 如权利要求13所述的方法,其特征在于,所述发送单元具体用于:The method according to claim 13, wherein the sending unit is specifically configured to:向所述可连接的蓝牙设备发送所述第一配对信息,以使所述可连接的蓝牙设备对所述第一配对信息进行验证;Transmitting the first pairing information to the connectable Bluetooth device to enable the connectable Bluetooth device to verify the first pairing information;所述蓝牙匹配模块还包括:The Bluetooth matching module further includes:确定单元,用于在接收到所述第二蓝牙设备发送的匹配成功响应时,确定与所述第二蓝牙设备建立蓝牙通信连接;其中,所述匹配成功响应为所述第二蓝牙设备在对所述第一配对信息进行验证且检测到与所述第一配对信息匹配的第二配对信息时,向所述第一蓝牙设备发送的匹配成功响应。a determining unit, configured to determine to establish a Bluetooth communication connection with the second Bluetooth device when receiving the matching success response sent by the second Bluetooth device; wherein the matching success response is that the second Bluetooth device is in the pair When the first pairing information is verified and the second pairing information matching the first pairing information is detected, the matching sent to the first Bluetooth device is successfully responded.
- 如权利要求12所述的装置,其特征在于,所述装置还包括:搜索模块和响应模块;The device according to claim 12, wherein the device further comprises: a search module and a response module;所述获取模块,还用于获取所述第一蓝牙设备的第二运动轨迹;The acquiring module is further configured to acquire a second motion track of the first Bluetooth device;所述搜索模块,用于在检测到所述第二运动轨迹与预设初始化轨迹一致时,开启允许搜索模式;The searching module is configured to enable an allowable search mode when detecting that the second motion track is consistent with a preset initialization track;所述响应模块,用于在接收到所述第二蓝牙设备发送的蓝牙设备搜索请求时,向所述第二蓝牙设备返回允许搜索响应,以使所述第二蓝牙设备根据所述允许搜索响应将所述第一蓝牙设备确定为可连接的蓝牙设备,并向各可连接的蓝牙设备发送所述第二配对信息。The response module is configured to, when receiving the Bluetooth device search request sent by the second Bluetooth device, return an allow search response to the second Bluetooth device, so that the second Bluetooth device responds according to the allowed search The first Bluetooth device is determined to be a connectable Bluetooth device, and the second pairing information is sent to each connectable Bluetooth device.
- 如权利要求15所述的装置,其特征在于,所述蓝牙匹配模块还包括:The device of claim 15, wherein the Bluetooth matching module further comprises:发送单元,用于向所述第二蓝牙设备发送匹配成功响应,以使所述第二蓝牙设备在接收到所述匹配成功响应时,确定与所述第一蓝牙设备建立蓝牙通信连接。 And a sending unit, configured to send a matching success response to the second Bluetooth device, to enable the second Bluetooth device to establish a Bluetooth communication connection with the first Bluetooth device when receiving the matching success response.
- 如权利要求10所述的装置,其特征在于,所述获取模块包括:The device of claim 10, wherein the obtaining module comprises:参数获取单元,用于获取所述第一蓝牙设备的运动参数数据;a parameter obtaining unit, configured to acquire motion parameter data of the first Bluetooth device;轨迹生成单元,用于由所述第一蓝牙设备的运动参数数据生成所述第一蓝牙设备的所述第一运动轨迹。a trajectory generating unit, configured to generate, by the motion parameter data of the first Bluetooth device, the first motion trajectory of the first Bluetooth device.
- 如权利要求10~17任一所述的装置,其特征在于,所述第一配对信息包括:第一配对码;The device according to any one of claims 10 to 17, wherein the first pairing information comprises: a first pairing code;所述生成模块生成所述第一运动轨迹对应的第一配对信息具体包括:将所述第一运动轨迹映射为所述第一配对码。The generating, by the generating module, the first pairing information corresponding to the first motion track specifically includes: mapping the first motion track to the first pairing code.
- 一种蓝牙配对系统,其特征在于,所述系统包括:第一蓝牙设备和第二蓝牙设备;所述第一蓝牙设备,如权利要求10~18任一所述的装置。 A Bluetooth pairing system, characterized in that the system comprises: a first Bluetooth device and a second Bluetooth device; the first Bluetooth device, the device according to any one of claims 10-18.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410710086.7 | 2014-11-28 | ||
CN201410710086.7A CN105703807B (en) | 2014-11-28 | 2014-11-28 | A kind of Bluetooth pairing methods, apparatus and system |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016082512A1 true WO2016082512A1 (en) | 2016-06-02 |
Family
ID=56073513
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/080605 WO2016082512A1 (en) | 2014-11-28 | 2015-06-02 | Bluetooth pairing method, device and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105703807B (en) |
WO (1) | WO2016082512A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438638A (en) * | 2021-07-07 | 2021-09-24 | 深圳市汇顶科技股份有限公司 | Communication control method and electronic device |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10517129B2 (en) | 2016-08-23 | 2019-12-24 | Huawei Technologies Co., Ltd. | Bluetooth pairing method and bluetooth device |
CN106559740A (en) * | 2016-10-13 | 2017-04-05 | 上海斐讯数据通信技术有限公司 | A kind of mobile terminal and its control method of communication |
CN108616847B (en) * | 2016-12-07 | 2021-09-28 | 海能达通信股份有限公司 | Bluetooth link method and device and Bluetooth equipment |
CN110178390B (en) * | 2017-01-17 | 2024-01-12 | 索尼公司 | Communication device, pairing method, and program |
CN107465997A (en) * | 2017-07-28 | 2017-12-12 | 广东欧珀移动通信有限公司 | Bluetooth connecting method, device, terminal and computer-readable recording medium |
CN108601002A (en) * | 2018-03-30 | 2018-09-28 | 成都心吉康科技有限公司 | The matching method and pair system of mobile terminal and electronic equipment |
CN108616655A (en) * | 2018-03-30 | 2018-10-02 | 成都心吉康科技有限公司 | Mobile terminal and electronic equipment for Bluetooth pairing |
CN108834076B (en) * | 2018-06-25 | 2021-10-15 | 歌尔光学科技有限公司 | Target equipment searching method, device and equipment |
CN109714744A (en) * | 2019-02-28 | 2019-05-03 | 深圳市空联技术有限公司 | A kind of device pairing method and system |
CN110972334B (en) * | 2019-12-09 | 2023-04-25 | 上海传英信息技术有限公司 | Bluetooth pairing connection method, device and readable storage medium |
CN111882846B (en) * | 2020-03-05 | 2021-07-06 | 珠海市杰理科技股份有限公司 | Wireless control method and device, BLE equipment, chip and storage medium |
CN111405539B (en) * | 2020-05-20 | 2023-08-01 | 孙瑛楠 | Method, device, equipment and storage medium for establishing wireless connection between equipment |
CN115379533A (en) * | 2021-05-18 | 2022-11-22 | Oppo广东移动通信有限公司 | Earphone connection method, storage medium, wireless earphone, device and mobile terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103179168A (en) * | 2011-12-26 | 2013-06-26 | 鸿富锦精密工业(深圳)有限公司 | Electronic device and method for sharing data through Bluetooth |
CN103888173A (en) * | 2014-03-27 | 2014-06-25 | 北京大学 | Method and system for conducting Bluetooth pairing visually, conveniently and rapidly |
CN104113362A (en) * | 2013-04-17 | 2014-10-22 | 深圳中兴网信科技有限公司 | Bluetooth pairing method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102468871B (en) * | 2010-10-29 | 2014-12-10 | 国际商业机器公司 | Device and wireless equipment for building wireless connection |
CN102904618B (en) * | 2011-07-26 | 2016-04-27 | 联想(北京)有限公司 | A kind of communication between devices processing method and device |
CN102523556B (en) * | 2011-12-15 | 2015-02-18 | 百度在线网络技术(北京)有限公司 | Matching method and system of mobile terminal as well as mobile terminal and server |
CN103379206A (en) * | 2012-04-20 | 2013-10-30 | 鸿富锦精密工业(深圳)有限公司 | Handheld device and data sharing achieving method thereof |
JP6395604B2 (en) * | 2012-07-23 | 2018-09-26 | 株式会社イーアールアイ | Information distribution system, wireless communication device and program |
CN103780287A (en) * | 2013-12-31 | 2014-05-07 | 苏州佳世达电通有限公司 | Action device pairing method |
-
2014
- 2014-11-28 CN CN201410710086.7A patent/CN105703807B/en not_active Expired - Fee Related
-
2015
- 2015-06-02 WO PCT/CN2015/080605 patent/WO2016082512A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103179168A (en) * | 2011-12-26 | 2013-06-26 | 鸿富锦精密工业(深圳)有限公司 | Electronic device and method for sharing data through Bluetooth |
CN104113362A (en) * | 2013-04-17 | 2014-10-22 | 深圳中兴网信科技有限公司 | Bluetooth pairing method and device |
CN103888173A (en) * | 2014-03-27 | 2014-06-25 | 北京大学 | Method and system for conducting Bluetooth pairing visually, conveniently and rapidly |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438638A (en) * | 2021-07-07 | 2021-09-24 | 深圳市汇顶科技股份有限公司 | Communication control method and electronic device |
CN113438638B (en) * | 2021-07-07 | 2023-07-28 | 深圳市汇顶科技股份有限公司 | Communication control method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN105703807A (en) | 2016-06-22 |
CN105703807B (en) | 2019-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016082512A1 (en) | Bluetooth pairing method, device and system | |
RU2646354C2 (en) | Method, device and system for installation of transmission connection | |
US20150318874A1 (en) | Pairing devices using acoustic signals | |
KR102092063B1 (en) | Method And Apparatus For Performing Communication Service | |
JP6585823B2 (en) | Method and terminal for processing order information | |
KR102693979B1 (en) | Electronic device suporting link sharing and method therefor | |
US20130189925A1 (en) | Pairing Wireless Device Using Multiple Modalities | |
US20130165045A1 (en) | Electronic device and method for sharing resources via bluetooth network | |
KR102399665B1 (en) | Electronic device and method for authenticating electronic device in near field | |
JP2014518038A5 (en) | ||
US10135816B2 (en) | Electronic device and method of transceiving data | |
EP3706082B1 (en) | Electronic device for performing positioning and control method of electronic device | |
CN110996307A (en) | Accessory device, host device and data transmission method | |
WO2015184754A1 (en) | Mobile terminal and method for exchanging calling cards between mobile terminals | |
CN104571503A (en) | Interaction control method for spatial multimedia equipment group | |
US9936381B2 (en) | Wireless communication device and non-transitory computer-readable medium | |
US20230345237A1 (en) | Electronic device performing wireless communication with accessory device, and operating method thereof | |
EP4167603A1 (en) | Method for providing location alarm service for electronic device and device therefor | |
JP7532220B2 (en) | COMMUNICATION DEVICE, CONTROL METHOD FOR COMMUNICATION DEVICE, AND PROGRAM | |
CN115104283A (en) | Electronic device and method for performing peer-to-peer service in electronic device | |
CN112586003B (en) | Improvements in and relating to SMS in telecommunications networks | |
CN103873682B (en) | A kind of information processing method and electronic equipment | |
KR20230002728A (en) | Information processing methods and electronic devices | |
KR20220018872A (en) | Method and apparatus for providing location alarm service of electronic device | |
KR102395293B1 (en) | Wireless Communication System, Vehicle, Smart Apparatus and controlling method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15863870 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15863870 Country of ref document: EP Kind code of ref document: A1 |