Electronic tag data processing method and device, terminal equipment and storage medium

Through the encryption and decryption comparison mechanism of electronic tag data, the problems of copying and replacing electronic tag information are solved, the security and tamper-proof of data are improved, and a multi-level protection mechanism is formed to ensure the authenticity and reliability of data. .

CN119135376APending Publication Date: 2024-12-13SHENZHEN SHUYING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411101202.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-12
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

In the prior art, the information of electronic tags is easily copied and illegally replaced, resulting in illegal profits and economic losses, and it is difficult to ensure the encryption and reliability of tag data.

Method used

By obtaining the initial electronic tag data in the master key, extracting the initial identification code and encrypting it, generating the first encrypted identification code, then updating it to the transmission data, and writing it in the master key, ensuring that the data is after each reading It will change, increase tamper-proofness, and determine whether the data is copied data by comparing the decryption identification code with the initial identification code.

Benefits of technology

Improve the encryption and reliability of electronic tag data, prevent unauthorized copying and forgery, ensure the authenticity of the data, and form a multi-level protection mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135376A_ABST
    Figure CN119135376A_ABST
Patent Text Reader

Abstract

The invention provides an electronic tag data processing method and apparatus, a terminal device and a storage medium. The method comprises the steps of obtaining initial electronic tag data in a mother tag and extracting an initial identification code of the initial electronic tag data at a preset position; encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code; updating the first encryption identification code to first transmission data based on a preset distribution rule to obtain first encryption transmission data, and writing the first encryption transmission data into the mother label; wherein the first transmission data is generated based on the initial electronic tag data; and extracting the first encrypted identification code of the mother label, decrypting the first encrypted identification code to obtain a decrypted identification code, comparing the decrypted identification code with the initial identification code, and judging whether the initial electronic label data is duplicated label data or not according to a comparison result. According to the invention, the encryption and reliability of the electronic tag data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an electronic tag data processing method, device, terminal equipment and storage medium. Background Art

[0002] In order to meet the needs of various scenarios such as precise animal feeding, real-time statistics, and traceability, people will use professional tools to fix electronic tags on the ears or other suitable body parts of animals (generally female tags, the electronic tag information is written on the female tag, and one female tag corresponds to one male tag for matching use) as the unique ID card of each animal. Through a dedicated reader, the internal information of the electronic tag is read, and with the online system or database, various information about the animal can be accurately understood. When it needs to be removed, it can be removed by cutting off the male pin of the male tag with tools such as scissors. Since the female tag and the matching male tag are anti-dismantling structures, the removed female tag cannot continue to be paired with other male tags, thereby playing an anti-copying function. However, in the process of animal trading in the market, there are some illegal persons who make illegal profits by copying and changing electronic tags.

[0003] In the prior art, the information of the electronic tag a of the high-value animal A is generally read by a reader supporting the IOS11784 / 11785 specification (IOS11784 / 11785 respectively specifies the code structure and technical criteria for animal identification), and then the information of the electronic tag a is written into another empty electronic tag b using a card writer, and finally the electronic tag b is worn on another low-value animal B, thereby replacing the high-value animal A with the low-value animal B, and achieving the purpose of illegal profit. Alternatively, the information of the electronic tag a of the animal A is read by a reader, and then the information of the electronic tag a is written into another empty electronic tag b using a card writer, and finally the electronic tag b is worn on another dead animal B, thereby replacing the live animal A with the dead animal B, and then selling the animal A to achieve the purpose of illegal profit. In this case, a dead animal may replace multiple live animals, causing great economic losses to the real breeding entity. How to improve the encryption and reliability of the tag information in the mother tag and avoid the leakage of tag information is a technical problem that needs to be solved urgently. Summary of the invention

[0004] The present invention aims to provide an electronic tag data processing method, device, terminal equipment and storage medium to solve the above technical problems and improve the encryption and reliability of electronic tag data.

[0005] In order to solve the above technical problems, the present invention provides an electronic tag data processing method, comprising:

[0006] Acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position;

[0007] Encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code;

[0008] Based on a preset allocation rule, the first encrypted identification code is updated to the first transmission data to obtain the first encrypted transmission data and the first encrypted transmission data is written into the mother label; wherein the first transmission data is generated based on the initial electronic label data;

[0009] The first encrypted identification code of the mother label is extracted and decrypted to obtain a decrypted identification code, the decrypted identification code is compared with the initial identification code, and whether the initial electronic label data is duplicate label data is determined according to the comparison result.

