CN112954659A - Method and device for connecting Bluetooth devices, electronic device and storage medium - Google Patents

Method and device for connecting Bluetooth devices, electronic device and storage medium Download PDF

Info

Publication number
CN112954659A
CN112954659A CN202110175521.0A CN202110175521A CN112954659A CN 112954659 A CN112954659 A CN 112954659A CN 202110175521 A CN202110175521 A CN 202110175521A CN 112954659 A CN112954659 A CN 112954659A
Authority
CN
China
Prior art keywords
information
identification information
electronic device
jitter
generated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110175521.0A
Other languages
Chinese (zh)
Inventor
佘彦荣
张莉
章欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110175521.0A priority Critical patent/CN112954659A/en
Publication of CN112954659A publication Critical patent/CN112954659A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Landscapes

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

Abstract

The application relates to a method and a device for connecting Bluetooth devices, computer equipment and a storage medium. The method comprises the following steps: acquiring jitter information generated by first electronic equipment when the first electronic equipment collides with second electronic equipment; generating first identification information according to the jitter information generated by the first electronic equipment; sending Bluetooth pairing broadcast information containing the first identification information to instruct the second electronic device to match the first identification information in the Bluetooth pairing broadcast information with second identification information of the second electronic device, wherein the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device; and under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment. By adopting the method, the equipment which the user wants to connect can be quickly and accurately identified, the complicated operation is not needed to be manually carried out, and the efficiency of pairing connection between the equipment is effectively improved.

Description

