Wireless earphone pairing method, system and storage mediumTechnical Field
The present invention relates to the field of headsets, and in particular, to a method, a system, and a storage medium for pairing wireless headsets.
Background
With the progress of society and the improvement of the level of science and technology, more and more people begin to pay attention to the improvement of life quality, more and more people begin to use some audio-visual products, such as intelligent terminals and wireless earphones, and these products greatly facilitate the life of human beings and also provide more fun for human beings. Especially, the wireless earphone, the user can completely free both hands to communicate with others and enjoy music without any constraint, so the wireless earphone is more and more popular with multiple users,
when a user uses a wireless headset such as a bluetooth headset to listen to music or make a call, the first action to be taken is to establish a connection with an intelligent terminal such as a mobile phone. The traditional Bluetooth headset design is connected with a mobile phone, a series of operations such as entering a pairing mode, searching and connecting are needed, the operations are basically completed manually, generally, product use specifications need to be read to learn operation steps, and the operation is very inconvenient.
Therefore, a more convenient method for pairing wireless earphones is needed to save the tedious operation steps and improve the user experience.
Disclosure of Invention
The invention aims to provide a wireless earphone pairing method, a wireless earphone pairing system and a storage medium, which can simply and quickly realize the pairing of a wireless earphone and an intelligent terminal.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method of pairing wireless headsets, comprising the steps of:
the wireless earphone is induced to be started, and the wireless earphone is controlled to broadcast earphone information and a connection request to the surrounding environment; the earphone information comprises service types supported by the wireless earphone and an address code of the wireless earphone;
controlling the intelligent terminal to search wireless earphones supporting a predetermined service type from the surrounding environment at regular time;
after searching the wireless earphone, the intelligent terminal judges whether the intelligent terminal receives a connection request broadcasted by the wireless earphone; if so, controlling the intelligent terminal to send a connection confirmation request to the user;
and judging whether the intelligent terminal receives a connection confirmation response of the user, and if so, controlling the intelligent terminal and the wireless earphone to be connected in a matching way.
Optionally, the form of the connection confirmation request includes one or more of voice and popup.
Optionally, the earphone message further includes earphone data, where the earphone data includes one or more of a model, a name, an electric quantity, and a predicted usage time of the wireless earphone;
the contents of the connection confirmation request further include the headset material.
Optionally, after the intelligent terminal searches for the wireless headset, it is determined whether the intelligent terminal receives a connection request broadcasted by the wireless headset, and the method specifically includes:
after the intelligent terminal searches the wireless earphone, judging whether the intelligent terminal starts a specified search function;
if the intelligent terminal does not start the specified search function, judging whether the intelligent terminal receives a connection request broadcasted by the wireless earphone;
if the intelligent terminal starts the specified search function, judging whether the wireless earphone belongs to a connection white list or not and not belongs to a connection black list; if yes, judging whether the intelligent terminal receives a connection request broadcasted by the wireless earphone.
Optionally, the controlling the intelligent terminal and the wireless headset to be connected in a pairing manner further includes:
and judging whether the intelligent terminal and the wireless earphone belong to the first pairing connection, if so, recording the wireless earphone into a connection white list.
Optionally, whether the intelligent terminal receives a connection confirmation response of the user is judged, if yes, the intelligent terminal and the wireless earphone are controlled to be connected in a pairing mode, and the method specifically comprises the following steps:
and judging whether the intelligent terminal receives a connection confirmation response of the user, if so, controlling the intelligent terminal and the wireless earphone to be connected in a matching way, and if not, recording the wireless earphone into a connection blacklist.
Optionally, the controlling the intelligent terminal to periodically search for a wireless headset supporting a predetermined service type from its surrounding environment further includes: sensing the wireless function of the intelligent terminal to be started;
the pairing method of the wireless headset further comprises the following steps:
and sensing that the wireless function of the intelligent terminal is closed, and clearing the content of the connection blacklist.
Optionally, the determining whether the intelligent terminal receives a connection confirmation response of the user specifically includes:
starting timing from the time when the intelligent terminal sends a connection confirmation request to the user, and judging whether the intelligent terminal receives a connection confirmation response of the user within preset time.
A wireless earphone pairing system comprises a wireless earphone, an intelligent terminal and a pairing module;
the pairing module includes:
the broadcasting unit is electrically connected with the wireless earphone and used for inducing the start-up of the wireless earphone and controlling the wireless earphone to broadcast earphone information and connection requests to the surrounding environment; the earphone information comprises service types supported by the wireless earphone and an address code of the wireless earphone;
the searching unit is electrically connected with the intelligent terminal and the broadcasting unit and is used for controlling the intelligent terminal to search the wireless earphones supporting the preset service types from the surrounding environment of the intelligent terminal at regular time;
the connection request unit is electrically connected with the searching unit and used for judging whether the intelligent terminal receives a connection request broadcasted by the wireless earphone after the intelligent terminal searches the wireless earphone; if so, controlling the intelligent terminal to send a connection confirmation request to the user;
and the pairing unit is electrically connected with the connection request unit, the wireless earphone and the intelligent terminal and is used for judging whether the intelligent terminal receives a connection confirmation response of the user or not, and if so, controlling the intelligent terminal and the wireless earphone to be in pairing connection.
A storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the pairing method as described above.
Compared with the prior art, the invention has the following beneficial effects:
according to the pairing method provided by the invention, after the wireless earphone is started, a nearby specific mobile phone can immediately pop up or play a connection confirmation request to inquire whether a user needs to connect the earphone, and the wireless earphone can be successfully connected with the mobile phone as long as the user confirms the connection on the mobile phone, so that time and labor are saved, the complicated operation process of the user is reduced, and the user experience is obviously improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a pairing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a pairing system according to a third embodiment of the present invention.
1. A wireless headset; 2. an intelligent terminal; 31. a broadcasting unit; 32. a search unit; 33. a connection request unit; 34. a pairing unit; 35. a white list unit; 36. and a blacklist unit.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
Example one
The embodiment of the invention provides a pairing method of a wireless earphone, which can realize the rapid pairing of the wireless earphone 1 and anintelligent terminal 2.
Referring to fig. 1, the pairing method includes the following steps:
s10, inducing the wireless earphone 1 to start, controlling the wireless earphone 1 to broadcast earphone information and connection request to the surrounding environment; wherein the headset message includes the service type supported by the wireless headset 1 and the address code of the wireless headset 1.
The headset message may also include headset data including one or more of the model, name, power, and expected usage time of the wireless headset 1. The concept of the expected usage time is: after the user continuously uses the wireless headset 1 for the expected usage time, the wireless headset 1 is exhausted.
The method for sensing the start of the wireless headset 1 is not limited in the present invention, and the wireless headset 1 may send a start signal when being started, and the wireless headset 1 is considered to be started when the start signal is sensed. Or the opening of the earphone box of the wireless earphone 1 is sensed, that is, the wireless earphone 1 is started.
And S20, controlling theintelligent terminal 2 to search the wireless earphone 1 supporting the predetermined service type from the surrounding environment.
The method specifically comprises the following steps: and sensing that the wireless function of theintelligent terminal 2 is started, and controlling theintelligent terminal 2 to search the wireless earphone 1 supporting the predetermined service type from the surrounding environment at regular time.
S30, after searching the wireless earphone 1, theintelligent terminal 2 judges whether theintelligent terminal 2 receives a connection request broadcasted by the wireless earphone 1; and if so, controlling theintelligent terminal 2 to send a connection confirmation request to the user.
The connection confirmation request is for the user to confirm whether the wireless headset 1 is connected, and the contents thereof may further include the aforementioned headset material for the user to make a decision.
The form of the connection confirmation request includes one or more of voice and pop-up window. The voice can be played through the loudspeaker of theintelligent terminal 2, and the pop-up window can be displayed on the display of theintelligent terminal 2.
And S40, judging whether theintelligent terminal 2 receives a connection confirmation response of the user, and if so, controlling theintelligent terminal 2 and the wireless earphone 1 to be connected in a pairing mode.
Wherein, controlintelligent terminal 2 and wireless earphone 1 pair and connect and specifically include:
controlling theintelligent terminal 2 to send a connection request response to the wireless earphone 1;
and after the wireless earphone 1 receives the connection request response, controlling the wireless earphone 1 and theintelligent terminal 2 to interact with the connection code, and completing pairing.
The wireless headset 1 in the invention is preferably a bluetooth headset, and the wireless function of theintelligent terminal 2 is preferably a bluetooth function.
In the pairing method provided by the embodiment, after the wireless headset 1 is turned on, a specific nearby mobile phone immediately pops up or plays a connection confirmation request to inquire whether a user needs to connect the headset, and as long as the user confirms the connection on the mobile phone, the wireless headset 1 can be successfully connected with the mobile phone, so that time and labor are saved.
Example two
The second embodiment is performed on the basis of the first embodiment, in this embodiment, theintelligent terminal 2 further includes a designated search function, that is, step S30 specifically includes:
s31, after the wireless earphone 1 is searched by theintelligent terminal 2, judging whether theintelligent terminal 2 starts an appointed searching function;
s32, if theintelligent terminal 2 does not start the specified search function, judging whether theintelligent terminal 2 receives the connection request broadcasted by the wireless earphone 1;
s33, if theintelligent terminal 2 starts the specified search function, judging whether the wireless earphone 1 belongs to a connection white list or not and does not belong to a connection black list; if yes, whether theintelligent terminal 2 receives a connection request broadcasted by the wireless earphone 1 is judged.
The connection blacklist and the connection white list can be deleted or added manually by a user, or automatically deleted or added after meeting a preset condition, and theintelligent terminal 2 and the specific wireless earphone 1 can be paired quickly by specifying a search function.
S40 specifically includes:
judging whether theintelligent terminal 2 receives a connection confirmation response of the user, if so, controlling theintelligent terminal 2 and the wireless headset 1 to be connected in a matching way, and executing step S50; if not, the wireless earphone 1 is recorded into a connection blacklist.
And S50, judging whether theintelligent terminal 2 and the wireless earphone 1 belong to the first pairing connection, and if so, recording the wireless earphone 1 into a connection white list.
And S60, sensing that the wireless function of theintelligent terminal 2 is closed, and clearing the content of the connection blacklist.
The pairing method provided by the second embodiment inputs the wireless headset 1 paired with theintelligent terminal 2 into the connection white list, so that the next quick pairing connection can be facilitated. And recording the wireless earphone 1 which is not confirmed to be connected into a connection blacklist, and avoiding influence on user experience caused by repeated popup. The content of the connection blacklist can be cleared by restarting the wireless function of theintelligent terminal 2, and the long pairing experience is prevented from being influenced by once giving up pairing.
EXAMPLE III
The third embodiment provides a pairing system of a wireless headset, which is used for executing the pairing method provided in the first embodiment or the second embodiment.
The pairing system includes: the system comprises a wireless earphone 1, anintelligent terminal 2 and a pairing module;
the pairing module includes:
thebroadcasting unit 31 is electrically connected with the wireless earphone 1, and is used for sensing the startup of the wireless earphone 1 and controlling the wireless earphone 1 to broadcast earphone information and connection requests to the surrounding environment; the earphone message comprises the service type supported by the wireless earphone 1 and the address code of the wireless earphone 1;
a searchingunit 32 electrically connected to theintelligent terminal 2 and thebroadcasting unit 31, for controlling theintelligent terminal 2 to periodically search the wireless headset 1 supporting the predetermined service type from its surrounding environment;
theconnection request unit 33 is electrically connected with thesearch unit 32 and is used for judging whether theintelligent terminal 2 receives a connection request broadcasted by the wireless earphone 1 after theintelligent terminal 2 searches the wireless earphone 1; if yes, controlling theintelligent terminal 2 to send a connection confirmation request to the user;
and thepairing unit 34 is electrically connected with theconnection request unit 33, the wireless headset 1 and theintelligent terminal 2, and is used for judging whether theintelligent terminal 2 receives a connection confirmation response of the user or not, and if so, controlling theintelligent terminal 2 and the wireless headset 1 to be in pairing connection.
Theconnection requesting unit 33 is specifically configured to:
after theintelligent terminal 2 searches the wireless earphone 1, judging whether theintelligent terminal 2 starts a specified search function;
if theintelligent terminal 2 does not start the specified search function, judging whether theintelligent terminal 2 receives a connection request broadcasted by the wireless earphone 1;
if theintelligent terminal 2 starts the specified search function, judging whether the wireless earphone 1 belongs to a connection white list or not and does not belong to a connection black list; if yes, whether theintelligent terminal 2 receives a connection request broadcasted by the wireless earphone 1 is judged.
Thepairing unit 34 is specifically configured to: judging whether theintelligent terminal 2 receives a connection confirmation response of a user, if so, controlling theintelligent terminal 2 and the wireless earphone 1 to be connected in a matching way; if not, the wireless earphone 1 is recorded into a connection blacklist.
The pairing module further comprises;
thewhite list unit 35 is electrically connected with theconnection request unit 33 and thepairing unit 34, and is used for judging whether theintelligent terminal 2 and the wireless headset 1 belong to the first pairing connection after theintelligent terminal 2 and the wireless headset 1 are paired and connected, and if so, recording the wireless headset 1 into a connection white list;
and theblacklist unit 36 is electrically connected to theconnection request unit 33, and is configured to sense that the wireless function of theintelligent terminal 2 is closed, and clear the content of the connection blacklist.
The pairing system of the wireless headset provided by the third embodiment is used for executing the pairing method described in the first embodiment or the second embodiment, and has the corresponding functional modules and beneficial effects of the execution method.
Example four
The fourth embodiment provides a storage medium, where the storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the pairing method according to the first embodiment or the second embodiment.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.