[0010] In the above scheme, the initial identification code is encrypted to generate a first encrypted identification code, and then the encrypted identification code is written into the master label. This means that even if an attacker obtains the tag data, the original identification information cannot be directly read. The encryption process increases the security of the data and prevents unauthorized users from copying by directly reading the tag data. Even if the tag data is illegally obtained, the attacker cannot decrypt the encrypted identification code. The encrypted identification code is updated to the first transmission data based on the preset allocation rule and written into the master label. This ensures the dynamic update of the tag data, so that the data of each tag will change after being read, which increases the tamper-proofness of the tag data. Each tag generates new encrypted data during the transmission process. Even if an illegal copier obtains the encrypted data of a tag, he cannot use the same data for fraud. Further, the encrypted identification code of the master label is extracted for decryption, and the decrypted identification code is compared with the initial identification code. By comparing the comparison result, it is determined whether the tag data is copied data. This verification mechanism can effectively detect and prevent the forgery and illegal replacement of tag data. By comparing the decrypted identification code with the original identification code, it can be identified whether there is illegal data modification or replacement, which enhances the system's inspection of data authenticity. The scheme combines encryption, update and verification to form a multi-level protection mechanism, which improves the encryption and reliability of tag data.

[0011] In one implementation, the acquiring of the initial electronic tag data in the mother tag and extracting the initial identification code of the initial electronic tag data at a preset position specifically includes:

[0012] Reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data sequentially includes an animal application flag bit, a reserved bit, an identification code flag bit, a country code, and a unique domestic dedicated allocation code;

[0013] The unique domestic allocation code in the initial electronic tag data is extracted as the initial identification code.

[0014] In one implementation, encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code specifically includes:

[0015] Randomly generate a key pair; wherein the key pair includes a first public key and a first private key;

[0016] The initial identification code is encrypted based on the first public key to obtain the first encrypted identification code.

[0017] In one implementation, the updating the first encrypted identification code to the first transmission data based on a preset allocation rule to obtain the first encrypted transmission data specifically includes:

[0018] Dividing the first encrypted identification code into four equal parts;

[0019] The first equal portion of the encrypted identification code is stored in the upper eight bits of the reserved bits in the first transmission data; wherein the first transmission data includes the start field, the initial electronic tag data, the CRC check and the end field in sequence;

[0020] The second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are stored in the termination field of the first transmission data; wherein the first equal portion encryption identification code, the second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are in descending order of their bit height in the first encryption identification code.

[0021] In one implementation, extracting the first encrypted identification code of the mother label and decrypting it to obtain the decrypted identification code specifically includes:

[0022] Acquire the first encrypted transmission data and extract the first encrypted identification code by a reading tool;

[0023] The first encrypted identification code is decrypted based on the first private key reading to obtain the decrypted identification code.

[0024] In one implementation, determining whether the initial electronic label data is duplicate label data according to the comparison result specifically includes:

[0025] When the decrypted identification code is consistent with the initial identification code, determining that the initial electronic label data is not copied electronic label data;

[0026] When the decrypted identification code is inconsistent with the initial identification code, it is determined that the initial electronic label data is copied electronic label data.

[0027] In a second aspect, the present application also provides an electronic tag data processing device, including: a data acquisition module, a data encryption module, a data writing module and a data verification module;

[0028] The data acquisition module is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position;

[0029] The data encryption module is used to encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code;

[0030] The data writing module is used to update the first encrypted identification code to the first transmission data based on a preset allocation rule, obtain the first encrypted transmission data and write the first encrypted transmission data into the mother label; wherein the first transmission data is generated based on the initial electronic label data;

[0031] The data verification module is used to extract the first encrypted identification code of the master label and decrypt it to obtain a decrypted identification code, compare the decrypted identification code with the initial identification code, and determine whether the initial electronic label data is a duplicate label data according to the comparison result. The data acquisition module is used to acquire the initial electronic label data in the master label and extract the initial identification code of the initial electronic label data at a preset position, specifically including:

[0032] Reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data sequentially includes an animal application flag bit, a reserved bit, an identification code flag bit, a country code, and a unique domestic dedicated allocation code;

[0033] The unique domestic allocation code in the initial electronic tag data is extracted as the initial identification code.