Method and device for connecting Bluetooth devices, electronic device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for connecting bluetooth devices, an electronic device, and a computer-readable storage medium.
Background
Bluetooth (Bluetooth) is mainly used for realizing continuous connection between mobile intelligent terminals or between the mobile intelligent terminals and peripheral accessories, is a short-distance wireless communication technology with extremely low power consumption, and can exchange wireless information among a plurality of devices such as smart phones, wireless earphones, notebook computers and related peripherals.
However, in the existing connection method between bluetooth devices, the name of the bluetooth device is usually manually searched, and the target device is manually selected for the first connection according to the searched name of the bluetooth device. When connecting between the bluetooth equipment, the bluetooth that needs to get into equipment pairs the interface and operates the setting, and operation process is loaded down with trivial details, and equipment connection efficiency is lower.
Disclosure of Invention
The embodiment of the application provides a connection method and device between Bluetooth devices, an electronic device and a computer readable storage medium, which can effectively improve the efficiency of pairing connection between the devices.
A connection method between Bluetooth devices is applied to a first electronic device, and the method comprises the following steps:
acquiring jitter information generated by first electronic equipment when the first electronic equipment collides with second electronic equipment;
generating first identification information according to the jitter information generated by the first electronic equipment;
sending Bluetooth pairing broadcast information containing the first identification information to instruct the second electronic device to match the first identification information in the Bluetooth pairing broadcast information with second identification information of the second electronic device, wherein the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device;
and under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment.
According to the connection method, the connection device, the computer equipment and the storage medium among the Bluetooth equipment, the first identification information is generated according to the jitter information generated by the first electronic equipment when the first electronic equipment collides with the second electronic equipment, and the Bluetooth pairing broadcast information containing the first identification information is sent to indicate the second electronic equipment to match the first identification information in the Bluetooth pairing broadcast information with the second identification information of the second electronic equipment, wherein the second identification information is generated according to the jitter information generated by the second electronic equipment when the first electronic equipment collides with the second electronic equipment. And under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment. Therefore, the target equipment which the user wants to connect can be quickly and accurately identified, multiple pairing attempts are not needed to be performed through manual operation, and therefore the efficiency of pairing connection between the equipment is effectively improved.
A connection method between Bluetooth devices is applied to a second electronic device, and the method comprises the following steps:
acquiring jitter information generated by second electronic equipment when the second electronic equipment is collided by the first electronic equipment;
generating second identification information according to the jitter information generated by the second electronic equipment;
acquiring Bluetooth pairing broadcast information which is sent by first electronic equipment and contains first identification information; the first identification information is generated according to jitter information generated by the first electronic equipment when the second electronic equipment is collided;
matching first identification information in the Bluetooth pairing broadcast information with the second identification information;
and under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the first electronic equipment.
According to the connection method and device between the Bluetooth devices, the computer device and the storage medium, the second identification information is generated according to the jitter information generated by the second electronic device when the second electronic device is collided by the first electronic device. The method comprises the steps of obtaining Bluetooth pairing broadcast information which is sent by first electronic equipment and contains first identification information, wherein the first identification information is generated according to shaking information generated by the first electronic equipment when the first electronic equipment collides with second electronic equipment, and matching the first identification information with the second identification information in the Bluetooth pairing broadcast information. And under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the first electronic equipment. Therefore, the target equipment which the user wants to connect can be quickly and accurately identified, multiple pairing attempts are not needed to be performed through manual operation, and therefore the efficiency of pairing connection between the equipment is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary environment in which a method for connecting Bluetooth devices is implemented;
FIG. 2 is a flow diagram of a method for connection between Bluetooth devices in one embodiment;
FIG. 3 is a flow diagram of the steps of generating first identification information in one embodiment;
FIG. 4 is a flowchart of the steps for establishing a Bluetooth connection with a new electronic device in one embodiment;
FIG. 5 is a flowchart of a connection method between Bluetooth devices in another embodiment;
FIG. 6 is a flow diagram of the step of generating second identifying information in one embodiment;
FIG. 7 is a flowchart of the steps for establishing a Bluetooth connection with a new electronic device in another embodiment;
FIG. 8 is a block diagram showing a connection apparatus between Bluetooth devices in one embodiment;
fig. 9 is a block diagram showing a connection apparatus between bluetooth devices in another embodiment;
FIG. 10 is a diagram illustrating an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first client may be referred to as a second client, and similarly, a second client may be referred to as a first client, without departing from the scope of the present application. Both the first client and the second client are clients, but they are not the same client.
Fig. 1 is a schematic diagram of an application environment of a connection method between bluetooth devices in an embodiment. As shown in fig. 1, the application environment includes a first electronic device and a second electronic device. The first electronic device 102 communicates with the second electronic device 104 over a network. The first electronic device 102 acquires the shake information generated by itself when colliding with the second electronic device 104, and the first electronic device 102 generates the first identification information according to the shake information generated by itself. The first electronic device 102 transmits bluetooth pairing broadcast information including first identification information to instruct the second electronic device 104 to match the first identification information in the bluetooth pairing broadcast information with second identification information of the second electronic device 104, wherein the second identification information is generated according to jitter information generated by the second electronic device 104 when the first electronic device 102 collides with the second electronic device 104. In the case that the first identification information matches the second identification information, the first electronic device 102 establishes a bluetooth connection with the second electronic device 104. The first electronic device 102 and the second electronic device 104 may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
Fig. 2 is a flow chart of a method for connection between bluetooth devices in one embodiment. The connection method between bluetooth devices in this embodiment is described by taking the first electronic device in fig. 1 as an example. As shown in fig. 2, the method for connecting between bluetooth devices includes steps 202 to 208.
Step 202, acquiring jitter information generated by the first electronic device when the second electronic device is collided.
Bluetooth (Bluetooth) is an open global specification for wireless data and voice communications, which is a special short-range wireless technology connection that establishes a communication environment for fixed and mobile devices based on a low-cost short-range wireless connection. Bluetooth enables some current portable mobile and computer devices to connect to the internet without a cable and have wireless access to the internet.
Specifically, the connection between bluetooth devices is taken as an example for explanation. The first electronic device may acquire shake information generated by the first electronic device when the first electronic device collides with the second electronic device. The electronic equipment is composed of electronic components such as an integrated circuit, a transistor, an electron tube and the like, and the equipment which plays a role by applying electronic technology (including) software comprises an electronic computer, a robot controlled by the electronic computer, a numerical control or program control system and the like. For example, electronic equipment in this application can include smart mobile phone, earphone, flat panel, TV, car machine, intelligent audio amplifier, wearable equipment etc. and wearable equipment can be smart watch, smart glasses etc.. The first electronic device can be used as a slave device and can comprise earphones, a television, a car machine, a sound box and a smart watch, wherein the earphones, the television, the car machine, the sound box and the smart watch have different functions. The second electronic device may be a master device and may include mobile terminal devices of different operating systems. The jitter information is information when vibrations are generated by collisions between devices. The jitter information may include time of day information when the device generates vibrations. In addition, the jitter information may also include speed variation information generated by a bump between devices. The speed change information may include acceleration information or angular velocity information generated by a collision between devices. Wherein, equipment collision refers to the process of extremely short interaction between equipment. Very short means that the time interval is less than a preset duration. For example, taking a mobile phone connected to a bluetooth headset as an example, assuming that the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the device collision refers to a collision between the mobile terminal and the bluetooth headset, where the device collision may include multiple types of collisions, including knocking, colliding, or touching between devices. For example, the user can hold the bluetooth headset to knock or collide with the cell-phone and then can produce the vibration response in the equipment, and the user also can control the number of times and the frequency that the bluetooth headset touched mobile terminal simultaneously. Furthermore, the Bluetooth headset can acquire the jitter information generated by the Bluetooth headset when the Bluetooth headset collides with the mobile terminal. The shake information of the device may be shake information generated when a collision is detected by a sensor built in the device, that is, the first electronic device and the second electronic device each have a corresponding sensor built therein to acquire the shake information.
Step 204, generating first identification information according to the jitter information generated by the first electronic device.
After the first electronic device obtains the shaking information generated by the first electronic device when the first electronic device collides with the second electronic device, the first electronic device may generate the first identification information according to the shaking information generated by the first electronic device. Identifying information refers to processing, analyzing, and understanding information using computer technology to identify various types of objects and objects. The information identified by the identification information can be generally classified into image information identification, text information identification, audio information identification, and the like. The identification information in the application is used for identifying the identity authentication information between the devices, and mainly comprises text information. For example, the identification information may be a character string or custom identification information. Specifically, when the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the user can control the number of times that the bluetooth headset collides with the mobile terminal. Further, the bluetooth headset can acquire jitter information generated by the bluetooth headset when the bluetooth headset collides with the mobile terminal through a built-in gyroscope sensor, and generate first identification information according to the acquired jitter information. The gyroscope sensor is an angular motion detection device which uses a momentum moment sensitive shell of a high-speed revolving body to rotate around one or two axes which are orthogonal to a rotation axis relative to an inertia space, the angular motion detection device manufactured by using other principles is also called a gyroscope with the same function, and the gyroscope sensor can be arranged in both a mobile terminal and a Bluetooth headset.
For example, the user may control the bluetooth headset to continuously bump the mobile terminal twice. Further, the Bluetooth headset can respectively acquire the shaking information A and the shaking information B generated by the Bluetooth headset when the Bluetooth headset collides with the mobile terminal twice through the built-in gyroscope sensor. For example, the jitter information a may be time information a recorded when the first collision vibration occurs, and the jitter information B may be time information B recorded when the second collision vibration occurs, so that the bluetooth headset may generate corresponding first identification information according to the acquired time information a and the acquired time information B and according to a preset rule or algorithm, that is, the identification information includes the time information a and the time information B.
Step 206, sending the bluetooth pairing broadcast information containing the first identification information to instruct the second electronic device to match the first identification information in the bluetooth pairing broadcast information with second identification information of the second electronic device, where the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device.
After the first electronic device generates the first identification information according to the jitter information generated by the first electronic device, the first electronic device may send bluetooth pairing broadcast information including the first identification information to instruct the second electronic device to match the first identification information in the bluetooth pairing broadcast information with second identification information of the first electronic device, where the second identification information is generated according to the jitter information generated by the second electronic device when the first electronic device collides with the second electronic device. The bluetooth pairing broadcast information refers to that the equipment periodically sends message information in the broadcast according to a preset protocol. For example, each time a device broadcasts, the same message may be sent on a different broadcast channel, which is referred to as a broadcast event.
Specifically, when the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the bluetooth headset may send bluetooth pairing broadcast information including the first identification information after generating the first identification information according to jitter information generated by the bluetooth headset itself, so as to instruct the mobile terminal to match the first identification information in the bluetooth pairing broadcast information with second identification information of the mobile terminal itself, where the second identification information is generated according to jitter information generated by the mobile terminal when the bluetooth headset collides with the mobile terminal. Namely, the bluetooth headset can send the bluetooth pairing broadcast information containing the first identification information to enter the broadcast state. The mobile terminal can enter a scanning state through real-time scanning, namely the mobile terminal actively searches the broadcasting Bluetooth device and matches the first identification information in the broadcasting information with the identification information recorded by the mobile terminal. The identification information recorded by the mobile terminal is also generated according to the jitter information generated by the mobile terminal when the Bluetooth headset collides with the mobile terminal.
And step 208, under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment.
After the first electronic device sends the Bluetooth pairing broadcast information containing the first identification information, the second electronic device matches the first identification information in the scanned Bluetooth pairing broadcast information with the second identification information of the second electronic device through real-time scanning, and under the condition that the first identification information is matched with the second identification information, the first electronic device and the second electronic device establish Bluetooth connection. Wherein, bluetooth connection means that communication connection is established between the master device and the slave device. I.e., after a bluetooth Connection is established between devices, all data communication is performed in Connection Events. The condition that the first identification information is matched with the second identification information is a condition that the first identification information and the second identification information can meet the matching condition according to a preset protocol or rule.
Specifically, when the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the bluetooth headset may send bluetooth pairing broadcast information including the first identification information, so as to instruct the mobile terminal to match the first identification information in the bluetooth pairing broadcast information with the second identification information of the mobile terminal. Namely, the bluetooth headset can send the bluetooth pairing broadcast information containing the first identification information to enter the broadcast state. The mobile terminal can enter a scanning state through real-time scanning, namely the mobile terminal actively searches the broadcasting Bluetooth device and matches the first identification information in the broadcasting information with the identification information recorded by the mobile terminal. For example, when the identification information is character string information, the mobile terminal finds that the first character string information in the broadcast information is consistent with the character string information recorded by the mobile terminal through real-time scanning, that is, the matching is successful, and then the mobile terminal establishes bluetooth connection with the bluetooth headset.
In the connection method between bluetooth devices in this embodiment, by acquiring jitter information generated by a first electronic device when the first electronic device collides with a second electronic device, first identification information is generated according to the jitter information generated by the first electronic device, and bluetooth pairing broadcast information including the first identification information is sent to instruct the second electronic device to match the first identification information in the bluetooth pairing broadcast information with second identification information of the second electronic device, where the second identification information is generated according to the jitter information generated by the second electronic device when the first electronic device collides with the second electronic device. And under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment. Therefore, when multiple users are involved and multiple Bluetooth devices exist, the target device which the users want to connect can be accurately identified, multiple pairing attempts are not needed to be performed through manual operation, and therefore the accuracy of pairing connection between the devices is effectively improved. Compared with the connection mode between the current Bluetooth devices, even when the devices are connected for the first time, the users do not need to manually search the Bluetooth names of the earphones and manually click to connect, so that a complex manual operation process is avoided, quick and accurate automatic matching and connection between the Bluetooth devices can be realized, and the efficiency of pairing connection between the devices is effectively improved.
In one embodiment, as shown in fig. 3, the step of generating the first identification information by using the jitter information as jitter time information includes:
step 302, jitter time information of jitter generated by each time of the second electronic device being collided with the first electronic device is obtained.
Step 304, generating first identification information according to at least two shaking time information of the first electronic device for shaking.
The first electronic device may obtain shaking time information, which may cause shaking when the first electronic device collides with the second electronic device at least twice, and generate the first identification information according to at least two shaking time information, which may cause shaking when the first electronic device itself collides with the second electronic device. The jitter time information is time information when vibration is generated by collision between devices. Taking a mobile phone connected to a bluetooth headset as an example, assuming that the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the user can control the frequency and frequency of the bluetooth headset touching a target device, i.e., the mobile terminal, which is desired to be connected. Furthermore, the Bluetooth headset can acquire the jitter information generated by the Bluetooth headset when the Bluetooth headset collides with the mobile terminal. The jitter information of the device includes jitter time information, for example, if the time when the user controls the bluetooth headset to first collide with the target device, that is, the mobile terminal, to generate vibration is 12:03:54, the jitter time information recorded in the generated jitter information is 120354. When the user controls the bluetooth headset to collide with the target device, i.e., the mobile terminal, for the second time at a timing of 12:04:04, the jitter time information recorded in the generated jitter information is 120404. The bluetooth headset may acquire jitter time information, i.e., the character string 120354 and the character string 120404, of the two times of collisions of the mobile terminal, which jitter the bluetooth headset itself generates, and generate the first identification information according to the two acquired jitter time information (the character string 120354 and the character string 120404). Therefore, the sensed equipment shaking information is used as identification information through the built-in sensor of the intelligent equipment, and accurate identification and pairing connection among the equipment can be achieved.
In one embodiment, the step of generating the first identification information according to at least two shaking time information of shaking generated by the first electronic device includes:
converting each of the at least two pieces of jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to a time sequence to obtain a first character string.
After the first electronic device obtains the shake moment information, which is caused by shaking when the first electronic device collides with the second electronic device at least twice, each time the first electronic device collides with the second electronic device, the first electronic device may generate the first identification information according to at least two shake moment information, which are caused by shaking by the first electronic device. The first identification information is a first character string, and the second identification information is a second character string. Specifically, the first electronic device may convert each of the at least two shaking time information into a corresponding character string, and concatenate the obtained at least two character strings according to a time sequence to obtain the first character string. For example, taking a mobile phone connected to a bluetooth headset as an example, if the user controls the time when the bluetooth headset first collides with the target device, that is, the mobile terminal, to generate vibration to be 12:03:54, the jitter time information recorded in the generated jitter information is 120354. When the user controls the bluetooth headset to collide with the target device, i.e., the mobile terminal, for the second time at a timing of 12:04:04, the jitter time information recorded in the generated jitter information is 120404. That is, the bluetooth headset can acquire jitter time information (12:03:54 and 12:04:04) of the above-mentioned two-time collision mobile terminal, in which each time the bluetooth headset itself collides, generates jitter. Further, the bluetooth headset may convert each of the two pieces of shaking time information into a corresponding character string, that is, the bluetooth headset converts the time 12:03:54 at which the mobile terminal is first collided to generate vibration into a character string a:120354 to be recorded in the corresponding shaking information, and converts the time 12:04:04 at which the mobile terminal is second collided to generate vibration into a character string B: 120404 are recorded in the corresponding wobble information. The bluetooth headset splices the two obtained character strings (120354 and 120404) according to time sequence to obtain a first character string 120354120404, wherein the first character string 120354120404 is the first identification information. The jitter time information in the present application includes, but is not limited to, two jitter time information, and may also be three jitter time information or a plurality of jitter time information. Therefore, each jitter time information is converted into a corresponding character string, the converted character string information is matched, accurate identification and pairing connection between the devices can be achieved, and therefore the efficiency of pairing connection between the devices is effectively improved.
In one embodiment, the step of generating the first identification information according to at least two shaking time information of the first electronic device generating shaking comprises:
and calculating the time interval between two adjacent jitter time information in the at least two jitter time information.
First identification information is generated according to the time interval.
After the first electronic device obtains the shake moment information, which is caused by shaking when the first electronic device collides with the second electronic device at least twice, each time the first electronic device collides with the second electronic device, the first electronic device may generate the first identification information according to at least two shake moment information, which are caused by shaking by the first electronic device. Specifically, the first electronic device may calculate a time interval between two adjacent pieces of jitter time information in the at least two pieces of jitter time information, and generate the first identification information according to the calculated time interval. For example, taking a mobile phone connected to a bluetooth headset as an example, if the user controls the bluetooth headset to vibrate the mobile terminal at a time 12:03:54 when the bluetooth headset collides with the target device for the first time, and the user controls the bluetooth headset to vibrate the mobile terminal at a time 12:04:04, the bluetooth headset may calculate a time interval between two adjacent pieces of jitter time information, that is, a time difference between 12:03:54 and 12:04:04 is 10s, according to the jitter time information (12:03:54 and 12:04:04) generated by the bluetooth headset when the bluetooth headset collides with the target device for the second time in the two times of collisions, and generate corresponding first identification information according to the calculated time interval 10 s. The mobile terminal needs to record the time difference between two times of vibration, the time difference can be used as identification information, the timestamp information of the mobile terminal and the Bluetooth headset does not need to be synchronized in advance, the equipment can quickly acquire the vibration difference of the equipment through a built-in gyroscope sensor, and the identity can be mutually confirmed to be connected with the Bluetooth through the consistency of the time difference generated by the two equipment. For example, the mobile terminal taps the keyboard twice at an interval of 0.6 second, and an interval between two responses of the keyboard is also 0.6 second, that is, a tapping time interval generated by the mobile terminal is 0.6s, and a tapping time interval generated by the keyboard is also 0.6s, so that the 0.6 second time interval is unique in the scene, and under the condition of manual operation, the time intervals of each tapping are difficult to be consistent, and the identities can be mutually confirmed to perform bluetooth connection by consistent time difference values generated by the two devices. From this make, can realize quick accurate automatic matching and being connected between bluetooth equipment, effectively solve the problem that triggers other people's equipment, avoided triggering other people's equipment automatic popup prompt promptly and whether need connect manual operation, improved user's use and experienced, it is convenient to bring for the user.
In one embodiment, the step of calculating the time interval between two adjacent jitter instant messages of the at least two jitter instant messages comprises:
and converting each of the at least two shaking time information into a corresponding character string.
And splicing character strings corresponding to two adjacent shaking time information together to obtain a time interval between the two adjacent shaking time information.
The first electronic device may calculate a time interval between two adjacent pieces of jitter time information in the at least two pieces of jitter time information, and generate the first identification information according to the calculated time interval. Specifically, the first electronic device may convert each of the at least two shaking time information into a corresponding character string, and splice the character strings corresponding to two adjacent shaking time information together to obtain a time interval between the two adjacent shaking time information. For example, if the time of the first collision between the two devices is 12:03:54, and the time of the second collision is 12:04:04, the first electronic device may convert each of the two pieces of jitter time information into a corresponding character string, that is, the time of the first collision is 12:03:54 into a character string 120354, the time of the second collision is 12:04:04 into a character string 120404, and the character strings corresponding to the two pieces of converted adjacent jitter time information are spliced together to obtain a time interval between the two pieces of adjacent jitter time information, that is, a total character string of 120354120404, where the character string information is generated in both the two devices that collide with each other. Therefore, the information of the recording jitter interval is converted into the character string information to carry out Bluetooth broadcasting, so that the equipment can accurately identify and pair the equipment by scanning the character string information in the broadcasting information.
In an embodiment, as shown in fig. 4, after establishing a bluetooth connection with a second electronic device, the method further includes a step of establishing a bluetooth connection with a new electronic device, which specifically includes:
step 402, acquiring jitter information generated by the first electronic device when the new electronic device is collided.
Step 404, generating third identification information according to the jitter information generated by the first electronic device.
Step 406, sending the bluetooth pairing broadcast message including the third identification information to instruct the new electronic device to match the third identification information in the bluetooth pairing broadcast message with fourth identification information of the new electronic device, where the fourth identification information is generated according to jitter information generated by the new electronic device when the first electronic device collides with the new electronic device.
And step 408, under the condition that the third identification information is matched with the fourth identification information, establishing Bluetooth connection with the new electronic equipment.
After the first electronic device establishes a bluetooth connection with the second electronic device, the first electronic device may establish a bluetooth connection with a new electronic device. Specifically, the first electronic device may obtain jitter information generated by the first electronic device when a new electronic device is collided, and generate the third identification information according to the obtained jitter information of the first electronic device. Further, the first electronic device may send bluetooth pairing broadcast information including third identification information to instruct the new electronic device to match the third identification information in the bluetooth pairing broadcast information with fourth identification information of the new electronic device, where the fourth identification information is generated according to jitter information generated by the new electronic device when the first electronic device collides with the new electronic device. And under the condition that the third identification information is matched with the fourth identification information, the first electronic equipment establishes Bluetooth connection with the new electronic equipment. Taking a mobile phone connected with a bluetooth headset as an example, after a bluetooth connection is established between a mobile phone and the bluetooth headset, when a user wants to switch the connection between devices, it is assumed that the mobile phone device currently establishing the bluetooth connection with the bluetooth headset is an android operating system, the user wants to switch the bluetooth headset to connect another new mobile phone device, the operating system of the new mobile phone device is an IOS operating system, the user can knock or bump the new mobile phone device by holding the bluetooth headset to generate vibration induction in the device, the bluetooth headset can acquire jitter information generated by the bluetooth headset when the user bumps the new electronic device, i.e., the new mobile phone device, and generate third identification information according to the acquired jitter information. Further, the bluetooth headset may send bluetooth pairing broadcast information including third identification information to instruct the new mobile phone device to match the third identification information in the bluetooth pairing broadcast information with fourth identification information of the new mobile phone device, where the fourth identification information is generated according to jitter information generated by the new mobile phone device when the bluetooth headset collides with the new mobile phone device. Under the condition that the third identification information is matched with the fourth identification information, the Bluetooth connection is established between the Bluetooth earphone and the new mobile phone device, therefore, when a user has multiple devices and needs to switch the currently connected devices, the connection with the device 1 is not needed to be manually disconnected, and then the connection device 2 is searched again, so that a complex switching process is avoided, the shaking information corresponding to the devices can be sensed through a gyroscope arranged in the intelligent device, the devices are identified and connected in a pairing mode according to the shaking information, the rapid switching of the device connection is realized, and meanwhile, the accuracy of the connection in the pairing mode between the devices is effectively improved.
Fig. 5 is a flowchart of a connection method between bluetooth devices in another embodiment. The connection method between bluetooth devices in this embodiment is described by taking the second electronic device in fig. 1 as an example. As shown in fig. 5, the method for connecting between bluetooth devices includes steps 502 to 510.
Step 502, acquiring jitter information generated by a second electronic device when being collided by a first electronic device.
Step 504, generating second identification information according to the jitter information generated by the second electronic device.
Step 506, acquiring bluetooth pairing broadcast information which is sent by the first electronic device and contains first identification information; the first identification information is generated from shake information generated by the first electronic device when the second electronic device is collided.
And step 508, matching the first identification information with the second identification information in the Bluetooth pairing broadcast information.
And 510, establishing a bluetooth connection with the first electronic device under the condition that the first identification information is matched with the second identification information.
The second electronic device may acquire shake information generated by the second electronic device when being collided by the first electronic device, and generate the second identification information based on the shake information generated by the second electronic device. Further, the second electronic device obtains the bluetooth pairing broadcast information which is sent by the first electronic device and contains first identification information, wherein the first identification information is generated according to jitter information generated by the first electronic device when the second electronic device is collided. And the second electronic equipment matches the first identification information with the second identification information in the Bluetooth pairing broadcast information. And under the condition that the first identification information is matched with the second identification information, the second electronic equipment establishes Bluetooth connection with the first electronic equipment. The mobile phone is connected with the Bluetooth earphone, the first electronic device can be the Bluetooth earphone, the second electronic device can be the mobile terminal, the user can hold the Bluetooth earphone to knock or collide with the mobile phone, vibration induction in the device can be generated, and meanwhile the user can control the frequency and frequency of knocking or colliding with the mobile phone by the hand-held Bluetooth earphone. Therefore, the shake information of the equipment is sensed through the built-in sensor of the intelligent equipment, the shake information is converted into the identification information to be identified and paired between the equipment, more accurate connection between the equipment is achieved, the problem of triggering other equipment is solved, the equipment can be connected to the target equipment quickly and accurately, and the efficiency of pairing connection between the equipment is effectively improved.
In one embodiment, as shown in fig. 6, the step of generating the second identification information by using the jitter information as the jitter time information includes:
step 602, acquiring shaking time information of shaking generated by hitting the second electronic device each time when the first electronic device is hit at least twice.
Step 604, generating second identification information according to at least two shaking time information of shaking generated by the second electronic device.
After the second electronic device acquires the shake information generated by the second electronic device when being collided by the first electronic device, the second electronic device may generate the second identification information according to the shake information generated by the second electronic device itself. Specifically, the second electronic device may obtain shake moment information that shakes when the second electronic device is collided with the first electronic device at least twice, and generate the second identification information according to at least two shake moment information that shakes when the second electronic device collides with the second electronic device. Taking a mobile phone connected with a bluetooth headset as an example, assuming that the first electronic device is a bluetooth headset and the second electronic device is a mobile terminal, the user can control the frequency and frequency of the bluetooth headset striking a target device, i.e., the mobile terminal, which is desired to be connected. Further, the mobile terminal may acquire jitter information generated by the mobile terminal itself when being collided by the bluetooth headset. The jitter information of the device may include jitter time information, for example, the time when the user controls the bluetooth headset to collide with the mobile terminal for the first time to generate vibration is 12:03:54, the time when the user controls the bluetooth headset to collide with the mobile terminal for the second time to generate vibration is 12:04:04, the mobile terminal may obtain the jitter time information when the mobile terminal itself generates jitter when colliding with the mobile terminal each time in the two collisions, and generate the second identification information according to the two obtained jitter time information (12:03:54 and 12:04: 04). Therefore, the sensed equipment shaking information is used as identification information through the built-in sensor of the intelligent equipment, and accurate identification and pairing connection among the equipment can be achieved.
In one embodiment, the step of generating the second identification information according to at least two shaking time information of shaking generated by the second electronic device includes:
and converting each of the at least two pieces of jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to a time sequence to obtain a second character string.
After the second electronic device acquires the shake information generated by the second electronic device when the second electronic device is collided by the first electronic device, the second electronic device may generate the second identification information according to at least two shake time information at which the second electronic device shakes. Specifically, the second electronic device may convert each of the at least two shaking time information into a corresponding character string, and concatenate the obtained at least two character strings according to a time sequence to obtain the second character string. The first identification information is a first character string, and the second identification information is a second character string. Therefore, each jitter time information is converted into a corresponding character string, and the converted character string information is matched, so that accurate identification and pairing connection between the devices can be realized.
In one embodiment, the step of generating the second identification information according to at least two shaking time information of the second electronic device generating shaking comprises:
and calculating the time interval between two adjacent jitter time information in the at least two jitter time information.
And generating second identification information according to the time interval.
After the second electronic device acquires the shake information generated by the second electronic device when the second electronic device is collided by the first electronic device, the second electronic device may generate the second identification information according to at least two shake time information at which the second electronic device shakes. Specifically, the second electronic device may calculate a time interval between two adjacent pieces of jitter time information in the at least two pieces of jitter time information, and generate the second identification information according to the calculated time interval. From this make, can realize quick accurate automatic matching and being connected between bluetooth equipment, effectively solve the problem that triggers other people's equipment, avoided triggering other people's equipment automatic popup prompt promptly and whether need connect manual operation, improved user's use and experienced, it is convenient to bring for the user.
In one embodiment, the step of calculating the time interval between two adjacent jitter instant messages of the at least two jitter instant messages comprises:
and converting each of the at least two shaking time information into a corresponding character string.
And splicing character strings corresponding to two adjacent shaking time information together to obtain a time interval between the two adjacent shaking time information.
The second electronic device may calculate a time interval between two adjacent pieces of jitter time information in the at least two pieces of jitter time information, and generate the second identification information according to the calculated time interval. Specifically, the second electronic device may convert each of the at least two shaking time information into a corresponding character string, and splice the character strings corresponding to two adjacent shaking time information together to obtain a time interval between two adjacent shaking time information. Therefore, each jitter time information is converted into a corresponding character string, the converted character string information is matched, accurate identification and pairing connection between the devices can be achieved, and efficiency of pairing connection between the devices is effectively improved.
In an embodiment, as shown in fig. 7, after establishing a bluetooth connection with a first electronic device, the method further includes a step of establishing a bluetooth connection with a new electronic device, which specifically includes:
step 702, acquiring jitter information generated by a second electronic device when the second electronic device is collided by a new electronic device.
Step 704, generating fifth identification information according to the jitter information generated by the second electronic device.
Step 706, acquiring bluetooth pairing broadcast information which is sent by the new electronic equipment and contains sixth identification information; the sixth identification information is generated based on shake information generated by the new electronic device when the second electronic device is collided.
And step 708, matching the sixth identification information with the fifth identification information in the bluetooth pairing broadcast information.
And step 710, establishing a Bluetooth connection with the new electronic equipment under the condition that the sixth identification information is matched with the fifth identification information.
After the second electronic device establishes a bluetooth connection with the first electronic device, the second electronic device may establish a bluetooth connection with a new electronic device. Specifically, the second electronic device may acquire shake information generated by the second electronic device when being collided by a new electronic device, and generate the fifth identification information according to the shake information generated by the second electronic device. Further, the second electronic device may obtain bluetooth pairing broadcast information that is sent by the new electronic device and contains sixth identification information, where the sixth identification information is generated according to jitter information generated by the new electronic device when the second electronic device is collided. And the second electronic equipment matches the sixth identification information with the fifth identification information in the Bluetooth pairing broadcast information. And under the condition that the sixth identification information is matched with the fifth identification information, the second electronic equipment establishes Bluetooth connection with the new electronic equipment. Taking a mobile phone connected with a bluetooth headset as an example, after the bluetooth connection is established between the mobile phone and the bluetooth headset, when a user wants to switch the connection between devices, assuming that the user wants to switch the connection between the mobile phone and the smart watch, the user can hold the smart watch to knock or collide with the mobile phone terminal to generate vibration induction in the device, and then the mobile phone terminal can acquire shake information generated by the mobile phone terminal when the new electronic device, i.e., the smart watch, collides, and generate fifth identification information according to the acquired shake information. Furthermore, the mobile phone terminal can acquire new electronic equipment, namely bluetooth pairing broadcast information containing sixth identification information sent by the smart watch, wherein the sixth identification information is generated according to shaking information generated by the smart watch when the smart watch collides with the mobile phone terminal. The mobile phone terminal matches sixth identification information and fifth identification information in the Bluetooth pairing broadcast information, under the condition that the sixth identification information is matched with the fifth identification information, Bluetooth connection is established between the mobile phone terminal and the intelligent watch, therefore, when a user has multiple devices and needs to switch the currently connected devices, connection with the device 1 does not need to be manually disconnected, then the connection device 2 is searched again, a complex switching process is avoided, shaking information corresponding to the devices can be sensed through a gyroscope arranged in the intelligent device, identification and pairing connection among the devices are carried out according to the shaking information, rapid switching of device connection is achieved, and meanwhile the accuracy of pairing connection among the devices is effectively improved.
In one embodiment, for example, a handset is connected to a headset, and the headset and the handset have built-in gyroscopes for sensing jitter information of the device. When a user holds the earphone and taps the mobile phone, the earphone and the mobile phone have jitter information at the same time point. If the user holds the earphone and taps the mobile phone more than 2 times, the earphone and the mobile phone have jitter information of the same time interval. The mobile phone side records the jitter information, the earphone contains the jitter information (time difference information) in the Bluetooth broadcast information after the earphone jitters twice, the mobile phone scans and finds that the Bluetooth broadcast of the earphone is matched with the relevant information, and the earphone collided with the earphone can be judged in the matching. The earphone side and the mobile phone side both use the jitter information as identification information, the earphone side converts the jitter information into a character string A in the Bluetooth broadcast, the mobile phone side can continuously perform Bluetooth scanning, and performs information identification and matching on the scanned Bluetooth broadcast, when the mobile phone scans the character string information A at the position in real time, the character string A is compared with character string information B recorded in the mobile phone, and if the information is consistent, connection is performed. Because two devices which collide with each other generate the same recorded character string information, the character string information comprises time interval information, the character string information A can be presented in the earphone Bluetooth broadcast, if the character string information A is consistent with the character string information B recorded in the mobile phone, the device which is successfully paired is judged, and Bluetooth connection is established. Therefore, the equipment shaking information sensed by the gyroscope arranged in the intelligent equipment is used as identification information, the equipment is identified and paired to be connected, more accurate equipment connection is realized, and the problem of triggering other equipment is solved.
It should be understood that although the various steps in the flow charts of fig. 1-7 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-7 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
Fig. 8 is a block diagram showing a connection apparatus between bluetooth devices according to an embodiment. As shown in fig. 8, there is provided a connection apparatus between bluetooth devices, including: an obtaining module 802, a generating module 804, a sending module 806, and a connecting module 808, wherein:
the obtaining module 802 is configured to obtain jitter information generated by a first electronic device when a second electronic device is collided.
The generating module 804 is configured to generate first identification information according to jitter information generated by the first electronic device.
The sending module 806 is configured to send bluetooth pairing broadcast information including first identification information to instruct the second electronic device to match the first identification information in the bluetooth pairing broadcast information with second identification information of the second electronic device, where the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device.
A connection module 808, configured to establish a bluetooth connection with the second electronic device when the first identification information matches the second identification information.
In one embodiment, the obtaining module is further configured to obtain jitter time information of jitter generated by each collision of the first electronic device with the second electronic device at least twice. The generating module is further used for generating first identification information according to at least two shaking time information of shaking generated by the first electronic equipment.
In one embodiment, the apparatus further comprises: and (5) splicing the modules.
The splicing module is used for converting each jitter time information in the at least two jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to the time sequence to obtain a first character string.
In one embodiment, the apparatus further comprises: and a calculation module.
The calculation module is used for calculating the time interval between two adjacent jitter time information in the at least two jitter time information. The generation module is further used for generating first identification information according to the time interval.
In one embodiment, the apparatus further comprises: and a conversion module.
The conversion module is used for converting each jitter time information in the at least two jitter time information into a corresponding character string. The splicing module is further used for splicing the character strings corresponding to the two adjacent shaking time information together to obtain the time interval between the two adjacent shaking time information.
In one embodiment, the obtaining module is further configured to obtain jitter information generated by the first electronic device when the new electronic device is collided. The generating module is further used for generating third identification information according to the jitter information generated by the first electronic equipment. The sending module is further configured to send bluetooth pairing broadcast information including third identification information to instruct the new electronic device to match the third identification information in the bluetooth pairing broadcast information with fourth identification information of the new electronic device, where the fourth identification information is generated according to jitter information generated by the new electronic device when the first electronic device collides with the new electronic device. The connection module is further used for establishing Bluetooth connection with the new electronic equipment under the condition that the third identification information is matched with the fourth identification information.
Fig. 9 is a block diagram showing a connection apparatus between bluetooth devices according to another embodiment. As shown in fig. 9, there is provided a connection apparatus between bluetooth devices, including: an obtaining module 902, a generating module 904, a matching module 906, and a connecting module 908, wherein:
an obtaining module 902 is configured to obtain shake information generated by a second electronic device when being collided by a first electronic device.
A generating module 904, configured to generate second identification information according to the jitter information generated by the second electronic device.
The obtaining module 902 is further configured to obtain bluetooth pairing broadcast information that is sent by the first electronic device and includes first identification information, where the first identification information is generated according to jitter information generated by the first electronic device when the first electronic device collides with the second electronic device.
A matching module 906, configured to match the first identification information with the second identification information in the bluetooth pairing broadcast information.
A connection module 908, configured to establish a bluetooth connection with the first electronic device when the first identification information matches the second identification information.
In one embodiment, the obtaining module is further configured to obtain shaking moment information that a second electronic device shakes each time it is collided with by the first electronic device at least twice. The generating module is further used for generating second identification information according to at least two shaking time information of shaking generated by the second electronic equipment.
In one embodiment, the apparatus further comprises: and (5) splicing the modules.
The splicing module is used for converting each jitter time information in the at least two jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to the time sequence to obtain a second character string.
In one embodiment, the apparatus further comprises: and a calculation module.
The calculation module is used for calculating the time interval between two adjacent jitter time information in the at least two jitter time information. The generating module is further configured to generate second identification information according to the time interval.
In one embodiment, the apparatus further comprises: and a conversion module.
The conversion module is used for converting each jitter time information in the at least two jitter time information into a corresponding character string. The splicing module is further used for splicing the character strings corresponding to the two adjacent shaking time information together to obtain the time interval between the two adjacent shaking time information.
In one embodiment, the obtaining module is further configured to obtain shaking information generated by the second electronic device when being collided by the new electronic device. The generating module is further used for generating fifth identification information according to the jitter information generated by the second electronic equipment. The acquisition module is further used for acquiring Bluetooth pairing broadcast information which is sent by the new electronic equipment and contains sixth identification information, wherein the sixth identification information is generated according to jitter information generated by the new electronic equipment when the new electronic equipment collides with the second electronic equipment. The matching module is further used for matching the sixth identification information with the fifth identification information in the Bluetooth pairing broadcast information. The connection module is further used for establishing Bluetooth connection with the new electronic equipment under the condition that the sixth identification information is matched with the fifth identification information.
The division of each module in the connection apparatus between bluetooth devices is merely for illustration, and in other embodiments, the connection apparatus between bluetooth devices may be divided into different modules as needed to complete all or part of the functions of the connection apparatus between bluetooth devices.
For the specific definition of the connection device between bluetooth devices, reference may be made to the above definition of the connection method between bluetooth devices, which is not described herein again. All or part of each module in the connecting device between the Bluetooth devices can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 10 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 10, the electronic device may include the first electronic device or the second electronic device or a new electronic device. The electronic device includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing a method for connecting between bluetooth devices provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a Point of Sales (POS), a vehicle-mounted computer, and a wearable device.
The implementation of each module in the connection apparatus between bluetooth devices provided in the embodiments of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. Program modules constituted by such computer programs may be stored on the memory of the electronic device. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the method for connecting between bluetooth devices.
A computer program product containing instructions which, when run on a computer, cause the computer to perform a method of connection between bluetooth devices.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (16)

