A data processing method and apparatus

By using multi-center and decentralized architecture on the blockchain, mobile terminals synchronize blockchain information under the mobile network, solving the problem of certificate information verification when network connection is interrupted, achieving efficient offline certificate information validity verification, and protecting personal privacy.

CN111506632BActive Publication Date: 2025-05-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010327912.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-23
Publication Date
2025-05-27
Estimated Expiration
2040-04-23

AI Technical Summary

Technical Problem

When the network connection between the servers of the security department or other department and the online terminal equipment in the processing window is interrupted, the validity of the document information cannot be checked, especially if the name or household registration address of the document holder changes.

Method used

Using a multi-center and decentralized blockchain architecture, the mobile terminal synchronizes the block information on the blockchain under the mobile network to realize the validity of decentralized certificate information of offline devices in the event of network interruption. The specific method includes the first terminal obtaining the block information provided by the second terminal in an offline state, verifying the private key signature and timestamp using the stored public key to ensure the authenticity and validity of the information.

Benefits of technology

It realizes that the validity of certificate information can still be checked when the network connection is interrupted, improves the efficiency of validity of certificate information, and protects personal privacy through the decentralized architecture of blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111506632B_ABST
    Figure CN111506632B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a data processing method and apparatus. The method includes: a first terminal obtaining block information provided by a second terminal in an offline state; the block information being obtained by the second terminal from a blockchain and including a first private key signature, a first timestamp, and user verification information; the first terminal verifying the first private key signature using a stored first public key in the offline state, the first private key signature being a digital signature generated using a first private key corresponding to the first public key; the first terminal verifying the identity or document information of a target user using the user verification information when a target condition is met. In the embodiment of the present application, based on the multi-center and decentralized architecture of the blockchain, by synchronizing block information on the blockchain through a mobile terminal in a mobile network, it is possible to implement decentralized verification of the validity of document information for an offline device in the case of a network interruption with a server, greatly improving the efficiency of verifying the validity of document information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a data processing method and apparatus. Background Art

[0002] In the issue of how to prove "I am who I am", the resident identity card (hereinafter referred to as the identity card) has become the only verification method for humans. With the development and transformation of technology, the identity card, known as the only document for proving the identity of the holder, has also evolved from the initial population filling in modern times to various forms such as electronic identity cards and WeChat identity cards, greatly facilitating people's lives. Not only identity cards, but also documents such as passports and Hong Kong and Macau permits for proving the identity of the holder, the technology for parsing the above documents to verify the identity information of the document holder is also constantly progressing.

[0003] The commonly used method for currently verifying the identity information of the document holder is to conduct online verification through a terminal device connected to the server network. For example, when an individual handles business in a government department and needs to verify their identity, the handling window can identify the identity card through a terminal device or enter the identity card number, and relevant information about the identity card can be found on the server connected to the security department network. At this time, the latest information corresponding to the identity card can be seen on the terminal device at the handling window.

[0004] However, in the case where the network connection between the server of the security department or other departments and the online terminal device at the handling window is interrupted due to a fault, the above-mentioned business of verifying identity information cannot continue, because the name of the document holder may change, and the household registration address may also change. It is impossible to obtain the latest identity information of an individual for verification only with a document. Summary of the Invention

[0005] Embodiments of this application disclose a data processing method and apparatus. In this method, based on the multi-center and decentralized architecture of the blockchain, the block information on the blockchain can be synchronized through a mobile terminal in a mobile network, so as to realize the decentralized verification of the validity of document information by an offline device in the case of a network interruption with the server, greatly improving the efficiency of verifying the validity of document information.

[0006] Embodiments of this application provide a data processing method, and the method includes:

[0007] A first terminal obtains block information provided by a second terminal in an offline state; the block information is obtained by the second terminal from the blockchain and includes a first private key signature, a first timestamp, and user verification information; the first timestamp is the timestamp of the block header of the block information.

[0008] The first terminal verifies the first private key signature using the stored first public key in the offline state, where the first private key signature is a digital signature generated using the first private key corresponding to the first public key.

[0009] When the first terminal meets the target conditions, it verifies the identity or document information of the target user using the user verification information; the target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than the first threshold.

[0010] In this implementation, the first terminal can be a computer device commonly used at service windows such as a computer, and this computer device can be in an offline state. The second terminal can be a mobile device such as a mobile phone. The second terminal can synchronize the block information of the blockchain at any time through the mobile network. The obtained block information can be electronic document information such as personal ID cards, passports, and Hong Kong and Macao passports. This electronic document information is presented in ciphertext after encryption. Only the first terminal with the public key paired with the private key can decrypt and view the specific information, which can well protect personal privacy. Among them, the first private key signature is signed by relevant accounting nodes. This accounting node can represent some authoritative institutions that release information, such as government departments like the security department and the civil affairs department. The accounting node can encrypt and upload some dynamic information to the blockchain and also sign its own private key on this information. At the same time, the information with the digital signature of the accounting node is also consensus among other accounting nodes representing authoritative institutions, indicating that this information is a true and valid information witnessed by multiple parties. And when witnessing this information, they also sign their own digital signatures on the information. That is to say, the first private key signature is the signature of the authoritative institution. After the second terminal obtains the block information, it can generate a QR code or provide the block information to the first terminal in various ways such as Bluetooth and hotspot for information validity verification. At this time, even when the network connection between the first terminal and the server is interrupted, the first terminal can still verify the private key signature contained in the block information using the stored public key in the offline state. These can be completed relying on local cached data. In this way, it is possible to achieve decentralized validity verification of document information for offline devices when the network with the server is interrupted, greatly improving the efficiency of document information validity verification. The above first threshold is not a fixed value and varies in different application scenarios, which is determined by the first terminal according to the needs of handling business.

[0011] In the embodiment of the present application, based on the multi - center and decentralized architecture of the blockchain, the mobile terminal synchronizes the block information on the blockchain under the mobile network. According to whether the digital signature of the accounting node carried in the block information passes the verification and whether the difference between the timestamp of the block header and the current time is less than the target threshold, it is determined whether the block information synchronized by the terminal is true and reliable, so as to check the validity of the certificate information provided by the terminal, and realize the decentralized verification of the validity of the certificate information when the offline device is disconnected from the server network, which can greatly improve the efficiency of the verification of the validity of the certificate information.

[0012] The embodiment of the present application provides another data processing method, which includes:

