CN114595795A - NFC tag source tracing data processing method - Google Patents

NFC tag source tracing data processing method Download PDF

Info

Publication number
CN114595795A
CN114595795A CN202210227533.8A CN202210227533A CN114595795A CN 114595795 A CN114595795 A CN 114595795A CN 202210227533 A CN202210227533 A CN 202210227533A CN 114595795 A CN114595795 A CN 114595795A
Authority
CN
China
Prior art keywords
tracing
character string
data
character
commodity
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.)
Granted
Application number
CN202210227533.8A
Other languages
Chinese (zh)
Other versions
CN114595795B (en
Inventor
季有为
王胜帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xindian Zhilian Beijing Technology Co ltd
Original Assignee
Xindian Zhilian Beijing Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Xindian Zhilian Beijing Technology Co ltd filed Critical Xindian Zhilian Beijing Technology Co ltd
Priority to CN202210227533.8A priority Critical patent/CN114595795B/en
Publication of CN114595795A publication Critical patent/CN114595795A/en
Application granted granted Critical
Publication of CN114595795B publication Critical patent/CN114595795B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/0723Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips the record carrier comprising an arrangement for non-contact communication, e.g. wireless communication circuits on transponder cards, non-contact smart cards or RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Development Economics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention relates to a method for processing tracing data of an NFC label, which comprises the following steps: generating a first tracing character string when tracing data are issued to the NFC label; performing character code conversion to generate a first tracing character code sequence; writing the first tracing character code sequence into a plurality of data storage areas appointed on the NFC label; generating a second tracing character coding sequence when the NFC label is subjected to tracing data reading; performing character string conversion on the second tracing character coding sequence to generate a second tracing character string; carrying out data format verification; if the verification is successful, extracting a second tracing domain name character string, a second tracing interface character string, a second commodity identification character string and a second timestamp character string; time validity verification is carried out; if the verification is successful, generating a first tracing URL address; and obtaining and displaying a first tracing data page according to the first tracing URL address. By the method and the device, the traceability data of the commodity can be continuously updated.

Description

NFC tag source tracing data processing method
Technical Field
The invention relates to the technical field of data processing, in particular to a tracing data processing method for an NFC tag.
Background
The anti-counterfeit label is a Near Field Communication (NFC) label used for normal commodities circulating in the market, and can play a good role in preventing counterfeit and shoddy commodities. In a conventional situation, a manufacturer writes fixed tracing data in an NFC tag in advance, and reads the tracing data through NFC read-write equipment. Such a processing method has a problem in that once a commodity with an NFC tag enters a circulation field, it is difficult to have a chance to write data to the tag, that is, the traceable data cannot be continuously updated.
Disclosure of Invention
The invention aims to provide a method for processing traceability data of an NFC label, electronic equipment and a computer readable storage medium aiming at the defects of the prior art, wherein when the traceability data of the NFC label is issued, the original information of commodity traceability is not directly written in as traceability data, but a traceability URL address is written in as traceability data, and corresponding processing mechanisms such as data assembling, data block writing and the like are established; and when the NFC label is subjected to source tracing data reading, a legal source tracing URL (uniform resource locator) address is obtained based on processing mechanisms such as corresponding data block reading, data assembling, data checking and the like, and a source tracing page corresponding to the source tracing URL address is obtained through a browser. According to the invention, the traceability data of the commodity can be continuously updated after the commodity with the NFC label enters the circulation field.
In order to achieve the above object, a first aspect of the embodiments of the present invention provides a method for processing source tracing data of an NFC tag, where the method includes:
when the NFC label is subjected to tracing data issue, acquiring a first tracing domain name character string, a first tracing interface character string and a first commodity identification character string corresponding to the current NFC label; generating a corresponding first timestamp character string according to the system time; splicing the first tracing domain name character string, the first tracing interface character string, the first commodity identification character string and the first timestamp character string to generate a corresponding first tracing character string; performing character code conversion processing on the first tracing character string to generate a corresponding first tracing character code sequence; writing the first tracing character code sequence into a plurality of data storage areas appointed on the NFC label;
when the NFC label is subjected to tracing data reading, reading data from the plurality of specified data storage areas on the current NFC label and splicing the read data to generate a corresponding second tracing character code sequence; performing character string conversion processing on the second tracing character coding sequence to generate a corresponding second tracing character string; performing data format verification on the second tracing character string; if the data format verification is successful, extracting a second tracing domain name character string, a second tracing interface character string, a second commodity identification character string and a second time stamp character string from the second tracing character string; and time validity verification is carried out according to the second timestamp character string; if the time validity verification is successful, generating a corresponding first tracing URL address according to the second tracing domain name character string, the second tracing interface character string and the second commodity identification character string in a splicing manner; and a browser is used for obtaining a corresponding first tracing data page according to the first tracing URL address and displaying the first tracing data page.
Preferably, the character string length of the first commodity identification character string is a preset first length L1
The string length of the first timestamp string is a preset second length L2
The specified plurality of data storage areas comprises a preset first number M1The data storage byte number of each data storage area is a preset second number M2
Preferably, the generating of the corresponding first tracing character string by splicing the first tracing domain name character string, the first tracing interface character string, the first commodity identification character string and the first timestamp character string specifically includes:
and splicing according to a character string splicing data format of a first tracing domain name character string, a first tracing interface character string, a first commodity identification character string and a first timestamp character string to generate a corresponding first tracing character string.
Preferably, the performing character code conversion processing on the first tracing character string to generate a corresponding first tracing character code sequence specifically includes:
extracting the first tracing character string one by one according to a character sequence from left to right to generate corresponding first tracing characters, and sequencing all the first tracing characters in sequence to generate corresponding first tracing character sequences; in the first tracing character sequence, ASCII code conversion is carried out on each first tracing character to obtain a corresponding first tracing character code; and sequencing all the obtained first tracing character codes according to the corresponding character sequence to obtain the corresponding first tracing character code sequence.
Preferably, the writing the first tracing character code sequence into a plurality of data storage areas specified on the NFC tag specifically includes:
by the second number M2Sequentially dividing the first tracing character coding sequence into a plurality of first data segments p for segment length and segment sliding step lengthi(ii) a I is more than or equal to 1 and less than or equal to n, the sequence length of the first tracing character coding sequence is L, if L/M2Is an integer, n ═ L/M2If L/M2N is not an integer L/M2+1;
Marking the data storage areas of the plurality of designated data storage areas as data storage areas Z one by onej(ii) a J is more than or equal to 1 and less than or equal to a first number M1
According to the corresponding relation of the subscripts i and j, each first data segment piWriting into the corresponding data storage area ZjIn (1).
Preferably, the performing data format verification on the second tracing character string specifically includes:
in the second tracing character string, the last L2The substring of the last 1 character is used as the first time stamp substring, and will be from the last L1+L2From one to last L2Using the substring of +1 character as a first commodity identification substring, and using the substring except the first time stamp substring and the first commodity identification substring as a first domain name + interface substring;
performing domain name interface format verification on the first domain name + interface sub-character string according to a preset domain name data format and an interface data format, performing commodity identification format verification on the first commodity identification sub-character string according to a preset commodity identification data format, and performing timestamp format verification on the first timestamp sub-character string according to a preset timestamp data format;
and when the verification of the domain name interface format, the verification of the commodity identification format and the verification of the timestamp format are successful, confirming that the data format verification is successful.
Preferably, the time validity verification according to the second timestamp character string specifically includes:
extracting year, month, day and time information from the second timestamp character string to generate corresponding first sending time data;
inquiring a preset commodity production data table according to the second commodity identification character string, recording a commodity production data record corresponding to a commodity identification set field which is met by the second commodity identification character string as a first record, and extracting a commodity release time field of the first record as second release time data; the commodity production data table comprises a plurality of commodity production data records; the commodity production data record comprises a commodity batch field, the commodity release time field and the commodity identification set field; the commodity identification set field comprises a plurality of commodity identification information;
and if the first release time data is not earlier than the second release time data, confirming that the time validity verification is successful.
A second aspect of an embodiment of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;
the processor is configured to be coupled to the memory, read and execute instructions in the memory, so as to implement the method steps of the first aspect;
the transceiver is coupled to the processor, and the processor controls the transceiver to transmit and receive messages.
A third aspect of embodiments of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the method of the first aspect.
The embodiment of the invention provides a method for processing traceability data of an NFC label, electronic equipment and a computer readable storage medium, wherein when the traceability data of the NFC label is issued, the original information of commodity traceability is not directly written in as traceability data, but a traceability URL address is written in as traceability data, and corresponding processing mechanisms such as data assembling, data block writing and the like are established; and when the NFC label is subjected to tracing data reading, a legal tracing URL address is obtained based on processing mechanisms such as corresponding data block reading, data assembling, data checking and the like, and a tracing page corresponding to the tracing URL address is obtained through a browser. According to the invention, the traceability data of the commodity can be continuously updated after the commodity with the NFC label enters the circulation field.
Drawings
Fig. 1 is a schematic diagram of a source tracing data processing method for an NFC tag according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an electronic device according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, which is a schematic diagram of a source data processing method for an NFC tag according to an embodiment of the present invention, the method mainly includes the following steps:
step 1, when tracing data issue is carried out on an NFC label, a first tracing domain name character string, a first tracing interface character string and a first commodity identification character string which correspond to the current NFC label are obtained; generating a corresponding first timestamp character string according to the system time; splicing the first tracing domain name character string, the first tracing interface character string, the first commodity identification character string and the first timestamp character string to generate a corresponding first tracing character string; performing character code conversion processing on the first tracing character string to generate a corresponding first tracing character code sequence; and writing the first tracing character code sequence into a plurality of data storage areas appointed on the NFC label.
Wherein, the character string length of the first commodity identification character string is a preset first length L1(ii) a The character string length of the first time stamp character string is a preset second length L2(ii) a The specified plurality of data storage areas includes a preset first number M1The data storage byte number of each data storage area is a preset second number M2. By default, the first length L118, second length L213, the first number M158, second number M2Is 4.
Here, the current step is used for processing a tracing data write-in process of the NFC tag, and the initial tracing data, that is, the first tracing character string is first assembled, then code conversion is performed on the initial tracing data to obtain a corresponding first tracing character code sequence, and then the first tracing character code sequence is written into a storage space of the NFC tag. When data writing operation is performed, the storage space on the NFC tag is divided into a plurality of data blocks, that is, a plurality of data storage areas, the first tracing character coding sequence is divided into a plurality of data segments according to the size of the data storage areas, and each data segment is written into one data storage area correspondingly. Wherein, the data format of the first tracing domain name string is a domain name data format, for example, "www.comname.com"; the interface data format of the first trace source interface string is a web service interface data format, e.g., "/path 1/path 2/? ID ═ ID; the article identification data format of the first article identification character string is a character string data format composed of english alphabets or numerals, for example, BJ 0000000000000001; the timestamp data format of the first timestamp string is a millisecond timestamp format, e.g., 1646042895000 for the timestamp of Beijing time 2022-02-2818: 08: 15.
Further, by a first traceability domain name string, a first traceability interface string, a first commodity identification string and a first timestamp string, a corresponding first traceability string is generated by splicing, and the method specifically comprises the following steps:
and splicing according to a character string splicing data format of the first tracing domain name character string, the first tracing interface character string, the first commodity identification character string and the first timestamp character string to generate a corresponding first tracing character string.
For example, the first tracing domain name string is "www.comname.com", and the first tracing interface string is "/path 1/path 2/? ID ═ with the first product identification string being "BJ 0000000000000001"; the first timestamp string is "1646042895000", then the first traceable string is "www.comname.com/path 1/path 2/? ID BJ00000000000000011646042895000 ".
Further, the character code conversion processing is performed on the first tracing character string to generate a corresponding first tracing character code sequence, which specifically includes:
extracting the first tracing character strings one by one according to a character sequence from left to right to generate corresponding first tracing characters, and sequencing all the first tracing characters in sequence to generate corresponding first tracing character sequences; in the first tracing character sequence, each first tracing character is subjected to ASCII code conversion to obtain a corresponding first tracing character code; and sequencing all the obtained first tracing character codes according to the corresponding character sequence to obtain the corresponding first tracing character code sequence.
For example, if the first trace character string is "ABC", the first trace character sequence should be ('a', 'B', 'C'), and the first trace character encoding sequence should be (65,66, 67).
Further, writing the first tracing character code sequence into a plurality of data storage areas specified on the NFC tag specifically includes:
step A1, by a second number M2Sequentially dividing the first tracing character code sequence into a plurality of first data segments p for segment length and segment sliding step lengthi
Wherein i is more than or equal to 1 and less than or equal to n, the sequence length of the first tracing character coding sequence is L, and if L/M is greater than or equal to L2Is an integer, n ═ L/M2If L/M2N is not an integer L/M2+1;
For example, the first character encoding sequence has a length of 232 and the second number M2If 4, then n is 58, the current step may yield 58 first data segments pi
Step A2, marking each data storage area of the designated plurality of data storage areas as data storage areas Z one by onej(ii) a J is more than or equal to 1 and less than or equal to a first number M1
For example, the first number M1The designated plurality of data storage areas on the NFC tag consists of 58 data storage areas ZjComposition is carried out;
step A3, according to the corresponding relation of the subscripts i and j, each first data segment piWritten into the corresponding data memory area ZjIn (1).
For example, if the correspondence between the subscripts i and j is a numerical correspondence, each first data segment p is divided intoiWriting into the corresponding data memory zone ZjIn fact, the first data segment p isi=1Write data storage area Zj=1A first data segment pi=2Write data storage area Zj=2And so on until the first data fragment pi=58Write data storage area Zj=58
Step 2, when the NFC label is subjected to tracing data reading, reading data from a plurality of data storage areas appointed on the current NFC label and splicing the read data to generate a corresponding second tracing character coding sequence; carrying out character string conversion processing on the second tracing character coding sequence to generate a corresponding second tracing character string; and carrying out data format verification on the second tracing character string; if the data format verification is successful, extracting a second tracing domain name character string, a second tracing interface character string, a second commodity identification character string and a second timestamp character string from the second tracing character string; time validity verification is carried out according to the second timestamp character string; if the time validity is successfully verified, generating a corresponding first tracing URL address according to the second tracing domain name character string, the second tracing interface character string and the second commodity identification character string in a splicing manner; and obtaining a corresponding first tracing data page according to the first tracing URL address by using a browser, and displaying the first tracing data page.
Here, the current step is to process the trace-to-source acquisition flow of the NFC tag.
Further, reading data from a plurality of data storage areas specified on the current NFC tag and splicing the read data to generate a corresponding second tracing character code sequence specifically includes:
reading data from each data storage area to obtain corresponding first storage data, splicing all the first storage data according to the known storage sequence of the data storage areas to obtain a first splicing sequence, extracting byte data of the first splicing sequence one by one according to the left-to-right sequence, and sequencing the extracted byte data to obtain a corresponding second tracing character coding sequence.
Further, performing character string conversion processing on the second tracing character coding sequence to generate a corresponding second tracing character string, specifically including:
in the second tracing character coding sequence, polling is carried out on each byte data from the 1 st byte data to the last 1 byte; during polling, recording currently polled byte data as current byte data; the numerical value of the current byte data is used as an ASCII coding value, and the current byte data is subjected to ASCII coded character conversion processing to generate a corresponding first character; and after the polling is finished, sequentially splicing all the obtained first characters according to the sequence to obtain a corresponding second tracing character string.
Further, performing data format verification on the second tracing character string specifically includes:
step B1, in the second stepIn a two-source character string, the last L2The substring of the last 1 character is used as the first time stamp substring, and will be from the last L1+L2From one to last L2Using the substring of +1 character as a first commodity identification substring, and using the substring except the first time stamp substring and the first commodity identification substring as a first domain name + interface substring;
for example, the second tracing character string is "www.comname.com/path 1/path 2/? ID BJ00000000000000011646042895000 ″, first length L1Is 18, the second length L2Is 13; then the first timestamp sub-string is the last-but-one L in the second trace-to-source string2The sub-character string from 13 to the last 1 character is also called '1646042895000', and the first commodity identification sub-character string is the last L-th character string in the second traceability character string1+L218+13, 31 to the last but one L2The substring of 14 characters, that is, "BJ 00000000000000000001", the first domain name + interface substring is a substring of the second tracing-source substring except for the first time stamp substring "1646042895000" and the first product identification substring "BJ 00000000000000000001", that is, "www.comname.com/path 1/path 2/? ID ═ ID;
step B2, performing domain name interface format check on the first domain name + interface substring according to a preset domain name data format and an interface data format, performing commodity identification format check on the first commodity identification substring according to a preset commodity identification data format, and performing timestamp format check on the first timestamp substring according to a preset timestamp data format;
the method comprises the following steps of carrying out domain name interface format verification on a first domain name + interface substring according to a preset domain name data format and an interface data format, and specifically comprises the following steps: performing URL format check on the first domain name + interface substring based on a definition rule of a known Uniform Resource Locator (URL); if the URL format is successfully checked, extracting domain name information from the first domain name + interface substring as a first domain name, and extracting substrings except the first domain name as a first interface; inquiring a preset legal domain name-interface list according to the first domain name and the first interface, recording a legal domain name-interface record of the legal domain name field matched with the first domain name as a matching record, and if the matching record is not empty and the first interface meets the legal interface set field of the matching record, confirming that the format of the domain name interface is successfully checked; wherein the legal domain name-interface list comprises a plurality of legal domain name-interface records; the legal domain name-interface record comprises a legal domain name field and a legal interface set field; the legal interface set field comprises a plurality of legal interface information;
and carrying out commodity identification format verification on the first commodity identification substring according to a preset commodity identification data format, which specifically comprises the following steps: checking whether abnormal special characters exist in the first commodity identification sub-character string, and if the abnormal special characters do not exist, confirming that the commodity identification format is successfully verified;
carrying out timestamp format verification on the first timestamp substring according to a preset timestamp data format, which specifically comprises the following steps: checking whether non-numeric special characters exist in the first time stamp sub-character string, if not, performing time data conversion on the first time stamp sub-character string to generate corresponding first time data, and if the first time data is not later than the current system time, confirming that the verification of the time stamp format is successful;
and step B3, when the verification of the domain name interface format, the verification of the commodity identification format and the verification of the time stamp format are successful, the data format verification is confirmed to be successful.
Further, extract out second domain name string of tracing to the source, second interface string of tracing to the source, second commodity identification character string and second time stamp character string from the second character string of tracing to the source, specifically include:
in the second tracing character string, from last L2The sub-string of the one to last 1 character as the second time stamp string will be from the last L1+L2From one to last L2Using the substring of +1 character as a second commodity identification substring, and using the substring except the first time stamp substring and the first commodity identification substring as a second domain name + interface substring; and in the secondAnd in the domain name + interface substring string, extracting domain name information as a second tracing domain name string, and extracting substrings except the second tracing domain name string as a second tracing interface string.
Further, performing time validity verification according to the second timestamp character string specifically includes:
step C1, extracting year, month, day and time information from the second time stamp character string to generate corresponding first sending time data;
when extracting year, month, day and time information from the second time stamp character string, firstly, performing time data conversion on the second time stamp character string to generate corresponding second time data, wherein the time format of the second time data comprises year, month, day, hour, minute, second and millisecond information; then, extracting year, month, day and time information from the second time data to generate corresponding first sending time data;
step C2, inquiring a preset commodity production data table according to the second commodity identification character string, recording the commodity production data record corresponding to the commodity identification set field satisfied by the second commodity identification character string as a first record, and extracting the commodity issuance time field of the first record as second issuance time data; the commodity production data table comprises a plurality of commodity production data records; the commodity production data record comprises a commodity batch field, a commodity release time field and a commodity identification set field; the commodity identification set field comprises a plurality of commodity identification information;
in step C3, if the first release time data is not earlier than the second release time data, the time validity verification is confirmed to be successful.
Further, according to the second source tracing domain name character string, the second source tracing interface character string and the second commodity identification character string, the corresponding first source tracing URL address is generated by splicing, and the method specifically includes the following steps:
and splicing according to the sequence of the second tracing domain name character string, the second tracing interface character string and the second commodity identification character string to obtain a corresponding first tracing URL address.
For example, the second tracing domain name string is "www.comname.com", and the second tracing interface string is "/path 1/path 2/? ID ═ and the second product identification character string is "BJ 0000000000000001"; then, the first tracing URL address is "www.comname.com/path 1/path 2/? ID ═ BJ0000000000000001 ".
Further, a browser is used for obtaining a corresponding first tracing data page according to the first tracing URL address; displaying the first tracing data page; the method specifically comprises the following steps:
sending the first tracing URL address serving as a tracing information acquisition service application instruction to a network server corresponding to the second tracing domain name character string by using a browser; receiving return data sent back by the network server, and extracting response information of the traceability information acquisition service application instruction from the return data, wherein the response information can be a static page or a URL (uniform resource locator) address of another page; if the response information is a static page, taking the static page as a first tracing data page and displaying the first tracing data page; and if the response information is the URL address of another page, accessing the URL address of the other page by using the browser to obtain corresponding access page data, and displaying the access page data as a first source tracing data page. It should be noted that, the first traceability data page of the embodiment of the present invention not only provides the text introduction and the image introduction of the commodity; video data relating to the goods may also be provided; the source tracing history information of the current commodity can be provided, the source tracing history information at least comprises a source tracing total number and a source tracing record list, the source tracing record list comprises a plurality of source tracing records, each source tracing record corresponds to one history source tracing operation, and each source tracing record comprises the position and time information of the current source tracing.
Fig. 2 is a schematic structural diagram of an electronic device according to a second embodiment of the present invention. The electronic device may be a terminal device or a server for implementing the method of the embodiment of the present invention, or may be a terminal device or a server connected to the terminal device or the server for implementing the method of the embodiment of the present invention. As shown in fig. 2, the electronic device may include: a processor 301 (e.g., a CPU), a memory 302, a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transceiving operation of the transceiver 303. Various instructions may be stored in memory 302 for performing various processing functions and implementing the processing steps described in the foregoing method embodiments. Preferably, the electronic device according to an embodiment of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to implement communication connections between the elements. The communication port 306 is used for connection communication between the electronic device and other peripherals.
The system bus 305 mentioned in fig. 2 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM) and may also include a Non-Volatile Memory (Non-Volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), a Graphics Processing Unit (GPU), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It should be noted that the embodiment of the present invention also provides a computer-readable storage medium, which stores instructions that, when executed on a computer, cause the computer to execute the method and the processing procedure provided in the above-mentioned embodiment.
The embodiment of the present invention further provides a chip for executing the instructions, where the chip is configured to execute the processing steps described in the foregoing method embodiment.
The embodiment of the invention provides a method for processing traceability data of an NFC label, electronic equipment and a computer readable storage medium, wherein when the traceability data of the NFC label is issued, the original information of commodity traceability is not directly written in as traceability data, but a traceability URL address is written in as traceability data, and corresponding processing mechanisms such as data assembling, data block writing and the like are established; and when the NFC label is subjected to tracing data reading, a legal tracing URL address is obtained based on processing mechanisms such as corresponding data block reading, data assembling, data checking and the like, and a tracing page corresponding to the tracing URL address is obtained through a browser. According to the invention, the traceability data of the commodity can be continuously updated after the commodity with the NFC label enters the circulation field.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (9)