1. A method for connecting Bluetooth devices is applied to a first electronic device, and the method comprises the following steps:
acquiring jitter information generated by first electronic equipment when the first electronic equipment collides with second electronic equipment;
generating first identification information according to the jitter information generated by the first electronic equipment;
sending Bluetooth pairing broadcast information containing the first identification information to instruct the second electronic device to match the first identification information in the Bluetooth pairing broadcast information with second identification information of the second electronic device, wherein the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device;
and under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the second electronic equipment.
2. The method of claim 1, wherein the jitter information is jitter time information; the acquiring jitter information generated by the first electronic device when the second electronic device is collided comprises the following steps:
acquiring jitter time information of jitter generated by collision of the first electronic equipment with the second electronic equipment at least twice;
generating first identification information according to the jitter information generated by the first electronic device, wherein the generating of the first identification information comprises:
and generating first identification information according to at least two pieces of shaking time information of shaking generated by the first electronic equipment.
3. The method according to claim 2, wherein the first identification information is a first character string and the second identification information is a second character string;
the generating of the first identification information according to at least two shaking time information of shaking generated by the first electronic device includes:
converting each of the at least two pieces of jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to a time sequence to obtain a first character string.
4. The method according to claim 2, wherein generating the first identification information based on at least two shaking time information of the first electronic device producing shaking comprises:
calculating the time interval between two adjacent jitter time information in the at least two jitter time information;
and generating first identification information according to the time interval.
5. The method of claim 4, wherein calculating the time interval between two adjacent jitter instant messages of the at least two jitter instant messages comprises:
converting each of at least two shaking moment information into a corresponding character string;
and splicing character strings corresponding to two adjacent shaking time information together to obtain a time interval between the two adjacent shaking time information.
6. The method of claim 1, wherein after establishing the bluetooth connection with the second electronic device, the method further comprises:
acquiring jitter information generated by a first electronic device when the new electronic device is collided;
generating third identification information according to the jitter information generated by the first electronic equipment;
sending Bluetooth pairing broadcast information containing the third identification information to instruct the new electronic equipment to match the third identification information in the Bluetooth pairing broadcast information with fourth identification information of the new electronic equipment, wherein the fourth identification information is generated according to jitter information generated by the new electronic equipment when the first electronic equipment collides with the new electronic equipment;
and under the condition that the third identification information is matched with the fourth identification information, establishing Bluetooth connection with the new electronic equipment.
7. A method for connecting Bluetooth devices is applied to a second electronic device, and comprises the following steps:
acquiring jitter information generated by second electronic equipment when the second electronic equipment is collided by the first electronic equipment;
generating second identification information according to the jitter information generated by the second electronic equipment;
acquiring Bluetooth pairing broadcast information which is sent by first electronic equipment and contains first identification information; the first identification information is generated according to jitter information generated by the first electronic equipment when the second electronic equipment is collided;
matching first identification information in the Bluetooth pairing broadcast information with the second identification information;
and under the condition that the first identification information is matched with the second identification information, establishing Bluetooth connection with the first electronic equipment.
8. The method of claim 7, wherein the jitter information is jitter time information; the acquiring jitter information generated by a second electronic device when being collided by a first electronic device comprises:
acquiring jitter time information of jitter generated by hitting a second electronic device each time when the first electronic device collides at least twice;
generating second identification information according to the jitter information generated by the second electronic device, wherein the generating of the second identification information comprises:
and generating second identification information according to at least two pieces of shaking time information of shaking generated by the second electronic equipment.
9. The method according to claim 8, wherein the first identification information is a first character string and the second identification information is a second character string;
the generating of the second identification information according to at least two shaking time information of shaking generated by the second electronic device includes:
and converting each of the at least two pieces of jitter time information into a corresponding character string, and splicing the obtained at least two character strings according to a time sequence to obtain a second character string.
10. The method according to claim 8, wherein the generating second identification information based on at least two shaking time information of the second electronic device producing shaking comprises:
calculating the time interval between two adjacent jitter time information in the at least two jitter time information;
and generating second identification information according to the time interval.
11. The method of claim 10, wherein calculating the time interval between two adjacent jitter instant messages of the at least two jitter instant messages comprises:
converting each of at least two shaking moment information into a corresponding character string;
and splicing character strings corresponding to two adjacent shaking time information together to obtain a time interval between the two adjacent shaking time information.
12. The method of claim 7, wherein after establishing the Bluetooth connection with the first electronic device, the method further comprises:
acquiring jitter information generated by a second electronic device when the second electronic device is collided by a new electronic device;
generating fifth identification information according to the jitter information generated by the second electronic equipment;
acquiring Bluetooth pairing broadcast information which is sent by new electronic equipment and contains sixth identification information; the sixth identification information is generated from shake information generated by the new electronic device when the second electronic device is collided;
matching sixth identification information in the Bluetooth pairing broadcast information with the fifth identification information;
and under the condition that the sixth identification information is matched with the fifth identification information, establishing Bluetooth connection with the new electronic equipment.
13. An apparatus for connecting between bluetooth devices, the apparatus comprising:
the acquisition module is used for acquiring jitter information generated by the first electronic equipment when the first electronic equipment collides with the second electronic equipment;
the generating module is used for generating first identification information according to the jitter information generated by the first electronic equipment;
a sending module, configured to send bluetooth pairing broadcast information including the first identification information to instruct the second electronic device to match the first identification information in the bluetooth pairing broadcast information with second identification information of the second electronic device, where the second identification information is generated according to jitter information generated by the second electronic device when the first electronic device collides with the second electronic device;
and the connection module is used for establishing Bluetooth connection with the second electronic equipment under the condition that the first identification information is matched with the second identification information.
14. An apparatus for connecting between bluetooth devices, the apparatus comprising:
the acquisition module is used for acquiring jitter information generated by second electronic equipment when the second electronic equipment is collided by the first electronic equipment;
the generating module is used for generating second identification information according to the jitter information generated by the second electronic equipment;
the acquisition module is further used for acquiring Bluetooth pairing broadcast information which is sent by the first electronic equipment and contains first identification information; the first identification information is generated according to jitter information generated by the first electronic equipment when the second electronic equipment is collided;
the matching module is used for matching first identification information and second identification information in the Bluetooth pairing broadcast information;
and the connection module is used for establishing Bluetooth connection with the first electronic equipment under the condition that the first identification information is matched with the second identification information.
15. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the method for connecting between bluetooth devices as claimed in any one of claims 1 to 12.
16. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 12.
CN202110175521.0A 2021-02-09 2021-02-09 Method and device for connecting Bluetooth devices, electronic device and storage medium Pending CN112954659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110175521.0A CN112954659A (en) 2021-02-09 2021-02-09 Method and device for connecting Bluetooth devices, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110175521.0A CN112954659A (en) 2021-02-09 2021-02-09 Method and device for connecting Bluetooth devices, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112954659A true CN112954659A (en) 2021-06-11