[0034] In the above scheme, the initial identification code is encrypted to generate a first encrypted identification code, and then the encrypted identification code is written into the master label. This means that even if an attacker obtains the tag data, the original identification information cannot be directly read. The encryption process increases the security of the data and prevents unauthorized users from copying by directly reading the tag data. Even if the tag data is illegally obtained, the attacker cannot decrypt the encrypted identification code. The encrypted identification code is updated to the first transmission data based on the preset allocation rule and written into the master label. This ensures the dynamic update of the tag data, so that the data of each tag will change after being read, which increases the tamper-proofness of the tag data. Each tag generates new encrypted data during the transmission process. Even if an illegal copier obtains the encrypted data of a tag, he cannot use the same data for fraud. Further, the encrypted identification code of the master label is extracted for decryption, and the decrypted identification code is compared with the initial identification code. By comparing the comparison result, it is determined whether the tag data is copied data. This verification mechanism can effectively detect and prevent the forgery and illegal replacement of tag data. By comparing the decrypted identification code with the original identification code, it can be identified whether there is illegal data modification or replacement, which enhances the system's inspection of data authenticity. The scheme combines encryption, update and verification to form a multi-level protection mechanism, which improves the encryption and reliability of tag data.

[0035] In one implementation, the data acquisition module is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position, specifically including:

[0036] Reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data sequentially includes an animal application flag bit, a reserved bit, an identification code flag bit, a country code, and a unique domestic dedicated allocation code;

[0037] The unique domestic allocation code in the initial electronic tag data is extracted as the initial identification code.

[0038] In one implementation, the data encryption module is used to encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code, specifically including:

[0039] Randomly generate a key pair; wherein the key pair includes a first public key and a first private key;

[0040] The initial identification code is encrypted based on the first public key to obtain the first encrypted identification code.

[0041] In one implementation, the data writing module is used to update the first encrypted identification code to the first transmission data based on a preset allocation rule, specifically including:

[0042] Dividing the first encrypted identification code into four equal parts;

[0043] The first equal portion of the encrypted identification code is stored in the upper eight bits of the reserved bits in the first transmission data; wherein the first transmission data includes the start field, the initial electronic tag data, the CRC check and the end field in sequence;

[0044] The second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are stored in the termination field of the first transmission data; wherein the first equal portion encryption identification code, the second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are in descending order of their bit height in the first encryption identification code.

[0045] In one implementation, the data verification module is used to extract the first encrypted identification code of the parent label and decrypt it to obtain the decrypted identification code, specifically including:

[0046] Acquire the first encrypted transmission data and extract the first encrypted identification code by a reading tool;

[0047] The first encrypted identification code is decrypted based on the first private key reading to obtain the decrypted identification code.

[0048] In one implementation, determining whether the initial electronic label data is duplicate label data according to the comparison result specifically includes:

[0049] When the decrypted identification code is consistent with the initial identification code, determining that the initial electronic label data is not copied electronic label data;

[0050] When the decrypted identification code is inconsistent with the initial identification code, it is determined that the initial electronic label data is copied electronic label data.

[0051] In a third aspect, the present application also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the electronic tag data processing method as described above is implemented.

[0052] In a fourth aspect, the present application further provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the electronic tag data processing method as described above. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of a flow chart of an electronic tag data processing method provided in one embodiment of the present invention;

[0054] Figure 2 A schematic diagram of the structure of commonly used electronic tag data in the prior art provided in one embodiment of the present invention;

[0055] Figure 3 A schematic diagram of a structure of encrypted transmission data provided in one embodiment of the present invention;

[0056] Figure 4 The figure is a module diagram of an electronic tag data processing device provided in one embodiment of the present invention. DETAILED DESCRIPTION

[0057] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0058] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.

[0059] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0060] First, some terms in this application are explained to facilitate understanding by those skilled in the art.

[0061] (1) ISO 11784 is an international standard that defines the technical specifications for RFID tags used for animal identification. This standard was developed by the International Organization for Standardization (ISO) and provides a standardized way to define and read RFID tags (such as ear tags or subcutaneous tags) used for animal identification. It is mainly used in animal electronic identification systems, especially in animal husbandry for tracking and management of animals.

[0062] (2) ISO 11785: This is a standard developed by the International Organization for Standardization (ISO) that defines the communication protocol and data transmission format between RFID tags and reading devices to ensure the correct reading and writing of data, especially the application of RFID (radio frequency identification) technology in animal management. This standard is used in conjunction with ISO 11784 to jointly define the technical specifications of animal RFID tags.