[0013] The second terminal obtains block information from the blockchain. The block information includes a first private key signature, a first timestamp, and user verification information; the first timestamp is the timestamp of the block header of the block information.

[0014] The second terminal provides the block information to the first terminal. The block information is used for the first terminal to verify the identity or certificate information of the target user using the user verification information when meeting the target conditions. The target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than the first threshold.

[0015] In this implementation, the second terminal can be a mobile device such as a mobile phone. The second terminal can synchronize the block information of the blockchain at any time through the mobile network. The obtained block information can be electronic certificate information such as personal ID cards, passports, and Hong Kong - Macao permit cards. This electronic certificate information is presented in ciphertext after encryption, and only the first terminal with the public key paired with the private key can decrypt and view the specific information, which can well protect personal privacy. After obtaining the block information, the second terminal can generate a QR code or provide the block information to the first terminal in multiple ways such as Bluetooth and hotspot for information validity verification. At this time, even when the network connection between the first terminal and the server is interrupted, the first terminal can use the stored public key to verify the private key signature contained in the block information in the offline state, and these can be completed relying on the local cache data of the first terminal. In this way, the decentralized verification of the validity of the certificate information can be realized when the offline device is disconnected from the server network, greatly improving the efficiency of the verification of the validity of the certificate information. The above - mentioned first threshold is not a fixed value and varies in different application scenarios, which is determined by the first terminal according to the requirements of handling business.

[0016] In the embodiments of the present application, based on the multi - center and decentralized architecture of the blockchain, the first terminal synchronizes the block information on the blockchain in a mobile network. According to whether the block information carries the digital signature of the accounting node and whether the difference between the timestamp of the block header and the current time is less than the target threshold, the second terminal is used to confirm whether the block information synchronized by the first terminal is true and reliable, so as to verify the validity of the certificate information provided by the terminal. It can realize that the second terminal as an offline device can also perform decentralized verification of the validity of certificate information even when the network with the server is interrupted, which can greatly improve the efficiency of verifying the validity of certificate information.

[0017] The embodiments of the present application provide a data processing device, and the device includes:

[0018] An acquisition unit, configured to enable the first terminal to acquire the block information provided by the second terminal in an offline state; the block information is obtained by the second terminal from the blockchain and includes a first private key signature, a first timestamp, and user verification information; the first timestamp is the timestamp of the block header of the block information;

[0019] A verification unit, configured to enable the first terminal to verify the first private key signature by using the stored first public key in an offline state, where the first private key signature is a digital signature generated by using the first private key corresponding to the first public key;

[0020] The verification unit is further configured to enable the first terminal to verify the identity or certificate information of the target user by using the user verification information when the target conditions are met; the target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes the verification and the difference between the first timestamp and the current time is less than the first threshold.

[0021] In an optional implementation manner, the block information further includes a second public key;

[0022] The acquisition unit is further configured to enable the first terminal to acquire the block information and the second private key signature of the second terminal in an offline state; the second private key signature is a digital signature generated by the second terminal by using at least one of the first private key signature, the first timestamp, and the user verification information and the second private key of the second terminal, and the second public key is a public key matching the second private key; the target conditions further include that the second private key signature passes the verification of the second public key.

[0023] In an optional implementation manner, the device further includes:

[0024] A scanning unit, configured to scan the verification code provided by the second terminal in an offline state to obtain the block information; the verification code is generated by the second terminal according to the block information; the block information further includes a second timestamp when the second terminal generates the verification code; the target condition further includes: the difference between the second timestamp and the current time is less than a second threshold.

[0025] In an optional implementation manner, the apparatus further includes:

[0026] A determination unit, configured to determine, when the first terminal does not meet the target condition, that the block information is forged information of the second terminal.

[0027] An embodiment of the present application provides another data processing apparatus, and the apparatus includes:

[0028] An acquisition unit, configured to acquire block information from a blockchain by a second terminal, where the block information includes a first private key signature, a first timestamp, and user verification information; the first timestamp is the timestamp of the block header of the block information;

[0029] A providing unit, configured to provide the block information to a first terminal by the second terminal, where the block information is used for the first terminal to verify the identity or certificate information of a target user by using the user verification information when meeting a target condition, and the target condition includes that the first private key signature passes verification, and the difference between the first timestamp and the current time is less than a first threshold.

[0030] In an optional implementation manner, the block information further includes a second public key;

[0031] The providing unit is further configured to provide the block information and a second private key signature to the first terminal by the second terminal; the second private key signature is a digital signature generated by the second terminal by using at least one of the first private key signature, the first timestamp, and the user verification information and a second private key of the second terminal, the second public key is a public key matching the second private key, and the second public key is used for the first terminal to verify the second private key signature, and the target condition further includes: the second private key signature passes verification.

[0032] In an optional implementation manner, the apparatus further includes:

[0033] A generating unit, configured to generate a verification code by the second terminal according to the block information, where the block information further includes a second timestamp when the second terminal generates the verification code; the target condition further includes: the difference between the second timestamp and the current time is less than a second threshold;

[0034] The providing unit is further configured to enable the second terminal to provide the verification code to the first terminal, and the verification code is used to be scanned by the first terminal to obtain the block information.

[0035] In an alternative implementation, the first private key signature is the signature of an authoritative institution;

[0036] The providing unit is further configured to enable the second terminal to provide the user verification information and the second public key to the authoritative institution, and the block information is the information uploaded to the blockchain by the authoritative institution after verifying the user verification information and the second public key.

[0037] An embodiment of the present application provides a data processing device, including a processor and a memory; the processor is configured to support the data processing device to execute corresponding functions in the above data processing method. The memory stores necessary programs (instructions) and data of the data processing device. Optionally, the data processing device may further include an input / output interface for supporting communication between the data processing device and other devices.

[0038] An embodiment of the present application provides a computer-readable storage medium, which stores one or more instructions, and the one or more instructions are adapted to be loaded and executed by the processor to perform the above data processing method.

[0039] An embodiment of the present application provides a computer program product including instructions, which when running on a computer, causes the computer to execute the above data processing method.

[0040] An embodiment of the present application provides another data processing device, including a processor and a memory; the processor is configured to support the data processing device to execute corresponding functions in the above data processing method. The memory stores necessary programs (instructions) and data of the data processing device. Optionally, the data processing device may further include an input / output interface for supporting communication between the data processing device and other devices.

[0041] An embodiment of the present application provides another computer-readable storage medium, which stores one or more instructions, and the one or more instructions are adapted to be loaded and executed by the processor to perform the data processing method as described above.

