Wearable device integrated electronic label data analytic method and system
Technical field
The present invention relates to a kind of integrated electronic label data analytic method and system, and in particular to a kind of wearable device
Integrated electronic label data analytic method and system.
Background technology
Electronic tag (radio frequency identification, RFID, English full name are RadioFrequencyIdentification, also known as without
Line radio frequency identification, it is a kind of communication technology, is commonly called as electronic tag) a kind of non-contact IC card is used as, it is by radio-frequency technique and IC
Technology combines, and reads data using radio wave, a chip and antenna are included in RFID, can be used for storing
Particulars on article.RFID REIDs are a kind of contactless automatic identification technologies, and identifying system is by readding
Device and electronic tag composition are read, destination object is set automatically by radiofrequency signal and obtains related data, identification work is without people
Work intervention, it can be widely used in material system, retail trade, identification, traffic administration, agriculture and animal husbandry industry and pharmaceuticals industry etc.
Many fields.Each electronic tag embeds the unique mark that a digital ID is used as the electronic tag, but the digital ID is
One group of random character, digital ID does not include any coding information in itself, and can only could be read by specific read-write equipment
Go out, naked eyes None- identified, therefore can not directly identify when in use, it is necessary to which Reusability read-write equipment is to electronic tag (RFID)
Data carry out parsing identification.
Wearable device is directly worn, or is incorporated into the clothes of user or a kind of portable set of accessory.
Wearable device is not only a kind of hardware device, even more strong to realize by software support and data interaction, high in the clouds interaction
Big function, life that wearable device will be to us, perceive and bring very big transformation.
Electronic label technology is combined with wearable device, the uniqueness of electronic tag can be utilized preferably to collect and parse
The various information datas of wearable device terminal.
Documents 1:CN101706894A discloses a kind of electronic tag data management method, comprises the following steps:S1 is every
One electronic tag sets an asset number to uniquely determine mark electronic tag;S2 asset numbers are given birth to automatically in production
Production;The digital ID of chip inherently in the assets label and electronic tag of S3 electronic tags is corresponded;S4 electronic tags dispatch from the factory
When, asset number and digital ID corresponding relation solidification can not be changed;When S5 is produced, electronic tag data file, file are generated
The corresponding relation of middle record asset number and digital ID;S6, will using data file when dispatching from the factory before using electronic tag
Asset number and digital id information batch imported into software systems and filed.
Documents 2:CN104184798A disclose a kind of electronic business card management system based on wearable electronic equipment and
Exchange method, being wherein somebody's turn to do the electronic business card management system based on wearable electronic equipment includes wearable electronic equipment, information volume
Unit and high in the clouds information process unit are collected, wherein wearable electronic equipment has NFC function, and its NFC label has unique knowledge
Alias, and it is provided with storage region;Information compiling unit edits the card information of oneself for user and generates a list, reads afterwards
NFC label identifier is taken, personal business card data list and NFC label identifier are sent to high in the clouds information process unit, high in the clouds
Information process unit stores it in memory space and generates an addressable URL, and the connection is presented in the page corresponding to the URL
It is the information of people, and high in the clouds information process unit writes URL information URL back information edit cells, information compiling unit
In the storage region for entering the wearable electronic equipment NFC label.
Above-mentioned documents 1 provide only a kind of data management method of electronic tag, for how to realize electronic tag
The analytic method of data simultaneously has no that pertinent literature is reported.The name card management system of wearable electronic equipment disclosed in documents 2
It is middle to use NFC technique, NFC be it is a kind of provide easily, safety, the wireless connection technology rapidly to communicate, but its transmission range compared with
It is small.
The content of the invention
The technical problem to be solved in the present invention is to provide a kind of resolution speed is fast, transmission range is wide and can realize antitheft answer
Integrated electronic label data analytic method and system for wearable device.
In order to solve the above-mentioned technical problem, the present invention uses following technical scheme:
A kind of wearable device integrated electronic label data analytic method is provided, specifically comprised the following steps:
After RFCO2 laser is activated by electromagnetic wave, radiofrequency signal is sent, receiver receives the radiofrequency signal that RFCO2 laser is sent, passed through
A/D module is converted into data signal;Serial communication module receives data signal and parsed;Number is established between receiver and RFCO2 laser
According to connection, and keep in communication;
Main program initialization starts, and wakes up processor and carries out data parsing to data, specific resolving includes:
S1, main program transmission flow and S2, main program receive flow;
The main program transmission flow S1 specifically comprises the following steps:
Main program is sent to start;Initialization sends subprogram;Whether there is number in the data register of real time inspection processor
According to;There are data then to send in data register, no data in data register, then wake up transmission again into wait;
If RFCO2 laser and receiver beyond distance within a period of time due to not communicating, system is lost to electronic tag
Effect processing, so as to play anti-theft function.
Further,
Initialization as described in S1 steps sends subprogram, and its flow specifically comprises the following steps:
Initialization sends subprogram and started;Initialize house dog;Initialization timer T1;Initialize RFCO2 laser;Initialization
External interrupt;Open and interrupt;Initialization finishes return jump to S1 main programs.
Before initialization house dog is entered after initialization subroutine starts, software delay time, delay etc. can be set
Initialization house dog is entered back into after.
Further,
After sending subprogram initialization, open serial ports and send relay process flow, specifically include:
Send relay services subprogram start, if external interrupt open, clear interrupt identification, data mode to be sent for etc.
Completion to be sent then writes to transmitter register sends data;Send and do not complete, return;
If external interrupt is not opened, timer T1 is interrupted and had turned on, clear interrupt flag bit, assigns timing initial value, time meter again
Number device adds 1;Timer interruption does not open return.
Further,
In step S1, after external interrupt receives data, data in start to process transmitting data register, idiographic flow is such as
Under:
Data mode is sent to start to send, then sends data mode and is changed to signal intensity reading, is when sending data mode
After signal intensity is read, send data mode and be changed to send data, then, enabled transmission data mode is changed to wait and is sent completely;
Pending data is sent completely, and is closed and is sent and be changed to sky by data mode is sent;If sending data time-out, data mode will be sent
It is changed to send mistake and by data re-transmitting, while data mode will be sent and be changed to send data, if sending data mode as sky,
Close and send and return.
Further,
Step S2 receives main program flow, specifically comprises the following steps:
Main program is received to start;Initialization receives subprogram;Initialization handshake data;Serial ports sends handshake data;Open
RFCO2 laser receives;Reset RFCO2 laser fifo;Pending data bag, which receives, closes RFCO2 laser reception;Serial ports strength of transmitted signals value;
Contrast ID;If ID is correct, serial ports sends ID and returned;
Received if packet does not complete, start serial port command processing subprogram;Judge whether RFCO2 laser receives time-out, if
Receive time-out and then close RFCO2 laser, return and resend if reception has not timed out.
Further,
Initialization as described in S2 steps receives subprogram, and its flow specifically comprises the following steps:
Initialization receives subprogram and started;Initialize house dog;Initialize A/D module;Initialization timer T1;Initialization
RFCO2 laser;Initialize external interrupt;Open and interrupt;Initialization finishes return jump to S2 main programs.
Before initialization receives and enters initialization house dog after subprogram starts, the software delay time can be set, prolonged
When wait after enter back into initialization house dog.
Further,
After receiving subprogram initialization, open serial ports and receive relay process flow, specifically include:
Receive relay services subprogram to start, if external interrupt is opened, clear interrupt identification, preserve what RFCO2 laser received
Data, then read return after signal strength values;
If external interrupt is not opened and serial ports is received and interrupted, clear interrupt identification, after the data that preservation serial ports receives
Return;
If if external interrupt is not opened and serial ports is received to interrupt and also do not opened, timer timer T1, which is interrupted, to be opened, in clear
Disconnected mark, assigns timing initial value again, and time counter returns after adding 1;
If external interrupt, serial ports receive interruption, timer interruption does not all open direct return.
Further,
After the completion of serial ports receives relay process flow, receive and send and the data that preserve, parse data, according to field,
Perform corresponding command process.
There is provided a kind of wearable device using above-mentioned wearable device integrated electronic label data analytic method integrated electricity
Subtab data analyzing system, is specifically included:
RFCO2 laser, receiver, A/D module, serial communication module and processor;The processor include data register and
Main control unit;
The RFCO2 laser, receiver, A/D module, serial communication module and processor are arranged in wearable device;Institute
State RFCO2 laser to be used for after being excited by electromagnetic wave, radiofrequency signal is sent to receiver;The A/D module is used to realize radiofrequency signal
With the conversion of data signal;The serial communication module is posted for receiving, parsing data signal and be transferred to the data of processor
Storage;The processor is used to carry out data dissection process by program, and the main control unit of processor, which is used to monitor in real time, to be penetrated
Whether frequency IC is beyond setting communication context.
Further,
The integrated electronic label data resolution system also includes button cell power supply module.
During work, receiver (can be reception antenna) receives RFCO2 laser and sends radiofrequency signal, and A/D module is by radiofrequency signal
Data signal is converted to, serial communication module receives data signal and to digital signal resolution, sends analytic signal, there is 20M
In the range of with dispensing device communicate, communicate and successfully return to pass signal, unsuccessfully return to failure signal, processor reception signal simultaneously solves
Analyse information.Radio frequency identification RFID module is controllable, and each RFID has unique ID number.In certain scope, place
Reason device can monitor the presence of electronic tag constantly, and after electronic tag is beyond the coverage, processor can supervise
Measure it and do crash handling beyond the scope of setting, and to electronic tag, play anti-theft function.
Electronic tag in the present invention can be the electronic tag with read-write capability, and user writes in electronic tag
Information data, system read ID, and the information data write in electronic tag and ID then are sent jointly into processor, processor
By in its memory data register.
Beneficial effects of the present invention:
Because wearable device has been widely used, electronic label technology is applied in wearable device, can be met
The user such as enterprise-level and consumer level life, work, various needs in study, be especially suitable for education, medical treatment, bank, building,
The sector applications such as environmental protection, the life to people bring more facilities.
Because RFID label tag then can increase newly repeatedly, change, delete the data stored in RFID label tag, facilitate information
Renewal, compared to traditional magnetic card, Reusability is recycled, service life is longer, more environmentally-friendly, can reduce use cost.
What it is due to RFID carryings is electronic type information, and its data content can be not easy its content pseudo- via cryptoguard
Make and alter, it is safer.
To be compared with the NFC technique in documents 2, its transmission range is smaller than the RFID technique transmission range in the present invention,
RFID technique is used in the present invention, its transmission range can reach 20 meters.
Electronics note data analysis method provided by the invention and system are set when main control unit monitors that electronic tag exceeds
When determining scope, the electronic tag can be made to fail, so as to play anti-theft function.
To sum up, integrated electronic label data analytic method provided by the invention and system can be applied to wearable device, tool
There is the characteristics of resolution speed is fast, transmission range is wide, and can realize antitheft.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the main program transmission flow figure of the embodiment of the present invention;
Fig. 2 is the transmission subprogram initialization flowchart of the embodiment of the present invention;
Fig. 3 is the serial ports interrupt processing flow chart that the main program of the embodiment of the present invention is sent;
Fig. 4 is the main program data transmission flow figure of the embodiment of the present invention;
Fig. 5 is that the main program of the embodiment of the present invention receives flow chart;
Fig. 6 is the reception subprogram initialization flowchart of the embodiment of the present invention;
Fig. 7 is the serial ports interrupt processing flow chart that the main program of the embodiment of the present invention receives;
Fig. 8 is the main program data receiver process of analysis figure of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawings and embodiment further illustrates to invention, but is not limited to the scope of the present invention.
As shown in figures 1-8, the present invention provides a kind of wearable device integrated electronic label data resolution system, specific bag
Include:
RFCO2 laser (SI4421), receiver, A/D module, serial communication module and processor (PIC16F688);The processing
Device (PIC16F688) includes data register and main control unit;
The RFCO2 laser (SI4421), receiver, A/D module, serial communication module and processor (PIC16F688) are all provided with
Put in wearable device;The RFCO2 laser (SI4421) is used for after being excited by electromagnetic wave, and radiofrequency signal is sent to receiver;
The A/D module is used for the conversion for realizing radiofrequency signal and data signal;The serial communication module is used to receive, parse numeral
Signal and the data register for being transferred to processor (PIC16F688);Processor (PIC16F688) is used for by program to data
Dissection process is carried out, the main control unit of processor (PIC16F688) is set for whether monitoring RFCO2 laser (SI4421) in real time to exceed
Determine communication context.
The integrated electronic label data resolution system also includes button cell power supply module.
Electronic tag in the present embodiment can be the electronic tag with read-write capability, and user writes in electronic tag
Enter information data, system reads ID, and the information data write in electronic tag and ID then are sent jointly into processor
(PIC16F688), processor (PIC16F688) is by its memory data register.
The parsing system, method of above-mentioned wearable device integrated electronic label data resolution system is as follows:
After RFCO2 laser (SI4421) is activated by electromagnetic wave, radiofrequency signal is sent, receiver receives RFCO2 laser (SI4421) hair
The radiofrequency signal gone out, data signal is converted into by A/D module;Serial communication module receives data signal and parsed;Receiver with
Data connection is established between RFCO2 laser (SI4421), and is kept in communication;
Main program initialization starts, and wakes up processor (PIC16F688) and carries out data parsing, specific resolving to data
Including:
S1, main program transmission flow and S2, main program receive flow;
As described in Figure 1, the main program transmission flow S1 specifically comprises the following steps:
Main program is sent to start;Initialization sends subprogram;The data register of real time inspection processor (PIC16F688)
Inside whether there are data;There are data then to send in data register, no data in data register, then wake up hair again into wait
Send.
If RFCO2 laser (SI4421) and receiver due to beyond distance a period of time (it is interior do not communicate when, system is to electricity
Subtab does crash handling, so as to play anti-theft function.
As described in Figure 2, the initialization described in S1 steps sends subprogram, and its flow specifically comprises the following steps:
Initialization sends subprogram and started;Initialize house dog;Initialization timer T1;Initialize RFCO2 laser;Initialization
External interrupt;Open and interrupt;Initialization finishes return jump to S1 main programs.
Before initialization house dog is entered after initialization subroutine starts, software delay time, delay etc. can be set
Initialization house dog is entered back into after.
As described in Figure 3, after sending subprogram initialization, open serial ports and send relay process flow, specifically include:
Send relay services subprogram start, if external interrupt open, clear interrupt identification, data mode to be sent for etc.
Completion to be sent then writes to transmitter register sends data;Send and do not complete, return;
If external interrupt is not opened, timer T1 is interrupted and had turned on, clear interrupt flag bit, assigns timing initial value, time meter again
Number device adds 1;Timer interruption does not open return.
As described in Figure 4, in step S1, after external interrupt receives data, data in start to process transmitting data register,
Idiographic flow is as follows:
Data mode is sent to start to send, then sends data mode and is changed to signal intensity reading, is when sending data mode
After signal intensity is read, send data mode and be changed to send data, then, enabled transmission data mode is changed to wait and is sent completely;
Pending data is sent completely, and is closed and is sent and be changed to sky by data mode is sent;If sending data time-out, data mode will be sent
It is changed to send mistake and by data re-transmitting, while data mode will be sent and be changed to send data, if sending data mode as sky,
Close and send and return.
As described in Figure 5, step S2 receives main program flow, specifically comprises the following steps:
Main program is received to start;Initialization receives subprogram;Initialization handshake data;Serial ports sends handshake data;Open
RFCO2 laser receives;Reset RFCO2 laser fifo;Pending data bag, which receives, closes RFCO2 laser reception;Serial ports strength of transmitted signals value;
Contrast ID;If ID is correct, serial ports sends ID and returned;
Received if packet does not complete, start serial port command processing subprogram;Judge whether RFCO2 laser receives time-out, if
Receive time-out and then close RFCO2 laser, return and resend if reception has not timed out.
As described in Figure 6, the initialization as described in S2 steps receives subprogram, and its flow specifically comprises the following steps:
Initialization receives subprogram and started;Initialize house dog;Initialize A/D module;Initialization timer T1;Initialization
RFCO2 laser;Initialize external interrupt;Open and interrupt;Initialization finishes return jump to S2 main programs.
Before initialization receives and enters initialization house dog after subprogram starts, the software delay time can be set, prolonged
When wait after enter back into initialization house dog.
As described in Figure 7, after receiving subprogram initialization, open serial ports and receive relay process flow, specifically include:
Receive relay services subprogram to start, if external interrupt is opened, clear interrupt identification, preserve what RFCO2 laser received
Data, then read return after signal strength values;
If external interrupt is not opened and serial ports is received and interrupted, clear interrupt identification, after the data that preservation serial ports receives
Return;
If if external interrupt is not opened and serial ports is received to interrupt and also do not opened, timer timer T1, which is interrupted, to be opened, in clear
Disconnected mark, assigns timing initial value again, and time counter returns after adding 1;
If external interrupt, serial ports receive interruption, timer interruption does not all open direct return.
As described in Figure 8, after the completion of serial ports receives relay process flow, the data for sending and preserving are received, parse data,
According to field, corresponding command process is performed.
During work, receiver (can be reception antenna) receives RFCO2 laser (SI4421) and sends radiofrequency signal, and A/D module will
Radiofrequency signal is converted to data signal, and serial communication module receives data signal and to digital signal resolution, sends analytic signal,
Communicated having in the range of 20M with dispensing device, communicate and successfully return to pass signal, unsuccessfully return to failure signal, processor
(PIC16F688) reception signal and information is parsed.Radio frequency identification RFID module is controllable, and each RFID has uniquely
ID number.In certain scope, processor can monitor the presence of electronic tag constantly, and when electronic tag has beyond this
After effect distance, processor can monitor that it does crash handling beyond the scope of setting, and to electronic tag, play anti-
Robber acts on.
The present embodiment is combined electronic label technology with wearable device, and electronic label technology is applied into wearable device
In, the users such as enterprise-level and consumer level can be met in life, work, various needs in study, especially suitable education, doctor
The sector applications such as treatment, bank, building, environmental protection, the life to people bring more facilities.
Because RFID label tag then can increase newly repeatedly, change, delete the data stored in RFID label tag, facilitate information
Renewal, compared to traditional magnetic card, Reusability is recycled, service life is longer, more environmentally-friendly, can reduce use cost.
What it is due to RFID carryings is electronic type information, and its data content can be not easy its content pseudo- via cryptoguard
Make and alter, it is safer.
RFID technique is used in the present embodiment, its communication transfer scope can reach 20 meters.
The electronics note data analysis method and system that the present embodiment provides are when main control unit monitors that electronic tag exceeds
During setting range, the electronic tag can be made to fail, so as to play anti-theft function.
To sum up, the integrated electronic label data analytic method and system that the present embodiment provides can be applied to wearable device,
With the characteristics of resolution speed is fast, transmission range is wide, and can realize antitheft.
General principle, principal character and the advantages of the present invention of the present invention has been shown and described above.The technology of the industry
Personnel are it should be appreciated that the present invention is not limited to the above embodiments, and the simply explanation described in above-described embodiment and specification is originally
The principle of invention, various changes and modifications of the present invention are possible without departing from the spirit and scope of the present invention, these changes
Change and improvement all fall within the protetion scope of the claimed invention.The claimed scope of the invention by appended claims and its
Equivalent defines.