A kind of data collection system and collecting method
Technical field
The present invention relates to wireless personal area network technical field more particularly to a kind of data collection system and data acquisition sides
Method.
Background technique
Wireless personal area network (Wireless Personal Area Network, WPAN) is a kind of using wireless connection
Personal area network.It is used in such as phone, computer, auxiliary device and a small range (work of wireless personal area network
Make range generally within 10 meters) PDA device between communication.The technology for supporting wireless personal area network includes: indigo plant
Tooth technology, purple-bee technology (ZigBee), overclocking wavelength band technique (UWB), infrared data interconnection technique (Infrared Data
Association, IrDA), home radio technology (HomeRF) etc., wherein Bluetooth technology uses in wireless personal area network
The most extensively.
Existing field of mobile terminals gradually starts universal WPAN technology, i.e., using mobile terminal as main equipment, and
Other attached data acquisition equipments are for example used to monitor the wrist strap of heartbeat situation, and wherein storage for storing data
Equipment etc. is used as and is respectively connected on the mobile terminal as main equipment from equipment, and by WPAN network.Using above-mentioned technology
It can be realized the wireless connection between the terminal and terminal in a lesser region, to replace traditional wired connection, connect
It is more flexible to connect mode, volume is smaller, more convenient operation.
But for traditional WPAN network, wherein the different signals that can mutually generate when in use from equipment are done
It disturbs, influences the usage experience of user.
Summary of the invention
According to problems of the prior art, the technical side of a kind of data collection system and collecting method is now provided
Case, it is intended to pass through master device monitors channel conditions and avoids the signal interference between equipment by way of issuing data read request,
Reduce the energy consumption from equipment;Above-mentioned technical proposal specifically includes:
A kind of data collection system, wherein including main equipment and multiple from equipment, the main equipment passes through radio individual office
Domain net connection mode and it is multiple it is described from equipment realize data interaction;
Include: in the main equipment
Spectrum measurement unit, wherein being preset with a signal strength threshold value, the spectrum measurement unit is used to believe communication
Road carries out spectrum measurement, and the received signal strength for the correspondence communication channel that measurement is obtained and the signal strength threshold
Value is compared, and exports corresponding comparison result;
Request transmitting unit connects the spectrum measurement unit, for connecing described according to the comparison result, selecting one
It receives signal strength and requests to obtain to all described persistently send from equipment lower than the communication channel of the signal strength threshold value
Take the data read request of corresponding real time data;
Data receipt unit, persistently returned by the communication channel selected for receiving described from equipment described in
Real time data;
Fitting unit connects the data receipt unit, for according to the data receipt unit receive it is all come
From the same real time data from equipment, fitting forms the change curve for being associated with the real time data, and output phase is answered
Fitting result;
Display unit connects the fitting unit, the change curve formed for showing fitting;
It is described to include: from the device
Data acquisition unit is used for the continuous collecting real time data accordingly;
Request reception unit persistently receives described in the main equipment issues for the communication channel by being selected
Data read request;
Data transmission unit is separately connected the data acquisition unit and the request reception unit, for according to
Data read request persistently sends the corresponding described of the data acquisition unit acquisition by the communication channel selected
Real time data is to the main equipment.
Preferably, the data collection system, wherein it is described from the device further include:
Storage unit is connected between the data acquisition unit and the data transmission unit, to be sent for saving
The real time data, the data transmission unit transfers from the storage unit accordingly according to the data read request
The real time data is simultaneously sent to the main equipment;
Data Management Unit is separately connected the storage unit and the data transmission unit, for passing through primary institute
The real time data sent is removed from the storage unit after stating the transmission of real time data.
Preferably, data collection system, wherein in the data acquisition unit further include:
Timestamp adding module, for adding corresponding timestamp information to the collected real time data, when described
Between stamp information be used to indicate acquisition moment of the real time data.
Preferably, data collection system, wherein in the fitting unit further include:
First judgment module, for judging institute according to the corresponding timestamp information of the real time data received
The acquisition moment of real time data is stated, and exports corresponding first judging result;
The fitting unit is all from same by what is received according to the acquisition moment according to first judging result
It is arranged successively described in one from the real time data of equipment and is fitted to form the corresponding change curve and export.
Preferably, data collection system, wherein in the fitting unit further include:
Second judgment module connects the first judgment module, for will currently receive according to first judging result
To the real time data the acquisition moment with upper one receive from the same real time data from equipment
The acquisition moment is compared, and exports corresponding second judging result;
The fitting unit is according to second judging result, by the acquisition moment earlier than a upper real time data
Real time data be judged as historical data, and the corresponding variation song for being fitted formation is updated according to the historical data
Line simultaneously exports.
Preferably, the data collection system, wherein it is described from the device further include:
Timing wake-up unit connects the request reception unit, includes a preset wake-up in the timing wake-up unit
Period;
The timing wake-up unit controls the request reception unit according to the wake-up period and periodically starts and receive
The data read request.
Preferably, data collection system, wherein the main equipment is set in a mobile terminal.
A kind of collecting method, wherein including main equipment and multiple from equipment, the main equipment passes through radio individual office
Domain net connection mode and it is multiple it is described from equipment realize data interaction;
The collecting method includes:
Step S1, the main equipment carry out spectrum measurement to communication channel, the correspondence that the will test communication channel
Received signal strength is compared with a preset signal strength threshold value, exports corresponding comparison result;
Step S2, the main equipment select the received signal strength to be lower than the letter according to the comparison result
The communication channel of number intensity threshold, and the communication channel by being selected to it is all it is described send from equipment it is corresponding
Data read request;
Step S3, it is described to receive the data read request from equipment, and corresponding real time data is passed through into the communication
Channel is sent to the main equipment;
Step S4, the main equipment come from same institute for all according to the acquisition moment of the real time data received
The change curve for being fitted from the real time data of equipment and forming the association real time data is stated, and is shown.
Preferably, collecting method, wherein the step S3 is specifically included:
Step S31, it is described to acquire the real time data from equipment, and to each real time data add one it is corresponding
Timestamp information, to indicate the acquisition moment of the real time data;
Step S32, it is described to save the collected real time data and the corresponding timestamp information from equipment;
Step S33, it is described receive the data read request from equipment after, by the real time data being saved and
The corresponding timestamp information is sent in the main equipment.
Preferably, collecting method, wherein in the step S33, described sent every time from equipment is saved
After the real time data, the real time data sent is deleted.
Preferably, collecting method, wherein described all every a preset wake-up from equipment in the step S3
Phase is waken up, and receives the data read request.
Preferably, collecting method, wherein in the step S4, the main equipment is according to the correspondence real-time number
According to timestamp information, judge the acquisition moment of each real time data;
The main equipment is all from same described from the described real-time of equipment by what is received according to the acquisition moment
Data are arranged successively and are fitted to form the corresponding change curve and export.
Preferably, collecting method, wherein in the step S4, it is bent that the corresponding variation is formed by fitting
After line, the main equipment continues to the real time data, and according to the timestamp information of the correspondence real time data, judgement is every
The acquisition moment of a real time data;
The main equipment by the acquisition moment for the real time data being currently received with upper one receive from same
It is compared described in one from the acquisition moment of the real time data of equipment, and by the acquisition moment earlier than a upper reality
When data real time data be judged as historical data;
The main equipment updates the corresponding change curve for being fitted formation, goes forward side by side according to the historical data
Row display.
Preferably, collecting method, wherein the main equipment is set in a mobile terminal.Preferably, the data
Acquisition system, wherein it is described from the device further include:
The beneficial effect of above-mentioned technical proposal is:
1) spectrum measurement is carried out by main equipment, and judges channel conditions, reduce the energy consumption from equipment;
2) data are read by master devices request, reduces and is sent from the invalid data of equipment;
3) timestamp information is added in data acquisition, main equipment can be fitted to form corresponding change according to timestamp information
Change curve, can reduce the unreliable bring of network influences, and improves the usage experience of user.
Detailed description of the invention
Fig. 1 is that mobile terminal is applied to the structural schematic diagram in WPAN network in preferred embodiment of the invention;
Fig. 2 is a kind of structural schematic diagram of data collection system in preferred embodiment of the invention;
Fig. 3 is the schematic diagram that the change curve of formation is fitted in preferred embodiment of the invention;
Fig. 4-5 is a kind of flow diagram of collecting method in preferred embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art without creative labor it is obtained it is all its
His embodiment, shall fall within the protection scope of the present invention.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the present invention can phase
Mutually combination.
The present invention will be further explained below with reference to the attached drawings and specific examples, but not as the limitation of the invention.
In the prior art, although by WPAN network application in mobile terminal and other from equipment connect occasion in can mention
The service efficiency between terminal and terminal is risen, so that operation is more convenient.But the typical case of WPAN network when in use asks
Topic is that (Industrial Scientific Medical Band, industry, science and Medical Band) is deposited in ISM band
Unified interference coordination can not be carried out to each heterogeneous network, therefore in distinct device work in various wireless communication standard
The problem of will cause the mutual signal interference of equipment room, so that WPAN network is unreliable.
And another typical problem in WPAN is that the data transmission frequency of equipment room is lower, from equipment due to needing week
Phase property sends data to main equipment, therefore causes the power consumption from equipment larger, and also more, transmission is sent from the invalid data of equipment
Efficiency is lower.
Based on drawbacks described above, in preferred embodiment of the invention, a kind of data collection system is provided.
In preferred embodiment of the invention, data collection system includes main equipment and multiple from equipment, and main equipment passes through
The mode of wireless personal area network connection (WPAN) and multiple from carrying out data interaction between equipment.
In preferred embodiment of the invention, the network topology structure figure of above-mentioned data collection system is as shown in Figure 1, i.e. every
It is a to be connected to main equipment 1 from equipment 2, it is each also only connect from equipment 2 with main equipment 1, main equipment 1 and from shape between equipment 2
At star-shaped network topology structure.
In preferred embodiment of the invention, as shown in Fig. 2, above-mentioned data collection system specifically includes main equipment 1 and more
It is a from equipment 2 (only showing a main equipment and one in Fig. 2 from equipment and its connection relationship).
In preferred embodiment of the invention, include: in above-mentioned main equipment 1
Spectrum measurement unit 11.In preferred embodiment of the invention, spectrum measurement unit 11 is used to carry out spectrum measurement,
Specifically, for detecting the received signal strength of the communication channel in WPAN network.In preferred embodiment of the invention, in frequency
It include a preset signal strength threshold value in spectrometry unit 11, spectrum measurement unit 11 is by each communication of the correspondence measured
The received signal strength of channel is compared with preset signal strength threshold value, and exports corresponding comparison result.
In preferred embodiment of the invention, when the received signal strength of some communication channel is strong lower than preset signal
Spend threshold value, then it represents that the communication channel is now in " free time " state, without other equipment or only several less its
His equipment occupies the communication channel and carries out data transmission, i.e., carries out data transmission suffered signal interference on the communication channel
It is smaller.
In preferred embodiment of the invention, the measurement method of spectrum measurement unit 11 can by user's self-setting,
Such as:
Periodically all communication channels are measured;Alternatively,
When some trigger condition is reached, such as when main equipment is waken up, i.e., frequency spectrum survey is carried out to all communication channels
Amount, to obtain corresponding received signal strength.
Since a variety of spectrum measurement modes may be implemented according to the prior art, and it is an object of the invention to be surveyed by frequency spectrum
The received signal strength of current communication channel is measured, and does not lie in and how to carry out spectrum measurement, therefore in skill of the invention
The mode of spectrum measurement is not defined in art scheme.
In preferred embodiment of the invention, in above-mentioned main equipment 1 further include:
Request transmitting unit 12 connects above-mentioned spectrum measurement unit 11.In preferred embodiment of the invention, request is sent
Unit 12 receives the comparison result of above-mentioned spectrum measurement unit 11, and show that a certain communication channel is in " free time " state in judgement
When (received signal strength of the communication channel be lower than preset signal strength threshold value), select the communication channel, and pass through
The communication channel selected persistently sends corresponding data read request from equipment to all.
In preferred embodiment of the invention, the method for sending data read request may include a variety of, such as:
Corresponding data read request is sent to the slave equipment of connection in turn with preset order;Or
Corresponding data read request is successively sent from equipment to different according to desirability of the main equipment 1 to data
Deng.
Since a variety of modes for sending data read request under WPAN network environment may be implemented according to the prior art, and
It is an object of the invention to send data read request in communication channel free time Shi Xiangcong equipment, and does not lie in and how to send data
Read requests, therefore the mode for sending data read request is not defined in the inventive solutions.
In preferred embodiment of the invention, when judgement confirms that some communication channel is in " free time " state, request
Transmission unit 12 continues to send data read request to from equipment by the communication channel, i.e., holds within a preset period
Supervention send data read request, obtains the real time data that accordingly returns with lasting, to be presented to user's real time data with adopting
Collect the situation of change of time.
In preferred embodiment of the invention, in above-mentioned main equipment 1 further include:
Data receipt unit 13.In preferred embodiment of the invention, data receipt unit is for receiving by from equipment root
The real time data returned according to corresponding data read request.
Fitting unit 14 connects above-mentioned data receipt unit 13.In preferred embodiment of the invention, fitting unit 14 is used
In the acquisition moment according to the real time data passed back, all real time datas are fitted with the variation song to form an association real time data
Line.
Further, in preferred embodiment of the invention, fitting unit 14 by it is all by it is same from equipment return
Real time data is fitted to form above-mentioned change curve.For example, the real time data from wholeheartedly dirty monitoring wrist strap (can be by main equipment
Pulse values) it is fitted the curve that one corresponding pulse of formation changes with acquisition time.
In preferred embodiment of the invention, the mode of above-mentioned fitting forming curves may include interpolation method or extrapolation
Method.
It include being used to indicate it to acquire the moment from the real time data that equipment is passed back in preferred embodiment of the invention
Timestamp information, therefore correspondingly, include: in fitting unit 14
First judging unit 141.In preferred embodiment of the invention, the first judging unit 141 is used for according to number in real time
The timestamp information for including in judges that it acquires the moment, and exports corresponding first judging result;
Second judgment unit 142 connects above-mentioned first judging unit 141.In preferred embodiment of the invention, second sentences
Unit 142 break according to above-mentioned first judging result, further judges the acquisition moment for the real time data being currently received (hereinafter
Referred to as current acquisition moment) acquisition moment from the same real time data from equipment for whether being received earlier than upper one
(a hereinafter referred to as upper acquisition moment).Judge whether the real time data being currently received is historical data.Of the invention
In preferred embodiment, if currently the acquisition moment will be currently received earlier than a upper acquisition moment, second judgment unit 142
Real time data is judged as historical data, and exports corresponding second judging result.
In preferred embodiment of the invention, fitting unit 14 according to above-mentioned first judging result and the second judging result,
It is successively arranged according to all acquisition moment from the same real time data from equipment, and according to the fitting that puts in order
Form the change curve for being associated with these real time datas.As shown in figure 3, the point difference for marking three for being discrete in reference axis
It for collected real time data, is then arranged successively according to the acquisition moment of these real time datas, and is fitted and to form one
Smooth change curve 32 is to indicate the variation tendency of collected real time data.
In preferred embodiment of the invention, when judging the real time data being currently received according to the second judging result to go through
When history data, the corresponding change curve for being fitted formation is updated according to the historical data.For example, according to the historical data
The acquisition moment inserts it into reference axis shown in Fig. 3, and updates to be formed according to all discrete data points re-formed
Corresponding change curve.
In preferred embodiment of the invention, in above-mentioned main equipment 1 further include:
Display unit 15 connects above-mentioned fitting unit 14.In preferred embodiment of the invention, display unit 15 is for showing
Show above-mentioned change curve.Further, in preferred embodiment of the invention, the display mode of display unit 15 can have more
Kind, such as change curve as shown in Figure 3 is directly displayed, or change curve is shown with other diagrammatic forms.
In preferred embodiment of the invention, still as shown in Fig. 2, above-mentioned include: from equipment 2
Data acquisition unit 21.In preferred embodiment of the invention, 21 continuous collecting real time data of data acquisition unit,
The collection process is unrelated with the data read request that main equipment 1 is sent.
In preferred embodiment of the invention, data acquisition unit 21 further comprises:
Timestamp adding module 211.In preferred embodiment of the invention, timestamp adding module 211 is used for each
Collected real time data adds corresponding timestamp information, to indicate the acquisition moment of the real time data.
Storage unit 22 connects above-mentioned data acquisition unit 21.In preferred embodiment of the invention, storage unit 22 is used
In the collected real time data of preservation and corresponding timestamp information.
Request reception unit 23.In preferred embodiment of the invention, request reception unit 23 is logical for receiving main equipment
Cross the corresponding data read request that the communication channel selected is sent.
It is further including determining for the above-mentioned request reception unit 23 of a connection from equipment 2 in preferred embodiment of the invention
When wakeup unit 24.In preferred embodiment of the invention, request reception unit 23 is defaulted in a dormant state, timing wake-up list
It include a preset wake-up period in member 24.Then timing wake-up unit 24 is every a wake-up period wake request receiving unit
23, request reception unit 23 checks whether the data read request that main equipment is sent when being waken up, and after checking again
Once enter dormant state.It in other words, is not to be received always in preparation from equipment 2 in preferred embodiment of the invention
The state of data read request, but default in a dormant state, it is waken up and has checked whether every scheduled wake-up period
Data read request again goes into dormant state after finding no corresponding data read request after checking.It is arranged in this way
The energy consumption from equipment is advantageously reduced, the operating cost of data collection system is reduced.
It is above-mentioned from equipment 2 in preferred embodiment of the invention further include:
Data transmission unit 25 is separately connected above-mentioned request reception unit 23 and storage unit 22.Of the invention is preferable
Embodiment in, after request reception unit 23 receives above-mentioned data read request, control data transmission unit 25 will store
The corresponding real time data saved in unit 22 is sent to main equipment 1 by the communication channel selected.
In preferred embodiment of the invention, the real time data with timestamp information is sent to by data transmission unit 25
Main equipment 1.
In preferred embodiment of the invention, above-mentioned further includes the number for connecting above-mentioned data transmission unit 25 from equipment 2
According to administrative unit 26.The Data Management Unit 26 is also connected with said memory cells 22.
In preferred embodiment of the invention, Data Management Unit 26 is used to complete in data transmission unit 25 primary real-time
The real time data sent is deleted from storage unit 22 after the transmission of data.In other words, preferred embodiment of the invention
In, data acquisition is carried out in a slave device, and establishes the queue to be sent an of real time data.After having carried out primary transmission,
The queue to be sent is updated, including deleting the real time data etc. being sent.
In conclusion it is an object of the invention to:
Main equipment and from forming star-shaped wireless personal area network structure between equipment;
The received signal strength (i.e. progress spectrum measurement) of all communication channels, finds in main equipment actively monitoring local area network
And select communication channel (communication letter i.e. in " free time " state of the received signal strength lower than scheduled signal strength threshold value
Road);Main equipment sends data read request from equipment to all by the communication channel selected.It is actively supervised using main equipment
The mode of request is surveyed and sent, reduces from equipment because the invalid data that signal interference generates is sent, is lifted at Wireless Personal Area
Data transmission efficiency in net;
The timestamp information for indicating the acquisition moment is added when acquiring data from equipment;Main equipment according to timestamp information,
Real time data is fitted to form corresponding change curve and show to user;Above-mentioned processing and display mode are available for users to directly
The situation of change for checking and grasping real time data is seen, usage experience is promoted.
In preferred embodiment of the invention, above-mentioned main equipment 1 is set to inside a mobile terminal.For example, at wireless
In people's local area network, using a mobile terminal as main equipment 1, and by other from equipment such as cardiac monitoring wrist strap etc. as from
Equipment is simultaneously attached.
In preferred embodiment of the invention, adopted as shown in figure 4, providing a kind of data based on above-mentioned data collection system
Set method specifically includes:
Step S1, main equipment carry out spectrum measurement, the reception signal for the correspondence communication channel that will test to communication channel
Intensity is compared with a preset signal strength threshold value, exports corresponding comparison result;
In preferred embodiment of the invention, if the received signal strength of some communication channel is strong lower than preset signal
Spend threshold value, then it represents that the current signal interference of the communication channel is less, can be used,
Step S2, main equipment select a received signal strength logical lower than signal strength threshold value according to comparison result
Believe channel, and the communication channel by being selected sends corresponding data read request from equipment to all;
In preferred embodiment of the invention, one signal interference of main equipment selection less (being in " free time " state)
Communication channel, and data interaction is carried out with from equipment using the communication channel selected;
In preferred embodiment of the invention, main equipment sends phase to from equipment by the less communication channel of signal interference
The data read request answered can be avoided signal interference data transmission efficiency.
Step S3 receives data read request from equipment, and corresponding real time data is sent to master by communication channel
Equipment;
Receiving request Concurrency from equipment send the process of data that can hereinafter be described in detail.
Step S4, main equipment is according to acquisition moment of the real time data received, by all from the same reality from equipment
When data be fitted the change curve to form an association real time data, and shown.
In preferred embodiment of the invention, as mentioned above it is possible, main equipment is according to timestamp additional in real time data
Information judges the acquisition moment of the real time data, and according to the acquisition moment of real time data to from same from the real-time of equipment
Data are arranged successively, and are fitted and to be formed corresponding change curve.Main equipment shows the change curve.
It is same as mentioned above it is possible, main equipment is according to acquisition moment of real time data in preferred embodiment of the invention,
Judge whether the real time data is historical data, and updates to be fitted to be formed according to the real time data for being judged as historical data
Change curve.
In preferred embodiment of the invention, as shown in figure 5, above-mentioned steps S3 is specifically included:
Step S31 acquires real time data from equipment, and adds a corresponding timestamp information to each real time data,
To indicate the acquisition moment of real time data;
Step S32 saves collected real time data and corresponding timestamp information from equipment;
Step S33, after receiving data read request from equipment, by the real time data being saved and corresponding timestamp
Information is sent in main equipment.
In preferred embodiment of the invention, in a dormant state from equipment default, it is controlled to preset wake-up period
It is waken up, checks whether main equipment sends corresponding data read request when being waken up from equipment, if not sent, reenter
Dormant state, and being waken up again every preset wake-up period, and so on, to realize the purpose being periodically waken up, save from
The energy consumption of equipment.
In preferred embodiment of the invention, saved it in storage unit after collecting real time data from equipment, i.e.,
A data queue to be sent is established in the memory unit.After completing a data transmission from equipment, to the data to be sent
Queue is updated, i.e., removes the real time data sent from data queue to be sent, to guarantee real time data not
It can be repeatedly transmitted.
In preferred embodiment of the invention, above-mentioned main equipment is set in a mobile terminal.
The foregoing is merely preferred embodiments of the present invention, are not intended to limit embodiments of the present invention and protection model
It encloses, to those skilled in the art, should can appreciate that all with made by description of the invention and diagramatic content
Equivalent replacement and obviously change obtained scheme, should all be included within the scope of the present invention.