[0042] An embodiment of the present application provides another computer program product including instructions, which when running on a computer, causes the computer to execute the above data processing method.

[0043] In this application, based on the multi - center and decentralized architecture of the blockchain, the mobile terminal synchronizes the block information on the blockchain under the mobile network. According to whether the block information carries the digital signature of the accounting node and whether the difference between the timestamp of the block header and the current time is less than the target threshold, it is determined whether the block information synchronized by the terminal is authentic and reliable, thereby verifying the validity of the certificate information provided by the terminal. This enables decentralized verification of the validity of certificate information in the case of a network interruption between the offline device and the server, which can greatly improve the efficiency of verifying the validity of certificate information. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the following will briefly introduce the drawings required to be used in the embodiments of the present application or the background technology. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0045] Figure 1 Flow diagram of a data processing method provided by an embodiment of the present application;

[0046] Figure 2 Flow diagram of another data processing method provided by an embodiment of the present application;

[0047] Figure 3 Flow diagram of yet another data processing method provided by an embodiment of the present application;

[0048] Figure 4 Interaction flow diagram of a data processing method provided by an embodiment of the present application;

[0049] Figure 5 Structural diagram of a data processing device provided by an embodiment of the present application;

[0050] Figure 6 Structural diagram of another data processing device provided by an embodiment of the present application;

[0051] Figure 7 Structural diagram of a terminal provided by an embodiment of the present application;

[0052] Figure 8 Structural diagram of another terminal provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0053] To enable those skilled in the art to better understand the solutions of the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments.

[0054] The terms "first", "second", "third", etc. in the description embodiments, claims and the above-mentioned accompanying drawings of the present application are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or priority. The terms "including" and "having" in the description embodiments and claims of the present application and any variations thereof are intended to cover non-exclusive inclusion. For example, a method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0055] Referring to "embodiments" herein means that specific features, structures, or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0056] The embodiments of the present application provide a data processing method. To describe the solution of the present application more clearly, some knowledge related to blockchain data processing will be introduced first below.

[0057] Block: A block is a container that aggregates transaction information in a blockchain. It consists of a block header containing metadata and a long string of transactions following it that make up the block body. The block header is 80 bytes, and on average each transaction is at least 250 bytes, and on average each block contains at least more than 500 transactions.

[0058] Block height: Block height is another way to identify a block by its position in the blockchain. The first block has a height of 0. Each subsequent block stored above the first block is "higher" by one position in the blockchain, just like boxes stacked one on top of the other. Different from the block header hash value, the block height is not a unique identifier. During the growth of the blockchain, there may be two or more blocks with the same height, and this situation is called "blockchain fork".

[0059] Hash: Generally translated as "hash", and sometimes directly transliterated as "Hash". It means that an input of any length (also called pre - mapping) is transformed into an output of a fixed length through a hashing algorithm. This output is the hash value. This transformation is a compression mapping. That is, the space of hash values is usually much smaller than the space of the input. Different inputs may hash to the same output, so it is impossible to uniquely determine the input value from the hash value. Simply put, it is a function that compresses a message of any length into a message digest of a certain fixed length.

[0060] The embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application.

[0061] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a data processing method provided by the embodiments of the present application.

[0062] 101. The first terminal obtains the block information provided by the second terminal in an offline state.

[0063] The blockchain has two basic characteristics. First, some accounting nodes on the chain can upload information about some dynamic transactions to the chain. This information about dynamic transactions may be encrypted according to business requirements. At the same time, this information will be signed with the digital signature of the accounting node, indicating that the accounting node is responsible for this transaction behavior. The block information on the chain can also be consensus among multiple accounting nodes, and the consensus block information will also be signed with the respective digital signatures of the accounting nodes that have participated in the consensus, representing that the transaction information in this block is real information witnessed by multiple parties. In addition, the block information will also carry the timestamp published by the accounting node on the chain, and this timestamp is stored in the block header. Second, the block information on the chain can be synchronously obtained by multiple participating parties through the mobile network. If the block information obtained by synchronization carries the digital signature of the accounting node, it indicates that this block information is real.

[0064] In this embodiment, the first terminal may be an offline terminal device such as a computer with a camera. This offline terminal device needs to be able to communicate with the second terminal in some way to achieve data synchronization. The second terminal can store the block information in the verification code in an encoded form and then provide the block information to the first terminal in the form of the verification code. The verification code here can be verification codes in various forms such as two-dimensional codes, barcodes, digital codes, etc. Taking the two-dimensional code as an example, the first terminal can use the camera to collect the block information in the two-dimensional code. After the first terminal obtains the block information provided by the second terminal, it performs mathematical signature verification through the local offline computer device to verify the timestamp of the block header and the first private key signature of the accounting node, which can be completed relying on the local cached data. Secondly, the first terminal is not limited to being a computer with a camera because there are various ways for the first terminal to communicate with the second terminal to achieve data synchronization. It can also communicate through Bluetooth, hotspot, near-field communication, etc. to obtain the block information provided by the second terminal and check the validity of the information. Among them, the block information is used to provide the first terminal with the identity or certificate information of the user bound to the second terminal. The block information includes information for proving that the block information is not forged by the second terminal and the timestamp of the block header. Specifically, the block information can be electronic certificate information such as personal ID cards, passports, and Hong Kong and Macau travel permits. The electronic certificate information is presented in ciphertext after encryption, and only the first terminal with the public key paired with the private key can decrypt and view the specific information, so as to protect personal privacy well. For example, when a user goes to a government department to handle business, they need to provide their identity certificate. Under normal circumstances, the user only needs to provide a personal ID card, and the handling window can view all the latest information of the user, such as the change records of their name and household registration address, by scanning the ID card or entering the ID number on the device connected to the security department's network. However, in the case where the network connection between the device at the handling window and the security department fails, it is impossible to accurately obtain all the latest information of the user only relying on the physical ID card. In the above situation, the user can synchronize the block information related to themselves on the blockchain through their mobile phone. These information related to the user are published on the blockchain by accounting nodes representing authoritative institutions such as government departments, and each time there is a modification, corresponding updates will be made on the chain, and the block information on the chain is encrypted, and the block information synchronized to the mobile phone is also presented in ciphertext. Only the first terminal with the public key paired with the private key or the relevant department representing the accounting node can decrypt and view it.

[0065] 102. The first terminal verifies the first private key signature using the stored first public key in the offline state.

[0066] Specifically, the block information obtained by the first terminal includes a first private key signature, a first timestamp, and user verification information. The first private key signature is the digital signature of the accounting nodes representing the authoritative institution on the blockchain. These accounting nodes can upload information on some dynamic transactions to the blockchain. The information on these dynamic transactions may be encrypted according to business requirements. At the same time, this information will be signed with the digital signature of the accounting node, indicating that the accounting node is responsible for this transaction behavior. The block information on the blockchain can also be consensus among multiple accounting nodes. The consensus block information will also be signed with the respective digital signatures of the consensus accounting nodes, indicating that the transaction information in this block is real information witnessed by multiple parties. In addition, the block information will also carry the timestamp published by the accounting node on the blockchain. This timestamp is stored in the block header. The above-mentioned first timestamp is the timestamp published by the accounting node on the blockchain. In addition, the user verification information is the identity or document information of the user bound to the second terminal. On the other hand, the first terminal stores the public keys of the authoritative institution (such as government agencies) locally. These public keys are all public keys that match the private key signatures of the accounting nodes representing the authoritative institution. Therefore, even when the first terminal is in an offline state, it can use the stored first public key to verify the first private key signature in the block information. The first private key signature is a digital signature generated using the first private key corresponding to the first public key, so the verification can pass. In some embodiments, the first terminal stores the root certificate of the authoritative institution locally. The root certificate contains the public key of the authoritative institution.

[0067] 103. When the first terminal meets the target conditions, it uses the user verification information to verify the identity information or document information of the target user.

[0068] When the first terminal meets the target conditions, it will use the user verification information included in the block information to verify the identity information or document information of the target user. Here, the target user refers to the user bound to the second terminal, and the user verification information is naturally the personal information related to the user bound to the second terminal. The target conditions are that the first private key signature included in the block information passes the verification and the difference between the first timestamp and the current time is less than the first threshold. The first private key signature passing the verification means that the first terminal has a first public key paired with the first private key and uses the stored first public key to verify the first private key signature, and then the verification passes, indicating that the block information is consensus by the accounting nodes on the blockchain and is real. The difference between the first timestamp and the current time being less than the first threshold means that the time when the accounting node publishes on the blockchain and the current time are less than a specific value. This value is called the first threshold, which is used to avoid the possibility that the second terminal forges the block information using the time difference. The first threshold is not a fixed value and varies in different application scenarios, which is determined by the first terminal according to the requirements of handling business.

[0069] Optionally, the target condition may further include other specific conditions. For example, in addition to directly obtaining block information from the blockchain, there is also a possibility that the second terminal obtains block information through a third-party terminal device. To avoid the problem of the second terminal forging the content of the block information in this case, at this time, the block information also includes a second public key. At the same time, the second terminal also provides a second private key signature to the first terminal. The second private key signature is a digital signature generated by the second terminal using at least one of the first private key signature, the first timestamp, and the user authentication information and the second private key of the second terminal or a digital signature generated by the second terminal using the second private key. Therefore, the second private key signature indicates that the block information obtained by the second terminal is the same as the block information in the blockchain and is not forged by the second terminal. In the above case, the first terminal verifies the second private key signature using the second public key in an offline state. If the verification passes, it indicates that the block information is true. Therefore, in this scenario, the target condition may further include the condition that the first terminal verifies the second private key signature through the second public key. By expanding this target condition, the diversity of the ways for the second terminal to obtain block information can be further broadened. At the same time, the problem of the possibility of forged block information obtained through the expanded ways is also avoided, greatly improving the efficiency of the first terminal in verifying the validity of the certificate information.

[0070] Optionally, the target condition may further include other specific conditions. For example, the second terminal provides the obtained block information to the first terminal for verification in the form of a QR code to protect the privacy and security of the block information during the transmission process. At this time, the block information also includes the timestamp when the second terminal generates the QR code. To avoid the possibility of the QR code provided by the second terminal forging the block information using the time difference, in this scenario, it is necessary to further require the target condition, that is, the target condition should also satisfy the condition that the difference between the second timestamp and the current timestamp is less than a second threshold. The second threshold is not a fixed value and is different in different application scenarios, which is determined by the first terminal according to the needs of handling the business. In this way, the verification dimension of the block information can be more comprehensive, making the verification result of the block information more credible.

[0071] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another data processing method provided by an embodiment of the present application.

[0072] 201. The second terminal obtains block information of the blockchain.

[0073] The second terminal can be a mobile terminal device such as a mobile phone or a tablet. This mobile terminal device needs to be able to communicate with the first terminal in some way to achieve data synchronization. The first terminal can be an offline terminal device such as a computer with a camera. The second terminal obtains block information by synchronizing with the blockchain. This block information includes a first private key signature, a first timestamp, and user verification information. Among them, the first private key signature is a digital signature signed after the block information is consensus by the accounting nodes on the blockchain. The first timestamp is the time when the accounting node publishes the block information on the blockchain. The user verification information is personal information related to the user bound to the second terminal. Optionally, the block information can also include a second private key signature and a second public key. The second private key signature is a digital signature generated by the second terminal using at least one of the first private key signature, the first timestamp, and the user verification information and the second private key of the second terminal. The second public key is a public key matching the second private key. Optionally, the block information can also include a second timestamp. The second timestamp is the timestamp when the second terminal generates a verification code based on the block information.

[0074] 202. The second terminal stores the block information and generates a verification code containing the block information.

[0075] If the second terminal wants to provide the block information to the first terminal for information validity verification, it must first obtain the block information of the blockchain when there is a mobile network on the second terminal. To avoid the situation where the second terminal cannot obtain the block information of the blockchain when the mobile network is lost, after the second terminal obtains the block information of the blockchain through the mobile network, it can be stored in the local verification code in an encoded form. In this way, even when the mobile network signal of the second terminal is interrupted, the block information can be provided to the first terminal for information validity verification, as long as the block information obtained by the second terminal is updated to a time point considered to have sufficient timeliness by the service window, or the time point when the second terminal generates the verification code reaches a time point considered to have sufficient timeliness by the service window. Therefore, whether there is a mobile network on the second terminal is irrelevant when performing information validity verification. The verification code here can be in various forms such as a QR code, a barcode, a digital code, etc. In the above situation, the application scenario range of the first terminal is further broadened, and the efficiency of certificate information validity verification is greatly improved. On the other hand, by storing the obtained block information in the verification code in an encoded form and then providing it to the first terminal, the second terminal can improve the privacy and security of the block information.

[0076] 203. The second terminal provides the above verification code to the first terminal.

[0077] It should be understood that steps 202 and 203 are an example of the second terminal providing block information to the first terminal. The second terminal can also provide the block information to the first terminal through Bluetooth connection and other means, which is not limited in this application.

[0078] 204. The first terminal determines whether the first private key signature in the block information passes the verification.

[0079] After the second terminal provides the block information to the first terminal, the first terminal will make several judgments on the block information. In this implementation, the first terminal will make four main judgments on the block information, namely steps 204, 205, 206, and 207. The above four steps can have various different sequential relationships in terms of judgment order, or can be in a relationship of simultaneous judgment. As long as this judgment is executed, this solution can be implemented, which has no direct relationship with the judgment order. In this step, the first terminal will decrypt it with the public key paired with the private key, that is, use the stored first public key to verify the first private key signature, and determine whether the first private key signature passes the verification. If the first private key signature passes the verification, it is considered that the block information is the information consensus by the accounting nodes and actually exists. Therefore, when the results of the other three judgments are all yes, it can be confirmed that the block information is valid information, that is, execute the following step 208; if the first private key signature verification fails, it can be considered that the block information has not been consensus by the accounting nodes representing the authoritative department, and there is a possibility that the second terminal forges the block information. Therefore, without the results of the other judgments being yes, it can be confirmed that the block information is invalid information, that is, execute the following step 209.

[0080] 205. The first terminal determines whether the difference between the first timestamp in the block information and the current time is less than the threshold.

[0081] After the second terminal provides the block information to the first terminal, in addition to determining whether the first private key signature in the block information passes the verification, the first terminal can also determine whether the difference between the first timestamp in the block header and the current time is less than a threshold. Specifically, when the accounting node encrypts and uploads information to the blockchain, a timestamp will also be included in the block header of the blockchain, indicating the time point when the transaction occurred. The block information synchronized by the second terminal also contains the information of this timestamp, which is temporarily called the first timestamp. If the difference between the first timestamp and the current business handling time is less than the first threshold, it can be considered that the block information synchronized by the terminal is the latest information and is trustworthy. The above first threshold is different in different application scenarios and depends on the requirements of business handling. If the difference between the first timestamp in the block header and the current time is less than the first threshold, and the other three judgment results are all yes, then the above block information can be confirmed as valid information, that is, execute step 208 below; if the difference between the first timestamp in the block header and the current time is not less than the first threshold, then without the other three judgment results being yes, the above block information can be confirmed as invalid information, that is, execute step 209 below.

[0082] 206. The first terminal determines whether the second private key signature passes the verification.

[0083] After the second terminal provides the block information to the first terminal, in addition to determining whether the first private key signature passes the verification and whether the difference between the first timestamp and the current time is less than the first threshold, the first terminal can also determine whether the second private key signature passes the verification. Because the block information can also include a second public key, and the second terminal will also provide the second private key signature to the first terminal. The second private key signature is a digital signature generated by the second terminal using at least one of the first private key signature, the first timestamp, and the user verification information and the second private key of the second terminal. The second public key is a public key that matches the second private key. Therefore, the first terminal can also determine whether the second private key signature passes the verification. If the second private key signature passes the verification, it indicates that the block information is not forged by the second terminal. If the other three judgment results are all yes, then the above block information can be confirmed as valid information, that is, execute step 208 below; if the second private key signature fails to pass the verification, then without the other three judgment results being yes, the above block information can be confirmed as invalid information, that is, execute step 209 below.

[0084] 207. The first terminal determines whether the difference between the second timestamp and the current time is less than the threshold.

[0085] After the second terminal provides the block information to the first terminal, in addition to determining whether the first private key signature passes verification, whether the difference between the first timestamp and the current time is less than the first threshold, and whether the second private key signature passes verification, the first terminal can also determine whether the difference between the second timestamp and the current time is less than the threshold. Since the first terminal scans the verification code provided by the second terminal in an offline state to obtain the block information, the block information may also include the second timestamp when the second terminal generates the verification code. Therefore, the first terminal can also determine whether the difference between the second timestamp and the current time is less than the second threshold. The above-mentioned second threshold varies in different application scenarios and depends on the requirements for handling business. If the difference between the second timestamp and the current time is less than the second threshold, and the other three judgment results are all yes, then it can be confirmed that the above block information is valid information, that is, the following step 208 is executed; if the difference between the second timestamp and the current time is not less than the second threshold, then without the other three judgment results being yes, it can be confirmed that the above block information is invalid information, that is, the following step 209 is executed.

[0086] 208. The first terminal confirms that the above block information is valid information.

[0087] Under the condition that the four judgment results of the first terminal in the above steps 204, 205, 206, and 207 are all yes, the first terminal confirms that the block information is valid information.

[0088] 209. The first terminal confirms that the above block information is invalid information.

[0089] Under the condition that any one of the four judgment results of the first terminal in the above steps 204, 205, 206, and 207 is not yes, it is confirmed that the block information is invalid information.

[0090] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another data processing method provided by an embodiment of the present application.

[0091] 301. The second terminal obtains block information from the blockchain.

[0092] Same as the above step 201.

[0093] 302. The second terminal generates a verification code according to the block information.

[0094] After the second terminal obtains the block information, it stores the content of the block information in the verification code in an encoded form. This verification code is used to provide to the first terminal for verification. In this way, the block information synchronized by the second terminal such as a mobile phone is also presented in ciphertext. Only the first terminal with the public key paired with the private key or the first terminal such as the relevant department representing the accounting node can decrypt and view it, which improves the privacy and security of user information. The verification code can be a verification code in various forms such as a QR code, a barcode, or a digital code.

[0095] On the other hand, for the situation where the network signal is interrupted after the second terminal obtains the block information of the blockchain, the second terminal will store the obtained block information of the blockchain in an encoded form in the second verification code, and then provide the second verification code to the first terminal for verification. In this way, the problem that the first terminal cannot provide the block information due to a network signal failure can be solved.

[0096] Optionally, the second terminal can also obtain the block information in the blockchain multiple times at different times. For example, after the second terminal obtains the block information of the blockchain, the second terminal obtains the block information of the blockchain again according to the scenario needs. Among them, the timestamp included in the block information obtained later is different from the timestamp included in the block information obtained previously. In this scenario, if the content of the latter block information is different from that of the former block information, the second terminal updates the latter block information to the obtained block information. In this way, it can be ensured that the information obtained by the second terminal is always the latest valid information, which improves the success rate of verifying that the information is true.

