Summary of the invention
For the above-mentioned technical problem existing for prior art, the invention provides a kind of object finding method based on Bluetooth signal intensity, according to the testing result of the signal strength signal intensity of the multiple position of continuous several times, the suggestion on investigation is provided clearly to user, improve the efficiency finding target item, use flexibly.
Based on an object finding method for Bluetooth signal intensity, comprise the steps:
(1) utilize mobile phone to have the target item of bluetooth module to launch to binding to search starting command, proceed to operating state from holding state after bluetooth module receives this order and launch Bluetooth signal with high frequency to surrounding;
(2) utilize mobile phone collection organize more described in Bluetooth signal and detect and obtain corresponding signal strength values, calculate a valid signal strengths according to the signal strength values that this collects all Bluetooth signals by Denoising Algorithm;
(3) mobile phone based on described valid signal strengths by multilevel iudge for user provides suggestion of advancing, guide user progressively close to target item.
As follows by the idiographic flow of Denoising Algorithm calculating valid signal strengths in described step (2):
2.1 collect the signal strength values of all Bluetooth signals for this, remove wherein after all maximum signal values and all minimum signal strength values, if also remain other signal strength values, perform step 2.2, if do not remain other signal strength values, then retain all maximum signal values and all minimum signal strength values, and the mean value calculating all signal strength values is as valid signal strengths;
Mode (numerical value that in one group of data, occurrence number is maximum) in 2.2 other signal strength values of statistics residue, if there is a mode, performs step 2.3, if there is two or more mode, performs step 2.4;
2.3 centered by the mode that this is unique, the absolute value collecting other and this mode difference is less than or equal to all signal strength values of 1, these signal strength values and all signal strength values compositions corresponding to this mode is gathered and asks its mean value as valid signal strengths;
2.4 make the maximum in all modes and minimum value set up a closed interval as two ends, calculate the mean value of all signal strength values in this closed interval as valid signal strengths.
In described step (3) mobile phone based on valid signal strengths by multilevel iudge for user provides suggestion of advancing, specifically judge that flow process is as follows:
3.1 initial time subscriber stations calculate a valid signal strengths in original place by step (2), and the suggestion optional direction of user moves ahead after certain distance and stands firm, and performs the valid signal strengths that step (2) calculates current position;
3.2 obtain the valid signal strengths of current position after, judge that this valid signal strengths is greater than or is less than the valid signal strengths of last position:
If be greater than, stand firm after continuing to move ahead certain distance along current direction, perform the valid signal strengths that step (2) calculates current position, and enter step 3.3 and judge;
If be less than, stand firm after current opposite direction moves ahead certain distance, perform step (2) and calculate the valid signal strengths of current position, and enter step 3.3 and judge;
3.3 obtain the valid signal strengths of current position after, judge that this valid signal strengths is greater than or is less than the valid signal strengths of last position:
If be greater than, stand firm after continuing to move ahead certain distance along current direction, perform the valid signal strengths that step (2) calculates current position, and then carry out judging until find target item according to step 3.3 circulation;
If be less than, stand firm after current left direction or right direction move ahead certain distance, perform the valid signal strengths that step (2) calculates current position, and then carry out judging until find target item according to step 3.3 circulation.
After user finds target item, utilize mobile phone to launch standby command to it, proceed to holding state from operating state after the bluetooth module of target item receives this order and launch Bluetooth signal with low frequency to surrounding; Can, while guarantee is compared with low power consumption, make to lay oneself open to visible state.
User utilizes mobile phone to have the target item of bluetooth module to launch electricity quantity inquiring order to binding, and whether bluetooth module receives the backward mobile phone of this order and returns information about power, and is shown by information about power by mobile phone, need to charge to bluetooth module with reminding user.
The present invention utilizes low-power consumption bluetooth equipment as sender unit, utilize mobile terminal as receiving system, the interference of environment is reduced by software algorithm at receiving system, and the testing result of signal strength signal intensity according to the multiple position of continuous several times, provide the suggestion on investigation clearly to user, improve the efficiency finding target item; Low-power consumption bluetooth equipment only needs to use button cell just can power for a long time, is in state at ordinary times, sends signal with lower frequency; When dispensing device wishes to find receiving system, send starting command to activate receiving system to operating state, send signal with upper frequency; After searching process terminates, again send standby command and make receiving system again enter holding state, thus effectively improve the cruising time of receiving system.
The present invention does not need the deployment carrying out extensive Bluetooth signal base station, do not need the configuration carrying out complicated blueteeth network, do not need to carry out mathematical modeling to the electromagnetic environment of complexity, do not need to carry out parameter adjustment according to different hardware provider yet, only utilize the slave computer compact of miniature band bluetooth module, be easy to the feature be attached on target item, in conjunction with the algorithm solution that mobile phone terminal software provides, just realize the searching to any easily loss or important item, use flexibly, precision is found high under special scenes, efficiency is high, the particular demands of domestic consumer can be met.
Embodiment
In order to more specifically describe the present invention, below in conjunction with the drawings and the specific embodiments, technical scheme of the present invention is described in detail.
In present embodiment, the Bluetooth function that mobile phone terminal software utilizes mobile phone itself to configure, uses operating system aspect to be supplied to the interface of developer, carries out the search of target slave computer bluetooth equipment name, the collection of pairing and Bluetooth signal; Filtering algorithm is utilized to process the data collected; According to next step behavior of route proposed recommendations user.
Mobile phone terminal software carries out, until namely the bluetooth module searching out target slave computer is stopped by user according to following steps circulation:
Step one:
User be still in original place wait for, software now circulate carry out to pairing bluetooth equipment search.When after the bluetooth equipment searching pairing at every turn, collect the signal strength signal intensity of bluetooth equipment broadcast singal at once, and stop current search, start to search for next time, realize the Quick Acquisition of the Bluetooth signal intensity to some with this.When suspending search after the signal strength signal intensity collecting some, enter step 2.
Step 2:
The Denoising Algorithm for Bluetooth signal characteristic distributions is integrated with in mobile phone terminal software, the feature frequent according to Bluetooth signal sudden change, change is unstable, and in conjunction with the reality that collecting quantity in actual use procedure is limited, the Bluetooth signal intensity of the some collected is carried out denoising targetedly, as shown in Figure 1; Returning results of process is the valid signal strengths this time gathered:
1) remove all maximum and minimum, the interference produced to avoid sign mutation, enters step 2).If there is no remaining signal strength signal intensity after removing, then retain all maximums and minimum value, calculate the arithmetic average of all signal strength signal intensities and directly return, not carrying out following step.
2) add up the mode in remaining signal strength values, find and the desirable immediate value of effect signal strength signal intensity.If only have a mode, then enter step 3).If there is two or more mode, then enter step 4).
3) centered by mode, collect all be less than or equal to the absolute value of the difference of mode 1 signal strength signal intensity.Calculate the arithmetic mean number of these signal strength signal intensities and return.
4) with the two ends that the minimum value a of all mode crowds and maximum b is interval, collect all a of being more than or equal to and be less than or equal to the signal strength signal intensity of b.Calculate the average of these signal strength signal intensities and return.
Step 3:
Finally, the route recommendation system valid signal strengths obtained being passed to we carries out following process, and returning results of process provides suggestion to next step route selection of user, as shown in Figure 2; And record the Boolean true (T or F) of this time suggestion:
1) if this time valid signal strengths is comparatively large, illustrate that target and user are very close, then advise that user finds at one's side voluntarily.Enter step 2).
2) if this is first valid signal strengths, then do not record the true value of this time suggestion, return suggestion user and select arbitrarily a direction advance certain distance.If not first valid signal strengths, enter step 3).
3) compare with previous valid signal strengths, if be less than previous signal strength signal intensity, then record this time advises that the true value of b is F, if be greater than previous signal strength signal intensity, then the true value recording this time suggestion b is T.Next check previous suggestion true value a, advise that true value b forms with this and advise that true value is to (a, b): a is previous suggestion true value, and b this time advises true value.The effective value of a is T, F, E, and the effective value of b is T, F: wherein, E represents a kind of " sky " value being different from T and F.Enter step 4).
4) if (a, b)=(E, T), then return suggestion user and continue the advance of current direction.
(if a, b)=(E, F), then return suggestion customer reverse.
(if a, b)=(F, T), then advise that user selects to continue current direction and advances.
(if a, b)=(F, F), then advise that user selects to advance to the left or to the right, and change this suggestion true value b into E.
(if a, b)=(T, T), then advise that user continues current direction and advances.
(if a, b)=(T, F), then advise that user selects to advance to the left or to the right, and change this suggestion true value b into E.
5) when the restriction being subject to actual place, when user cannot walk according to the direction of suggestion, user should manually stop this finding, and restarts to find along any direction from current location.
User advances after a segment distance according to current suggestion and is still in original place, waits for that software carries out above three steps and provides route suggestion next time, so moves in circles, until user searches out the bluetooth module of target slave computer.Below provide an instantiation:
As shown in Figure 3, first user needs to have the mobile phone that has Bluetooth function, and installs this mobile phone terminal software.After user opens mobile phone terminal software, first program can judge that whether the mobile phone of user is with Bluetooth function: if having, then continue; Otherwise exit and give user the prompting not having Bluetooth function.Then, user directly can select the target device that will find in the target device list of having collected; Or user also can select to search for, and select the bluetooth module of the arbitrary target slave computer searched.After the bluetooth module that have selected the target slave computer that will find, the bluetooth module of program automatic linking objective slave computer at once, sends starting command make it enter operating state that high-frequency sends broadcast singal, to wait to find to it.Then, user click START button start find.Program, after the signal strength information of the Bluetooth signal of broadcasting receiving continuous print 10 target slave computers, is suspended this search, these 10 values is carried out denoising, produces a Bluetooth signal intensity level accurately.According to this Bluetooth signal intensity level and the Bluetooth signal intensity level of last time, pass course proposed algorithm, provides the suggestion of track route and presents to user, and waits for that user clicks again and " continue search " button.If certain Bluetooth signal intensity level is once higher than a certain limit value, can judge that active user has entered within the scope of one meter of the bluetooth module of target slave computer, now prompting user has entered within the scope of one meter of target device by program, and advises that user rakes about.Period, user manually can stop this search at any time or directly restart search.Especially when the restriction due to actual place, when user cannot defer to the route walking that program advises, current this manually should be stopped to take turns searching, and again click " " button restarts searching in current location in beginnings.
In this example, as mobile phone, its specific works flow process is as follows:
1) bluetooth device name that the target slave computer that user mates the searching of current needs on mobile phone terminal software broadcasts out.
2) before starting searching, send from the bluetooth module of trend target slave computer and search starting command, make target Bluetooth module enter operating state.
3) user waits for certain hour, bides one's time user etc., and the many groups Bluetooth signal sent in target slave computer bluetooth module certain hour collected by mobile phone terminal software.
4) filtering process is carried out to the Bluetooth signal of the some collected, remove the noise in signal, obtain current effective Bluetooth signal intensity.
5) according to current signal strength signal intensity, in conjunction with historical signal intensity collected of biding one's time such as user's last times, for user provides the suggestion of route direction, guide user progressively close to Bluetooth signal sending module, and then find target item.
6) after end is found, mobile phone terminal software sends standby command from the bluetooth module of trend target slave computer, makes the bluetooth module of target slave computer enter holding state.
7) mobile phone terminal software is by sending the order of electricity quantity inquiring to the bluetooth module of target slave computer, after receiving the answer information of the bluetooth module of target slave computer, the dump energy of the bluetooth module of target slave computer is shown, thus reminding user changes battery in time.
As bluetooth module, its specific works flow process is as follows:
1) before user does not carry out device name coupling, be in holding state: in the standby state, the bluetooth module of slave computer periodically sends broadcast message with lower frequency, while guarantee is compared with low power consumption, makes to lay oneself open to visible state.
2) when user find need find bluetooth target device and after carrying out the coupling of device name, the bluetooth module of slave computer receives the starting command from mobile phone terminal software, enter operating state: in working order, the bluetooth module of slave computer periodically sends broadcast message with upper frequency, thus makes mobile phone terminal software in extremely rapid succession can obtain the signal strength information of the bluetooth module of slave computer.
3) after receiving the standby command from mobile phone terminal software, enter holding state: in the standby state, the bluetooth module of slave computer periodically sends broadcast message with lower frequency, while guarantee is compared with low power consumption, makes to lay oneself open to visible state.