CN111383033A - Anti-counterfeiting tracing method and device for chemical fertilizer product - Google Patents

Anti-counterfeiting tracing method and device for chemical fertilizer product Download PDF

Info

Publication number
CN111383033A
CN111383033A CN202010148458.7A CN202010148458A CN111383033A CN 111383033 A CN111383033 A CN 111383033A CN 202010148458 A CN202010148458 A CN 202010148458A CN 111383033 A CN111383033 A CN 111383033A
Authority
CN
China
Prior art keywords
code
array
tracing
counterfeiting
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010148458.7A
Other languages
Chinese (zh)
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.)
Yunnan Array Code Technology Co ltd
Original Assignee
Yunnan Array Code 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 Yunnan Array Code Technology Co ltd filed Critical Yunnan Array Code Technology Co ltd
Priority to CN202010148458.7A priority Critical patent/CN111383033A/en
Publication of CN111383033A publication Critical patent/CN111383033A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Finance (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an anti-counterfeiting tracing method for a fertilizer product, which comprises the following steps: step S100, the ordered tracing codes and the basic information of the product are correspondingly associated into array pairs one by one and then sequentially stored in a central database to obtain an array; step S200: generating an encrypted check code; step S300: and setting the encryption check code at the front end or the tail end of the ordered tracing code to obtain an anti-counterfeiting tracing code, and loading the anti-counterfeiting tracing code onto a carrier. The anti-counterfeiting tracing code obtained by the method contains an encryption check code, and can play a role in preventing batch counterfeiting. Only the continuous arrangement rule of the anti-counterfeiting tracing codes on the package can be obtained, and the correct tracing codes cannot be generated continuously in batches. Improve the anti-counterfeiting capability of the fertilizer product.

Description

Anti-counterfeiting tracing method and device for chemical fertilizer product
Technical Field
The application relates to an anti-counterfeiting tracing method and device for a chemical fertilizer product, and belongs to the technical field of anti-counterfeiting tracing of chemical fertilizer products.
Background
At present, the technical means of the chemical fertilizer industry for anti-counterfeiting tracing mainly comprises that a code with a self-defined format and a randomly generated tracing code are endowed to two-dimension code contents, and whether the tracing code is matched with a database or not is analyzed by identifying the two-dimension code so as to check the authenticity of the product. In most cases, the tracing code characteristics generated by each manufacturer can be basically divided into two types, namely 1 random generation disordered type; 2 ordered no encryption class.
Most of the current fertilizer enterprise product tracing codes are a group of specific digital codes which are generated in an unordered or random mode. The unordered tracing code and the random code are characterized in that the production information of the product, such as batch number and other information, is encrypted to regenerate the unordered tracing code, and the information of the generated batch and the like can be inquired after comparison through a central database.
The two types of codes do not contain production information, the existing tracing codes are easily counterfeited by fake manufacturers in batches or after analysis rules are carried out, so that the existing tracing codes are good in order, occupy the market of regular fertilizer enterprises, harm agricultural production and damage the benefits of farmers.
Meanwhile, in the fertilizer industry, the quantity of fertilizers in the same batch is large, the conventional tracing code only can display tracing information, the production sequence information of multiple bags of fertilizers cannot be acquired through the tracing code, the information utility is limited, and the method cannot be used for accurately managing a large number of single fertilizer products by enterprises.
Some ordered tracing codes do not have an anti-counterfeiting function, rules are easy to decode, and continuous batch change can be realized after decoding.
The method is characterized in that enterprise managers cannot directly and conveniently manage by tracing the appearance of the codes, and the method is disordered. For the fertilizer industry, product information cannot be efficiently identified after products are delivered from a warehouse. For example, when an enterprise uses an unordered traceability code to associate with a product, stacking product inventory, logistics shipping, enterprise marketing, etc. all introduce inefficiencies.
Disclosure of Invention
The application provides a chemical fertilizer anti-counterfeiting tracing method based on continuous encryption identification coding for solving the technical problems.
The application provides an anti-counterfeiting tracing method for a fertilizer product, which comprises the following steps:
step S100: the ordered traceback codes and the basic information of the products are correspondingly associated into number pairs one by one and then sequentially stored in a central database to obtain an array, and the production information of the products is respectively given to each array pair according to the number section of each array pair in the array;
step S200: generating an encrypted check code;
wherein, step S200 includes the following steps:
step S210: acquiring a group of character strings from a central database, and converting the character strings into a one-dimensional array with the length of 16 bits as an encryption key;
step S220: arbitrarily generating a decimal tracing code to be encrypted, and complementing the tracing code into 32 bits to obtain a first code;
step S230: taking the end of the first code segment as a start, and dividing the first code according to each array containing 2 bits to obtain a code array with the array length of 16 bits;
step S240: converting each element in the coding group array into byte type bytes, and generating a message data group after arranging according to the original array sequence of the coding group;
step S250: mixing the encryption key and the message data set, obtaining a first data result by adopting Hash encryption processing, mixing the first data result with the encryption key again, carrying out Hash operation to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code;
step S260: from the end of the second coding array, sequentially intercepting digits in reverse direction to obtain a check code, converting each array element in the check code into a binary system, and obtaining a third code as the encryption check code;
step S300: and setting the encryption check code at the front end or the tail end of the ordered tracing code to obtain an anti-counterfeiting tracing code, and printing the anti-counterfeiting tracing code on a carrier.
The carrier can be the surface of a packaging bag, and can also be other carriers which can be arranged on the surface of the packaging bag and can be carried, such as a film, an anti-counterfeiting label and the like.
Preferably, step S100 further includes an operation of associating the product ex-warehouse sequence with the array sequence. Optionally, the step S300 further includes converting the anti-counterfeiting traceability code into a two-dimensional code, and spraying the two-dimensional code on a product packaging bag.
Preferably, the bit-filling operation in step S220: and judging whether the length of the traceback code is larger than 32, if so, reversely intercepting 32 bits from the end of the traceback code to be used as the first code, and if not, adding 0 from the head of the traceback code until the length of the traceback code reaches 32 to be used as the first code.
Preferably, the step S270 further includes a bit padding operation on the encryption key.
Preferably, in order to shorten the length of the check code, the step S260 further includes performing a "<" left shift padding operation on each array element in the third code to obtain a long integer data type, and adding values of elements in the long integer data type to obtain a long integer code; and from the end of the long integer code, reversely and sequentially intercepting digits as the encryption check code.
Preferably, the decimal tracing back code to be encrypted in step S220 may be generated in batch through background computing, the number of bits of the decimal tracing back code to be encrypted is not limited, and the ordered tracing back code and the check code may be multiple bits and may include english letters. The position of the English letters is not fixed and can be set according to the needs of the user.
Preferably, the step S300 further includes storing the anti-counterfeiting tracing code as a text, and then determining whether the number of the anti-counterfeiting tracing code reaches the production requirement, and if so, storing the text in a database; if not, returning to the step S200. According to the steps, the method can be operated once to obtain the anti-counterfeiting tracing code required by the production batch, and the production efficiency is improved.
Another aspect of this application still provides an anti-fake device of tracing to source for chemical fertilizer product, includes: the association module is used for associating the ordered traceback codes and the product basic information into array pairs in a one-to-one correspondence mode to serve as arrays;
the central database is used for storing the arrays;
the production information endowing module is used for endowing the production information of the product to each array pair according to the number segment of each array pair;
the encryption check code generation module is used for acquiring a group of character strings from a central database and converting the character strings into a one-dimensional array with the length of 16 bits as an encryption key;
arbitrarily generating a decimal tracing code to be encrypted, and complementing the tracing code into 32 bits to obtain a first code;
taking the end of the first code segment as a start, and dividing the first code according to each array containing 2 bits to obtain a code array with the array length of 16 bits;
converting each element in the coding group array into byte type bytes, and generating a message data group after arranging according to the original array sequence of the coding group;
mixing the encryption key and the message data set, obtaining a first data result by adopting Hash encryption processing, mixing the first data result with the encryption key again, carrying out Hash operation to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code;
from the end of the second coding array, sequentially intercepting digits in reverse direction to obtain a check code, converting each array element in the check code into a binary system, and obtaining a third code as the encryption check code;
the anti-counterfeiting tracing module is used for arranging the encrypted check code at the front end or the tail end of the ordered tracing code;
and the printing module is used for loading the anti-counterfeiting traceability to a carrier.
The beneficial effects that this application can produce include:
1) according to the anti-counterfeiting tracing method for the chemical fertilizer product, the obtained anti-counterfeiting tracing code contains the encryption check code, and the effect of preventing batch counterfeiting can be achieved. Only the continuous arrangement rule of the anti-counterfeiting tracing codes on the package can be obtained, and the correct tracing codes cannot be generated continuously in batches. Improve the anti-counterfeiting capability of the fertilizer product.
2) The application provides an anti-fake traceability method for chemical fertilizer products, can combine the product production sequence information of chemical fertilizer products with the encryption check code through this method, obtain orderly and encrypted retrospective code, because contain the production information in this code, and the production information can't change once inputed, the outside personnel of enterprise are difficult to obtain the production information, even decode because can't obtain accurate production information, after the counterfeit retrospective code, can't obtain corresponding product information, thereby the problem that chemical fertilizer products are counterfeited in batches has been avoided.
3) By adopting the anti-counterfeiting tracing method for the fertilizer product, the production information contained in the fertilizer product can be obtained through scanning inside an enterprise, and the production information, such as product type, production date and the like, can be intuitively researched and judged while tracing. According to the enterprise demand, the product is distributed fast and efficiently, the control on the large batch of products is convenient, and the problem of difficult allocation is avoided.
Drawings
FIG. 1 is a schematic flow chart of an anti-counterfeiting tracing method for a fertilizer product provided by the present application;
fig. 2 is a schematic structural diagram of an anti-counterfeiting tracing device for a fertilizer product provided by the present application;
FIG. 3 is a schematic flow chart of a method in an embodiment of the present application; .
Detailed Description
The present application will be described in detail with reference to examples, but the present application is not limited to these examples.
According to the method, a provider generates continuous decimal traceability codes in batches through a traceability code registry according to the requirements of a production plan, performs many-to-one association on basic traceability information of similar products and stores the basic traceability information in a fertilizer traceability database. At the moment, the unique identification tracing code of each product has the characteristic of continuity, a unique digital check code is correspondingly generated through the encryption module according to each different tracing code, and the ordered tracing code is combined with the check code, so that the realized tracing code has the characteristics of continuity and non-batch counterfeiting.
The specific steps of the method provided by the application are described in detail in the following specific examples:
referring to fig. 1, step S100: and according to the requirements of a product production plan, generating ordered retrospective codes in batches before fertilizer production. And performing one-to-one correspondence association and binding on the product basic information and the ordered retroactive codes to form arrays, wherein each array comprises one product basic information and one ordered retroactive code. The generated array data is stored in a central database. And respectively endowing information such as production date, team and batch number of the specific product according to the number segments of the arrays.
For the off-line products, codes can be assigned to each ex-warehouse product in sequence according to the storage sequence of the tracing codes in the array, and the storage sequence corresponds to the ex-warehouse sequence. According to the operation, the method can be used for off-line products, and the application range of the method is widened.
When a packaging material is produced by a packaging plant of a fertilizer enterprise, the ordered tracing code is displayed in the form of the two-dimensional code, so that the advantage that the two-dimensional code can store a large amount of information is utilized, the ordered tracing code is associated with the network query website, and code scanning and source tracing are realized.
The two-dimensional code can be printed according to the self needs of enterprises. The ordered traceback codes can be displayed in the packaging material in a plaintext mode, and actual style enterprises can design the ordered traceback codes by themselves.
Step S200: the encrypted check code generation steps are as follows:
step S210: in the encryption module system, a group of character strings are obtained from a central database and are converted into a group of one-dimensional arrays with the length of 16 bits as encryption keys.
The resulting encryption key in this example is { -76, -23,2-65, -87,221, -76,64,98,43,12,87,34,23, -6,24 }.
Step S220: and judging the decimal retroactive code to be encrypted according to the number of digits of the coded decimal code, and if the length of the coded decimal code is greater than 32 digits, reversely intercepting the coded decimal code from the tail to 32 digits. If the length is less than 32 bits, a bit-filling operation is performed from the header to obtain a first code. The purpose is to convert the traceback code into a decimal code of length 32 bits.
The decimal code in this example is: 00000000000000000000125321526984, in this example, none of the previous 0 s have been complemented by the code added in the operation; the back 125321526984 is an ordered traceback code.
Step S230: and carrying out 16 times of circulation on the newly generated 32-bit decimal first code by taking the tail as the start, dividing the first code according to each array containing 2-bit numbers, wherein each array element is formed by adjacent two-bit decimal codes, and obtaining a code array with the array length of 16 bits.
The code set in this example is {00,00,00,00,00, 0012,53,21,52,69,87 }; the cycle here means that the division operation is performed 16 times to obtain 16 groups.
Step S240: each element in the array of the coding group is forcibly converted into byte type bytes, and the byte type bytes are arranged according to the original sequence to generate a message data group. This process is to reconstitute the code into one message data.
The message data in this example are: [0,0,0,0,0,0,0,0,0,0,97,81,2,81,54,81].
Step S250: and (3) mixing the message data with the encryption key obtained in the step (1), carrying out Hash encryption processing through 'HmacSHA 1' to obtain a first data result, carrying out Hash operation on the first data result and the encryption key again to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code.
As used in this example: the encryption key is { -76, -23,2-65, -87,221, -76,64,98,43,12,87,34,23, -6,24 }; the resulting hash sequence was 850cdac730aa27f8cd5dbdda1bb99e97b5ef2 adf; after this step, the second code obtained in this example is [ -13, -91,57, -39, -87,50,9,73, -22,12,120,74,3,49,100, -79, -85,112,86, -38 ].
Step S260: and from the end of the second coding array, sequentially intercepting the digit in reverse to obtain the check code. And intercepting the digit according to the length requirement of the encryption check code.
In this example, the check code is 4 bits, and the array elements of-85,112, 86 and-38 are taken as the check code sequentially from the end.
Step S270: and converting each array element in the check code into a binary system to obtain a third code. The third code can be used as an encryption check code.
The third code in this example is: -1010101; 1110000, respectively; 1010110, respectively; -100110.
Step S280: and according to the number of the complementary codes, carrying out a < <' left shift complementary code operation on each array element in the third code, and after the complementary codes are carried out, converting the obtained codes into a long integer data type. The number of the complement codes can be set according to the needs of users. In this example, the long integer data includes:
array element 1: -1426063360;
array element 2: 7340032, respectively;
array element 3: 22016;
array element 4: 218;
step S290: and adding the element values in the long integer data type to obtain a long integer code. In this example: the resulting long integer was coded as-1418701094. And intercepting according to the length requirement of the check code from the end of the long integer code, wherein the length of the check code is 4 bits in the example, the finally obtained encrypted check code is 1094, and if the long integer value is less than the length of the check code, the operation of 0 compensation is carried out at the front end of the long integer code.
Step S300: and setting the encrypted check code at the front end or the tail end of the ordered tracing code to obtain the anti-counterfeiting tracing code. And setting and generating the corresponding number of encrypted check codes according to the number of the ordered traceback codes. In this example, an encryption check code 6954 is added at the end of the ordered traceback code [615102014203 ]. Form an anti-counterfeiting traceability code [6151020142036954]
According to the method, after the basic information of the product and the encrypted secret key obtained by the ordered retrospective coding are mixed with the message data, the check code is obtained through a multiple Hash algorithm, and operations such as binary conversion, long integer data conversion and the like are carried out on each digit in the check code, so that the check code uniquely corresponding to the ordered retrospective code is obtained. After the check code is encrypted and operated in the step S260, the obtained third code is unique and can not be generated reversely, and external personnel can be effectively prevented from analyzing and cracking the check code in sequence. The confidentiality of batch products of the chemical fertilizer is improved, and the situation that counterfeit products flood the market and influence agricultural production is avoided.
1. The proposed sequential traceback coding encryption method is based on random traceback coding or sequential non-encryption traceback coding in the traditional mode of the fertilizer industry, and provides a safer, low-cost and high-efficiency advantageous traceback coding scheme.
2. The proposed sequential encryption tracing coding technology is not limited by any tracing coding length and characters. Enterprises can set by self according to self-defined coding formats, check codes obtained through an encryption and decryption system are unique no matter the length of the traceable codes, and the length can be adjusted at will.
3. The ordered encryption tracing code can be used for batch management in the enterprise distribution management tracing code, and the ordered batch correlation product information and the like are carried out according to the production batch, the product and the like when the tracing code is generated. The effect of the manager on the distribution of the tracing codes is improved.
The query mode is flexible, and the tracing code does not have any secret key, and can be displayed and disclosed in a plaintext. The authenticity can be inquired by inquiring the central database through the network. And the authenticity of the codes can also be traced through the non-network off-line APP inquiry.
Referring to fig. 2, another aspect of the present application further provides an anti-counterfeiting tracing apparatus for a fertilizer product, including: the association module is used for associating the ordered traceback codes and the product basic information into array pairs in a one-to-one correspondence mode to serve as arrays;
the central database is used for storing the arrays;
the production information endowing module is used for endowing the production information of the product to each array pair according to the number segment of each array pair;
the encryption check code generation module is used for acquiring a group of character strings from a central database and converting the character strings into a one-dimensional array with the length of 16 bits as an encryption key;
arbitrarily generating a decimal tracing code to be encrypted, and complementing the tracing code into 32 bits to obtain a first code;
taking the end of the first code segment as a start, and dividing the first code according to each array containing 2 bits to obtain a code array with the array length of 16 bits;
converting each element in the coding group array into byte type bytes, and generating a message data group after arranging according to the original array sequence of the coding group;
mixing the encryption key and the message data set, obtaining a first data result by adopting Hash encryption processing, mixing the first data result with the encryption key again, carrying out Hash operation to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code;
from the end of the second coding array, sequentially intercepting digits in reverse direction to obtain a check code, converting each array element in the check code into a binary system, and obtaining a third code as the encryption check code;
and the anti-counterfeiting tracing module is used for setting the encrypted check code at the front end or the tail end of the ordered tracing code.
Referring to fig. 3, the present application provides a method comprising the steps of: the ordered retroactive codes generated in batches are stored in a central database, are distributed and managed by a retroactive code management system (hereinafter referred to as a management system) of a related auxiliary management system,
suppose that a certain fertilizer enterprise plans to produce a total of 80000 bags of fertilizer products with 4 packaging specifications in a month. 80000 ordered codes are generated in batches by using the ordered retroactive codes related to the invention, the ordered retroactive codes from the beginning (without check codes) 100100011200 to the end (100100091200) are generated, the specific number is input through a management system, the ordered retroactive codes can be automatically distributed from the number segment pool, and the generated ordered retroactive codes are compressed and packaged in a text form and are delivered to a fertilizer packaging plant for printing. The number segment is managed through a management system, such as product basic information and the like, and the information is uploaded to a central database. Based on the ordered retrospective codes, fertilizer enterprises distribute packaging bags to a production line according to actual production conditions in the production process, and batch endow the ordered codes with production date, batch numbers, team and group information and the like. In the ordered tracing coding structure in the enterprise, the ordered parts are managed, including stock storage position stacking management, logistics shipping management and the like. In the market circulation link, the check code part of the code is orderly traced, so that the characteristics of preventing batch counterfeiting and checking authenticity are achieved. Compared with the traditional mode, the tracing code generated randomly or subjected to full encryption has the side point of anti-counterfeiting means. For enterprises, the ordered tracing codes provide an ordered concept on the basis of encryption and anti-counterfeiting, and are managed uniformly according to sequences in the production process, so that the tracing codes not only have an anti-counterfeiting check function, but also can enable the enterprises to accurately manage batches and single products in a product management link. Therefore, the uniqueness of the traditional tracking code is avoided, and the maximum efficiency is achieved.
Reference throughout this specification to "one embodiment," "another embodiment," "an embodiment," "a preferred embodiment," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment described generally in this application. The appearances of the same phrase in various places in the specification are not necessarily all referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with any embodiment, it is submitted that it is within the scope of the invention to effect such feature, structure, or characteristic in connection with other embodiments.
Although the invention has been described herein with reference to a number of illustrative embodiments thereof, it should be understood that numerous other modifications and embodiments can be devised by those skilled in the art that will fall within the spirit and scope of the principles of this disclosure. More specifically, various variations and modifications are possible in the component parts and/or arrangements of the subject combination arrangement within the scope of the disclosure, the drawings and the appended claims. In addition to variations and modifications in the component parts and/or arrangements, other uses will also be apparent to those skilled in the art.

Claims (8)

1. An anti-counterfeiting tracing method for a fertilizer product is characterized by comprising the following steps:
step S100: the ordered traceback codes and the basic information of the products are correspondingly associated into number pairs one by one and then sequentially stored in a central database to obtain an array, and the production information of the products is respectively given to each array pair according to the number section of each array pair in the array;
step S200: generating an encrypted check code;
wherein, step S200 includes the following steps:
step S210: acquiring a group of character strings from a central database, and converting the character strings into a one-dimensional array with the length of 16 bits as an encryption key;
step S220: arbitrarily generating a decimal tracing code to be encrypted, and complementing the tracing code into 32 bits to obtain a first code;
step S230: taking the end of the first code segment as a start, and dividing the first code according to each array containing 2 bits to obtain a code array with the array length of 16 bits;
step S240: converting each element in the coding group array into byte type bytes, and generating a message data group after arranging according to the original array sequence of the coding group;
step S250: mixing the encryption key and the message data set, obtaining a first data result by adopting Hash encryption processing, mixing the first data result with the encryption key again, carrying out Hash operation to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code;
step S260: from the end of the second coding array, sequentially intercepting digits in reverse direction to obtain a check code, converting each array element in the check code into a binary system, and obtaining a third code as the encryption check code;
step S300: and setting the encryption check code at the front end or the tail end of the ordered tracing code to obtain an anti-counterfeiting tracing code, and loading the anti-counterfeiting tracing code onto a carrier.
2. The anti-counterfeiting tracing method for fertilizer products as claimed in claim 1, wherein said step S100 further comprises an operation of associating the product ex-warehouse sequence with each array in sequence.
3. The anti-counterfeiting tracing method for fertilizer products as claimed in claim 1, wherein the bit supplementing operation in step S220 is: and judging whether the length of the traceback code is larger than 32, if so, reversely intercepting 32 bits from the end of the traceback code to be used as the first code, and if not, adding 0 from the head of the traceback code until the length of the traceback code reaches 32 to be used as the first code.
4. The anti-counterfeit tracing method for fertilizer products as claimed in claim 1, wherein said step S270 further comprises a bit-padding operation on said encryption key.
5. The anti-counterfeiting tracing method for fertilizer products as claimed in claim 1, wherein said step S260 further comprises performing a "<" left shift padding operation on each array element in said third code to obtain a long integer data type, and adding values of elements in said long integer data type to obtain a long integer code; and from the end of the long integer code, reversely and sequentially intercepting digits as the encryption check code.
6. The anti-counterfeiting tracing method for fertilizer products as claimed in claim 1, wherein said decimal tracing back code to be encrypted in step S220 is generated in batch by background computing.
7. The anti-counterfeiting tracing method for fertilizer products as claimed in claim 1, wherein said step S300 further comprises storing said anti-counterfeiting tracing code as a text, and then determining whether the number of said anti-counterfeiting tracing code reaches the production requirement, and if so, storing the text in a database; if not, returning to the step S200.
8. An anti-counterfeiting traceability device for a fertilizer product, comprising:
the association module is used for associating the ordered traceback codes and the product basic information into array pairs in a one-to-one correspondence mode to serve as arrays;
the central database is used for storing the arrays;
the production information endowing module is used for endowing the production information of the product to each array pair according to the number segment of each array pair;
the encryption check code generation module is used for acquiring a group of character strings from a central database and converting the character strings into a one-dimensional array with the length of 16 bits as an encryption key;
arbitrarily generating a decimal tracing code to be encrypted, and complementing the tracing code into 32 bits to obtain a first code;
taking the end of the first code segment as a start, and dividing the first code according to each array containing 2 bits to obtain a code array with the array length of 16 bits;
converting each element in the coding group array into byte type bytes, and generating a message data group after arranging according to the original array sequence of the coding group;
mixing the encryption key and the message data set, obtaining a first data result by adopting Hash encryption processing, mixing the first data result with the encryption key again, carrying out Hash operation to obtain a Hash sequence, and converting the Hash sequence into a byte type array to obtain a second code;
from the end of the second coding array, sequentially intercepting digits in reverse direction to obtain a check code, converting each array element in the check code into a binary system, and obtaining a third code as the encryption check code;
the anti-counterfeiting tracing module is used for arranging the encrypted check code at the front end or the tail end of the ordered tracing code;
and the printing module is used for loading the anti-counterfeiting traceability to a carrier.
CN202010148458.7A 2020-03-05 2020-03-05 Anti-counterfeiting tracing method and device for chemical fertilizer product Pending CN111383033A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010148458.7A CN111383033A (en) 2020-03-05 2020-03-05 Anti-counterfeiting tracing method and device for chemical fertilizer product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010148458.7A CN111383033A (en) 2020-03-05 2020-03-05 Anti-counterfeiting tracing method and device for chemical fertilizer product

Publications (1)

Publication Number Publication Date
CN111383033A true CN111383033A (en) 2020-07-07

Family

ID=71215300

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010148458.7A Pending CN111383033A (en) 2020-03-05 2020-03-05 Anti-counterfeiting tracing method and device for chemical fertilizer product

Country Status (1)

Country Link
CN (1) CN111383033A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1093048A (en) * 1994-03-18 1994-10-05 北京交通大学 Monitoring and discriminating system for shaft temperature
WO1998004967A1 (en) * 1996-07-25 1998-02-05 Peter David Collins Immobilisation protection system for electronic components
KR20110072111A (en) * 2009-12-22 2011-06-29 한국저작권위원회 Method and system for preventing outflow in software source code
CN103544622A (en) * 2013-11-07 2014-01-29 广东海洋大学 Anti-counterfeiting method in safety traceability system
CN104574090A (en) * 2013-10-09 2015-04-29 无锡中科方德软件有限公司 Anti-fake method combining tracing code with random encryption password
CN107437186A (en) * 2016-05-26 2017-12-05 广东淘真宝科技股份有限公司 A kind of generation of commodity counterfeit prevention code and the method for inspection
CN108921573A (en) * 2018-06-20 2018-11-30 北斗天绘信息技术有限公司 A yard data processing method of tracing to the source suitable for Internet of Things
CN108985784A (en) * 2018-02-11 2018-12-11 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN109146524A (en) * 2018-08-22 2019-01-04 周口师范学院 A kind of agricultural product using block chain technology are traced to the source information security solution
CN109146522A (en) * 2018-08-21 2019-01-04 安徽质在智能科技有限公司 Food safety trace back method and system based on block chain
CN109359836A (en) * 2018-09-29 2019-02-19 厦门艾欧特科技有限公司 A kind of wisdom building system based on block chain and RFID technique

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1093048A (en) * 1994-03-18 1994-10-05 北京交通大学 Monitoring and discriminating system for shaft temperature
WO1998004967A1 (en) * 1996-07-25 1998-02-05 Peter David Collins Immobilisation protection system for electronic components
KR20110072111A (en) * 2009-12-22 2011-06-29 한국저작권위원회 Method and system for preventing outflow in software source code
CN104574090A (en) * 2013-10-09 2015-04-29 无锡中科方德软件有限公司 Anti-fake method combining tracing code with random encryption password
CN103544622A (en) * 2013-11-07 2014-01-29 广东海洋大学 Anti-counterfeiting method in safety traceability system
CN107437186A (en) * 2016-05-26 2017-12-05 广东淘真宝科技股份有限公司 A kind of generation of commodity counterfeit prevention code and the method for inspection
CN108985784A (en) * 2018-02-11 2018-12-11 北京京东尚科信息技术有限公司 Method and apparatus for storing information
CN108921573A (en) * 2018-06-20 2018-11-30 北斗天绘信息技术有限公司 A yard data processing method of tracing to the source suitable for Internet of Things
CN109146522A (en) * 2018-08-21 2019-01-04 安徽质在智能科技有限公司 Food safety trace back method and system based on block chain
CN109146524A (en) * 2018-08-22 2019-01-04 周口师范学院 A kind of agricultural product using block chain technology are traced to the source information security solution
CN109359836A (en) * 2018-09-29 2019-02-19 厦门艾欧特科技有限公司 A kind of wisdom building system based on block chain and RFID technique

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WEIRONG SUN ET AL.: ""Application of Blockchain and RFID in Anti-counterfeiting Traceability of Liquor"", 《5TH INTERNATIONAL CONFERENCE ON COMPUTER AND COMMUNICATIONS (ICCC)》 *
杨信廷等: ""基于区块链的农产品追溯系统信息存储模型与查询方法"", 《农业工程学报》 *

Similar Documents

Publication Publication Date Title
CN103646331B (en) Wine anti-counterfeit source tracing method based on enciphered bar code mark
US20150134972A1 (en) Format preserving encryption systems for data strings with constraints
WO2021128588A1 (en) Tracing method and system for item circulation system
US20200387859A1 (en) Methods, Application Server, Block Chain Node and Media For Logistics Tracking and Source Tracing
CN111539502B (en) Anti-counterfeiting two-dimensional code generation method and device, server and storage medium
CN113469714A (en) Product anti-counterfeiting tracing method based on industrial internet identification analysis system
CN102194173A (en) Coding method for tracing vegetables and coding system used by same
CN104112205A (en) Commodity authentication and source tracing system and method based on combined public-key cryptosystem
KR20180088895A (en) Method and apparatus for generating random string
CN108052805A (en) A kind of data encryption/decryption method and device
CN109454997B (en) Two-dimensional code printing generation system with electronic texture
CN115834200A (en) Attribute-based searchable encryption data sharing method based on block chain
CN111383033A (en) Anti-counterfeiting tracing method and device for chemical fertilizer product
CN110852764A (en) Anti-counterfeiting traceable product identification device and method based on block chain technology
CN108446753A (en) Commodity two dimension code encoding method and system
US8386447B2 (en) Allocating and managing random identifiers using a shared index set across products
CN104616039A (en) Card sending method and card sending device for RFID label
CN201741328U (en) Product label
CN108898199A (en) product identification code converting method, device and product management system
CN103154971B (en) A system for generating an incrementally completed security mark
CN107392526A (en) The kinds of goods monitoring system and its monitoring method of compatible a variety of bar code managements
CN103824102A (en) Two-dimensional code anti-fake encryption method
US8915450B2 (en) Dual deterent incremental information object
CN109919277A (en) Encryption color triangle code decoding method for commodity outer packing
CN105117878A (en) Method and device for treating remaining article amount

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