[0097] 303. The second terminal provides the verification code to the first terminal.

[0098] After the second terminal obtains the block information, it can store the above block information in a two-dimensional code and then provide the two-dimensional code to the first terminal for information validity verification. It can also be provided to the first terminal for information validity verification through various methods such as Bluetooth and hotspot. Under normal circumstances, the device at the handling window is connected to the background server of government departments such as the security department through the network, and the latest information associated with the user can be queried through the server. However, when the network connection between the device and the server is interrupted, the above verification method fails. At this time, the first terminal can be a set of offline devices at the handling window. If the second terminal provides the block information to the first terminal in the form of a two-dimensional code, the first terminal can be an offline computer with a camera. At this time, even when the network connection between the first terminal and the server is interrupted, the first terminal can also verify the private key signature included in the above block information through the public key paired with the private key, and verify the timestamp of the block header and the digital signature of the accounting node through mathematical signature verification. These can be completed relying on local cached data. In this way, decentralized certificate information validity verification can be realized for offline devices when the network with the server is interrupted, greatly improving the efficiency of certificate information validity verification.

[0099] Please refer to Figure 4 , Figure 4 which is a schematic diagram of the interaction process of a data processing method provided by an embodiment of the present application.

[0100] From Figure 4It can be seen that this figure shows the interaction process among the blockchain, the first terminal, and the second terminal. Among them, the first terminal can be an offline terminal device such as a computer with a camera, such as an office computer at the service windows of the security department, the civil affairs department, etc. The second terminal can be a mobile terminal device such as a mobile phone or a tablet. This mobile terminal device needs to be able to communicate with the first terminal and the blockchain in some way to achieve data synchronization. First, when the second terminal needs to provide a certain credential to the first terminal to prove its identity, the second terminal sends a request to synchronize block information to the blockchain (step 401 in the figure), thereby obtaining the block information belonging to the second terminal (step 402 in the figure). This block information includes the first private key signature, the first timestamp, and user verification information. Among them, the first private key signature is the digital signature of the accounting node on the blockchain after the accounting node has reached a consensus on this block information, indicating that this block information has been verified as true information by multiple parties. The first timestamp is the timestamp when the accounting node publishes this block information on the blockchain. The user verification information is the identity or document information of the user bound to the second terminal. Optionally, this block information can also include the second public key, and the second terminal will also provide the second private key signature to the first terminal. This second private key signature is a digital signature generated by the second terminal using at least one of the first private key signature, the first timestamp, and the user verification information, as well as the second private key of the second terminal. This second public key is the public key matching the second private key. Optionally, this block information can also include the second timestamp, and this second timestamp is the timestamp when the second terminal generates the verification code. After obtaining the block information, the second terminal stores the block information in the verification code in an encoded form for privacy and security considerations, generates the verification code (step 403 in the figure). This verification code can be a verification code in various forms such as a QR code, a barcode, or a digital code. Then the second terminal provides this verification code to the first terminal (step 404 in the figure) to check the validity of this block information. The first terminal scans and analyzes this verification code (step 405) to obtain the above block information. Furthermore, the second terminal will judge the validity of this block information, that is, judge whether the digital signature included in the block information passes the verification and whether the difference between the timestamp included in the block information and the current time is less than the threshold (step 406 in the figure). The specific method is that the first terminal uses the stored first public key to verify the first private key signature in the offline state, and judges whether the difference between the first timestamp and the current time is less than the first threshold. This first threshold is not a fixed value and is different in different application scenarios, and is determined by the first terminal according to the needs of handling business. Optionally, the first terminal can also use the second public key to verify the second private key signature in the offline state, and judge whether the difference between the second timestamp and the current time is less than the second threshold. This second threshold is not a fixed value and is different in different application scenarios, and is determined by the first terminal according to the needs of handling business.Finally, the first terminal will confirm the validity of the block information according to the foregoing judgment (step 407 in the figure). Specifically, if the first terminal uses the stored first public key to verify that the first private key signature passes in the offline state and the difference between the first timestamp and the current time is less than the first threshold, it is confirmed that the block information is valid information, that is, it is not forged by the second terminal. If the first terminal uses the stored first public key to verify that the first private key signature fails or the difference between the first timestamp and the current time is not less than the first threshold in the offline state, it is confirmed that the block information is invalid information, that is, it is forged by the second terminal. Optionally, the judgment result can also be that if the first terminal uses the stored first public key to verify that the first private key signature passes and uses the second public key to verify that the second private key signature passes, and the difference between the first timestamp and the current time is less than the first threshold and the difference between the second timestamp and the current time is less than the second threshold, it is confirmed that the block information is valid information, that is, it is not forged by the second terminal. If the first terminal uses the stored first public key to verify that the first private key signature fails or uses the second public key to verify that the second private key signature fails, or the difference between the first timestamp and the current time is not less than the first threshold or the difference between the second timestamp and the current time is not less than the second threshold, it is confirmed that the block information is invalid information, that is, it is forged by the second terminal.

[0101] The method of the embodiment of the present application is described in detail above, and the device of the embodiment of the present application is provided below.

[0102] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of a data processing device provided by an embodiment of the present application. The device includes: an acquisition unit 51, a verification unit 52, a scanning unit 53, and a determination unit 54. Among them:

[0103] The acquisition unit 51 is used for the first terminal to acquire the block information provided by the second terminal in the offline state; the above block information is obtained by the second terminal from the blockchain and includes the first private key signature, the first timestamp, and the user verification information; the above first timestamp is the timestamp of the block header of the above block information;

[0104] The verification unit 52 is used for the first terminal to verify the first private key signature by using the stored first public key in the offline state, and the first private key signature is a digital signature generated by using the first private key corresponding to the first public key;

[0105] The above verification unit 52 is further used for the first terminal to verify the identity or certificate information of the target user by using the user verification information when meeting the target conditions; the target user is the user bound by the second terminal, and the target conditions include that the first private key signature passes the verification and the difference between the first timestamp and the current time is less than the first threshold.

