CN105678365B - Two-dimensional code electronic ticket generating method and system, verification method and verification terminal - Google Patents

Two-dimensional code electronic ticket generating method and system, verification method and verification terminal Download PDF

Info

Publication number
CN105678365B
CN105678365B CN201410659307.2A CN201410659307A CN105678365B CN 105678365 B CN105678365 B CN 105678365B CN 201410659307 A CN201410659307 A CN 201410659307A CN 105678365 B CN105678365 B CN 105678365B
Authority
CN
China
Prior art keywords
dimensional code
attribute information
verification
ticket
electronic ticket
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
CN201410659307.2A
Other languages
Chinese (zh)
Other versions
CN105678365A (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.)
Aisino Corp
Original Assignee
Aisino Corp
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 Aisino Corp filed Critical Aisino Corp
Priority to CN201410659307.2A priority Critical patent/CN105678365B/en
Publication of CN105678365A publication Critical patent/CN105678365A/en
Application granted granted Critical
Publication of CN105678365B publication Critical patent/CN105678365B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a two-dimensional code electronic ticket generating method and a generating system, wherein the method comprises the following steps: A) generating a set of public and private keys for a specified ticketing campaign; B) assigning a unique number and verification entrance information to a ticket in the ticketing campaign; C) encrypting selected attribute information in basic attribute information of the entrance ticket, which contains a unique number and verification entrance information, by using the private key to obtain a selected attribute information ciphertext of the entrance ticket, wherein the public key is used for being provided to a verification terminal to decrypt the selected attribute information ciphertext; and D) generating a two-dimensional code electronic ticket of the entrance ticket by using the basic attribute information and the selected attribute information ciphertext. In addition, the invention also provides a verification method and a verification terminal of the two-dimensional code electronic ticket. The invention realizes the authenticity judgment of the electronic entrance ticket, the shunting of the verification of the electronic entrance ticket and the repeated use of the electronic entrance ticket, and can solve the safety verification problem of the electronic entrance ticket under the network-free environment.

Description

