CN110598810A - Data writing and reading method of electronic tag - Google Patents
Data writing and reading method of electronic tag Download PDFInfo
- Publication number
- CN110598810A CN110598810A CN201910766106.5A CN201910766106A CN110598810A CN 110598810 A CN110598810 A CN 110598810A CN 201910766106 A CN201910766106 A CN 201910766106A CN 110598810 A CN110598810 A CN 110598810A
- Authority
- CN
- China
- Prior art keywords
- electronic tag
- data
- read
- reading
- writing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000006854 communication Effects 0.000 claims abstract description 49
- 238000004891 communication Methods 0.000 claims abstract description 46
- 238000013500 data storage Methods 0.000 claims abstract description 24
- 230000005540 biological transmission Effects 0.000 claims abstract description 14
- 230000004044 response Effects 0.000 claims description 79
- 238000012790 confirmation Methods 0.000 claims description 34
- 101000893549 Homo sapiens Growth/differentiation factor 15 Proteins 0.000 claims description 24
- 101000692878 Homo sapiens Regulator of MON1-CCZ1 complex Proteins 0.000 claims description 24
- 102100026436 Regulator of MON1-CCZ1 complex Human genes 0.000 claims description 24
- 102000008482 12E7 Antigen Human genes 0.000 claims description 21
- 108010020567 12E7 Antigen Proteins 0.000 claims description 21
- WHXSMMKQMYFTQS-UHFFFAOYSA-N Lithium Chemical compound [Li] WHXSMMKQMYFTQS-UHFFFAOYSA-N 0.000 claims description 13
- 229910052744 lithium Inorganic materials 0.000 claims description 13
- 230000008569 process Effects 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 5
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K17/00—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
- G06K17/0022—Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisious for transferring data to distant stations, e.g. from a sensing device
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/04—Key management, e.g. using generic bootstrapping architecture [GBA]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a data writing and reading method of an electronic tag, which comprises a data writing step and a data reading step, wherein the data writing step comprises the following steps: selecting equipment for writing data into the electronic tag, transmitting the electronic tag data to be written to the selected equipment, storing the electronic tag data into a data storage module of the selected equipment, and writing the electronic tag data in the data storage module into the electronic tag; a data reading step: and calling data in the electronic tag, transmitting the data to a read-write device, selecting equipment for reading the data of the electronic tag, establishing communication between the equipment and the read-write device, and transmitting the data in real time. The invention has the advantages of various read-write transmission modes, cost saving and high read-write safety.
Description
Technical Field
The invention relates to the technical field of electronic information, in particular to a data writing and reading method of an electronic tag.
Background
An electronic tag is also called a radio frequency tag, a transponder, a data carrier, and a reader is also called a reading device, a scanner, a reading head, a communicator, a reading and writing device (depending on whether the electronic tag can wirelessly rewrite data). The electronic tag and the reader realize space (non-contact) coupling of radio frequency signals through the coupling element, and energy transfer and data exchange are realized in the coupling channel according to a time sequence relation.
The electronic tag reading and writing device in the prior art and the mobile terminal equipment or the remote server equipment mainly adopt a USB wired connection mode, the mode has strong anti-interference capability and good confidentiality, can be used in a plug-and-play mode, has obvious advantages under the condition of reading and writing the electronic tag at a fixed place and in a short distance, but the moving distance of the equipment in the wired mode is still limited. And the electronic tag reading-writing device is connected with the mobile terminal equipment or the remote server equipment in a Bluetooth or WIFI mode, and the wireless connection modes can overcome distance limitation and are respectively suitable for different scenes. However, currently, there is no electronic tag read-write technology and read-write method that can provide multiple connection modes simultaneously to meet different applications, which limits the application range of the read-write device, and for the situation that multiple modes of electronic tag information acquisition are needed, multiple read-write devices are needed to achieve the purpose, which increases the use cost, the electric quantity is provided by external alternating current in the read-write process, an electric energy conversion technology and equipment are needed, which cannot be far away from the power supply position, and currently, radio frequency identification is used as a wireless technology, due to the wireless and broadcast characteristics in the communication process, the wireless and broadcast characteristics in the communication process are prone to be attacked by eavesdropping, tampering, counterfeiting, capturing and copying of the message, and a security mechanism needs to be introduced in the communication process to ensure the security of communication.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a data writing and reading method of an electronic tag, which has the advantages of various reading and writing transmission modes, cost saving and high reading and writing safety.
The technical scheme of the invention is as follows:
a data writing and reading method of an electronic tag comprises a data writing step and a data reading step, wherein:
a data writing step: selecting equipment for writing data into the electronic tag, transmitting the electronic tag data to be written to the selected equipment, storing the electronic tag data into a data storage module of the selected equipment, and writing the electronic tag data in the data storage module into the electronic tag;
a data reading step: and calling data in the electronic tag, transmitting the data to a read-write device, selecting equipment for reading the data of the electronic tag, establishing communication between the equipment and the read-write device, and transmitting the data in real time.
In a preferred embodiment, the data writing step includes the steps of:
a1, selecting the mobile terminal device or the remote server device for writing data into the electronic tag, and if the mobile terminal device or the remote server device is the mobile terminal device, entering the step a 2; if it is a remote server device, go to step a 4;
a2, setting the mobile terminal device to be in a writing mode, transmitting the electronic tag data to be written to the mobile terminal device, and entering the step a 3;
a3, reading electronic tag data to be written in the mobile terminal equipment, storing the received data in a data storage module in a reading device, and entering the step a 6;
a4, setting the remote server equipment to be in a writing mode, inputting the electronic tag data to be written into the remote server equipment, and entering the step a 5;
a5, reading the electronic tag data to be written in the remote server equipment, storing the received data in a data storage module in a reading device, and entering the step a 6;
and a6, writing the data in the data storage module into the electronic tag.
In a preferred embodiment, the data reading step includes the steps of:
b1, calling the data in the electronic tag and transmitting the data to a data storage module in the reading and writing device;
b2, selecting the mobile terminal device or the remote server device for reading data from the electronic tag, and if the mobile terminal device or the remote server device is the mobile terminal device, entering the step b 3; if the server device is a remote server device, go to step b 4;
b3, transmitting the data in the data storage module to the mobile terminal device, receiving and storing the received data by the mobile terminal device, and displaying the data on the touch display screen;
b4, transmitting the data in the data storage module to a remote server device, and receiving and storing the received data by the remote server device and displaying the data on the display.
In a preferred embodiment, the method further includes the step of establishing a secure link between the read-write device and the electronic tag, specifically as follows:
c1, reading a master key MK of the read-write device, and calculating and deriving a pre-shared key PSK of the electronic tag through the master key MK and the identification TID of the electronic tag;
c2, sending a security parameter acquisition message to the electronic tag, and starting a security link establishment process of the reading and writing device and the electronic tag through the security parameter acquisition message;
c3, after receiving the security parameter acquisition message of the read-write device, constructing a security parameter response message and sending the security parameter response message to the read-write device, wherein the security parameter response message comprises the security algorithm type supported by the electronic tag;
c4, sending an authentication request message to the electronic tag, wherein the authentication request message comprises an Nr field, and the Nr field is a random number generated by the read-write device;
c5, after receiving the authentication request message of the read-write device, if the read-write device needs to be authenticated, generating a random number Nt, calculating an integrity check code MIC1 for Nr | | Nt by using a pre-shared key PSK, and returning an authentication request response message to the read-write device, wherein the authentication request response message comprises Nr, Nt and MIC1, and Nr is an optional field; if the read-write device does not need to be identified, computing an integrity check code MIC1 for Nr by using a pre-shared key PSK, and returning an identification request response message to the read-write device, wherein the identification request response message comprises Nr and MIC1, and the Nr is an optional field;
c6, after receiving the response message of the authentication request returned by the electronic tag, if the message includes Nr and the Nr is not equal to the random number Nr generated by the read-write device in step c4, discarding the response message of the authentication request; if the authentication request response message includes Nr and the Nr is equal to the random number Nr generated by the reader/writer in step c4 or the authentication request response message does not include Nr, deriving PSK by calculating MK | | TID using the master key MK and the identifier TID of the electronic tag;
when the electronic tag needs to be identified, recalculating an integrity check code MIC1 'for Nr | | Nt, comparing the MIC 1' with the MIC1 in the received identification request response message, and if the two are not equal, discarding the identification request response message; if the two are equal, the electronic tag is considered to be legal, calculating Nt by utilizing PSK to generate MIC2, and sending an authentication response confirmation message to the electronic tag, wherein the authentication response confirmation message comprises Nt and MIC2, and the Nt is an optional field;
when the electronic tag does not need to be authenticated, recalculating an integrity check code MIC1 'for Nr, comparing the MIC 1' with the MIC1 in the received authentication request response message, and if the two are not equal, discarding the authentication request response message; if the two are equal, the electronic tag is considered to be legal;
c7, after receiving the authentication response confirmation message of the read-write device, if the message includes Nt and the Nt is not equal to the random number Nt generated by the electronic tag in the step c5, the read-write device is considered to be illegal and the authentication response confirmation message is discarded; if Nt is included in the authentication response confirmation message and is equal to the random number Nt generated by the electronic tag in step c5 or the authentication response confirmation message does not include Nt, recalculating the integrity check code MIC2 'for Nt using PSK and comparing the MIC 2' with the MIC2 in the received authentication response confirmation message;
when the MIC2 'is compared with the MIC2 in the received authentication response confirmation message, if the MIC 2' is not equal to the MIC2, the read-write device is considered to be illegal, and the authentication response confirmation message is discarded; if the two are equal, the read-write device is considered to be legal.
In a preferred embodiment, after step c7, if the electronic tag and the read-write device need to be authenticated, an authentication result message is sent to the read-write device; if the read-write device is considered to be legal, the authentication response confirmation message comprises an authentication success message; and if the read-write device is considered to be illegal, the authentication response confirmation message comprises an authentication failure message.
In a preferred embodiment, the read-write device is a device including a power control module, and the power control module is in a structure including an AC/DC converter, a DC/DC converter and a lithium battery; the power supply control module supplies power by adopting a lithium battery, or converts solar energy into electric energy to supply power, or combines the lithium battery and alternating current through an AC/DC converter and a DC/DC converter to convert and charge, namely, the power supply control module supplies power to the wired communication module, the wireless communication module and the electronic tag reading and writing module by adopting the existing power supply mode.
In a preferred embodiment, the read-write device is a device including a wired communication module, and in steps a3 and b3, the mobile terminal device and the read-write device transmit data through a USB interface, an RS232 interface, a 485 interface, or an RJ45 interface of the wired communication module by using a wired connection.
In a preferred embodiment, the read-write device is a device including a wireless communication module, and in steps a5 and b4, the remote server and the read-write device transmit data through a WIFI communication interface, a bluetooth communication interface, a 4G network interface, or a GPRS communication interface on the wireless communication module by using a WIFI transmission mode, a bluetooth transmission mode, a 4G network transmission mode, or a GPRS communication transmission mode.
In a preferred embodiment, the read-write device is a device including an electronic tag read-write module, the electronic tag and the electronic tag read-write module are connected through a low-frequency magnetic field information channel, and in the steps a6 and b1, data reading and writing in the process of reading and writing the electronic tag data are both realized by the electronic tag read-write module.
The invention has the beneficial effects that:
(1) the invention solves the problem of distance limitation by providing the electronic tag reading and writing method supporting various communication modes, increases the application range and scenes of the reading and writing device, reduces the number of devices and reduces the application cost;
(2) the method comprises the steps that the legality of the identity of a communication counterpart is ensured through the process of establishing a secure link between a read-write device and an electronic tag, and a session key is negotiated for the read-write device and the electronic tag when needed, so that the secure communication link between the read-write device and the tag is established;
(3) the system implementation cost is reduced through the step c1, the safe link establishment method does not need the support of a background database, and the system implementation cost is lower;
(4) the efficiency of establishing the secure link is improved through the step c2, the secure link establishing method does not need to inquire a database in the process of establishing the link, and the authentication efficiency is higher;
(5) through power control module's setting, solved the equipment power supply problem, can enough directly utilize the alternating current, also can turn into the direct current with the alternating current and store in the lithium cell, leave the power after, can be through the lithium cell for read write device power supply, increased read write device's application scope and scene.
Drawings
Fig. 1 is a schematic system operation flow diagram of an embodiment 1 of a data writing and reading method for an electronic tag according to the present invention;
fig. 2 is a schematic diagram of an internal circuit flow of the read/write apparatus in embodiment 1 of the method for writing and reading data in an electronic tag according to the present invention;
fig. 3 is a schematic diagram of a secure link structure in embodiment 2 of a data writing and reading method for an electronic tag according to the present invention;
fig. 4 is a schematic diagram illustrating a process of establishing a secure link between a read/write device and an electronic tag in embodiment 2 of a method for writing and reading data in an electronic tag according to the present invention;
fig. 5 is a schematic diagram of an internal structure of a power control module in embodiment 3 of a method for writing and reading data in an electronic tag according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example 1:
as shown in fig. 1-2, a method for writing and reading data in an electronic tag includes the following steps:
a data writing step:
a1, setting the device source of the write data: if the data is written through the mobile terminal 9, go to step a 2; if the data is written by the remote server 10, go to step a 4;
a2, setting the mobile terminal 9 to be in a writing mode, inputting data of the electronic tag 1 to be written into the mobile terminal 9, and entering a step a 3;
a3, establishing connection between the connection read-write device 2 and the mobile terminal 9: the mobile terminal 9 and the read-write device 2 are set in a wired connection mode according to an interface of the wired communication module 8, the mobile terminal 9 sends input data to the read-write device 2 in the set mode, and the read-write device 2 receives the data through the USB interface 11, the RS232 interface 12, the 485 interface 13 or the RJ45 interface 14 and stores the received data in the data storage module 6 under the control of the microcontroller 4; entering step a 6;
a4, setting the remote server 10 to be in a writing mode, inputting the data of the electronic tag 1 to be written into the remote server 10, and entering the step a 5;
a5, establishing the connection between the read-write device 2 and the remote server 10; the read-write device 2 and the remote server 10 are connected according to the interface setting of the wireless communication module 7 in a manner that the remote server 10 sends input data to the read-write device 2 in a set manner, and the read-write device 2 receives the data through the WIFI communication interface 15, the Bluetooth communication interface 18, the 4G network interface 16 or the GPRS communication interface 17 and stores the received data in the data storage module 6 under the control of the microcontroller 4; entering step a 6;
a6, writing data to electronic tag 1: placing the electronic tag 1 in the reading and writing distance range of an electronic tag reading and writing module 3 of a reading and writing device 2, enabling the electronic tag 1 to be wirelessly connected with the electronic tag reading and writing module 3, and writing data in a data storage module 6 into the electronic tag 1;
a data reading step:
b1, reading data from the electronic tag 1: placing the electronic tag 1 in the reading and writing distance range of the electronic tag reading and writing module 3 of the reading and writing device 2, enabling the electronic tag 1 to be wirelessly connected with the electronic tag reading and writing module 3, reading data and storing the data in the data storage module 6;
b2, reading device of setting data: if the data is read through the mobile terminal 9, go to step b 3; if the data is read by the remote server 10, go to step b 4;
b3, establishing the connection between the read-write device 2 and the mobile terminal 9; the read-write device 2 and the mobile terminal 9 are in a wired connection mode according to an interface of the wired communication module 8, the microcontroller 4 sends data in the data storage module 6 to the mobile terminal 9 through the USB interface 11, the RS232 interface 12, the 485 interface 13 or the RJ45 interface 14, and the mobile terminal 9 receives and stores the received data and displays the data on the touch display screen;
b4, setting the remote server 10 to be in a reading mode, and establishing the connection between the read-write device 2 and the remote server 10; the read-write device 2 and the remote server 10 are connected in a WIFI transmission mode, a Bluetooth transmission mode, a 4G network transmission mode or a GPRS communication transmission mode according to the interface of the wireless communication module 7, the microcontroller 4 transmits data in the data storage module 6 to the remote server 10 through the WIFI communication interface 15, the Bluetooth communication interface 18, the 4G network interface 16 or the GPRS communication interface 17, and the remote server 10 receives and stores the received data and displays the data on the display.
In the above steps, the connection mode of the electronic tag 1 and the electronic tag read-write module 3 is a low-frequency magnetic field information channel connection, and the read-write device 2 establishes a secure link with the electronic tag 1.
Example 2:
as shown in fig. 3 to 4, in this embodiment, on the basis of embodiment 1, the method for establishing the secure link between the read/write device 2 and the electronic tag 1 includes the following steps:
c1, reading a master key MK20 of the read-write device 2, and calculating a pre-shared key PSK19 of the electronic tag according to the master key MK20 and the identification TID of the electronic tag 1;
c2, the read-write device 2 sends a security parameter acquisition message to the electronic tag 1, and the security parameter acquisition message is used for starting the process of establishing the security link between the read-write device 2 and the electronic tag 1;
c3, after the electronic tag 1 receives the security parameter acquisition message of the read-write device 2, the electronic tag 1 constructs a security parameter response message and sends the security parameter response message to the read-write device 2, wherein the security parameter response message comprises the security algorithm type supported by the electronic tag 1;
c4, the read-write device 2 sends an authentication request message to the electronic tag 1, wherein the authentication request message comprises an Nr field, and Nr is a random number generated by the read-write device 2;
c5, after receiving the authentication request message of the read-write device 2, if the read-write device 2 needs to be authenticated, the electronic tag 1 generates a random number Nt, and calculates an integrity check code MIC1 for Nr | | | Nt by using a pre-shared key PSK19, the electronic tag 1 returns an authentication request response message to the read-write device 2, the authentication request response message comprises Nr, Nt and MIC1, wherein Nr is an optional field;
if the electronic tag 1 does not need to identify the read-write device 2, the electronic tag 1 calculates an integrity check code MIC1 for Nr by using a pre-shared key PSK19, and returns an identification request response message to the read-write device 2, wherein the identification request response message comprises Nr and MIC1, and Nr is an optional field;
c6, after the read-write device 2 receives the authentication request response message returned by the electronic tag 1, if the message includes Nr and the Nr is not equal to the random number Nr generated by the read-write device 2 in step c4, the read-write device 2 discards the authentication request response message; if Nr is included in the authentication request response message and this Nr is equal to the random number Nr generated by reader/writer 2 in step c4 or the authentication request response message does not include Nr, reader/writer 2 derives PSK by calculating MK | | TID using master key MK20 and the identifier TID of electronic tag 1;
when the read-write device 2 needs to identify the electronic tag 1, the read-write device 2 recalculates the integrity check code MIC1 'to Nr | | | Nt through PSK, compares the MIC 1' with the MIC1 in the received identification request response message, and if the two are not equal, the read-write device 2 discards the identification request response message; if the two are equal, the read-write device 2 considers that the electronic tag 1 is legal, the read-write device 2 calculates Nt by utilizing PSK to generate MIC2, and sends an authentication response confirmation message to the electronic tag 1, wherein the authentication response confirmation message comprises Nt and MIC2, and Nt is an optional field;
when the reader/writer 2 does not need to authenticate the electronic tag 1, the reader/writer 2 recalculates the integrity check code MIC1 'for Nr through PSK, compares the MIC 1' with the MIC1 in the received authentication request response message, and if the two are not equal, the reader/writer 2 discards the authentication request response message; if the two are equal, the read-write device 2 considers that the electronic tag 1 is legal;
c7, after receiving the authentication response confirmation message from the reader/writer device 2, if the message includes Nt and Nt is not equal to the random number Nt generated by the electronic tag 1 in step c5, the electronic tag 1 considers that the reader/writer device 2 is illegal and discards the authentication response confirmation message; if Nt is included in the authentication response confirmation message and is equal to the random number Nt generated by electronic tag 1 in step c5 or the authentication response confirmation message does not include Nt, electronic tag 1 recalculates the integrity check code MIC2 'for Nt using PSK, and compares MIC 2' with MIC2 in the received authentication response confirmation message;
when the electronic tag 1 compares the MIC2 'with the MIC2 in the received authentication response confirmation message, if the MIC 2' is not equal to the MIC2 in the received authentication response confirmation message, the electronic tag 1 considers that the read-write device 2 is illegal and discards the authentication response confirmation message; if they are equal, the electronic tag 1 considers the read-write device 2 to be legal.
After step c7, when the reading and writing device 2 needs to identify the electronic tag 1 and the electronic tag 1 also needs to identify the reading and writing device 2, the electronic tag 1 sends an identification result message to the reading and writing device 2; if the electronic tag 1 considers that the read-write device 2 is legal, the authentication response confirmation message comprises an authentication success message; if the electronic tag 1 determines that the read-write device 2 is illegal, the authentication response confirmation message includes an authentication failure message.
The legality of the identity of the communication counterpart is ensured through the process of establishing the secure link between the read-write device 2 and the electronic tag 1, and a session key is negotiated for the read-write device 2 and the electronic tag 1 when needed, so that the secure communication link between the read-write device 2 and the electronic tag 1 is established. In addition, the invention also has the following advantages: c1, the cost of system realization is reduced, the method for establishing the safe link provided by the invention does not need the support of a background database, and the cost of system realization is lower; c2, the efficiency of establishing the safe link is improved, the safe link establishing method provided by the invention does not need to inquire the database in the process of establishing the link, and the authentication efficiency is higher. The method can also utilize a session key negotiated in the process of establishing the secure link to encrypt the operation command of the tag by the read-write device 2 and use the encrypted operation command as a load form of a secure access message, so that the confidentiality of communication data in the process of accessing the tag by the read-write device 2 is realized, and the security of communication between the read-write device 2 and the tag is further ensured.
Example 2 the rest of the structure and method are the same as example 1.
Example 3:
as shown in fig. 5, this embodiment is improved on the basis of embodiment 2, the read-write device 2 further includes a power control module 5 for supplying power to the wired communication module 8, the wireless communication module 7, and the electronic tag read-write module 3, the power control module 5 includes an AC/DC converter 22, a DC/DC converter 23, and a lithium battery 24, an input end of the AC/DC converter 22 is directly connected to the external alternating current power supply 21, an output end of the AC/DC converter 22 is connected to an input end of the DC/DC converter 23, an output end of the DC/DC converter 23 is connected to an input end of the lithium battery 24, and an output end of the lithium battery 24 is connected to an input end of the microcontroller 4; the power control module 5 can adopt the lithium battery 24 to supply power, or convert solar energy into electric energy to supply power, or adopt the lithium battery 24 and the mode that the alternating current charges to combine together to supply power, namely the power control module 5 can adopt the current mode of supplying power to supply power for wired communication module 8, wireless communication module 7 and electronic tags read-write module 3, and the user demand of different occasions has been satisfied to the power supply variety.
Example 3 the rest of the structure and method are the same as example 2.
The above-mentioned embodiments only express the specific embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention.
Claims (9)
1. A data writing and reading method of an electronic tag is characterized by comprising a data writing step and a data reading step, wherein:
a data writing step: selecting equipment for writing data into the electronic tag, transmitting the electronic tag data to be written to the selected equipment, storing the electronic tag data into a data storage module of the selected equipment, and writing the electronic tag data in the data storage module into the electronic tag;
a data reading step: and calling data in the electronic tag, transmitting the data to a read-write device, selecting equipment for reading the data of the electronic tag, establishing communication between the equipment and the read-write device, and transmitting the data in real time.
2. The method according to claim 1, wherein the data writing step comprises the steps of:
a1, selecting the mobile terminal device or the remote server device for writing data into the electronic tag, and if the mobile terminal device or the remote server device is the mobile terminal device, entering the step a 2; if it is a remote server device, go to step a 4;
a2, setting the mobile terminal device to be in a writing mode, transmitting the electronic tag data to be written to the mobile terminal device, and entering the step a 3;
a3, reading electronic tag data to be written in the mobile terminal equipment, storing the received data in a data storage module in a reading device, and entering the step a 6;
a4, setting the remote server equipment to be in a writing mode, inputting the electronic tag data to be written into the remote server equipment, and entering the step a 5;
a5, reading the electronic tag data to be written in the remote server equipment, storing the received data in a data storage module in a reading device, and entering the step a 6;
and a6, writing the data in the data storage module into the electronic tag.
3. The method for writing and reading data of an electronic tag according to claim 1 or 2, wherein the step of reading data comprises the steps of:
b1, calling the data in the electronic tag and transmitting the data to a data storage module in the reading and writing device;
b2, selecting the mobile terminal device or the remote server device for reading data from the electronic tag, and if the mobile terminal device or the remote server device is the mobile terminal device, entering the step b 3; if the server device is a remote server device, go to step b 4;
b3, transmitting the data in the data storage module to the mobile terminal device, receiving and storing the received data by the mobile terminal device, and displaying the data on the touch display screen;
b4, transmitting the data in the data storage module to a remote server device, and receiving and storing the received data by the remote server device and displaying the data on the display.
4. The method according to claim 3, further comprising a step of establishing a secure link between the read/write device and the electronic tag, wherein the method comprises the following steps:
c1, reading a master key MK of the read-write device, and calculating and deriving a pre-shared key PSK of the electronic tag through the master key MK and the identification TID of the electronic tag;
c2, sending a security parameter acquisition message to the electronic tag, and starting a security link establishment process of the reading and writing device and the electronic tag through the security parameter acquisition message;
c3, after receiving the security parameter acquisition message of the read-write device, constructing a security parameter response message and sending the security parameter response message to the read-write device, wherein the security parameter response message comprises the security algorithm type supported by the electronic tag;
c4, sending an authentication request message to the electronic tag, wherein the authentication request message comprises an Nr field, and the Nr field is a random number generated by the read-write device;
c5, after receiving the authentication request message of the read-write device, if the read-write device needs to be authenticated, generating a random number Nt, calculating an integrity check code MIC1 for Nr | | Nt by using a pre-shared key PSK, and returning an authentication request response message to the read-write device, wherein the authentication request response message comprises Nr, Nt and MIC1, and Nr is an optional field; if the read-write device does not need to be identified, computing an integrity check code MIC1 for Nr by using a pre-shared key PSK, and returning an identification request response message to the read-write device, wherein the identification request response message comprises Nr and MIC1, and the Nr is an optional field;
c6, after receiving the response message of the authentication request returned by the electronic tag, if the message includes Nr and the Nr is not equal to the random number Nr generated by the read-write device in step c4, discarding the response message of the authentication request; if the authentication request response message includes Nr and the Nr is equal to the random number Nr generated by the reader/writer in step c4 or the authentication request response message does not include Nr, deriving PSK by calculating MK | | TID using the master key MK and the identifier TID of the electronic tag;
when the electronic tag needs to be identified, recalculating an integrity check code MIC1 'for Nr | | Nt, comparing the MIC 1' with the MIC1 in the received identification request response message, and if the two are not equal, discarding the identification request response message; if the two are equal, the electronic tag is considered to be legal, calculating Nt by utilizing PSK to generate MIC2, and sending an authentication response confirmation message to the electronic tag, wherein the authentication response confirmation message comprises Nt and MIC2, and the Nt is an optional field;
when the electronic tag does not need to be authenticated, recalculating an integrity check code MIC1 'for Nr, comparing the MIC 1' with the MIC1 in the received authentication request response message, and if the two are not equal, discarding the authentication request response message; if the two are equal, the electronic tag is considered to be legal;
c7, after receiving the authentication response confirmation message of the read-write device, if the message includes Nt and the Nt is not equal to the random number Nt generated by the electronic tag in the step c5, the read-write device is considered to be illegal and the authentication response confirmation message is discarded; if Nt is included in the authentication response confirmation message and is equal to the random number Nt generated by the electronic tag in step c5 or the authentication response confirmation message does not include Nt, recalculating the integrity check code MIC2 'for Nt using PSK and comparing the MIC 2' with the MIC2 in the received authentication response confirmation message;
when the MIC2 'is compared with the MIC2 in the received authentication response confirmation message, if the MIC 2' is not equal to the MIC2, the read-write device is considered to be illegal, and the authentication response confirmation message is discarded; if the two are equal, the read-write device is considered to be legal.
5. The method according to claim 4, wherein after step c7, if the electronic tag and the reader/writer need to be authenticated with each other, an authentication result message is sent to the reader/writer; if the read-write device is considered to be legal, the authentication response confirmation message comprises an authentication success message; and if the read-write device is considered to be illegal, the authentication response confirmation message comprises an authentication failure message.
6. The method as claimed in claim 1, wherein the read/write device is a device including a power control module, the power control module is a structure including an AC/DC converter, a DC/DC converter and a lithium battery; the power supply control module supplies power by adopting a lithium battery, or converts solar energy into electric energy to supply power, or combines the lithium battery and alternating current through an AC/DC converter and a DC/DC converter to convert and charge, namely, the power supply control module supplies power to the wired communication module, the wireless communication module and the electronic tag reading and writing module by adopting the existing power supply mode.
7. The method as claimed in claim 3, wherein the reader/writer device is a device including a wired communication module, and in steps a3 and b3, the data is transmitted between the mobile terminal device and the reader/writer device through a USB interface, an RS232 interface, a 485 interface, or an RJ45 interface of the wired communication module by means of wired connection.
8. The method as claimed in claim 3, wherein the reader/writer device is a device including a wireless communication module, and in steps a5 and b4, the remote server and the reader/writer device transmit data via a WIFI communication interface, a Bluetooth communication interface, a 4G network interface, or a GPRS communication interface of the wireless communication module by using a WIFI transmission mode, a Bluetooth transmission mode, a 4G network transmission mode, or a GPRS communication transmission mode.
9. The method as claimed in claim 3, wherein the read/write device is a device including an electronic tag read/write module, the electronic tag and the electronic tag read/write module are connected by a low frequency magnetic field information channel, and in steps a6 and b1, the data read/write during the process of reading/writing the electronic tag data is realized by the electronic tag read/write module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910766106.5A CN110598810A (en) | 2019-08-19 | 2019-08-19 | Data writing and reading method of electronic tag |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910766106.5A CN110598810A (en) | 2019-08-19 | 2019-08-19 | Data writing and reading method of electronic tag |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110598810A true CN110598810A (en) | 2019-12-20 |
Family
ID=68854598
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910766106.5A Pending CN110598810A (en) | 2019-08-19 | 2019-08-19 | Data writing and reading method of electronic tag |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110598810A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024001241A1 (en) * | 2022-06-30 | 2024-01-04 | 华为技术有限公司 | Information writing method and apparatus |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110126000A1 (en) * | 2008-07-23 | 2011-05-26 | China Iwncomm Co., Ltd. | Method for accessing data safely suitable for electronic tag |
US20110133883A1 (en) * | 2008-08-01 | 2011-06-09 | China Iwncomm Co., Ltd. | Anonymous authentication method based on pre-shared cipher key, reader-writer, electronic tag and system thereof |
CN102143488A (en) * | 2010-12-06 | 2011-08-03 | 西安西电捷通无线网络通信股份有限公司 | Method for safe communication between reader and electronic tag, reader and electronic tag |
CN103281189A (en) * | 2013-05-23 | 2013-09-04 | 无锡昶达信息技术有限公司 | Light weight class safe protocol certification system and method for radio frequency identification equipment |
CN103426010A (en) * | 2012-05-15 | 2013-12-04 | 珠海格力电器股份有限公司 | Read-write system and method for electronic tag |
CN103903029A (en) * | 2014-04-04 | 2014-07-02 | 中国地质大学(武汉) | Electronic tag reading and writing system and method based on multiple connection modes |
CN104881696A (en) * | 2015-06-26 | 2015-09-02 | 成都理工大学 | Electronic label read-write device supporting plurality of communication modes |
CN205176901U (en) * | 2015-12-08 | 2016-04-20 | 北京铁路信号有限公司 | Electronic tags reads and writes equipment |
CN107992924A (en) * | 2017-12-11 | 2018-05-04 | 北京铂阳顶荣光伏科技有限公司 | A kind of solar electronic label |
-
2019
- 2019-08-19 CN CN201910766106.5A patent/CN110598810A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110126000A1 (en) * | 2008-07-23 | 2011-05-26 | China Iwncomm Co., Ltd. | Method for accessing data safely suitable for electronic tag |
US20110133883A1 (en) * | 2008-08-01 | 2011-06-09 | China Iwncomm Co., Ltd. | Anonymous authentication method based on pre-shared cipher key, reader-writer, electronic tag and system thereof |
CN102143488A (en) * | 2010-12-06 | 2011-08-03 | 西安西电捷通无线网络通信股份有限公司 | Method for safe communication between reader and electronic tag, reader and electronic tag |
CN103426010A (en) * | 2012-05-15 | 2013-12-04 | 珠海格力电器股份有限公司 | Read-write system and method for electronic tag |
CN103281189A (en) * | 2013-05-23 | 2013-09-04 | 无锡昶达信息技术有限公司 | Light weight class safe protocol certification system and method for radio frequency identification equipment |
CN103903029A (en) * | 2014-04-04 | 2014-07-02 | 中国地质大学(武汉) | Electronic tag reading and writing system and method based on multiple connection modes |
CN104881696A (en) * | 2015-06-26 | 2015-09-02 | 成都理工大学 | Electronic label read-write device supporting plurality of communication modes |
CN205176901U (en) * | 2015-12-08 | 2016-04-20 | 北京铁路信号有限公司 | Electronic tags reads and writes equipment |
CN107992924A (en) * | 2017-12-11 | 2018-05-04 | 北京铂阳顶荣光伏科技有限公司 | A kind of solar electronic label |
Non-Patent Citations (1)
Title |
---|
王鑫等: "射频识别技术隐私与安全保护研究", 《中国自动识别技术》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024001241A1 (en) * | 2022-06-30 | 2024-01-04 | 华为技术有限公司 | Information writing method and apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20150091496A1 (en) | Bi-directional communication with a device under charge | |
CN104636777B (en) | ID card information obtains system | |
EP2779779B1 (en) | Near field communication system in a local network | |
CN103501191A (en) | Mobile payment device and method thereof based on NFC technology | |
CN106464688B (en) | Wireless communication system | |
CN103560886A (en) | Authentication method for electronic signature equipment | |
WO2013071711A1 (en) | Method for processing payment business and terminal | |
CN103731266B (en) | Method and system for authenticating electronic certificate | |
CN107038809A (en) | A kind of portable power source lending system | |
TWI571094B (en) | Wireless power transfer with improved device identification and signaling link security | |
US20150373757A1 (en) | Wireless connection system and wireless connection method | |
CN205281615U (en) | Portable electronic lock and electronic lock system | |
CN104660644B (en) | Communication means and remote terminal | |
CN104540238A (en) | Wireless communication method and device and intelligent card | |
EP2355368B1 (en) | Telecommunication component and wireless communication system for coupling a cellular mobile telecommunication device to an NFC terminal | |
CN110598810A (en) | Data writing and reading method of electronic tag | |
KR101321875B1 (en) | System of NFC secure print and method thereof | |
CN106327189A (en) | IC card topping-up system | |
CN104239945A (en) | Universal card | |
CN103763697A (en) | Wireless access point multi-secret key support system and method | |
CN203289647U (en) | Handheld audio communication equipment for electronic certificate authentication | |
WO2015117394A1 (en) | Controller and method for managing terminal, and terminal | |
CN106295731A (en) | A kind of vicarious information transmission system based on intelligent communication terminal and method | |
CN108537991A (en) | A kind of non-contact IC card charging system and its recharge method | |
CN103813318B (en) | A kind of information configuring methods, equipment and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191220 |
|
RJ01 | Rejection of invention patent application after publication |