[0106] In an alternative implementation, the above block information further includes a second public key; the obtaining unit 51 is further configured to obtain, by the first terminal in an offline state, the above block information and the second private key signature of the second terminal; the second private key signature is a digital signature generated by the second terminal using at least one of the above first private key signature, the above first timestamp, and the above user authentication information and the second private key of the second terminal, and the second public key is a public key matching the second private key; the target condition further includes: the second private key signature passes the verification of the second public key.

[0107] In an alternative implementation, the above device further includes:

[0108] A scanning unit 53, configured to scan, in an offline state, a verification code provided by the second terminal to obtain the above block information; the verification code is generated by the second terminal according to the above block information; the above block information further includes a second timestamp when the second terminal generates the verification code; the target condition further includes: the difference between the second timestamp and the current time is less than a second threshold.

[0109] In an alternative implementation, the above device further includes:

[0110] A determining unit 54, configured to determine, when the first terminal does not meet the above target condition, that the above block information is forged information of the second terminal.

[0111] According to the embodiments of the present application, Figure 1 、 Figure 2 and Figure 4 each step involved in the method executed by the first terminal in Figure 5 can be executed by each unit in the device shown in Figure 1 For example, Figure 5 101 shown in Figure 2 is executed by Figure 5 51 shown in

[0112] According to the embodiments of the present application, Figure 5Each unit in the device shown can be separately or all combined into one or several other units to form, or a certain (some) unit among them can also be further split into multiple smaller units in terms of function to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of this application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of this application, other units can also be included based on the first terminal. In practical applications, these functions can also be assisted by other units and can be realized through the cooperation of multiple units.

[0113] Please refer to Figure 6 , Figure 6 which is a schematic structural diagram of another data processing device provided by an embodiment of this application. The device includes: an acquisition unit 61, a providing unit 62, and a generating unit 63. Among them:

[0114] The acquisition unit 61 is used for the second terminal to acquire block information from the blockchain. The above block information includes a first private key signature, a first timestamp, and user verification information; the above first timestamp is the timestamp of the block header of the above block information;

[0115] The providing unit 62 is used for the second terminal to provide the above block information to the first terminal. The above block information is used for the first terminal to verify the identity or certificate information of the target user using the above user verification information when the target conditions are met. The above target conditions include that the above first private key signature passes the verification, and the difference between the above first timestamp and the current time is less than a first threshold.

[0116] In an optional implementation manner, the above block information further includes a second public key; the providing unit 62 is further used for the second terminal to provide the above block information and a second private key signature to the above first terminal; the above second private key signature is a digital signature generated by the second terminal using at least one of the above first private key signature, the above first timestamp, and the above user verification information and the second private key of the second terminal. The above second public key is a public key matching the above second private key, and the above second public key is used for the first terminal to verify the above second private key signature. The above target conditions further include: the above second private key signature passes the verification.

[0117] In an optional implementation manner, the above device further includes:

[0118] The generating unit 63 is used for the second terminal to generate a verification code according to the above block information. The above block information further includes a second timestamp when the above second terminal generates the above verification code; the above target conditions further include: the difference between the above second timestamp and the current time is less than a second threshold;

[0119] The above-mentioned providing unit 62 is further configured to enable the second terminal to provide the verification code to the first terminal, and the verification code is used to be scanned by the first terminal to obtain the block information.

[0120] In an alternative implementation, the first private key signature is the signature of an authoritative institution; the providing unit 62 is further configured to enable the second terminal to provide the user verification information and the second public key to the authoritative institution, and the block information is the information uploaded to the blockchain by the authoritative institution after verifying the user verification information and the second public key.

[0121] According to the embodiments of the present application, Figure 2 、 Figure 3 and Figure 4 each step involved in the method executed by the second terminal in Figure 6 can be executed by each unit in the device shown in Figure 2 For example, Figure 6 201 shown in Figure 3 is executed by 61 shown in Figure 6 ;

[0122] According to the embodiments of the present application, Figure 6 each unit in the device shown in

[0123] can be separately or wholly combined into one or several other units to form, or a certain (some) unit can be further split into multiple smaller units with functional division to form, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above units are divided based on logical functions. In practical applications, the function of one unit can also be realized by multiple units, or the functions of multiple units can be realized by one unit. In other embodiments of the present application, based on the second terminal, other units may also be included. In practical applications, these functions can also be assisted by other units and can be realized by the cooperation of multiple units.

[0123] Based on the description of the above method embodiments and device embodiments, the embodiments of the present application provide a structural schematic diagram of a terminal. As shown in Figure 7As shown, the terminal 700 corresponds to the first terminal in the foregoing embodiment. The terminal 700 may include: at least one processor 701, such as a CPU, at least one network interface 704, a user interface 703, a memory 705, and at least one communication bus 702. Among them, the communication bus 702 is used to implement connection communication between these components. Among them, the user interface 703 may include a display screen and an input device. Optionally, the user interface 703 may further include a standard wired interface and a wireless interface. The network interface 704 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 705 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. Optionally, the memory 705 may further be at least one storage device located far from the foregoing processor 701. As Figure 7 shown, the memory 705, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.

[0124] In Figure 7 the terminal 700 shown, the network interface 704 is mainly used to connect the terminal to the server; the user interface 703 is mainly used to provide an input interface for the user; and the processor 701 may be used to call the device control application program stored in the memory 705 to implement: the first terminal obtains block information provided by the second terminal in an offline state; the block information is obtained by the second terminal from the blockchain and includes a first private key signature, a first timestamp, and user authentication information; the first timestamp is the timestamp of the block header of the block information; the first terminal verifies the first private key signature using the stored first public key in an offline state, and the first private key signature is a digital signature generated using the first private key corresponding to the first public key; when the first terminal meets the target conditions, it verifies the identity or certificate information of the target user using the user authentication information; the target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than a first threshold. It should be understood that the terminal 700 may perform the operations performed by the first terminal in the foregoing embodiment, such as Figure 1 , Figure 2 and Figure 4 the operations performed by the first terminal in

[0125] Further, please refer to Figure 8 , which is a schematic structural diagram of another terminal provided by an embodiment of the present application. As Figure 8As shown, the terminal 800 corresponds to the second terminal in the above embodiment. The terminal 800 may include: at least one processor 801, such as a CPU, at least one network interface 804, a user interface 803, a memory 805, and at least one communication bus 802. Among them, the communication bus 802 is used to implement connection communication between these components. Among them, the user interface 803 may include a display screen and an input device. Optionally, the user interface 803 may further include a standard wired interface and a wireless interface. The network interface 804 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 805 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. Optionally, the memory 805 may also be at least one storage device located far from the aforementioned processor 801. As Figure 8 shown, the memory 805, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.