[0063] Example 1

[0064] See also Figure 1 , Figure 1 The flowchart of an electronic tag data processing method provided in an embodiment of the present invention is as follows. The embodiment of the present invention provides an electronic tag data processing method, including steps 101 to 104, and each step is specifically as follows:

[0065] Step 101: Acquire initial electronic tag data in a mother tag and extract an initial identification code at a preset position of the initial electronic tag data.

[0066] In one embodiment, the obtaining of the initial electronic tag data in the mother tag and extracting the initial identification code of the initial electronic tag data at a preset position specifically includes: reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data includes an animal application flag, a reserved bit, an identification code flag, a country code and a unique domestic dedicated allocation code in sequence; extracting the unique domestic allocation code in the initial electronic tag data as the initial identification code.

[0067] In the embodiment of the present invention, the preset communication protocol is the ISO 11784 communication protocol. It should be noted that the IOS11784 standard stipulates that the data of the electronic tag is a 64-bit structure, wherein data1 is an animal application flag; data2-data15 are reserved bits, which can be used as extension bits; data16 is an identification code flag, which is used to determine whether there is data behind; data17-data26 are country codes, which define the country of use; data27-data64 bits are unique domestic special allocation codes, i.e., initial identification codes UID. Through a reader (such as an RFID reader or NFC reader) that supports the IOS 11784 / 11785 specification, according to the ISO 11784 communication protocol, after the reader is connected to the mother tag through a serial port, USB or other interface, the ISO 11784 communication protocol is used to send a command to read the identification code UID, and after receiving the response data from the mother tag from the reader, the response data is parsed according to the ISO 11784 communication protocol to extract the identification code of the tag data.

[0068] Step 102: Encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code.

[0069] In one embodiment, encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code specifically includes: randomly generating a key pair; wherein the key pair includes a first public key and a first private key; encrypting the initial identification code based on the first public key to obtain the first encrypted identification code.

[0070] In an embodiment of the present invention, an asymmetric encryption algorithm is used to encrypt the extracted initial identification code UID. Common asymmetric encryption algorithms include RSA, ECC (Elliptic Curve Cryptography) and ElGamal. Different encryption algorithms can be selected according to specific needs, which are not limited here. Preferably, in an embodiment of the present invention, Python's cryptography library is used to generate an RSA key pair, and the key pair includes a public key and a private key. The extracted initial identification code UID is encrypted in turn using the public key pair to obtain a first encrypted identification code.

[0071] Step 103: based on a preset allocation rule, the first encrypted identification code is updated to the first transmission data, first encrypted transmission data is obtained and the first encrypted transmission data is written into the mother label; wherein the first transmission data is generated based on the initial electronic label data.

[0072] In one embodiment, the first encrypted identification code is updated to the first transmission data based on a preset allocation rule to obtain the first encrypted transmission data, which specifically includes: dividing the first encrypted identification code into four equal parts; storing the first encrypted identification code in the eight upper bits of the reserved bits in the first transmission data; wherein the first transmission data includes a start field, the initial electronic tag data, a CRC checksum and an end field in sequence; storing the second encrypted identification code, the third encrypted identification code and the fourth encrypted identification code in the end field of the first transmission data; wherein the first encrypted identification code, the second encrypted identification code, the third encrypted identification code and the fourth encrypted identification code are in descending order in the first encrypted identification code.

[0073] In the embodiment of the present invention, the first transmission data is generated based on the ISO 11785 international standard and the initial electronic tag data. The ISO 11785 standard specifies the wireless communication method between the electronic tag and the reader, including the data transmission format and protocol. The reader for animal identification that complies with the international standard is used to identify and distinguish between electronic tags using a full-duplex / half-duplex system (load modulation) and electronic tags using a timing system. Figure 2 , Figure 2The structure diagram of a commonly used electronic tag data in the prior art provided in one embodiment of the present invention. The full-duplex / half-duplex data message includes an 11-bit start field (header), 64 bits (8 bytes) of useful data (i.e., initial electronic tag data), 16 bits (2 bytes) CRC, and 24 bits (3 bytes) termination field (tail). Preferably, the embodiment of the present invention also updates the first encrypted identification code to the first transmission data according to a preset allocation rule to obtain the first encrypted transmission data. Specifically, in the embodiment of the present invention, the read 32-bit unique domestic dedicated allocation code is used as the initial identification code UID and encrypted to obtain a 32-bit, 4-byte first encrypted identification code. Then, the first encrypted identification code is divided into four equal parts according to the order of reading, i.e., the order of encryption, and the first 8 bits of the first encrypted identification code are stored in the high eight bits of the reserved bits in the first transmission data, i.e., data8-data15, and then the remaining three equal parts of the encrypted identification code totaling 24 bits are stored in the termination field of the first transmission data to obtain the first encrypted transmission data. See. Figure 3 , Figure 3 A schematic diagram of a structure of encrypted transmission data provided in an embodiment of the present invention. Based on an allocation rule provided in an embodiment of the present invention, the following can be obtained: Figure 4 The encrypted transmission data obtained still complies with the ISO 11784 communication protocol and ISO 11785 international standard. At this time, a general reader supporting the IOS11784 / 11785 specification (such as an RFID reader or NFC reader) can only read the country code of data17-data26 and the unique domestic special allocation code initially allocated to data27-data64 in the encrypted transmission data, that is, the data of the initial identification code UID, and cannot directly read the data content of the encrypted identification code.

