CN107221052B - Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method - Google Patents
Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method Download PDFInfo
- Publication number
- CN107221052B CN107221052B CN201710343843.5A CN201710343843A CN107221052B CN 107221052 B CN107221052 B CN 107221052B CN 201710343843 A CN201710343843 A CN 201710343843A CN 107221052 B CN107221052 B CN 107221052B
- Authority
- CN
- China
- Prior art keywords
- signal strength
- value
- strength indication
- blue
- intelligence terminal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07C—TIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
- G07C9/00—Individual registration on entry or exit
- G07C9/00174—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
- G07C9/00309—Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/021—Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention relates to a kind of memory, blue-tooth intelligence terminal, distance calculating method and enabling control method, which includes: the signal strength indication that blue-tooth intelligence terminal obtains the reception signal from control of bluetooth access equipment in real time;A sliding window is opened, and obtains newest first quantity signal strength indication in the sliding window, first quantity is less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;According to the normal distribution model pre-established obtain each signal strength indication corresponding to weighted value, and the weighted value according to corresponding to each signal strength indication calculates the weighted average of the first quantity signal strength indication;The distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the weighted average.Implement technical solution of the present invention, may make that distance value calculated is more acurrate in the case where user's walking is advanced.
Description
Technical field
The present invention relates to intelligence community field more particularly to a kind of memory, blue-tooth intelligence terminal, distance calculating method and
Enabling control method.
Background technique
With the development of modern people's improvement of living standard and community, people propose living conditions higher and higher
The safety precaution of demand, community also has been to be concerned by more and more people.With the rapid development of digitizing technique and network technology,
Gate inhibition's technology is also grown rapidly, it has surmounted simple gateway and key management already, and it is a set of complete for being developing progressively
Whole access management system becomes and solves the effective measures that important department entrance realizes safety precaution management.
Since Bluetooth transmission can realize that the short distance of signal is read, access control system uses bluetooth more and more
To carry out automatic authorization enabling.Currently, control of bluetooth access management system be all developed in the APP layer of blue-tooth intelligence terminal, and
And usually there is the function of delay automatic door opening at the gate of control of bluetooth access equipment, so, blue-tooth intelligence terminal is needed in user from big
Control is opened the door when door certain distance (such as 1.5 meters).For example, process of specifically opening the door are as follows: user enters control of bluetooth access equipment
When in broadcasting area, when blue-tooth intelligence terminal judges that user has enabling permission, and its distance value from control of bluetooth access equipment
When reaching pre-determined distance value, door opening command is sent to control of bluetooth access equipment, in this way, just can be used family when going at doorway, greatly
Door is just opened.
Currently, blue-tooth intelligence terminal is when calculating it with a distance from control of bluetooth access equipment, it usually needs first obtain from bluetooth
Access control equipment receives the signal strength indication of signal, and finds in practical applications, and blue-tooth intelligence terminal is obtaining reception signal
When signal strength indication, due to being influenced by PCB, antenna etc., acquired signal strength indication can be made to fluctuate very big, generally up to
30dB, therefore generally use by way of reading multiple signal strength indications and averaging to it and reduce this fluctuation.Root
According to the difference of hardware performance, it usually needs 18-32 signal strength indication is read, however, reading so more signal strength indication meetings
Cause the time for collecting sampled point elongated, and obviously, because user advances in walking always in calculating process, receive
Collect time time-consuming it is longer, calculated distance value error it is bigger.
Summary of the invention
The technical problem to be solved in the present invention is that being lacked for the above-mentioned calculated distance value error of the prior art is big
It falls into, a kind of memory, blue-tooth intelligence terminal, distance calculating method and enabling control method is provided.
The technical solution adopted by the present invention to solve the technical problems is: constructing a kind of blue-tooth intelligence terminal and control of bluetooth access
The distance calculating method of equipment, comprising the following steps:
S10. blue-tooth intelligence terminal obtains the signal strength indication of the reception signal from control of bluetooth access equipment in real time;
S20. a sliding window is opened, and obtains newest first quantity signal strength indication in the sliding window, it is described
First quantity is less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;
S30. according to the normal distribution model pre-established obtain each signal strength indication corresponding to weighted value, and according to
Weighted value corresponding to each signal strength indication calculates the weighted average of the first quantity signal strength indication;
S40. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the weighted average.
Preferably, in the step S30, each signal strength indication institute is obtained according to the normal distribution model pre-established
The step of corresponding weighted value includes:
S31. by the first quantity signal strength indication newest in the sliding window, sequence is successively ranked up by size;
S32. weighted value is distributed for each signal strength indication, wherein the weighted value distributed and the signal strength indication
It is related to arrange serial number.
Preferably, it in the step S32, for each signal strength indication after sequence, follows the steps below:
S321. absolute difference of the current signal strength indication respectively with all signal strength indications after sequence is calculated;
S322. the interval range where judging each absolute difference calculated respectively;
S323. the quantity of the absolute difference in each interval range is obtained, and is calculated separately in each interval range
The ratio of the quantity of absolute difference and first quantity;
S324. according to ratio calculated, weighted value is distributed for current signal strength indication.
Preferably, the step S40 includes:
S41. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
When ratio < 1, d=ratio10,
When ratio >=1, d=A*ratioB+ C,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower is calibration value, the calibration
Value is the signal strength indication obtained in specific location measurement, and ratio is ratio, and A, B, C are fitting coefficient, and d is distance value.
Preferably, the step S40 includes:
S42. calibration range that blue-tooth intelligence terminal is currently located is determined according to the weighted average, wherein by least
Two calibration values determine at least three calibration ranges;
S43. calibration value is chosen according to the calibration range being currently located, wherein the weighted average and selected mark
The ratio of definite value is less than 1, and the absolute difference of selected calibration value and the weighted average is minimum;
S44. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
D=ratio10,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower0 is selected calibration value,
The calibration value is the signal strength indication obtained in specific location measurement, and ratio is ratio, and d is distance value.
The present invention also constructs a kind of enabling control method of control of bluetooth access equipment characterized by comprising
S100. blue-tooth intelligence terminal calculates it at a distance from control of bluetooth access equipment according to above-described distance calculating method
Value;
S200. enabling permission is judged whether there is, and judges whether distance value calculated reaches preset value, if both
It is then to perform the next step suddenly;
S300. order of unlocking is sent to control of bluetooth access equipment.
The present invention also constructs a kind of blue-tooth intelligence terminal, comprising:
Receiving module, for obtaining the signal strength indication of the reception signal from control of bluetooth access equipment in real time;
Module is obtained, for opening a sliding window, and it is strong to obtain newest first quantity signal in the sliding window
Angle value, first quantity are less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;
First computing module, corresponding to obtaining each signal strength indication according to the normal distribution model pre-established
Weighted value, and the weighted value according to corresponding to each signal strength indication calculate the weighting of the first quantity signal strength indication
Average value;
Second computing module, for according to the weighted average calculate blue-tooth intelligence terminal and control of bluetooth access equipment away from
From value.
Preferably, first computing module includes:
Sequencing unit, for by the first quantity signal strength indication newest in the sliding window by size sequentially successively
It is ranked up;
Allocation unit, for distributing weighted value for each signal strength indication, wherein the weighted value and the signal distributed
The arrangement serial number of intensity value is related;
It is weighted and averaged unit, for the weighted value according to corresponding to each signal strength indication, calculates first quantity
The weighted average of signal strength indication.
The present invention also constructs a kind of memory, is stored thereon with program instruction, and described program instruction is loaded simultaneously by processor
The step of method as previously discussed is realized when execution.
The present invention also constructs a kind of blue-tooth intelligence terminal, including processor and memory, and the memory is for storing journey
The step of sequence instruction, described program instruction is loaded by the processor and executed approach described above.
Implement technical solution of the present invention, blue-tooth intelligence terminal is collected when calculating at a distance from control of bluetooth access equipment
Then lesser amt (the first quantity) a signal strength indication is collected each signal strength indication point according to normal distribution probability
With corresponding weighted value, then the weighted average of these collected signal strength indications is calculated, finally further according to weighted average
Calculate distance.In this way, when distance calculates, due to the negligible amounts of the signal strength indication of required collection, so that when collecting
Between it is also corresponding shorten, and then may make that distance value calculated is more acurrate in the case where user's walking is advanced.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.In attached drawing:
Fig. 1 is the flow chart of the distance calculating method embodiment one of blue-tooth intelligence terminal of the present invention and control of bluetooth access equipment;
Fig. 2 is the flow chart of the enabling control method embodiment one of control of bluetooth access equipment of the present invention;
Fig. 3 is the structure chart of blue-tooth intelligence terminal embodiment one of the present invention;
Fig. 4 is the structure chart of blue-tooth intelligence terminal embodiment one of the present invention.
Specific embodiment
Fig. 1 is the flow chart of the distance calculating method embodiment one of blue-tooth intelligence terminal of the present invention and control of bluetooth access equipment,
The distance calculating method of the embodiment the following steps are included:
S10. blue-tooth intelligence terminal obtains the signal strength indication of the reception signal from control of bluetooth access equipment in real time;
In this step, the reception signal obtained from control of bluetooth access equipment can be to pass through the received Bluetooth broadcast of broadcast channel
Signal can also be the blue-teeth data signal for passing through data channel reception.
S20. a sliding window is opened, and obtains newest first quantity signal strength indication in the sliding window, it is described
First quantity is less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;
In this step, illustrate first, every signal for obtaining a reception signal from control of bluetooth access equipment is strong
After angle value, just cached.The length that sliding window can be preset is the length of the first quantity signal strength indication, the
One quantity is, for example, 8.Moreover, after the signal strength indication of reception signal of every acquisition one from control of bluetooth access equipment, sliding window
Mouth just moves the length of a signal strength indication, so that the signal strength indication in sliding window is newest first quantity signal
Intensity value.It is related to hardware (the PCB, antenna) performance of blue-tooth intelligence terminal in addition, about the second quantity, and it is greater than the
A value within the scope of one quantity, such as desirable 18-32.If the hardware performance of the blue-tooth intelligence terminal is preferable, the second quantity can
A lesser value is chosen in the range, if the hardware performance of the blue-tooth intelligence terminal is poor, the second quantity can be in the range
Take a biggish value.Moreover, when determining the value of the second quantity, it can be by being determined to blue-tooth intelligence terminal test.
S30. according to the normal distribution model pre-established obtain each signal strength indication corresponding to weighted value, and according to
Weighted value corresponding to each signal strength indication calculates the weighted average of the first quantity signal strength indication;
In this step, when distributing corresponding weighted value for each signal strength indication, normal distribution law can be based on
Be allocated, that is, if μ value of certain some signal strength indication from normal distribution closer to, occur probability value it is also bigger,
Therefore, biggish weighted value is distributed for those values, conversely, then distributing lesser weighted value.Obtaining each signal strength indication
After corresponding weighted value, these signal strength indications can first be weighted, then average, that is, obtain weighted average.
S40. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the weighted average.
In a preferred embodiment, it is strong that the normal distribution model that the basis of step S30 pre-establishes obtains each signal
The step of weighted value corresponding to angle value, can comprise the following steps that
S31. by the first quantity signal strength indication newest in the sliding window, sequence is successively ranked up by size;
In this step, for example, the first quantity is 8,8 signal strength indications in sliding window are suitable by from small to large
Sequence arranges successively are as follows: D0, D1 ..., D7, it should be noted that, the intensity value of signal is negative value herein, moreover, value is smaller, illustrate from
The distance of control of bluetooth access equipment is remoter, and value is bigger, illustrates closer with a distance from control of bluetooth access equipment.
S32. weighted value is distributed for each signal strength indication, wherein the weighted value distributed and the signal strength indication
It is related to arrange serial number.
In this step, after the intensity value to this 8 signals sequences sequence, so that it may distribute weighted value by following step.
It is, of course, preferable to which ground can also abandon the intensity value of some signals before weighted value distribution, for example, abandoning two the smallest
The intensity value (D0, D1) of signal, alternatively, abandoning the intensity value (D7) of a maximum signal and the intensity of a smallest signal
It is worth (D0).Can be decimal in addition, about the weighted value distributed, and all weighted values and be 1, can also be integer certainly,
Moreover, operation efficiency can be improved when round numbers.
For example, in the above example, if the smallest two signal strength indications (D0, D1) are first abandoned, then
Weighted value is distributed for remaining 6 signal strength indications, is based on normal distribution law, signal strength indication is bigger, for the power of its distribution
Weight values are generally also bigger, if but signal strength indication be end value (the case where D7 is not abandoned), for D7 distribution weighted value again
It is smaller.For example, be D2 distribution weighted value be 1, be D3 distribution weighted value be 2, be D4 distribute weighted value be 3, be
D5 distribution weighted value be 4, be D6 distribution weighted value be 6, be D7 distribute weighted value be 2, that is to say, that in the embodiment
In, six signal strength indications have been extended to 18 signal strength indications, be respectively as follows: D2, D3, D3, D4, D4, D4, D5, D5, D5,
D5、D6、D6、D6、D6、D6、D6、D7、D7。
In addition, can be calculated according to the following formula when calculating the weighted average of the first quantity signal strength indication:
Wherein, m is the first quantity, and n is the sum of all weighted values, and Di is i-th of signal strength indication, and pi is the weight of Di
Value, J is weighted average.
Still further, for each signal strength indication after sequence, being followed the steps below in the step S32:
S321. absolute difference of the current signal strength indication respectively with all signal strength indications after sequence is calculated;
S322. the interval range where judging each absolute difference calculated respectively;
S323. the quantity of the absolute difference in each interval range is obtained, and is calculated separately in each interval range
The ratio of the quantity of absolute difference and first quantity;
S324. according to ratio calculated, weighted value is distributed for current signal strength indication.
About step S32, it is illustrated below with an example: if by 8 signal strength indications in sliding window
(dB) successively by sequence arrangement from big to small are as follows: -58, -59, -60, -62, -63, -80, -81, -84, then difference calculated
Absolute value is as shown in the table:
-58 | -59 | -60 | -62 | -63 | -80 | -81 | -84 | |
-58 | 0 | 1 | 2 | 4 | 5 | 22 | 23 | 26 |
-59 | 1 | 0 | 1 | 3 | 4 | 21 | 22 | 25 |
-60 | 2 | 1 | 0 | 2 | 3 | 20 | 21 | 24 |
-62 | 4 | 3 | 2 | 0 | 1 | 18 | 19 | 22 |
-63 | 5 | 4 | 3 | 1 | 0 | 17 | 18 | 21 |
-80 | 22 | 21 | 20 | 18 | 17 | 0 | 1 | 4 |
-81 | 23 | 22 | 21 | 19 | 16 | 1 | 0 | 3 |
-84 | 26 | 25 | 24 | 22 | 21 | 4 | 3 | 0 |
Moreover, in this embodiment, two interval ranges are arranged altogether, wherein first interval range is [0,10], the secondth area
Between range be (10,30].Then, it can determine whether the interval range where each absolute difference, moreover, being directed to each signal strength
Value, it is statistics available go out its corresponding to quantity of the absolute difference in each interval range, and calculate the ratio of the quantity and 8
Value, in this example embodiment, for the signal strength indication of -58dB, the quantity of the absolute difference within the scope of first interval is 5, and
Ratio is 5/8, and the quantity of the absolute difference within the scope of second interval is 3, and ratio is 3/8;It is strong for the signal of -59dB
Angle value, the quantity of the absolute difference within the scope of first interval are 5, and ratio is 5/8, and the difference within the scope of second interval is exhausted
Quantity to value is 3, and ratio is 3/8, etc..
In addition, it should be noted that, threshold value corresponding to each interval range can be preset, advised according to normal distribution
Rule, for absolute difference quantity within the scope of first interval the biggish signal strength indication of accounting, it is believed that the signal strength
Value be really a maximum probability value, for absolute difference quantity within the scope of second interval the biggish signal strength of accounting
Value, it is believed that the signal strength indication is really the value of a small probability.Therefore, in this embodiment, for example, settable first interval
The corresponding threshold value of range is 50%, and corresponding weighted value is 3, and the corresponding threshold value of setting second interval range is 50%, right
The weighted value answered is 1.
When having counted the quantity of absolute difference after the accounting of each interval range, it may be determined that go out: for -58dB, -
This five signal strength indications of 59dB, -60dB, -62dB, -63dB, the quantity of corresponding absolute difference is in first interval range
Interior accounting is 5/8, and is greater than 50%, at this point, can distribute biggish when distributing weighted value for five signal strength indications
Weighted value 3.And for the other three signal strength indication -80dB, -81dB, -84dB, the quantity of absolute difference is in second interval
Range accounting was respectively 5/8 (being greater than 50%), then distributed a lesser weighted value 1 for three signal strength indications.
In one alternate embodiment, step S40 includes:
S41. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
When ratio < 1, d=ratio10,
When ratio >=1, d=A*ratioB+ C,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower is calibration value, the calibration
Value is the signal strength indication obtained in specific location measurement, and ratio is ratio, and A, B, C are fitting coefficient, for example, A is
0.89976, B 7.7095, C 0.111, d are distance value.
In another alternative embodiment, step S40 is specifically included:
S42. calibration range that blue-tooth intelligence terminal is currently located is determined according to the weighted average, wherein by least
Two calibration values determine at least three calibration ranges;
In this step, for example, when carrying out fixed point calibration, settable three calibration points, specifically, away from control of bluetooth access
Calibration point is respectively set at 1 meter, 2 meters, 3 meters of equipment, moreover, the signal strength indication (dB) measured at these three fixed points is right respectively
Answer -60, -70, -80, in this way, these three calibration points just can determine four calibration ranges: the first calibration range (0,1], the second mark
Determine range (1,2], third calibration range (2,3], the 4th calibration range be greater than 3.
S43. calibration value is chosen according to the calibration range being currently located, wherein the weighted average and selected mark
The ratio of definite value is less than 1, and the absolute difference of selected calibration value and the weighted average is minimum;
In this step, it when choosing calibration value, takes absolute value greater than weighted average and closest to the calibration of average value
Value, i.e. guarantee ratio < 1.
S44. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
D=ratio10,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower0 is selected calibration value,
The calibration value is the signal strength indication obtained in specific location measurement, and ratio is ratio, and d is distance value.
In this embodiment, by the way that multiple calibration values are arranged, then according to the first quantity signal strength indication calculated
Weighted average where calibration range, determine a calibration value, then carry out again apart from calculating, compared to when ratio is greater than 1
The precision of ranging can be improved in the mode for needing to calculate distance according to matched curve.
Fig. 2 is the flow chart of the enabling control method embodiment one of control of bluetooth access equipment of the present invention, the enabling of the embodiment
Control method includes:
S100. blue-tooth intelligence terminal calculates it at a distance from control of bluetooth access equipment according to above-described distance calculating method
Value;
In this step, specifically distance value can be calculated to step S40 according to the step S10 in above-described embodiment.
S200. enabling permission is judged whether there is, and judges whether distance value calculated reaches preset value, if both
It is then to perform the next step suddenly;
S300. order of unlocking is sent to control of bluetooth access equipment
By implementing the enabling control method of the embodiment, due to blue-tooth intelligence terminal calculated and control of bluetooth access equipment
The distance between it is more acurrate, so carry out open the door control when, can avoid occur user reach gate inhibition at and Men Wei is opened or also
It does not go at gate inhibition the case where door has been opened, improves user experience.
Fig. 3 is the structure chart of blue-tooth intelligence terminal embodiment one of the present invention, and the blue-tooth intelligence terminal of the embodiment includes: to connect
It receives module 10, obtain module 20, the first computing module 30 and the second computing module 40, wherein receiving module 10 for obtaining in real time
Fetch the signal strength indication from the reception signal of control of bluetooth access equipment;Module 20 is obtained for opening a sliding window, and obtains institute
Newest first quantity signal strength indication in sliding window is stated, first quantity is less than the hardware with blue-tooth intelligence terminal
It can relevant second quantity;First computing module 30 is used to obtain each signal strength according to the normal distribution model pre-established
The corresponding weighted value of value, and the weighted value according to corresponding to each signal strength indication, it is strong to calculate the first quantity signal
The weighted average of angle value;Second computing module 40 is used to calculate blue-tooth intelligence terminal and bluetooth door according to the weighted average
Prohibit the distance value of equipment.
Further, the first computing module 30 may particularly include: sequencing unit, allocation unit and weighted average unit, and
And sequencing unit is used to by size sequentially successively arrange the first quantity signal strength indication newest in the sliding window
Sequence;Allocation unit is used to distribute weighted value for each signal strength indication, wherein the weighted value distributed and the signal strength indication
Arrangement serial number it is related;It is weighted and averaged unit and is used for the weighted value according to corresponding to each signal strength indication, calculate described first
The weighted average of quantity signal strength indication.
Further, allocation unit includes the first computation subunit, judgment sub-unit, the second computation subunit and distribution
Unit, wherein the first computation subunit for calculate current signal strength indication respectively with all signal strength indications after sequence
Absolute difference;Judgment sub-unit is used to judge the interval range where each absolute difference difference calculated;Second
Computation subunit is used to obtain the quantity of the absolute difference in each interval range, and calculates separately in each interval range
The ratio of the quantity of absolute difference and first quantity;It distributes subelement to be used for according to ratio calculated, is current
Signal strength indication distributes weighted value.
Fig. 4 is the structure chart of blue-tooth intelligence terminal embodiment two of the present invention, and the blue-tooth intelligence terminal of the embodiment includes place
Device 100 and memory 200 are managed, memory 200 is for storing program instruction, moreover, the program instruction is loaded simultaneously by processor 100
The step of executing the method for above embodiments.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any bun
Change, equivalent replacement, improvement etc., should be included within scope of the presently claimed invention.
Claims (7)
1. a kind of distance calculating method of blue-tooth intelligence terminal and control of bluetooth access equipment, which comprises the following steps:
S10. blue-tooth intelligence terminal obtains the signal strength indication of the reception signal from control of bluetooth access equipment in real time;
S20. a sliding window is opened, and obtains newest first quantity signal strength indication in the sliding window, described first
Quantity is less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;
S30. according to the normal distribution model pre-established obtain each signal strength indication corresponding to weighted value, and according to each
Weighted value corresponding to signal strength indication calculates the weighted average of the first quantity signal strength indication;
S40. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the weighted average;
In the step S30, according to the normal distribution model pre-established obtain each signal strength indication corresponding to weight
The step of value includes:
S31. by the first quantity signal strength indication newest in the sliding window, sequence is successively ranked up by size;
S32. weighted value is distributed for each signal strength indication, wherein the arrangement of the weighted value and the signal strength indication that are distributed
Serial number is related;
In the step S32, for each signal strength indication after sequence, follow the steps below:
S321. absolute difference of the current signal strength indication respectively with all signal strength indications after sequence is calculated;
S322. the interval range where judging each absolute difference calculated respectively;
S323. the quantity of the absolute difference in each interval range is obtained, and calculates separately the difference in each interval range
The ratio of the quantity of absolute value and first quantity;
S324. according to ratio calculated, weighted value is distributed for current signal strength indication.
2. the distance calculating method of blue-tooth intelligence terminal and control of bluetooth access equipment according to claim 1, which is characterized in that
The step S40 includes:
S41. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
When ratio < 1, d=ratio10,
When ratio >=1, d=A*ratioB+ C,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower is calibration value, and the calibration value is
In the signal strength indication that specific location measurement obtains, ratio is ratio, and A, B, C are fitting coefficient, and d is distance value.
3. the distance calculating method of blue-tooth intelligence terminal and control of bluetooth access equipment according to claim 1, which is characterized in that
The step S40 includes:
S42. calibration range that blue-tooth intelligence terminal is currently located is determined according to the weighted average, wherein by least two
Calibration value determines at least three calibration ranges;
S43. calibration value is chosen according to the calibration range being currently located, wherein the weighted average and selected calibration value
Ratio less than 1, and the absolute difference of selected calibration value and the weighted average is minimum;
S44. the distance value of blue-tooth intelligence terminal and control of bluetooth access equipment is calculated according to the following formula,
D=ratio10,
Wherein, rssi is the weighted average of the first quantity signal strength indication, and twpower0 is selected calibration value, described
Calibration value is the signal strength indication obtained in specific location measurement, and ratio is ratio, and d is distance value.
4. a kind of enabling control method of control of bluetooth access equipment characterized by comprising
S100. blue-tooth intelligence terminal distance calculating method according to claim 1-3 calculates itself and control of bluetooth access
The distance value of equipment;
S200. enabling permission is judged whether there is, and judges whether distance value calculated reaches preset value, if being both,
It performs the next step rapid;
S300. order of unlocking is sent to control of bluetooth access equipment.
5. a kind of blue-tooth intelligence terminal characterized by comprising
Receiving module, for obtaining the signal strength indication of the reception signal from control of bluetooth access equipment in real time;
Module is obtained, for opening a sliding window, and obtains newest first quantity signal strength indication in the sliding window,
First quantity is less than the second quantity relevant to the hardware performance of blue-tooth intelligence terminal;
First computing module, for according to the normal distribution model pre-established obtain each signal strength indication corresponding to weight
Value, and the weighted value according to corresponding to each signal strength indication calculate the weighted average of the first quantity signal strength indication
Value;
Second computing module, for calculating blue-tooth intelligence terminal at a distance from control of bluetooth access equipment according to the weighted average
Value;
First computing module includes:
Sequencing unit, for sequence successively to carry out by size by the first quantity signal strength indication newest in the sliding window
Sequence;
Allocation unit, for distributing weighted value for each signal strength indication, wherein the weighted value distributed and the signal strength
The arrangement serial number of value is related;
It is weighted and averaged unit, for the weighted value according to corresponding to each signal strength indication, calculates the first quantity signal
The weighted average of intensity value;
The allocation unit includes:
First computation subunit, for calculating difference of the current signal strength indication respectively with all signal strength indications after sequence
Absolute value;
Judgment sub-unit, for the interval range where judging each absolute difference calculated respectively;
Second computation subunit for obtaining the quantity of the absolute difference in each interval range, and calculates separately each area
Between the quantity of absolute difference in range and the ratio of first quantity;
Subelement is distributed, for distributing weighted value for current signal strength indication according to ratio calculated.
6. a kind of memory, is stored thereon with program instruction, it is characterised in that: described program instruction is loaded and executed by processor
The step of any one of Shi Shixian such as claim 1-4 the method.
7. a kind of blue-tooth intelligence terminal, including processor and memory, which is characterized in that the memory refers to for storing program
It enables, described program instruction loads the step of simultaneously perform claim requires any one of 1-4 the method by the processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710343843.5A CN107221052B (en) | 2017-05-16 | 2017-05-16 | Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710343843.5A CN107221052B (en) | 2017-05-16 | 2017-05-16 | Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107221052A CN107221052A (en) | 2017-09-29 |
CN107221052B true CN107221052B (en) | 2019-07-09 |
Family
ID=59945499
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710343843.5A Active CN107221052B (en) | 2017-05-16 | 2017-05-16 | Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107221052B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019229975A1 (en) * | 2018-06-01 | 2019-12-05 | 三菱電機株式会社 | Passage management system and passage management information setting device |
CN112533273A (en) * | 2019-09-17 | 2021-03-19 | 瑞达凯特科技(加拿大)有限公司 | Power adjusting method and device |
CN113423096B (en) * | 2020-03-02 | 2022-10-25 | Oppo广东移动通信有限公司 | Power saving control method and device, wearable device and computer-readable storage medium |
CN113112646B (en) * | 2021-03-24 | 2023-02-07 | 上海七十迈数字科技有限公司 | Method and equipment for automatically opening and closing lock of vehicle |
CN113316222B (en) * | 2021-05-26 | 2023-05-30 | Oppo广东移动通信有限公司 | Data processing method, device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102595592A (en) * | 2012-01-10 | 2012-07-18 | 西北工业大学 | Indoor positioning method for goal nodes of mobile social network |
CN105960021A (en) * | 2016-07-07 | 2016-09-21 | 济南东朔微电子有限公司 | Improved position fingerprint indoor positioning method |
CN106204817A (en) * | 2016-06-24 | 2016-12-07 | 福建求实智能股份有限公司 | A kind of control method of control of bluetooth access |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070132577A1 (en) * | 2005-12-09 | 2007-06-14 | Honeywell International Inc. | Method and apparatus for estimating the location of a signal transmitter |
-
2017
- 2017-05-16 CN CN201710343843.5A patent/CN107221052B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102595592A (en) * | 2012-01-10 | 2012-07-18 | 西北工业大学 | Indoor positioning method for goal nodes of mobile social network |
CN106204817A (en) * | 2016-06-24 | 2016-12-07 | 福建求实智能股份有限公司 | A kind of control method of control of bluetooth access |
CN105960021A (en) * | 2016-07-07 | 2016-09-21 | 济南东朔微电子有限公司 | Improved position fingerprint indoor positioning method |
Also Published As
Publication number | Publication date |
---|---|
CN107221052A (en) | 2017-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107221052B (en) | Memory, blue-tooth intelligence terminal, distance calculating method and enabling control method | |
CN107197445B (en) | Memory, Bluetooth intelligent terminal, distance calculation method and door opening control method | |
CN107359948B (en) | A kind of the spectrum prediction method, apparatus and computer readable storage medium of cognition wireless network | |
US8654722B2 (en) | Efficient channel search with sequential probability ratio testing | |
CN106842120B (en) | RSSI indoor multipath based on optimization algorithm scatters localization method | |
CN111680870B (en) | Comprehensive evaluation method for quality of target motion trail | |
CN109004997A (en) | A kind of frequency spectrum sensing method, device and computer readable storage medium | |
CN109391950B (en) | Method, device, equipment and medium for predicting terminal distribution | |
CN106162532A (en) | There is vehicle-mounted communication method and the system of cognitive function | |
CN102253365B (en) | Indoor positioning method based on estimation of wireless signal source parameters | |
CN105517019A (en) | Method for detecting LTE (Long Term Evolution) network performance by using integrated regression system | |
CN111369120A (en) | Non-invasive load monitoring method based on equipment transfer learning | |
CN113988441A (en) | Power wireless network link quality prediction and model training method and device | |
CN110780990A (en) | Performance detection method, performance detection device, server and storage medium | |
CN104868960B (en) | Ambient interferences noise level Forecasting Methodology and system | |
CN105866732A (en) | Improved MK model and WKNN algorithm combined mixed indoor positioning method | |
CN107316503B (en) | Congestion hotspot airspace sector identification method based on multi-level object element entropy weight | |
CN114742442A (en) | Trust-based participant selection method for improving data quality | |
CN109302674B (en) | WiFi indoor positioning method based on multiple filtering | |
CN105187139B (en) | A kind of outdoor radio signal reception strength map constructing method based on intelligent perception | |
CN109982368A (en) | The azimuthal check method of cell, device, equipment and medium | |
CN109769297A (en) | A kind of indoor orientation method merging multifrequency WIFI signal | |
CN110095753A (en) | A kind of localization method and device based on angle of arrival AOA ranging | |
CN108599147B (en) | Combined interval prediction method based on normal exponential smoothing method and kernel density estimation | |
CN109298376B (en) | Electric energy value transmission method and system based on standard electric energy meter group |
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 |