[0126] In Figure 8 the terminal 800 shown, the network interface 804 is mainly used to connect the terminal to the server; the user interface 803 is mainly used to provide an input interface for the user; and the processor 801 may be used to call the device control application program stored in the memory 805 to implement: the second terminal obtains block information from the blockchain, and the block information includes a first private key signature, a first timestamp, and user authentication information; the first timestamp is the timestamp of the block header of the block information; the second terminal provides the block information to the first terminal, and the block information is used for the first terminal to verify the identity or certificate information of the target user using the user authentication information when the target conditions are met. The target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes verification, and the difference between the first timestamp and the current time is less than a first threshold. It should be understood that the terminal 800 may perform the operations performed by the second terminal in the foregoing embodiment, such as Figure 2 , Figure 3 and Figure 4 the operations performed by the second terminal in

[0127] In addition, it should be noted here that: The embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the aforementioned server, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the foregoing Figure 1 or Figure 2 or Figure 3The description of the data processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For the technical details not disclosed in the embodiment of the computer-readable storage medium involved in the present application, please refer to the description of the method embodiment of the present application.

[0128] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above method embodiments. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0129] The above-disclosed are only the embodiments provided by the present application. Of course, the scope of rights of the present application cannot be limited thereby. Therefore, equivalent changes made according to the claims of the present application still fall within the scope covered by the present application.

Claims

1. A data processing method, characterized in that, it includes: The first terminal obtains block information provided by the second terminal in an offline state; The block information is obtained by the second terminal from the blockchain and includes a first private key signature, a first timestamp, and user verification information; the first private key signature is a digital signature signed after the block information is consensus by the accounting nodes on the blockchain, and the first timestamp is the timestamp of the block header of the block information; The first terminal verifies the first private key signature using the stored first public key in an offline state, and the first private key signature is a digital signature generated using the first private key corresponding to the first public key; When the first terminal meets the target conditions, it verifies the identity or document information of the target user using the user verification information; the target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than a first threshold, and the first threshold is determined by the first terminal according to the requirements of handling the business.

2. The method according to claim 1, characterized in that, The block information further includes a second public key; the first terminal obtaining the block information provided by the second terminal in an offline state includes: The first terminal obtains the block information and the second private key signature of the second terminal in an offline state; the second private key signature is a digital signature generated by the second terminal using at least one of the first private key signature, the first timestamp, the user verification information and the second private key of the second terminal, and the second public key is a public key matching the second private key; the target conditions further include: the second private key signature passes the verification of the second public key.

3. The method according to claim 1 or 2, characterized in that, The first terminal obtaining the block information provided by the second terminal in an offline state includes: The first terminal scans the verification code provided by the second terminal in an offline state to obtain the block information; the verification code is generated by the second terminal according to the block information; the block information further includes a second timestamp when the second terminal generates the verification code; the target conditions further include: the difference between the second timestamp and the current time is less than a second threshold.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: When the first terminal does not meet the target conditions, it determines that the block information is forged information of the second terminal.

5. A data processing method, characterized in that, it includes: The second terminal obtains block information from the blockchain, and the block information includes a first private key signature, a first timestamp, and user verification information; The first private key signature is a digital signature signed after the block information is consensus by the accounting nodes on the blockchain, and the first timestamp is the timestamp of the block header of the block information; The second terminal provides the block information to the first terminal, where the block information is used for the first terminal to verify the identity or document information of the target user by using the user verification information when the target conditions are met. The target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than a first threshold, and the first threshold is determined by the first terminal according to the requirements of handling the business.

6. The method according to claim 5, wherein, the block information further includes a second public key; the second terminal providing the block information to the first terminal includes: the second terminal provides the block information and a second private key signature to the first terminal; the second private key signature is a digital signature generated by the second terminal by using at least one of the first private key signature, the first timestamp, and the user verification information and the second private key of the second terminal, the second public key is a public key matching the second private key, and the second public key is used for the first terminal to verify the second private key signature, and the target conditions further include: the second private key signature passes the verification.

7. The method according to claim 5 or 6, wherein, the second terminal providing the block information to the first terminal includes: the second terminal generates a verification code according to the block information, and the block information further includes a second timestamp when the second terminal generates the verification code; the target conditions further include: the difference between the second timestamp and the current time is less than a second threshold; the second terminal provides the verification code to the first terminal, and the verification code is used to be scanned by the first terminal to obtain the block information.

8. The method according to claim 6, wherein, the first private key signature is a signature of an authoritative institution; the method further includes: the second terminal provides the user verification information and the second public key to the authoritative institution, and the block information is the information uploaded to the blockchain by the authoritative institution after verifying the user verification information and the second public key.

9. A data processing device, wherein, comprising: an acquisition unit, configured to acquire, by a first terminal in an offline state, block information provided by a second terminal; the block information is obtained by the second terminal from the blockchain and includes a first private key signature, a first timestamp, and user verification information; the first private key signature is a digital signature signed after the block information is consensus by the accounting nodes on the blockchain, and the first timestamp is the timestamp of the block header of the block information; a verification unit, configured to verify, by the first terminal in an offline state, the first private key signature by using a stored first public key, where the first private key signature is a digital signature generated by using the first private key corresponding to the first public key; The verification unit is further configured to, when the first terminal meets the target conditions, use the user verification information to verify the identity or certificate information of the target user; the target user is the user bound to the second terminal, and the target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than a first threshold, and the first threshold is determined by the first terminal according to the requirements of handling the business.

10. A data processing device characterized in that it includes: an acquisition unit configured to enable the second terminal to acquire block information from the blockchain, where the block information includes a first private key signature, a first timestamp, and user verification information; the first private key signature is a digital signature signed after the block information is consensus by the accounting nodes on the blockchain, and the first timestamp is the timestamp of the block header of the block information; a providing unit configured to enable the second terminal to provide the block information to the first terminal, and the block information is used for the first terminal to verify the identity or certificate information of the target user by using the user verification information when meeting the target conditions, where the target conditions include that the first private key signature passes the verification, and the difference between the first timestamp and the current time is less than a first threshold, and the first threshold is determined by the first terminal according to the requirements of handling the business.

Citation Information

Patent Citations

  • Quick payment method and equipment

    CN108053205A

  • Block chain real name communication privacy protection method and system

    CN108960832A