A kind of identification card and operation method thereof
Technical field
The application relates to radio network technique field, particularly to the identification card in a kind of wireless sensor network and operation method。
Background technology
Low-power consumption is always a key property of wireless sensor network。Owing to the terminal node of generally wireless sensor network adopts battery to power, for ensureing the working time, generally require and adopt the module closing the power consumption of this terminal node of wireless data transceiving to reduce operation power consumption。
In order to solve the energy consumption problem of the terminal node in wireless sensor network, put into great effort in world wide and carried out studying (including MAC protocol and Routing Protocol etc. to improve)。
Power consumption control for the terminal node in wireless sensor network mainly just concentrates on the rationally switch to radio frequency。The mode generally adopted is after waking up, sends according to routing iinformation or direct broadcast transmission nodal information。But due to the mobility of terminal node, cause being likely to be due to running transform according to the address once sent in routing iinformation transmission and causing that transmission is unsuccessful。The bottleneck becoming this mode of operation is sent to whom when terminal node wakes up;Simple broadcast transmission tends to cause the unreliable of communication;And if after waking up every time, reliability in order to ensure communication remains a need for setting up and connects, the cost then setting up connection to be significantly larger than the cost sending collection information, the more energy of terminal node sends a secondary data to be likely to need repeatedly to send between terminal node just to complete establishment of connection, thus can be consumed。Meanwhile, broadcast mode is used to be likely to cause channel occupancy conflict in setting up connection。Additionally, in this mode, usual upper layer device can only passively receive transmission oneself state data or the alert data that terminal node sends, and upper layer device cannot by dangerous situation initiative alarmings such as environment to terminal node。
Summary of the invention
The technical problem to be solved in the present invention is to provide the identification card of a kind of low-power consumption, a large amount of minimizing waking up nodes number of times。
In order to solve above-mentioned technical problem, the present invention proposes a kind of identification card, including: first timer, enumerator, control equipment and the radio-frequency module being connected with processing module and power management module respectively;
Wherein, described first timer, for when identification card resting state, carrying out the timing of the first Preset Time, reach described first Preset Time and then send signal to described processing module;
Described enumerator, for the timing number of times of described first timer is counted, reaches preset times, then send signal to described processing module, and by clear for enumerator 0;
Described processing module, for the signal according to described first timer, carries out the hardware detection of described control equipment, and, for the signal according to described enumerator, control described radio-frequency module and open;With, the exchange of described radio-frequency module data is complete, controls to close described radio-frequency module, and carries out hardware detection。
Described radio-frequency module, for the control command according to described processing module, opens radio-frequency module, carries out data exchange with the external world by radio-frequency channel;
Described control equipment, is used for carrying out man-machine interaction;
Described power management module, for being powered and outage management for module each in identification card。
Specifically, described processing module, when receiving the signal of described first timer, is additionally operable to whether detection identification card exists the packet not sent last time;
If existing, then directly open described radio-frequency module。
Wherein, identification card also includes second timer, is connected with described processing module and described power management module respectively, after opening for described radio-frequency module, carries out the second Preset Time timing, reaches described second Preset Time and then send a signal to described processing module;
Wherein, described processing module is additionally operable to judge whether to reach described second Preset Time;
If reaching described second Preset Time, described radio-frequency module does not receive exogenous data signal, then described processing module controls to close described radio-frequency module;
If not up to described second Preset Time, namely described radio-frequency module receives exogenous data signal, then this data signal is processed by described processing module。
Wherein, the exogenous data signal that described processing module is additionally operable to described radio-frequency module is received carries out check bit checking, and wireless signal strength is judged;If meeting pre-conditioned, then proceeding data exchange, otherwise until reaching described second Preset Time, closing described radio-frequency module。
Wherein, described first Preset Time is 1s, and described preset times is 3 times。
Wherein, described control equipment includes buzzer, display device and button。
Wherein, described second Preset Time is 20ms。
Also disclose the operation method of a kind of identification card, comprise the steps:
Step A, first timer, when identification card resting state, carries out the timing of the first Preset Time, reaches described first Preset Time and then sends signal to processing module, is identified card and wakes up;
Step B, is counted the timing number of times of described first timer by enumerator, reaches preset times, then send signal to processing module, and radio-frequency module is opened, and by clear for enumerator 0;Otherwise, described radio-frequency module is closed;
Step C, after radio-frequency module is opened, receives external equipment signal, carries out data exchange;Data exchange is complete, closes described radio-frequency module immediately, and performs hardware detection。
Wherein, described step A farther includes,
After described identification card wakes up, described processing module carries out packet detection, does not send successful packet if existing, then directly open described radio-frequency module, operating procedure C;
If being absent from not sending successful packet, then operating procedure B。
Wherein, described step B farther includes, and second timer, after described radio-frequency module is opened, carries out the second Preset Time timing, reaches described second Preset Time and then send a signal to described processing module;
If reaching described second Preset Time, described radio-frequency module does not receive exogenous data signal, then described processing module controls to close described radio-frequency module, and described control equipment is performed hardware detection。
If not up to described second Preset Time, described radio-frequency module receives exogenous data signal, then this data signal is processed by described processing module。
Wherein, the exogenous data signal that described processing module is additionally operable to described radio-frequency module is received carries out check bit checking, and wireless signal strength is judged;If meeting pre-conditioned, then proceeding data exchange, otherwise until reaching described second Preset Time, closing described radio-frequency module。
More preferably, described processing module is additionally operable to judge residing regional location according to the exogenous data signal message received;
If regional location is identical, then do not repeat data transmission work;
If regional location is different, then perform data transmission work。
Card reader provided by the invention and communication means, the dual pathways making full use of card reader is arranged, and upper layer device and underlying device communication, and communication channel does not interfere with each other, and improves the accuracy rate of communication。And can ensure that underlying device can carry out data exchange with card reader in extreme wakeup time, it is to avoid the transmission stability of underlying device information。
Accompanying drawing explanation
Fig. 1 is the structural representation of the identification card of the embodiment of the present invention;
Fig. 2 is the identification card hardware structure diagram of the embodiment of the present invention;
Fig. 3 is the identification card operational flow diagram of the embodiment of the present invention。
Detailed description of the invention
Understandable for enabling the above-mentioned purpose of the application, feature and advantage to become apparent from, below in conjunction with the drawings and specific embodiments, the application is described in further detail。
Each embodiment in this specification all adopts the mode gone forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar part mutually referring to。For device embodiment, due to itself and embodiment of the method basic simlarity, so what describe is fairly simple, relevant part illustrates referring to the part of embodiment of the method。
Referring to Fig. 1, Fig. 2, a kind of identification card, including: first timer, enumerator, control equipment and the radio-frequency module being connected with processing module and power management module respectively;
Wherein, described first timer, it is connected with power management module and processing module respectively, power management module is continuously first timer and powers, including when identification card resting state。Described first timer carries out the timing of the first Preset Time, reaches described first Preset Time and then sends signal to described processing module, triggers described processing module and wake up, in order to perform other operations further according to practical situation。Wherein said first Preset Time is preferably 1s。
Described enumerator, is connected with power management module and processing module respectively, and described enumerator is after identification card wakes up, for the timing number of times of described first timer is counted, reach preset times, then send signal to described processing module, and by clear for enumerator 0。Preferably, preset times may be configured as 3 times。That is, when first timer reaches 1s, wakes identification card up, then enumerator once counts, until after waking 3 times up, sending indication signal to described processing module, in order to allow described processing module perform to open the order of radio-frequency module。Furthermore, it is necessary to illustrate, described processing module, after intervalometer wakes identification card up, can perform hardware detection operation, and only when radio-frequency module opened by needs, this intervalometer wakes up and do not carry out hardware detection。Described processing module can carry out data exchange at described radio-frequency module, after closing radio-frequency module, carries out hardware detection。Thus ensureing the reliability of each hardware of identification card。
Described radio-frequency module, for the control command according to described processing module, opens radio-frequency module, carries out data exchange with the external world by radio-frequency channel;It is emphasized that power management module is only when described processing module sends the instruction opening radio-frequency module, just powers for radio-frequency module herein;After described processing module sends the instruction closing radio frequency, then stop the power supply of radio frequency, thus having saved the power consumption that identification card is overall。
Described control equipment, is used for carrying out man-machine interaction;Wherein, control equipment includes some cases, display screen and buzzer。
Described power management module, for being powered and outage management for module each in identification card, it should be noted that power management module is only continuously first timer and is powered, and all the other modules are powered all in accordance with real work situation。
Preferably, described processing module, when receiving the signal of described first timer, is additionally operable to whether detection identification card exists the packet not sent last time, if existing, then directly opens described radio-frequency module;If being absent from, then perform the counting operation of described enumerator。
Preferably, identification card also includes second timer, is connected with described processing module and described power management module respectively, after opening for described radio-frequency module, carries out the second Preset Time timing, reaches described second Preset Time and then send a signal to described processing module;Wherein, second preferably 20ms is preset。
Wherein, described processing module is additionally operable to judge whether to reach described second Preset Time;
If reaching described second Preset Time, described radio-frequency module does not receive exogenous data signal, then described processing module controls to close described radio-frequency module;
If not up to described second Preset Time, namely described radio-frequency module receives exogenous data signal, then this data signal is processed by described processing module。
Preferably, the exogenous data signal that described processing module is additionally operable to described radio-frequency module is received carries out check bit checking, and wireless signal strength is judged;If meeting pre-conditioned, then proceeding data exchange, otherwise until reaching described second Preset Time, closing described radio-frequency module。According to concrete system, it is possible to setting actual conditions according to signal intensity。
With reference to Fig. 2, for a kind of identification card of application in reality, RTC clock synchronizes to be used for implementing display current time, and CC2530 is mainly concrete execution and wakes up, detects, and processes, and the module of data transmit-receive, battery and electric power detection are power management module。
With reference to Fig. 3, the operation method of a kind of identification card, comprise the steps:
Step A, first timer, when identification card resting state, carries out the timing of the first Preset Time, reaches described first Preset Time and then sends signal to processing module, is identified card and wakes up;
Step B, is counted the timing number of times of described first timer by enumerator, reaches preset times, then send signal to processing module, and radio-frequency module is opened, and by clear for enumerator 0;Otherwise, described radio-frequency module is closed;
Step C, after radio-frequency module is opened, receives external equipment signal, carries out data exchange;Data exchange is complete, closes described radio-frequency module immediately, and performs hardware detection。
It is preferred that described step A farther includes,
After described identification card wakes up, described processing module carries out packet detection, does not send successful packet if existing, then directly open described radio-frequency module, operating procedure C;
If being absent from not sending successful packet, then described processing module is controlled the hardware detection of equipment。
It is preferred that described step B farther includes, second timer, after described radio-frequency module is opened, carries out the second Preset Time timing, reaches described second Preset Time and then send a signal to described processing module;
If reaching described second Preset Time, described radio-frequency module does not receive exogenous data signal, then described processing module controls to close described radio-frequency module;
If not up to described second Preset Time, described radio-frequency module receives exogenous data signal, then this data signal is processed by described processing module。
It is preferred that the exogenous data signal that described processing module is additionally operable to described radio-frequency module is received carries out check bit checking, and wireless signal strength is judged;If meeting pre-conditioned, then proceeding data exchange, otherwise until reaching described second Preset Time, closing described radio-frequency module。
It is preferred that described processing module is additionally operable to judge residing regional location according to the exogenous data signal message received;
If regional location is identical, then do not repeat data transmission work;
If regional location is different, then perform data transmission work。
Identification card provided by the invention and its operation method, by controlling the unlatching of radio-frequency module, it is possible to save the power consumption of identification card preferably。
Above a kind of data fusion method provided herein and device are described in detail, principle and the embodiment of the application are set forth by specific case used herein, and the explanation of above example is only intended to help and understands the present processes and core concept thereof;Simultaneously for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this specification content should not be construed as the restriction to the application。