Family

ID=76244435

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110175521.0A Pending CN112954659A (en) 2021-02-09 2021-02-09 Method and device for connecting Bluetooth devices, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112954659A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915919A (en) * 2022-04-29 2022-08-16 合肥中感微电子有限公司 Wireless communication connection method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110126014A1 (en) * 2009-11-24 2011-05-26 Sony Ericsson Mobile Communications Ab Event Triggered Pairing of Wireless Communication Devices Based on Time Measurements
US8271662B1 (en) * 2011-09-14 2012-09-18 Google Inc. Selective pairing of devices using short-range wireless communication
US20150271168A1 (en) * 2012-11-01 2015-09-24 Capitalbio Corporation Method, device, and system establishing a wireless communication channel between electronic devices
WO2020191570A1 (en) * 2019-03-25 2020-10-01 华为技术有限公司 Method for establishing wireless communication connection, and related devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110126014A1 (en) * 2009-11-24 2011-05-26 Sony Ericsson Mobile Communications Ab Event Triggered Pairing of Wireless Communication Devices Based on Time Measurements
US8271662B1 (en) * 2011-09-14 2012-09-18 Google Inc. Selective pairing of devices using short-range wireless communication
US20150271168A1 (en) * 2012-11-01 2015-09-24 Capitalbio Corporation Method, device, and system establishing a wireless communication channel between electronic devices
WO2020191570A1 (en) * 2019-03-25 2020-10-01 华为技术有限公司 Method for establishing wireless communication connection, and related devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915919A (en) * 2022-04-29 2022-08-16 合肥中感微电子有限公司 Wireless communication connection method, device, electronic equipment and storage medium
CN114915919B (en) * 2022-04-29 2024-02-27 合肥中感微电子有限公司 Connection method and device for wireless communication, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110582078B (en) Bluetooth pairing method and device, storage medium and electronic equipment
JP6379104B2 (en) Sharing information common to two mobile device users via a near field communication (NFC) link
CN106488335B (en) Live-broadcast control method and device
KR20230098353A (en) Locating electronic devices and associated wireless accessories
JP2018515818A (en) Video data management method, apparatus, terminal, server, program, and recording medium
CN105656948A (en) Account login method and device
KR20140124304A (en) Controlling Method for Communication and Electronic Device supporting the same
KR20200143487A (en) Data synchronization across multiple devices
CN109257336B (en) Block chain-based password information processing method and terminal equipment
US9723486B2 (en) Method and apparatus for accessing network
CN112887952B (en) Method and device for connecting Bluetooth device and terminal, and electronic device
CN105704655A (en) Media data sharing method and media data sharing device between terminals
CN108932102A (en) Data processing method, device and mobile terminal
CN110351225B (en) Hardware device networking method and system, computing device and readable storage medium
CN104883385B (en) Rich media file transmission method and device
CN106095132B (en) Playback equipment keypress function setting method and device
CN105306567B (en) Method and device for terminal connection
KR20240004874A (en) Pairing of groups of accessories
KR101599165B1 (en) Connecting wireless devices
CN112954659A (en) Method and device for connecting Bluetooth devices, electronic device and storage medium
CN110969434B (en) Payment method, server, terminal and system
KR101685361B1 (en) Mobile terminal and operation method thereof
US10069679B2 (en) Method, system, and device for initializing a media equipment
CN105577521A (en) Method, device and system for friend grouping
WO2019141162A1 (en) Terminal device searching method, apparatus and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611

RJ01 Rejection of invention patent application after publication