Object authentication method, system and storage medium based on digital ID card
Through the item authentication method based on digital ID card, using blockchain network storage and encryption mode to verify data, the problem of easy forgery and incomplete information in the existing technology is solved, and higher security and accuracy are achieved .
Patent Information
- Application Number
- CN202410897831.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The existing item authentication technology has the problem of being easily forged and incomplete information, and requires the use of complex equipment, and the data stored in the database is easily modified. The implementation of remote dynamic 3D code involves complex image processing and pattern recognition technology.
Using the item authentication method based on digital ID cards, collect item data through preset tags, generate digital ID cards and build an encryption mode, use blockchain network storage encoding to generate verification data and combination data, and judge to the search mode and authentication mode. Verify that the data has been modified.
Improve the security and accuracy of item authentication, reduce dependence on complex devices, and improve data security and immutability through blockchain network storage.
Smart Images

Figure CN118862932B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data identification and authentication, and in particular relates to an object authentication method, system and storage medium based on a digital ID card. Background Art
[0002] Item authentication refers to the process of verifying the authenticity, origin, and attributes of an item. Traditional item authentication methods may have problems such as being easily forged and having incomplete information. Therefore, a safe and reliable item authentication method needs to be provided.
[0003] For example, the Chinese patent with the publication number CN1588386B discloses a system and method for realizing item information verification by combining radio frequency identification with mobile communication. The system includes an information center and a tag user subsystem composed of an initialization subsystem, a verification subsystem and a gateway server; it is characterized in that it also includes an RFID (Radio-Frequency Identification) tag information verification module used in combination with a mobile phone, which automatically generates a random code, writes the RFID tag to be checked and is encrypted and stored, receives the existing information stored in the tag, and synthesizes it with the random code data in the module, applies the special service number solidified in the module, and runs the interface instruction of the mobile phone to directly control the mobile phone to send a short message to the information center verification subsystem; the verification subsystem retrieves and decrypts the received short message data packet, and then compares it with the data information pre-stored in the verification information database to make a conclusion of authenticity. An encryption, secondary authentication, three-party interaction, and five-fold anti-counterfeiting means are used to achieve the purpose of eliminating counterfeiting. For another example, the Chinese patent application with publication number CN105550881A discloses a method for generating and authenticating a remote dynamic three-dimensional code based on a two-dimensional code. The remote dynamic three-dimensional code includes a two-dimensional code module and a three-dimensional particle filling module composed of a number of particle filling areas; each particle filling area is relatively independent; each particle filling area is filled with a number of particles with the same diameter; at least two particle filling areas in the three-dimensional particle filling module are filled with particles of different diameters. Due to the different particle diameters, the corresponding resonance frequencies are different, and the intensity of the response to the ultrasonic scanning signal is also different. The remote dynamic three-dimensional code of the invention has dual authentication. It requires authentication of both the two-dimensional code and the three-dimensional particle filling module. The authentication is successful only when the scanning results of the two are correct. The size and quantity of the particles filled in the three-dimensional particle filling module of the remote dynamic three-dimensional code of the invention are unreplicable and invisible to the naked eye. It has a unique anti-counterfeiting feature, which improves the security of the identity authentication process.
[0004] However, the above-mentioned existing technologies require the use of more complex equipment, and the data stored in the inspection information database is easy to be modified. The implementation of remote dynamic three-dimensional codes involves complex image processing and pattern recognition technologies. In actual situations, blockchain network storage can be used to improve the efficiency and security of item authentication. Summary of the invention
[0005] To solve the above problems, the present invention provides an object authentication method, system and storage medium based on a digital ID card to solve the problems in the prior art.
[0006] In order to achieve the above-mentioned invention object, the present invention proposes an object authentication method based on a digital ID card, comprising:
[0007] S1: Collecting data information of an object based on a preset tag, generating a digital ID card of the object based on the data information, constructing an encryption mode, and generating a first code corresponding to the digital ID card based on the encryption mode;
[0008] S2: Setting a storage node, generating a blockchain network based on the storage node, building a registration storage mode, dividing the first code based on the registration storage mode and sequentially storing the first code in the blockchain network, and generating verification data and combination data corresponding to the first code;
[0009] S3: Acquire data information of the item to be verified, set it as the data to be verified, construct a search pattern, search the storage node in the blockchain network based on the search pattern, set the search node based on the search result, generate a retrieval code corresponding to the data to be verified, generate a decryption key based on the encryption pattern and the search node, decrypt the retrieval code based on the decryption key, and generate the data to be analyzed;
[0010] S4: constructing an authentication mode, judging whether the data to be verified has been modified based on the authentication mode, the verification data, the combined data and the data to be analyzed, and generating a determination result, and completing the authentication of the object to be verified based on the determination result.
[0011] Further, generating the verification data corresponding to the first code includes the following steps:
[0012] The first code is divided into multiple first sub-codes based on a preset value, and the codes are transmitted to the storage nodes of the blockchain network in sequence. The identification information of all the storage nodes is counted to generate a first list, the first characteristic information and the first identifier corresponding to the first sub-code are respectively obtained, a two-dimensional code structure is set, the data information is embedded in the two-dimensional code based on the two-dimensional code structure, a first type of two-dimensional code is generated, a second code corresponding to the first type of two-dimensional code is generated based on the encryption mode, the second code is transmitted to the blockchain network, second characteristic information and a second identifier corresponding to the second code are generated, the storage node is marked based on the second identifier, the second identifier, the first characteristic information and the second characteristic information are combined into sub-verification data, and all sub-verification data are combined into the verification data based on the first list.
[0013] Further, generating the combined data corresponding to the first code comprises the following steps:
[0014] A third code for the verification data is generated based on the encryption mode, the third code is divided into multiple third sub-codes based on the preset value, and the codes are transmitted to the blockchain network in sequence, third characteristic information and a third identifier corresponding to the third sub-code are generated, the storage node is marked based on the third identifier, a fourth code corresponding to the third characteristic information is generated based on the encryption mode, a second list is generated based on the identification information for all the storage nodes marked with the third identifier, all fourth codes are combined with the first type of two-dimensional code based on a preset combination method to generate the combined data, wherein the preset combination method refers to a method in which the fourth code and the first type of two-dimensional code in the same storage node are sequentially merged.
[0015] Furthermore, generating the determination result comprises the following steps:
[0016] The data to be verified is embedded into a two-dimensional code based on the two-dimensional code structure to generate a second type of two-dimensional code, and a first decoding corresponding to the second type of two-dimensional code is generated based on the decryption key, and it is checked whether the first characteristic information exists in the first decoding. If so, the first sub-code corresponding to the first characteristic information is extracted and identified, and set as the sub-identification code, and all the sub-identification codes are combined and set as the retrieval code. The third sub-code is searched in the blockchain network based on the retrieval code. If the search hits the third sub-code, the sub-data corresponding to the third sub-code is obtained based on the decryption key, and all the sub-data are combined and set as the data to be analyzed. The fourth identifier of the data to be analyzed is obtained respectively, and the fourth identifier is compared with the mark corresponding to the storage node in the blockchain network based on the search pattern to see if they match. If they match, it is determined that the data to be verified has not been modified, and the determination result is set as authentication success. Otherwise, it is determined that the data to be verified has been modified, and the determination result is set as authentication failure.
[0017] Further, comparing the fourth identifier with the mark corresponding to the storage node in the blockchain network based on the search pattern to see whether they match includes the following steps:
[0018] Obtain all storage nodes contained in the second list and set them as the search nodes, obtain the identification information of the marked search nodes, combine the identification information in sequence based on the arrangement order of the search nodes in the second list, and generate an identification data group. If the identification data group is the same as the fourth identification, it is determined to be a match; otherwise, it is determined to be a mismatch.
[0019] Furthermore, a standard format is set, the data information is converted into formatted data based on the standard format, a unique identifier of the formatted data is created, and the unique identifier is integrated with the formatted data to generate the digital ID card.
[0020] Further, the generating a decryption key based on the encryption mode and the search node comprises the following steps:
[0021] Based on a preset algorithm, a first public key of the storage node is randomly generated, a second public key corresponding to the unique identifier is obtained, the first public key is encrypted based on the second public key to generate an encryption and decryption key, a public key and private key list is constructed, and it is determined whether the first public key stored in the search node exists in the public key and private key list. If so, a first private key corresponding to the first public key is obtained, and the encryption and decryption key is decrypted into the decryption key based on the first private key.
[0022] The present invention also provides an item authentication system based on a digital ID card, which is used to implement the above-mentioned item authentication method based on a digital ID card. The system mainly includes:
[0023] A data collection module, which collects data information of an object based on a preset tag, generates a digital ID card of the object based on the data information, constructs an encryption mode, and generates a first code corresponding to the digital ID card based on the encryption mode;
[0024] A data storage module, which sets storage nodes, generates a blockchain network based on the storage nodes, constructs a registration storage mode, divides the first code based on the registration storage mode and stores it in the blockchain network in sequence, and generates verification data and combination data corresponding to the first code;
[0025] A data identification module, which obtains data information of the item to be verified, sets it as the data to be verified, constructs a search pattern, searches for the storage node in the blockchain network based on the search pattern, sets the search node based on the search result, generates a retrieval code corresponding to the data to be verified, generates a decryption key based on the encryption pattern and the search node, decrypts the retrieval code based on the decryption key, and generates data to be analyzed;
[0026] The data authentication module constructs an authentication mode, determines whether the data to be verified has been modified based on the authentication mode, the verification data, the combined data and the data to be analyzed, generates a determination result, and completes the authentication of the object to be verified based on the determination result.
[0027] The present invention also provides a computer storage medium storing program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned object authentication method based on digital ID card.
[0028] Compared with the prior art, the beneficial effects of the present invention are at least as follows:
[0029] The present invention first encodes the data information of the object through an encryption mode, and then stores the first code and the reverse segmentation processing in the blockchain network through a registration storage mode, and generates verification data and combination data respectively, which can improve the security of the data information. Finally, the judgment result of the data to be verified is generated through a search mode and an authentication mode, which can improve the authentication accuracy of the data to be verified.
[0030] The present invention also constructs an encryption mode through storage nodes in the blockchain network, and generates a decryption key from a public key and a private key list, which can improve the confidentiality of blockchain network storage, and the workload of the encryption and decryption process is small. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flowchart of the steps of the object authentication method based on the digital ID card of the present invention;
[0032] Figure 2 This is a structural diagram of the article authentication system based on the digital ID card of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0034] It is understood that the terms "first", "second", etc. used in this application may be used herein to describe various elements, but unless otherwise specified, these elements are not limited by these terms. These terms are only used to distinguish a first element from another element. For example, without departing from the scope of this application, a first xx script may be referred to as a second xx script, and similarly, a second xx script may be referred to as a first xx script.
[0035] like Figure 1 As shown, the object authentication method based on the digital ID card includes:
[0036] S1: Collect data information of the object based on a preset tag, generate a digital ID card of the object based on the data information, build an encryption mode, and generate a first code corresponding to the digital ID card based on the encryption mode.
[0037] Specifically, in this embodiment, the preset label refers to a label type used to describe the information of an item in detail, including but not limited to item attributes, manufacturing information, circulation records, image information and timestamp, etc., the item refers to various items that need to ensure authenticity information, the data information refers to the information corresponding to the preset label, and the type of data information includes but is not limited to text characters and image types, and the digital ID card refers to an ID card that converts the data information of an item into a digital format, which is convenient for use and verification in a digital environment. The encryption mode refers to the method and rules used to encrypt data in cryptography. Different encryption modes will affect the security, performance and usage scenarios of the encrypted data. The first code is the coded characters generated by encrypting the digital ID card by the encryption mode. The encrypted digital ID card can ensure that the information of the item can be safely stored and transmitted even in a digital environment, while preventing unauthorized access and data leakage.
[0038] S2: Setting storage nodes, generating a blockchain network based on the storage nodes, building a registration storage mode, dividing the first code based on the registration storage mode and storing them in the blockchain network in sequence, and generating verification data and combination data corresponding to the first code.
[0039] Specifically, a storage node refers to a network node in a blockchain network, which is a computer or server used to participate in maintaining blockchain data. Each storage node can save a complete copy of the blockchain and participate in the data verification process of the blockchain network. The registration storage mode refers to the way of storing coded characters in a blockchain network. The first code can be divided and stored. The verification data and combined data refer to the data generated after the first code is stored in the blockchain network and undergoes different processing processes in the registration storage mode. Through the generation of verification data and combined data, the security of the first code in the blockchain network can be verified.
[0040] S3: Obtain data information of the item to be verified, set it as the data to be verified, build a search pattern, search for storage nodes in the blockchain network based on the search pattern, set the search node based on the search result, generate a retrieval code corresponding to the data to be verified, generate a decryption key based on the encryption pattern and the search node, decrypt the retrieval code based on the decryption key, and generate the data to be analyzed.
[0041] Specifically, in this embodiment, the item to be verified refers to an item whose data information needs to be verified for authenticity, and the data to be verified refers to a piece of data information of the item to be verified that needs to be verified. The search mode refers to the way of searching in the blockchain network when authenticating the authenticity of the data to be verified. By searching for the hit storage node in the blockchain network, i.e., the search node, the distribution of the storage nodes specifically involved in the data to be verified can be determined in turn. The retrieval code refers to the coded characters corresponding to the data to be verified generated by the search node, and the decryption key refers to the decryption method corresponding to the encryption in the encryption mode. By using the decryption key to decrypt the retrieval code in turn, the character data associated with the data to be verified can be obtained in the blockchain network, i.e., the data to be analyzed. The data to be analyzed is generated by searching the data to be verified in the blockchain network.
[0042] S4: Construct an authentication model, determine whether the data to be verified has been modified based on the authentication model, verification data, combined data and data to be analyzed, generate a determination result, and complete the authentication of the item to be verified based on the determination result.
[0043] Specifically, in this embodiment, the authentication mode refers to the process of determining the data to be verified based on the result of the search mode, wherein the result of the search mode is the verification data, the combined data, and the data to be analyzed. The authentication mode can be used to determine whether the data to be verified has been modified, that is, the authenticity of the data to be verified. The determination result refers to the result output by the authentication mode, including authentication success and authentication failure, and the authentication of the item to be verified can be completed.
[0044] As a preferred technical solution of the present invention, generating verification data corresponding to the first code includes the following steps:
[0045] The first code is divided into multiple first sub-codes based on a preset value, and the codes are transmitted to the storage nodes of the blockchain network in sequence. The identification information of all the storage nodes is counted to generate a first list, the first characteristic information and the first identifier corresponding to the first sub-code are respectively obtained, the QR code structure is set, the data information is embedded in the QR code based on the QR code structure, and a first type of QR code is generated. The second code corresponding to the first type of QR code is generated based on the encryption mode, the second code is transmitted to the blockchain network, the second characteristic information and the second identifier corresponding to the second code are generated, the storage node is marked based on the second identifier, the second identifier, the first characteristic information and the second characteristic information are combined into sub-verification data, and all the sub-verification data are combined into verification data based on the first list.
[0046] Specifically, in this embodiment, the preset value refers to the preset character size, the identification information refers to the node level and storage capacity of the storage node, the first list is used to record the identification information contained in the storage nodes stored by all the first sub-codes in the first code, the first characteristic information refers to the key characteristic characters of the first sub-code, and the first identifier refers to the hash value of the first sub-code, which can be generated by a hash algorithm. The QR code structure refers to setting the QR code type parameters, which can convert the data information into a format that can be recognized by the QR code and then embed it to generate a first type of QR code. The second code refers to the coded characters generated after the first type of QR code is encrypted and encoded by the encryption mode. Similarly, the second characteristic information refers to the key characteristic characters of the second code, and the second identifier refers to the hash value corresponding to the second code. When the second code is transmitted to the storage node of the blockchain network, the storage node is marked by the second identifier. The sub-verification data is generated by combining the characteristic information and the second identifier corresponding to the first sub-code and the second code. The verification data contains the information of all storage nodes involved in the first code and the second code.
[0047] As a preferred technical solution of the present invention, generating the combined data corresponding to the first code includes the following steps:
[0048] A third code for verification data is generated based on an encryption mode, the third code is divided into multiple third sub-codes based on a preset value, and the third sub-codes are transmitted to the blockchain network in sequence, third characteristic information and a third identifier corresponding to the third sub-code are generated, the storage node is marked based on the third identifier, a fourth code corresponding to the third characteristic information is generated based on the encryption mode, a second list is generated based on the identification information for all storage nodes marked with the third identifier, all fourth codes are combined with the first type of two-dimensional code based on a preset combination method, and combined data is generated, wherein the preset combination method refers to a method in which the fourth code and the first type of two-dimensional code in the same storage node are sequentially merged.
[0049] Specifically, in this embodiment, the third code corresponding to the verification data is divided into multiple third sub-codes based on the same preset value, and stored in the blockchain network in sequence. The corresponding storage node is marked by the hash value of the third sub-code, that is, the third identifier. The third characteristic information refers to the key characteristic characters of the third sub-code. The third characteristic information is encrypted to generate the fourth code. The second list is the distribution of all storage nodes included in the combined data, wherein the first list and the second list may have overlapping storage nodes.
[0050] As a preferred technical solution of the present invention, generating the determination result includes the following steps:
[0051] The data to be verified is embedded in the QR code based on the QR code structure to generate a second type of QR code, and a first decoding corresponding to the second type of QR code is generated based on the decryption key. It is checked whether the first characteristic information exists in the first decoding. If so, the first sub-code corresponding to the first characteristic information is extracted and identified, and set as the sub-identification code, and all sub-identification codes are combined and set as the retrieval code. The third sub-code is searched in the blockchain network based on the retrieval code. If the search hits the third sub-code, the sub-data corresponding to the third sub-code is obtained based on the decryption key, and all sub-data are combined and set as the data to be analyzed. The fourth identifier of the data to be analyzed is obtained respectively, and the fourth identifier is compared with the mark corresponding to the storage node in the blockchain network based on the search mode. If they match, it is determined that the data to be verified has not been modified, and the determination result is set as authentication success. Otherwise, it is determined that the data to be verified has been modified, and the determination result is set as authentication failure.
[0052] Specifically, in this embodiment, the step of generating the determination result also belongs to the process of combining the search mode and the authentication mode. The second type of two-dimensional code needs to be identified by the decryption key to generate the first decoding. If the first characteristic information exists in the first decoding, it means that the corresponding first sub-code exists in the data to be verified, that is, the sub-identification code. All the sub-identification codes are combined in sequence based on the first list to generate the retrieval code. If the retrieval code and the third sub-code overlap, it is determined that the search hits the third sub-code, and all the third sub-codes that are searched hit are combined into the data to be analyzed after generating sub-data based on the decryption key. The fourth identifier refers to the hash value corresponding to the data to be analyzed. The fourth identifier is used to compare the various identifiers marked by the storage node in the blockchain network to see if they match the fourth identifier, wherein the various identifiers marked by the storage node include the second identifier and the third identifier. If they match, it means that the data to be verified is the same as the data information of the item stored in the blockchain network, and the determination result of the item to be verified is authentication success. Otherwise, it means that the data to be verified is different from the data information of the item stored in the blockchain network, and the data to be verified is modified, and the corresponding determination result of the item to be verified is authentication failure.
[0053] As a preferred technical solution of the present invention, comparing whether the fourth identifier matches the mark corresponding to the storage node in the blockchain network based on the search mode includes the following steps:
[0054] Obtain all storage nodes contained in the second list and set them as search nodes, obtain the identification information of the marked search nodes, combine the identification information in sequence based on the arrangement order of the search nodes in the second list, and generate an identification data group. If the identification data group is the same as the fourth identification, it is determined to be a match; otherwise, it is determined to be a mismatch.
[0055] Specifically, in this embodiment, all storage nodes included in the second list are storage nodes whose data information of the item is processed in the encryption mode and the registration storage mode and is marked by the third identifier, so they are set as search nodes, and the identification information refers to the third identifier marked by each search node. After all the identification information is sequentially combined based on the second list, an identification data group can be generated. By comparing the identification data group with the fourth identifier, the matching result can be accurately determined.
[0056] As a preferred technical solution of the present invention, a standard format is set, data information is converted into formatted data based on the standard format, a unique identifier of the formatted data is created, and the unique identifier and the formatted data are integrated to generate a digital ID card.
[0057] Specifically, in this embodiment, the standard format refers to the data integration format used to construct a digital ID card, the formatted data refers to the data type generated after integrating the data information, and the unique identifier refers to a code or tag that can provide a unique identity for the data information of the item. The unique identifier allows each item to be accurately tracked and managed throughout the entire supply chain.
[0058] As a preferred technical solution of the present invention, generating a decryption key based on the encryption mode and the search node includes the following steps:
[0059] Based on a preset algorithm, a first public key of the storage node is randomly generated, a second public key corresponding to the unique identifier is obtained, the first public key is encrypted based on the second public key to generate an encryption and decryption key, a public key and private key list is constructed, and it is determined whether the first public key stored in the search node exists in the public key and private key list. If so, the first private key corresponding to the first public key is obtained, and the encryption and decryption key is decrypted into a decryption key based on the first private key.
[0060] Specifically, in this embodiment, the preset algorithm refers to an algorithm used for encryption, including but not limited to a hash algorithm and a hybrid encryption technology. The first public key refers to a publicly shareable key generated by a preset algorithm using the address information of the storage node in the blockchain network, applying a hash function to the unique identifier, and then using the hash value as the input of the second public key. The encryption and decryption key is generated by encrypting the first public key using the second public key based on multiple encryption. The public key and private key list refers to a data list consisting of the first public key and the corresponding private key. Each storage node has a corresponding first public key, and the search node belongs to the storage node. Therefore, it is determined whether the first public key stored in the search node exists in the public key and private key list. If it exists, it means that the search node is used to store various coded information. Therefore, the first private key corresponding to the first public key is obtained, and the encryption and decryption key is decrypted by the first private key to generate a decryption key.
[0061] like Figure 2 As shown, the present invention also provides an item authentication system based on a digital ID card, which is used to implement the above-mentioned item authentication method based on a digital ID card. The system mainly includes:
[0062] The data collection module collects data information of the object based on a preset tag, generates a digital ID card of the object based on the data information, constructs an encryption mode, and generates a first code corresponding to the digital ID card based on the encryption mode.
[0063] The data storage module sets storage nodes, generates a blockchain network based on the storage nodes, constructs a registration storage mode, divides the first code based on the registration storage mode and stores it in the blockchain network in sequence, and generates verification data and combination data corresponding to the first code.
[0064] The data identification module obtains data information of the item to be verified, sets it as the data to be verified, constructs a search pattern, searches for storage nodes in the blockchain network based on the search pattern, sets the search node based on the search result, generates a retrieval code corresponding to the data to be verified, generates a decryption key based on the encryption pattern and the search node, decrypts the retrieval code based on the decryption key, and generates the data to be analyzed.
[0065] The data authentication module constructs an authentication model, determines whether the data to be verified has been modified based on the authentication model, verification data, combined data and data to be analyzed, generates a determination result, and completes the authentication of the item to be verified based on the determination result.
[0066] The present invention also provides a computer storage medium storing program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the above-mentioned object authentication method based on digital ID card.
[0067] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.
[0068] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0069] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0070] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for those of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
[0071] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An object authentication method based on a digital ID card, characterized in that: The method comprises the following steps: S1: Collecting data information of an object based on a preset tag, generating a digital ID card of the object based on the data information, constructing an encryption mode, and generating a first code corresponding to the digital ID card based on the encryption mode; S2: Setting a storage node, generating a blockchain network based on the storage node, building a registration storage mode, dividing the first code based on the registration storage mode and sequentially storing the first code in the blockchain network, and generating verification data and combination data corresponding to the first code; The step of generating the verification data corresponding to the first code comprises the following steps: The first code is divided into a plurality of first sub-codes based on a preset value, and the sub-codes are sequentially transmitted to the storage nodes of the blockchain network, the identification information of all the storage nodes is counted to generate a first list, the first characteristic information and the first identifier corresponding to the first sub-code are respectively obtained, a two-dimensional code structure is set, the data information is embedded in the two-dimensional code based on the two-dimensional code structure, a first type of two-dimensional code is generated, a second code corresponding to the first type of two-dimensional code is generated based on the encryption mode, the second code is transmitted to the blockchain network, the second characteristic information and the second identifier corresponding to the second code are generated, the storage node is marked based on the second identifier, the second identifier, the first characteristic information and the second characteristic information are combined into sub-verification data, and all sub-verification data are combined into the verification data based on the first list; Generating the combined data corresponding to the first code comprises the following steps: Generate a third code for the verification data based on the encryption mode, divide the third code into multiple third sub-codes based on the preset value, transmit them to the blockchain network in sequence, generate third feature information and a third identifier corresponding to the third sub-code, mark the storage node based on the third identifier, generate a fourth code corresponding to the third feature information based on the encryption mode, generate a second list based on the identification information for all the storage nodes marked with the third identifier, combine all the fourth codes with the first type of two-dimensional code based on a preset combination method, and generate the combined data, wherein the preset combination method refers to a method in which the fourth code and the first type of two-dimensional code in the same storage node are sequentially combined; S3: Acquire data information of the item to be verified, set it as the data to be verified, construct a search pattern, search the storage node in the blockchain network based on the search pattern, set the search node based on the search result, generate a retrieval code corresponding to the data to be verified, generate a decryption key based on the encryption pattern and the search node, decrypt the retrieval code based on the decryption key, and generate the data to be analyzed; S4: constructing an authentication mode, judging whether the data to be verified has been modified based on the authentication mode, the verification data, the combined data and the data to be analyzed, and generating a determination result, and completing the authentication of the object to be verified based on the determination result.
2. The method according to claim 1, characterized in that The generating of the determination result comprises the following steps: The data to be verified is embedded into a two-dimensional code based on the two-dimensional code structure to generate a second type of two-dimensional code, and a first decoding corresponding to the second type of two-dimensional code is generated based on the decryption key, and it is checked whether the first characteristic information exists in the first decoding. If so, the first sub-code corresponding to the first characteristic information is extracted and identified, and set as the sub-identification code, and all the sub-identification codes are combined and set as the retrieval code. The third sub-code is searched in the blockchain network based on the retrieval code. If the search hits the third sub-code, the sub-data corresponding to the third sub-code is obtained based on the decryption key, and all the sub-data are combined and set as the data to be analyzed. The fourth identifier of the data to be analyzed is obtained respectively, and the fourth identifier is compared with the mark corresponding to the storage node in the blockchain network based on the search pattern to see if they match. If they match, it is determined that the data to be verified has not been modified, and the determination result is set as authentication success. Otherwise, it is determined that the data to be verified has been modified, and the determination result is set as authentication failure.
3. The method according to claim 2, characterized in that The comparing, based on the search pattern, whether the fourth identifier matches the mark corresponding to the storage node in the blockchain network comprises the following steps: Obtain all storage nodes contained in the second list and set them as the search nodes, obtain the identification information of the marked search nodes, combine the identification information in sequence based on the arrangement order of the search nodes in the second list, and generate an identification data group. If the identification data group is the same as the fourth identification, it is determined to be a match; otherwise, it is determined to be a mismatch.
4. The method according to claim 1, characterized in that A standard format is set, the data information is converted into formatted data based on the standard format, a unique identifier of the formatted data is created, and the unique identifier is integrated with the formatted data to generate the digital ID card.
5. The method according to claim 4, characterized in that The generating of the decryption key based on the encryption mode and the search node comprises the following steps: Based on a preset algorithm, a first public key of the storage node is randomly generated, a second public key corresponding to the unique identifier is obtained, the first public key is encrypted based on the second public key to generate an encryption and decryption key, a public key and private key list is constructed, and it is determined whether the first public key stored in the search node exists in the public key and private key list. If so, a first private key corresponding to the first public key is obtained, and the encryption and decryption key is decrypted into the decryption key based on the first private key.
6. An article authentication system based on a digital ID card, used to implement the method according to any one of claims 1 to 5, characterized in that: The system includes the following modules: A data collection module, which collects data information of an object based on a preset tag, generates a digital ID card of the object based on the data information, constructs an encryption mode, and generates a first code corresponding to the digital ID card based on the encryption mode; A data storage module is provided, a storage node is set, a blockchain network is generated based on the storage node, a registration storage mode is constructed, the first code is divided based on the registration storage mode and stored in the blockchain network in sequence, and verification data and combination data corresponding to the first code are generated; wherein, the first code is divided into multiple first sub-codes based on a preset value, and transmitted to the storage node of the blockchain network in sequence, the identification information of all the storage nodes is counted to generate a first list, the first feature information and the first identifier corresponding to the first sub-code are respectively obtained, a two-dimensional code structure is set, the data information is embedded in the two-dimensional code based on the two-dimensional code structure, a first type of two-dimensional code is generated, a second code corresponding to the first type of two-dimensional code is generated based on the encryption mode, the second code is transmitted to the blockchain network, the second feature information and the second identifier corresponding to the second code are generated, and the second feature information and the second identifier are marked based on the second identifier The storage node combines the second identifier, the first feature information and the second feature information into sub-verification data, and combines all the sub-verification data into the verification data based on the first list; generates a third code for the verification data based on the encryption mode, divides the third code into multiple third sub-codes based on the preset value, and transmits them to the blockchain network in sequence, generates third feature information and a third identifier corresponding to the third sub-code, marks the storage node based on the third identifier, generates a fourth code corresponding to the third feature information based on the encryption mode, generates a second list based on the identification information for all the storage nodes marked with the third identifier, and combines all the fourth codes with the first type of two-dimensional code based on a preset combination method to generate the combined data, wherein the preset combination method refers to a method in which the fourth code and the first type of two-dimensional code in the same storage node are sequentially combined; A data identification module, which obtains data information of the item to be verified, sets it as the data to be verified, constructs a search pattern, searches for the storage node in the blockchain network based on the search pattern, sets the search node based on the search result, generates a retrieval code corresponding to the data to be verified, generates a decryption key based on the encryption pattern and the search node, decrypts the retrieval code based on the decryption key, and generates data to be analyzed; The data authentication module constructs an authentication mode, determines whether the data to be verified has been modified based on the authentication mode, the verification data, the combined data and the data to be analyzed, generates a determination result, and completes the authentication of the object to be verified based on the determination result.
7. A computer storage medium, characterized in that: The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Remote dynamic three-dimensional code generation and authentication method based on two-dimensional code
CN105550881A
System and method for realizing article information detection by radio frequency identification and mobile communication combination
CN1588386B
A product quality authentication method and system based on a block chain technology
CN109685531A
Identity authentication method and device based on block chain, electronic equipment and readable medium
CN115618399A