CN112804651B - Binding method and device and computer equipment - Google Patents

Binding method and device and computer equipment Download PDF

Info

Publication number
CN112804651B
CN112804651B CN202011600525.0A CN202011600525A CN112804651B CN 112804651 B CN112804651 B CN 112804651B CN 202011600525 A CN202011600525 A CN 202011600525A CN 112804651 B CN112804651 B CN 112804651B
Authority
CN
China
Prior art keywords
bound
binding
broadcast message
devices
mode identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011600525.0A
Other languages
Chinese (zh)
Other versions
CN112804651A (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.)
Wuhan United Imaging Zhirong Medical Technology Co Ltd
Original Assignee
Wuhan United Imaging Zhirong Medical Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan United Imaging Zhirong Medical Technology Co Ltd filed Critical Wuhan United Imaging Zhirong Medical Technology Co Ltd
Priority to CN202011600525.0A priority Critical patent/CN112804651B/en
Publication of CN112804651A publication Critical patent/CN112804651A/en
Application granted granted Critical
Publication of CN112804651B publication Critical patent/CN112804651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/06Selective distribution of broadcast services, e.g. multimedia broadcast multicast service [MBMS]; Services to user groups; One-way selective calling services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • 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

Abstract

The application relates to a binding method, a binding device and computer equipment. The method comprises the steps of receiving broadcast messages which are sent by at least one device to be bound and carry binding identifiers, determining target devices to be bound according to mode identifiers in the broadcast messages, and then binding and connecting the target devices to be bound. In the method, when a plurality of devices to be bound with the same name exist around the terminal, the terminal can quickly find the devices to be bound for binding through the binding identifiers in the broadcast messages sent by the devices to be bound, so that the quick binding between the terminal and the target devices to be bound is realized. In addition, when the user binds the device to be bound, complex information such as the device address of the device to be bound does not need to be identified, so that the operation difficulty of the user is reduced, the binding efficiency is greatly improved, possible errors caused when the user carries out manual binding can be avoided, and the binding accuracy is improved.

Description