[0074] Step 104: extract the first encrypted identification code of the mother label and decrypt it to obtain a decrypted identification code, compare the decrypted identification code with the initial identification code, and determine whether the initial electronic label data is duplicate label data based on the comparison result.

[0075] In one embodiment, extracting the first encrypted identification code of the mother label and decrypting it to obtain the decrypted identification code specifically includes: acquiring the first encrypted transmission data through a reading tool and extracting the first encrypted identification code; decrypting the first encrypted identification code based on the first private key reading to obtain the decrypted identification code.

[0076] In the embodiment of the present invention, a reader supporting the IOS11784 / 11785 specification is used as a reading and writing tool to connect to the mother tag, so as to obtain the first encrypted transmission data, extract the encrypted identification code therein, and decrypt the extracted encrypted identification code based on the first private key generated previously to obtain the corresponding decrypted identification code. Further, the label duplication judgment is performed based on the obtained decrypted identification code.

[0077] In one embodiment, determining whether the initial electronic tag data is copied tag data based on the comparison result specifically includes: when the decrypted identification code is consistent with the initial identification code, determining that the initial electronic tag data is not copied electronic tag data; when the decrypted identification code is inconsistent with the initial identification code, determining that the initial electronic tag data is copied electronic tag data.

[0078] The decrypted identification code is compared with the initial identification code (which can be directly obtained from the data of data27-data64 in the first encrypted output data). If the two are completely consistent, it is determined that the initial electronic tag is not a duplicate or fake electronic tag and has not been replaced. If the decrypted identification code obtained after decryption is inconsistent with the initial identification code, it is determined that the initial electronic tag data at this time has been copied and replaced, so the encrypted identification code obtained by encryption and decryption based on the initial identification code cannot completely match the initial identification code.

[0079] In an embodiment of the present invention, an electronic tag data processing device is also provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the above-mentioned electronic tag data processing method is implemented.

[0080] In an embodiment of the present invention, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored computer program. When the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned electronic tag data processing method.

[0081] Exemplarily, the computer program can be divided into one or more modules, one or more modules are stored in the memory and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic tag data processing device.

[0082] The initial electronic tag data processing device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The electronic tag data processing device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of electronic tag data processing devices and do not constitute a limitation on the electronic tag data processing device. The electronic tag data processing device may include more or fewer components than the components, or may combine certain components, or different components. For example, the electronic tag data processing device may also include input and output devices, network access devices, buses, and the like.

[0083] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic tag data processing device, and uses various interfaces and lines to connect various parts of the entire electronic tag data processing device.

[0084] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the multi-device access platform processing device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0085] Wherein, if the module based on the processing of electronic tag data is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0086] The embodiment of the present invention provides an electronic tag data processing method, which encrypts an initial identification code to generate a first encrypted identification code, and then writes the encrypted identification code into a master tag. This means that even if an attacker obtains the tag data, the original identification information cannot be directly read. The encryption process increases the security of the data and prevents unauthorized users from copying by directly reading the tag data. Even if the tag data is illegally obtained, the attacker cannot decrypt the encrypted identification code. The encrypted identification code is updated to the first transmission data based on a preset allocation rule and written into the master tag. This ensures the dynamic update of the tag data, so that the data of each tag will change after being read, and the tamper-proof property of the tag data is increased. Each tag generates new encrypted data during the transmission process. Even if an illegal copier obtains the encrypted data of a tag, he cannot use the same data for fraud. Further, the encrypted identification code of the master tag is extracted for decryption, and the decrypted identification code is compared with the initial identification code. The tag data is judged whether it is copied data by the comparison result. This verification mechanism can effectively detect and prevent the forgery and illegal replacement of the tag data. By comparing the decrypted identification code with the original identification code, it can be identified whether there is illegal data modification or replacement, which enhances the system's inspection of the authenticity of the data. An electronic tag data processing method provided by an embodiment of the present invention combines the three aspects of encryption, updating and verification to form a multi-level protection mechanism, thereby improving the encryption and reliability of tag data.