1. A method for processing tracing data of an NFC label is characterized by comprising the following steps:
when the NFC label is subjected to tracing data issue, acquiring a first tracing domain name character string, a first tracing interface character string and a first commodity identification character string corresponding to the current NFC label; generating a corresponding first timestamp character string according to the system time; the first tracing domain name character string, the first tracing interface character string, the first commodity identification character string and the first timestamp character string are spliced to generate a corresponding first tracing character string; performing character code conversion processing on the first tracing character string to generate a corresponding first tracing character code sequence; writing the first tracing character code sequence into a plurality of data storage areas appointed on the NFC label;
when the NFC label is subjected to tracing data reading, reading data from the plurality of specified data storage areas on the current NFC label and splicing the read data to generate a corresponding second tracing character code sequence; performing character string conversion processing on the second tracing character coding sequence to generate a corresponding second tracing character string; performing data format verification on the second tracing character string; if the data format verification is successful, extracting a second tracing domain name character string, a second tracing interface character string, a second commodity identification character string and a second timestamp character string from the second tracing character string; and time validity verification is carried out according to the second timestamp character string; if the time validity verification is successful, generating a corresponding first tracing URL address according to the second tracing domain name character string, the second tracing interface character string and the second commodity identification character string in a splicing manner; and a browser is used for obtaining a corresponding first tracing data page according to the first tracing URL address and displaying the first tracing data page.
2. The NFC tag traceability data processing method of claim 1,
the character string length of the first commodity identification character string is a preset first length L1
The character string length of the first time stamp character string is a preset second length L2
The specified plurality of data storage areas comprises a preset first number M1The data storage byte number of each data storage area is a preset second number M2
3. The NFC tag traceability data processing method of claim 1, wherein the generating of the corresponding first traceability character string by splicing the first traceability domain name character string, the first traceability interface character string, the first product identification character string, and the first timestamp character string specifically comprises:
and splicing according to a character string splicing data format of a first tracing domain name character string, a first tracing interface character string, a first commodity identification character string and a first timestamp character string to generate a corresponding first tracing character string.
4. The NFC tag traceability data processing method of claim 1, wherein the performing of the character code conversion processing on the first traceability character string generates a corresponding first traceability character code sequence specifically includes:
extracting the first tracing character string one by one according to a character sequence from left to right to generate corresponding first tracing characters, and sequencing all the first tracing characters in sequence to generate corresponding first tracing character sequences; in the first tracing character sequence, ASCII code conversion is carried out on each first tracing character to obtain a corresponding first tracing character code; and sequencing all the obtained first tracing character codes according to the corresponding character sequence to obtain the corresponding first tracing character code sequence.
5. The NFC tag source tracing data processing method according to claim 2, wherein the writing the first source tracing character encoding sequence into the plurality of data storage areas specified on the NFC tag specifically includes:
by said second number M2Sequentially dividing the first tracing character coding sequence into a plurality of first data segments p for segment length and segment sliding step lengthi(ii) a I is more than or equal to 1 and less than or equal to n, the sequence length of the first tracing character coding sequence is L, if L/M2Is an integer, n ═ L/M2If L/M2N is not an integer, L/M2+1;
Marking the data storage areas of the plurality of designated data storage areas as data storage areas Z one by onej(ii) a J is more than or equal to 1 and less than or equal to a first number M1
According to the corresponding relation of the subscripts i and j, dividing each first data segment piWriting into the corresponding data storage area ZjIn (1).
6. The NFC tag traceability data processing method of claim 2, wherein the performing of the data format verification on the second traceability character string specifically comprises:
in the second tracing character string, from last L2The substring of the last 1 character is used as the first time stamp substring, and will be from the last L1+L2From one to the last L2Using the substring of +1 character as a first commodity identification substring, and using the substring except the first time stamp substring and the first commodity identification substring as a first domain name + interface substring;
performing domain name interface format verification on the first domain name + interface sub-character string according to a preset domain name data format and an interface data format, performing commodity identification format verification on the first commodity identification sub-character string according to a preset commodity identification data format, and performing timestamp format verification on the first timestamp sub-character string according to a preset timestamp data format;
and when the verification of the domain name interface format, the verification of the commodity identification format and the verification of the timestamp format are successful, confirming that the data format verification is successful.
7. The NFC tag tracing data processing method according to claim 1, wherein the time validity verification according to the second timestamp character string specifically includes:
extracting year, month, day and time information from the second timestamp character string to generate corresponding first sending time data;
inquiring a preset commodity production data table according to the second commodity identification character string, recording a commodity production data record corresponding to a commodity identification set field which is met by the second commodity identification character string as a first record, and extracting a commodity release time field of the first record as second release time data; the commodity production data table comprises a plurality of commodity production data records; the commodity production data record comprises a commodity batch field, the commodity release time field and the commodity identification set field; the commodity identification set field comprises a plurality of commodity identification information;
and if the first issuing time data is not earlier than the second issuing time data, confirming that the time validity verification is successful.
8. An electronic device, comprising: a memory, a processor, and a transceiver;
the processor is used for being coupled with the memory, reading and executing the instructions in the memory to realize the method steps of any one of claims 1 to 7;
the transceiver is coupled to the processor, and the processor controls the transceiver to transmit and receive messages.
9. A computer-readable storage medium having stored thereon computer instructions which, when executed by a computer, cause the computer to perform the method of any of claims 1-7.
CN202210227533.8A 2022-03-08 2022-03-08 NFC tag source tracing data processing method Active CN114595795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210227533.8A CN114595795B (en) 2022-03-08 2022-03-08 NFC tag source tracing data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210227533.8A CN114595795B (en) 2022-03-08 2022-03-08 NFC tag source tracing data processing method

