CN111612964B - Bill certificate anti-counterfeiting detection method and device based on block chain - Google Patents

Bill certificate anti-counterfeiting detection method and device based on block chain Download PDF

Info

Publication number
CN111612964B
CN111612964B CN202010438347.XA CN202010438347A CN111612964B CN 111612964 B CN111612964 B CN 111612964B CN 202010438347 A CN202010438347 A CN 202010438347A CN 111612964 B CN111612964 B CN 111612964B
Authority
CN
China
Prior art keywords
detection
identification information
information
node
bill
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010438347.XA
Other languages
Chinese (zh)
Other versions
CN111612964A (en
Inventor
陈泽德
胡国明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Lejia Printing Co ltd
Original Assignee
Guangdong Lejia Printing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Lejia Printing Co ltd filed Critical Guangdong Lejia Printing Co ltd
Priority to CN202010438347.XA priority Critical patent/CN111612964B/en
Publication of CN111612964A publication Critical patent/CN111612964A/en
Application granted granted Critical
Publication of CN111612964B publication Critical patent/CN111612964B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/003Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using security elements
    • G07D7/0034Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using security elements using watermarks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/413Classification of content, e.g. text, photographs or tables
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/004Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using digital security elements, e.g. information coded on a magnetic thread or strip
    • G07D7/0043Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using digital security elements, e.g. information coded on a magnetic thread or strip using barcodes
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/004Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using digital security elements, e.g. information coded on a magnetic thread or strip
    • G07D7/0047Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency using digital security elements, e.g. information coded on a magnetic thread or strip using checkcodes, e.g. coded numbers derived from serial number and denomination
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/2016Testing patterns thereon using feature extraction, e.g. segmentation, edge detection or Hough-transformation
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/20Testing patterns thereon
    • G07D7/202Testing patterns thereon using pattern matching
    • G07D7/206Matching template patterns
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Abstract

The embodiment of the application discloses a bill voucher anti-counterfeiting detection method and device based on a block chain. According to the technical scheme, the identification information of the bill voucher is collected through the front end node, the corresponding block nodes are selected as the detection nodes based on the identity information of the plurality of block nodes, the identification information is sent to the detection nodes, the detection nodes perform matching comparison to generate corresponding matching results, and the matching results and the identity information of the detection nodes are returned to the front end node. And then, the front-end node judges whether the matching result is valid or not based on the identity information, and if the matching result is valid, the detection result of the corresponding bill voucher is output. By adopting the technical means, the detection efficiency and the safety of the anti-counterfeiting detection of the bill voucher can be guaranteed by selecting the detection node, the condition that the processing efficiency is influenced by heavy detection service is avoided, the conditions of wrong detection result, counterfeiting and the like are avoided through identity information verification, and the accuracy and the safety of the anti-counterfeiting detection of the bill voucher are further guaranteed.

Description

Bill certificate anti-counterfeiting detection method and device based on block chain
Technical Field
The embodiment of the application relates to the technical field of anti-counterfeiting detection, in particular to a bill and voucher anti-counterfeiting detection method and device based on a block chain.
Background
At present, in people's daily life, bill vouchers, such as invoices, checks and the like, are often used. In order to ensure the correct use of the bill voucher and avoid the counterfeit of the bill, the bill voucher is generally subjected to anti-counterfeiting treatment. The bill anti-counterfeiting means that the bank and other mechanisms prevent the bank bills (including the bills, the draft bills and the checks) from being forged, altered and cloned by criminals for deception through an anti-counterfeiting technology. For example, a unique identification information such as a character string, a two-dimensional code, etc. is printed on the bill, and the authenticity of the corresponding bill is recognized when the identification information matches the verification information in the database.
In the process of anti-counterfeiting detection of the bill voucher, identification information on the bill is generally collected and uploaded to a background detection system for centralized processing, and the identification information is compared by a database of the background detection system to judge the authenticity of the bill. However, the background detection system centralizes the anti-counterfeiting detection mode, so that the counterfeit bills can be detected through the anti-counterfeiting detection under the conditions of network attack, information interception and the like. Moreover, the centralized anti-counterfeiting detection method is easy to cause the shortage of system computing resources under the condition of heavy detection data, and the detection efficiency is reduced.
Disclosure of Invention
The embodiment of the application provides a bill voucher anti-counterfeiting detection method and device based on a block chain, which can guarantee the accuracy and the safety of bill voucher anti-counterfeiting detection and improve the detection efficiency of bill voucher anti-counterfeiting detection.
In a first aspect, an embodiment of the present application provides a method for detecting counterfeit of a ticket voucher based on a blockchain, including:
the method comprises the steps that a front end node collects identification information of a bill voucher, selects corresponding block nodes as detection nodes based on identity information of a plurality of block nodes, and sends the identification information to the detection nodes, wherein each block node is provided with a verification information database for matching and comparing the identification information;
the detection node receives the identification information, performs matching comparison based on the identification information, generates a corresponding matching result, and returns the matching result and the identity information of the detection node to the front-end node;
and the front-end node receives the matching result and the identity information, judges whether the matching result is valid or not based on the identity information, and outputs a corresponding detection result of the bill voucher if the matching result is valid.
Further, selecting a plurality of corresponding block nodes as detection nodes based on the identity information of the plurality of block nodes;
correspondingly, the front-end node receives the matching result and the identity information, judges whether the matching result is valid based on the identity information, and if the matching result is valid, outputs a corresponding detection result of the bill voucher, including:
the front-end node receives the matching result and the corresponding identity information returned by each detection node;
determining the matching result judged to be valid based on the corresponding identity information;
and determining the detection result of the bill voucher through a consensus mechanism of a block chain based on the matching results judged to be effective.
Further, after determining the detection result of the bill voucher through a consensus mechanism of a block chain based on the matching result judged to be valid, the method further comprises the following steps:
determining a matching result different from the detection result, and generating an error matching record of the corresponding block node;
and carrying out safety warning on the block nodes with the error matching records reaching the set number in the set time period.
Further, the detecting node receives the identification information, performs matching comparison based on the identification information, and generates a corresponding matching result, including:
receiving the identification information, and performing matching comparison based on a verification information database of the identification information to generate first comparison result data corresponding to the identification information;
sending the identification information to the designated block nodes, and receiving second comparison result data returned by each designated block node;
and determining a matching result of the identification information through a consensus mechanism of a block chain based on the first comparison result data and each second comparison result data.
Further, determining whether the matching result is valid based on the identity information includes:
and comparing the identity information with the identity information of the detection node, judging that the matching result is valid if the identity information is the same as the identity information of the detection node, and judging that the matching result is invalid if the identity information is different from the identity information of the detection node.
Further, selecting the corresponding block node as a detection node based on the identity information of the plurality of block nodes, including:
and selecting the corresponding block node from the plurality of block nodes as a detection node according to a preset selection rule, wherein the selection rule is constructed based on a detection service average distribution principle.
Further, sending the identification information to the detection node includes:
encrypting the identification information by using a public key, and sending the encrypted identification information to the detection node;
correspondingly, the receiving, by the detection node, the identification information includes:
and the detection node decrypts the identification information by using a private key corresponding to the public key.
Further, the identification information includes authentication information of the front-end node;
correspondingly, the receiving, by the detection node, the identification information includes:
and the detection node extracts the authentication information from the identification information, compares the authentication information with a pre-stored front-end node information table and judges whether the identification information is valid or not.
In a second aspect, an embodiment of the present application provides a device for detecting counterfeit prevention of ticket credentials based on a blockchain, including:
the system comprises a selecting module, a detecting module and a comparing module, wherein the selecting module is used for acquiring identification information of a bill voucher through a front end node, selecting corresponding block nodes as detecting nodes based on identity information of a plurality of block nodes, and sending the identification information to the detecting nodes, and each block node is provided with a verification information database for matching and comparing the identification information;
the comparison module is used for receiving the identification information through the detection node, performing matching comparison based on the identification information, generating a corresponding matching result, and returning the matching result and the identity information of the matching result to the front-end node;
and the output module is used for receiving the matching result and the identity information through the front end node, judging whether the matching result is valid or not based on the identity information, and if the matching result is valid, outputting the corresponding detection result of the bill voucher.
In a third aspect, embodiments of the present application provide a storage medium containing computer-executable instructions for performing the method for counterfeit detection of a ticket credential based on a blockchain as described in the first aspect when executed by a computer processor.
According to the method and the device, the front end node collects identification information of the bill voucher, the corresponding block nodes are selected as detection nodes based on the identity information of the plurality of block nodes, the identification information is sent to the detection nodes, the detection nodes perform matching comparison to generate corresponding matching results, and the matching results and the identity information of the front end node are returned to the front end node. And then, the front-end node judges whether the matching result is valid or not based on the identity information, and if the matching result is valid, the detection result of the corresponding bill voucher is output. By adopting the technical means, the detection efficiency and the safety of the anti-counterfeiting detection of the bill voucher can be guaranteed by selecting the detection node, the condition that the processing efficiency is influenced by heavy detection service is avoided, the conditions of wrong detection result, counterfeiting and the like are avoided through identity information verification, and the accuracy and the safety of the anti-counterfeiting detection of the bill voucher are further guaranteed.
Drawings
Fig. 1 is a flowchart of a method for detecting counterfeit receipt credentials based on a block chain according to an embodiment of the present application;
fig. 2 is a schematic diagram illustrating a connection between a front-end node and a block node according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a matching result generation process in the first embodiment of the present application;
FIG. 4 is a flowchart illustrating a detection result determination process according to a first embodiment of the present application;
FIG. 5 is a flowchart illustrating an error matching record according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a bill voucher anti-counterfeiting detection device based on a blockchain according to the second embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The bill voucher anti-counterfeiting detection method based on the block chain aims to achieve the purposes of decentralization and distributed matching comparison of a bill voucher anti-counterfeiting detection system by sending identification information to different block nodes in a block chain network, avoids the situation that system computing resources are nervous due to heavy detection data during centralized anti-counterfeiting detection, and improves the anti-counterfeiting detection efficiency of the system. And the anti-counterfeiting detection of the bill voucher is carried out through different block nodes, so that the situations of bill counterfeiting and detection result counterfeiting caused by network attack and information interception easily during centralized processing of detection data are avoided. In addition, the bill voucher anti-counterfeiting detection method based on the block chain further judges whether the matching result comes from the detection node selected by the front end node through identification of the identity information, so that the safety and accuracy of the matching result are guaranteed, and the safety and accuracy of the detection result of the bill voucher anti-counterfeiting detection are further guaranteed. Compared with the traditional bill voucher anti-counterfeiting detection system, when the anti-counterfeiting detection is carried out, the identification information collected at the front end is generally uniformly sent to the background server for centralized matching comparison, and a corresponding detection result is generated. Because the system adopts a single node form to process the detection data, when the bill and certificate anti-counterfeiting detection business volume submitted by the front end is large, the computing resources of the system are relatively short, and the processing efficiency is relatively low. Moreover, when a single node processes the anti-counterfeiting detection service of the bill and the certificate, the single node is relatively easy to be attacked by a network, and the detection result is also easier to be tampered and forged. Therefore, the bill and voucher anti-counterfeiting detection method and device based on the block chain are provided to solve the technical problems of low detection accuracy, low safety and low detection efficiency of the existing bill and voucher anti-counterfeiting detection system.
The first embodiment is as follows:
fig. 1 shows a flowchart of a block chain-based anti-counterfeit detection method for a ticket credential provided in an embodiment of the present application, where the block chain-based anti-counterfeit detection method for a ticket credential provided in this embodiment may be executed by a block chain-based anti-counterfeit detection system for a ticket credential, the block chain-based anti-counterfeit detection system for a ticket credential may be implemented by software and/or hardware, and the block chain-based anti-counterfeit detection apparatus for a ticket credential may be composed of two or more physical entities.
The following description will be made by taking a block chain-based bill and voucher anti-counterfeiting detection system as an example of a main body for executing a block chain-based bill and voucher anti-counterfeiting detection method. Referring to fig. 1, the bill voucher anti-counterfeiting detection method based on the block chain specifically comprises the following steps:
s110, the front end node collects identification information of the bill voucher, selects the corresponding block nodes as detection nodes based on identity information of the plurality of block nodes, and sends the identification information to the detection nodes, wherein each block node is provided with a verification information database for matching and comparing the identification information.
Illustratively, when the anti-counterfeiting detection of the bill voucher is carried out, the identification information of the bill voucher is collected through a front end node of the anti-counterfeiting detection system of the bill voucher. Generally, the identification information of the bill voucher is a character string or a two-dimensional code. When the identification information is collected, the front end node identifies the corresponding character string or the two-dimensional code from the image data by acquiring the image data of the bill voucher, so that the identification information collection is completed. It is understood that the front-end node here should be a terminal device including a camera or a barcode, which is connected with the system background signal in a wired or wireless manner. And according to actual needs, the image data of the bill voucher acquired by the front end node can also be directly uploaded to a system background as identification information, and the system background further performs image recognition processing to extract a character string or a two-dimensional code therein as the identification information for matching and comparison.
Specifically, referring to fig. 2, a schematic diagram of a connection between a front-end node and a block node in the embodiment of the present application is provided, which is different from a traditional method for performing matching comparison of identification information by setting a single node in anti-counterfeit detection of a bill certificate. The block chain network comprises a plurality of block nodes, and each block node adopts an independent communication link to be connected with a front end node. And each block node is provided with a verification information database for matching and comparing the identification information so as to carry out matching and comparing according to the received identification information. It can be understood that, in the embodiment of the present application, each block node has the capability of anti-counterfeit detection of the ticket voucher. Through setting up the block chain network that constitutes by a plurality of block nodes, can alleviate the pressure that single node handled bill voucher anti-counterfeiting detection business, promote bill voucher anti-counterfeiting detection's efficiency.
Furthermore, because a plurality of block nodes are arranged, when the matching comparison of the identification information is performed, the front-end node can select the corresponding block node to perform the matching comparison of the identification information, and the block node is defined as a detection node. The front end node prestores the identity information of each block node on the block network, the identity information is used as the identity of the block node, and the identity has uniqueness. When the detection node is selected, the corresponding block node is selected as the detection node according to the pre-stored identity information, and the identification information is sent to the corresponding detection node.
In one embodiment, the front-end node further selects the corresponding block node from the plurality of block nodes as a detection node according to a preset selection rule, and the selection rule is constructed based on a detection traffic average distribution principle. It can be understood that, in order to avoid the situation that the anti-counterfeit detection traffic of the bill documents processed by different block nodes is too different, which results in the waste of computing resources of part of the block nodes, and the anti-counterfeit detection traffic of part of the block nodes is too heavy, a selection rule is pre-constructed in the embodiment of the present application. The selection rule is constructed based on the detection service average distribution principle, so that the anti-counterfeiting detection service volume distributed to each block node is ensured to be equivalent. For example, the blockchain network includes A, B, C and D four blocknodes, and if one blocknode is selected each time to process the identification information, one blocknode is randomly selected or sequentially selected for the first time, and the next time the blocknode is selected, the blocknode is not used as a candidate. For example, if the a block node is selected for sending the identification information for the first time, the second time the identification information is sent, a block node is selected from B, C and D. And repeating the steps until all the nodes process the anti-counterfeiting detection service, and then randomly selecting or sequentially selecting the detection nodes based on all the block nodes in the block chain network.
In one embodiment, after a certain block node is selected as a detection node to send identification information, the reply information of the detection node is also received in a set receiving period, if the reply information of the detection node is not received in the receiving period, the sending of the identification information is failed, and the front-end node resends the identification information to the detection node. And if the continuous sending of the identification information fails within the set times, the front-end node reselects a block node as a detection node in the block chain network based on a preset selection rule. It can be understood that, since the previous detecting node fails to continuously receive the identification information, when the detecting node is reselected, the detecting node which failed to receive is not in the candidate for the current selection.
In one embodiment, the front-end node further encrypts the identification information using a public key, and sends the encrypted identification information to the detection node. Correspondingly, when the detection node receives the identification information, the detection node decrypts the identification information by using a private key corresponding to the public key. The Public Key and the Private Key are a Key pair (i.e., a Public Key and a Private Key) obtained by an algorithm, the Public Key is a Public part of the Key pair, and the Private Key is an unpublished part. The public key is typically used to encrypt session keys, verify digital signatures, or encrypt data that can be decrypted with a corresponding private key. The key pair derived by such an algorithm is guaranteed to be unique worldwide. When using this key pair, if one of the keys is used to encrypt a piece of data, the other key must be used to decrypt the piece of data. For example, encrypting data with a public key necessitates decryption with the private key, and if encrypting with the private key, also must decrypt with the public key, otherwise decryption will not succeed. In the embodiment of the application, in order to guarantee the accuracy and the safety of the anti-counterfeiting detection result of the bill voucher and avoid the condition that the identification information is maliciously tampered and stolen, the public key and the private key are adopted to encrypt and decrypt data, so that the safety of identification information transmission is guaranteed.
In one embodiment, the identification information comprises authentication information of the front-end node; correspondingly, when the detection node receives the identification information, the detection node extracts the authentication information from the identification information, compares the authentication information with a pre-stored front-end node information table, and judges whether the identification information is valid. It will be appreciated that in order to avoid the currently detected node receiving identification information from a fake front-end node, it is ensured that each identification information processed by the detected node comes from the front-end node of the system itself. When the front-end node sends the identification information, the authentication information of the front-end node is attached to the identification information. Correspondingly, each block node prestores a front-end node information table, and the front-end node information table comprises authentication information of the front-end node, so that the identity authentication of the front-end node is performed subsequently. It can be understood that, the block node as the detection node queries the front-end node information table through the authentication information, and if the same authentication information is obtained through the query, it indicates that the current front-end node is a valid node, and the identification information thereof is valid. Otherwise, the identification information is invalid, and at this time, the detection node discards the identification information and does not perform matching comparison of the identification information.
And S120, the detection node receives the identification information, performs matching comparison based on the identification information, generates a corresponding matching result, and returns the matching result and the identity information of the detection node to the front-end node.
Based on the received identification information, the detection node further performs matching comparison according to the verification information database of the detection node. It is understood that the authentication information database should store authentication information corresponding to each identification information. Subsequently, when the identification information is matched and compared, the detection node queries the verification information database of the detection node, if matched verification information exists, the identification information is shown to be effective, at the moment, the detection node generates a matching result with consistent comparison, and otherwise, the detection node generates a matching result with inconsistent comparison. And based on the generated matching result, the detection node attaches own identity information to the matching result, so that when the subsequent front-end node receives the matching result, the source of the matching result can be made clear, and the system can trace the source of the detection result.
Specifically, in order to improve the fault tolerance of the system and avoid the conditions of matching error, information tampering and the like of a single node, after the detection node receives the identification information, the identification information is matched and compared through the detection node, and the identification information is sent to the designated block node for matching and comparison, so that a more accurate and fault-tolerant matching result is generated. Referring to fig. 3, the matching result generation flow includes:
s1201, receiving the identification information, performing matching comparison based on a verification information database of the identification information, and generating first comparison result data corresponding to the identification information;
s1202, sending the identification information to the designated block nodes, and receiving second comparison result data returned by each designated block node;
s1203, determining a matching result of the identification information through a consensus mechanism of a block chain based on the first comparison result data and each second comparison result data.
The fault tolerance of the matching result is improved by a consensus mechanism of the block chain technology. It is understood that each block node designates the corresponding block node in advance for forwarding the identification information, for example, the a block node designates E, F and the G block node as the forwarding nodes of the identification information. After the block A node serves as a detection node and receives the identification information, matching comparison is firstly carried out through a verification information database of the block A node to obtain corresponding comparison result data, and the comparison result data is defined as first comparison result data. Further, the identification information is sent to E, F and the G block nodes, and the corresponding block nodes are matched and compared through the verification information database of the corresponding block nodes to obtain corresponding comparison result data, which is defined as second comparison result data. And determining a final matching result based on a formula mechanism of the block chain technology corresponding to the first comparison result data and the second comparison result data. And (3) voting the comparison result by the consensus mechanism according to the principle that the minority obeys majority, wherein the comparison result with the maximum number of votes is the finally determined matching result. For example, if the first comparison result data of the node of the block a and the second comparison result data of the node of the blocks F and G are both "comparison consistent", and the second comparison result data of the node of the block E is "comparison inconsistent", then the consensus mechanism determines that the number of tickets for "comparison consistent" is 3 tickets, and the matching result of the final data is "comparison consistent".
It should be noted that, in practical applications, the identification node may further randomly designate a plurality of nodes of the block chain network to perform matching comparison of the identification information, extract second comparison result data of the nodes, and determine a final matching result with the first comparison result data of the identification node through a consensus mechanism. In one embodiment, when voting is performed based on the consensus mechanism, the first comparison result data may be set to have a relatively larger share than the second comparison result data. For example, if the voting share of one first comparison result data is two votes and the voting share of one second comparison result data is one vote, in the E, F and G block nodes, if the second comparison result data of one block node is consistent with the first comparison result data of the a block node (detection node) (the number of votes is three votes in the consensus mechanism, and exceeds 50%), the comparison result data of the a block node is determined as the final matching result.
In an embodiment, with reference to the above encryption and decryption manner of the identification information, when the detection node sends the matching result and the corresponding identity information, the matching result and the corresponding identity information are packaged into a data packet, the data packet is further encrypted by using a public key, and the encrypted data packet is sent to the front-end node. Correspondingly, when the front-end node receives the data packet, the private key of the public key of the corresponding block node is used for decrypting the data packet. On the other hand, in order to facilitate data decryption, in practical application, the data packet is encrypted by using a private key, and the encrypted data packet is sent to the front-end node. Correspondingly, when the front-end node receives the data packet, the public key of the private key of the corresponding block node is used for decrypting the data packet. Of course, no matter any data encryption and decryption mode is adopted, the transmission safety of the matching result and the identity information is guaranteed, the accuracy and the safety of the anti-counterfeiting detection result of the bill certificate are guaranteed, and the matching result and the identity information are prevented from being maliciously tampered and stolen.
S130, the front-end node receives the matching result and the identity information, judges whether the matching result is valid or not based on the identity information, and outputs a corresponding detection result of the bill voucher if the matching result is valid.
Specifically, based on the matching result returned by the detection node and the identity information of the detection node in step S120, the front-end node first determines whether the identity information matches with the identity information of each block node on the block network stored in advance by the front-end node, and if the identity information of the block node matching with the front-end node exists, it indicates that the currently received matching result and the identity information are from the block node on the block network. If there is no identity information of the block node matching with the matching result, it indicates that the currently received matching result and identity information are not from the block node on the block network, and may be a matching result forged by a hacker. Of course, the front-end node directly discards the received matching result, provided that it does not contain the corresponding identity information.
In one embodiment, the identity information is compared with the identity information of the detection node, and if the identity information is the same as the identity information of the detection node, the matching result is judged to be valid, and if the identity information is different from the identity information of the detection node, the matching result is judged to be invalid. In order to facilitate identity information verification, when the front-end node selects the block node as a detection node to send identification information, the detection node is marked in advance, subsequently when a matching result and identity information are received, the identity information of the detection node marked in advance is directly extracted and compared with the received identity information, and if the matching result and the identity information are consistent, the matching result is valid. Otherwise, it is invalid.
And finally, correspondingly verifying as a valid matching result, if the content of the matching result is 'comparison is consistent', outputting a detection result that the detection is true, and indicating that the anti-counterfeiting detection result of the bill voucher is 'true'. Otherwise, if the matching result content is 'inconsistent with the comparison', outputting a detection result that the detection is false, and indicating that the anti-counterfeiting detection result of the bill voucher is 'false', thereby completing the one-time bill voucher anti-counterfeiting detection service of the bill voucher anti-counterfeiting detection system based on the block chain based on the bill voucher anti-counterfeiting detection method based on the block chain in the embodiment of the application.
In one embodiment, the front-end node may select a plurality of block nodes as the detection node in selecting the corresponding block nodes as the detection nodes based on the identity information of the plurality of block nodes. The identification information is sent to a plurality of different detection nodes for matching comparison. After receiving the identification information, each detection node performs matching comparison based on the verification information database of the detection node to obtain a corresponding matching result. The matching result and the corresponding identity information are returned to the front-end node, and the front-end node determines a final detection result based on the received matching result and the corresponding identity information. Referring to fig. 5, the detection result determination process includes:
s1301, the front-end node receives the matching results and the corresponding identity information returned by the detection nodes;
s1302, determining the matching result judged to be valid based on the corresponding identity information;
and S1303, determining the detection result of the bill voucher through a consensus mechanism of the block chain based on the matching result judged to be valid.
Specifically, the matching results and the corresponding identity information returned by the corresponding detection nodes are determined one by one according to the identity information. According to the verification mode of the identity information, when the front-end node sends the identification information to the plurality of detection nodes, the detection nodes are marked in advance, after the identity information is received subsequently, the received identity information is compared with the identity information of the detection nodes marked in advance one by one, the identity information which is the same as the identity information of the detection nodes marked in advance is determined, and the matching result corresponding to the identity information is an effective matching result. Further, based on the above-identified multiple valid matching results, since the matching results come from different detection nodes, the contents of the matching results may be the same or different, and the final detection result cannot be determined by the contents of a certain matching result alone. Therefore, the embodiment of the present application further determines the final detection result based on the consensus mechanism of the blockchain technology. When the detection result is determined based on the consensus mechanism, according to the principle that the consensus mechanism 'minority obeys majority', if the matching result with the content of 'comparison consistency' accounts for the majority (namely more than 50%) in a plurality of effective matching results, the detection result with true detection is output, and the anti-counterfeiting detection result of the bill and the certificate is 'true'. On the contrary, if the matching result with the content of "inconsistent comparison" accounts for a majority (i.e. more than 50%) of the plurality of valid matching results, the detection result detected as false is output, which indicates that the anti-counterfeiting detection result of the bill and document is "false". The final detection result is determined through a consensus mechanism, the condition that the matching result of a single block node is falsified can be avoided, the fault tolerance of the bill certificate anti-counterfeiting detection system based on the block chain is improved, and the stability and the accuracy of the finally determined detection result are guaranteed.
Further, after the detection result is determined, the embodiment of the present application further performs a mismatch matching record based on the finally determined detection result. Referring to fig. 5, the error matching recording process includes:
s1304, determining a matching result different from the detection result, and generating an error matching record of the corresponding block node;
and S1305, carrying out safety warning on the block nodes with the error matching records reaching the set number in the set time period.
It can be understood that, after determining the detection result from the plurality of valid matching results based on the consensus mechanism, the matching result with the majority of the votes before is considered as the correct matching result, and the matching result with the minority of the votes is considered as the incorrect matching result. The error of the matching result may be caused by a situation that a matching error occurs in the corresponding block node during matching, the matching result is tampered, the node is under a network attack, or an error occurs in the self-verification information database. Then, in order to detect the above situation as early as possible and eliminate the failure of the corresponding block node, the front-end node performs an error matching record for the block node providing the error matching result. And performing error matching record once for each bill voucher anti-counterfeiting detection service, wherein the block nodes corresponding to the error matching record are registered in a matching record table of the front end node. And then, at a set time interval (such as 7 days), the front-end node inquires whether a matching record table has a block node with an error matching record reaching a set number (such as 10 times), and if so, the front-end node outputs a safety warning of the block node to prompt an operation and maintenance worker to repair the potential fault of the block node in time so as to avoid the situation that a matching result is wrong continuously in the subsequent bill evidence anti-counterfeiting detection service processing process. If the matching record table has no block nodes with the error matching records reaching the set times (for example, 10 times), the front end node erases the error matching records in the previous set time period and performs the error matching records in the next period. Through the error matching records of the block nodes, the matching results provided by the block nodes can be ensured to have certain accuracy, and the accuracy and the safety of the anti-counterfeiting detection of the system bill voucher are further improved.
The identification information of the bill voucher is collected through the front end node, the corresponding block nodes are selected as the detection nodes based on the identity information of the plurality of block nodes, the identification information is sent to the detection nodes, the detection nodes perform matching comparison to generate corresponding matching results, and the matching results and the identity information of the detection nodes are returned to the front end node. And then, the front-end node judges whether the matching result is valid or not based on the identity information, and if the matching result is valid, the detection result of the corresponding bill voucher is output. By adopting the technical means, the detection efficiency and the safety of the anti-counterfeiting detection of the bill voucher can be guaranteed by selecting the detection node, the condition that the processing efficiency is influenced by heavy detection service is avoided, the conditions of wrong detection result, counterfeiting and the like are avoided through identity information verification, and the accuracy and the safety of the anti-counterfeiting detection of the bill voucher are further guaranteed.
In one embodiment, the anti-counterfeiting detection of the bill and voucher can be implemented based on image recognition, wherein an image recognition-based bill and voucher anti-counterfeiting detection method is provided, which can be executed by the block node, and the image recognition-based bill and voucher anti-counterfeiting detection method comprises the following steps:
s201: extracting the characteristic identification information of the bill image to be identified, and matching the verification identification information in the database based on the characteristic identification information.
The characteristic identification information is understood to be graphic or text information solidified on the bill by printing or printing and the like, such as a digital code, a bar code, a two-dimensional code and the like printed on the bill. When the bills are produced, unique characteristic identification information of each bill is determined, verification identification information (which can be consistent with the characteristic identification information) is generated according to the characteristic identification information, the verification identification information is stored in a database, and the corresponding relation between the verification identification information and the bills and/or the characteristic identification information is established.
Illustratively, a to-be-recognized bill image is acquired, feature identification information in the to-be-recognized bill image is recognized and extracted, and matching verification identification information is retrieved from a database based on the feature identification information, so that the matched verification identification information is determined. It can be understood that when the matched verification identification information is not retrieved, the bill is not registered in the database, the authenticity judgment of the bill is not passed, and the anti-counterfeiting detection process of the bill image to be identified is finished.
S202: and acquiring general characteristic information from a database based on the matched verification identification information, wherein the general characteristic information comprises a bill template image, a general characteristic region, a general characteristic point and a general descriptor.
The method comprises the steps of storing verification identification information in a database, determining the bill type of a corresponding bill, determining general characteristic information corresponding to the bill type, and establishing an association relation between the verification identification information and the general characteristic information. It will be appreciated that different ticket types correspond to different generic feature information, i.e. one generic feature information may comprise a plurality of generic feature areas, and that there may be instances where the generic feature information for different ticket types is partially identical.
In the present embodiment, the common feature information includes a ticket template image, a common feature area, a common feature point, and a common descriptor. It can be understood that the image of the real bill is identical to the image of the area corresponding to the characteristic identification information except for the difference between the image of the area corresponding to the characteristic identification information. In the areas with consistent images, the area used for distinguishing the types of the other bills or identifying the true bills from the false bills is a universal characteristic area, the corresponding area can be printed with a pattern with a specific shape, and the bill to be identified is considered as a true bill only when the pattern of the corresponding area of the bill to be identified is consistent with the pattern of the universal characteristic area or the similarity of the pattern of the corresponding area of the bill to be identified and the pattern of the universal characteristic area reaches a certain threshold value.
The general characteristic points and the general descriptors can be obtained by extracting the characteristics of the bill template images through an image characteristic extraction algorithm. The image Feature extraction algorithm may be a SIFT (Scale Invariant Feature Transform) algorithm, Speedup Up Robust Features (SURF) algorithm, or orb (organized FAST and organized brief) algorithm, which is not limited in this embodiment. The descriptor is a binary descriptor, typically a 128-bit binary string. The calculation method is that 128 point pairs are randomly selected from the periphery of the feature points, and for two points in each point pair, if the gray value of the former point is greater than that of the latter point, 1 is taken, and otherwise, 0 is taken. For example, the extracting of ORB features includes two things of extracting feature points and calculating descriptors, detecting the positions of the feature points by using FAST feature point detection algorithm or Harris corner point detection algorithm or SIFT, SURF and other algorithms, and then establishing the feature descriptors in the feature point neighborhood by using brief (binary Robust Independent components) algorithm. Optionally, the general feature points and the general descriptors may be obtained in advance through an image feature extraction algorithm and stored in a database.
Illustratively, after the verification identification information is successfully matched, the general characteristic information associated with the verification identification information is acquired according to the association relationship between the verification identification information and the general characteristic information.
S203: and acquiring the feature points to be recognized and the descriptors to be recognized of the bill images to be recognized, and normalizing the bill images to be recognized based on the general feature points, the general descriptors, the feature points to be recognized and the descriptors to be recognized.
Illustratively, the feature point to be recognized and the descriptor to be recognized of the bill image to be recognized are obtained through an image feature extraction algorithm, and the method for obtaining the feature point to be recognized and the descriptor to be recognized is similar to the method for obtaining the general feature point and the general descriptor, and is not described in detail in this embodiment.
Further, after the feature points to be recognized and the descriptors to be recognized of the bill images to be recognized are obtained, normalization processing is carried out on the bill images to be recognized based on the general feature points, the general descriptors, the feature points to be recognized and the descriptors to be recognized, and therefore the bill images to be recognized are processed into images consistent with the bill template images (size, direction and the like).
S204: and determining the characteristic region to be identified of the bill image to be identified according to the general characteristic region, and judging the authenticity of the bill based on the similarity of the bill template image in the general characteristic region and the bill image to be identified in the characteristic region to be identified.
Illustratively, after the bill image to be recognized is normalized, the feature region to be recognized of the bill image to be recognized is determined according to the general feature region in the general feature information. For example, according to the coordinates of the corner points of the general feature region on the bill template image and the mapping relation between the to-be-identified bill image and the pixel points of the bill template image, the coordinates of the corner points of the to-be-identified feature region in the to-be-identified bill image are determined, and the region surrounded by the coordinates is the to-be-identified feature region. And when the universal feature information has a plurality of universal feature areas, acquiring the feature areas to be identified corresponding to each universal feature area and determining the corresponding relation between each universal feature area and the feature areas to be identified.
And further, calculating the similarity of the bill template image in the general characteristic region and the bill image to be recognized in the characteristic region to be recognized, comparing the calculated similarity with a similarity threshold, judging the bill to be a true bill when the similarity threshold is met, and otherwise, judging the bill to be a false bill.
The verification identification information is matched in the database by utilizing the characteristic identification information of the bill to be recognized, the general characteristic information of the corresponding type of bill is obtained based on the matched verification identification information, the characteristic points and the descriptors of the bill image to be recognized and the bill template image are utilized to normalize the bill image to be recognized, the characteristic area to be recognized in the bill image to be recognized is obtained, the authenticity of the bill is judged according to the similarity of the general characteristic area and the characteristic area to be recognized, the matching condition of other general characteristic areas of the bill is further verified on the basis that the bill passes through the characteristic identification information matching, and the accuracy of bill authenticity recognition is effectively improved.
Further, another bill and voucher anti-counterfeiting detection method based on image recognition is provided in the embodiment of the present application, and the bill and voucher anti-counterfeiting detection method based on image recognition is an embodiment of the bill and voucher anti-counterfeiting detection method based on image recognition. The bill and voucher anti-counterfeiting detection method based on image recognition comprises the following steps:
s301: extracting the characteristic identification information of the bill image to be identified, and matching the verification identification information in the database based on the characteristic identification information.
Illustratively, the ticket image to be recognized may be obtained through a camera device such as a mobile phone, a tablet, a professional camera, or the like, or may be obtained through a network or a mobile storage device (e.g., a usb disk).
The characteristic identification information in this embodiment includes one or more of a digital code, a bar code, and a two-dimensional code. Taking digital coding as the characteristic identification information as an example, the step of acquiring the characteristic identification information comprises the following steps: performing OCR recognition on the bill image to be recognized to obtain a bill text in the bill image to be recognized; and determining an identification text in the bill text, and extracting the bill text as characteristic identification information according to the position relation between the bill text and the identification text.
Specifically, when a ticket is made, a digital code unique to the ticket is printed or stamped on the ticket, and identification text is printed or stamped at a designated location of the digital code (e.g., the head or tail of the digital code). Wherein the identification text may be "NO", "number", "identification code", etc.
After acquiring the bill image to be recognized, performing OCR (optical character Recognition) Recognition on the bill image to be recognized to acquire a bill text in the bill image to be recognized, searching for an identification text in the bill text, and determining a position of the identification text in the bill image to be recognized. And meanwhile, grouping the texts according to the size and the distance between the texts in the note text to determine a text group for reflecting the same information.
Further, after the position of the identification text is determined, extracting the note text in the text group which is closest to the note text and within a set distance, and using the note text as the characteristic identification information.
In other embodiments, if a barcode or a two-dimensional code is used as the feature identification information, the barcode or the two-dimensional code is generated according to the feature identification information when the ticket is manufactured. After the bill image to be recognized is obtained, the bar code or the two-dimensional code in the bill image to be recognized is read, and the characteristic identification information in the bill image to be recognized is analyzed.
In other embodiments, one or more of the digital code, the barcode and the two-dimensional code may be selected as the feature identification information according to actual needs, after the image of the to-be-identified bill is acquired, the digital code, the barcode and the two-dimensional code are detected at the same time, and the text with the highest repetition degree is used as the feature identification information or determined according to different types of priorities, for example, the priorities of the digital code, the barcode and the two-dimensional code are sequentially reduced. Or when the verification identification information is matched, the verification identification information is sequentially matched in the database according to the priority, and the verification identification information matched with the characteristic identification information with higher priority is used as the verification identification information corresponding to the bill.
After the characteristic identification information in the bill image to be identified is determined, the verification identification information matched with the characteristic identification information is searched in the database. It can be understood that when the feature identification information is not successfully acquired or the verification identification information is not successfully matched, the bill to be recognized is judged to be a false bill, and the anti-counterfeiting verification process of the bill to be recognized is finished. And when the verification identification information is successfully matched, further judging the similarity of other areas of the bill image to be recognized.
S302: and acquiring the general characteristic information from the database based on the matched verification identification information.
Specifically, after the verification identification information is successfully matched, the general feature information corresponding to the verification identification information is called from the database.
In this embodiment, the common feature information includes a document template image, a common feature region, a common feature point, a common descriptor, and a similarity threshold value for each common feature region, and each common feature information includes a plurality of common feature regions.
S303: and acquiring the feature points to be recognized and the descriptors to be recognized of the bill images to be recognized, and performing feature matching on the general feature points and the feature points to be recognized based on the distance between the general descriptors and the descriptors to be recognized.
Specifically, the feature points to be recognized and the descriptors to be recognized of the bill images to be recognized are obtained through an image feature extraction algorithm, and the method for obtaining the feature points to be recognized and the descriptors to be recognized is similar to the method for obtaining the general feature points and the general descriptors in the above embodiments, and is not repeated in this embodiment.
Further, after the feature points to be recognized and the descriptors to be recognized of the bill images to be recognized are obtained, the distance between the descriptors to be recognized and the general descriptors is calculated, and the descriptors and the general descriptors are registered according to the distance between the descriptors and the general descriptors. The distance between the descriptor and the general descriptor can be Euclidean distance, Hamming distance, cosine distance and the like, and the smaller the distance is, the more similar the two feature points are. According to the distance between the descriptors, the feature points on one graph and the feature points with the maximum number of the same elements on the bit positions corresponding to the feature codes on the other graph can be matched into a pair. And sorting according to the distance from small to large to establish the corresponding relation between the feature points, completing the feature matching of the general feature points and the feature points to be identified and generating a feature matching result.
S304: and screening the matched general characteristic points and the characteristic points to be identified based on the characteristic matching result.
Specifically, after the feature matching result is obtained, the matched general feature points and the feature points to be identified are screened to eliminate the feature points with wrong matching. In this embodiment, the feature matching result is screened by a Random Sample Consensus (Random Sample Consensus) algorithm.
S305: and solving a homography transformation matrix according to the matched general characteristic points and the characteristic points to be identified.
Specifically, after the feature matching results are screened, the homography transformation matrix between the general feature points and the feature points to be identified is calculated based on the homography matrix solving algorithm. The homography transformation matrix is used for describing the position mapping relation between the bill image to be identified and the bill template image. The homography transformation matrix can be obtained by calling a homography matrix obtaining algorithm through a findHomography function.
S306: and carrying out perspective transformation on the bill image to be recognized based on the homography transformation matrix so as to obtain the bill image to be recognized after normalization processing.
Specifically, after the homography transformation matrix is obtained, perspective transformation is performed on the bill image to be recognized based on the homography transformation matrix, so that the bill image to be recognized is normalized, and the bill image to be recognized consistent with the bill template image (size, dimension, direction and the like) is obtained. Wherein, the perspective transformation can be performed by a warp Perspectral function in OpenCV.
In other embodiments, a projection mapping matrix corresponding to the feature matching result can be obtained based on a getpropertransform function of OpenCV, and perspective transformation is performed on the bill image to be recognized.
S307: and determining the characteristic region to be identified of the bill image to be identified according to the general characteristic region.
Specifically, after the normalization processing of the bill image to be recognized is completed, the feature area to be recognized is determined at the corresponding position in the bill image to be recognized according to the position of the general feature area in the bill template image.
In the implementation, one bill template image corresponds to a plurality of universal characteristic areas, and correspondingly, a plurality of characteristic areas to be identified are correspondingly determined in the bill image to be identified.
S308: and acquiring a general image of the bill template image in a general characteristic region and an image to be recognized of the bill image to be recognized in a characteristic region to be recognized.
Specifically, after the characteristic region to be identified in the bill image to be identified is determined, a general image of the bill template image in the general characteristic region is acquired. The general image can be obtained by screenshot at the position corresponding to the general characteristic area in the bill template image, or the general image corresponding to the general characteristic area is previously intercepted while generating the general characteristic information and is directly obtained after the verification identification information is successfully matched, or the general image is selected by framing in the bill template image when uploading the bill template image, and then the general characteristic area is determined according to the position of the general image on the bill template image.
Further, the image to be recognized is intercepted at the position corresponding to the characteristic area to be recognized in the normalized bill image to be recognized, so that the image to be recognized of the bill image to be recognized in the characteristic area to be recognized is obtained.
S309: and calculating the feature similarity of the general image and the image to be recognized, and judging the authenticity of the bill based on the comparison condition of the feature similarity and a similarity threshold value.
And after obtaining the general image and the image to be recognized, calculating the feature similarity between the general image and the image to be recognized corresponding to the same general feature region. This embodiment will be described by taking a hamming distance between two images as an example of the feature similarity.
Illustratively, calculating a hash value of the general image and the image to be identified; and calculating the Hamming distance of the hash values of the general image and the image to be recognized, and taking the Hamming distance as the feature similarity.
Specifically, the Hash value of each universal image and the image to be recognized is calculated, wherein the Hash value of the image can be obtained by a perceptual Hash algorithm (such as a mean Hash algorithm and a pHash algorithm).
Further, a hamming distance between the general images corresponding to the same general characteristic region and the hash values corresponding to the images to be recognized is calculated, and the hamming distance can be used as the characteristic similarity of the general images and the images to be recognized. It will be appreciated that the smaller the hamming distance between hash values, the higher the degree of similarity between the two images.
Further, after the Hamming distance corresponding to the Hash values of all the general images and the images to be recognized is obtained, each feature similarity is compared with the corresponding similarity threshold, and the authenticity of the bill is judged according to the comparison result.
Specifically, each feature similarity is compared with a similarity threshold corresponding to the same general feature region, and when one feature similarity (hamming distance) is less than or equal to the corresponding similarity threshold (e.g., 3), the similarity between the corresponding image to be recognized and the general image is considered to meet the anti-counterfeiting requirement. Further, when all the feature similarities are smaller than or equal to the corresponding similarity threshold, the corresponding bill is considered to be a true bill, and if any one feature similarity is larger than the corresponding similarity threshold, the corresponding bill is judged to be a false bill.
The verification identification information is matched in the database by utilizing the characteristic identification information of the bill to be recognized, the general characteristic information of the corresponding type of bill is obtained based on the matched verification identification information, the characteristic points and the descriptors of the bill image to be recognized and the bill template image are utilized to normalize the bill image to be recognized, the characteristic area to be recognized in the bill image to be recognized is obtained, the authenticity of the bill is judged according to the similarity of the general characteristic area and the characteristic area to be recognized, the matching condition of other general characteristic areas of the bill is further verified on the basis that the bill passes through the characteristic identification information matching, and the accuracy of bill authenticity recognition is effectively improved. Meanwhile, the image of the bill to be recognized is normalized in a perspective transformation mode, the image to be recognized is conveniently acquired, the authenticity of multiple positions of the bill to be recognized is judged according to the Hamming distances of the Hash values of the multiple general images and the image to be recognized, and the accuracy of judging the authenticity of the bill is effectively improved.
In one embodiment, the method for detecting the anti-counterfeiting of the bill voucher can be performed based on intelligent equipment, that is, the embodiment of the application also provides an anti-counterfeiting detection method of the bill voucher based on the intelligent equipment. The bill voucher anti-counterfeiting detection method based on the intelligent device provided in the embodiment can be executed by bill voucher anti-counterfeiting detection equipment based on the intelligent device, the bill voucher anti-counterfeiting detection equipment based on the intelligent device can be realized in a software and/or hardware mode, and the bill voucher anti-counterfeiting detection equipment based on the intelligent device can be composed of two or more physical entities or one physical entity. Generally, the anti-counterfeit detection device for bill credentials based on the smart device is the block node of the above embodiment, which may be a computer, a background server, or the like.
The following description will be given by taking the bill and voucher anti-counterfeiting detection device as an example of a device for executing the bill and voucher anti-counterfeiting detection method based on the intelligent device. The bill voucher anti-counterfeiting detection method based on the intelligent equipment specifically comprises the following steps:
s401: and receiving two-dimensional code image information and radio frequency label information of the bill voucher, which are acquired by the intelligent equipment.
When bill certificates are required to be verified, the related information of the corresponding bill certificates and the two-dimensional code image information are sent to the background server through the mobile phone app, and similarly, information reading and writing are carried out on radio frequency label information related to the bill certificates at the mobile phone app by anti-counterfeiting verification service personnel through the RFID reader-writer.
When the implementation operation is carried out, the following use scenarios can be adopted: firstly, the owner of the bill voucher wants to verify the authenticity of the bill voucher, and the owner carries the bill voucher to a corresponding anti-counterfeiting verification position for verification, and can be an organization such as a bank. The anti-counterfeiting service personnel identify the two-dimensional code information of the corresponding bill voucher, identify the radio frequency label information at the bill voucher through the intelligent equipment, and then transmit the information to the background server for verification. Secondly, the bill voucher owner acquires the two-dimensional code image information and the radio frequency tag information of the corresponding bill voucher through the mobile phone app and transmits the two-dimensional code image information and the radio frequency tag information to the background server. And thirdly, an online transmission mode is adopted, the bill voucher is an electronic bill voucher, the two-dimensional code image information and the radio frequency label information are included along with the electronic bill voucher, and the two kinds of information are transmitted in a combined mode.
Further, before step S401, step S400 is further included: and sending the bill voucher information with the two-dimensional code image information to an intelligent terminal, and writing the radio frequency tag information corresponding to the bill voucher information into the corresponding intelligent terminal, wherein the intelligent terminal is provided with a radio frequency tag module.
The transfer of the bill voucher is realized, and the information exchange of the electronic voucher is more convenient. When the bill and voucher transaction is carried out, not only the corresponding image information needs to be transmitted to another intelligent terminal user, but also the corresponding radio frequency information needs to be written into the corresponding intelligent terminal to ensure the consistency of the information. When the radio frequency tag information is transmitted, the intelligent devices of both sides of the transaction need to be close to each other. And then clicking the transaction, triggering corresponding label read-write control operation in the background, triggering label write-in operation by a seller, triggering label read operation by a buyer, and realizing the transfer of the bill and the certificate through the mutual approach of the two terminals.
S402: and obtaining corresponding first bill voucher information and corresponding second bill voucher information by identifying the radio frequency tag information according to the two-dimensional code image information. The step is security verification of a first level, and most of the anti-counterfeiting verifications can be designed in the prior art; when many designs are carried out, the single two-dimensional code image is adopted for carrying out anti-counterfeiting information storage or the anti-counterfeiting information storage of the radio frequency label information; and then identifying the corresponding two-dimensional code image and the radio frequency label information to obtain corresponding anti-counterfeiting verification information so as to complete anti-counterfeiting verification. The steps are the same as the anti-counterfeiting information storage adopted conventionally, namely the two-dimensional code and the radio frequency tag are directly used as carriers for information storage. Which can effectively prevent a part of forgery.
S403: and determining whether the first bill voucher information and the second bill voucher information are obtained, and if not, sending authentication failure to the corresponding intelligent equipment.
The method mainly comprises the steps of determining whether first bill voucher information and second bill voucher information are obtained or not, if only one of the first bill voucher information and the second bill voucher information is obtained, indicating that the anti-counterfeiting verification is lack of one level, and informing a user of corresponding risks through feedback information. If the corresponding first bill voucher information is acquired only through the two-dimensional code image information or the corresponding second bill voucher information is acquired only through the RFID label, it can be known that complete information is not acquired, and then verification failure is prompted.
S404: and determining whether the first bill voucher information and the second bill voucher information are consistent, and if not, sending authentication failure to the corresponding intelligent equipment.
In the step, mainly for judging whether the information obtained by the two is the same, although the two-dimensional code is adopted for storing the anti-counterfeiting information or the radio frequency tag is adopted for storing the anti-counterfeiting information at present, the combination verification mode of the two is less; if a counterfeiter forges only one kind of information, the counterfeiter can only pass the identification of the previous level and cannot pass the second level authentication when carrying out the subsequent authentication and identification; the secondary verification requires a combined verification of the two. The safety of identification is guaranteed to a certain extent. When the verification fails, the verification failure or the information of counterfeit tickets and the like can be fed back to the corresponding intelligent equipment, so that the ticket owner can know the verification condition in time. When the verification design is performed, there may be two design modes as follows: the first bill voucher information and the second bill voucher information are set to be identical, and when information verification is carried out, the first bill voucher information and the second bill voucher information can be judged to pass the anti-counterfeiting verification of the level as long as the first bill voucher information and the second bill voucher information are compared to determine whether the information is identical and whether the corresponding anti-counterfeiting code exists in the corresponding server; and secondly, the first bill voucher information and the second bill voucher information are set to be different, but have corresponding mapping tables to represent the correlation of the first bill voucher information and the second bill voucher information, and when the first bill voucher information and the second bill voucher information are correlated, the first bill voucher information and the second bill voucher information can be judged to pass the anti-counterfeiting verification of the level.
S405: and respectively extracting first digital watermark information in the bill voucher and second digital watermark information in the radio frequency tag information, wherein the first digital watermark information is associated with the second digital watermark information.
Digital watermarking (Digital Watermark) is a method of embedding protection information of a carrier file by applying a computer algorithm. The digital watermarking technology is a computer information hiding technology based on a content and non-password mechanism. It is to embed some identification information (i.e. digital watermark) directly into the digital carrier (including multimedia, document, software, etc.) or indirectly (modifying the structure of a specific area), and it does not affect the use value of the original carrier, and is not easy to be ascertained and modified again. But can be identified and recognized by the producer. The information hidden in the carrier can achieve the purposes of confirming content creators and purchasers, transmitting secret information, judging whether the carrier is tampered or not and the like. Digital watermarking is the protection of information security.
In this embodiment, a three-level anti-counterfeiting verification mode can be achieved by hiding the first digital watermark information in the ticket voucher and hiding the second digital watermark information in the radio frequency tag information. Through the anti-counterfeiting verification of the last level, the counterfeiting difficulty is greatly improved, and the anti-counterfeiting detection of the bill voucher can be effectively completed.
S406: and obtaining an anti-counterfeiting verification result according to the first digital watermark information and the second digital watermark information, and sending the verification result to the corresponding intelligent equipment.
The dual digital watermark in step S405 is difficult to be cracked, so that the corresponding verification result can be obtained by directly judging the first digital watermark information and the second digital watermark information in this step, and when the verification passes, the result which is a genuine product can be sent to the corresponding intelligent device for the user to know.
In order to facilitate the transaction of the electronic ticket, in this embodiment, a method for improving the concealment of the digital watermark in the electronic ticket certificate is further designed. The embedding of the digital watermark information also needs certain concealment, and if the concealment of the digital watermark information is high, the difficulty of the final imitation is also higher.
In the prior art, digital watermarks can be embedded according to capital letters and small letters, and can also be embedded by additionally adjusting the node types of labels and changing the attribute sequence of the labels. At that time, the above-mentioned hidden nature has a certain problem, and is easy to be identified and broken by counterfeiters. Therefore, in the embodiment, a mode of constructing information based on the characteristics of the bill voucher is designed.
In this embodiment, it is more preferable that, before step S401, the method further includes the following steps:
s4001: and extracting each sub-block of the DOM tree of the acquired bill voucher according to a depth-first traversal algorithm, wherein the sub-block comprises a class attribute and an id attribute.
Depth-first search is a method that is used more early in the development of crawlers. Its purpose is to reach the leaf nodes of the searched structure (i.e. those HTML documents that do not contain any hyperlinks). In an HTML file, when a hyperlink is selected, the linked HTML file will perform a depth-first search, i.e., the individual chains must be searched in their entirety before searching for the remaining hyperlink results. The depth-first search goes along hyperlinks on the HTML file until no more depth is possible, then returns to an HTML file, and continues to select other hyperlinks in the HTML file. When no more hyperlinks are available, the search is said to have ended. The class attribute and the id attribute of each sub-block in the bill voucher file can be obtained through a traversal algorithm.
S4002: and preprocessing the obtained subblocks. And checking whether the blocks contain class attributes and id attributes through a preprocessing function, if not, adding corresponding attribute values to the blocks, and finding the blocks which meet the requirements, wherein the blocks can comprise a commercial acceptance bill module, a payee module, a payer module, a bill amount module, a two-dimensional code display module and the like.
S4003: and embedding the watermark information into the class attribute of the corresponding sub-block by adopting a random function. When the method is set in the embodiment, a specific position limiting mode is not adopted, but a random mode is adopted for embedding, so that the possibility of counterfeiting is greatly increased. When the watermark is embedded, the watermark can be randomly embedded into one of a commercial acceptance draft module, a payee module, a payer module, a draft amount module and a two-dimensional code display module.
S3004: and obtaining the bill voucher with the first digital watermark information.
According to the structural characteristics of the bill voucher, the blocking efficiency and the content modification and positioning are greatly improved, the watermark is embedded into the class attribute value, additional label elements are not required to be added, the concealment and the watermark capacity are guaranteed and improved, and finally the random scrambling and watermark embedding mode is carried out according to the label id value, so that the bill voucher node can resist the addition and deletion of nodes aiming at the bill voucher. Through the id attribute value, the change influence of the position of the watermark block is not enough, and the extraction of watermark information is ensured.
The embodiment of the present application further provides a digital watermark encryption processing flow, where the embedding of the watermark information into the corresponding sub-block class attribute by using a random function includes:
s4003 a: and obtaining an embedding relation index table between the watermark information and each sub-block according to the first key and the id attributes of all the sub-blocks.
More preferably, an embedding relationship index table between the watermark information and each sub-block is obtained according to the first key and the id attribute of the sub-block in combination with a random scrambling function.
S4003 b: acquiring an id value of the embedding position of the target sub-block according to the embedding relation index table, and carrying out encryption operation on the id value of the target sub-block according to a second key to obtain a first encrypted watermark;
s4003 c: acquiring id values of other sub-blocks according to the embedding relation index table, and carrying out encryption operation on the id values of the other sub-blocks according to a third key to obtain a second encrypted watermark;
s4003 d: and scrambling the first encrypted watermark and the second encrypted watermark, and recombining and embedding the scrambled first encrypted watermark and the second encrypted watermark into the class attribute of the corresponding sub-block.
The basic principle of the steps is to store the extracted sub-blocks into a list container, then randomly scramble the container, and the sequence of the blocks after scrambling is the corresponding watermark embedding sequence. The watermark information after the scrambling function can not distinguish all parts of the watermark information under the condition of no secret key, then the character string is mapped into ciphertext watermark information, and all information can not be analyzed normally due to the modification of the watermark information. The digital watermark is difficult to be broken through the steps.
More preferably, the first key, the second key and the third key are all different. I.e. security is improved by means of a multi-level key.
Besides the above mentioned integration of the watermark information into the bill voucher, the provided process of embedding the digital watermark into the two-dimensional code image information is also provided, the first digital watermark information is set in the two-dimensional code image information of the bill voucher, and the first digital watermark information is embedded into the corresponding two-dimensional code image information through the following steps:
s4000 a: acquiring a two-dimensional code original image, and acquiring a coding region and a non-coding region of the two-dimensional code original image;
s4000 b: converting the received anti-counterfeiting identification information to obtain corresponding array information;
s4000 c: generating a digital watermark pattern matched with the two-dimensional code according to the array information;
s4000 d: and embedding the digital watermark pattern into the non-coding region to obtain two-dimensional code image information.
Since the two-dimensional code itself has a certain concealment property and does not directly display information, there is a certain advantage in the aspect of hiding watermark information. When the two-dimensional code and the digital watermark are fused, the two-dimensional code and the digital watermark are independently arranged and separately identified. That is, when the anti-counterfeiting information of the bill voucher is identified, the digital watermark hidden in the two-dimensional code cannot be directly identified, and when the digital watermark is embedded, the digital watermark is arranged in a non-coding area in the two-dimensional code, so that the composition of the digital watermark does not influence the identification of the two-dimensional code.
More preferably, before step S401, the method further includes:
receiving a first identification sequence corresponding to the bill voucher, wherein the first identification sequence comprises two-dimensional code image information and radio frequency label information which are sequentially identified; or
And receiving a second identification sequence corresponding to the bill voucher, wherein the second identification sequence comprises the radio frequency tag information and the two-dimensional code image information which are sequentially identified.
The above is also the encryption setting that is generated when the electronic ticket voucher is exchanged. Not only the identification mode is set, but also the corresponding identification sequence is set, and if the sequence is not correct, the corresponding information cannot be identified. Often these simple designs are easily missed by attackers.
The multi-stage anti-counterfeiting verification mode, the random embedding mode of the digital watermark and the design of the identification sequence enable the bill voucher to be imitated into an impossible event, the safety of the bill voucher transaction is greatly improved, and a user is enabled to be more concentrated in the transaction rather than the authenticity of the transaction.
The method comprises the steps of respectively identifying two-dimensional code image information and radio frequency label information, performing anti-counterfeiting primary identification in a combined verification mode, and performing anti-counterfeiting secondary identification by extracting first digital watermark information in a bill voucher and second digital watermark information in the radio frequency label information for identification verification; only if all the identification modes are successful, the corresponding bill voucher can be judged to be true. The method has the advantages that the recognition accuracy is greatly improved through a multi-stage recognition mode, the counterfeit difficulty of the bill and the voucher is improved, and the transaction safety is improved.
Example two:
on the basis of the above embodiment, fig. 6 is a schematic structural diagram of a bill voucher anti-counterfeiting detection device based on a block chain according to the second embodiment of the present application. Referring to fig. 6, the bill evidence anti-counterfeit detection device based on the block chain provided in this embodiment specifically includes: a selection module 21, a comparison module 22 and an output module 23.
The selecting module 21 is configured to collect identification information of a bill voucher through a front-end node, select a corresponding block node as a detection node based on identity information of a plurality of block nodes, and send the identification information to the detection node, where each block node is configured with a verification information database for matching and comparing the identification information;
the comparison module 22 is configured to receive the identification information through the detection node, perform matching comparison based on the identification information, generate a corresponding matching result, and return the matching result and the identity information of the matching result to the front-end node;
the output module 23 is configured to receive the matching result and the identity information through the front-end node, determine whether the matching result is valid based on the identity information, and output a detection result of the corresponding ticket credential if the matching result is valid.
The identification information of the bill voucher is collected through the front end node, the corresponding block nodes are selected as the detection nodes based on the identity information of the plurality of block nodes, the identification information is sent to the detection nodes, the detection nodes perform matching comparison to generate corresponding matching results, and the matching results and the identity information of the detection nodes are returned to the front end node. And then, the front-end node judges whether the matching result is valid or not based on the identity information, and if the matching result is valid, the detection result of the corresponding bill voucher is output. By adopting the technical means, the detection efficiency and the safety of the anti-counterfeiting detection of the bill voucher can be guaranteed by selecting the detection node, the condition that the processing efficiency is influenced by heavy detection service is avoided, the conditions of wrong detection result, counterfeiting and the like are avoided through identity information verification, and the accuracy and the safety of the anti-counterfeiting detection of the bill voucher are further guaranteed.
Specifically, the selecting module 21 includes:
and the selection unit is used for selecting the corresponding block node from the plurality of block nodes as a detection node according to a preset selection rule, wherein the selection rule is constructed based on a detection service average distribution principle.
Specifically, the comparing module 22 includes:
the first comparison unit is used for receiving the identification information, performing matching comparison based on a verification information database of the first comparison unit and generating first comparison result data corresponding to the identification information;
the second comparison unit is used for sending the identification information to the designated block nodes and receiving second comparison result data returned by each designated block node;
a determining unit, configured to determine, based on the first comparison result data and each of the second comparison result data, a matching result of the identification information through a consensus mechanism of a block chain.
Specifically, the output module 23 includes:
a receiving unit, configured to receive, through the front-end node, the matching result and the corresponding identity information returned by each detection node;
a judging unit configured to determine the matching result judged to be valid based on the corresponding identity information;
and the consensus unit is used for determining the detection result of the bill voucher through a consensus mechanism of the block chain based on the matching result judged to be valid.
The recording unit is used for determining a matching result different from the detection result and generating an error matching record of the corresponding block node;
and the warning unit is used for carrying out safety warning on the block nodes of which the number of the error matching records reaches the set number in the set time period.
The bill voucher anti-counterfeiting detection device based on the block chain provided by the second embodiment of the application can be used for executing the bill voucher anti-counterfeiting detection method based on the block chain provided by the first embodiment of the application, and has corresponding functions and beneficial effects.
Example three:
the present application further provides a storage medium containing computer executable instructions, which when executed by a computer processor, are configured to perform a block chain-based method for counterfeit detection of a ticket certificate, where the block chain-based method for counterfeit detection of a ticket certificate includes: the method comprises the steps that a front end node collects identification information of a bill voucher, selects corresponding block nodes as detection nodes based on identity information of a plurality of block nodes, and sends the identification information to the detection nodes, wherein each block node is provided with a verification information database for matching and comparing the identification information; the detection node receives the identification information, performs matching comparison based on the identification information, generates a corresponding matching result, and returns the matching result and the identity information of the detection node to the front-end node; and the front-end node receives the matching result and the identity information, judges whether the matching result is valid or not based on the identity information, and outputs a corresponding detection result of the bill voucher if the matching result is valid.
Storage medium-any of various types of memory devices or storage devices. The term "storage medium" is intended to include: mounting media such as CD-ROM, floppy disk, or tape devices; computer system memory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM, Lanbas (Rambus) RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. The storage medium may also include other types of memory or combinations thereof. In addition, the storage medium may be located in a first computer system in which the program is executed, or may be located in a different second computer system connected to the first computer system through a network (such as the internet). The second computer system may provide program instructions to the first computer for execution. The term "storage medium" may include two or more storage media residing in different locations, e.g., in different computer systems connected by a network. The storage medium may store program instructions (e.g., embodied as a computer program) that are executable by one or more processors.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the above-mentioned block chain-based method for detecting counterfeit prevention of ticket vouchers, but may also perform related operations in the block chain-based method for detecting counterfeit prevention of ticket vouchers provided in any of the embodiments of the present application.
The block chain-based bill and voucher anti-counterfeiting detection device, the storage medium and the electronic device provided in the above embodiments may execute the block chain-based bill and voucher anti-counterfeiting detection method provided in any embodiment of the present application, and reference may be made to the block chain-based bill and voucher anti-counterfeiting detection method provided in any embodiment of the present application without detailed technical details described in the above embodiments.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.

Claims (9)

1. A bill voucher anti-counterfeiting detection method based on a block chain is characterized by comprising the following steps:
the method comprises the steps that a front end node collects identification information of a bill voucher, selects corresponding block nodes as detection nodes based on identity information of the block nodes, sends the identification information to the detection nodes, each block node is provided with a verification information database used for matching and comparing the identification information, receives reply information of the detection nodes in a set receiving period after sending the identification information, fails to send the identification information if the reply information of the detection nodes is not received in the receiving period, resends the identification information to the detection nodes, and reselects one block node from the block nodes as a detection node based on a preset selection rule if the continuous sending of the identification information fails within a set number of times;
the detection node receives the identification information, performs matching comparison based on the identification information, generates a corresponding matching result, and returns the matching result and the identity information of the detection node to the front-end node;
the front-end node receives the matching result and the identity information, judges whether the matching result is valid or not based on the identity information, and outputs a detection result of the corresponding bill voucher if the matching result is valid;
selecting the corresponding block nodes as detection nodes based on the identity information of the plurality of block nodes, wherein the method comprises the following steps:
and selecting the corresponding block node from the plurality of block nodes as a detection node according to a preset selection rule, wherein the selection rule is constructed based on a detection service average distribution principle.
2. The bill voucher anti-counterfeiting detection method based on the block chain as claimed in claim 1, wherein a plurality of detection nodes are selected from the corresponding block nodes as the detection nodes based on the identity information of the plurality of block nodes;
correspondingly, the front-end node receives the matching result and the identity information, judges whether the matching result is valid based on the identity information, and if the matching result is valid, outputs a corresponding detection result of the bill voucher, including:
the front-end node receives the matching result and the corresponding identity information returned by each detection node;
determining the matching result judged to be valid based on the corresponding identity information;
and determining the detection result of the bill voucher through a consensus mechanism of a block chain based on the matching results judged to be effective.
3. The method for anti-counterfeit detection of bill voucher based on block chain as claimed in claim 2, further comprising after determining the detection result of the bill voucher through a consensus mechanism of block chain based on the matching result judged to be valid:
determining a matching result different from the detection result, and generating an error matching record of the corresponding block node;
and carrying out safety warning on the block nodes with the error matching records reaching the set number in the set time period.
4. The bill voucher anti-counterfeiting detection method based on the block chain as claimed in claim 1, wherein the detection node receives the identification information, performs matching comparison based on the identification information, and generates a corresponding matching result, comprising:
receiving the identification information, and performing matching comparison based on a verification information database of the identification information to generate first comparison result data corresponding to the identification information;
sending the identification information to the designated block nodes, and receiving second comparison result data returned by each designated block node;
and determining a matching result of the identification information through a consensus mechanism of a block chain based on the first comparison result data and each second comparison result data.
5. The block chain-based bill voucher anti-counterfeiting detection method according to claim 1, wherein judging whether the matching result is valid based on the identity information comprises:
and comparing the identity information with the identity information of the detection node, judging that the matching result is valid if the identity information is the same as the identity information of the detection node, and judging that the matching result is invalid if the identity information is different from the identity information of the detection node.
6. The block chain-based bill voucher anti-counterfeiting detection method according to claim 1, wherein the sending of the identification information to the detection node comprises:
encrypting the identification information by using a public key, and sending the encrypted identification information to the detection node;
correspondingly, the receiving, by the detection node, the identification information includes:
and the detection node decrypts the identification information by using a private key corresponding to the public key.
7. The blockchain-based ticket credential anti-counterfeiting detection method according to claim 1, wherein the identification information comprises authentication information of the front-end node;
correspondingly, the receiving, by the detection node, the identification information includes:
and the detection node extracts the authentication information from the identification information, compares the authentication information with a pre-stored front-end node information table and judges whether the identification information is valid or not.
8. A bill voucher anti-counterfeiting detection device based on a block chain is characterized by comprising:
a selecting module, configured to collect identification information of a ticket voucher through a front-end node, select a corresponding block node as a detection node based on identity information of a plurality of block nodes, send the identification information to the detection node, where each block node is configured with a verification information database for matching and comparing the identification information, after the identification information is sent, the reply information of the detection node is received in a set receiving period, if the reply information of the detection node is not received in the receiving period, the sending of the identification information fails, the front-end node resends the identification information to the detection node, if the sending of the identification information continuously fails within the set number of times, the front-end node reselects one block node from the plurality of block nodes as a detection node based on a preset selection rule;
the comparison module is used for receiving the identification information through the detection node, performing matching comparison based on the identification information, generating a corresponding matching result, and returning the matching result and the identity information of the matching result to the front-end node;
the output module is used for receiving the matching result and the identity information through the front end node, judging whether the matching result is valid or not based on the identity information, and if the matching result is valid, outputting a detection result of the corresponding bill voucher;
selecting the corresponding block nodes as detection nodes based on the identity information of the plurality of block nodes, wherein the method comprises the following steps:
and selecting the corresponding block node from the plurality of block nodes as a detection node according to a preset selection rule, wherein the selection rule is constructed based on a detection service average distribution principle.
9. A storage medium containing computer executable instructions for performing the method of anti-counterfeit detection of voucher based on blockchain according to any one of claims 1 to 7 when executed by a computer processor.
CN202010438347.XA 2020-05-21 2020-05-21 Bill certificate anti-counterfeiting detection method and device based on block chain Active CN111612964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010438347.XA CN111612964B (en) 2020-05-21 2020-05-21 Bill certificate anti-counterfeiting detection method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010438347.XA CN111612964B (en) 2020-05-21 2020-05-21 Bill certificate anti-counterfeiting detection method and device based on block chain

Publications (2)

Publication Number Publication Date
CN111612964A CN111612964A (en) 2020-09-01
CN111612964B true CN111612964B (en) 2021-01-26

Family

ID=72203558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010438347.XA Active CN111612964B (en) 2020-05-21 2020-05-21 Bill certificate anti-counterfeiting detection method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111612964B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114240451B (en) * 2021-11-15 2022-05-17 国网电子商务有限公司 Product tracing method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886722A (en) * 2017-03-23 2017-06-23 中国联合网络通信集团有限公司 Big data information processing method and device
US10320574B2 (en) * 2017-05-05 2019-06-11 International Business Machines Corporation Blockchain for open scientific research
CN107730280A (en) * 2017-10-18 2018-02-23 上海唯链信息科技有限公司 A kind of design and realization of the Antiforge system based on block chain technology
CN108985790A (en) * 2018-06-25 2018-12-11 平安科技(深圳)有限公司 Method for anti-counterfeit, system, computer equipment and storage medium based on block chain
CN110517049A (en) * 2019-07-25 2019-11-29 初建刚 A kind of bill anti-counterfeit recognition methods and device based on two dimensional code and block chain
CN111178219A (en) * 2019-12-24 2020-05-19 泰康保险集团股份有限公司 Bill identification management method and device, storage medium and electronic equipment
CN111143883B (en) * 2019-12-31 2021-08-03 支付宝(杭州)信息技术有限公司 Digital content evidence obtaining method, device and equipment based on block chain

Also Published As

Publication number Publication date
CN111612964A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN111612966B (en) Bill certificate anti-counterfeiting detection method and device based on image recognition
CN111612963B (en) Bill voucher anti-counterfeiting detection method and device based on intelligent equipment
CN105763521B (en) A kind of device authentication method and device
CN101593324B (en) Method and system for network multi-level approval based on dependable computing application technique
RU2018105186A (en) VERIFICATION OF PORTABLE CONSUMER DEVICES
US10410214B2 (en) System and method for financial transaction validation
KR101934444B1 (en) A Managing Method Of The Integrity Data of Documents Or Securities
US20060015733A1 (en) Process and system for the material reduction of counterfeit and identity-maker fraud
US20060153380A1 (en) Personal cryptoprotective complex
US20100067691A1 (en) Document certification and authentication system
CN101174949B (en) Biological authentication method and system
CN105225359B (en) Based on Quick Response Code without card withdrawal method and finger print identifying server
CN110674523A (en) Method for confirming electronic contract signer by combining digital signature with handwritten signature
KR100991855B1 (en) System for Issuing and Verifying Electronic Document, Method for Issuing Electronic Document and Method for Verifying Electronic Document
CN102129589A (en) Asymmetric encryption two-dimension code anti-counterfeiting method
US20050273628A1 (en) Registration and Verification System
CN103136676A (en) Two-dimension code anti-counterfeiting system recognized by mobile phone automatically and usage method thereof
CN110517049A (en) A kind of bill anti-counterfeit recognition methods and device based on two dimensional code and block chain
CN107423960A (en) The management method and its system of a kind of digital ticket
US8931688B2 (en) System and method for currency validation
Mthethwa et al. Proposing a blockchain-based solution to verify the integrity of hardcopy documents
CN111612964B (en) Bill certificate anti-counterfeiting detection method and device based on block chain
KR101876672B1 (en) Digital signature method using block chain and system performing the same
Dlamini et al. Mitigating the challenge of hardcopy document forgery
KR20160026387A (en) Securities with o i d code pattern and system and method for preventing product falsification using the same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant