A kind of data acquisition system and collecting method
Technical field
The present invention relates to wireless personal local area network technical field, particularly relate to a kind of data acquisition system and collecting method.
Background technology
Wireless personal local area network (WirelessPersonalAreaNetwork, WPAN) is a kind of PAN (Personal Area Network) adopting wireless connections.It is used in such as phone, computer, auxiliary device and among a small circle in (working range of wireless personal local area network is generally within 10 meters) PDA device between communication.Support that the technology of wireless personal local area network comprises: Bluetooth technology, purple-bee technology (ZigBee), overclocking wavelength band technique (UWB), infrared data interconnection technique (InfraredDataAssociation, IrDA), home radio technology (HomeRF) etc., wherein Bluetooth technology uses the most extensive in wireless personal local area network.
Existing field of mobile terminals has started universal WPAN technology gradually, by mobile terminal as main equipment, and other attached data acquisition equipments are such as used for the wrist strap of monitoring heartbeat situation, and wherein for storing the conducts such as the memory device of data from equipment, and be connected to respectively on the mobile terminal as main equipment by WPAN network.Apply the wireless connections that above-mentioned technology can realize between terminal in a less region and terminal, to replace traditional wired connection, its connected mode is more flexible, and volume is less, more convenient operation.
But for traditional WPAN network, wherein differently mutually can produce signal disturbing in use from equipment, affect the experience of user.
Summary of the invention
According to problems of the prior art, the technical scheme of a kind of data acquisition system and collecting method is now provided, be intended to by master device monitors channel conditions and the mode issuing data read request is avoided between equipment signal disturbing, reduce the energy consumption from equipment; Technique scheme specifically comprises:
A kind of data acquisition system, wherein, comprises main equipment and multiple from equipment, the mode that described main equipment is connected by wireless personal local area network with multiple described in realize data interaction from equipment and transmit;
Described main equipment comprises:
Spectrum measurement unit, wherein be preset with a signal strength threshold value, described spectrum measurement unit is used for carrying out spectrum measurement to communication channel, and the received signal strength and described signal strength threshold value of measuring the described communication channel of correspondence obtained is compared, and exports corresponding comparative result;
Request transmitting unit, connect described spectrum measurement unit, for according to described comparative result, a described received signal strength is selected to continue to send request the data read request obtaining corresponding real time data from equipment described in all lower than the described communication channel of described signal strength threshold value;
Data receipt unit, described from the described real time data of equipment by being continued to return by the described communication channel selected for receiving;
Fitting unit, connects described data receipt unit, and all from the same described described real time data from equipment for what receive according to described data receipt unit, matching forms the change curve of the described real time data of association, and exports corresponding fitting result;
Display unit, connects described fitting unit, for showing the described change curve that matching is formed;
Describedly to comprise from equipment:
Data acquisition unit, for the corresponding described real time data of continuous collecting;
Request reception unit, for the described data read request by being issued by main equipment described in the described communication channel continuous reception selected;
Data transmission unit, connect described data acquisition unit and described request receiving element respectively, for according to described data read request, by being continued by the described communication channel selected to send the corresponding described real time data of described data acquisition unit acquires to described main equipment.
Preferably, this data acquisition system, wherein, describedly also to comprise from equipment:
Memory cell, be connected between described data acquisition unit and described data transmission unit, for preserving described real time data to be sent, described data transmission unit is transferred corresponding described real time data according to described data read request and is sent to described main equipment from described memory cell;
Data Management Unit, connects described memory cell and described data transmission unit respectively, for the described real time data be sent out being removed from described memory cell after the transmission through once described real time data.
Preferably, this data acquisition system, wherein, also comprises in described data acquisition unit:
Timestamp adds module, and for adding corresponding timestamp information to collected described real time data, described timestamp information is used to indicate the collection moment of described real time data.
Preferably, this data acquisition system, wherein, also comprises in described fitting unit:
First judge module, for the described timestamp information corresponding according to the described real time data received, judges the collection moment of described real time data, and exports corresponding first judged result;
Described fitting unit according to described first judged result, according to the described collection moment by allly described being arranged in order and matching forms corresponding described change curve and exports from the described real time data of equipment from same of receiving.
Preferably, this data acquisition system, wherein, also comprises in described fitting unit:
Second judge module, connect described first judge module, for according to described first judged result, by the collection moment of the described real time data be currently received and upper one receive described to compare from the collection moment of the described real time data of equipment from same, export corresponding second judged result;
The described collection moment, according to described second judged result, is judged as historical data early than the real time data of a upper described real time data by described fitting unit, and upgrades the corresponding described change curve of matching formation according to described historical data and export.
Preferably, this data acquisition system, wherein, describedly also to comprise from equipment:
Timing wake-up unit, connects described request receiving element, and described timing wake-up unit comprises a wake-up period preset;
Described timing wake-up unit controls described request receiving element according to described wake-up period and periodically starts and receive described data read request.
Preferably, this data acquisition system, wherein, described main equipment is arranged in a mobile terminal.
A kind of collecting method, wherein, comprises main equipment and multiple from equipment, the mode that described main equipment is connected by wireless personal local area network with multiple described in realize data interaction from equipment and transmit;
Described collecting method comprises:
Step S1, described main equipment carries out spectrum measurement to communication channel, the received signal strength of described for the correspondence detected communication channel and a signal strength threshold value preset is compared, exports corresponding comparative result;
Step S2, described main equipment is according to described comparative result, select a described received signal strength lower than the described communication channel of described signal strength threshold value, and by being sent corresponding data read request from equipment by the described communication channel selected described in all;
Step S3, describedly receives described data read request from equipment, and corresponding real time data is sent to described main equipment by described communication channel;
Step S4, described main equipment, according to the collection moment of the described real time data received, by all change curves forming the described real time data of an association from the same described described real time data matching from equipment, and shows.
Preferably, this collecting method, wherein, described step S3 specifically comprises:
Step S31, describedly gathers described real time data from equipment, and adds a corresponding timestamp information to each described real time data, to indicate the collection moment of described real time data;
Step S32, describedly preserves the described real time data collected from equipment, and the described timestamp information of correspondence;
Step S33, described receive described data read request from equipment after, the described real time data be saved and corresponding described timestamp information are sent in described main equipment.
Preferably, this collecting method, wherein, in described step S33, described send the described real time data be saved from equipment at every turn after, the described real time data be sent out is deleted.
Preferably, this collecting method, wherein, in described step S3, to be describedly waken up every the wake-up period that presets from equipment, and to receive described data read request.
Preferably, this collecting method, wherein, in described step S4, described main equipment, according to the timestamp information of the described real time data of correspondence, judges the collection moment of each described real time data;
Described main equipment according to the described collection moment by allly described being arranged in order and matching forms corresponding described change curve and exports from the described real time data of equipment from same of receiving.
Preferably, this collecting method, wherein, in described step S4, after forming corresponding described change curve by matching, described main equipment continues to receive described real time data, and according to the timestamp information of the described real time data of correspondence, judge the collection moment of each described real time data;
Described main equipment by the collection moment of the described real time data be currently received and upper one receive described to compare from the collection moment of the described real time data of equipment from same, and the described collection moment is judged as historical data early than the real time data of a upper described real time data;
Described main equipment, according to described historical data, upgrades the corresponding described change curve that matching is formed, and shows.
Preferably, this collecting method, wherein, described main equipment is arranged in a mobile terminal.Preferably, this data acquisition system, wherein, describedly also to comprise from equipment:
The beneficial effect of technique scheme is:
1) carry out spectrum measurement by main equipment, and judge channel conditions, reduce the energy consumption from equipment;
2) read data by master devices request, reduce and send from the invalid data of equipment;
3) in data acquisition, add timestamp information, main equipment matching can form corresponding change curve according to timestamp information, can reduce the unreliable impact brought of network, improves the experience of user.
Accompanying drawing explanation
Fig. 1 is in preferred embodiment of the present invention, mobile terminal is applied to the structural representation in WPAN network;
Fig. 2 is in preferred embodiment of the present invention, a kind of structural representation of data acquisition system;
Fig. 3 is in preferred embodiment of the present invention, the schematic diagram of the change curve that matching is formed;
Fig. 4-5 is in preferred embodiment of the present invention, a kind of schematic flow sheet of collecting method.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite of not making creative work, all belongs to the scope of protection of the invention.
It should be noted that, when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
Below in conjunction with the drawings and specific embodiments, the invention will be further described, but not as limiting to the invention.
In prior art, although WPAN network application can be promoted service efficiency between terminal and terminal in mobile terminal and other from the occasion of equipment connection, make more convenient to operate.But a WPAN network typical problem is in use, (IndustrialScientificMedicalBand in ISM band, industry, science and Medical Band) there is various wireless communication standard, when distinct device works, unified interference coordination cannot be carried out to each heterogeneous network, therefore can cause the problem of the mutual signal disturbing of equipment room, thus make WPAN network unreliable.
And another typical problem in WPAN is that the transfer of data frequency of equipment room is lower, periodically send data to main equipment from equipment due to needs, therefore cause from the power consumption of equipment comparatively large, send also more from the invalid data of equipment, transmitting efficiency is lower.
Based on above-mentioned defect, in preferred embodiment of the present invention, provide a kind of data acquisition system.
In preferred embodiment of the present invention, data acquisition system comprises main equipment and multiple from equipment, and main equipment connects the mode of (WPAN) by wireless personal local area network network and multiplely between equipment, carries out data interaction transmission.
In preferred embodiment of the present invention, the network topology structure figure of above-mentioned data acquisition system as shown in Figure 1, namely be eachly all connected to main equipment 1 from equipment 2, be eachly also only connected with main equipment 1 from equipment 2, main equipment 1 and from the network topology structure forming star between equipment 2.
In preferred embodiment of the present invention, as shown in Figure 2, above-mentioned data acquisition system specifically comprises main equipment 1 and multiple from equipment 2 (only illustrate Fig. 2 a main equipment and from equipment and annexation thereof).
In preferred embodiment of the present invention, above-mentioned main equipment 1 comprises:
Spectrum measurement unit 11.In preferred embodiment of the present invention, spectrum measurement unit 11 for carrying out spectrum measurement, particularly, for detecting the received signal strength of the communication channel in WPAN network.In preferred embodiment of the present invention, a signal strength threshold value preset is comprised at spectrum measurement unit 11, the received signal strength of each for the correspondence measured communication channel and the signal strength threshold value preset compare by spectrum measurement unit 11, and export corresponding comparative result.
In preferred embodiment of the present invention, when the received signal strength of some communication channels is lower than the signal strength threshold value preset, then represent that this communication channel is now in " free time " state, do not have other equipment or only have several less this communication channel of other hold facilities to carry out transfer of data, the signal disturbing namely carried out suffered by transfer of data is on the communication channel less.
In preferred embodiment of the present invention, the metering system of spectrum measurement unit 11 can be arranged voluntarily by user, such as:
Periodically all communication channels are measured; Or,
When certain trigger condition is reached, such as, when main equipment is waken up, namely spectrum measurement is carried out to all communication channels, to obtain corresponding received signal strength.
Due to multiple spectrum measurement mode can be realized according to prior art, and the object of the invention is to the received signal strength being obtained current communication channel by spectrum measurement, and do not lie in how to carry out spectrum measurement, therefore the mode of spectrum measurement is not limited in the inventive solutions.
In preferred embodiment of the present invention, also comprise in above-mentioned main equipment 1:
Request transmitting unit 12, connects above-mentioned spectrum measurement unit 11.In preferred embodiment of the present invention, request transmitting unit 12 receives the comparative result of above-mentioned spectrum measurement unit 11, and when judging to show that a certain communication channel is in " free time " state (received signal strength of this communication channel is lower than default signal strength threshold value), select this communication channel, and continued to send corresponding data read request from equipment to all by the communication channel selected by this.
In preferred embodiment of the present invention, the method sending data read request can comprise multiple, such as:
Corresponding data read request is sent to what connect from equipment in turn with the order preset; Or
Desirability according to main equipment 1 pair of data successively sends corresponding data read request etc. to different from equipment.
Due to the multiple mode sending data read request under WPAN network environment can be realized according to prior art, and the object of the invention is to when communication channel is idle to from equipment sending data read requests, and do not lie in how to send data read request, therefore the mode sending data read request is not limited in the inventive solutions.
In preferred embodiment of the present invention, when judging to confirm that some communication channels are in " free time " state, request transmitting unit 12 continues to from equipment sending data read requests by this communication channel, namely continue to send data read request within default time period, with the corresponding real time data returned of lasting acquisition, thus present to the situation of change of user's real time data with acquisition time.
In preferred embodiment of the present invention, also comprise in above-mentioned main equipment 1:
Data receipt unit 13.In preferred embodiment of the present invention, data receipt unit is for receiving by the real time data returned according to corresponding data read request from equipment.
Fitting unit 14, connects above-mentioned data receipt unit 13.In preferred embodiment of the present invention, fitting unit 14, for the collection moment according to the real time data passed back, forms the change curve of an association real time data to all real time data matchings.
Further, in preferred embodiment of the present invention, fitting unit 14 forms above-mentioned change curve by all by the same real time data matching returned from equipment.Such as, real time data (can the be pulse values) matching from wholeheartedly dirty monitoring wrist strap is formed the curve that a corresponding pulse changes with acquisition time by main equipment.
In preferred embodiment of the present invention, the mode of above-mentioned matching forming curves, can comprise interpolation method or extrapolation.
In preferred embodiment of the present invention, comprise from the real time data of device back and be used to indicate the timestamp information that it gathers the moment, therefore correspondingly, comprise at fitting unit 14:
First judging unit 141.In preferred embodiment of the present invention, for the timestamp information comprised according to real time data, the first judging unit 141 judges that it gathers the moment, and export corresponding first judged result;
Second judging unit 142, connects above-mentioned first judging unit 141.In preferred embodiment of the present invention, second judging unit 142, according to above-mentioned first judged result, judges that whether the collection moment (hereinafter referred to as the current collection moment) of the real time data be currently received is early than upper one the collection moment from the same real time data from equipment received (gathering the moment hereinafter referred to as upper one) further.Namely judge whether the real time data be currently received is historical data.In preferred embodiment of the present invention, if the current collection moment gathers the moment early than upper one, then the real time data be currently received is judged as historical data by the second judging unit 142, and exports corresponding second judged result.
In preferred embodiment of the present invention, fitting unit 14 is according to above-mentioned first judged result and the second judged result, successively it is arranged according to all collection moment from the same real time data from equipment, and form according to the matching that puts in order the change curve being associated with these real time datas.As shown in Figure 3, be labeled as 31 three discrete points in reference axis and be respectively the real time data collected, then be arranged in order according to the collection moment of these real time datas, and matching forms a level and smooth change curve to represent the variation tendency of the real time data collected.
In preferred embodiment of the present invention, when the real time data judging to be currently received according to the second judged result is historical data, upgrade the corresponding change curve of matching formation according to this historical data.Such as, the collection moment according to this historical data is inserted in the reference axis shown in Fig. 3, and upgrades the corresponding change curve of formation according to all discrete data point again formed.
In preferred embodiment of the present invention, also comprise in above-mentioned main equipment 1:
Display unit 15, connects above-mentioned fitting unit 14.In preferred embodiment of the present invention, display unit 15 is for showing above-mentioned change curve.Further, in preferred embodiment of the present invention, the display mode of display unit 15 can have multiple, such as, directly show change curve as shown in Figure 3, or shown by change curve with other diagrammatic forms.
In preferred embodiment of the present invention, still as shown in Figure 2, above-mentionedly to comprise from equipment 2:
Data acquisition unit 21.In preferred embodiment of the present invention, data acquisition unit 21 continuous collecting real time data, the data read request that this gatherer process and main equipment 1 send has nothing to do.
In preferred embodiment of the present invention, data acquisition unit 21 comprises further:
Timestamp adds module 211.In preferred embodiment of the present invention, timestamp adds module 211 for adding corresponding timestamp information to each collected real time data, to indicate the collection moment of this real time data.
Memory cell 22, connects above-mentioned data acquisition unit 21.In preferred embodiment of the present invention, memory cell 22 is for preserving the real time data collected, and corresponding timestamp information.
Request reception unit 23.In preferred embodiment of the present invention, request reception unit 23 is for receiving the corresponding data read request of main equipment by being sent by the communication channel selected.
In preferred embodiment of the present invention, from equipment 2, also comprising the timing wake-up unit 24 of the above-mentioned request reception unit 23 of a connection.In preferred embodiment of the present invention, request reception unit 23 acquiescence is in resting state, and timing wake-up unit 24 comprises a wake-up period preset.Then timing wake-up unit 24 is every a wake-up period wake request receiving element 23, looks into the data read request seeing if there is main equipment and send, and enter resting state again when request reception unit 23 is waken up after checking.In other words, in preferred embodiment of the present invention, it is not the state being in preparation reception data read request all the time from equipment 2, but acquiescence is in resting state, be waken up every predetermined wake-up period and look into and see if there is data read request, find there is no corresponding data read request after checking after, enter resting state again.Be provided with the energy consumption being beneficial to and reducing from equipment like this, reduce the operating cost of data acquisition system.
In preferred embodiment of the present invention, above-mentionedly also to comprise from equipment 2:
Data transmission unit 25, connects above-mentioned request reception unit 23 respectively, and memory cell 22.In preferred embodiment of the present invention, after request reception unit 23 receives above-mentioned data read request, the corresponding real time data of preserving in memory cell 22 is passed through to be sent to main equipment 1 by the communication channel selected by control data transmitting element 25.
In preferred embodiment of the present invention, the real time data with timestamp information is sent to main equipment 1 by data transmission unit 25.
In preferred embodiment of the present invention, above-mentionedly from equipment 2, also comprise the Data Management Unit 26 connecting above-mentioned data transmission unit 25.This Data Management Unit 26 also connects said memory cells 22.
In preferred embodiment of the present invention, Data Management Unit 26 for complete a real time data in data transmission unit 25 transmission after the real time data be sent out is deleted from memory cell 22.In other words, in preferred embodiment of the present invention, carry out data acquisition in a slave device, and set up the queue to be sent of a real time data.After having carried out once transmission, this queue to be sent is upgraded, has comprised the real time data etc. that deletion has been sent.
In sum, the object of the invention is to:
Main equipment and from the wireless personal local area network network structure forming star between equipment;
The received signal strength (namely carrying out spectrum measurement) of all communication channels in main equipment active monitoring local area network (LAN), finds and selects received signal strength lower than the communication channel (being namely in the communication channel of " free time " state) of prearranged signal intensity threshold; Main equipment by this by the communication channel selected to all from equipment sending data read requests.Adopt main equipment active monitoring and the mode sent request, reduce the invalid data produced because of signal disturbing from equipment and send, be lifted at the data transmission efficiency in wireless personal local area network;
The timestamp information representing and gather the moment is added when image data from equipment; Real time data matching, according to timestamp information, is formed corresponding change curve and shows to user by main equipment; Above-mentioned process and display mode are available for users to the situation of change intuitively checking and grasp real time data, promote experience.
In preferred embodiment of the present invention, it is inner that above-mentioned main equipment 1 is arranged at a mobile terminal.Such as, in wireless personal local area network network, using a mobile terminal as main equipment 1, and using other from equipment such as cardiac monitoring wrist strap etc. as connecting from equipment.
In preferred embodiment of the present invention, as shown in Figure 4, a kind of collecting method based on above-mentioned data acquisition system is provided, specifically comprises:
Step S1, main equipment carries out spectrum measurement to communication channel, the received signal strength of the corresponding communication channel detected and a signal strength threshold value preset is compared, exports corresponding comparative result;
In preferred embodiment of the present invention, if the received signal strength of some communication channels is lower than the signal strength threshold value preset, then represent that the current signal disturbing of this communication channel is less, can use,
Step S2, main equipment, according to comparative result, selects a received signal strength lower than the communication channel of signal strength threshold value, and by being sent corresponding data read request to all from equipment by the communication channel selected;
In preferred embodiment of the present invention, the communication channel of main equipment selection signal disturbing less (being namely in " free time " state), and adopt this by the communication channel selected with carry out data interaction transmission from equipment;
In preferred embodiment of the present invention, main equipment sends corresponding data read request by the communication channel that signal disturbing is less to from equipment, can avoid signal interference data transmission efficiency.
Step S3, from equipment receiving data read requests, and is sent to main equipment by corresponding real time data by communication channel;
Receiving request Concurrency from equipment send the process of data can describe in detail hereinafter.
Step S4, main equipment, according to the collection moment of the real time data received, by all change curves forming an association real time data from the same real time data matching from equipment, and shows.
In preferred embodiment of the present invention, as noted before, main equipment judges the collection moment of this real time data according to timestamp information additional in real time data, and be arranged in order from the same real time data from equipment according to the collection moment of real time data, and matching forms corresponding change curve.Main equipment shows this change curve.
In preferred embodiment of the present invention, as noted before equally, main equipment, according to the collection moment of real time data, judges whether this real time data is historical data, and upgrades the change curve of matching formation according to the real time data being judged as historical data.
In preferred embodiment of the present invention, as shown in Figure 5, above-mentioned steps S3 specifically comprises:
Step S31, gathers real time data from equipment, and adds a corresponding timestamp information to each real time data, to indicate the collection moment of real time data;
Step S32, preserves the real time data collected from equipment, and the timestamp information of correspondence;
Step S33, after receiving data read request, is sent to the real time data be saved and corresponding timestamp information in main equipment from equipment.
In preferred embodiment of the present invention, resting state is in from equipment acquiescence, the wake-up period being controlled to preset is waken up, check when being waken up from equipment whether main equipment sends corresponding data read request, if do not send, then reenters resting state, and be waken up every the wake-up period preset again, by that analogy, the object be waken up with property performance period, saves the energy consumption from equipment.
In preferred embodiment of the present invention, preserved in the memory unit after equipment collects real time data, namely set up a data queue to be sent in the memory unit.After complete a secondary data transmission from equipment, upgrade this data queue to be sent, the real time data being about to be sent out is removed from data queue to be sent, to ensure that real time data can not be repeatedly transmitted.
In preferred embodiment of the present invention, above-mentioned main equipment is arranged in a mobile terminal.
The foregoing is only preferred embodiment of the present invention; not thereby embodiments of the present invention and protection range is limited; to those skilled in the art; should recognize and all should be included in the scheme that equivalent replacement done by all utilizations specification of the present invention and diagramatic content and apparent change obtain in protection scope of the present invention.