Binding method and device and computer equipment
Technical Field
The present application relates to the field of wireless communication technologies, and in particular, to a binding method and apparatus, and a computer device.
Background
Bluetooth is a global wireless communication standard, which is a special and low-cost short-range wireless technology connection for establishing a communication environment between a fixed device and a mobile device. The bluetooth is widely applied to various fields such as wearable equipment, medical health, sports fitness, intelligent furniture and the like because the bluetooth has the advantages of low power consumption, quick connection, low time delay, unlimited connection nodes and the like, and particularly, the bluetooth equipment is additionally arranged on medical equipment so as to facilitate index testing, such as a heart rate belt, an electronic sphygmomanometer, an electronic thermometer and the like.
In the bluetooth technology, two communication parties are a bluetooth host and a bluetooth slave respectively, the bluetooth slave sends broadcast information outwards in a broadcast mode, the bluetooth host searches the broadcast information through scanning, the identity of the bluetooth slave is confirmed through analyzing the broadcast information, and the bluetooth slave can be bound to carry out communication after the identity of the bluetooth slave is confirmed. At present, in the process of binding a bluetooth slave, a bluetooth master usually searches for a device to be bound by a device name, but when a plurality of bluetooth devices of the same type exist around and are used simultaneously, the bluetooth master can search for a plurality of bluetooth slaves of the same name, and at this time, a user needs to manually select a device to be connected by the user through a bluetooth address of the bluetooth slave. However, the bluetooth address is very complex and is a 12-bit string consisting of numbers 0-9 and letters a-F, such as "34: 12: F9:8A: CA: 84", which increases the difficulty for the user to identify and easily causes the problem of binding error or incapability of binding of the bluetooth host.
Disclosure of Invention
In view of the foregoing, there is a need to provide a binding method, apparatus and computer device that can be fast and accurate.
In a first aspect, a method of binding, the method comprising:
receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier;
determining target equipment to be bound according to the mode identifier in each broadcast message;
and binding and connecting the target equipment to be bound.
In one embodiment, the determining, according to the mode identifier in each broadcast message, a target device to be bound includes:
determining candidate devices to be bound according to the mode identifiers in the broadcast messages;
if the number of the candidate devices to be bound is greater than the preset number, determining the candidate devices to be bound meeting the preset binding condition as the target devices to be bound;
and if the number of the candidate devices to be bound is not greater than the preset number, determining the candidate devices to be bound as the target devices to be bound.
In one embodiment, if the number of the candidate devices to be bound is greater than a preset number, determining the candidate devices to be bound that meet a preset binding condition as the target device to be bound includes:
measuring the signal strength between each candidate device to be bound and each candidate device to be bound;
and determining the candidate device to be bound with the signal strength greater than the preset signal strength threshold value as the target device to be bound.
In one embodiment, if the number of the candidate devices to be bound is greater than a preset number, determining the candidate devices to be bound that satisfy a preset binding condition as the target device to be bound includes:
matching the physical address of each candidate device to be bound with a preset legal physical address;
and determining the candidate device to be bound corresponding to the successfully matched physical address as the target device to be bound.
In one embodiment, if the number of the target devices to be bound is greater than the preset number, before performing binding connection on the target devices to be bound, the method further includes:
and returning to the step of receiving the broadcast message sent by at least one device to be bound until the determined number of the target devices to be bound is not greater than the preset number.
In a second aspect, a method of binding, the method comprising:
setting a mode identifier of equipment to be bound, and generating a broadcast message carrying the mode identifier;
and sending the broadcast message to a terminal to indicate the terminal to determine the target equipment to be bound to perform binding connection according to the mode identifier in the broadcast message.
In one embodiment, the sending the broadcast message to the terminal includes:
transmitting a broadcast message to the terminal at a first frequency; the first frequency is greater than other devices to be bound.
In a third aspect, a binding apparatus, the apparatus comprising:
the receiving module is used for receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier;
the determining module is used for determining target equipment to be bound according to the mode identifier in each broadcast message;
and the binding module is used for binding and connecting the target equipment to be bound.
In a fourth aspect, a binding apparatus, the apparatus comprising:
the device comprises a setting module, a binding module and a sending module, wherein the setting module is used for setting a mode identifier of equipment to be bound and generating a broadcast message carrying the mode identifier;
and the sending module is used for sending the broadcast message to a terminal so as to indicate the terminal to determine target equipment to be bound to perform binding connection according to the mode identifier in the broadcast message.
In a fifth aspect, a computer device comprises a memory storing a computer program and a processor implementing the method of the first aspect when the processor executes the computer program.
In a sixth aspect, a computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the method of the first aspect described above.
According to the binding method, the binding device, the computer equipment and the storage medium, the broadcast message which is sent by at least one piece of equipment to be bound and carries the binding identifier is received, the target equipment to be bound is determined according to the mode identifier in each broadcast message, and then the target equipment to be bound is bound and connected. In the method, when a plurality of devices to be bound with the same name exist around the terminal, the terminal can quickly find the devices to be bound for binding through the binding identifiers in the broadcast messages sent by the devices to be bound, so that the quick binding between the terminal and the target devices to be bound is realized. Moreover, when the user binds the equipment to be bound, the complicated information such as the equipment address of the equipment to be bound does not need to be identified, the operation difficulty of the user is reduced to a certain extent, only the binding identifier of the equipment to be bound needs to be automatically identified by the terminal, the binding efficiency is greatly improved, possible errors caused when the user carries out manual binding can be avoided, and the binding accuracy is further improved.
Drawings
FIG. 1 is a diagram of an application environment of a binding method in one embodiment;
FIG. 2 is a flow diagram that illustrates a binding methodology in one embodiment;
FIG. 3 is a flowchart illustrating an implementation manner of S102 in the embodiment of FIG. 2;
FIG. 4 is a flowchart illustrating an implementation manner of S202 in the embodiment of FIG. 3;
FIG. 5 is a schematic flow chart illustrating another implementation manner of S202 in the embodiment of FIG. 3;
FIG. 6 is a flow diagram that illustrates a binding methodology in one embodiment;
FIG. 7 is a flow diagram that illustrates a binding methodology in one embodiment;
FIG. 8 is a flow diagram that illustrates a binding methodology in one embodiment;
FIG. 9 is a block diagram of the structure of a binding apparatus in one embodiment;
FIG. 10 is a block diagram of the structure of a binding apparatus in one embodiment;
FIG. 11 is a block diagram of the structure of a binding apparatus in one embodiment;
FIG. 12 is a block diagram of the structure of a binding apparatus in one embodiment;
FIG. 13 is a block diagram of the structure of a binding apparatus in one embodiment;
FIG. 14 is a diagram showing an internal configuration of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The binding method provided by the application can be applied to the application environment shown in fig. 1. The terminal 102 is in binding connection with at least one device to be bound 104. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices, and other devices having a bluetooth communication module; the device to be bound 104 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices and other devices having a bluetooth communication module.
Those skilled in the art will appreciate that the architecture shown in fig. 1 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, as shown in fig. 2, a binding method is provided, which is described by taking the method as an example applied to the binding terminal 102 in fig. 1, and includes the following steps:
s101, receiving a broadcast message sent by at least one device to be bound; the broadcast message includes a mode identification.
Wherein the broadcast message is used to request a connection communication to the terminal. Defining a device name and a mode identifier of a device to be bound in broadcast data corresponding to the broadcast message, wherein the mode identifier is used for indicating whether the device to be bound requests active binding, specifically, the mode identifier may be an identifier corresponding to a binding mode or a non-binding mode, and if the mode identifier is the binding mode, the mode identifier indicates that the device to be bound requests active binding; and if the mode identification is the non-binding mode, the device to be bound does not request active binding. Optionally, the binding identifier is also used to indicate a binding priority of the device to be bound, and specifically, the mode identifier includes the binding priority. The binding identifier may be represented in the form of numbers, letters, words, serial numbers or a combination of several types, for example, a binding identifier of 1 indicates a binding mode, and a binding identifier of 0 indicates a non-binding mode; for another example, a binding pattern of L indicates that the binding priority is low, and a binding pattern of H indicates that the binding priority is high.
In this embodiment, each device to be bound in the area around the terminal may set a field of a binding identifier in advance in a broadcast message, and define the field to represent a binding mode, a non-binding mode, or a binding priority, and then broadcast the broadcast message carrying the binding identifier, so that the terminal may receive the broadcast message sent by at least one device to be bound. It should be noted that the broadcast frame type carrying the binding identifier is agreed by the terminal and the device to be bound in advance, so that the device to be bound can be automatically acquired by the terminal and binding is recommended.
And S102, determining target equipment to be bound according to the mode identification in each broadcast message.
When the terminal receives the broadcast messages sent by at least one device to be bound, the broadcast messages can be further analyzed, the mode identification is analyzed, whether the device to be bound is in the binding mode or not is determined, and the device to be bound in the binding mode is determined as a target device to be bound; or, after the terminal analyzes the pattern identifier, determining whether each device to be bound reaches a preset priority (for example, a high priority), and determining the device to be bound reaching the preset priority as a target device to be bound.
Optionally, when the terminal receives a broadcast message sent by at least one device to be bound, the terminal may further parse each broadcast message, parse out a device name and a mode identifier from the broadcast message, preliminarily determine, according to the device name, a device to be bound that needs to be bound currently, and if the number of the device to be bound that needs to be bound currently exceeds the number that can be bound by the terminal, further determine, according to the mode identifier, whether the device to be bound that needs to be bound currently is in a binding mode, and determine, as a target device to be bound, the device to be bound that needs to be bound currently in the binding mode; or after the terminal analyzes the mode identifier, determining whether each current device to be bound reaches the preset priority, and determining the device to be bound reaching the preset priority as the target device to be bound.
S103, binding and connecting the target equipment to be bound.
When the terminal determines the target device to be bound based on the steps, the active request binding device is determined, and at the moment, the terminal can bind the target device to be bound and establish communication connection with the target device to be bound. It should be noted that the terminal and the device to be bound may specifically perform bluetooth binding, and may also perform network binding, and then perform communication based on the established bluetooth channel, or perform communication based on the established network channel.
In the binding method provided by the embodiment, the broadcast message carrying the binding identifier and sent by at least one device to be bound is received, the target device to be bound is determined according to the mode identifier in each broadcast message, and then the target device to be bound is bound and connected. In the method, when a plurality of devices to be bound with the same name exist around the terminal, the terminal can quickly find the devices to be bound for binding through the binding identifiers in the broadcast messages sent by the devices to be bound, so that the quick binding between the terminal and the target devices to be bound is realized. Moreover, when the user binds the device to be bound, the user does not need to recognize the complex information such as the device address of the device to be bound, the operation difficulty of the user is reduced to a certain extent, only the terminal needs to automatically recognize the binding identifier of the device to be bound, the binding efficiency is greatly improved, possible errors caused when the user manually binds can be avoided, and the binding accuracy is further improved.
In an embodiment, an implementation manner of the foregoing S102 is provided, and as shown in fig. 3, the foregoing S102 "determining a target device to be bound according to a mode identifier in each broadcast message" includes:
s201, determining candidate devices to be bound according to the mode identification in each broadcast message.
When the terminal receives the broadcast message sent by at least one device to be bound, the terminal can further analyze each broadcast message, analyze the mode identifier from each broadcast message, determine whether each device to be bound is in the binding mode, and determine the device to be bound in the binding mode as a candidate device to be bound. Or after the terminal analyzes the mode identifier, determining whether each device to be bound reaches a preset priority, and determining the device to be bound reaching the preset priority as a candidate device to be bound.
Optionally, when the terminal receives a broadcast message sent by at least one device to be bound, the terminal may further parse each broadcast message, parse out a device name and a mode identifier from the broadcast message, preliminarily determine, according to the device name, a device to be bound that needs to be bound currently, and if the number of the device to be bound that needs to be bound currently exceeds the number that can be bound by the terminal, further determine, according to the mode identifier, whether the device to be bound that needs to be bound currently is in a binding mode, and determine, as a candidate device to be bound, the device to be bound that needs to be bound currently in the binding mode; or after the terminal analyzes the mode identifier, determining whether each current device to be bound reaches the preset priority, and determining the device to be bound reaching the preset priority as a candidate device to be bound.
And S202, if the number of the candidate devices to be bound is greater than the preset number, determining the candidate devices to be bound meeting the preset binding condition as target devices to be bound.
The preset number can be determined by the hardware binding capability of the terminal, and is 1 if the terminal can only bind one device at a time, and is the maximum number of devices that can be bound by the terminal if the terminal can bind a plurality of devices at a time. The preset binding condition may be determined according to an actual binding requirement, and specifically, the preset binding condition may include at least one of the following: firstly, whether the signal strength between the equipment to be bound and the terminal meets a preset signal strength threshold value or not; and secondly, whether the physical address of the device to be bound belongs to the physical address in the white list or not.
In this embodiment, if the number of the candidate devices to be bound is greater than the preset number, it indicates that the device currently requesting active binding exceeds the capability that the terminal can bind, and at this time, the device to be bound within the binding capability range of the terminal needs to be further screened from the candidate devices to be bound. Therefore, the terminal sets a preset binding condition in advance according to the binding requirement, when the specific requirement is screened, whether each candidate device to be bound in the multiple candidate devices to be bound meets the preset binding condition is determined in sequence, and if the candidate device to be bound meets the preset binding condition, the met candidate device to be bound is directly determined as the target device to be bound.
And S203, if the number of the candidate devices to be bound is not more than the preset number, determining the candidate devices to be bound as target devices to be bound.
In this embodiment, if the number of the candidate devices to be bound is not greater than the preset number, it indicates that the device currently requesting active binding does not exceed the capability that the terminal can bind, and at this time, the candidate devices to be bound are directly determined as the target devices to be bound.
According to the binding method, the condition that the binding identifiers of the multiple devices to be bound are the same is considered, and under the condition, the terminal can perform secondary screening on the multiple devices to be bound, so that the devices are bound accurately.
In an embodiment, a specific implementation manner of the foregoing S202 is provided, and as shown in fig. 4, the implementation manner includes:
and S301, measuring the signal strength between the candidate devices to be bound and each other.
When the number of the candidate devices to be bound determined by the terminal is greater than the preset number, the terminal may further measure the signal strength between the terminal and each candidate device to be bound, which may be specifically determined according to each received broadcast message. If the signal strength between the terminal and the candidate device to be bound is higher, the distance between the terminal and the candidate device to be bound is shorter, and the binding can be preferentially considered; if the signal strength between the terminal and the candidate device to be bound is small, it indicates that the distance between the terminal and the candidate device to be bound is long, and the binding may not be considered.
S302, determining the candidate device to be bound with the signal strength greater than the preset signal strength threshold value as the target device to be bound.
The preset signal strength threshold value may be determined by the terminal according to the binding requirement in advance. In this embodiment, when the terminal measures the signal strength between the terminal and the candidate device to be bound, the signal strength may be further compared with a preset signal strength threshold, and the candidate device to be bound whose signal strength is greater than the preset signal strength threshold may be determined as the target device to be bound.
In an embodiment, another specific implementation manner of the foregoing S202 is provided, and as shown in fig. 5, the implementation manner includes:
s401, matching the physical address of each candidate device to be bound with a preset legal physical address.
The legal physical address refers to a pre-registered physical address, belongs to a physical address in a white list, is a physical address which is approved to exist correctly, and can indicate that the corresponding device to be bound is also a legal device. The white list may be obtained in advance by the terminal, in which a plurality of legitimate physical addresses are recorded.
In this embodiment, when the number of the candidate devices to be bound determined by the terminal is greater than the preset number, the terminal may further determine the physical address of each candidate device to be bound, which may be specifically determined according to each received broadcast message. Meanwhile, the terminal can acquire a white list recorded with legal physical addresses, match the physical addresses of the candidate devices to be bound with the legal physical addresses in the white list, and if the matching is successful, the current devices to be bound are legal devices and can be bound; if the matching fails, it indicates that the device to be bound currently needs to be bound is an illegal device and cannot be bound.
S402, determining the candidate device to be bound corresponding to the successfully matched physical address as the target device to be bound.
And if the physical address of the candidate device to be bound is successfully matched with the preset legal physical address, directly determining the candidate device to be bound corresponding to the successfully matched physical address as the target device to be bound. According to the method, the device to be bound is determined by checking whether the physical address of the device is legal or not, so that the safety of the binding process can be improved, and the problem of information leakage caused by binding of illegal devices is avoided.
In practical application, the number of target devices to be bound finally determined by the terminal may also exceed the number that can be bound by the binding capability of the terminal, that is, the number is greater than the preset number. In this embodiment, when the number of the target devices to be bound determined by the terminal is greater than the preset number, the step of executing the step S101 is returned, that is, the step of "receiving the broadcast message sent by at least one device to be bound", and the target devices to be bound are re-determined until the number of the determined target devices to be bound is not greater than the preset number. It should be noted that the preset number in this embodiment is the same as the preset number in the embodiment in fig. 3, and the representative meanings are also the same, and all represent the number of the devices that can be bound corresponding to the binding capability of the terminal.
The embodiments in fig. 2 to fig. 5 are embodiments at a terminal side, and the embodiment in fig. 6 below is an embodiment at a device side to be bound, which is specifically described as follows:
in an embodiment, as shown in fig. 6, a binding method is provided, which is described by taking as an example that the method is applied to any one of the devices to be bound in fig. 1, and includes the following steps:
s501, setting a binding identifier of the device to be bound, and generating a broadcast message carrying a mode identifier.
In this embodiment, the device to be bound may set a field of the binding identifier in the broadcast message in advance, and define that the field represents a binding mode, an unbound mode, or a binding priority. Specifically, the device to be bound may set the mode identifier in the broadcast message by pressing a key or by other operations (such as power-on). For example, when a device to be bound is started, the mode identifier in the broadcast message is set as a "binding mode" by default; after the binding device is started, the mode identifier in the broadcast message can be set to be the binding mode by receiving a mode that a user presses a key. And when the mode identifier in the broadcast message is set by the equipment to be bound, generating the broadcast message carrying the mode identifier. Any setting method of the pattern flag may be adopted, and is not limited herein. S502, sending a broadcast message to the terminal to indicate the terminal to determine the target device to be bound according to the mode identifier in the broadcast message for binding.
In this embodiment, after the device to be bound generates the broadcast message carrying the mode identifier, the broadcast message may be broadcast to indicate that the terminal receiving the broadcast message rapidly binds the device to be bound according to the mode identifier in the broadcast message. For the process of the terminal binding the device to be bound according to the mode identifier in the broadcast message, reference may be specifically made to the description content in the foregoing embodiment of fig. 2, which is not described herein again. In one application, when the device to be bound is started, the mode identifier can be set as a default non-binding mode, when the terminal needs to be bound, the mode identifier can be switched to the binding mode, and then after the binding with the terminal is carried out, the mode identifier can be automatically restored to the default non-binding mode. That is, only when it needs to be bound, the mode flag is set to the binding mode so as not to affect the other device binding process.
In the binding method provided by the above embodiment, the binding identifier of the device to be bound is set, the broadcast message carrying the binding identifier is generated, and the broadcast message is sent to the terminal, so as to instruct the terminal to determine the target device to be bound to perform binding connection according to the binding identifier in the broadcast message. In the method, when a plurality of devices to be bound with the same name exist around the terminal, the terminal can quickly find the devices to be bound for binding through the binding identifiers in the broadcast messages sent by the devices to be bound, so that the terminal and the target devices to be bound can be quickly bound. Moreover, when the user binds the device to be bound, the user does not need to recognize the complex information such as the device address of the device to be bound, the operation difficulty of the user is reduced to a certain extent, only the terminal needs to automatically recognize the binding identifier of the device to be bound, the binding efficiency is greatly improved, possible errors caused when the user manually binds are avoided, and the binding accuracy is further improved.
Optionally, the step of S502 may specifically include: transmitting a broadcast message to a terminal at a first frequency; the first frequency is greater than the other devices to be bound.
The first frequency can be set by the current device to be bound in advance according to actual conditions, and is used for representing the frequency of the current device to be bound for sending the broadcast message. The first frequency is higher than the frequency of other devices to be bound for sending the broadcast messages, so that the terminal can more easily scan the current devices to be bound when the current devices to be bound send the broadcast messages at the first frequency and the other devices to be bound send the broadcast messages at other frequencies. Optionally, the first frequency may also be the same as the frequency at which other devices to be bound transmit broadcast messages.
In this embodiment, when the current device to be bound sets the mode identifier of the device to be bound, and the mode identifier is set as a binding mode or a high-level binding priority, a broadcast message may be sent to the terminal at a first frequency, where the first frequency is higher than the frequency at which other devices to be bound send broadcast messages, so as to improve the speed and probability at which the terminal scans the current device to be bound, and further improve the binding speed between the terminal and the device to be bound. In practical application, after the device to be bound sends the broadcast message for a certain duration (for example, after t time elapses), the mode identifier in the broadcast message may be automatically switched, for example, the mode identifier is a bound mode and is automatically switched to an unbound mode, or the mode identifier is a high-level mode and is switched to a low-level mode, so as to prevent interference caused by identification of the terminal by excessive devices to be bound, and the duration of the mode identifier may be determined by the device to be bound in advance according to an actual situation.
It can be understood that, in all the embodiments described above, the terminal and the device to be bound may be a bluetooth device, the terminal is a bluetooth host, and the device to be bound is a bluetooth slave, and a binding method is provided below by taking a bluetooth device as an example, as shown in fig. 7, the method includes: (the embodiment takes the Bluetooth host as the main execution body)
S601, the Bluetooth host scans and receives broadcast messages of all Bluetooth slave machines in the surrounding area, and determines a first candidate Bluetooth slave machine by identifying an equipment name field in the broadcast messages; the device name of the first candidate Bluetooth slave machine is consistent with the preset device name.
S602, determining whether the number of the first candidate bluetooth slaves is greater than a preset number, if so, performing step S603, and if not, performing step S604.
S603, determining a second candidate Bluetooth slave machine by identifying the mode identification field of each first candidate Bluetooth slave machine; the mode identification of the second candidate bluetooth slave is a binding mode.
And S604, binding and connecting the first candidate Bluetooth slave serving as a target Bluetooth slave.
S605, determining whether the number of the second candidate bluetooth slaves is greater than a predetermined number, if so, performing step S606, and if not, performing step S607.
S606, determining the signal intensity between each second candidate Bluetooth slave machine and the Bluetooth host machine, and determining a third candidate Bluetooth slave machine; the signal intensity between the third candidate Bluetooth slave machine and the Bluetooth host machine is greater than a preset intensity threshold value.
And S607, binding and connecting the second candidate Bluetooth slave as the target Bluetooth slave.
And S608, judging whether the number of the third candidate Bluetooth slave machines is larger than a preset number, if so, executing the step S609, and if not, executing the step S610.
And S609, returning to the step S601, rescanning the Bluetooth slave machines in the surrounding area, and redetermining the target Bluetooth slave machines until the number of the finally determined Bluetooth slave machines needing to be bound is not more than the preset number.
And S610, binding and connecting the third candidate Bluetooth slave as the target Bluetooth slave.
Optionally, the present application further provides another binding method, as shown in fig. 8, the method includes: (the embodiment takes the Bluetooth host as the main execution body)
S701, the Bluetooth host scans and receives broadcast messages of all Bluetooth slave machines in the surrounding area, and determines a first candidate Bluetooth slave machine by identifying the device name field; the device name of the first candidate Bluetooth slave machine is consistent with the preset device name.
S702, judging whether the number of the first candidate Bluetooth slave machines is larger than a preset number, if so, executing the step S703, and if not, executing the step S704.
S703, determining a second candidate Bluetooth slave machine by identifying the mode identification field of each first candidate Bluetooth slave machine; the mode identification of the second candidate bluetooth slave is a binding mode.
And S704, binding and connecting the first candidate Bluetooth slave serving as a target Bluetooth slave.
S705, determining whether the number of the second candidate bluetooth slaves is greater than a preset number, if so, executing step S706, and if not, executing step S707.
S706, determining whether the Bluetooth address of each second candidate Bluetooth slave belongs to a legal Bluetooth address in a white list or not, and determining a third candidate Bluetooth slave; the Bluetooth address of the third candidate Bluetooth slave belongs to a legal Bluetooth address in the white list.
And S707, binding and connecting the second candidate Bluetooth slave serving as the target Bluetooth slave.
S708, determining whether the number of the third candidate bluetooth slaves is greater than a predetermined number, if so, performing step S709, and if not, performing step S710.
And S709, returning to the step S601, rescanning the Bluetooth slave machines in the surrounding area, and re-determining the target Bluetooth slave machines until the number of the finally determined Bluetooth slave machines needing to be bound is not more than the preset number.
And S710, binding and connecting the third candidate Bluetooth slave serving as the target Bluetooth slave.
In the method of the above embodiment, the bluetooth host determines whether the bluetooth slave is a device requesting active binding according to the device name and the mode identifier, and if so, the bluetooth slave can be directly bound, and if not, the bluetooth slave can be rescanned. Compared with the traditional method for binding only by identifying the device name or identifying the complex device address, the binding method provided by the application can realize quick establishment of the binding relationship due to the fact that the mode identification is not complex, reduces the binding complexity, avoids the risk of identification errors caused by identifying complex address information, and greatly improves the binding accuracy.
It should be understood that although the various steps in the flow charts of fig. 2-8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-8 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 9, there is provided a binding apparatus including:
a receiving module 11, configured to receive a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier;
a determining module 12, configured to determine a target device to be bound according to a mode identifier in each broadcast message;
and the binding module 13 is configured to perform binding connection on the target device to be bound.
In one embodiment, as shown in fig. 10, the determining module 12 includes:
a first determining unit 121, configured to determine candidate devices to be bound according to the mode identifier in each broadcast message;
a second determining unit 122, configured to determine, as the target device to be bound, a candidate device to be bound that meets a preset binding condition when the number of the candidate devices to be bound is greater than a preset number;
a third determining unit 123, configured to determine, when the number of the candidate devices to be bound is not greater than the preset number, the candidate devices to be bound as the target devices to be bound.
In one embodiment, as shown in fig. 11, the second determining unit 122 includes:
a measuring sub-unit 1221, configured to measure signal strength between each candidate device to be bound and the corresponding candidate device;
a first determining subunit 1222, configured to determine, as the target device to be bound, a candidate device to be bound whose signal strength is greater than the preset signal strength threshold.
In one embodiment, as shown in fig. 12, the second determining unit 122 includes:
a matching unit 1223, configured to match a physical address of each candidate device to be bound with a preset legal physical address;
a second determining subunit 1224, configured to determine, as the target device to be bound, the candidate device to be bound corresponding to the successfully matched physical address.
In one embodiment, as shown in fig. 13, there is provided a binding apparatus including:
the setting module 21 is configured to set a mode identifier of a device to be bound, and generate a broadcast message carrying the mode identifier;
and a sending module 22, configured to send the broadcast message to a terminal, so as to instruct the terminal to determine, according to the mode identifier in the broadcast message, that a target device to be bound performs binding connection.
In an embodiment, the sending module 22 is specifically configured to send a broadcast message to the terminal at a first frequency; the first frequency is greater than other devices to be bound.
For the specific definition of the binding apparatus, reference may be made to the above definition of the binding method, which is not described herein again. The various modules in the binding apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 14. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The database of the computer device is used for storing broadcast data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a binding method.
Those skilled in the art will appreciate that the architecture shown in fig. 14 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of:
receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier;
determining target equipment to be bound according to the mode identifier in each broadcast message;
and binding and connecting the target equipment to be bound.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
setting a mode identifier of equipment to be bound, and generating a broadcast message carrying the mode identifier;
and sending the broadcast message to a terminal to indicate the terminal to determine the target equipment to be bound to perform binding connection according to the mode identifier in the broadcast message.
The implementation principle and technical effect of the computer device provided by the above embodiment are similar to those of the above method embodiment, and are not described herein again.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier;
determining target equipment to be bound according to the mode identifier in each broadcast message;
and binding and connecting the target equipment to be bound.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
setting a mode identifier of equipment to be bound, and generating a broadcast message carrying the mode identifier;
and sending the broadcast message to a terminal to indicate the terminal to determine target equipment to be bound to perform binding connection according to the mode identifier in the broadcast message.
The implementation principle and technical effect of the computer-readable storage medium provided by the above embodiments are similar to those of the above method embodiments, and are not described herein again.
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 may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of binding, the method comprising:
receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier; the mode identifier is used for indicating whether the device to be bound requests active binding or not, or the mode identifier is used for indicating the binding priority of the device to be bound;
determining target equipment to be bound according to the mode identifier in each broadcast message; when the setting mode identifier of the current device to be bound is a binding mode or a high-level binding priority, the current device to be bound sends a broadcast message at a first frequency, wherein the first frequency is greater than the frequency of other devices to be bound to send the broadcast message;
and binding and connecting the target equipment to be bound.
2. The method of claim 1, wherein the determining the target device to be bound according to the mode identifier in each broadcast message comprises:
determining candidate devices to be bound according to the mode identification in each broadcast message;
if the number of the candidate devices to be bound is greater than the preset number, determining the candidate devices to be bound meeting the preset binding condition as the target devices to be bound;
and if the number of the candidate devices to be bound is not greater than the preset number, determining the candidate devices to be bound as the target devices to be bound.
3. The method according to claim 2, wherein if the number of the candidate devices to be bound is greater than a preset number, determining a candidate device to be bound that meets a preset binding condition as the target device to be bound, includes:
measuring signal strength between the device to be bound and each candidate device to be bound;
and determining the candidate device to be bound with the signal strength greater than the preset signal strength threshold value as the target device to be bound.
4. The method according to claim 2, wherein if the number of the candidate devices to be bound is greater than a preset number, determining a candidate device to be bound that meets a preset binding condition as the target device to be bound, includes:
matching the physical address of each candidate device to be bound with a preset legal physical address;
and determining the candidate device to be bound corresponding to the successfully matched physical address as the target device to be bound.
5. The method according to claim 2, wherein before performing binding connection on the target device to be bound if the number of the target devices to be bound is greater than the preset number, the method further comprises:
and returning to the step of receiving the broadcast message sent by at least one device to be bound until the determined number of the target devices to be bound is not greater than the preset number.
6. A method of binding, the method comprising:
setting a mode identifier of equipment to be bound, and generating a broadcast message carrying the mode identifier; the mode identifier is used for indicating whether the device to be bound requests active binding or not, or the mode identifier is used for indicating the binding priority of the device to be bound;
sending the broadcast message to a terminal to indicate the terminal to determine a target device to be bound to perform binding connection according to a mode identifier in the broadcast message; when the setting mode identifier of the current device to be bound is a binding mode or a high-level binding priority, the current device to be bound sends a broadcast message at a first frequency, and the first frequency is greater than the frequency of other devices to be bound to send the broadcast message.
7. The method of claim 6, further comprising:
and when the equipment to be bound transmits the broadcast message for a preset time, automatically switching the mode identifier in the broadcast message.
8. A binding apparatus, the apparatus comprising:
the receiving module is used for receiving a broadcast message sent by at least one device to be bound; the broadcast message comprises a mode identifier; the mode identifier is used for indicating whether the device to be bound requests active binding or not, or the mode identifier is used for indicating the binding priority of the device to be bound;
the determining module is used for determining target equipment to be bound according to the mode identifier in each broadcast message; when the setting mode identifier of the current device to be bound is a binding mode or a high-level binding priority, the current device to be bound sends a broadcast message at a first frequency, wherein the first frequency is greater than the frequency of other devices to be bound to send the broadcast message;
and the binding module is used for binding and connecting the target equipment to be bound.
9. A binding apparatus, the apparatus comprising:
the device comprises a setting module, a binding module and a sending module, wherein the setting module is used for setting a mode identifier of equipment to be bound and generating a broadcast message carrying the mode identifier; the mode identifier is used for indicating whether the device to be bound requests active binding or not, or the mode identifier is used for indicating the binding priority of the device to be bound;
the sending module is used for sending the broadcast message to a terminal so as to indicate the terminal to determine target equipment to be bound to perform binding connection according to the mode identifier in the broadcast message; when the setting mode identifier of the current device to be bound is a binding mode or a high-level binding priority, the current device to be bound sends a broadcast message at a first frequency, and the first frequency is greater than the frequency of other devices to be bound to send the broadcast message.
10. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
CN202011600525.0A 2020-12-29 2020-12-29 Binding method and device and computer equipment Active CN112804651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011600525.0A CN112804651B (en) 2020-12-29 2020-12-29 Binding method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011600525.0A CN112804651B (en) 2020-12-29 2020-12-29 Binding method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN112804651A CN112804651A (en) 2021-05-14
CN112804651B true CN112804651B (en) 2022-09-27

