Background technology
WIFI sensor data acquisition is generally by being connected to certain WIFI access point, then sensing data is passed data to party in request by UDP/TCP mode is active and passive, these transducers have the functions such as information gathering, data processing and radio communication, there is WIFI compatibility issue simultaneously, need gateway, it is limited to there is number of access point in WIFI, poor stability, the feature of networking complexity.WIFI transducer can people cannot be close severe or particular surroundings in work, as weather monitoring, outer space and battlefield surroundings and information acquisition system construction etc., also can play a significant role in the disaster monitoring of floods, fire or earthquake disaster environment, this kind of scene is the common application model of WIFI transducer one class.But under this kind of scene, WIFI access point may be lacked, the data link stability of WIFI transducer is poor, and its availability may degradation under the impact of external environment.How to improve the stability of WIFI transducer, ease for use, minimizing outside rely on and become the hot issue in WIFI sensor research field.
Traditional WIFI sensor data acquisition agreement mainly designs based on reliable routing transmission policy, but these class methods need default WIFI access point usually, carry out pre-configured to network, and often data receiver and WIFI transducer need in same local area network (LAN) simultaneously.But, in disaster, WIFI access point instability, under the extreme scenes such as network failure, this type of strategy based on route often seems poor efficiency and inapplicable, more feasible method is as access point with transducer, then utilize APN to be broadcasted by sensing data, as much as possible decrease dependence, significant increase stability.
Existing WIFI sensor data acquisition strategy still also exists some shortcomings and an open question, mainly foreign access point must be had, the compatible problem of WIFI access point and work station, WIFI stable connection sex chromosome mosaicism, access point access restricted number, Network Abnormal problems etc., that understands high degree affects the compatibility of WIFI transducer in various application scenario, stability.
Goal of the invention
The object of the invention is to for data acquisition stability, compatibility, ease for use in WIFI sensor network, go dependent problem, on the policy grounds of forefathers' research, propose a kind of effective technical method, the persistent data improved in WIFI sensor network gathers stability, compatibility, ease for use, goes dependence.
In order to reach above object, basic ideas of the present invention are the modes that have employed APN encoding transmission data, utilize APN by after transducer real-time data-coding by beacons packet broadcast, sensing data party in request resolves APN after receiving the beacons bag of access point, obtains the sensing data needed.
The technical scheme that the present invention solves its technical problem is:
Step 1. disposes WIFI transducer:
A large amount of sensor node is sown in pre-monitoring region, and starts access point mode.
Step 2. sensor data acquisition:
Open sensor function, start image data.
Step 3. data encoding:
The data collected are carried out encoding, encrypting according to coding rule.
Step poly-4. arranges APN:
APN is set to the data encoded, and utilizes beacons packet broadcast, carry out APN adjustment according to sensing data simultaneously.
Step 5. Data Collection:
Demand data side opens WIFI scanning, can scan the APN of transducer, be decoded by APN according to coding rule, namely obtain the data of transducer.
Beneficial effect of the present invention:
1, compatibility issue is avoided: at present how much there is compatibility issue between access point apparatus on the market and station device, cause WIFI connection failure, and the present invention does not need work station to be linked into access point, and at present the problem that work station does not receive APN did not also occur, thus avoid compatibility issue between point device and station device.
2, stability is improved: the present invention does not need networking, thus avoids networking stability problem.
And traditional WIFI transfer of data can be comparatively large by the impact of wireless pollution, the present invention is only otherwise in the situation of the most extreme (malice pollutes wireless network), substantially unaffected.
Simultaneously WIFI sensor network often needs foreign access point, and the stability influence of access point is to the stability of whole network, and the present invention does not have access point, thus improves stability.
3, little on WIFI network impact: WIFIbeacons transmission speed is 1Mbit/s, and length is very short, this broadcast is very little on WIFI network impact, and WIFI transducer does not transmit other data simultaneously, so generally speaking WIFI network impact is very little.
4. promote transmission range: traditional WIFI sensor network generally needs signal strength signal intensity to be better than-80DBm, just stable transfer of data can be carried out, and the present invention still can stable transfer when signal strength signal intensity-100DBm, difference 20DBm is equivalent to promote linear transmission distance more than 20% under spacious condition.
5. restricted number be there is no for collection side.
6. reduce third party's development difficulty: third party only needs band WIFI equipment, and knowing coded format can use, and only has one-way data, does not have the mutual of complexity.
Embodiment:
Below in conjunction with accompanying drawing 1 and embodiment, the invention will be further described.
For temperature sensor.
The temperature sensor of band WIFI access point function is positioned over the position needing the temperature gathered, such as, in water, ground, sets up the corresponding table (see table 1) of position and sensor sequence number at receiving terminal, electrifying startup.
Table 1
| Sensor sequence number | Present position |
| 20157 | Ground |
| 20158 | 10 meters of high-altitudes |
| 20159 | Under water |
Transducer starts collecting temperature data value, after once having gathered, opens the access point function of WIFI module.According to table 2 coding rule, the temperature data collected is encoded, such as producer's title is DELAN, sensor type is TEMP, sequence number is 20157, temperature is 26 degrees Celsius, so coding result is, CGDELANTEMP201572600000000000000N, N are check code (first ignoring actual check value in embodiment).
Table 2
Amendment WIFI Access Point Name is called CGDELANTEMP201572600000000000000N, at this time the beacons packet broadcast of the title of oneself by WIFI standard can be gone out by access point, transmission range can adjust according to transmitting power, and maximum theoretical can reach 800m.
Open the WIFI scan function of sensing data receiving terminal, because the beacons bag of transducer WIFI module broadcast is complete standard, as long as so receiving terminal just can scan the title of transducer WIFI access point in the range of signal of transducer, receiving terminal does not now have restricted number.
After receiving terminal scans APN, receive and first judge whether APN is CG beginning, if not so abandoning, then 31 bytes before title are sued for peace, then to 62 remainders, then be converted into character, contrast with 32 byte datas, contrast and unsuccessfully abandon.Then receiving terminal judges transducer producer title and sensor model number, and determining is " DELAN " producer " TEMP " transducer, then according to sequence number inquiry corresponding table sensing present position (see table 1), thus judges that surface temperature is 26 degrees Celsius.Then subsequent treatment can be carried out.
When the temperature that transducer collects changes, such as 27 degree, temperature data is carried out recompile, coding result is CGDELANTEMP201572700000000000000M, amendment WIFI Access Point Name is called CGDELANTEMP201572700000000000000M, and receiving terminal is resolved.
Circulation performs above step, and the real time data of transducer just can pass to party in request.
Whole process does not have WIFI connection procedure, thus avoids the compatibility issue that WIFI connects, and simultaneously beacons bag is unusual standard, does not also find that WIFI scanning has compatibility issue at present.Whole method does not have networking process yet, there is not networking stability problem.Do not need the equipment outside transducer and access point, eliminate third party's dependence yet.Beacons packet transmission time is no more than 0.1 millisecond, does not substantially affect wireless network.Beacons packet broadcast distance connects lower data transmission distance than WIFI and has more 20%, adds the use occasion of transducer.Beacons packet broadcast can be received by the WIFI recipient of any amount, and therefore the quantity of receiving terminal is without any restriction.As long as the APN that data receiver simply resolves transducer just can obtain sensing data, development difficulty is extremely low.