Two-dimensional code electronic ticket generating method and system, verification method and verification terminal
Technical Field
The invention relates to the technical field of electronic tickets, in particular to a two-dimensional code electronic ticket generation method, a two-dimensional code electronic ticket verification method, a two-dimensional code electronic ticket generation system and a two-dimensional code electronic ticket verification terminal.
Background
The electronic ticket is an electronic form of a paper ticket, a ticket seller sells the ticket through a network, and a user orders and pays the ticket on line to obtain an electronic ticket. The ticket seller sells the electronic ticket through the network, so that the labor cost, the operation cost, the printing cost and the transportation cost of the paper ticket are reduced; ticket purchasers can purchase tickets on the internet without queuing to purchase tickets on site. At present, a two-dimensional code encoding mechanism can contain large-capacity information and has high scanning and analyzing efficiency, so that the two-dimensional code encoding mechanism becomes a widely used presentation form of an electronic ticket.
The electronic ticket brings convenience, and meanwhile, the problems of fake tickets and multiple purposes of one ticket of the traditional paper tickets also face in the application of the current electronic ticket, most of the electronic tickets are connected with a background server through a network, and the data of the electronic ticket and the data of a server side are inquired and compared to avoid the problem of repeated use of the ticket. However, due to the problems that the network infrastructure of the entrance ticket detection site is insufficient, the quality of a mobile network is poor due to the gathering of a large number of staff in the venue, and the like, the online ticket checking mechanism connected with the server cannot work well in a scene with a poor network environment, and offline ticket checking becomes a problem to be solved urgently in electronic ticket application.
Disclosure of Invention
In order to overcome the defects and shortcomings in the prior art, the embodiment of the invention provides a two-dimensional code electronic ticket generation method, a two-dimensional code electronic ticket verification method, a two-dimensional code electronic ticket generation system and a two-dimensional code electronic ticket verification terminal.
Specifically, the two-dimensional code electronic ticket generating method provided by the embodiment of the present invention includes the steps of: A) generating a set of public and private keys for a specified ticketing campaign; B) assigning a unique number and verification entrance information to a ticket in the ticketing campaign; C) encrypting selected attribute information in the basic attribute information of the entrance ticket, which comprises the unique number and verification entrance information, by using the private key to obtain a selected attribute information ciphertext of the entrance ticket, wherein the public key is used for being provided to a verification terminal to decrypt the selected attribute information ciphertext; and D) generating a two-dimensional code electronic ticket of the entrance ticket by using the basic attribute information containing the unique number and the verification entrance information and the selected attribute information ciphertext.
In an embodiment of the present invention, step C) specifically includes: calculating a hash value of the selected attribute information of the entrance ticket, and then encrypting the hash value by using the private key to obtain a hash value ciphertext serving as the selected attribute information ciphertext; the two-dimensional code electronic ticket generating method further comprises the following steps: performing base64 encoding on the hash value ciphertext to obtain base64 encoded data of the hash value ciphertext; and step D) specifically comprises: and generating the two-dimensional code electronic ticket by using the basic attribute information containing the unique number and the verification entry information and the base64 coded data of the hash value ciphertext.
In addition, the two-dimensional code electronic ticket verification method provided by the embodiment of the invention is applied to a verification terminal. Specifically, the two-dimensional code electronic ticket verification method comprises the following steps: a) acquiring two-dimensional code data in the two-dimensional code electronic ticket; b) analyzing basic attribute information containing a unique number and verification entry information of the ticket and a selected attribute information ciphertext from the two-dimensional code data, wherein the selected attribute information ciphertext is obtained by performing encryption operation on a group of public keys and private keys in the private keys which are generated for ticket business activities in the process of generating the two-dimensional code electronic ticket; c) decrypting the selected attribute information ciphertext by using the public key, and comparing whether the selected attribute information obtained by decryption is matched with the selected attribute information in the basic attribute information analyzed from the two-dimensional code data to judge the authenticity of the two-dimensional code electronic ticket; d) judging whether the two-dimensional code electronic ticket is verified at the verification terminal or not by using the verification entrance information; e) and when the two-dimension code electronic ticket is judged to be verified at the verification terminal, judging whether the two-dimension code electronic ticket is used or not by using the unique number.
In an embodiment of the present invention, the two-dimensional code electronic ticket verification method further includes the steps of: and when the two-dimension code electronic ticket is judged to be a true ticket, recording the unique number of the entrance ticket.
In one embodiment of the present invention, in step b), the selected attribute information ciphertext is in the form of base64 encoded data of a hash value ciphertext; accordingly, in step c): and performing base64 decoding on base64 encoded data of the hash value ciphertext to obtain the hash value ciphertext, decrypting the hash value ciphertext by using the public key to obtain a hash value plaintext, and comparing the hash value plaintext obtained by decryption with a hash value obtained by performing hash operation on selected attribute information containing the unique number and the ticket checking entry information to judge the authenticity of the two-dimensional code electronic ticket.
In one embodiment of the invention, step d) comprises: and comparing whether the verification entrance information is consistent with the verification entrance information bound by the verification terminal to judge whether the two-dimensional code electronic ticket is verified at the verification terminal.
In one embodiment of the invention, step e) comprises: and inquiring whether the unique number exists in a local storage of the verification terminal by using the unique number to judge whether the two-dimensional code electronic ticket is used.
In an embodiment of the present invention, the two-dimensional code electronic ticket verification method further includes the steps of: and acquiring the public key, the unique number of the verification terminal and verification entrance information bound with the verification terminal from a two-dimensional code electronic ticket server.
Furthermore, a two-dimensional code electronic ticket generating system provided by the embodiment of the present invention includes: the key generation module is used for generating a group of public keys and private keys for the designated ticket business; the information distribution module is used for distributing a unique number and verification entrance information for a ticket in the ticket business; a private key encryption module, configured to encrypt selected attribute information in basic attribute information of the ticket, which includes the unique number and verification entry information, using the private key to obtain a selected attribute information ciphertext, where the selected attribute information at least includes the unique number and the verification entry information in the basic attribute information, and the public key is used to be provided to a verification terminal to decrypt the selected attribute information ciphertext; and the two-dimension code electronic ticket generating module is used for generating the two-dimension code electronic ticket of the entrance ticket by using the basic attribute information and the selected attribute information ciphertext.
In an embodiment of the present invention, the two-dimensional code electronic ticket generating system further includes a base64 encoding module; the encryption module is specifically configured to: calculating a hash value of the selected attribute information, and then encrypting the hash value by using the private key to obtain a hash value ciphertext of the selected attribute information; the base64 encoding module is configured to base64 encode the hash value ciphertext to obtain base64 encoded data of the hash value ciphertext; and the two-dimensional code electronic ticket generating module is specifically configured to generate the two-dimensional code electronic ticket by using the basic attribute information including the unique number and the verification entry information and the base64 encoded data of the hash value ciphertext.
In addition, an embodiment of the present invention provides a two-dimensional code electronic ticket verification terminal, including: the scanning module is used for acquiring two-dimensional code data in the two-dimensional code electronic ticket; the analysis module is used for analyzing basic attribute information of the entrance ticket, which contains attribute information such as a unique number, verification entrance information and the like, and a selected attribute information ciphertext from the two-dimensional code data, wherein the selected attribute information ciphertext is obtained by performing encryption operation on a group of public keys and a private key in the private key, which are generated for a ticketing event, in the generation process of the two-dimensional code electronic ticket; the authenticity judgment module is used for decrypting the selected attribute information ciphertext by using the public key and judging whether the selected attribute information obtained after decryption is matched with the selected attribute information in the basic attribute information analyzed from the two-dimensional code data or not so as to judge the authenticity of the two-dimensional code electronic ticket; the verification entrance judging module is used for judging whether the two-dimensional code electronic ticket is verified at the verification terminal by utilizing the verification entrance information; and the use state judgment module is used for judging whether the two-dimensional code electronic ticket is used or not by using the unique number.
In an embodiment of the present invention, in the two-dimensional code electronic ticket verification terminal, the selected attribute information ciphertext is in the form of base64 encoded data of a hash value ciphertext; correspondingly, the authenticity judgment module is specifically configured to perform base64 decoding on base64 encoded data of the hash value ciphertext to obtain the hash value ciphertext, decrypt the hash value ciphertext by using the public key to obtain a hash value plaintext, and compare the hash value plaintext obtained after decryption with a hash value obtained by performing hash operation on selected attribute information including the ticket unique number and the verification entry information in the basic attribute information to judge authenticity of the two-dimensional code electronic ticket.
Therefore, the embodiment of the invention provides a secure two-dimensional code electronic ticket system capable of off-line ticket checking, which can generate a group of public and private keys for each ticketing event by a server, and then generate a two-dimensional code electronic ticket protected by private key encryption according to an order request submitted by a ticket purchaser, wherein the two-dimensional code electronic ticket comprises information such as a unique number of an entrance ticket, verification entrance information, other necessary entrance ticket attribute information, a hash value of selected attribute information of the entrance ticket, and a hash value ciphertext obtained by encrypting the hash value of the selected attribute information of the entrance ticket by the private key of the ticketing event; before ticket checking, a verification terminal obtains a public key of a ticket event to be checked and a verification entrance in charge of the public key from a server, whether the ticket event is a true ticket or not can be judged by comparing a hash value ciphertext decrypted by the public key with a hash value calculated by attribute information selected by the ticket during ticket checking, verification entrance information is read from a two-dimensional electronic ticket to judge whether the verification entrance is correct or not, a unique number of the ticket is read to inquire a local record to judge whether the ticket is used or not, and a holder of the two-dimensional electronic ticket can pass after the verification terminal judges that the ticket is true, the ticket checking entrance is correct and the ticket is not used. Therefore, the embodiment of the invention can realize the ticket authenticity identification, the entrance personnel shunting and the repeated use of the tickets under the network-free environment by encrypting and decrypting the ticket information, agreeing the electronic ticket verification entrance and recording the unique serial number of the electronic ticket by the verification terminal, and is a safe and simple off-line ticket checking method without the participation of a user. In addition, according to the two-dimensional code electronic ticket provided by the embodiment of the invention, a ticket purchaser does not need to install a mobile APP, and only the two-dimensional code electronic ticket image needs to be displayed during verification, and the two-dimensional code electronic ticket can also be printed into paper for verification.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical means of the present invention more clearly understood, the present invention may be implemented in accordance with the content of the description, and in order to make the above and other objects, features, and advantages of the present invention more clearly understood, the following preferred embodiments are described in detail with reference to the accompanying drawings.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for generating a two-dimensional code electronic ticket according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating steps of a two-dimensional code electronic ticket verification method according to an embodiment of the present invention.
Fig. 3 is a schematic functional module diagram of a two-dimensional code electronic ticket generating system according to an embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating functional modules of a two-dimensional code electronic ticket verification terminal according to an embodiment of the present invention.
Detailed Description
To further explain the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be provided with reference to the accompanying drawings and preferred embodiments for describing specific embodiments, structures, features and effects thereof.
Please refer to fig. 1, which is a flowchart illustrating a method for generating a two-dimensional electronic ticket according to an embodiment of the present invention. As shown in fig. 1, in the two-dimensional code electronic ticket generating method of this embodiment, first, the two-dimensional code electronic ticket generating system generates a set of public key and private key for the ticket event, where the private key is used to encrypt selected attribute information in the basic attribute information of the ticket. In this embodiment, the basic attribute information includes, for example and without limitation, information such as a subsequently assigned unique number, authentication entry information, a name of an electronic ticket purchaser, a mobile phone number, an event name, an event location, an event date, an event time, a seat number, and the like, so as to ensure authenticity of the generated two-dimensional code electronic ticket; the public key is used for subsequent provision to the verification terminal for decrypting the ciphertext of the selected attribute information encrypted by the private key.
After necessary information of the entrance ticket is obtained, the two-dimensional code electronic ticket generating system distributes a unique number and verification entrance information to the entrance ticket, calculates a hash value of selected attribute information of the entrance ticket, including the unique number, the verification entrance information and other attribute information, and the like, carries out encryption operation on the calculated hash value by using a private key of the ticket event to obtain a hash value ciphertext, carries out base64 encoding on the hash value ciphertext, and then generates a two-dimensional code electronic ticket corresponding to the entrance ticket by using basic attribute information of the entrance ticket, including the unique number, the verification entrance information and other necessary attribute information, and base64 encoding data of the hash value ciphertext.
In this embodiment, the hash value is calculated for the selected attribute information of the ticket, and the base64 encoding is performed on the hash value ciphertext, so that the information capacity of the two-dimensional code electronic ticket can be reduced, and the identification rate can be improved. Thus, it is to be understood that in other embodiments, it is also contemplated that the selected attribute information may be directly encrypted and used using the private key of the ticketing campaign without performing hash value calculation and/or base64 encoding operations; alternatively, other algorithms may be used to pre-process the selected attribute information of the ticket before the private key is used for encryption and/or other algorithms may be used for encoding after the private key is used for encryption, and the algorithm is not limited to the hash algorithm and the base64 encoding algorithm of the present embodiment.
Please refer to fig. 3, which is a functional module diagram of a two-dimensional code electronic ticket generating system according to an embodiment of the present invention. As shown in fig. 3, the two-dimensional code electronic ticket generating system 30 of the present embodiment is responsible for generating a two-dimensional code electronic ticket according to an order form of a user, and includes: the system comprises a key generation module 31, an information distribution module 33, a private key encryption module 35, a base64 encoding module 37 and a two-dimensional code electronic ticket generation module 39.
Specifically, the two-dimensional code electronic ticket generating system 30 may be configured to execute the two-dimensional code electronic ticket generating method according to the foregoing embodiment of the present invention. Wherein, the key generating module 31 is used for generating a set of public key and private key for a specific ticket activity, for example; the information distribution module 33 is used for distributing a unique number and verification entrance information for a ticket in the ticket event; the private key encryption module 35 is, for example, configured to encrypt a hash value (i.e., an expression of the selected attribute information) of the selected attribute information of the ticket using a private key of the ticketing event to obtain a hash value ciphertext; the base64 encoding module 37 is, for example, configured to base64 encode the hash value ciphertext of the selected attribute information to obtain base64 encoded data of the hash value ciphertext; the two-dimensional code electronic ticket generating module 39 is, for example, configured to generate a two-dimensional code electronic ticket corresponding to the ticket by using base64 encoded data of the ticket, which includes basic attribute information including a unique number and verification entry information, and a hash value ciphertext. It should be understood that the two-dimensional code electronic ticket generating system 30 of the present embodiment may also omit the base64 encoding module, or replace the base64 encoding module with another encoding module; in addition, the private key encryption module 35 may also directly perform an encryption operation on the selected attribute information using the private key of the ticketing campaign, instead of performing an encryption operation on the hash value thereof.
Please refer to fig. 2, which is a flowchart illustrating a two-dimensional electronic ticket verification method according to an embodiment of the present invention. As shown in fig. 2, in the two-dimensional code electronic ticket verification method of this embodiment, first, a verification terminal needs to obtain a public key of the ticketing event, a unique number assigned to the verification terminal, and verification entry information binding the verification terminal (i.e., binding the unique number of the verification terminal) from a service system of the two-dimensional code electronic ticket (e.g., the two-dimensional code electronic ticket generation system 30 in fig. 3), so that the verification terminal is subsequently responsible for verifying only the two-dimensional code electronic ticket with the binding verification entry information.
And then, during ticket checking and verification, the verification terminal scans the two-dimensional electronic ticket to obtain two-dimensional code data contained in the two-dimensional electronic ticket, and analyzes the obtained two-dimensional code data to obtain base64 coded data of a ticket corresponding to the two-dimensional electronic ticket, wherein the base attribute information comprises a unique number, verification entrance information and other necessary information, and a hash value ciphertext of the selected attribute information.
After the two-dimensional code data are analyzed, firstly, the authenticity of the current two-dimensional code electronic ticket is judged, which specifically comprises the following steps: base64 decoding is carried out on the base64 coded data of the hash value ciphertext obtained through analysis to obtain the hash value ciphertext, and the decoded hash value ciphertext is decrypted by using the public key of the ticket activity to obtain hash value plaintext hash 2; next, performing hash operation on selected attribute information including the unique number and the verification entry information in the analyzed basic attribute information to obtain a hash value hash 1; and then, comparing whether the hash value hash1 is consistent with the hash value plaintext hash2, if the hash value hash1 is inconsistent with the hash value plaintext hash2, indicating that the current two-dimensional code electronic ticket is a false ticket, otherwise, if the hash value hash1 is consistent with the hash value plaintext hash2, indicating that the current two-dimensional code electronic ticket is a true ticket.
And then, judging whether the current two-dimensional code electronic ticket is verified at the verification terminal by using the verification entrance information obtained by analysis. If the analyzed verification entrance information is not matched with the verification entrance information of the binding verification terminal acquired from the service system previously, the verification terminal indicates that the current two-dimensional code electronic ticket is not verified at the verification terminal, and a ticket holder is prompted to go to a specified verification entrance for ticket checking verification; and if the two are matched, judging whether the current two-dimensional code electronic ticket is used or not by using the unique number of the ticket obtained by analysis. If the unique number of the ticket obtained by analysis is inquired in the local storage of the verification terminal to find that the unique number exists, the fact that the current two-dimensional code electronic ticket is used is prompted, if the unique number cannot be inquired, the fact that the current two-dimensional code electronic ticket is not used is indicated, a ticket holder is allowed to pass, and the unique number of the current two-dimensional code electronic ticket is recorded to the verification terminal to be stored locally; the unique serial number of the electronic ticket does not need to be downloaded to the verification terminal in the verification mode, leakage of the unique serial number of the electronic ticket is prevented, and safety of the electronic ticket scheme is improved.
In addition, after the ticket checking of the ticketing event is finished, the verification record information of the two-dimensional code electronic ticket in the verification terminal needs to be uploaded to a service system of the two-dimensional code electronic ticket, so that the service system of the two-dimensional code electronic ticket can obtain the use condition of the two-dimensional code electronic ticket. In addition, it can be understood that the two-dimensional code electronic ticket verification process is a reverse process of the two-dimensional code electronic ticket generation process to some extent, and therefore whether base64 decoding is required in the two-dimensional code electronic ticket verification process depends on the generation process.
Please refer to fig. 4, which is a schematic diagram of a functional module of a two-dimensional electronic ticket verifying terminal according to an embodiment of the present invention. As shown in fig. 4, the two-dimensional code electronic ticket verifying terminal 40 of the present embodiment implements authenticity judgment and verification of the two-dimensional code electronic ticket and stores a unique number of the two-dimensional code electronic ticket to implement reuse judgment of the two-dimensional code electronic ticket, and includes: a scanning module 41, an analysis module 43, an authenticity judgment module 45, a verification entry judgment module 47 and a use state judgment module 49.
Specifically, the two-dimensional code electronic ticket verification terminal 40 of the present embodiment may be used to execute the two-dimensional code electronic ticket verification method of the foregoing embodiment of the present invention. The scanning module 41 is, for example, configured to acquire two-dimensional code data in a current two-dimensional code electronic ticket; the parsing module 43 is used for parsing out base64 encoded data of a hash value ciphertext of the ticket including the unique number, the verification entry information and other necessary information and the selected attribute information (including the unique number and the verification entry information) from the current two-dimensional code data, for example; the authenticity judgment module 45 is configured to, for example, decrypt the hash value ciphertext by using the public key of the ticketing event, and compare the hash value plaintext obtained after decryption with a hash value obtained by performing hash operation on selected attribute information including a unique number and verification entry information in the basic attribute information analyzed from the two-dimensional code data of the current two-dimensional code electronic ticket to judge authenticity of the current two-dimensional code electronic ticket; the verification entrance judging module 47 is, for example, configured to judge whether the current two-dimensional code electronic ticket is verified at the verification terminal by using the verification entrance information; the use state judgment module 49 is used for judging whether the two-dimensional code electronic ticket is used currently by using the unique number.
To sum up, the above embodiments of the present invention provide a secure two-dimensional electronic ticket system capable of off-line ticket checking, where a server generates a set of public and private keys for each ticketing event, and then generates a two-dimensional electronic ticket protected by private key encryption according to an order request submitted by a ticket purchaser, where the two-dimensional electronic ticket includes information such as a unique number of a ticket, verification entry information, other necessary ticket attribute information, and a hash value of selected attribute information of the ticket, and a hash value ciphertext obtained by encrypting the hash value by the private key of the ticketing event; before ticket checking, a verification terminal obtains a public key of a ticket event to be checked and a verification entrance in charge of the public key from a server, whether the ticket event is a true ticket or not can be judged by comparing a hash value ciphertext decrypted by the public key with a hash value calculated by attribute information selected by the ticket during ticket checking, verification entrance information is read from a two-dimensional electronic ticket to judge whether the verification entrance is correct or not, a unique number of the ticket is read to inquire a local record to judge whether the ticket is used or not, and a holder of the two-dimensional electronic ticket can pass after the verification terminal judges that the ticket is true, the ticket checking entrance is correct and the ticket is not used. Therefore, the embodiment of the invention can realize the ticket authenticity identification, the entrance personnel shunting and the repeated use of the tickets under the network-free environment by encrypting and decrypting the ticket information, agreeing the electronic ticket verification entrance and recording the unique serial number of the electronic ticket by the verification terminal, and is a safe and simple off-line ticket checking method without the participation of a user. In addition, according to the two-dimensional code electronic ticket provided by the embodiment of the invention, a ticket purchaser does not need to install a mobile APP, and only the two-dimensional code electronic ticket image needs to be displayed during verification, and the two-dimensional code electronic ticket can also be printed into paper for verification.
Although the present invention has been described with reference to a preferred embodiment, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (7)

1. A two-dimensional code electronic ticket generating method is characterized by comprising the following steps:
A) generating a set of public and private keys for a specified ticketing campaign;
B) assigning a unique number and verification entrance information to a ticket in the ticketing campaign;
C) encrypting selected attribute information in basic attribute information of the entrance ticket, which comprises the unique number and verification entrance information, by using the private key to obtain a selected attribute information ciphertext of the entrance ticket, wherein the selected attribute information at least comprises the unique number and the verification entrance information, and the public key is used for being provided to a verification terminal to decrypt the selected attribute information ciphertext; and
D) generating a two-dimensional code electronic ticket of the entrance ticket by using the basic attribute information and the selected attribute information ciphertext;
the step C) specifically comprises the following steps: calculating a hash value of the selected attribute information of the entrance ticket, and then encrypting the hash value by using the private key to obtain a hash value ciphertext serving as the selected attribute information ciphertext;
the two-dimensional code electronic ticket generating method further comprises the following steps: performing base64 encoding on the hash value ciphertext to obtain base64 encoded data of the hash value ciphertext;
the step D) specifically comprises the following steps: and generating the two-dimensional code electronic ticket by using the basic attribute information and the base64 coded data of the hash value ciphertext.
2. A two-dimension code electronic ticket verification method is applied to a verification terminal and is characterized by comprising the following steps:
a) acquiring two-dimensional code data in the two-dimensional code electronic ticket;
b) analyzing basic attribute information of the ticket, which contains a unique number and verification entry information, and a selected attribute information ciphertext from the two-dimensional code data, wherein the selected attribute information ciphertext is obtained by performing encryption operation on a group of public keys and private keys in the private keys, which are generated for ticket business activities, in the process of generating the two-dimensional code electronic ticket;
c) decrypting the selected attribute information ciphertext by using the public key, and comparing whether the selected attribute information obtained by decryption is matched with the selected attribute information which contains the unique number and verification entry information in the basic attribute information analyzed from the two-dimensional code data to judge the authenticity of the two-dimensional code electronic ticket;
d) judging whether the two-dimensional code electronic ticket is verified at the verification terminal or not by using the verification entrance information; and
e) when the two-dimension code electronic ticket is judged to be verified at the verification terminal, judging whether the two-dimension code electronic ticket is used or not by using the unique number;
in step b), the selected attribute information ciphertext is in the form of base64 encoded data of a hash value ciphertext; accordingly, in step c): firstly, base64 decoding is carried out on base64 coded data of the hash value ciphertext to obtain the hash value ciphertext, then the public key is utilized to decrypt the hash value ciphertext to obtain a hash value plaintext, and then the hash value plaintext obtained through decryption is compared with a hash value obtained through carrying out hash operation on selected attribute information containing the unique number and verification entry information in the analyzed basic attribute information to judge the authenticity of the two-dimensional code electronic ticket;
the step d) comprises the following steps:
and comparing whether the verification entrance information is consistent with the verification entrance information bound by the verification terminal to judge whether the two-dimensional code electronic ticket is verified at the verification terminal.
3. The two-dimensional code electronic ticket verification method of claim 2, further comprising the steps of:
and when the two-dimensional code electronic ticket is judged not to be used, recording the unique number of the entrance ticket.
4. The two-dimensional code electronic ticket verification method of claim 2, wherein step d) comprises:
and inquiring whether the unique number exists in a local storage of the verification terminal by using the unique number to judge whether the two-dimensional code electronic ticket is used.
5. The two-dimensional code electronic ticket verification method of claim 2, further comprising the steps of:
and acquiring the public key, the unique number of the verification terminal and verification entrance information bound with the verification terminal from a two-dimensional code electronic ticket server.
6. A two-dimensional code electronic ticket generating system is characterized by comprising:
the key generation module is used for generating a group of public keys and private keys for the designated ticket business;
the information distribution module is used for distributing a unique number and verification entrance information for a ticket in the ticket business;
the private key encryption module is used for encrypting selected attribute information in basic attribute information of the entrance ticket, wherein the selected attribute information comprises the unique number and the verification entrance information, and the public key is used for being provided to a verification terminal to decrypt the selected attribute information ciphertext;
the two-dimension code electronic ticket generating module is used for generating a two-dimension code electronic ticket of the entrance ticket by using the basic attribute information and the selected attribute information ciphertext;
also includes a base64 encoding module;
the encryption module is specifically configured to: calculating a hash value of the selected attribute information, and then encrypting the hash value by using the private key to obtain a hash value ciphertext of the selected attribute information;
the base64 encoding module is configured to base64 encode the hash value ciphertext to obtain base64 encoded data of the hash value ciphertext;
the two-dimensional code electronic ticket generating module is specifically configured to generate the two-dimensional code electronic ticket by using the basic attribute information and base64 encoded data of the hash value ciphertext.
7. The utility model provides a two-dimensional code electronic ticket verification terminal which characterized in that includes:
the scanning module is used for acquiring two-dimensional code data in the two-dimensional code electronic ticket;
the analysis module is used for analyzing basic attribute information of the entrance ticket, including a unique number and verification entrance information, and a selected attribute information ciphertext from the two-dimensional code data, wherein the selected attribute information ciphertext is obtained by performing encryption operation on a group of public keys and private keys in the private keys, which are generated for ticketing activities, in the two-dimensional code electronic ticket generation process;
the authenticity judgment module is used for decrypting the selected attribute information ciphertext by using the public key and comparing the decrypted selected attribute information with the selected attribute information which contains the unique number and the verification entry information and is analyzed from the two-dimensional code data to judge the authenticity of the two-dimensional code electronic ticket according to whether the selected attribute information is matched with the selected attribute information;
the verification entrance judging module is used for judging whether the two-dimensional code electronic ticket is verified at the verification terminal by utilizing the verification entrance information; comparing the verification entrance information with verification entrance information bound to the verification terminal to judge whether the two-dimensional code electronic ticket is verified at the verification terminal;
and
the using state judging module is used for judging whether the two-dimensional code electronic ticket is used or not by using the unique number;
the selected attribute information ciphertext is in a base64 encoded data form of a hash value ciphertext; correspondingly, the authenticity judgment module is specifically configured to perform base64 decoding on base64 encoded data of the hash value ciphertext to obtain the hash value ciphertext, decrypt the hash value ciphertext by using the public key to obtain a hash value plaintext, and compare the hash value plaintext obtained after decryption with a hash value obtained by performing hash operation on selected attribute information including the unique number and the verification entry information to judge authenticity of the two-dimensional code electronic ticket.
CN201410659307.2A 2014-11-18 2014-11-18 Two-dimensional code electronic ticket generating method and system, verification method and verification terminal Active CN105678365B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410659307.2A CN105678365B (en) 2014-11-18 2014-11-18 Two-dimensional code electronic ticket generating method and system, verification method and verification terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410659307.2A CN105678365B (en) 2014-11-18 2014-11-18 Two-dimensional code electronic ticket generating method and system, verification method and verification terminal

Publications (2)

Publication Number Publication Date
CN105678365A CN105678365A (en) 2016-06-15
CN105678365B true CN105678365B (en) 2020-06-26

Family

ID=56944657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410659307.2A Active CN105678365B (en) 2014-11-18 2014-11-18 Two-dimensional code electronic ticket generating method and system, verification method and verification terminal

Country Status (1)

Country Link
CN (1) CN105678365B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651371A (en) * 2016-10-20 2017-05-10 北京红马传媒文化发展有限公司 Electronic ticket producing method and system and device
CN106650849A (en) * 2016-12-23 2017-05-10 广州酷狗计算机科技有限公司 Data transmission method, device and system
CN108257225B (en) * 2016-12-29 2020-12-29 方正国际软件(北京)有限公司 Method for applying electronic ticket, self-service ticket checking equipment and rail transit equipment
CN109657763A (en) * 2017-10-10 2019-04-19 方正国际软件(北京)有限公司 A kind of application method of electronic ticket and electronic ticket
CN107835172A (en) * 2017-11-07 2018-03-23 中铁程科技有限责任公司 Billing information verification method and system, server and computer-readable recording medium
CN109922029A (en) * 2017-12-13 2019-06-21 航天信息股份有限公司 Electronics authority verification method and device
CN108763875A (en) * 2018-05-29 2018-11-06 山东新潮信息技术有限公司 The method that digital signature protection copyright is used to data authentication based on credible cloud platform
CN109145635A (en) * 2018-07-17 2019-01-04 广州师盛展览有限公司 The method and device that two dimensional code chest card is encapsulated with rights encryption
WO2020142993A1 (en) * 2019-01-10 2020-07-16 环球雅途集团有限公司 Control method, ticket selling and checking systems and storage medium
CN110738740B (en) * 2019-09-26 2021-12-21 杭州快盈信息科技有限公司 Ticket checking system and method based on HMAC-SM3 message authentication code
CN113743932B (en) * 2020-05-28 2024-04-19 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and computer storage medium
CN112804320B (en) * 2021-01-04 2023-02-28 德施曼机电(中国)有限公司 Lock control APP downloading method and system of intelligent door lock
CN113269504B (en) * 2021-07-21 2021-10-29 广州市阿思柯物流系统有限公司 Warehouse goods storage method and computer equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901505A (en) * 2010-05-27 2010-12-01 邵贵平 Offline electronic ticketing system and method thereof
JP2014203380A (en) * 2013-04-09 2014-10-27 国立大学法人 鹿児島大学 Two-dimensional code, two-dimensional code generation method, two-dimensional code generation device, program and recording medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129589A (en) * 2011-02-10 2011-07-20 谢仁康 Asymmetric encryption two-dimension code anti-counterfeiting method
CN102663549B (en) * 2012-03-29 2016-07-13 华南农业大学 Entrance managing system that a kind of safety is high and method
CN102932148B (en) * 2012-10-25 2016-05-11 成都市易恒信科技有限公司 Based on the safe two-dimension code anti-counterfeit System and method for of CPK certification
CN104102950A (en) * 2013-04-12 2014-10-15 同程网络科技股份有限公司 Travel ticket ordering method based on two-dimension code
CN103400418B (en) * 2013-07-26 2016-02-03 电子科技大学 A kind of electronic bill ticketing based on NFC mobile terminal and ticket checking method
CN103870988A (en) * 2014-03-26 2014-06-18 青岛蓝色多维网络科技有限公司 Two-dimension code electronic ticketing system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901505A (en) * 2010-05-27 2010-12-01 邵贵平 Offline electronic ticketing system and method thereof
JP2014203380A (en) * 2013-04-09 2014-10-27 国立大学法人 鹿児島大学 Two-dimensional code, two-dimensional code generation method, two-dimensional code generation device, program and recording medium

Also Published As

Publication number Publication date
CN105678365A (en) 2016-06-15

Similar Documents

Publication Publication Date Title
CN105678365B (en) Two-dimensional code electronic ticket generating method and system, verification method and verification terminal
US9531544B2 (en) Two-dimensional bar code for ID card
EP3132368B1 (en) Method and apparatus of verifying usability of biological characteristic image
CN103020682B (en) Books Quick Response Code identification generation apparatus, Quick Response Code identification recognition device and system
CN104281866A (en) Two-dimensional code application method and device
CN202383724U (en) All-in-one machine for handling service
CN106709280A (en) Method, client and server for processing information
CN107992923A (en) A kind of QR Quick Response Codes generation and the method read
CN108537314A (en) Product marketing system and method based on Quick Response Code
CN104464117A (en) Automatic tell machine money withdrawing method and system based on dynamic two-dimensional code
CN103914913A (en) Intelligent card application scene recognition method and system
CN105719144A (en) Food safety tracing method and food safety tracing system based on two-dimensional code
CN105959265A (en) Electronic form filling system and method thereof
CN108667784B (en) System and method for protecting internet identity card verification information
CN107689097A (en) Synchronizing Passwords generation and checking system and its application based on frequency hopping
CN101771680A (en) Method for writing data to smart card, system and remote writing-card terminal
CN113761488A (en) Content network copyright tracing encryption system and encryption method
CN107395600B (en) Service data verification method, service platform and mobile terminal
EA035937B1 (en) Secure item identification based on physical label properties
KR101638787B1 (en) Mobile ticket security system and method of based location information and terminal unique number
CN108234126B (en) System and method for remote account opening
CN103347248A (en) Cross-region identity authentication method based on hand-held terminal
CN111625802A (en) Projector authorization use method
CN103260157A (en) User management system based on satellite communication services and application method thereof
CN115471860A (en) Express real name checking method, system and computer readable storage medium

Legal Events

Date Code Title Description
C06 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