[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114286322A - Pairing method and device, electronic equipment and storage medium - Google Patents

Pairing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114286322A
CN114286322A CN202111601682.8A CN202111601682A CN114286322A CN 114286322 A CN114286322 A CN 114286322A CN 202111601682 A CN202111601682 A CN 202111601682A CN 114286322 A CN114286322 A CN 114286322A
Authority
CN
China
Prior art keywords
list
device tag
tag
electronic accessory
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111601682.8A
Other languages
Chinese (zh)
Inventor
郭富祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111601682.8A priority Critical patent/CN114286322A/en
Publication of CN114286322A publication Critical patent/CN114286322A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a pairing method, a pairing device, electronic equipment and a computer readable storage medium, wherein the pairing method is applied to the electronic equipment and comprises the steps of obtaining a first equipment label list and obtaining a second equipment label list, wherein the first equipment label list is a list formed by equipment labels obtained by the electronic equipment when the equipment labels of target electronic accessories are in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in an unavailable state; determining a target device tag in device tags which are located in the first device tag list and are outside the second device tag list, wherein the target device tag is a device tag of a target electronic accessory; and carrying out pairing connection on the target electronic accessory corresponding to the target equipment label. The method and the device can improve the matching accuracy between the electronic equipment and the target electronic accessory.

Description

Pairing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a pairing method, a pairing apparatus, an electronic device, and a computer-readable storage medium.
Background
At present, with higher and higher requirements on portability and function compatibility of electronic equipment, a method of matching and using a target electronic accessory and the electronic equipment after the target electronic accessory is matched with the electronic equipment is more and more. After the target electronic accessory is matched with the electronic equipment, the function is added to the electronic equipment, and the size of the electronic equipment is not increased. In the process of pairing the electronic device and the target electronic accessory, the electronic device is easily interfered by other target electronic accessories of the same type in the environment, and pairing judgment is influenced. Therefore, how to improve the pairing accuracy between the electronic device and the target electronic accessory becomes a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a pairing method, a pairing device, an electronic device and a computer-readable storage medium, which can improve the pairing accuracy between the electronic device and a target electronic accessory.
In a first aspect, an embodiment of the present application provides a pairing method, applied to an electronic device, including:
the method comprises the steps of obtaining a first equipment label list and a second equipment label list, wherein the first equipment label list is a list formed by equipment labels obtained by the electronic equipment when the equipment labels of target electronic accessories are in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in a non-acquirable state;
determining a target device tag from the device tags in the first device tag list and out of the second device tag list, wherein the target device tag is a device tag of the target electronic accessory;
and the target electronic accessory corresponding to the target equipment label is connected in a pairing mode.
In a second aspect, an embodiment of the present application provides a pairing apparatus, including:
the electronic equipment comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a first equipment label list and a second equipment label list, and the first equipment label list is a list formed by equipment labels acquired by the electronic equipment when an equipment label of a target electronic accessory is in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in a non-acquirable state;
a determining module, configured to determine a target device tag from device tags located in the first device tag list and outside the second device tag list, where the target device tag is a device tag of the target electronic accessory;
and the pairing module is used for carrying out pairing connection with the target electronic accessory corresponding to the target equipment label.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to perform the steps of the pairing method according to the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the method according to the first aspect.
According to the pairing method, a first device tag list and a second device tag list are obtained, wherein the first device tag list is a list formed by device tags obtained by electronic equipment when a device tag of a target electronic accessory is in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in a non-acquirable state; determining a target device tag from the device tags in the first device tag list and out of the second device tag list, wherein the target device tag is a device tag of the target electronic accessory; the target electronic accessory corresponding to the target equipment label is connected in a pairing mode; compared with the method that the target equipment label is in the first equipment label list when the equipment label of the target electronic accessory is in the acquirable state and the second equipment label list when the equipment label of the target electronic accessory is not in the acquirable state, the method has the advantages that the accuracy of the equipment label taking the target equipment label as the target electronic accessory is improved by further verifying the equipment label in the second equipment label list when the equipment label of the first equipment label list is directly taken as the target equipment label, and the pairing accuracy of the electronic equipment and the target electronic accessory needing to be paired in one-to-one correspondence is improved. The pairing device, the electronic device and the computer-readable storage medium provided by the application can be used for pairing the electronic device and the target electronic accessory one by one based on the method, and have high pairing accuracy.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an application environment diagram of a pairing method provided in an embodiment of the present application;
fig. 2 is a flowchart of a pairing method according to a first embodiment of the present application;
FIG. 3 is a flow chart of a pairing method according to a second embodiment of the present application;
FIG. 4 is a flowchart of step 230 of FIG. 3;
fig. 5 is a first application scenario diagram of a pairing method according to a second embodiment of the present application;
fig. 6 is a second application scenario diagram of a pairing method according to a second embodiment of the present application;
fig. 7 is a flowchart of a pairing method according to a third embodiment of the present application;
FIG. 8 is a flow chart of another pairing method provided in the third embodiment of the present application;
FIG. 9 is a flow chart of a pairing method according to a fourth embodiment of the present application;
FIG. 10 is a flowchart of step 500 in FIG. 9;
fig. 11 is a scene diagram of the second candidate device tag number in step 503 in fig. 10 being 1;
fig. 12 is a scene diagram of the second candidate device tags in step 503 in fig. 10, where the number of the second candidate device tags is 0;
fig. 13 is a scene diagram of the second candidate device tags in step 503 in fig. 10, where the number of the second candidate device tags is 2;
fig. 14 is a block diagram illustrating a pairing apparatus according to an embodiment of the present disclosure;
fig. 15 is an internal block diagram of an electronic device and an electronic accessory provided in 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. Furthermore, reference in the specification to "an embodiment" or "an implementation" means that a particular feature, structure, or characteristic described in connection with the embodiment or implementation can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, signals, but these elements, signals are not limited by these terms. These terms are only used to distinguish one element from another.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application environment of a pairing method between devices according to an embodiment. As shown in fig. 1, the application environment includes at least one electronic device 100 and at least one electronic accessory 200 (e.g., three electronic accessories 200a, 200b, and 200c shown in fig. 1). After electronic device 100 establishes a one-to-one pairing connection with electronic accessory 200, electronic device 100 may send a control command to electronic accessory 200 over the established pairing connection to interact with other devices through electronic accessory 200. Take the example where the electronic accessory 200 has an ultra wideband antenna module. The application environment can also comprise the Internet of things equipment, the ultra-wide band tag or the Internet of things equipment with the built-in ultra-wide band tag. The internet of things device communicates with the ultra-wideband antenna module of the electronic accessory 200 through the ultra-wideband tag through a network. Therefore, after the electronic device 100 establishes the pairing connection with the electronic accessory 200, the electronic device 100 can perform positioning search, remote control operation, and the like on the internet of things device through the electronic accessory 200. The electronic device 100 includes, but is not limited to, various smart phones, tablet computers, portable wearable devices, and the like. The electronic accessory 200 includes, but is not limited to, various wearable cases with ultra-wideband antenna modules, wearable patches, etc., and the electronic accessory 200 is wearable on the electronic device 100. The ultra-wide band tag can be hung outside or attached to the Internet of things equipment. The internet of things equipment can be but is not limited to various intelligent household equipment, including air conditioners, fans, sweeping robots, televisions, table lamps and the like.
When the number of the electronic devices 100 and the electronic accessories 200 in the application environment is plural, it is difficult for the electronic devices 100 to establish accurate connections with the electronic accessories 200 in a one-to-one correspondence. Based on the above problems, the present embodiment provides a pairing method capable of improving the pairing accuracy between the electronic device 100 and the electronic accessory 200.
Referring to fig. 2, fig. 2 is a flowchart illustrating a pairing method according to a first embodiment of the present application. The pairing method in this embodiment is described by taking the electronic device 100 in fig. 1 as an example. Referring to fig. 1 in combination, as shown in fig. 2, the pairing method at least includes steps 110 to 130.
Step 110: and acquiring a first device label list and a second device label list. The first device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state. The second device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an unacquirable state. The target electronic accessory 200a is the electronic accessory 200 worn on the electronic device 100.
In the present application, the electronic device 100 includes, but is not limited to, a smart phone, a tablet computer, and a wearable device. The electronic accessory 200 includes, but is not limited to, an article having a function (e.g., UWB functionality) that can be attached, worn, hung, or connected to the electronic device 100 during use. The article can be in the form of a wearing shell, a patch, a hanging ornament and the like, and a UWB chip is arranged in the wearing shell (the patch and the hanging ornament) to realize the UWB function. For example, a mobile phone case with a built-in UWB chip may be worn on the mobile phone. It is understood that the form of the electronic accessory 200 in the present application includes, but is not limited to, a wearing case, a patch, a pendant, etc., as long as the electronic accessory can be connected to the electronic device 100, and the form is not limited thereto.
When the number of the electronic devices 100 and the electronic accessories 200 in the short-distance environment (or the small-range environment) is multiple, the electronic accessories 200 of the same type all broadcast their device tags, and it is difficult for the electronic device 100 to identify the target electronic accessory 200a connected to the electronic device among the device tags, and thus it is difficult for the electronic device 100 to establish an accurate one-to-one correspondence with the connected electronic accessories 200.
The present application takes the electronic device 100 as a mobile phone, the electronic accessory 200 as a mobile phone shell, and the electronic device 100 needs to be paired with the mobile phone shell worn thereon one by one as an example.
In this embodiment, the device tag of the electronic accessory 200 has at least two different states. Wherein the device tag is used to identify the unique device. For example, different electronic accessories 200 have different device tags. The device tag in the present application is the authentication information of the electronic accessory 200, for example, the device tag may be a character string, a binary field, or customized tag information.
The device tag of the electronic accessory 200 includes a retrievable state or a non-retrievable state. The acquirable state of the device tag of the electronic accessory 200 is a state in which the device tag of the electronic accessory 200 can be acquired by an external device, for example, the device tag of the electronic accessory 200 is paired broadcast information, and is broadcast through a broadcast channel by a low power consumption device such as a bluetooth module. The paired broadcast information refers to that the equipment periodically sends message information in the broadcast according to a preset protocol. For example, each time the electronic accessory 200 broadcasts, the same message may be sent on a different broadcast channel, referred to as a broadcast event. The broadcasting interval between the adjacent two broadcasting events may be "several microseconds to several tens of milliseconds", etc., without being limited to this data. The electronic device 100 may receive the message information, i.e., obtain the device tag of the electronic accessory 200, by scanning the broadcast channel. At this time, the device tag of the electronic accessory 200 is in an accessible state.
The unavailable state of the device tag of the electronic accessory 200 is a state in which the device tag of the electronic accessory 200 cannot be acquired by the external device, for example, the electronic accessory 200 no longer broadcasts the pairing broadcast information with the device tag through a broadcast channel to a low power consumption device such as a bluetooth module; or, for example, the device tag in the broadcast information is hidden, and the electronic device 100 cannot obtain the device tag of the electronic device 200 by scanning the broadcast channel. At this time, the device tag of the electronic accessory 200 is in an inaccessible state.
The electronic apparatus 100 scans pairing broadcast information in at least two different states of the apparatus tag of the electronic accessory 200 (i.e., the target electronic accessory 200a) worn thereon, respectively. When the device tag of the target electronic accessory 200a is in an acquirable state, the electronic device 100 forms a list of the scanned device tags in the paired broadcast information, where the list is defined as a first device tag list. Optionally, the number of device tags in the first device tag list may be 0, 1 or more. When the number of the device tags in the first device tag list is multiple, the arrangement order of the multiple device tags is not limited in the present application, and for example, the multiple device tags may be arranged in sequence according to the strength of the signal, or in sequence according to the scanned time sequence.
When the device tag of the target electronic accessory 200a is in the unavailable state, the electronic device 100 forms a list with the scanned device tags in the paired broadcast information, where the list is defined as a second device tag list. For example, the scanning time of the second device tag list may occur before the scanning time of the first device tag list, or the scanning time of the second device tag list may occur after the scanning time of the first device tag list. Optionally, the number of device tags in the second device tag list may be 0, 1 or more. When the number of the device tags in the second device tag list is multiple, the arrangement order of the multiple device tags is not limited in the present application, and for example, the multiple device tags may be arranged in sequence according to the strength of the signal, or in sequence according to the scanned time sequence.
Optionally, the electronic device 100 may display the scanned first device tag list on a screen to present scanning result information of the scanning stage. Of course, in other embodiments, the electronic device 100 may also directly perform pairing connection with the target electronic accessory 200a without displaying the first device tag list on the screen.
Step 120: determining a target device tag from the device tags located in the first device tag list and outside the second device tag list, wherein the target device tag is a device tag of the electronic accessory 200.
After obtaining the first device tag list and the second device tag list, the electronic device 100 searches for the device tags in the first device tag list, compares the device tags in the first device tag list with the device tags in the second device tag list, determines the device tags that belong to the first device tag list and do not belong to the second device tag list as first device tags to be selected, and determines target device tags in the first device tags to be selected, where the target device tags are device tags of the target electronic accessory 200 a.
For example, if the first device tag list is A, B, C, D, E and the second device tag list is C, D, E, A, B in the first device tag list is determined as the first candidate device tag, so as to subsequently determine the device tag of the target electronic accessory 200a in the first candidate device tag.
When the device tag of the target electronic accessory 200a is in the acquirable state, the electronic device 100 may acquire the device tag of the target electronic accessory 200a, and then the device tag of the target electronic accessory 200a may appear in the first device tag list. When the device tag of the target electronic accessory 200a is in the non-acquirable state, the electronic device 100 may not acquire the device tag of the target electronic accessory 200a, and then the device tag of the target electronic accessory 200a may not appear in the second device tag list, so that the device tag of the target electronic accessory 200a is in the device tags located in the first device tag list and outside the second device tag list. The device tag of the target electronic accessory 200a can be quickly and accurately acquired by facilitating the exclusion of the device tags of the other electronic accessories 200 in the above manner.
Step 130: the electronic accessory 200 corresponding to the target device tag is paired and connected.
After the electronic device 100 acquires the target device tag, since the target device tag is the device tag of the target electronic accessory 200a, and the electronic device 100 is connected in a pairing manner through the electronic accessory 200 corresponding to the target device tag, the electronic device 100 and the target electronic accessory 200a can be paired, interference of other electronic accessories 200 is avoided, accurate one-to-one pairing of the electronic device 100 and the electronic accessory 200 is realized, and the electronic device 100 and the electronic accessory 200 establish communication connection.
According to a preset protocol or rule, when the scanned target device tag meets a preset rule or matching condition, the electronic device 100 establishes communication connection with a device corresponding to the target device tag. After establishing a communication connection between the electronic device 100 and the electronic accessory 200, all data communication is performed in a connection event.
Optionally, the electronic device 100 may display the scanned target device tag on a screen to present scanning result information of the scanning stage. Of course, in other embodiments, the electronic device 100 may also directly perform pairing connection with the electronic accessory 200 corresponding to the target device tag without displaying the target device tag on the screen, and then display the pairing result.
In the pairing method provided by the embodiment of the application, a first device tag list and a second device tag list are obtained, where the first device tag list is a list formed by device tags obtained by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an unacquirable state; determining a target device tag from the device tags in the first device tag list and out of the second device tag list, wherein the target device tag is the device tag of the target electronic accessory 200 a; the electronic accessory 200 corresponding to the target device tag is connected in a pairing mode; compared with the method in which the target device tag determined by the method exists in the first device tag list in which the device tag of the target electronic accessory 200a is in the acquirable state and the second device tag list in which the device tag of the target electronic accessory 200a is not in the acquirable state, the method in the present invention allows the device tag of the other target electronic accessory 200a to be excluded by performing further verification in the second device tag list, thereby avoiding interference of the other target electronic accessory 200a, increasing the accuracy of the device tag of the target electronic accessory 200a as the target device tag, and further improving the one-to-one matching accuracy of the electronic device 100 and the target electronic accessory 200a to be paired.
Referring to fig. 3, fig. 3 is a flowchart illustrating a pairing method according to a second embodiment of the present application. The pairing method in this embodiment is described by taking the electronic device 100 in fig. 1 as an example. As shown in fig. 3, the pairing method at least includes steps 210 to 240.
Step 210: and acquiring a first device label list and a second device label list. The first device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state. The second device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an unacquirable state. Wherein the target electronic accessory 200a is the electronic accessory 200 worn on the electronic device 100.
This step may refer to step 110 in the pairing method provided in the first embodiment, and is not described again in this step.
Step 220: and acquiring a third device label list. The third device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state.
In this embodiment, after the electronic device 100 acquires the first device tag list and the second device tag list, the electronic device 100 performs scanning pairing broadcast information again. When the device tag of the target electronic accessory 200a is in an acquirable state, the electronic device 100 scans the device tags in the obtained pairing broadcast information again to form a list, which is defined as a third device tag list.
Alternatively, the scan time of the second device tag list may occur after the scan time of the first device tag list. That is, the electronic device 100 first performs a first scan when the device tag of the target electronic accessory 200a is in an acquirable state, and arranges the device tags obtained by the first scan to form a first device tag list. The electronic device 100 then performs a second scan with the device tag of the target electronic accessory 200a in an unobtainable state, and arranges the device tags obtained by the second scan to form a second device tag list. The electronic device 100 again performs the third scanning when the device tag of the target electronic accessory 200a is in the acquirable state, and arranges the device tags obtained by the third scanning to form a third device tag list.
Step 230: determining a target device tag from the device tags in the first device tag list, the third device tag list and the device tags outside the second device tag list, wherein the target device tag is the device tag of the target electronic accessory 200 a.
Optionally, referring to fig. 4, step 230 includes at least the following steps 231-235.
Step 231: and obtaining a first to-be-selected device tag from the device tags in the first device tag list, wherein the first to-be-selected device tag is obtained by deleting the device tag in the second device tag list from the device tags in the first device tag list.
After obtaining the first device tag list, the second device tag list and the third device tag list, the electronic device 100 searches for the device tags in the first device tag list, compares the device tags in the first device tag list with the device tags in the second device tag list, and determines the device tags that belong to the first device tag list and do not belong to the second device tag list as the first device tags to be selected. Namely, the first to-be-selected device tag is obtained after the device tag in the second device tag list is deleted from the first device tag list.
For example, if the first device tag list is A, B, C, D, E and the second device tag list is C, D, E, A, B in the first device tag list is determined as the first candidate device tag, so as to subsequently determine the device tag of the target electronic accessory 200a in the first candidate device tag.
Step 232: and acquiring a second to-be-selected device label from the first to-be-selected device label, wherein the second to-be-selected device label is the same as the first to-be-selected device label in the third device label list.
And comparing the first equipment label to be selected with the equipment labels in the third equipment label list, and determining the equipment label in the third equipment label list, which is the same as the first equipment label to be selected, as a second equipment label to be selected.
For example, if the first device tag list is A, B, C, D, E and the second device tag list is C, D, E, then A, B in the first device tag list is determined to be the first candidate device tag. Optionally, the third device tag list is A, C, D, E, where a device tag in the third device tag list that is the same as the first device tag to be selected is a, and then a is the second device tag to be selected.
Step 233: and judging whether the number of the second equipment labels to be selected is 1.
Step 234: and if the number of the second to-be-selected device tags is 1, determining that the second to-be-selected device tags are target device tags.
Optionally, the third device tag list is A, C, D, E, the first candidate device tag is A, B, and the second candidate device tag is a. And if the number of the second to-be-selected device tags is 1, determining that the second to-be-selected device tag A is a target device tag.
Step 235: and if the number of the second equipment labels to be selected is judged to be 0 or more than 1, prompting that the pairing is failed.
Optionally, the first candidate device tag is A, B, the third device tag list is C, D, E, and the second candidate device tag is null. If the number of the second candidate device tags is 0, a failure in pairing is prompted, or the target electronic accessory 200a is prompted to be not found, for example, "pairing device not found" is displayed on the screen of the electronic device 100.
Optionally, the first candidate device tag is A, B, the third device tag list is A, B, C, D, E, and the second candidate device tag is A, B. If the number of the second candidate device tags is 2, it indicates that the plurality of electronic accessories 200 are scanned, for example, the plurality of mobile phone shells are scanned, but the mobile phone shells and the mobile phones are in one-to-one correspondence, and obviously, the plurality of electronic accessories 200 cannot meet the one-to-one correspondence between the electronic device 100 and the electronic accessories 200 when scanned, and the target electronic accessory 200a cannot be determined, so that a failure in pairing is prompted, or the plurality of electronic accessories 200 are prompted to be scanned, for example, "equipment cannot be determined to be paired" is displayed on the screen of the electronic device 100.
Step 240: and the target electronic accessory 200a corresponding to the target equipment label is connected in a pairing mode.
In this step, reference may be made to step 130 in the pairing method provided in the first embodiment, and details in this step are not repeated.
The pairing method provided by the embodiment of the application can be applied to the following application scenarios:
referring to fig. 5, in a nearby application environment, there are a plurality of electronic devices 100 and a plurality of electronic accessories 200, for example, there are 2 mobile phones and 2 smart phone shells respectively sleeved on the two mobile phones. Respectively denoted as handset 1, handset 2, handset housing 1, and handset housing 2. The handset 2 is paired with the handset housing 2. In the process of pairing the mobile phone 1 and the mobile phone shell 1, when the device tag of the mobile phone shell 1 is in an acquirable state, the mobile phone 1 acquires a first device tag list, wherein the first device tag list includes the device tag of the mobile phone shell 1 and the device tag of the mobile phone shell 2. The mobile phone 1 acquires the second device tag list when the device tag of the mobile phone case 1 is in the non-acquirable state, wherein the second device tag list includes the device tag of the mobile phone case 2 because the device tag of the mobile phone case 1 is not acquirable. Then the first device label to be selected is the device label of the handset housing 1. When the device tag of the mobile phone case 1 is in the non-acquirable state, the mobile phone 1 acquires the third device tag list, where the third device tag list includes the device tag of the mobile phone case 1 and the device tag of the mobile phone case 2. Then the second candidate device tag is the device tag of the handset housing 1. And then, according to the number of the second candidate device tags being 1, determining that the device tag of the mobile phone shell 1 is the target device tag, and the mobile phone shell 1 is the target electronic accessory 200 a.
Referring to fig. 6, in a nearby application environment, there are a plurality of electronic devices 100 and a plurality of electronic accessories 200, for example, there are 2 mobile phones and 2 smart phone shells respectively sleeved on the two mobile phones. Respectively denoted as handset 1, handset 2, handset housing 1, and handset housing 2. The handset 2 is paired with the handset housing 2. In the process of pairing the mobile phone 1 and the mobile phone shell 1, when the device tag of the mobile phone shell 1 is in an acquirable state, the mobile phone 1 acquires a first device tag list, wherein the first device tag list includes the device tag of the mobile phone shell 1 and the device tag of the mobile phone shell 2. When the device tag of the mobile phone case 1 is in the non-acquirable state, the mobile phone 1 acquires the second device tag list. If the device tag of the mobile phone shell 2 is also in the non-acquirable state at this time, for example, the mobile phone shell 2 does not work any more, wherein the second device tag list is empty because the device tag of the mobile phone shell 1 is not acquirable. Then, the first device labels to be selected are the device label of the handset case 1 and the device label of the handset case 2. The device label at the mobile phone shell 1 is in the non-acquirable state, and the mobile phone 1 acquires the third device label list, and since the mobile phone shell 2 no longer works, the mobile phone shell 2 is in the non-acquirable state at this moment, wherein, the third device label list includes the device label of the mobile phone shell 1. Then the second candidate device tag is the device tag of the handset housing 1. And then, according to the number of the second candidate device tags being 1, determining that the device tag of the mobile phone shell 1 is the target device tag, and the mobile phone shell 1 is the target electronic accessory 200 a.
The number of the mobile phones and the mobile phone shells is only an example, and of course, in other embodiments, the number of the mobile phones and the number of the mobile phone shells may be other numbers.
In the pairing method provided in the embodiment of the present application, through three scans, a first device tag list of a target electronic accessory 200a in an acquirable state, a second device tag list of the target electronic accessory 200a in an unobtainable state, and a third device tag list of the target electronic accessory 200a in an acquirable state are obtained, a target device tag is determined among device tags located in the first device tag list, the third device tag list and outside the second device tag list, and the electronic accessory 200 corresponding to the target device tag is paired and connected, by the above method, interference of the electronic accessory 200 whose other device tags are in an acquirable state can be effectively eliminated, interference of other target electronic accessories 200a is avoided, so as to increase accuracy of the device tag of the target electronic accessory 200a, thereby improving the one-to-one matching accuracy of the electronic device 100 and the target electronic accessory 200a to be matched. Compared with the method provided by the first embodiment, the method provided by the present application can further improve the one-to-one pairing accuracy of the electronic device 100 and the target electronic accessory 200a to be paired, for the case that the device tag becomes in the non-acquirable state after the other electronic accessory 200 stops working during the process of determining the target electronic accessory 200a, particularly during the process of acquiring the second device tag list, and in this case, the other electronic accessory 200 interferes with the determination process of the target electronic accessory 200 a.
It should be noted that, the three times of scanning and three times of acquiring the device tag list in this embodiment are only examples, and the scanning times and the acquiring times of the device tag list of the electronic device 100 are not specifically limited in this application. For example, in other embodiments, four scans, five scans, and so on may also be performed. In the process of performing the multiple scans, the device tag of the target electronic accessory 200a is set in the non-acquirable state, and the acquirable states alternate.
Referring to fig. 7, fig. 7 is a flowchart illustrating a pairing method according to a third embodiment of the present application. The pairing method in this embodiment is described by taking the electronic device 100 in fig. 1 as an example. As shown in fig. 7, the pairing method at least includes steps 310 to 360. The embodiment is an implementation manner for acquiring a first device tag list and acquiring a second device tag list provided by the present application. Of course, this embodiment can also be combined with the second embodiment to form a new embodiment.
Step 310: in response to a trigger operation, sending a first indication signal to the target electronic accessory 200a, where the first indication signal is used to instruct the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state. The target electronic accessory 200a is the electronic accessory 200 worn on the electronic device 100.
Electronic device 100 responds to a user-triggered operation when electronic accessory 200 is worn on electronic device 100. The user-triggered operation includes, but is not limited to, an operation performed for a user, and may trigger a trigger event in the electronic device 100, that is, a screen Input event (Input event). The trigger events may include a click event, a touch event, a slide event, and the like, that is, the user may perform different trigger operations on the electronic device 100, such as a tap operation, a click operation, a slide operation, a long-press operation, and a pan-and-pan trigger operation.
For example, after the electronic accessory 200 is worn on the electronic device 100, the user may enter an application program, the application program displays a floating window for the user to operate whether to pair with the electronic accessory 200 (mobile phone shell), and the electronic device 100 receives a click operation of the user on a "yes" virtual key in the floating window and sends a first indication signal to the target electronic accessory 200a in response to a user trigger operation. The first indication signal includes, but is not limited to, a current signal, a voltage signal, an electromagnetic wave signal, and the like. In the embodiment of the present application, the first indication signal is taken as the first voltage signal as an example. The first indication signal is used to instruct the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state. The target electronic accessory 200a includes a device tag broadcasting module, and the device tag broadcasting module is configured to broadcast a device tag of the target electronic accessory 200 a. For example, the device tag broadcast module includes, but is not limited to, a bluetooth module, a Wi-Fi module, and the like. The present application takes the device tag broadcasting module as an example of a bluetooth module for illustration. The electronic device 100 sends a first indication signal (a first voltage signal) to the target electronic accessory 200a in response to a user trigger operation, where the first indication signal is used to power the target electronic accessory 200a and indicate that the bluetooth module is turned on and broadcasts the device tag of the target electronic accessory 200a, or is used to indicate that the bluetooth module in an operating state starts broadcasting the device tag of the target electronic accessory 200a, or is used to indicate that the device tag of the target electronic accessory 200a broadcasted by the bluetooth module is converted from a hidden unacquirable state to a publicly acquirable state.
Step 320: and scanning the device labels, and forming a first device label list by using the scanned device labels. The first device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state.
The device tag broadcasting module may send a first feedback signal to the electronic device 100 after broadcasting the device tag of the target electronic accessory 200a, and the electronic device 100 scans the broadcast channel after receiving the first feedback signal and forms a first device tag list with the scanned device tag. Of course, in other embodiments, the electronic device 100 may also wait for the first preset time period after sending the first indication signal to the target electronic accessory 200a, and then scan the device tag. During the first preset time period, the device tag broadcasting module broadcasts the device tag of the target electronic accessory 200 a.
The first device tag list obtained above includes the device tag of the target electronic accessory 200 a.
Step 330: and sending a second indication signal to the target electronic accessory 200a, where the second indication signal is used to indicate the target electronic accessory 200a to stop broadcasting the device tag, so that the device tag of the target electronic accessory 200a is in an unavailable state.
The electronic device 100 sends a second indication signal to the target electronic accessory 200a after forming the first device tag list. The second indication signal includes, but is not limited to, a current signal, a voltage signal, an electromagnetic wave signal, and the like. In the embodiment of the present application, the second indication signal is taken as the second voltage signal as an example. The second indication signal is used to instruct the target electronic accessory 200a to stop broadcasting the device tag or change the state of the device tag into a hidden state, so that the device tag of the target electronic accessory 200a is in an unacquirable state. The present application takes the device tag broadcasting module as an example of a bluetooth module for illustration. After forming the first device tag list, the electronic device 100 sends a second indication signal (a second voltage signal) to the target electronic accessory 200a, where the second indication signal is used to stop supplying power to the target electronic accessory 200a, and the device tag broadcasting module is turned off and stops broadcasting the device tag of the target electronic accessory 200a, or is used to instruct the device tag broadcasting module in an operating state to stop broadcasting the device tag of the target electronic accessory 200a, or is used to instruct the device tag of the target electronic accessory 200a broadcasted by the device tag broadcasting module to be converted from a publicly available state to a hidden non-available state.
In this embodiment, the state of the device tag of the electronic accessory 200 needs to be switched many times, and the first indication signal and the second indication signal are used to indicate the device tag of the target electronic accessory 200a, which is set to broadcast by the device tag broadcast module, to be switched from the publicly available state to the hidden unavailable state.
Step 340: and scanning the device labels, and forming a second device label list by using the scanned device labels. The second device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an unacquirable state.
The device tag broadcasting module may send a second feedback signal to the electronic device 100 after the device tag is in the non-acquirable state, and the electronic device 100 scans in a broadcast channel after receiving the second feedback signal and forms a second device tag list with the scanned device tag. Of course, in other embodiments, the electronic device 100 may wait for a second preset time period after sending the second indication signal to the target electronic accessory 200a, and then scan the device tag. Within the second preset time period, the device tag broadcasting module stops broadcasting the device tag of the target electronic accessory 200 a.
The device tag of the target electronic accessory 200a is not included in the second device tag list obtained above.
Step 350: determining a target device tag from the device tags in the first device tag list and out of the second device tag list, wherein the target device tag is the device tag of the target electronic accessory 200 a.
Step 120 may be referred to in this step, and is not described herein again.
Step 360: the electronic accessory 200 corresponding to the target device tag is paired and connected.
Step 130 may be referred to in this step, and is not described herein again.
In this embodiment, by setting that the electronic device 100 responds to a trigger operation, the electronic device 100 sends a first indication signal to the target electronic accessory 200a, where the first indication signal is used to indicate the target electronic accessory 200a to broadcast an equipment tag, so that the equipment tag of the target electronic accessory 200a is in an acquirable state; the electronic device 100 further sends a second indication signal to the target electronic accessory 200a, where the second indication signal is used to indicate that the target electronic accessory 200a stops broadcasting the device tag, so that the device tag of the target electronic accessory 200a is in an unacquirable state, and thus, whether the device tag of the electronic accessory 200 is in an acquirable state or not can be triggered by sending different indication signals from the electronic device 100, so that the electronic device 100 can automatically control the acquisition state of the device tag of the electronic accessory 200, the acquisition of the first device tag list and the acquisition of the second device tag list, and automation and intellectualization of the pairing method are improved.
Of course, referring to fig. 8, the present embodiment can also be applied to the second embodiment, so that the method further includes steps 370 to 400 after step 340:
step 370: sending a third indication signal to the target electronic accessory 200 a. The third indication signal is used to instruct the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state.
After the electronic device 100 acquires the second device tag list, the electronic device 100 may further send a third indication signal to the target electronic accessory 200a (or send the first indication signal to the target electronic accessory 200a again). The third indication signal includes, but is not limited to, a current signal, a voltage signal, an electromagnetic wave signal, and the like. In the embodiment of the present application, the third indication signal is taken as the second voltage signal as an example. The third indication signal is used to instruct the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state. The present application takes the device tag broadcasting module as an example of a bluetooth module for illustration. The electronic device 100 sends a third indication signal (a first voltage signal) to the target electronic accessory 200a, where the third indication signal is used to power the target electronic accessory 200a and indicate that the bluetooth module is turned on and broadcasts the device tag of the target electronic accessory 200a, or is used to indicate that the bluetooth module in an operating state starts broadcasting the device tag of the target electronic accessory 200a, or is used to indicate that the device tag of the target electronic accessory 200a broadcasted by the bluetooth module is converted from a hidden unacquirible state to a publicly acquirable state.
Step 380: and scanning the device labels, and forming a third device label list by using the scanned device labels.
The device tag broadcasting module may send a third feedback signal to the electronic device 100 after broadcasting the device tag of the target electronic accessory 200a, and the electronic device 100 scans the broadcast channel after receiving the third feedback signal and forms a third device tag list with the scanned device tag. Of course, in other embodiments, the electronic device 100 may also wait for a second preset time period after sending the third indication signal to the target electronic accessory 200a, and then scan the device tag. During the second preset time period, the device tag broadcasting module broadcasts the device tag of the target electronic accessory 200 a.
Step 390: determining a target device tag from the device tags in the first device tag list, the third device tag list and outside the second device tag list, wherein the target device tag is a device tag of the target electronic accessory.
Step 390 may refer to step 230 and the like in the second embodiment, and will not be described herein.
Step 400: and the electronic accessory corresponding to the target equipment label is connected in a pairing mode.
Step 400 may refer to step 240 and the like in the second embodiment, and will not be described herein again.
Referring to fig. 9, fig. 9 is a flowchart illustrating a pairing method according to a fourth embodiment of the present application. The pairing method in this embodiment is described by taking the electronic device 100 in fig. 1 as an example. As shown in fig. 9, the pairing method includes at least steps 410 to 510. The present embodiment is a specific example of the electronic device 100 controlling the device tag acquiring state of the target electronic accessory 200a by powering on or powering off the target electronic accessory 200 a.
Step 410: in response to a trigger operation, a first charging signal is sent to the target electronic accessory 200a, where the first charging signal is used to charge the target electronic accessory 200a and start a device tag broadcasting module of the target electronic accessory 200 a.
It is understood that the "sending a first indication signal to the target electronic accessory 200a in response to a triggering operation" in step 310 includes step 410. The embodiment of step 410 can refer to the embodiment of step 310, the main difference is that the first indication signal is the first charging signal. The first charging signal is used to charge the target electronic accessory 200a and start a device tag broadcasting module of the target electronic accessory 200 a. The reverse charging function is turned on in the electronic device 100 (e.g., a mobile phone), and the power management module of the electronic accessory 200 (e.g., a mobile phone shell) is powered by the wireless charging coil. The electronic accessory 200 obtains power from the electronic device 100 and converts the power to a voltage required by other modules (processor, bluetooth module, UWB module, etc.) in the electronic accessory 200. The software system in the electronic accessory 200 is initialized to start the bluetooth module, and the bluetooth module is used as the bluetooth module in this embodiment for description. After the bluetooth module is started, the bluetooth module broadcasts the device tag of the target electronic accessory 200a through a broadcast channel. The device tag of the target electronic accessory 200a is in an accessible state.
The first charging signal may be transmitted by way of electromagnetic coupling between a wireless coil in the electronic device 100 and a wireless coil in the electronic accessory 200. Of course, in other embodiments, the first charging signal may also be transmitted by way of a charging transmission line.
Step 420: and scanning the device tags, and forming a first device tag list by using the device tags of which the scanned signal intensity is greater than or equal to a preset intensity threshold and the device type is a preset type.
It is to be understood that the step 320 of scanning the device tags and forming the scanned device tags into a first device tag list includes the step 420. The embodiment of step 420 can be referred to as the embodiment of step 320.
Wherein the bluetooth module of the target electronic accessory 200a is activated and after broadcasting the device tag of the target electronic accessory 200 a. The bluetooth module of the electronic device 100 scans the broadcast channel and listens for the bluetooth broadcast packet, and the scanning time is T1, where T1 is greater than or equal to the period of the device tag broadcast by the target electronic accessory 200 a. As such, the electronic device 100 is facilitated to scan the device tag of the target electronic accessory 200 a.
In the process of forming the first device tag list, the electronic device 100 acquires device tags meeting a first preset condition, and arranges the acquired device tags to form the first device tag list. The first device tag list may also be referred to as a first bluetooth broadcast list. The first preset condition is that the signal intensity of the equipment tag is greater than or equal to a preset intensity threshold value, and the equipment type corresponding to the equipment tag is a preset type. The present application is not limited to the type of signal, such as a bluetooth signal. The preset intensity threshold of the broadcast signal is not specifically limited in the present application, for example, -50dBm, but is not limited to this data. The preset type is not specifically limited in the present application, and when the electronic device 100 is a mobile phone, the preset type includes, but is not limited to, a mobile phone shell, a mobile phone patch, a mobile phone pendant, and the like. For example, the electronic device 100 selects device tags with bluetooth signal strength greater than the first threshold, and the devices corresponding to the device tags are candidate devices. The electronic device 100 identifies the device type from the bluetooth address or the bluetooth broadcast packet information, and only reserves the device type as the device type to be paired.
The preset type may correspond to a specific type code, and the device tag carries the type code, so that the electronic device 100 may screen out the type code corresponding to the preset type in the obtaining process.
Step 430: and judging whether the number of the equipment labels in the first equipment label list is greater than or equal to 1.
Step 440: and if the judgment result is negative, prompting that no paired equipment is found. I.e., target electronic accessory 200a is not found.
If the number of the device tags in the first device tag list is less than 1, it indicates that the device tags in the first device tag list are null, and indicates that the electronic device 100 does not find the device tag of the target electronic accessory 200 a. In other words, it is stated that there is no alternative device in the first device tag list or there is no device with a device type of the mobile phone shell in the alternative device, and the mobile phone prompts that no device with the type is found, and the pairing process is terminated. Prompting for an undiscovered paired device includes, but is not limited to, displaying a floating window for posting "undiscovered paired device" text on the screen of the electronic device 100.
Optionally, the electronic device 100 may perform another scanning when the device tag of the target electronic accessory 200a is in an acquirable state, and increase the scanning time to increase the acquisition rate of the device tag of the target electronic accessory 200 a. Optionally, in the process of scanning again, the preset intensity threshold of the broadcast signal may be adjusted to be small, so as to avoid a problem that the signal intensity broadcasted by the target electronic accessory 200a is interfered and is too low to be acquired by the electronic device 100.
Step 450: if the number of the device tags in the first device tag list is greater than or equal to 1, receiving a charging stop signal, and stopping charging the target electronic accessory 200a according to the charging stop signal.
The number of the device tags in the first device tag list is greater than or equal to 1, which indicates that the electronic device 100 detects a device tag that meets the first preset condition. That is, the first device tag list contains the preset type of the alternative device. At this time, the acquisition module of the electronic device 100 generates a fourth feedback signal. The charging module of the electronic device 100 receives a fourth feedback signal from the acquiring module of the electronic device 100, where the fourth feedback signal is a charging stop signal. The fourth feedback signal is used to instruct the charging module to stop charging the target electronic accessory 200 a. The charging module of the electronic device 100 is used to charge the target electronic accessory 200a or stop charging the target electronic accessory 200 a. The obtaining module of the electronic device 100 is configured to obtain a first device tag list and determine whether the number of device tags in the first device tag list is greater than or equal to 1. The charging module of the electronic device 100 stops charging the target electronic accessory 200a according to the charging stop signal. When the electronic device 100 stops charging the target electronic accessory 200a, the bluetooth module of the target electronic accessory 200a is powered off, and broadcasting the device tag is stopped, so that the device tag of the target electronic accessory 200a is in an unavailable state. In this process, it is equivalent to the electronic device 100 sending the second indication signal to the target electronic accessory 200 a. The second indication signal is that the charging voltage received by the electronic accessory 200 from the electronic device 100 is 0. The second indication signal is used to indicate the target electronic accessory 200a to stop broadcasting the device tag, so that the device tag of the target electronic accessory 200a is in an unavailable state.
Step 460: and waiting for a preset time, wherein the preset time is greater than or equal to the broadcasting period of the equipment tag.
Wherein after the electronic device 100 stops charging the target electronic accessory 200a, the electronic device 100 waits for a preset time T2. On one hand, the waiting time T2 of the electronic device 100 is to fully power off the electronic accessory 200, fully power off the bluetooth module of the target electronic accessory 200a, and stop broadcasting the device tag, so that the device tag of the target electronic accessory 200a is in an unavailable state, thereby avoiding the problem of inaccurate result of subsequently acquiring the second device tag list due to remaining power in the bluetooth module; on the other hand, the waiting time T2 can also prevent the bluetooth broadcast signals of other electronic accessories 200 from having periodicity, that is, prevent the bluetooth broadcast signals of other electronic accessories 200 from being just in a broadcast gap when the second device tag list is subsequently acquired, which affects the accuracy of the result of the second device tag list and further affects the robustness of the pairing method provided by the embodiment.
The waiting time T2 is not limited in the present application, and may be several tens of microseconds to several tens of milliseconds, for example.
Step 470: and scanning the device labels, and forming a second device label list by using the scanned device labels.
After waiting time T2, the Bluetooth module of the electronic device 100 listens for the Bluetooth broadcast packet, and the electronic device 100 scans the device tag for T3. The scan time T3 is greater than the bluetooth signal period of the target electronic accessory 200 a. In the process of forming the second device tag list, the electronic device 100 acquires device tags meeting a second preset condition, and arranges the acquired device tags to form the second device tag list. The second preset condition may be that the signal intensity of the device tag is greater than or equal to a preset intensity threshold; or, the second preset condition may be that the device type corresponding to the device tag is a preset type; or the second preset condition is that the signal intensity of the device tag is greater than or equal to a preset intensity threshold value, and the device type corresponding to the device tag is a preset type.
It is understood that the specific steps of step 470 may also refer to the specific implementation in step 360.
Step 480: sending a second charging signal to the target electronic accessory 200 a. The second charging signal is used to charge the target electronic accessory 200a and start a device tag broadcasting module of the target electronic accessory 200 a.
It is understood that the "sending a third indication signal to the target electronic accessory 200 a" of step 370. The third indication signal is used to instruct the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state. "includes step 480. The embodiment of step 480 can refer to the embodiment of step 370, the main difference is that the third indication signal is the second charging signal. The second charging signal is used to charge the target electronic accessory 200a and start the bluetooth module of the target electronic accessory 200 a. After the bluetooth module is started, the bluetooth module broadcasts the device tag of the target electronic accessory 200a through a broadcast channel. The device tag of the target electronic accessory 200a is in an accessible state.
The second charging signal may be transmitted by way of electromagnetic coupling between a wireless coil in the electronic device 100 and a wireless coil in the electronic accessory 200. Of course, in other embodiments, the second charging signal may also be transmitted by way of a charging transmission line.
Step 490: and scanning the device tags, and forming a third device tag list by using the scanned device tags of which the signal intensity is greater than or equal to a preset intensity threshold.
It is to be understood that the step of scanning the device tags in step 380 and forming the scanned device tags into a third device tag list includes step 490. Therefore, reference is made to the embodiment in step 380 for the specific steps in step 490.
Wherein the bluetooth module of the target electronic accessory 200a is activated and after broadcasting the device tag of the target electronic accessory 200 a. The electronic device 100 scans the broadcast channel for bluetooth broadcast packets for a period T4, where T4 is greater than or equal to the period of the device tag broadcast by the target electronic accessory 200 a. As such, the electronic device 100 is facilitated to scan the device tag of the target electronic accessory 200 a.
In the process of forming the third device tag list, the electronic device 100 acquires device tags meeting a third preset condition, and arranges the acquired device tags to form the third device tag list. The third preset condition may be that the signal intensity of the device tag is greater than or equal to a preset intensity threshold; or the third preset condition is that the signal intensity of the device tag is greater than or equal to a preset intensity threshold, and the device type corresponding to the device tag is a preset type.
Step 500: it is determined whether there is a target electronic accessory 200a satisfying a preset condition in the first device tag list.
Optionally, referring to fig. 10, step 500 includes at least the following steps 501-505.
Step 501: and obtaining a first to-be-selected device tag from the device tags in the first device tag list, wherein the first to-be-selected device tag is obtained by deleting the device tag in the second device tag list from the device tags in the first device tag list.
After obtaining the first device tag list, the second device tag list and the third device tag list, the electronic device 100 searches for the device tags in the first device tag list, compares the device tags in the first device tag list with the device tags in the second device tag list, and determines the device tags that belong to the first device tag list and do not belong to the second device tag list as the first device tags to be selected. Namely, the first to-be-selected device tag is obtained after the device tag in the second device tag list is deleted from the first device tag list.
For example, if the first device tag list is A, B, C, D, E and the second device tag list is C, D, E, A, B in the first device tag list is determined as the first candidate device tag, so as to subsequently determine the device tag of the target electronic accessory 200a in the first candidate device tag.
Step 502: and acquiring a second to-be-selected device label from the first to-be-selected device label, wherein the second to-be-selected device label is the same as the first to-be-selected device label in the third device label list.
And comparing the first equipment label to be selected with the equipment labels in the third equipment label list, and determining the equipment label in the third equipment label list, which is the same as the first equipment label to be selected, as a second equipment label to be selected.
For example, referring to fig. 11, if the first device tag list is A, B, C, D, E and the second device tag list is C, D, E, A, B in the first device tag list is determined as the first candidate device tag. Optionally, the third device tag list is A, C, D, E, where a device tag in the third device tag list that is the same as the first device tag to be selected is a, and then a is the second device tag to be selected.
As shown in step 490, the device tags in the third device tag list satisfy a third preset condition, that is, the broadcast signal strength of the device tags in the third device tag list is greater than or equal to the preset strength threshold.
Step 503: and judging whether the number of the second equipment labels to be selected is 1.
Step 504: and if the number of the second to-be-selected device tags is 1, determining that the second to-be-selected device tags are target device tags.
Optionally, referring to fig. 11, the third device tag list is A, C, D, E, the first candidate device tag is A, B, and the second candidate device tag is a. And if the number of the second to-be-selected device tags is 1, determining that the second to-be-selected device tag A is a target device tag.
Step 505: and if the number of the second equipment labels to be selected is judged to be 0 or more than 1, prompting that the pairing is failed.
Optionally, referring to fig. 12, the first candidate device tag is A, B, the third device tag list is C, D, E, and the second candidate device tag is null. If the number of the second candidate device tags is 0, a failure in pairing is prompted, or the target electronic accessory 200a is prompted to be not found, for example, "pairing device not found" is displayed on the screen of the electronic device 100.
Optionally, referring to fig. 13, the first candidate device tag is A, B, the third device tag list is A, B, C, D, E, and the second candidate device tag is A, B. If the number of the second candidate device tags is 2, it is indicated that the plurality of electronic accessories 200 are scanned, for example, the plurality of mobile phone shells are scanned, but the mobile phone shells are in one-to-one correspondence with the mobile phone, and obviously, the plurality of electronic accessories 200 cannot meet the one-to-one correspondence between the electronic device 100 and the electronic accessories 200 and cannot determine the target electronic accessory 200a, so that a failure in pairing is prompted, or the plurality of electronic accessories 200 are prompted to be scanned, for example, "the pairing device cannot be determined" or "a plurality of devices of the type are scanned on the screen of the electronic device 100, and it is recommended to change the moving position for pairing again".
Step 510: and the target electronic accessory 200a corresponding to the target equipment label is connected in a pairing mode.
Referring to fig. 14, fig. 14 is a block diagram of a pairing apparatus according to an embodiment of the present disclosure. The embodiment of the present application further provides a pairing apparatus 600, where the pairing apparatus 600 includes an obtaining module 610, a determining module 620, and a pairing module 630.
The obtaining module 610 is configured to obtain a first device tag list and a second device tag list, where the first device tag list is a list formed by device tags obtained by the electronic device 100 when a device tag of the target electronic accessory 200a is in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device 100 when the device tag of the target electronic accessory 200a is in an unacquirable state;
the determining module 620 is configured to determine a target device tag from the device tags located in the first device tag list and outside the second device tag list, where the target device tag is the device tag of the target electronic accessory 200 a;
the pairing module 630 is used for pairing and connecting with the target electronic accessory 200a corresponding to the target device tag.
Optionally, the obtaining module 610 is further configured to obtain a third device tag list after "obtaining the first device tag list and obtaining the second device tag list", where the third device tag list is a list formed by device tags obtained by the electronic device 100 when the device tag of the target electronic accessory 200a is in an acquirable state.
The determining module 620 is configured to determine a target device tag among the device tags located in the first device tag list, the third device tag list and the device tags located outside the second device tag list in the "determining a target device tag among the device tags located in the first device tag list and the device tags located outside the second device tag list" step.
Optionally, the determining module 620 further includes a deleting module 621, an obtaining sub-module 622, and a determining module 623.
Determining a target device tag among device tags located in the first device tag list, the third device tag list, and outside the second device tag list, further comprising:
the deleting module 621 is configured to obtain a first to-be-selected device tag from the device tags in the first device tag list, where the first to-be-selected device tag is obtained by deleting the device tag in the second device tag list from the device tags in the first device tag list.
The obtaining sub-module 622 is configured to obtain a second to-be-selected device tag from the first to-be-selected device tag, where the second to-be-selected device tag is a device tag in the third device tag list that is the same as the first to-be-selected device tag;
the determining module 623 is configured to determine whether the number of the second device tags to be selected is 1, and if the number of the second device tags to be selected is 1, determine that the second device tags to be selected are target device tags.
Optionally, in the step of determining whether the number of the second device tags to be selected is 1, if it is determined that the number of the second device tags to be selected is 0 or greater than 1, the determining module 623 prompts that the pairing is failed.
Optionally, the acquiring module 610 further includes a response module 611, a scanning module 612, and a sending module 613.
In the step of acquiring the first device tag list and acquiring the second device tag list,
the response module 611 is configured to send a first indication signal to the target electronic accessory 200a in response to a trigger operation, where the first indication signal is used to indicate the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state.
The scanning module 612 is configured to scan device tags, and form a first device tag list with the scanned device tags.
The sending module 613 is configured to send a second indication signal to the target electronic accessory 200a, where the second indication signal is used to indicate the target electronic accessory 200a to stop broadcasting the device tag, so that the device tag of the target electronic accessory 200a is in an unavailable state.
The scanning module 612 is further configured to scan device tags, and form a second device tag list with the scanned device tags.
In the step of "sending the first indication signal to the target electronic accessory 200 a", the sending module 613 is further configured to send a first charging signal to the target electronic accessory 200a, where the first charging signal is used to charge the target electronic accessory 200a and start a device tag broadcasting module of the target electronic accessory 200 a.
The scanning module 612 is further configured to, in the step of "forming the scanned device tags into a first device tag list", form a first device tag list from the device tags whose signal strength is greater than or equal to a preset strength threshold and whose device types are preset types.
Optionally, the obtaining module 610 further includes a receiving module 614.
The receiving module 614 is configured to receive a charging stop signal before "sending the second indication signal to the target electronic accessory 200 a", and stop charging the target electronic accessory 200a according to the charging stop signal.
The determining module 623 is further configured to determine whether the number of the device tags in the first device tag list is greater than or equal to 1 before "receiving a charging stop signal, stopping charging the target electronic accessory 200a according to the charging stop signal, and forming a second indication signal", and receive the charging stop signal if the determination result is yes. And if the judgment result is negative, prompting that no paired equipment is found.
Optionally, the obtaining module 610 further includes a time delay module 615.
The time delay module 615 is configured to wait for a preset time between "sending a second indication signal to the target electronic accessory 200 a" and "scanning the device tag and forming the scanned device tag into a second device tag list", where the preset time is greater than or equal to a broadcast period of the device tag.
The acquiring a third device tag list includes:
the sending module 613 is further configured to send a third indication signal to the target electronic accessory 200a, where the third indication signal is used to indicate the target electronic accessory 200a to broadcast a device tag, so that the device tag of the target electronic accessory 200a is in an acquirable state.
The scanning module 612 is further configured to scan device tags, and form a third device tag list with the scanned device tags.
The sending module 613 is further configured to send a second charging signal to the target electronic accessory 200a in the step of "sending a third indication signal to the target electronic accessory 200 a", where the second charging signal is used to charge the target electronic accessory 200a and start a device tag broadcasting module of the target electronic accessory 200 a.
The scanning module 612 is further configured to, in the step of "forming the scanned device tags into a third device tag list", form a third device tag list from the scanned device tags whose signal strength is greater than or equal to a preset strength threshold.
Fig. 15 is an internal block diagram of an electronic device and an electronic accessory provided in an embodiment of the present application. As shown in fig. 15, the electronic apparatus 100 includes a processor and a memory connected by a system bus. The electronic device 100 further comprises a power supply module and a Bluetooth module. The processor is connected with the power supply module and the Bluetooth module through a system bus to control the power supply module and the Bluetooth module to work. Wherein the processor is configured to provide computing and control capabilities to support the operation of the entire electronic device 100. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing a pairing method provided in the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device 100 may be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a Point of sale (POS), a vehicle-mounted computer, and a wearable device.
The respective modules in the pairing apparatus 600 provided in the embodiment of the present application may be implemented in the form of a computer program. The computer program may be run on a terminal or a server. Program modules constituting the computer program may be stored on the memory of the electronic device 100. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
As shown in fig. 15, the electronic accessory 200 internally includes a processor, a memory, a charging module, a bluetooth module, a power management module, and the like. The processor is electrically connected with the memory, the charging module, the Bluetooth module, the power management module and the like through a system bus so as to execute the computer program in the memory and control the charging module, the Bluetooth module and the power management module to work.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the pairing method.
A computer program product containing instructions which, when run on a computer, cause the computer to perform a pairing method.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (11)

1. A pairing method applied to electronic equipment is characterized by comprising the following steps:
the method comprises the steps of obtaining a first equipment label list and a second equipment label list, wherein the first equipment label list is a list formed by equipment labels obtained by the electronic equipment when the equipment labels of target electronic accessories are in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in a non-acquirable state; the target electronic accessory is an electronic accessory worn on the electronic device;
determining a target device tag from the device tags in the first device tag list and out of the second device tag list, wherein the target device tag is a device tag of the target electronic accessory;
and the electronic accessory corresponding to the target equipment label is connected in a pairing mode.
2. The method of claim 1, wherein after obtaining the first device tag list and obtaining the second device tag list, the method further comprises:
acquiring a third device tag list, wherein the third device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in an acquirable state;
the "determining a target device tag among device tags located in the first device tag list and outside the second device tag list" includes:
determining a target device tag among the device tags located in the first device tag list, the third device tag list, and outside the second device tag list.
3. The method of claim 2, wherein the determining a target device tag among the device tags located in the first device tag list, the third device tag list, and outside the second device tag list, further comprises:
acquiring a first to-be-selected device tag from the device tags in the first device tag list, wherein the first to-be-selected device tag is obtained by deleting the device tag in the second device tag list from the device tags in the first device tag list;
acquiring a second to-be-selected device tag from the first to-be-selected device tag, wherein the second to-be-selected device tag is the same as the first to-be-selected device tag in the third device tag list;
judging whether the number of the second equipment labels to be selected is 1 or not, and if the number of the second equipment labels to be selected is 1, determining that the second equipment labels to be selected are target equipment labels;
and if the number of the second equipment tags to be selected is 0 or more than 1, prompting that the pairing is failed.
4. The method according to any one of claims 1 to 3, wherein the obtaining the first device tag list and obtaining the second device tag list comprises:
responding to a trigger operation, and sending a first indication signal to the target electronic accessory, wherein the first indication signal is used for indicating the target electronic accessory to broadcast a device tag, so that the device tag of the target electronic accessory is in an acquirable state;
scanning device labels, and forming a first device label list by using the scanned device labels;
sending a second indication signal to the target electronic accessory, wherein the second indication signal is used for indicating the target electronic accessory to stop broadcasting the equipment tag, so that the equipment tag of the target electronic accessory is in an unavailable state;
and scanning the device labels, and forming a second device label list by using the scanned device labels.
5. The method of claim 4, wherein said sending a first indication signal to the target electronic accessory comprises:
sending a first charging signal to the target electronic accessory, wherein the first charging signal is used for charging the target electronic accessory and starting an equipment tag broadcasting module of the target electronic accessory;
the "forming the scanned device tags into a first device tag list" includes:
forming a first device label list by using the device labels of which the scanned signal intensity is greater than or equal to a preset intensity threshold and the device type is a preset type;
before the "sending a second indication signal to the target electronic accessory", the method further comprises:
and receiving a charging stop signal, and stopping charging the target electronic accessory according to the charging stop signal.
6. The method of claim 5, wherein before said receiving a stop charging signal, stopping charging of the target electronic accessory according to the stop charging signal, and forming a second indication signal, further comprises:
judging whether the number of the equipment labels in the first equipment label list is greater than or equal to 1, and if so, receiving a charging stopping signal;
if the judgment result is negative, prompting that no paired equipment is found;
the method further comprises, between sending a second indication signal to the target electronic accessory and scanning device tags to form a second device tag list, the scanned device tags:
and waiting for a preset time, wherein the preset time is greater than or equal to the broadcasting period of the equipment tag.
7. The method according to any one of claims 2-4, wherein said obtaining a third device tag list comprises:
sending a third indication signal to the target electronic accessory, wherein the third indication signal is used for indicating the target electronic accessory to broadcast the equipment tag, so that the equipment tag of the target electronic accessory is in an acquirable state;
and scanning the device labels, and forming a third device label list by using the scanned device labels.
8. The method of claim 7, wherein said sending a third indication signal to the target electronic accessory comprises:
sending a second charging signal to the target electronic accessory, wherein the second charging signal is used for charging the target electronic accessory and starting an equipment tag broadcasting module of the target electronic accessory;
the "forming the scanned device tags into a third device tag list" includes:
and forming a third device label list by the scanned device labels with the signal intensity greater than or equal to the preset intensity threshold value.
9. A pairing apparatus, characterized in that the apparatus comprises:
the electronic equipment comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring a first equipment label list and a second equipment label list, and the first equipment label list is a list formed by equipment labels acquired by the electronic equipment when an equipment label of a target electronic accessory is in an acquirable state; the second device tag list is a list formed by device tags acquired by the electronic device when the device tag of the target electronic accessory is in a non-acquirable state;
a determining module, configured to determine a target device tag from device tags located in the first device tag list and outside the second device tag list, where the target device tag is a device tag of the target electronic accessory;
and the pairing module is used for carrying out pairing connection with the target electronic accessory corresponding to the target equipment label.
10. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, wherein the computer program, when executed by the processor, causes the processor to perform the steps of the pairing method as claimed in any one of claims 1 to 8.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
CN202111601682.8A 2021-12-24 2021-12-24 Pairing method and device, electronic equipment and storage medium Pending CN114286322A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111601682.8A CN114286322A (en) 2021-12-24 2021-12-24 Pairing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111601682.8A CN114286322A (en) 2021-12-24 2021-12-24 Pairing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114286322A true CN114286322A (en) 2022-04-05

Family

ID=80875226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111601682.8A Pending CN114286322A (en) 2021-12-24 2021-12-24 Pairing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114286322A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703049A (en) * 2022-11-30 2023-09-05 荣耀终端有限公司 Pairing method of structural parts and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116703049A (en) * 2022-11-30 2023-09-05 荣耀终端有限公司 Pairing method of structural parts and electronic equipment

Similar Documents

Publication Publication Date Title
CN113055873B (en) Method and device for identifying devices, electronic device and storage medium
US11122392B2 (en) Provisioning wireless device profiles
CN112423238A (en) Electronic device, control terminal, storage medium, and device connection method
US20150264139A1 (en) Method and electronic devices for performing functions
US20130307665A1 (en) Control system for controlling accessories of mobile device
WO2020077485A1 (en) Geo-fence updating method, and communication device
CN110460983A (en) Bluetooth title searching method, device, electronic equipment and storage medium
CN108733337B (en) Screen display method and device, electronic equipment and computer readable storage medium
US20150063168A1 (en) Method and apparatus for scanning channel
CN104716995A (en) Method and system for near-field communication friend making through accessories
CN104684056B (en) User equipment matching method, device and server
CN113055864A (en) Bluetooth connection method, device, storage medium and electronic equipment
JP2016538792A (en) Short-range wireless communication control method and apparatus supporting the same
CN113179487B (en) Method and device for controlling working mode, electronic equipment and storage medium
CN107632600A (en) Method and device for controlling movement of air purifier, mobile terminal and purifier
CN114286322A (en) Pairing method and device, electronic equipment and storage medium
CN111526192B (en) Remote control method and device of terminal, terminal and computer readable storage medium
CN105487887B (en) Bluetooth starting method and Bluetooth device
CN111433756B (en) Terminal and Type C interface anti-corrosion method
US11516651B2 (en) Wireless communication device that changes setting content of beacon terminal
US10952076B2 (en) Electronic device and operating method therefor
JP6430380B2 (en) Electronic device, operating method, computer program, and storage medium
US20180145845A1 (en) Device control method and apparatus in home network system
CN105812412A (en) Transmission processing and remote processing method and device
CN104219729B (en) connection processing method and electronic equipment

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