[0087] Example 2

[0088] See also Figure 4 , Figure 4The module diagram of an electronic tag data processing device provided in an embodiment of the present invention is as follows. The present invention provides an electronic tag data processing device, including: a data acquisition module 201, a data encryption module 202, a data writing module 203 and a data verification module 204;

[0089] The data acquisition module 201 is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position;

[0090] The data encryption module 202 is used to encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code;

[0091] The data writing module 203 is used to update the first encrypted identification code to the first transmission data based on a preset allocation rule, obtain the first encrypted transmission data and write the first encrypted transmission data into the mother label; wherein the first transmission data is generated based on the initial electronic label data;

[0092] The data verification module 204 is used to extract the first encrypted identification code of the mother label and decrypt it to obtain a decrypted identification code, compare the decrypted identification code with the initial identification code, and determine whether the initial electronic label data is duplicate label data based on the comparison result.

[0093] In one embodiment, the data acquisition module 201 is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position, specifically including: reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data includes an animal application flag, a reserved bit, an identification code flag, a country code and a unique domestic dedicated allocation code in sequence; extracting the unique domestic allocation code in the initial electronic tag data as the initial identification code.

[0094] In one embodiment, the data encryption module 202 is used to encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code, specifically including: randomly generating a key pair; wherein the key pair includes a first public key and a first private key; encrypting the initial identification code based on the first public key to obtain the first encrypted identification code.

[0095] In one embodiment, the data writing module 203 is used to update the first encryption identification code to the first transmission data based on a preset allocation rule, specifically including: dividing the first encryption identification code into four equal parts; storing the first part of the encryption identification code in the eight upper bits of the reserved bits in the first transmission data; wherein the first transmission data includes a start field, the initial electronic tag data, a CRC checksum and an end field in sequence; storing the second part of the encryption identification code, the third part of the encryption identification code and the fourth part of the encryption identification code in the end field of the first transmission data; wherein the first part of the encryption identification code, the second part of the encryption identification code, the third part of the encryption identification code and the fourth part of the encryption identification code in the first encryption identification code are in descending order of bit height.

[0096] In one embodiment, the data verification module 204 is used to extract the first encrypted identification code of the mother label and decrypt it to obtain a decrypted identification code, specifically including: obtaining the first encrypted transmission data through a reading tool and extracting the first encrypted identification code; decrypting the first encrypted identification code based on the first private key reading to obtain the decrypted identification code.

[0097] In one embodiment, determining whether the initial electronic tag data is copied tag data based on the comparison result specifically includes: when the decrypted identification code is consistent with the initial identification code, determining that the initial electronic tag data is not copied electronic tag data; when the decrypted identification code is inconsistent with the initial identification code, determining that the initial electronic tag data is copied electronic tag data.

[0098] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0099] The embodiment of the present invention provides an electronic tag data processing device, which encrypts an initial identification code to generate a first encrypted identification code, and then writes the encrypted identification code into a master tag. This means that even if an attacker obtains the tag data, the original identification information cannot be directly read. The encryption process increases the security of the data and prevents unauthorized users from copying by directly reading the tag data. Even if the tag data is illegally obtained, the attacker cannot decrypt the encrypted identification code. The encrypted identification code is updated to the first transmission data based on a preset allocation rule and written into the master tag. This ensures the dynamic update of the tag data, so that the data of each tag will change after being read, and the tamper-proof property of the tag data is increased. Each tag generates new encrypted data during the transmission process. Even if an illegal copier obtains the encrypted data of a tag, he cannot use the same data for fraud. Further, the encrypted identification code of the master tag is extracted for decryption, and the decrypted identification code is compared with the initial identification code. The tag data is judged whether it is copied data by the comparison result. This verification mechanism can effectively detect and prevent the forgery and illegal replacement of the tag data. By comparing the decrypted identification code with the original identification code, it can be identified whether there is illegal data modification or replacement, which enhances the system's inspection of the data authenticity. An electronic tag data processing method provided by an embodiment of the present invention combines the three aspects of encryption, updating and verification to form a multi-level protection mechanism, thereby improving the encryption and reliability of tag data.

[0100] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.

Claims

1. A method for processing electronic tag data, It is characterized in that include: Acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position; Encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code; Based on a preset allocation rule, the first encrypted identification code is updated to the first transmission data to obtain the first encrypted transmission data and the first encrypted transmission data is written into the mother label; wherein the first transmission data is generated based on the initial electronic label data; The first encrypted identification code of the mother label is extracted and decrypted to obtain a decrypted identification code, the decrypted identification code is compared with the initial identification code, and whether the initial electronic label data is duplicate label data is determined according to the comparison result.

2. An electronic tag data processing method as claimed in claim 1, It is characterized in that The obtaining of the initial electronic tag data in the mother tag and extracting the initial identification code of the initial electronic tag data at a preset position specifically includes: Reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data sequentially includes an animal application flag bit, a reserved bit, an identification code flag bit, a country code, and a unique domestic dedicated allocation code; The unique domestic allocation code in the initial electronic tag data is extracted as the initial identification code.

3. The electronic tag data processing method according to claim 1, It is characterized in that The encrypting the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code specifically includes: Randomly generate a key pair; wherein the key pair includes a first public key and a first private key; The initial identification code is encrypted based on the first public key to obtain the first encrypted identification code.

4. The electronic tag data processing method according to claim 2, It is characterized in that The step of updating the first encrypted identification code to the first transmission data based on a preset allocation rule to obtain the first encrypted transmission data specifically includes: Dividing the first encrypted identification code into four equal parts; The first equal portion of the encrypted identification code is stored in the upper eight bits of the reserved bits in the first transmission data; wherein the first transmission data includes the start field, the initial electronic tag data, the CRC check and the end field in sequence; The second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are stored in the termination field of the first transmission data; wherein the first equal portion encryption identification code, the second equal portion encryption identification code, the third equal portion encryption identification code and the fourth equal portion encryption identification code are in descending order of their bit height in the first encryption identification code.

5. The electronic tag data processing method according to claim 3, It is characterized in that The extracting and decrypting the first encrypted identification code of the mother label to obtain the decrypted identification code specifically includes: Acquire the first encrypted transmission data and extract the first encrypted identification code by a reading tool; The first encrypted identification code is decrypted based on the first private key reading to obtain the decrypted identification code.

6. The electronic tag data processing method according to claim 1, It is characterized in that The determining whether the initial electronic label data is duplicate label data according to the comparison result specifically includes: When the decrypted identification code is consistent with the initial identification code, determining that the initial electronic label data is not copied electronic label data; When the decrypted identification code is inconsistent with the initial identification code, it is determined that the initial electronic label data is copied electronic label data.

7. An electronic tag data processing device, It is characterized in that include: Data acquisition module, data encryption module, data writing module and data verification module; The data acquisition module is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position; The data encryption module is used to encrypt the initial identification code based on a preset encryption algorithm to obtain a first encrypted identification code; The data writing module is used to update the first encrypted identification code to the first transmission data based on a preset allocation rule, obtain the first encrypted transmission data and write the first encrypted transmission data into the mother label; wherein the first transmission data is generated based on the initial electronic label data; The data verification module is used to extract the first encrypted identification code of the mother label and decrypt it to obtain a decrypted identification code, compare the decrypted identification code with the initial identification code, and determine whether the initial electronic label data is copied label data based on the comparison result.

8. An electronic tag data processing device as claimed in claim 7, It is characterized in that The data acquisition module is used to acquire the initial electronic tag data in the mother tag and extract the initial identification code of the initial electronic tag data at a preset position, specifically including: Reading the initial electronic tag data through a preset communication protocol; wherein the initial electronic tag data sequentially includes an animal application flag bit, a reserved bit, an identification code flag bit, a country code, and a unique domestic dedicated allocation code; The unique domestic allocation code in the initial electronic tag data is extracted as the initial identification code.

9. A terminal device, It is characterized in that The electronic tag data processing method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the electronic tag data processing method according to any one of claims 1 to 6 is implemented.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the electronic tag data processing method according to any one of claims 1 to 6.