Family

ID=75805699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011600525.0A Active CN112804651B (en) 2020-12-29 2020-12-29 Binding method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN112804651B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113573289B (en) * 2021-06-30 2024-03-26 杭州博联智能科技股份有限公司 Method and system for adding devices to Bluetooth-based client
CN114785541B (en) * 2022-03-10 2024-03-22 青岛海尔科技有限公司 Binding method and device of equipment, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104902435A (en) * 2015-04-21 2015-09-09 北京云迹科技有限公司 Mobile terminal, and mobile terminal and Bluetooth wristband binding method and device
CN110645611A (en) * 2019-09-26 2020-01-03 佛山市顺德区美的洗涤电器制造有限公司 Control method, control device, system and storage medium for range hood

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8104066B2 (en) * 2008-10-23 2012-01-24 Sony Corporation User identification and prioritization using Bluetooth
CN104184501B (en) * 2014-08-28 2018-04-03 北京睿仁医疗科技有限公司 A kind of matching method of low-power consumption bluetooth clinical thermometer
CN106102184B (en) * 2016-07-15 2020-05-22 杭州赫智电子科技有限公司 System and method for managing binding connection of Bluetooth equipment
CN107708095A (en) * 2017-09-05 2018-02-16 上海斐讯数据通信技术有限公司 Mobile terminal, wearable device and the two connection, matching method
CN107801174A (en) * 2017-11-09 2018-03-13 广东小天才科技有限公司 A kind of apparatus bound method and apparatus
CA3050676A1 (en) * 2018-07-27 2020-01-27 Comcast Cable Communications, Llc Ssid broadcast management to support priority of broadcast
CN110971495B (en) * 2019-10-24 2021-12-24 青岛海尔科技有限公司 Equipment binding method and device of intelligent household system and storage medium
CN111629366B (en) * 2020-04-27 2023-06-09 Oppo(重庆)智能科技有限公司 Interaction method and device between Bluetooth devices, storage medium and electronic device
CN111615090B (en) * 2020-04-27 2023-07-14 Oppo(重庆)智能科技有限公司 Interaction method and device between Bluetooth devices, storage medium and electronic device
CN111543864A (en) * 2020-05-20 2020-08-18 珠海优特智厨科技有限公司 Method and device for binding cookware and cooker and cooking system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104902435A (en) * 2015-04-21 2015-09-09 北京云迹科技有限公司 Mobile terminal, and mobile terminal and Bluetooth wristband binding method and device
CN110645611A (en) * 2019-09-26 2020-01-03 佛山市顺德区美的洗涤电器制造有限公司 Control method, control device, system and storage medium for range hood

Also Published As

Publication number Publication date
CN112804651A (en) 2021-05-14

Similar Documents

Publication Publication Date Title
US10660024B2 (en) Wireless network access method and apparatus
CN112804651B (en) Binding method and device and computer equipment
US10104700B2 (en) Message processing method, MME selection method, and apparatuses
US10051585B2 (en) Methods, apparatuses and computer program products for providing temporal information
EP2509389A1 (en) Connecting electronic apparatuses in proximity having a same community relationship
EP3755091A1 (en) Indication method for secondary link data, and terminal device
US20170126556A1 (en) Information transmission method and apparatus, device and storage medium
EP2134139A2 (en) Base station, user equipment and set-up method
CN112788545A (en) Binding method, computer device and storage medium
CN109040050A (en) Data interactive method and Related product
CN106658503B (en) Registration method and device for mobile terminal to access LTE data network
CN113055933A (en) Cell access method, user equipment and base station
US20160323744A1 (en) Authentication and association method and system
CN111192661A (en) Method and system for acquiring medical electronic film
CN113472457B (en) Antenna anomaly detection method and device, computer equipment and storage medium
CN113163416B (en) Message processing method, device, base station and storage medium
CN108271230A (en) A kind of method and device for obtaining mobile management information, computer readable storage medium
CN113613226A (en) Connection method and device of Bluetooth equipment, electronic equipment and storage medium
CN112188591A (en) Network access method, device, computer equipment and storage medium
EP3637859B1 (en) Hidden hotspot scanning based on a match of mac addresses
CN113286358B (en) Network registration method, device, terminal and computer readable storage medium
CN116600250B (en) Network access mode determining method, device, equipment, medium and product
CN115102638B (en) Information acquisition method, device, electronic equipment and storage medium
CN110708151B (en) Carrier aggregation method and device
CN113242541B (en) Network registration method and device, electronic equipment and storage medium

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