Publications (2)

Publication Number Publication Date
CN114595795A true CN114595795A (en) 2022-06-07
CN114595795B CN114595795B (en) 2022-09-09

Family

ID=81818261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210227533.8A Active CN114595795B (en) 2022-03-08 2022-03-08 NFC tag source tracing data processing method

Country Status (1)

Country Link
CN (1) CN114595795B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911339A (en) * 2023-07-13 2023-10-20 芯电智联(北京)科技有限公司 Prestressed steel cylinder concrete pipe tracing method based on radio frequency tag

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559466A (en) * 2013-11-01 2014-02-05 中国联合网络通信集团有限公司 NFC application processing method, terminal and server
CN104580162A (en) * 2014-12-17 2015-04-29 腾讯科技(深圳)有限公司 Method and device for matching user accounts and method and device for initiating matching information
CN105654316A (en) * 2016-01-04 2016-06-08 河海大学 NFC product anti-counterfeiting traceability system and anti-counterfeiting traceability method thereof
CN105787738A (en) * 2015-12-30 2016-07-20 深圳爱正品科技有限公司 Electronic-label-based goods anti-counterfeiting tracing method and system
CN110533128A (en) * 2019-08-21 2019-12-03 上海唯链信息科技有限公司 A kind of anti-fake data processing method of tracing to the source, device, system and medium based on encryption
US20200004661A1 (en) * 2018-07-02 2020-01-02 Paypal, Inc. System and method for using an unobstrusive and discrete embedded barcode for debugging
CN111127034A (en) * 2019-12-02 2020-05-08 北京海益同展信息科技有限公司 Commodity tracing method and device, client and storage medium
CN111275455A (en) * 2020-01-10 2020-06-12 济南浪潮高新科技投资发展有限公司 NFC anti-counterfeiting chip, commodity anti-counterfeiting tracing method and equipment based on block chain, and medium
CN111539502A (en) * 2020-03-25 2020-08-14 中国平安财产保险股份有限公司 Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN111626744A (en) * 2020-04-17 2020-09-04 广州中国科学院计算机网络信息中心 Configurable and identification interconnection tracing method and system
CN113627958A (en) * 2021-08-25 2021-11-09 芯电智联(北京)科技有限公司 NFC anti-counterfeiting tracing method and server

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103559466A (en) * 2013-11-01 2014-02-05 中国联合网络通信集团有限公司 NFC application processing method, terminal and server
CN104580162A (en) * 2014-12-17 2015-04-29 腾讯科技(深圳)有限公司 Method and device for matching user accounts and method and device for initiating matching information
CN105787738A (en) * 2015-12-30 2016-07-20 深圳爱正品科技有限公司 Electronic-label-based goods anti-counterfeiting tracing method and system
CN105654316A (en) * 2016-01-04 2016-06-08 河海大学 NFC product anti-counterfeiting traceability system and anti-counterfeiting traceability method thereof
US20200004661A1 (en) * 2018-07-02 2020-01-02 Paypal, Inc. System and method for using an unobstrusive and discrete embedded barcode for debugging
CN110533128A (en) * 2019-08-21 2019-12-03 上海唯链信息科技有限公司 A kind of anti-fake data processing method of tracing to the source, device, system and medium based on encryption
CN111127034A (en) * 2019-12-02 2020-05-08 北京海益同展信息科技有限公司 Commodity tracing method and device, client and storage medium
CN111275455A (en) * 2020-01-10 2020-06-12 济南浪潮高新科技投资发展有限公司 NFC anti-counterfeiting chip, commodity anti-counterfeiting tracing method and equipment based on block chain, and medium
CN111539502A (en) * 2020-03-25 2020-08-14 中国平安财产保险股份有限公司 Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN111626744A (en) * 2020-04-17 2020-09-04 广州中国科学院计算机网络信息中心 Configurable and identification interconnection tracing method and system
CN113627958A (en) * 2021-08-25 2021-11-09 芯电智联(北京)科技有限公司 NFC anti-counterfeiting tracing method and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨磊,等: "基于NFC的农产品移动溯源系统开发与应用", 《南方农业学报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911339A (en) * 2023-07-13 2023-10-20 芯电智联(北京)科技有限公司 Prestressed steel cylinder concrete pipe tracing method based on radio frequency tag
CN116911339B (en) * 2023-07-13 2024-04-16 芯电智联(北京)科技有限公司 Prestressed steel cylinder concrete pipe tracing method based on radio frequency tag

