CN109451475A - Distribution method, intelligent terminal and the device with store function of Bluetooth pairing code - Google Patents

Distribution method, intelligent terminal and the device with store function of Bluetooth pairing code Download PDF

Info

Publication number
CN109451475A
CN109451475A CN201811258887.9A CN201811258887A CN109451475A CN 109451475 A CN109451475 A CN 109451475A CN 201811258887 A CN201811258887 A CN 201811258887A CN 109451475 A CN109451475 A CN 109451475A
Authority
CN
China
Prior art keywords
pairing code
bluetooth
intensity value
signal intensity
sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811258887.9A
Other languages
Chinese (zh)
Other versions
CN109451475B (en
Inventor
俞斌
杨维琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN201811258887.9A priority Critical patent/CN109451475B/en
Publication of CN109451475A publication Critical patent/CN109451475A/en
Application granted granted Critical
Publication of CN109451475B publication Critical patent/CN109451475B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

This application provides a kind of distribution method of Bluetooth pairing code, intelligent terminal and with the device of store function, the distribution method of the Bluetooth pairing code includes: to get the first bluetooth signal intensity value of bluetooth equipment;Based on the first bluetooth signal intensity value, the corresponding first pairing code sequence of continuous bluetooth signal intensity value of the first setting quantity is obtained from the database pre-established, continuous bluetooth signal intensity value includes the first bluetooth signal intensity value;The pairing code of the second setting quantity is chosen from the first pairing code sequence to obtain the second pairing code sequence, the second setting quantity is less than the first setting quantity;Continuous sequence identical with the second pairing code sequence is obtained from the first pairing code sequence, counts next bit pairing code of identical continuous sequence, and the most next bit pairing code of frequency of occurrence is determined as establishing with bluetooth equipment pairing code when connection.By the above-mentioned means, the calculation amount when distribution of Bluetooth pairing code can be reduced, the allocative efficiency of Bluetooth pairing code is improved.

Description

Distribution method, intelligent terminal and the device with store function of Bluetooth pairing code
Technical field
This application involves Bluetooth pairing technical fields, and the distribution method for being specifically related to a kind of Bluetooth pairing code, intelligence are eventually End and the device with store function.
Background technique
Currently, intelligent terminal generally has Bluetooth function, to facilitate user to set intelligent terminal with other with bluetooth Standby (such as earphone, wrist-watch, vehicle-mounted) is wirelessly connected.Before intelligent terminal bluetooth is communicated with bluetooth equipment, need The two is matched, and both sides can respectively generate a pairing code at this time, and intelligent terminal bluetooth identifies that bluetooth is set by this pairing code Standby, bluetooth equipment carrys out identification intelligent terminal Bluetooth also by the pairing code, thus can when the two carries out bluetooth communication next time To efficiently identify.In the prior art, the calculating process by complexity is needed when the pairing code distribution of bluetooth, it is computationally intensive, Thus cause Bluetooth matching efficiency lower.
Summary of the invention
In order to solve the above technical problems, this application provides distribution method, intelligent terminal and the tools of a kind of Bluetooth pairing code There is the device of store function, to reduce the calculation amount when distribution of Bluetooth pairing code, improves the allocative efficiency of Bluetooth pairing code.
In order to solve the above technical problems, the technical solution that the application uses is: a kind of distribution side of Bluetooth pairing code Method, method includes the following steps: getting the first bluetooth signal intensity value of bluetooth equipment;Based on the first bluetooth signal intensity Value obtains the corresponding first pairing code sequence of continuous bluetooth signal intensity value of the first setting quantity from the database pre-established Column, continuous bluetooth signal intensity value include the first bluetooth signal intensity value;The second setting number is chosen from the first pairing code sequence The pairing code of amount is to obtain the second pairing code sequence, and the second setting quantity is less than the first setting quantity;From the first pairing code sequence Middle acquisition continuous sequence identical with the second pairing code sequence, counts next bit pairing code of identical continuous sequence, will occur The most next bit pairing code of number is determined as establishing pairing code when connection with bluetooth equipment.
Wherein, it is based on the first bluetooth signal intensity value, the company of the first setting quantity is obtained from the database pre-established Continuous bluetooth signal intensity value corresponding first matches code sequence, and continuous bluetooth signal intensity value includes the first bluetooth signal intensity value The step of specifically include: centered on the first bluetooth signal intensity value, from database obtain first setting quantity it is continuous The corresponding first pairing code sequence of bluetooth signal intensity value.
Wherein, the pairing code of the second setting quantity is chosen from the first pairing code sequence to obtain the second pairing code sequence Step specifically includes: randomly selecting the pairing code of the second setting quantity from the first pairing code sequence to obtain the second pairing code sequence Column.
Wherein, the pairing code of the second setting quantity is chosen from the first pairing code sequence to obtain the second pairing code sequence Step specifically includes: from the first pairing code sequence, obtain with the first bluetooth signal intensity be worth it is corresponding match code it is adjacent the The pairing code of two setting quantity is to obtain the second pairing code sequence.
Wherein, continuous sequence identical with the second pairing code sequence is searched from the first pairing code sequence, is counted identical Next bit pairing code of continuous sequence, when being determined as the most next bit pairing code of frequency of occurrence to establish connection with bluetooth equipment Pairing code the step of after further include: the number of pairing code and bluetooth equipment when establishing connection with bluetooth equipment is established and is closed Connection.
Wherein, the step of getting the first bluetooth signal intensity value of bluetooth equipment specifically includes: first with bluetooth equipment It is secondary to match clock synchronization, the connection request of the bluetooth equipment is received, and obtain the bluetooth parameters of bluetooth equipment;It is obtained based on bluetooth parameters The first bluetooth signal intensity value current to bluetooth equipment.
Wherein, when being had not been obtained from the first pairing code sequence to other with second pairing identical continuous sequences of code sequence, It is randomly assigned to establish the pairing code of connection with bluetooth equipment.
Wherein, before the step of getting the first bluetooth signal intensity value of bluetooth equipment further include: according to bluetooth equipment Bluetooth signal intensity value and the historical record of pairing code of bluetooth equipment establish database.
In order to solve the above technical problems, another technical solution that the application uses is: a kind of intelligent terminal, the intelligence is eventually End includes: the processor and memory being mutually coupled, wherein memory is for storing the database pre-established, the first setting The computer program and the generated mediant when executing computer program that quantity, the second setting quantity, processor execute According to;When processor executes computer program, the distribution method of as above any Bluetooth pairing code is realized.
In order to solve the above technical problems, another technical solution that the application uses is: a kind of dress with store function It sets, there is the device of storage function to be stored with program data for this, and program data can be performed to realize as above any indigo plant The distribution method of tooth pairing code.
The beneficial effect of the application is: the first bluetooth signal intensity value by getting bluetooth equipment, blue based on first Tooth signal strength indication obtains the continuous bluetooth signal intensity value corresponding the of the first setting quantity from the database pre-established One pairing code sequence, continuous bluetooth signal intensity value include the first bluetooth signal intensity value, are chosen from the first pairing code sequence The pairing code of second setting quantity is to obtain the second pairing code sequence, and the second setting quantity is less than the first setting quantity, from first It matches and obtains continuous sequence identical with the second pairing code sequence in code sequence, count next bit pairing of identical continuous sequence The most next bit pairing code of frequency of occurrence is determined as establishing pairing code when connection with bluetooth equipment, it is possible to reduce blue by code Tooth matches calculation amount when code distribution, improves the allocative efficiency of Bluetooth pairing code.
Detailed description of the invention
Fig. 1 is the flow diagram of one embodiment of distribution method of the application Bluetooth pairing code;
Fig. 2 is the flow diagram of another embodiment of distribution method of the application Bluetooth pairing code;
Fig. 3 is the structural schematic diagram of one embodiment of the application intelligent terminal;
Fig. 4 is the structural schematic diagram for one embodiment of device that the application has store function.
Specific embodiment
Below in conjunction with the attached drawing in the application embodiment, the technical solution in embodiment of the present invention is carried out clear Chu is fully described by, it is clear that described embodiment is only a part of embodiment of the application, rather than whole realities Apply mode.Based on the embodiment in the application, those skilled in the art are obtained without making creative work Every other embodiment, belong to the application protection range.
Referring to Fig. 1, Fig. 1 is the flow diagram of one embodiment of distribution method of the application Bluetooth pairing code.It needs to infuse Meaning, if having substantially the same as a result, the present processes are not limited with process sequence shown in FIG. 1.Such as Fig. 1 institute Show, the distribution method of the Bluetooth pairing code of present embodiment the following steps are included:
S101: the first bluetooth signal intensity value of bluetooth equipment is got.
Bluetooth is a kind of radio technology of holding equipment short haul connection (generally in 10m), can mobile phone, Wireless messages exchange is carried out between numerous equipment such as wireless headset, laptop and related peripherals.
In the present embodiment, intelligent terminal gets the bluetooth signal intensity value of bluetooth equipment.
Wherein, wireless Bluetooth built in the intelligent terminal, including it is smart phone, tablet computer, Intelligent bracelet, wearable The smart machine of smart machine and other support Bluetooth functions.
Bluetooth equipment includes that mobile phone, tablet computer, bluetooth headset, Bluetooth watch and other electronics bluetooth-capable are set It is standby.
In the present embodiment, intelligent terminal receives the Bluetooth signal that bluetooth equipment issues, and is obtained based on the Bluetooth signal Get the bluetooth signal intensity value of bluetooth equipment.For example, intelligent terminal is smart phone, smart machine is bluetooth headset, intelligence Bluetooth module is had inside mobile phone and bluetooth equipment, when smart phone will be connect with bluetooth equipment, smart phone is opened first Bluetooth is opened, smart phone searches for the Bluetooth signal of bluetooth headset by bluetooth module, and the bluetooth connection for receiving bluetooth headset is asked It asks, and detects the bluetooth signal intensity value of bluetooth headset.Intelligent terminal to be obtained below convenient for distinguishing and describing convenience To the bluetooth signal intensity value of bluetooth equipment be named as the first bluetooth signal intensity value.
S102: being based on the first bluetooth signal intensity value, and the company of the first setting quantity is obtained from the database pre-established Continuous bluetooth signal intensity value corresponding first matches code sequence, and continuous bluetooth signal intensity value includes the first bluetooth signal intensity Value.
Wherein, which is bluetooth signal intensity value-pairing code database, and record has bluetooth signal intensity value and pairing The one-to-one relationship of code, and the bluetooth signal intensity value recorded in database is arranged by sequence from small to large or from big to small Column.Specifically, which is intelligent terminal according to the bluetooth signal intensity value of bluetooth equipment and the pairing code of bluetooth equipment Historical record pre-establish, intelligent terminal will record the bluetooth of bluetooth equipment when in the past with bluetooth equipment successful matching Signal strength indication and the pairing code used with clock synchronization so accumulate bluetooth signal intensity value and match the corresponding relationship of code, and By bluetooth signal intensity value by sequence arrangement from small to large or from big to small, to obtain bluetooth signal intensity value-pairing yardage According to library, for example, as shown in table 1.
Table 1
Bluetooth signal intensity value Match code
118 Match code 1
119 Match code 1
120 Match code 2
121 Match code 2
122 Match code 1
123 Match code 1
124 Match code 2
125 Match code 2
126 Match code 1
127 Match code 2
128 Match code 2
129 Match code 4
130 Match code 1
131 Match code 1
132 Match code 2
133 Match code 2
Intelligent terminal is got after the first bluetooth signal intensity value for connecting bluetooth equipment, inquires first in the database The continuous Bluetooth signal of bluetooth signal intensity value and the first setting quantity including the first bluetooth signal intensity value is strong Angle value, this recorded in database first set corresponding pairing code of continuous bluetooth signal intensity value of quantity as the first pairing Code sequence.
For example, the first bluetooth signal intensity value is 126, and first to set quantity strong as the 15, including first Bluetooth signal The first quantity 15 continuous bluetooth signal intensity values of setting including angle value 126 take 118,119 ..., 132, inquiry table 1 must To first pairing code sequence be: pairing code 1, pairing code 1, pairing code 2, pairing code 2, pairing code 1, pairing code 1, pairing code 2, Match code 2, pairing code 1, pairing code 2, pairing code 2, pairing code 4, pairing code 1, pairing code 1, pairing code 2.
S103: from first pairing code sequence in choose second setting quantity pairing code to obtain the second pairing code sequence, Second setting quantity is less than the first setting quantity.
Specifically, it after intelligent terminal obtains the first pairing code sequence, can be randomly selected from the first pairing code sequence The pairing code of second setting quantity, to obtain the second pairing code sequence.Second pairing code sequence is set by the second of above-mentioned selection The pairing code of quantity arranges to be formed.
Then the example of S102 is illustrated, and second sets quantity as 3, random from above-mentioned first pairing code sequence Selection the second setting 3 pairing codes of quantity: pairing code 1, pairing code 2, pairing code 2 obtain the second pairing code sequence are as follows: pairing code 1, code 2, pairing code 2 are matched.
S104: continuous sequence identical with the second pairing code sequence is obtained from the first pairing code sequence, is counted identical Next bit pairing code of continuous sequence, when being determined as the most next bit pairing code of frequency of occurrence to establish connection with bluetooth equipment Pairing code.
After intelligent terminal has obtained the second pairing code sequence, successively inquired one by one since one end of the first pairing code sequence Continuous sequence identical with the second pairing code sequence, and next pairing code of the identical continuous sequence inquired every time is recorded, Then stop inquiring when inquiring the other end of the first pairing code sequence, wherein continuous sequence in the first pairing code sequence by connecting The pairing code of second setting quantity of continuous arrangement is formed.Specifically, if first sets quantity as n, the second setting quantity is m, intelligence Energy terminal carries out first time inquiry after having obtained the second pairing code sequence, and the first pairing code sequence is successively inquired in inquiry for the first time 1st, the 2nd ..., m-th pairing code, arrangement obtain a continuous sequence, by the continuous sequence with second pairing code sequence into Row compares, and then continues second of inquiry after (m+1) a pairing code in the first pairing of record code sequence if they are the same, if not It is same then be directly entered second of inquiry, the 2nd, the 3rd ..., (m of second of inquiry successively the first pairing of inquiry code sequence + 1) a pairing code, arrangement obtain a continuous sequence, which are compared with the second pairing code sequence, if they are the same then Continue third time after (m+2) a pairing code in record the first pairing code sequence to inquire, the is directly entered if difference It inquires, so inquires backward three times, until completing (n-m) secondary inquiry.
Intelligent terminal counts the pairing code being recorded in above-mentioned query process after completing (n-m) secondary inquiry, and It selects to be recorded the most pairing code of number to establish pairing code when connection with bluetooth equipment.
Then the example of S102, S103 are illustrated, it is above-mentioned first pairing code sequence in inquire with it is above-mentioned The second pairing identical continuous sequence of code sequence and its next pairing code have: pairing code 1- pairing code 2- pairing code 2- pairing code 1, Match code 1- pairing code 2- pairing code 2- pairing code 1, pairing code 1- pairing code 2- pairing code 2- matches code 4.Wherein, it is being recorded Next pairing code in, pairing code 1 be recorded twice, pairing code 4 be recorded once, selection be recorded number at most match It is pairing code when smart machine and bluetooth equipment establish connection to code 1.
In the implementation process of present embodiment, had not been obtained in code sequence when being matched from first to other and the second pairing code When the identical continuous sequence of sequence, then it is randomly assigned to establish the pairing code of connection with bluetooth equipment.Specifically, if intelligent terminal Other continuous sequences identical with the second pairing code sequence are not inquired in above-mentioned (n-m) secondary query process, then from first The pairing code that connection is established with bluetooth equipment is randomly assigned in pairing code sequence.
It is different from the prior art, the distribution method intelligent terminal of the Bluetooth pairing code of present embodiment is set by obtaining bluetooth Standby bluetooth signal intensity value, and simply compared based on the bluetooth signal intensity value pre-established-pairing code database Analytical calculation, so that it may which pairing code when obtaining connecting with bluetooth equipment reduces the calculation amount when distribution of Bluetooth pairing code, mentions The high allocative efficiency of Bluetooth pairing code.
Referring to Fig. 2, Fig. 2 is the flow diagram of another embodiment of distribution method of the application Bluetooth pairing code.Such as Shown in Fig. 2, the distribution method of the Bluetooth pairing code in present embodiment includes:
S201: the first bluetooth signal intensity value of bluetooth equipment is got.
Specifically, intelligent terminal is matching clock synchronization with bluetooth equipment for the first time, receives the connection request from bluetooth equipment, and obtain Take the bluetooth parameters of bluetooth equipment;The first current bluetooth signal intensity value of bluetooth equipment is got based on bluetooth parameters.
Wherein, before S201 further include: intelligent terminal is according to the bluetooth signal intensity value and bluetooth equipment of bluetooth equipment The historical record of pairing code pre-establish bluetooth signal intensity value-pairing code database.Specifically, intelligent terminal in the past with When bluetooth equipment successful matching, the pairing code that will record the bluetooth signal intensity value of bluetooth equipment and used with clock synchronization, so It accumulates bluetooth signal intensity value and matches the corresponding relationship of code, to obtain bluetooth signal intensity value-pairing code database.
Further, after intelligent terminal gets the first bluetooth signal intensity value of bluetooth equipment, it is based on the first bluetooth Signal strength indication, intelligent terminal can obtain the first setting from the bluetooth signal intensity value pre-established-pairing code database The corresponding first pairing code sequence of the continuous bluetooth signal intensity value of quantity, continuous bluetooth signal intensity value are believed including the first bluetooth Number intensity value.Specifically, intelligent terminal obtains the step of the first pairing code sequence preferably following S202 steps.
S202: centered on the first bluetooth signal intensity value, from the bluetooth signal intensity value-pairing yardage pre-established According to the corresponding first pairing code sequence of the continuous bluetooth signal intensity value for obtaining the first setting quantity in library.
After intelligent terminal gets the first bluetooth signal intensity value of bluetooth equipment, with the first bluetooth signal intensity value it is Center value obtains the continuous bluetooth signal intensity value of the first setting quantity from database, first setting recorded in database It is the first pairing code sequence that the continuous bluetooth signal intensity of quantity, which is worth corresponding pairing code, wherein first sets quantity as surprise Number, first sets the central value of the continuous bluetooth signal intensity value of quantity as the first bluetooth signal intensity value.
After intelligent terminal obtains the first pairing code sequence, matching for the second setting quantity is chosen from the first pairing code sequence The step of to code to obtain the second pairing code sequence preferably following S203 steps.
S203: the second adjacent setting of pairing code corresponding with the first signal strength indication is chosen from the first pairing code sequence The pairing code of quantity is to obtain the second pairing code sequence.
After intelligent terminal obtains the first pairing code sequence, preferably chosen and the first signal from the first pairing code sequence The pairing code of the second adjacent setting quantity of the corresponding pairing code of intensity value, obtains the second pairing code sequence.
Optionally, the pairing code of the second setting quantity is continuously arranged in the first pairing code sequence.
S204: continuous sequence identical with the second pairing code sequence is obtained from the first pairing code sequence, is counted identical Next bit pairing code of continuous sequence, when being determined as the most next bit pairing code of frequency of occurrence to establish connection with bluetooth equipment Pairing code.
After intelligent terminal has obtained the second pairing code sequence, successively inquired one by one since one end of the first pairing code sequence Continuous sequence identical with the second pairing code sequence, and next pairing code of the identical continuous sequence inquired every time is recorded, Then stop inquiring when inquiring the other end of the first pairing code sequence.Specifically, if first sets quantity as n, second is set Quantity is m, and intelligent terminal carries out first time inquiry after having obtained the second pairing code sequence, and successively inquiry first is matched for inquiry for the first time It to the 1st of code sequence, the 2nd ..., m-th of pairing code, is arranged successively to obtain a continuous sequence, by the continuous sequence and the Two pairing code sequences are compared, and then continue the after (m+1) a pairing code of the first pairing of record code sequence if they are the same Secondary inquiry is directly entered second of inquiry if different, and the 2nd of the first pairing code sequence is successively inquired in second of inquiry, 3rd ..., (m+1) a pairing code, are arranged successively to obtain a continuous sequence, by the continuous sequence and the second pairing code sequence It is compared, then continues third time after (m+2) a pairing code of the first pairing of record code sequence if they are the same and inquire, if not It is same then be directly entered third time inquire, so inquire backward, until complete (n-m) secondary inquiry.Intelligent terminal completes (n- M) after secondary inquiry, the pairing code being recorded in above-mentioned query process is counted, and selects to be recorded the most pairing code of number To establish pairing code when connection with bluetooth equipment.
In the implementation process of present embodiment, if exist simultaneously it is multiple be recorded the most pairing code of number, from It is multiple to be recorded in the most pairing code of number random selection one and match code as pairing when establishing connection with bluetooth equipment Code.
In the present embodiment, it is contemplated that after carrying out (n-m) secondary inquiry to the first pairing code sequence, may still have not been obtained The case where to the second pairing code sequence identical continuous sequence, the preferably second pairing code sequence are by from the first pairing code sequence The continuous pairing code of the second specified quantity is selected in column and is obtained.
It in other embodiments, further include following S205 after S204.
S205: pairing code when establishing connection with bluetooth equipment is associated with the foundation of the number of bluetooth equipment.
Wherein, the number of bluetooth equipment is the unique number of the bluetooth of bluetooth equipment for identification.
Specifically, it the pairing code when intelligent terminal obtains establishing connection with bluetooth equipment and is matched for the first time with bluetooth equipment When, the number of the available bluetooth equipment of intelligent terminal, and the number of the pairing code and bluetooth equipment that use with clock synchronization is established Association, pairing when can obtain establishing connection with bluetooth equipment according to the number of bluetooth equipment to match clock synchronization intelligent terminal next time Code can further improve the efficiency of Bluetooth pairing connection.
It is different from the prior art, the distribution method intelligent terminal of the Bluetooth pairing code of present embodiment is by getting bluetooth The bluetooth signal intensity value of equipment, and according to the bluetooth signal intensity value pre-established-pairing code database, it only need to be by simple Analyses and comparison calculating process can be obtained by pairing code when connecting with bluetooth equipment, reduce Bluetooth pairing code distribution when Calculation amount improves the allocative efficiency of Bluetooth pairing code.
Referring to Fig. 3, Fig. 3 is the structural schematic diagram of one embodiment of the application intelligent terminal.As shown in figure 3, intelligence is eventually End 30 includes the memories 31 and processor 32 that are mutually coupled, wherein memory 31 is for storing the database pre-established, the One setting quantity, second setting quantity, processor 32 execute computer program and when executing computer program it is produced Intermediate data;When processor 32 executes computer program, distribution method described in any of the above embodiments is realized.
Wherein, wireless Bluetooth built in the intelligent terminal 30, including smart phone, tablet computer, Intelligent bracelet, can wear It wears smart machine and other supports the smart machine of Bluetooth function.
Processor 32 controls the operation of intelligent terminal, and processor 32 can also be known as CPU (Central Processing Unit, central processing unit), the processing capacity with signal.Processor 32 can be general processor, IC chip, Digital signal processor, specific integrated circuit and other devices with signal handling capacity.
Processor 32 is used for: obtaining the first bluetooth signal intensity value of bluetooth equipment;Based on the first bluetooth signal intensity value, The corresponding first pairing code sequence of continuous bluetooth signal intensity value of the first setting quantity is obtained from the database pre-established, Continuous bluetooth signal intensity value includes the first bluetooth signal intensity value;The second setting quantity is chosen from the first pairing code sequence Pairing code is to obtain the second pairing code sequence, and the second setting quantity is less than the first setting quantity;It is obtained from the first pairing code sequence Continuous sequence identical with the second pairing code sequence is taken, next bit pairing code of identical continuous sequence is counted, by frequency of occurrence Most next bit pairing codes is determined as establishing pairing code when connection with bluetooth equipment.
Memory 31 is held for storing the database pre-established, the first setting quantity, the second setting quantity, processor 32 Capable computer program and the generated intermediate data when executing computer program.
It is different from the prior art, the bluetooth signal intensity value and root that present embodiment intelligent terminal passes through acquisition bluetooth equipment According to the bluetooth signal intensity value pre-established-pairing code database, it need to only pass through simple analyses and comparison calculating process Pairing code when obtaining connecting with bluetooth equipment reduces the calculation amount when distribution of Bluetooth pairing code, improves Bluetooth pairing code Allocative efficiency.
Present invention also provides a kind of devices with store function, and there is the device of store function to be stored with program number for this According to the program data can be performed to realize distribution method described in any of the above embodiments.Referring to Fig. 4, Fig. 4 is the application tool There is the structural schematic diagram of one embodiment of device of store function.In present embodiment, there is the device 40 of store function to deposit for this At least one program data or instruction 41 are contained, program data or instruction 41 can be performed described in any of the above embodiments to realize Distribution method.
The device 40 with store function is specifically as follows USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. can store program The medium of data either or is stored with the server of the program data 41 perhaps the terminal server or terminal can The program data 41 of storage is sent to other equipment operation, or can also be with the program data of the self-operating storage.
As can be seen from the above description, the application stores program data by the device with store function, can reduce intelligence Calculation amount when terminal distribution Bluetooth pairing code, and then the time of Bluetooth pairing connection is reduced, to promote user experience.
The beneficial effect of the application is: being different from the prior art, the application intelligent terminal is by getting bluetooth to be connected The bluetooth signal intensity value of equipment, and calculated according to the data in the bluetooth signal intensity value pre-established-pairing code database The currently pairing code of bluetooth equipment to be connected reduces the calculation amount when distribution of Bluetooth pairing code, can more quickly generate and match To code, to facilitate the use of the two, user experience is promoted, is brought convenience for user.
The foregoing is merely some embodiments of the application, are not intended to limit the protection scope of the application, all benefits The equivalent device made by present specification and accompanying drawing content or equivalent process transformation are applied directly or indirectly in other phases The technical field of pass similarly includes in the scope of patent protection of the application.

Claims (10)

1. a kind of distribution method of Bluetooth pairing code, which comprises the following steps:
Get the first bluetooth signal intensity value of bluetooth equipment;
Based on the first bluetooth signal intensity value, the continuous bluetooth of the first setting quantity is obtained from the database pre-established The corresponding first pairing code sequence of signal strength indication, the continuous bluetooth signal intensity value includes first bluetooth signal intensity Value;
The pairing code of the second setting quantity is chosen from the first pairing code sequence to obtain the second pairing code sequence, described the Two setting quantity are less than the first setting quantity;
Continuous sequence identical with the second pairing code sequence is obtained from the first pairing code sequence, is counted described identical Continuous sequence next bit pairing code, the most next bit pairing code of frequency of occurrence is determined as and the bluetooth equipment Establish pairing code when connection.
2. distribution method according to claim 1, which is characterized in that it is described to be based on the first bluetooth signal intensity value, The corresponding first pairing code sequence of continuous bluetooth signal intensity value of the first setting quantity is obtained from the database pre-established, The continuous bluetooth signal intensity value includes the steps that the first bluetooth signal intensity value specifically includes:
Centered on the first bluetooth signal intensity value, the continuous bluetooth of the first setting quantity is obtained from the database The corresponding first pairing code sequence of signal strength indication.
3. distribution method according to claim 1 or 2, which is characterized in that described to be selected from the first pairing code sequence The pairing code of the second setting quantity is taken to specifically include the step of obtaining the second pairing code sequence:
The pairing code of the second setting quantity is randomly selected from the first pairing code sequence to obtain the second pairing code sequence Column.
4. distribution method according to claim 2, which is characterized in that described to choose the from the first pairing code sequence The pairing code of two setting quantity the step of obtaining the second pairing code sequence to specifically include:
From the first pairing code sequence, obtains to be worth with first bluetooth signal intensity and corresponding match adjacent described of code The pairing code of second setting quantity is to obtain the second pairing code sequence.
5. distribution method according to claim 1, which is characterized in that it is described from it is described first pairing code sequence in search with Described second matches the identical continuous sequence of code sequence, counts next bit pairing code of the identical continuous sequence, will occur After the step of pairing code when the most next bit pairing code of number is determined as establishing connection with the bluetooth equipment also Include:
By it is described establish connection with the bluetooth equipment when the number foundation of pairing code and the bluetooth equipment be associated with.
6. distribution method according to claim 1, which is characterized in that first Bluetooth signal for getting bluetooth equipment The step of intensity value, specifically includes:
Match clock synchronization for the first time with the bluetooth equipment, receives the connection request of the bluetooth equipment, and obtain the bluetooth equipment Bluetooth parameters;
The first current bluetooth signal intensity value of the bluetooth equipment is got based on the bluetooth parameters.
7. distribution method according to claim 1, which is characterized in that the distribution method further include:
When had not been obtained from the first pairing code sequence to other with described second pairing identical continuous sequences of code sequence, with The pairing code of connection is established in machine distribution with the bluetooth equipment.
8. distribution method according to claim 1, which is characterized in that first Bluetooth signal for getting bluetooth equipment Before the step of intensity value further include:
Institute is established according to the historical record of the bluetooth signal intensity value of the bluetooth equipment and the pairing code of the bluetooth equipment State database.
9. a kind of intelligent terminal characterized by comprising
The processor and memory being mutually coupled,
Wherein, the memory is for storing the database pre-established, the first setting quantity, the second setting quantity, the place Manage the computer program and the generated intermediate data when executing the computer program that device executes;
When the processor executes the computer program, such as the described in any item distribution methods of claim 1-8 are realized.
10. a kind of device with store function, which is characterized in that be stored with program data, described program data can be held Row is to realize the method according to claim 1.
CN201811258887.9A 2018-10-26 2018-10-26 Bluetooth pairing code distribution method, intelligent terminal and device with storage function Active CN109451475B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811258887.9A CN109451475B (en) 2018-10-26 2018-10-26 Bluetooth pairing code distribution method, intelligent terminal and device with storage function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811258887.9A CN109451475B (en) 2018-10-26 2018-10-26 Bluetooth pairing code distribution method, intelligent terminal and device with storage function

Publications (2)

Publication Number Publication Date
CN109451475A true CN109451475A (en) 2019-03-08
CN109451475B CN109451475B (en) 2021-11-16

Family

ID=65547621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811258887.9A Active CN109451475B (en) 2018-10-26 2018-10-26 Bluetooth pairing code distribution method, intelligent terminal and device with storage function

Country Status (1)

Country Link
CN (1) CN109451475B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150099466A1 (en) * 2013-10-07 2015-04-09 Tyfone, Inc. Audio sequence out-of-band bluetooth pairing
CN106304016A (en) * 2016-08-11 2017-01-04 惠州Tcl移动通信有限公司 The difference of a kind of mobile terminal connects the method and system of bluetooth equipment of the same name
CN106376098A (en) * 2016-09-02 2017-02-01 上海心书科技发展有限公司 Quick Bluetooth matching method
CN106792437A (en) * 2016-11-23 2017-05-31 奇酷互联网络科技(深圳)有限公司 A kind of method and mobile communication equipment for carrying out client identification module card switching
CN108293069A (en) * 2015-09-25 2018-07-17 英特尔公司 Service discovery is carried out using the beacon with ranked adjacent service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150099466A1 (en) * 2013-10-07 2015-04-09 Tyfone, Inc. Audio sequence out-of-band bluetooth pairing
CN108293069A (en) * 2015-09-25 2018-07-17 英特尔公司 Service discovery is carried out using the beacon with ranked adjacent service
CN106304016A (en) * 2016-08-11 2017-01-04 惠州Tcl移动通信有限公司 The difference of a kind of mobile terminal connects the method and system of bluetooth equipment of the same name
CN106376098A (en) * 2016-09-02 2017-02-01 上海心书科技发展有限公司 Quick Bluetooth matching method
CN106792437A (en) * 2016-11-23 2017-05-31 奇酷互联网络科技(深圳)有限公司 A kind of method and mobile communication equipment for carrying out client identification module card switching

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
万君亚: "基于Android蓝牙通信技术的优化", 《电子世界》 *

Also Published As

Publication number Publication date
CN109451475B (en) 2021-11-16

Similar Documents

Publication Publication Date Title
US20170154327A1 (en) Mobile Payment Method and Apparatus and Near Field Communication Device
CN107360536A (en) Control method, terminal device and the computer-readable recording medium of terminal device
CN101315425A (en) Article management system
CN105007560A (en) Method and system for confirming pairing connection of terminal equipment
CN104854883A (en) Nfc device comprising configurable notification means
CN104954480A (en) Equipment parameter setting method and device
CN105989079A (en) Method and apparatus for obtaining device fingerprint
CN110611876A (en) Indoor asset management method, device and system
CN108521647A (en) A kind of matching method and bluetooth master of bluetooth SIM card
CN109451475A (en) Distribution method, intelligent terminal and the device with store function of Bluetooth pairing code
CN112801252B (en) Information tracing and tracing oriented industrial control perception Internet of things system
CN102508839B (en) Data processing device and data processing method
CN103249118A (en) Wireless access point selection method and electronic terminals
US20130210348A1 (en) Apparatus and method for providing near field communication for mobile device
CN103049784B (en) A kind of radio-frequency SIM card and STK menu setecting thereof and application process
KR20060106619A (en) Mobile rfid reader, mobile device and method for setting rf tx power
CN102801849A (en) Method for processing radio frequency subscriber identity module (SIM) card wireless application menu through SIM card tool kit (STK) menu and mobile terminal
CN102682535A (en) Mobile payment method, device and system
CN109409061A (en) The method and apparatus of authentication
CN109963318A (en) Family wireless network quick connecting method, equipment, system and device
WO2021088251A1 (en) Smart home control center
CN105160722A (en) Attendance checking system and method
CN109151862B (en) Base station information rapid configuration method, storage medium and mobile terminal
CN105072561A (en) Method, device and system of sharing information of friend
CN101901362A (en) Automatic switching method and device of non-contact application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant