CN110582078A - Bluetooth pairing method and device, storage medium and electronic equipment - Google Patents

Bluetooth pairing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110582078A
CN110582078A CN201910800233.2A CN201910800233A CN110582078A CN 110582078 A CN110582078 A CN 110582078A CN 201910800233 A CN201910800233 A CN 201910800233A CN 110582078 A CN110582078 A CN 110582078A
Authority
CN
China
Prior art keywords
operation information
bluetooth
bluetooth device
information
broadcast
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.)
Granted
Application number
CN201910800233.2A
Other languages
Chinese (zh)
Other versions
CN110582078B (en
Inventor
苏恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realme Chongqing Mobile Communications Co Ltd
Original Assignee
Realme Chongqing Mobile Communications Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Realme Chongqing Mobile Communications Co Ltd filed Critical Realme Chongqing Mobile Communications Co Ltd
Priority to CN201910800233.2A priority Critical patent/CN110582078B/en
Publication of CN110582078A publication Critical patent/CN110582078A/en
Application granted granted Critical
Publication of CN110582078B publication Critical patent/CN110582078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Landscapes

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

Abstract

The embodiment of the application discloses a Bluetooth pairing method, a Bluetooth pairing device, a storage medium and electronic equipment, wherein the method comprises the following steps: monitoring an input Bluetooth pairing instruction, acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises a character string or first gesture operation information, receiving a second broadcast packet sent by first Bluetooth equipment, acquiring broadcast information carried by the second broadcast packet, and establishing pairing connection with the first Bluetooth equipment when the user operation information is matched with the broadcast information. By adopting the embodiment of the application, the Bluetooth pairing process can be simplified, and the Bluetooth pairing efficiency is improved.

Description

Bluetooth pairing method and device, storage medium and electronic equipment
Technical Field
the present application relates to the field of computer technologies, and in particular, to a bluetooth pairing method and apparatus, a storage medium, and an electronic device.
background
along with the popularization of wireless communication technology and intelligent terminal equipment, a user can connect different intelligent terminal equipment in a wireless communication mode, wherein the Bluetooth communication technology is widely applied to the intelligent terminal equipment as a short-distance wireless communication mode, for example, the intelligent mobile phone is connected with a Bluetooth sound box or a Bluetooth earphone through Bluetooth.
Before the intelligent terminal device adopts the Bluetooth communication technology to communicate, Bluetooth pairing needs to be carried out firstly.
Currently, in the bluetooth pairing process, a bluetooth switch of an intelligent terminal device is generally turned on first, a bluetooth device that can be paired is searched, device information of all bluetooth devices that can be paired is listed in a search list, and then a user selects a target bluetooth device in the search list for pairing. However, when many bluetooth devices that can be paired are searched, it is necessary for the user to spend a lot of time to search for the target bluetooth device in the bluetooth search list one by one, the bluetooth pairing process is complicated, and the bluetooth pairing efficiency is low.
disclosure of Invention
the embodiment of the application provides a Bluetooth pairing method and device, a storage medium and electronic equipment, which can simplify the Bluetooth pairing process and improve Bluetooth pairing efficiency. The technical scheme is as follows:
In a first aspect, an embodiment of the present application provides a bluetooth pairing method, where the method includes:
Monitoring an input Bluetooth pairing instruction, and acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises a character string or first gesture operation information;
Receiving a second broadcast packet sent by a first Bluetooth device, and acquiring broadcast information carried by the second broadcast packet;
and when the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth equipment.
In a second aspect, an embodiment of the present application provides a bluetooth pairing apparatus, including:
The operation information acquisition module is used for monitoring an input Bluetooth pairing instruction and acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises a character string or first gesture operation information;
the broadcast information acquisition module is used for receiving a second broadcast packet sent by the first Bluetooth equipment and acquiring broadcast information carried by the second broadcast packet;
And the pairing connection establishing module is used for establishing pairing connection with the first Bluetooth equipment when the user operation information is matched with the broadcast information.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
the beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
In one or more embodiments of the present application, a second bluetooth device monitors an input bluetooth pairing command, acquires user operation information input for the bluetooth pairing command, receives a second broadcast packet sent by a first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes a pairing connection with the first bluetooth device when the user operation information matches the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is 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 schematic view of a bluetooth pairing scenario provided in an embodiment of the present application;
Fig. 2 is a flowchart illustrating a bluetooth pairing method according to an embodiment of the present application;
Fig. 3 is a schematic interface diagram relating to a bluetooth pairing method according to an embodiment of the present application;
Fig. 4 is a schematic interface diagram related to a bluetooth pairing method according to an embodiment of the present application;
Fig. 5 is a schematic diagram of a character string input interface involved in a bluetooth pairing method according to an embodiment of the present application;
Fig. 6 is a flowchart illustrating another bluetooth pairing method according to an embodiment of the present application;
Fig. 7 is a schematic diagram of a pairing gesture input interface related to a bluetooth pairing method provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a pairing gesture input scene related to a bluetooth pairing method provided in an embodiment of the present application;
fig. 9 is a schematic diagram of another pairing gesture input scenario involved in a bluetooth pairing method provided in an embodiment of the present application;
Fig. 10 is a schematic diagram of a pairing device selection scenario involved in a bluetooth pairing method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a bluetooth pairing apparatus according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of a pairing connection establishing module according to an embodiment of the present disclosure;
Fig. 13 is a schematic structural diagram of another bluetooth pairing apparatus provided in the embodiment of the present application;
Fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
in the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The present application will be described in detail with reference to specific examples.
Please refer to fig. 1, which is a schematic view of a scene architecture of a bluetooth pairing system according to an embodiment of the present disclosure. As shown in fig. 1, the bluetooth pairing system may include a first bluetooth device 100 and a second bluetooth device 110.
The first bluetooth device 100 and the second bluetooth device 110 may be electronic devices with bluetooth pairing functions, including but not limited to: bluetooth headsets, bluetooth speakers, smart bands, personal computers, tablets, in-vehicle devices, computing devices or other processing devices connected to a wireless modem, and the like.
The second bluetooth device 110 listens to the input bluetooth pairing command, and obtains user operation information input for the bluetooth pairing command, where the user operation information includes a character string or first gesture operation information.
the bluetooth pairing instruction refers to a code for the computer to perform a bluetooth pairing operation, and in this embodiment, it can be understood that the code for the second bluetooth device 110 to perform a pairing operation between the second bluetooth device 110 and the first bluetooth device 100 is a specific code.
The user operation information is user operation input by a user in a Bluetooth pairing process and comprises first gesture operation information and a character string, and the second terminal can receive broadcast information of the first Bluetooth device to perform matching based on the user operation information.
specifically, the second bluetooth device 110 may have a touch screen, and when the user touches the bluetooth icon on the display interface of the second bluetooth device 110 in a manner of touch with a stylus or a finger, the second bluetooth device 110 monitors the bluetooth pairing instruction input by the user by detecting that the capacitance parameter at the position of the bluetooth icon changes, and starts the bluetooth pairing function. The second bluetooth device 110 displays a display interface for inputting user operation information to the user, and the user inputs the first gesture operation information on the current display interface in a finger touch manner, at this time, the second bluetooth device obtains the user operation information input by the user for the bluetooth pairing instruction.
The first bluetooth device 100 listens to the input bluetooth pairing command and sends a second broadcast packet to the second bluetooth device 110, where the second broadcast packet carries broadcast information.
Specifically, the user may input a bluetooth pairing command to the first bluetooth device 100 and the second bluetooth device 110 at the same time or at intervals, for example: the user can simultaneously input the bluetooth pairing command by touching the bluetooth pairing buttons of the first bluetooth device 100 and the second bluetooth device 110.
When the first bluetooth device 100 may detect and recognize operation information input by a user, the first bluetooth device 100 may receive second gesture operation information input by the user, generate a second broadcast packet including the second gesture operation information, where the second gesture operation information is gesture operation used for bluetooth pairing when a bluetooth pairing instruction is input, and the first bluetooth device 100 sends the second broadcast packet to the second bluetooth device 110.
And when receiving the second broadcast packet, the second bluetooth device 110 acquires the second gesture operation information carried by the second broadcast packet. The second bluetooth device 110 performs matching processing on the first gesture operation information and the second gesture operation information to obtain a matching result of the matching processing, generates a first broadcast packet containing the first gesture operation information when the matching result indicates that the first gesture operation information matches the second gesture operation information, and sends the first broadcast packet to the first bluetooth device 100.
After receiving the first broadcast packet, the first bluetooth device 100 obtains the first gesture operation information carried in the first broadcast packet, and when the first gesture operation information matches the second gesture operation information, feeds back verification confirmation information to the second bluetooth device 110.
The second bluetooth device 110 acquires a first time stamp for transmitting the first broadcast packet and a second time stamp for receiving the verification confirmation information after receiving the verification confirmation information.
The first time stamp may be understood as a time point at which the second bluetooth device 110 transmits the first broadcast packet, and the second time stamp may be understood as a time point at which the second bluetooth device receives the authentication acknowledgement information.
The second bluetooth device 110 calculates a time difference corresponding to the first timestamp and the second timestamp, and when the time difference is smaller than a preset time threshold, the second bluetooth device 110 establishes pairing connection with the first bluetooth device 100.
In a possible implementation manner, after the second bluetooth device 110 acquires the first gesture operation information, which is user operation information input for the bluetooth pairing instruction, the first broadcast packet containing the first gesture operation information is generated, and the first broadcast packet is sent to the first bluetooth device 100 in a broadcast manner.
After acquiring the second gesture operation information input for the bluetooth pairing instruction, the first bluetooth device 100 generates a second broadcast packet containing the second gesture operation information, and sends the second broadcast packet to the second bluetooth device 110.
The first bluetooth device 100 receives the first broadcast packet, acquires the first gesture operation information carried by the first broadcast packet, and feeds back verification confirmation information to the second bluetooth device 110 when the first gesture operation information matches the second gesture operation information.
The second bluetooth device 110 matches the first gesture operation information with the second gesture operation information, and obtains a first timestamp for sending the first broadcast packet and a second timestamp for receiving the verification confirmation information after the first gesture operation information is matched with the second gesture operation information and the verification confirmation information is received.
The second bluetooth device 110 calculates a time difference corresponding to the first timestamp and the second timestamp, and when the time difference is smaller than a preset time threshold, the second bluetooth device 110 establishes pairing connection with the first bluetooth device 100.
In a possible implementation manner, the second bluetooth device 110 obtains user operation information input for the bluetooth pairing instruction, where the user operation information may be a character string, and the second bluetooth device 110 receives a second broadcast packet sent by the first bluetooth device 100 and obtains broadcast information carried in the second broadcast packet, where the broadcast information may be a bluetooth identifier of the first bluetooth device 100.
The second bluetooth device 110 detects whether the bluetooth identifier contains the character string, obtains a detection result, and when the detection result indicates that the bluetooth identifier contains the character string, the second bluetooth device 110 sends a pairing request to the first bluetooth device 110.
The first bluetooth device 100 receives the pairing request, and feeds back request confirmation information to the second bluetooth device 110 based on the pairing request.
When receiving the request confirmation information, the second bluetooth device 110 establishes a pairing connection with the first bluetooth device.
in the embodiment of the application, a second bluetooth device monitors an input bluetooth pairing instruction, acquires user operation information input aiming at the bluetooth pairing instruction, receives a second broadcast packet sent by a first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes pairing connection with the first bluetooth device when the user operation information is matched with the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is improved.
in one embodiment, as shown in fig. 2, a bluetooth pairing method is proposed, which may be implemented by means of a computer program and may be run on a bluetooth pairing device based on von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Specifically, the bluetooth pairing method includes:
Step 101: monitoring the input Bluetooth pairing instruction, and acquiring user operation information input aiming at the Bluetooth pairing instruction.
the bluetooth pairing instruction refers to a code for the computer to perform a bluetooth pairing operation, and in this embodiment, may be understood as a code for the second bluetooth device to perform a pairing operation between the second bluetooth device and the first bluetooth device.
the bluetooth pairing instruction may be an instruction input by a user on the second bluetooth device, such as sliding a track, clicking, double-clicking or long-pressing a bluetooth pairing icon, pressing a preset bluetooth pairing button, shaking the second bluetooth device, and the like, or may be a bluetooth pairing instruction remotely sent by the second bluetooth device to the second bluetooth device through another intelligent device, such as sending an infrared signal to the second bluetooth device through an infrared remote controller, so that the second bluetooth device starts bluetooth pairing.
the user operation information is user operation input by a user in a Bluetooth pairing process and comprises first gesture operation information and a character string, and the second terminal can receive broadcast information of the first Bluetooth device to perform matching based on the user operation information.
The first gesture operation information may be a gesture behavior operation performed by the user on the second bluetooth terminal, for example, the user may shake the second bluetooth device horizontally or vertically, the user may hold the second bluetooth device to draw a designated pattern (draw a number "3"), and the first gesture operation information may be a gesture input on a human-computer interaction interface provided by the second bluetooth device, for example, an input arrow gesture, a circle-drawing gesture, and the like. The character string, which in this embodiment may be understood as a character string input by a user during bluetooth pairing, is generally one or more characters in a bluetooth identifier of a paired device, for example: the last two digits, letters, symbols, etc. of the bluetooth name of the first bluetooth device.
Specifically, the second bluetooth device may have a touch screen, and the touch screen may be a touch screen capable of implementing a single touch function, for example: capacitive touch screen, electromagnetic touch screen, can also be the touch-sensitive screen that can realize capacitive sensing, electromagnetic induction and infrared induction simultaneously. When a user touches the touch screen on the second Bluetooth device through a finger, the capacitance parameter of the touch position changes, and the touch frame determines the touch position of the finger on the touch screen of the second Bluetooth device according to the change of the capacitance; or when the finger contacts the touch frame, the infrared receiving end is blocked from receiving the infrared signal, the touch frame determines the touch position of the finger according to the blocked infrared signal, and the second Bluetooth device monitors the Bluetooth pairing instruction input by the user by identifying the code corresponding to the logic control instruction corresponding to the touch position.
Optionally, the bluetooth pairing instruction input by the user may be an icon for selecting bluetooth pairing through a mouse of an external device connected to the second bluetooth device, may be a gesture control instruction for acquiring the bluetooth pairing voice signal input by the user through a voice acquisition device of the second bluetooth device, and may also be a gesture control instruction for acquiring the bluetooth pairing gesture input by the user through a camera of the second bluetooth device.
it should be noted that there are various ways of inputting the bluetooth pairing command by the user, which may be one or more of the above, and this is not limited in detail here.
Specifically, when the second bluetooth device monitors a bluetooth pairing instruction input by a user, a display interface for inputting user operation information is displayed to the user, the user can input the user operation information on the display interface of the second bluetooth device in a finger touch manner, and the second bluetooth device acquires the user operation information input by the user by monitoring changes of capacitance parameters on a touch screen corresponding to a touch position of the user.
In a specific embodiment, fig. 3 is a diagram of a shortcut bar display interface of a second bluetooth device, when a user touches a "bluetooth" icon on the shortcut bar display interface of the second bluetooth device by means of a stylus or a finger touch, and lights up the bluetooth icon, the second bluetooth device determines that the user starts a bluetooth pairing function by detecting a change in a capacitance parameter at a position of the bluetooth icon, that is, the second bluetooth device monitors a bluetooth pairing instruction input by the user; or the user may touch the "bluetooth" application on the user terminal display interface in the application display interface shown in fig. 4 by using a touch pen or a finger, and select to open the bluetooth pairing option in the "bluetooth" application, that is, the second bluetooth device monitors the bluetooth pairing instruction input by the user.
After the second bluetooth device monitors a bluetooth pairing instruction input by a user, a display interface for inputting user operation information is displayed for the user, as shown in fig. 5, fig. 5 is a display interface of the second bluetooth device, which is used by the user to input a user operation information-character string, a character string in a device identifier of a device to be paired in the bluetooth pairing process can be input by the user on the display interface, the character string can be at least one character of the device identifier, as shown in fig. 5, the user can input a character string "O-Free" in an input frame of the display interface shown in fig. 5, after the input is completed, the user can click a confirmation button in a finger touch manner, and at this time, the second bluetooth device obtains the user operation information-character string "O-Free" input by the user for the bluetooth pairing instruction.
Step 102: and receiving a second broadcast packet sent by the first Bluetooth equipment, and acquiring broadcast information carried by the second broadcast packet.
The second broadcast packet may be understood as broadcast information that is sent by the first bluetooth device to other devices in a broadcast manner, where the broadcast information generally includes address information, a concatenation information segment, device identification information, user operation information, a sequence number of the second broadcast packet, and the like.
The second broadcast packet sent by the first bluetooth device may be in a non-directional broadcast mode or a directional broadcast mode, where the directional broadcast mode and the non-directional broadcast mode are broadcast objects, the directional broadcast mode is broadcast for a specific object, for example, the first bluetooth device broadcasts for the second bluetooth device of the specific object, and the non-directional broadcast mode is broadcast for all devices that can receive the broadcast packet in the same network.
In practical application, the first bluetooth device sends the second broadcast packet in a broadcast manner, which may be a fitting of one or more of communication technologies such as a WIFI protocol, a zigbee protocol technology, a bluetooth technology, an ultra-wideband communication technology, a near field communication technology, and the like, and sends the second broadcast packet to a device that can be paired in a current broadcast channel, which is not specifically limited herein.
Specifically, after receiving the bluetooth pairing instruction input by the user, the second bluetooth device correspondingly starts a channel scanning function and receives a broadcast packet in the current broadcast channel. When the first bluetooth device starts bluetooth pairing and broadcasts the second broadcast packet to the pairable bluetooth device of the current broadcast channel, the second bluetooth device can receive the second broadcast packet sent by the first bluetooth device, and then analyzes the second broadcast packet to acquire broadcast information carried by the second broadcast packet, wherein the broadcast information can include a bluetooth identifier, address information, a broadcast packet sequence number and the like of the first bluetooth device.
Step 103: and when the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth equipment.
the matching may be calculated based on keywords and key feature information of user operation information or broadcast information, calculating similarity between the user operation information and the broadcast information, calculating a similar distance between the user operation information and the broadcast information, calculating difference feature information between the user operation information and the broadcast information, and then ranking or scoring based on the difference feature information, and so on.
Specifically, after the second bluetooth device acquires the broadcast information carried by the second broadcast packet, the second bluetooth device splits the broadcast information, extracts a keyword in the broadcast information, where the keyword may be understood as a string of codes, a character with a specific meaning, and the like in this embodiment, calculates similarity of the user operation information based on the keyword, determines that the user operation information matches the broadcast information when the similarity reaches a preset similarity threshold, at this time, the second bluetooth device may send a pairing request to the first bluetooth device, and when request confirmation information fed back by the first bluetooth device based on the pairing request is received, the second bluetooth device establishes pairing connection with the first bluetooth device.
In a possible implementation, the user operation information may be a character string, the broadcast information may be a bluetooth identifier, and the matching may be detecting whether the bluetooth identifier includes the character string.
for example: the character string may be a character string "O-Free" input by the user in fig. 5, the broadcast information may be a bluetooth identifier of the first bluetooth device, the bluetooth identifier is "0 x0001x23 oxO-Free", when the second bluetooth device acquires the broadcast information carried in the second broadcast packet, i.e., the bluetooth identifier of the first bluetooth device, it is detected whether the bluetooth identifier "0 x0001x23 oxO-Free" includes the character string "O-Free", and when the detection result indicates that the bluetooth identifier includes the character string, the second bluetooth device acquires address information of the first bluetooth device, the address information may be acquired from the second broadcast packet, sends a pairing request to the first bluetooth device indicated by the address information, and when the second bluetooth device receives the request confirmation information fed back by the first bluetooth device based on the pairing request, and establishing pairing connection with the second Bluetooth equipment and the first Bluetooth equipment.
In the embodiment of the application, a second bluetooth device monitors an input bluetooth pairing instruction, acquires user operation information input aiming at the bluetooth pairing instruction, receives a second broadcast packet sent by a first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes pairing connection with the first bluetooth device when the user operation information is matched with the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is improved.
referring to fig. 6, fig. 6 is a flowchart illustrating another embodiment of a bluetooth pairing method according to the present application. Specifically, the method comprises the following steps:
step 201: monitoring the input Bluetooth pairing instruction, and acquiring first gesture operation information input aiming at the Bluetooth pairing instruction.
The first gesture operation information refers to gesture operation used for bluetooth pairing when a bluetooth pairing instruction is input, and the second terminal can perform matching based on the gesture operation information when receiving second gesture operation information of the first bluetooth device. In this embodiment, the first gesture operation information may be characters (letters, numbers, symbols, and the like) written by the user on the human-computer interaction interface provided by the second bluetooth device, may be a gesture input on the human-computer interaction interface provided by the second bluetooth device, such as an input arrow gesture and a circle drawing gesture, may be a gesture behavior operation performed by the user on the second bluetooth terminal, such as the user may shake the second bluetooth device horizontally or vertically, the user may hold the second bluetooth device to draw a specified pattern (draw a "8" word, and the like), and so on.
Specifically, when the second bluetooth device monitors a bluetooth pairing instruction input by a user, a display interface for inputting first gesture operation information is displayed for the user, the user inputs the first gesture operation information on the current display interface in a finger touch mode, and the second bluetooth device acquires the first gesture operation information input by the user by monitoring capacitance parameter changes on a touch screen corresponding to a touch position of the user.
Optionally, after the second bluetooth device monitors a bluetooth pairing instruction input by the user, a display interface for inputting first gesture operation information is displayed to the user, as shown in fig. 7, fig. 7 is a display interface diagram of the second bluetooth device, where the user can input a first gesture, a prompt message "please input a pairing gesture in an input box" is displayed in fig. 7, the user can input the first gesture operation information, namely, written number "8", on the current display interface in a finger touch manner according to the prompt message, after the user inputs the first gesture operation information, the user can click an "confirm" option in fig. 7, and the second bluetooth device obtains the first gesture operation information, "written number 8", input by the user for the bluetooth pairing instruction.
Optionally, the second bluetooth device has a plurality of electronic components for detecting user operation functions, where the electronic components include, but are not limited to, an acceleration sensor, a magnetic sensor, a gyroscope, a microphone, an earpiece, a physical quantity sensor, and the like, and the first gesture operation information input by the second bluetooth device in acquiring the bluetooth pairing instruction may be obtained based on detection by the electronic components.
For example: the user can shake the second bluetooth device-mobile phone along a specific angle (45 degrees, 90 degrees, 180 degrees, 360 degrees), as shown in fig. 8, fig. 8 is a scene diagram of the user shaking the mobile phone, after the user starts bluetooth, the user inputs a bluetooth pairing instruction, and by shaking the second bluetooth device-mobile phone horizontally or vertically in a manner as shown in fig. 8, when the user shakes the second bluetooth device, the electronic component for detecting the user operation function on the second bluetooth device detects the current operation of shaking the second bluetooth device horizontally or vertically, and acquires the current first gesture operation information of shaking the second bluetooth device horizontally or vertically.
Another example is: a user can also make a specific gesture operation by holding the second bluetooth device, as shown in fig. 9, fig. 9 is a schematic view illustrating a specific gesture operation scene made by holding the second bluetooth device, when the user makes a gesture operation of- "write number 8" as shown in fig. 9 by holding the second bluetooth device, an electronic component on the second bluetooth device for detecting a user operation function detects the gesture operation of the user currently writing number 8 ", and obtains the first gesture operation information corresponding to the gesture operation of the current user writing number 8", where the first gesture operation information includes, but is not limited to, time information corresponding to the user gesture operation, frequency information corresponding to the user gesture operation, angle information corresponding to the user gesture operation, content of the user gesture operation, and the like.
Step 202: and receiving a second broadcast packet sent by the first Bluetooth equipment, and acquiring second gesture operation information carried by the second broadcast packet.
The second broadcast packet may be understood as data information that is sent by the first bluetooth device to other devices in a broadcast manner, where the data information generally includes address information, a concatenation information segment, device identification information, user operation information, a sequence number of the second broadcast packet, and the like.
The second gesture operation information is gesture operation used for Bluetooth pairing when a Bluetooth pairing instruction is input, and after the first Bluetooth device receives the second gesture operation information input by a user, a second broadcast packet containing the second gesture operation information is sent to the second Bluetooth device. In this embodiment, the second gesture operation information may be characters (letters, numbers, symbols, and the like) written by the user on the human-computer interaction interface provided by the first bluetooth device, may be a gesture input on the human-computer interaction interface provided by the first bluetooth device, such as an input arrow gesture and a circle drawing gesture, may be a gesture behavior operation performed by the user on the first bluetooth terminal, such as that the user may shake the first bluetooth device horizontally or vertically, and the user may hold the first bluetooth device to draw a specified pattern (draw a "8" word, and the like), and so on.
in this embodiment, the first gesture operation information and the second gesture operation information may be gesture operation information of the same type or gesture operation information of different types expressing the same meaning. For example: the first gesture operation information may be writing the number "8" on the display screen as shown in the figure, the second gesture operation information may be holding the first bluetooth device to make the gesture operation of the number "8", and the like.
Generally, the second broadcast packet sent by the first bluetooth device may be in a non-directional broadcast mode or a directional broadcast mode, where the directional broadcast mode and the non-directional broadcast mode are directed to broadcast objects, the directional broadcast mode is to broadcast specific objects, for example, the first bluetooth device broadcasts to the second bluetooth device of a specific object, and the non-directional broadcast mode is to broadcast to all devices that can receive the broadcast packet in the same network.
In a specific implementation scenario, in order to establish a pairing connection between the first bluetooth device and the second bluetooth device more quickly, the first bluetooth device preferably sends the second broadcast packet in a directional broadcast manner. The directional broadcast mode may be understood as that the first bluetooth device stores address information of the second bluetooth device in advance, where the address information includes, but is not limited to, geographic location information, an IP address, a Mac address, a virtual address, and the like. When the first bluetooth device sends the second broadcast packet to the second bluetooth device, the address information of the second bluetooth device may be obtained first, and the second broadcast packet is sent to the second bluetooth device indicated by the address information.
In practical application, the first bluetooth device sends the second broadcast packet in a broadcast manner, and may send the broadcast packet externally in a broadcast manner based on communication technologies such as a WIFI protocol, a zigbee protocol technology, a bluetooth technology, an ultra-wideband communication technology, and a near field communication technology.
specifically, after receiving the bluetooth pairing instruction input by the user, the second bluetooth device correspondingly starts a channel scanning function, receives or monitors a broadcast packet in a current broadcast channel, and when the first bluetooth device receives second gesture operation information input by the user, and sends the second broadcast packet containing the second gesture operation information to the second bluetooth device through the current broadcast channel, the second bluetooth device receives the second broadcast packet sent by the first bluetooth device, and then analyzes the second broadcast packet to obtain the second gesture operation information carried by the second broadcast packet.
The step 102 may be specifically referred to when the first bluetooth device receives the second gesture operation information input by the user, and details are not described here.
Step 203: when the first gesture operation information is matched with the second gesture operation information, a first broadcast packet containing the first gesture operation information is generated, and the first broadcast packet is sent to the first Bluetooth device.
the first broadcast packet may be understood as data information that is sent by the second bluetooth device to other devices in a broadcast manner, where the data information generally includes a physical address, a splicing information segment, device identification information, user operation information, a sequence number of the second broadcast packet, and the like.
In this embodiment, the second bluetooth device may send the first broadcast packet to the first bluetooth device, which is a specific object, in a directional broadcast manner, where the directional broadcast manner may be understood that the second bluetooth device stores address information of the first bluetooth device in advance or obtains address information of the first bluetooth device in advance between sending the first broadcast packet, and when the second bluetooth device sends the first broadcast packet to the first bluetooth device in a directional broadcast manner, the second bluetooth device obtains the address information of the first bluetooth device first, and then sends the first broadcast packet to the first bluetooth device indicated by the address information.
Specifically, after acquiring second gesture operation information carried by the second broadcast packet, the second bluetooth device performs matching processing on the first gesture operation information and the second gesture operation information to obtain a matching result of the matching processing, and when the matching result indicates that the first gesture operation information is matched with the second gesture operation information, generates a first broadcast packet containing the first gesture operation information, and sends the first broadcast packet to the first bluetooth device.
Alternatively, the matching process may be to calculate based on keywords and key feature information of first gesture operation information, to calculate a similarity between the first gesture operation information and the second gesture operation information, to calculate a similar distance between the first gesture operation information and the second gesture operation information, to calculate difference feature information for the first gesture operation information and the second gesture operation information, and then to perform ranking or scoring based on the difference feature information, or the like.
in a specific implementation manner, the second bluetooth device splits the first gesture operation information and the second gesture operation information to extract keywords in the gesture operation information, where the keywords may be understood as a string of codes and a character string in this embodiment, and then calculates similarity for the keywords corresponding to the first gesture operation information and the second gesture operation information according to a matching rule, where the matching rule may be setting a similarity threshold, and when the similarity of the analysis processing result reaches the similarity threshold, it is determined that the first gesture operation information and the second gesture operation information are matched; and when the similarity of the analysis processing result does not reach a similarity threshold value, determining that the first gesture operation information is not matched with the second gesture operation information.
When the first gesture operation information is matched with the second gesture operation information, generating a first broadcast packet containing the first gesture operation information, acquiring address information of first Bluetooth equipment, and sending the first broadcast packet to the first Bluetooth equipment indicated by the address information. The address information may be pre-stored by the first bluetooth device, or may be obtained by parsing the second broadcast packet carrying the address information.
step 204: when verification confirmation information fed back by the first Bluetooth device aiming at the first gesture operation information and the second gesture operation information is received, a first time stamp for sending the first broadcast packet and a second time stamp for receiving the verification confirmation information are obtained, and a time difference corresponding to the first time stamp and the second time stamp is calculated.
The time stamp refers to a complete, verifiable piece of data, usually a sequence of characters, that represents a piece of data that existed before a particular time, and is used to provide an electronic proof to the user or device that proves the time of generation of some data. In this embodiment, the first timestamp may be understood as a time point when the second bluetooth device transmits the first broadcast packet, and the second timestamp may be understood as a time point when the second bluetooth device receives the verification confirmation information.
Specifically, when the first gesture operation information is matched with the second gesture operation information, the second bluetooth device sends a first broadcast packet containing the first gesture operation information to the first bluetooth device. The first Bluetooth device receives the first broadcast packet, analyzes and processes the first broadcast packet to obtain the first gesture operation information, matches and processes the first gesture operation information and the second gesture operation information to obtain a matching result of matching and processing, and when the matching result indicates that the first gesture operation information is matched with the second gesture operation information, the first Bluetooth device verifies and passes the second Bluetooth device, and at the moment, the first Bluetooth device feeds back verification confirmation information to the second Bluetooth device.
Specifically, after receiving the verification confirmation information of the first bluetooth device, the second bluetooth device respectively obtains a first timestamp for sending the first broadcast packet and a second timestamp for receiving the verification confirmation information, then converts the first timestamp and the second timestamp to obtain a first time point for sending the first broadcast packet by the second bluetooth device and a second time point for receiving the verification confirmation information by the second bluetooth device, and calculates a time difference between the first time point and the second time point.
Step 205: and when the time difference is smaller than a preset time threshold, establishing pairing connection with the first Bluetooth device.
the threshold refers to a threshold value of a certain field, state or system, and is also called a critical value. The preset time threshold may be understood as a threshold of a preset time from the transmission of the first broadcast packet to the reception of the verification acknowledgement information in this embodiment. The preset time threshold is usually set by a user or when the device leaves a factory, and the preset time threshold can be changed at a later stage.
specifically, after the second bluetooth device calculates the first timestamp and the time difference corresponding to the second timestamp, the second bluetooth device compares the time difference with a preset time threshold, and when the time difference is smaller than the preset time threshold, based on address information (IP address, MAC address, and the like) carried by the second broadcast packet, the second bluetooth device calls a system resource pool, creates a mapping relationship between the second bluetooth device and the first bluetooth device, and establishes a communication connection between the second bluetooth device and the first bluetooth device by using a preset bluetooth communication architecture (bluetooth 4.0, bluetooth 5.0, and the like), thereby completing pairing between the second bluetooth device and the first bluetooth device.
for example, if the preset time threshold is 20s, the time difference obtained through calculation is 19s, and the time difference is smaller than the preset time threshold, the first bluetooth device and the second bluetooth device are paired and connected.
in a possible implementation manner, when the time difference is greater than the preset time threshold, or no verification confirmation information is received within a time range corresponding to the preset time threshold, it may be understood that the state of the first bluetooth device is abnormal, where the state abnormality may be that the first bluetooth device is overloaded, a message transmission channel is blocked, a delay is high, a communication channel is blocked, and the like. At this time, the second bluetooth terminal pushes prompt information that the bluetooth pairing is not passed, where the prompt information may be in the form of push message, playing video or animation.
optionally, when the user terminal pushes the prompt that the bluetooth pairing is failed, a re-pairing option may be provided to the user, and the user may click the re-pairing option to perform the bluetooth pairing.
Step 206: when the first Bluetooth devices comprise a plurality of first Bluetooth devices and the first gesture operation information is matched with second gesture operation information corresponding to each first Bluetooth device in the plurality of first Bluetooth devices, the distance between the first Bluetooth device and each first Bluetooth device is obtained.
Specifically, when the first bluetooth device includes a plurality of first bluetooth devices, that is, the plurality of first bluetooth devices are paired with the second bluetooth device at the same time, and each of the plurality of first bluetooth devices sends a second bluetooth packet including second gesture operation information to the second bluetooth device, where the second gesture operation information corresponding to each of the first bluetooth devices is the same gesture operation information, for example, the second gesture operation information is all written digits 8, at this time, the first gesture operation information is matched with the second gesture operation information corresponding to each of the plurality of first bluetooth devices, and then the second bluetooth device obtains a signal strength value received by each of the first bluetooth devices, inputs the signal strength value into the signal attenuation model, and calculates a distance between the second bluetooth device and each of the first bluetooth devices.
Specifically, a large amount of sample data is obtained in advance, feature information is extracted, the feature information includes the signal intensity value of the first bluetooth device and the reference signal intensity value, a signal attenuation model with the signal intensity value varying with the distance is created, and the feature information is input into the radio attenuation model to obtain the trained radio attenuation model.
In a possible implementation manner, the signal attenuation model may be a logarithmic normal distribution model, and a filtering correction algorithm (gaussian distribution, least square method, kalman filtering, etc.) is combined to perform correction optimization on the calculation result of the signal attenuation model. The resulting signal attenuation model may be of the form:
RSSI=a-10n lg(d)
The distance d between the first bluetooth device and the second bluetooth device and the expression of the signal strength value RSSI of the first bluetooth device can be obtained by performing mathematical conversion on the signal attenuation model, as follows:
d=10^[abs(RSSI-a)/(10*n)]
where abs () represents an absolute value function, a is a reference signal strength value (RSSI value when the first bluetooth device is 1m away from the second bluetooth device), and n is an environmental attenuation factor.
And inputting the received signal intensity value of each first Bluetooth device into the expression of the distance d and the signal intensity value RSSI of the first Bluetooth device, and obtaining the distance between the second Bluetooth device and each first Bluetooth device through mathematical calculation.
optionally, the obtaining of the distance to each first bluetooth device may be calculated based on the coordinates of each first bluetooth device and the geographic location coordinates of the second bluetooth device, for example: before each first Bluetooth device sends a second broadcast packet, a positioning function is started, the current geographic position coordinate is obtained, a second broadcast packet containing the second gesture operation information and the geographic position coordinate is generated, then the second broadcast packet containing the second gesture operation information and the geographic position coordinate is sent to a second Bluetooth device by the first Bluetooth device, the second Bluetooth device receives the second broadcast packet, analyzes the broadcast packet, obtains the geographic position coordinate of each first Bluetooth device, and calculates the distance between the second Bluetooth device and each first Bluetooth device based on a coordinate distance conversion formula.
Step 207: and acquiring the shortest distance in the distances, and establishing pairing connection with the first Bluetooth equipment indicated by the shortest distance.
specifically, after the second bluetooth device obtains the distances to the first bluetooth devices through calculation, the second bluetooth device obtains the shortest distance from the distances to the first bluetooth devices, determines the first bluetooth device indicated by the shortest distance, and establishes the pairing connection with the first bluetooth device.
Step 105 may be referred to when the second bluetooth device establishes a pairing connection with the first bluetooth device, and details are not repeated here.
In a possible implementation manner, after the second bluetooth device obtains the distance from each first bluetooth device through calculation, the relevant information (bluetooth name, distance, etc.) of each first bluetooth device may be displayed on a current display interface of the second bluetooth device, and the user may select the first bluetooth device that establishes the pairing connection on the interface.
For example: as shown in fig. 10, fig. 10 is a schematic diagram of a display interface of a second bluetooth device for a user to select pairing connection, where in fig. 10, there are 4 first bluetooth devices, which are device 1, device 2, device 3, and device 4, respectively. The second bluetooth device obtains the distance with 4 bluetooth devices respectively through calculation, specifically is, equipment 1: 13m, device 2: 15m, device 3: 12m and device 4: 5m, the second bluetooth device correspondingly displays the distances between the second bluetooth device and the 4 bluetooth devices on the current display interface, as shown in fig. 10, where fig. 10 includes user prompt information: and requesting to manually select the current devices needing to be paired, and selecting the nearest first bluetooth device-device 4 on the current display interface in a finger touch manner by the user based on the prompt information to establish bluetooth connection with the device 4.
in a possible implementation manner, after acquiring the first gesture operation information input for the bluetooth pairing instruction, the second bluetooth device generates the first broadcast packet containing the first gesture operation information, and transmits the first broadcast packet in a broadcast manner. And when the second Bluetooth equipment receives a second broadcast packet sent by the first Bluetooth equipment, acquiring second gesture operation information carried by the second broadcast packet.
And matching the first gesture operation information with the second gesture operation information, and establishing pairing connection with the first Bluetooth device when the first gesture operation information is matched with the second gesture operation information and verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received.
In the embodiment of the application, a second bluetooth device monitors an input bluetooth pairing instruction, acquires user operation information input aiming at the bluetooth pairing instruction, receives a second broadcast packet sent by a first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes pairing connection with the first bluetooth device when the user operation information is matched with the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is improved.
the following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
please refer to fig. 11, which shows a schematic structural diagram of a bluetooth pairing apparatus according to an exemplary embodiment of the present application. The bluetooth paired device may be implemented as all or part of the device in software, hardware, or a combination of both. The apparatus 1 includes an operation information acquisition module 11, a broadcast information acquisition module 12, and a pairing connection establishment module 13.
The operation information acquiring module 11 is configured to monitor an input bluetooth pairing instruction, and acquire user operation information input for the bluetooth pairing instruction, where the user operation information includes first gesture operation information and a character string;
The broadcast information acquiring module 12 is configured to receive a second broadcast packet sent by a first bluetooth device, and acquire broadcast information carried in the second broadcast packet;
And a pairing connection establishing module 13, configured to establish a pairing connection with the first bluetooth device when the user operation information matches the broadcast information.
Optionally, as shown in fig. 12, when the user operation information is first gesture operation information, and the broadcast information is second gesture operation information, the pairing connection establishing module 13 includes:
A first broadcast packet sending unit 131, configured to generate a first broadcast packet containing the first gesture operation information when the first gesture operation information matches the second gesture operation information, and send the first broadcast packet to the first bluetooth device;
a pairing connection establishing unit 132, configured to establish a pairing connection with the first bluetooth device when verification confirmation information fed back by the first bluetooth device for the first gesture operation information and the second gesture operation information is received.
Optionally, as shown in fig. 13, when the user operation information is first gesture operation information, and the broadcast information is second gesture operation information, the apparatus 1 further includes:
A first broadcast packet sending module 14, configured to generate the first broadcast packet containing the first gesture operation information, and send the first broadcast packet in a broadcast manner;
The pairing connection establishing module 13 is specifically configured to:
when the first gesture operation information is matched with the second gesture operation information and verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received, establishing pairing connection with the first Bluetooth device.
Optionally, as shown in fig. 13, the apparatus 1 further includes:
and the time difference calculation module 15 is configured to acquire a first time stamp for sending the first broadcast packet and a second time stamp for receiving the verification confirmation information, calculate a time difference corresponding to the first time stamp and the second time stamp, and execute the step of establishing a pairing connection with the first bluetooth device when the time difference is smaller than a preset time threshold.
Optionally, as shown in fig. 12, when the user operation information is a character string and the broadcast information is a bluetooth identifier, the pairing connection establishing module 13 includes:
A pairing request sending unit 133, configured to send a pairing request to the first bluetooth device when the bluetooth identifier includes the character string;
a pairing connection establishing unit 132, configured to establish a pairing connection with the first bluetooth device when receiving confirmation information fed back by the first bluetooth device based on the pairing request.
Optionally, as shown in fig. 12, when the first bluetooth device includes a plurality of bluetooth devices, the pairing connection establishing module 13 includes:
a distance obtaining unit 134, configured to obtain a distance between each first bluetooth device and each first bluetooth device in the plurality of first bluetooth devices when the user operation information matches broadcast information corresponding to the first bluetooth device;
And a pairing connection establishing unit 132, configured to acquire a shortest distance in the distances, and establish a pairing connection with the first bluetooth device indicated by the shortest distance.
It should be noted that, when the bluetooth pairing apparatus provided in the foregoing embodiment executes the bluetooth pairing method, only the division of the functional modules is illustrated, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the above described functions. In addition, the embodiments of the bluetooth pairing device and the bluetooth pairing method provided by the above embodiments belong to the same concept, and details of implementation processes thereof are referred to as method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In this embodiment, the second bluetooth device monitors the input bluetooth pairing command, acquires user operation information input for the bluetooth pairing command, receives a second broadcast packet sent by the first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes pairing connection with the first bluetooth device when the user operation information matches the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is improved.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the bluetooth pairing method according to the embodiments shown in fig. 1 to 10, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to 10, which is not described herein again.
The present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded by the processor and executes the bluetooth pairing method according to the embodiment shown in fig. 1 to fig. 10, where a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to fig. 10, and is not described herein again.
please refer to fig. 14, which provides a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 14, the server 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
wherein a communication bus 1002 is used to enable connective communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Processor 1001 may include one or more processing cores, among other things. The processor 1001 connects various parts throughout the server 1000 using various interfaces and lines, and performs various functions of the server 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 14, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a bluetooth pairing application program.
in the server 1000 shown in fig. 14, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; the processor 1001 may be configured to call the bluetooth pairing application stored in the memory 1005, and specifically perform the following operations:
Monitoring an input Bluetooth pairing instruction, and acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises first gesture operation information and a character string;
Receiving a second broadcast packet sent by a first Bluetooth device, and acquiring broadcast information carried by the second broadcast packet;
And when the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth equipment.
In an embodiment, when the user operation information is first gesture operation information, and the broadcast information is second gesture operation information, and when the user operation information is matched with the broadcast information, and a pairing connection with the first bluetooth device is established, the following operations are specifically performed:
When the first gesture operation information is matched with the second gesture operation information, generating a first broadcast packet containing the first gesture operation information, and sending the first broadcast packet to the first Bluetooth device;
When verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received, establishing pairing connection with the first Bluetooth device.
in one embodiment, when the user operation information is first gesture operation information and the broadcast information is second gesture operation information, after the processor 1001 acquires the user operation information input for the bluetooth pairing instruction, the processor further performs the following operations:
Generating the first broadcast packet containing the first gesture operation information, and transmitting the first broadcast packet in a broadcast mode;
When the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth device, including:
When the first gesture operation information is matched with the second gesture operation information and verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received, establishing pairing connection with the first Bluetooth device.
In one embodiment, before performing the establishing of the pairing connection with the first bluetooth device, the processor 1001 further performs the following operations:
Acquiring a first time stamp for sending the first broadcast packet and a second time stamp for receiving the verification confirmation information, and calculating a time difference corresponding to the first time stamp and the second time stamp;
And when the time difference is smaller than a preset time threshold, executing the step of establishing pairing connection with the first Bluetooth device.
In one embodiment, when the first bluetooth device includes a plurality of bluetooth devices, the processor 1001 specifically performs the following operations when performing the establishing of the pairing connection with the first bluetooth device when the user operation information matches the broadcast information:
when the Bluetooth identification contains the character string, sending a pairing request to the first Bluetooth device;
and when receiving confirmation information fed back by the first Bluetooth device based on the pairing request, establishing pairing connection with the first Bluetooth device.
in one embodiment, when the user operation information is a character string and the broadcast information is a bluetooth identifier, the processor 1001 executes
When the user operation information is matched with broadcast information corresponding to each first Bluetooth device in the plurality of first Bluetooth devices, acquiring the distance between each first Bluetooth device and the first Bluetooth device;
And acquiring the shortest distance in the distances, and establishing pairing connection with the first Bluetooth equipment indicated by the shortest distance.
In this embodiment, the second bluetooth device monitors the input bluetooth pairing command, acquires user operation information input for the bluetooth pairing command, receives a second broadcast packet sent by the first bluetooth device, acquires broadcast information carried by the second broadcast packet, and establishes pairing connection with the first bluetooth device when the user operation information matches the broadcast information. By matching the user operation information with the broadcast information, when the user operation information is matched with the broadcast information, pairing connection is established, a user does not need to search for Bluetooth pairing equipment in a search list, the Bluetooth pairing connection process is simplified, and the Bluetooth pairing efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
the above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. a Bluetooth pairing method, the method comprising:
Monitoring an input Bluetooth pairing instruction, and acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises a character string or first gesture operation information;
receiving a second broadcast packet sent by a first Bluetooth device, and acquiring broadcast information carried by the second broadcast packet;
And when the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth equipment.
2. The method according to claim 1, wherein when the user operation information is first gesture operation information and the broadcast information is second gesture operation information, and when the user operation information is matched with the broadcast information, establishing a pairing connection with the first bluetooth device comprises:
When the first gesture operation information is matched with the second gesture operation information, generating a first broadcast packet containing the first gesture operation information, and sending the first broadcast packet to the first Bluetooth device;
when verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received, establishing pairing connection with the first Bluetooth device.
3. the method according to claim 1, wherein when the user operation information is first gesture operation information and the broadcast information is second gesture operation information, after the obtaining of the user operation information input for the bluetooth pairing instruction, further comprising:
generating the first broadcast packet containing the first gesture operation information, and transmitting the first broadcast packet in a broadcast mode;
When the user operation information is matched with the broadcast information, establishing pairing connection with the first Bluetooth device, including:
When the first gesture operation information is matched with the second gesture operation information and verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received, establishing pairing connection with the first Bluetooth device.
4. The method of claim 2 or claim 3, wherein prior to establishing the pairing connection with the first Bluetooth device, further comprising:
Acquiring a first time stamp for sending the first broadcast packet and a second time stamp for receiving the verification confirmation information, and calculating a time difference corresponding to the first time stamp and the second time stamp;
and when the time difference is smaller than a preset time threshold, executing the step of establishing pairing connection with the first Bluetooth device.
5. The method of claim 1, wherein when the user operation information is a character string and the broadcast information is a bluetooth identifier, the establishing a pairing connection with the first bluetooth device when the user operation information matches the broadcast information comprises:
when the Bluetooth identification contains the character string, sending a pairing request to the first Bluetooth device;
And when receiving confirmation information fed back by the first Bluetooth device based on the pairing request, establishing pairing connection with the first Bluetooth device.
6. The method of claim 1, wherein when the first bluetooth device includes a plurality of bluetooth devices, the establishing a pairing connection with the first bluetooth device when the user operation information matches the broadcast information comprises:
when the user operation information is matched with broadcast information corresponding to each first Bluetooth device in the plurality of first Bluetooth devices, acquiring the distance between the user operation information and each first Bluetooth device;
And acquiring the shortest distance in the distances, and establishing pairing connection with the first Bluetooth equipment indicated by the shortest distance.
7. a bluetooth pairing apparatus, the apparatus comprising:
the operation information acquisition module is used for monitoring an input Bluetooth pairing instruction and acquiring user operation information input aiming at the Bluetooth pairing instruction, wherein the user operation information comprises a character string or first gesture operation information;
The broadcast information acquisition module is used for receiving a second broadcast packet sent by the first Bluetooth equipment and acquiring broadcast information carried by the second broadcast packet;
and the pairing connection establishing module is used for establishing pairing connection with the first Bluetooth equipment when the user operation information is matched with the broadcast information.
8. the apparatus according to claim 7, wherein when the user operation information is first gesture operation information and the broadcast information is second gesture operation information, the pairing connection establishing module includes:
A first broadcast packet sending unit, configured to generate a first broadcast packet containing the first gesture operation information when the first gesture operation information matches the second gesture operation information, and send the first broadcast packet to the first bluetooth device;
And the pairing connection establishing unit is used for establishing pairing connection with the first Bluetooth device when verification confirmation information fed back by the first Bluetooth device according to the first gesture operation information and the second gesture operation information is received.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1 to 6.
10. a server, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 6.
CN201910800233.2A 2019-08-28 2019-08-28 Bluetooth pairing method and device, storage medium and electronic equipment Active CN110582078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910800233.2A CN110582078B (en) 2019-08-28 2019-08-28 Bluetooth pairing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910800233.2A CN110582078B (en) 2019-08-28 2019-08-28 Bluetooth pairing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110582078A true CN110582078A (en) 2019-12-17
CN110582078B CN110582078B (en) 2023-01-20

Family

ID=68812102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910800233.2A Active CN110582078B (en) 2019-08-28 2019-08-28 Bluetooth pairing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110582078B (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147973A (en) * 2019-12-27 2020-05-12 深圳春沐源控股有限公司 Control method of earphone assembly, earphone assembly and computer readable storage medium
CN111275427A (en) * 2020-01-20 2020-06-12 维沃移动通信有限公司 Receipt and payment method and electronic equipment
CN112306361A (en) * 2020-10-12 2021-02-02 广州朗国电子科技有限公司 Terminal screen projection method, device and system based on gesture pairing
CN112367655A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 Communication method and device for TWS equipment team formation and electronic equipment
CN113038449A (en) * 2021-02-01 2021-06-25 深圳创维-Rgb电子有限公司 Device pairing method, device, storage medium and device
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN113347618A (en) * 2021-06-01 2021-09-03 宁波奥克斯电气股份有限公司 Bluetooth pairing method, device and system, Bluetooth intelligent terminal and storage medium
WO2021174843A1 (en) * 2020-03-05 2021-09-10 珠海市杰理科技股份有限公司 Wireless control method, device, ble apparatus, chip, and storage medium
CN113395689A (en) * 2021-05-28 2021-09-14 昇辉控股有限公司 Bluetooth Mesh network-based equipment pairing method, system and storage medium
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium
WO2021197098A1 (en) * 2020-03-30 2021-10-07 华为技术有限公司 Wireless connection method and apparatus, and terminal device
CN113645622A (en) * 2021-07-08 2021-11-12 荣耀终端有限公司 Device authentication method, electronic device, and storage medium
CN113741779A (en) * 2020-05-29 2021-12-03 芯海科技(深圳)股份有限公司 Device connection method and device, mobile measurement device and storage medium
CN114764970A (en) * 2021-12-28 2022-07-19 深圳市杰理微电子科技有限公司 Bluetooth headset retrieving method and device, headset and system
CN115209510A (en) * 2022-06-17 2022-10-18 北京快乐茄信息技术有限公司 Wireless network connection method and device, electronic equipment and storage medium
CN116132565A (en) * 2022-10-24 2023-05-16 维沃移动通信有限公司 Display method, display device, electronic equipment and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924800A (en) * 2017-04-14 2018-11-30 中移物联网有限公司 A kind of Bluetooth pairing connection method, device and bluetooth equipment
WO2018223892A1 (en) * 2017-06-06 2018-12-13 苏州欧普照明有限公司 Bluetooth connection method, bluetooth apparatus, and bluetooth connection system
CN109788441A (en) * 2017-11-13 2019-05-21 北京小鸟听听科技有限公司 A kind of information processing method, terminal and computer storage medium
WO2019120102A1 (en) * 2017-12-21 2019-06-27 安克创新科技股份有限公司 Wireless handheld electronic device, smart electronic device and pairing connection method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924800A (en) * 2017-04-14 2018-11-30 中移物联网有限公司 A kind of Bluetooth pairing connection method, device and bluetooth equipment
WO2018223892A1 (en) * 2017-06-06 2018-12-13 苏州欧普照明有限公司 Bluetooth connection method, bluetooth apparatus, and bluetooth connection system
CN109788441A (en) * 2017-11-13 2019-05-21 北京小鸟听听科技有限公司 A kind of information processing method, terminal and computer storage medium
WO2019120102A1 (en) * 2017-12-21 2019-06-27 安克创新科技股份有限公司 Wireless handheld electronic device, smart electronic device and pairing connection method thereof

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111147973A (en) * 2019-12-27 2020-05-12 深圳春沐源控股有限公司 Control method of earphone assembly, earphone assembly and computer readable storage medium
CN111275427A (en) * 2020-01-20 2020-06-12 维沃移动通信有限公司 Receipt and payment method and electronic equipment
WO2021174843A1 (en) * 2020-03-05 2021-09-10 珠海市杰理科技股份有限公司 Wireless control method, device, ble apparatus, chip, and storage medium
WO2021197098A1 (en) * 2020-03-30 2021-10-07 华为技术有限公司 Wireless connection method and apparatus, and terminal device
CN113741779A (en) * 2020-05-29 2021-12-03 芯海科技(深圳)股份有限公司 Device connection method and device, mobile measurement device and storage medium
CN112306361A (en) * 2020-10-12 2021-02-02 广州朗国电子科技有限公司 Terminal screen projection method, device and system based on gesture pairing
CN112306361B (en) * 2020-10-12 2021-08-31 广州朗国电子科技有限公司 Terminal screen projection method, device and system based on gesture pairing
CN112367655A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 Communication method and device for TWS equipment team formation and electronic equipment
CN112367655B (en) * 2020-11-06 2023-01-10 炬力(珠海)微电子有限公司 Communication method and device for TWS equipment team formation and electronic equipment
CN113038449A (en) * 2021-02-01 2021-06-25 深圳创维-Rgb电子有限公司 Device pairing method, device, storage medium and device
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN113115294B (en) * 2021-04-22 2022-05-03 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN113395689A (en) * 2021-05-28 2021-09-14 昇辉控股有限公司 Bluetooth Mesh network-based equipment pairing method, system and storage medium
CN113395689B (en) * 2021-05-28 2024-02-06 昇辉控股有限公司 Bluetooth Mesh network-based device pairing method, system and storage medium
CN113347618A (en) * 2021-06-01 2021-09-03 宁波奥克斯电气股份有限公司 Bluetooth pairing method, device and system, Bluetooth intelligent terminal and storage medium
CN113645622A (en) * 2021-07-08 2021-11-12 荣耀终端有限公司 Device authentication method, electronic device, and storage medium
CN113645622B (en) * 2021-07-08 2023-08-15 荣耀终端有限公司 Device authentication method, electronic device and storage medium
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium
CN114764970A (en) * 2021-12-28 2022-07-19 深圳市杰理微电子科技有限公司 Bluetooth headset retrieving method and device, headset and system
CN114764970B (en) * 2021-12-28 2024-03-19 深圳市杰理微电子科技有限公司 Bluetooth headset retrieving method, device, headset and system
CN115209510A (en) * 2022-06-17 2022-10-18 北京快乐茄信息技术有限公司 Wireless network connection method and device, electronic equipment and storage medium
CN115209510B (en) * 2022-06-17 2024-03-29 北京快乐茄信息技术有限公司 Wireless network connection method and device, electronic equipment and storage medium
CN116132565A (en) * 2022-10-24 2023-05-16 维沃移动通信有限公司 Display method, display device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
CN110582078B (en) 2023-01-20

Similar Documents

Publication Publication Date Title
CN110582078B (en) Bluetooth pairing method and device, storage medium and electronic equipment
CN111107667B (en) Bluetooth headset pairing method and device and readable storage medium
CN107943489B (en) Data sharing method and mobile terminal
KR101602461B1 (en) Method for controlling display apparatus and mobile phone
CN111083684A (en) Method for controlling electronic equipment and electronic equipment
CN108347512B (en) Identity recognition method and mobile terminal
CN108958606B (en) Split screen display method and device, storage medium and electronic equipment
CN105302452B (en) Operation method and device based on gesture interaction
CN108334272B (en) Control method and mobile terminal
CN107870674B (en) Program starting method and mobile terminal
CN108536509B (en) Application body-splitting method and mobile terminal
CN110096203B (en) Screenshot method and mobile terminal
CN108958593B (en) Method for determining communication object and mobile terminal
CN107741814B (en) Display control method and mobile terminal
CN110308834B (en) Setting method of application icon display mode and terminal
CN110673770A (en) Message display method and terminal equipment
CN108391253B (en) application program recommendation method and mobile terminal
CN111313114B (en) Charging method and electronic equipment
CN108924911B (en) Method and device for starting wifi hotspot sharing network
CN111190515A (en) Shortcut panel operation method, device and readable storage medium
CN111093133A (en) Wireless device control method, apparatus and computer readable storage medium
CN109067975B (en) Contact person information management method and terminal equipment
CN110941469A (en) Application body-splitting creating method and terminal equipment thereof
CN112199246B (en) Terminal test method and device, storage medium and mobile terminal
CN110266885B (en) Binding method of terminal and terminal

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
GR01 Patent grant
GR01 Patent grant