Also Published As

Publication number Publication date
CN114595795B (en) 2022-09-09

Similar Documents

Publication Publication Date Title
CN110764942B (en) Multi-kind data verification method, device, computer system and readable storage medium
CN110704633B (en) Named entity recognition method, named entity recognition device, named entity recognition computer equipment and named entity recognition storage medium
CN111274782A (en) Text auditing method and device, computer equipment and readable storage medium
CN110597511B (en) Page automatic generation method, system, terminal equipment and storage medium
CN108427731B (en) Page code processing method and device, terminal equipment and medium
CN110597814B (en) Structured data serialization and deserialization method and device
CN111159329B (en) Sensitive word detection method, device, terminal equipment and computer readable storage medium
CN114595795B (en) NFC tag source tracing data processing method
CN114048129A (en) Automatic testing method, device, equipment and system for software function change
CN111666087A (en) Operation rule updating method and device, computer system and readable storage medium
CN115328759A (en) Form verification method and device
CN116029745A (en) Digital label anti-counterfeiting tracing method, device and system based on blockchain
CN117216279A (en) Text extraction method, device and equipment of PDF (portable document format) file and storage medium
CN112947911A (en) Interface script generation method, device, equipment and storage medium
CN112114978A (en) Electronic scale data updating method, device, equipment and readable storage medium
CN115712917A (en) Desensitization method and device for sensitive data, electronic equipment and storage medium
CN115203364A (en) Software fault feedback processing method, device, equipment and readable storage medium
CN112069772B (en) FPGA-based data processing method and device, electronic equipment and storage medium
CN115294586A (en) Invoice identification method and device, storage medium and electronic equipment
CN111667214B (en) Goods information acquisition method and device based on two-dimensional code and electronic equipment
CN114003737A (en) Double-record examination assisting method, device, equipment and medium based on artificial intelligence
CN112465519A (en) Server component fool-proof management and control method, system, terminal and storage medium
CN113296785A (en) Document generation method, system, device and readable storage medium
CN104572595A (en) Word stock check device and word stock check method
CN114428594B (en) Image display method, device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant