CN115879998A - Offline use method for electronic ticket - Google Patents

Offline use method for electronic ticket Download PDF

Info

Publication number
CN115879998A
CN115879998A CN202211682394.4A CN202211682394A CN115879998A CN 115879998 A CN115879998 A CN 115879998A CN 202211682394 A CN202211682394 A CN 202211682394A CN 115879998 A CN115879998 A CN 115879998A
Authority
CN
China
Prior art keywords
merchant
user
information
electronic ticket
cloud system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211682394.4A
Other languages
Chinese (zh)
Inventor
杨兴海
吴秀峰
李建州
杨兴荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shijihengtong Technology Co ltd
Original Assignee
Shijihengtong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shijihengtong Technology Co ltd filed Critical Shijihengtong Technology Co ltd
Priority to CN202211682394.4A priority Critical patent/CN115879998A/en
Publication of CN115879998A publication Critical patent/CN115879998A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses an off-line use method for an electronic ticket, which is used for a cloud system, a user terminal and a merchant terminal to encrypt and check the electronic ticket layer by layer based on an asymmetric encryption algorithm, generates encrypted off-line usable electronic ticket information for the user terminal in a networking state through the cloud system in advance, checks the user terminal in an off-line use electronic ticket process, completes an order and merchant encryption, uploads all information of the electronic ticket with the order completed off-line to the cloud system in a networking state of the merchant terminal, and the cloud system checks all information of the electronic ticket with the order completed off-line and performs credit evaluation on a user and the merchant respectively according to a check result to guarantee or limit the off-line use permission of the user merchant according to the credit evaluation.

Description

Offline use method for electronic ticket
Technical Field
The patent relates to the technical field of information security technology and electronic tickets, in particular to an offline using method and system for electronic tickets.
Background
At present, with the rapid development of internet technology, after some large-scale enterprises such as insurance and banks buy insurance or financial products, because the products have a silent period after transaction, the enterprises and the users rarely have corresponding interaction, and in order to maintain the relationship with the users and increase the viscosity of the users, the enterprises give some electronic coupons with additional services to the users, and the electronic coupons can be used online and offline. In the current online store-leaving use scene, a user side and a merchant side are both guaranteed to be used under the condition of a network, the user side needs to be connected to a cloud server to obtain electronic coupon information and provide a coupon number or a two-dimensional code to a merchant, the merchant reads the coupon number or the two-dimensional code information through the merchant side and uploads the coupon number or the two-dimensional code information to the cloud server, the cloud server verifies the validity of the coupon, if the electronic coupon is valid, an order can be created and the information is returned to the merchant side, and then the merchant provides corresponding service for a user according to a prompt returned by the cloud server. However, in an actual service scenario, an offline merchant often has a situation that one or both of a user side and a merchant side cannot be connected to the cloud service due to the problems of geographic location of a store, a network of the merchant and the cloud service failure, and the like, so that the user cannot provide an electronic ticket to the merchant, the merchant cannot obtain electronic information and cannot provide service for the user, or the merchant reads the electronic ticket information and cannot be connected to the cloud service, cannot judge whether the electronic ticket is available, and cannot provide service for the user.
Therefore, in an online merchant service scene, a new electronic coupon using method and system are provided under the condition that a user end or a merchant end cannot be connected with cloud service, offline use of the electronic coupon is supported, user experience is prompted, and user rights and interests and the service quality of merchants can be guaranteed.
Disclosure of Invention
In view of this, an object of the present invention is to provide an offline application method for an electronic ticket, which can support offline application of the electronic ticket, is beneficial to prompt user experience, can ensure user rights and interests and service quality of merchants, and can overcome the defects of the prior art.
The purpose of the invention is realized by the following technical scheme:
the invention discloses an off-line use method for an electronic ticket, which is used for a cloud system, a user terminal and a merchant terminal to encrypt and check the electronic ticket layer by layer based on an asymmetric encryption algorithm, the encrypted off-line usable electronic ticket information is generated for the user terminal in advance in a networking state through the cloud system, the user terminal uses the electronic ticket information in an off-line manner and checks when the user terminal uses the electronic ticket information and the merchant terminal reads the electronic ticket information in an off-line manner, orders and merchant encryption are completed, all information of the electronic ticket with the orders completed in an off-line manner is uploaded to the cloud system in a networking state at the merchant terminal, the cloud system checks all information of the electronic ticket with the orders completed in an off-line manner, and credit evaluation is respectively carried out on the user and the merchant according to a check result, so as to guarantee or limit the off-line use permission of the merchant of the user through the credit evaluation.
In the above, the method comprises the following steps:
s1, a cloud system generates a corresponding public key and a corresponding private key for the system by adopting an asymmetric encryption algorithm;
s2, a user registers an account with a cloud system through a user side, the cloud system generates a corresponding user ID for the user, and generates a corresponding public key and a corresponding private key for the user by adopting an asymmetric encryption algorithm, when the user logs in, the cloud system uses the public key of the cloud system to encrypt the user ID and the failure time to generate a user login token, and returns the user login token, the private key corresponding to the user and the public key of the cloud system to the user side and stores the user login token, the private key corresponding to the user and the public key of the cloud system to a user side storage unit of the user side;
s3, a merchant registers an account with a cloud system through a merchant end, the cloud system generates a corresponding merchant ID for the merchant, and generates a corresponding public key and a private key for the merchant by adopting an asymmetric encryption algorithm, when the merchant logs in, the cloud system encrypts the merchant ID and the expiration time by using the public key of the cloud system to generate a merchant login token, and returns the merchant login token, the private key corresponding to the merchant and the public key of the cloud system to the merchant end and stores the merchant login token, the private key corresponding to the merchant and the public key of the cloud system to a merchant end storage unit of the merchant end;
s4, user side data synchronization: the method comprises the steps that a user side network detection unit detects that a user side is connected to a cloud system, a data transmission unit is started, the data transmission unit accesses the cloud system by using a user login information token, the cloud system decrypts the user login information token by using a private key of the cloud system, if decryption is successful, whether failure time is longer than current system time is judged, if yes, unsynchronized electronic coupon information corresponding to a user is obtained from the cloud system according to a user ID, the electronic coupon information comprises information such as a serial number, service item information, a service item name, an expiration date, creation time and the like, then each piece of electronic coupon information is encrypted by using the private key of the user to generate electronic coupon encrypted content, then the electronic coupon information is encrypted by using an MD5 algorithm to obtain an MD5 value with a fixed length, then the MD5 value is encrypted by using the private key of the cloud system to obtain a cloud system signature, the electronic coupon encrypted content and the cloud system signature are returned to the user side, the user side decrypts an encrypted data packet by using the private key of the user side to obtain the electronic coupon plaintext information, and the MD5 value is stored if the MD5 value is equal, and the MD5 value is stored if the MD5 value is not stored, and the MD5 is equal to the cloud system signature;
s5, displaying the two-dimensional code of the electronic ticket to the merchant: a user side reads a user private key, electronic ticket information and a cloud system signature from a user side storage unit, then uses an MD5 algorithm to encrypt the electronic ticket information and the content of the user information to obtain an MD5 value, then uses the user private key to encrypt the MD5 to obtain a user signature, then combines the electronic ticket information, the user information, the cloud system signature and the user signature into a character string according to a certain rule, and then uses a two-dimensional code generation technology to convert the character string into a two-dimensional code image;
s6, reading the two-dimensional code of the electronic ticket by the merchant end: the merchant terminal reads the two-dimensional code information through a camera or a two-dimensional code reader integrated on the equipment to obtain electronic ticket information, user information, a cloud system signature and a user signature, then reads the merchant information and service item information from a merchant terminal storage unit of the merchant terminal, generates order information according to the electronic ticket information, the user information and service content, then carries out MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, then carries out encryption on the MD5 value by using a private key of the merchant to obtain the merchant signature, and then defines the electronic ticket information, the user information, the merchant information, the order information, the cloud system signature, the user signature and the merchant signature as a group of order data and stores the order data in the storage unit;
s7, merchant end data synchronization: when a merchant end network detection unit of a merchant end detects that the merchant end is connected to a cloud end service, a merchant end data synchronization unit is started, a data transmission unit uses a merchant login information token to access a cloud end system, the cloud end system uses a private key of the cloud end system to decrypt the merchant login information token, if decryption is successful, whether expiration time is longer than current system time is judged, if yes, electronic ticket information, user information, merchant information, order information, a cloud end system signature, a user signature and merchant signature information are taken out from the merchant end data synchronization unit and uploaded to the cloud end system, after the cloud end system receives the data, the data are stored in a cloud end storage unit, corresponding user public keys are taken out from the cloud end storage unit according to the user information, corresponding merchant public keys are taken out according to the merchant information, then the cloud end system public keys are taken out, and then relevant signatures are carried out to check: firstly, performing cloud system signature verification, encrypting electronic ticket information by using an MD5 algorithm to obtain an MD5 value, then decrypting the cloud system signature by using a public key of a cloud system to obtain a decrypted value, comparing the two values to determine whether the two values are equal or not, if not, indicating that the cloud system signature is illegal, and generating the electronic ticket by using a non-cloud system; secondly, verifying the user signature, encrypting the electronic ticket information and the user information by using an MD5 algorithm to obtain an MD5 value, decrypting the user signature by using a public key of a user to obtain a decrypted value, comparing the two values to determine whether the two values are equal or not, and if the two values are not equal, indicating that the user signature is illegal and the electronic ticket is not provided by a user side; performing merchant signature verification again, performing MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, decrypting the merchant signature by using a merchant public key, comparing whether the two values are equal, if not, indicating that the merchant signature is illegal and not data uploaded by a merchant terminal, then storing the electronic ticket information, the user information, the merchant information, the order information, the cloud system signature, the user signature, the merchant signature, the cloud system signature verification result, the user signature verification result and the merchant signature verification result into a cloud storage unit, and finally creating order data if the cloud system signature, the user signature and the merchant signature are legal;
s8, credit assessment: the method comprises the steps of reading user information, merchant information, electronic ticket information and order information from a cloud storage unit, then establishing a credit evaluation model aiming at the user and the merchant, calculating credit levels of the user and the merchant by carrying out multi-dimensional analysis on the user data and the merchant data, and guaranteeing or limiting the offline electronic ticket using authority of the merchant according to the credit levels.
In the above, before generating the order information according to the electronic ticket information, the user information, and the service content in step S6, the method further includes checking whether the electronic ticket is supported by the current merchant, and if so, performing the step of generating the order.
In step S8, the effective rate of the number of the electronic tickets used by the user offline in the period is calculated, and an effective rate threshold value for stopping the offline use of the electronic tickets by the user is set; and calculating the effective rate of the merchant offline verification electronic ticket in the period, and setting an effective rate threshold for stopping the merchant from having the offline verification electronic ticket.
The off-line use system for the electronic ticket comprises a cloud system, a user side, a merchant side and an electronic ticket two-dimensional code; the cloud system comprises a key management unit, an electronic ticket unit, a cloud storage unit, a user management unit, a merchant management unit and a credit evaluation unit; the user side comprises a user side login unit, a user side storage unit, a user side network detection unit and a user side data synchronization unit; the merchant end comprises a merchant end login unit, a merchant end storage unit, a verification and sale unit, a merchant end network detection unit and a merchant end data synchronization unit;
further, the key management unit, the cloud storage unit, the user management unit and the merchant management unit are responsible for completing generation, storage and management of a key and a public key of a cloud system, a key and a public key of a user and a key and a public key of a merchant;
further, the user management unit is responsible for managing user information, wherein the user information comprises a platform unique user ID and mobile phone number information;
further, the merchant management unit is responsible for managing merchant information, wherein the merchant information comprises a platform unique merchant ID, a merchant name, business license information, longitude and latitude, an address, a door head picture and service item information;
furthermore, the electronic ticket unit is responsible for managing electronic ticket information, a unique serial number is created when the electronic ticket information is generated, and the electronic ticket information further comprises an available administrative area, a supportable merchant, expiration date information and service item information;
furthermore, the cloud storage unit is responsible for storing data of parameters of the key management unit, the user management unit, the electronic ticket unit, the merchant management unit and the credit evaluation unit;
further, the credit evaluation unit evaluates whether the merchant and the user can support offline use of the electronic ticket by performing multi-dimensional analysis on the user information, the order information, the merchant information and the electronic ticket information stored in the cloud storage unit;
furthermore, the user side login unit is responsible for completing user account registration and login functions, and meanwhile, the user side login unit is capable of obtaining a cloud system public key and a user private key of a cloud system and storing the cloud system public key and the user private key into the user side storage unit;
further, the user side storage unit is responsible for storing data generated by the user side login unit and the network transmission unit;
further, the user side network detection unit is responsible for detecting the communication condition of the user side connected with the cloud system in real time and storing the communication condition to the user side storage unit;
further, the user side data synchronization unit starts the unit according to the communication detection result of the user side network detection unit to the cloud side system, acquires the electronic ticket information of the user from the cloud side system, and stores the electronic ticket information in the user side storage unit;
furthermore, the merchant terminal login unit is responsible for completing the registering and login functions of the merchant account, and meanwhile, the merchant terminal login unit acquires a cloud terminal system public key and a merchant private key of a cloud terminal system and stores the cloud terminal system public key and the merchant private key into the merchant terminal storage unit;
further, the merchant terminal network detection unit is responsible for detecting the communication condition of the merchant terminal connected with the cloud system in real time and storing the communication condition in the merchant terminal storage unit;
furthermore, the verification and sale unit reads the two-dimensional code data of the electronic ticket displayed by the user side by calling the camera device, reads the service item ID and the administrative region information of the merchant from the merchant-side storage unit, compares the service item ID and the administrative region information of the merchant with the electronic ticket information of the two-dimensional code, judges whether the electronic ticket supports the use under the merchant, and if the service item ID and the administrative region information of the merchant are supported, creates order data and stores the order data in the merchant-side storage unit;
furthermore, the merchant terminal storage unit is responsible for storing data generated by the merchant terminal login unit, the merchant terminal network detection unit, the merchant terminal data synchronization unit and the verification and cancellation unit;
in the foregoing, the merchant-side data synchronization unit starts the merchant-side data synchronization unit according to a communication detection result of the merchant-side network detection unit on the cloud-side system, and reads the electronic ticket information, the user information, the merchant information, the order information, the cloud-side system signature, the user signature, and the merchant signature information in the merchant-side storage unit and uploads the electronic ticket information, the user information, the merchant information, the order information, the cloud-side system signature, and the merchant signature information to the cloud-side system.
Compared with the prior art, the invention has the beneficial effects that:
the method is used for a cloud system, a user terminal and a merchant terminal to encrypt and check an electronic ticket layer by layer based on an asymmetric encryption algorithm, encrypted information of the electronic ticket which can be used offline is generated for the user terminal in a networking state in advance through the cloud system, the user terminal checks the electronic ticket which can be used offline and checks the user encryption and the merchant terminal when the merchant terminal reads offline, orders and merchant encryption are completed, all information of the electronic ticket of which the orders are completed offline is uploaded to the cloud system in a networking state at the merchant terminal, the cloud system checks all information of the electronic ticket of which the orders are completed offline, credit evaluation is respectively carried out on the user and the merchant according to a check result, the offline use permission of the merchant of the user is guaranteed or limited through credit evaluation, namely the electronic information which can be used offline is prepared in advance when networking is available and used when no network exists, the check and layer-by layer encryption in the use process of the electronic ticket is guaranteed through the asymmetric encryption algorithm, and the use of the offline electronic ticket of the merchant is finally guaranteed or limited through the credit evaluation, so that the offline use permission of the offline electronic ticket of the merchant of the user can be used, and the offline electronic ticket can be used off-line.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objectives and other advantages of the invention may be realized and attained by the means of the instrumentalities and combinations particularly pointed out hereinafter.
Drawings
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings, in which:
FIG. 1 is a step of offline use of an electronic ticket according to the present invention;
FIG. 2 is a schematic view of a system configuration of an electronic ticket according to the present invention;
FIG. 3 is a block diagram of a cloud system according to the present invention;
FIG. 4 is a block diagram of the merchant site of the present invention;
fig. 5 is a block diagram of a ue according to the present invention.
Among them, the cloud system 100; a key management unit 101; an electronic ticket unit 102; a cloud storage unit 103; a user management unit 104; a merchant management unit 105; a credit evaluation unit 106; a user terminal 200; a user login unit 201; a user-side storage unit 202; a user network detection unit 203; a client data synchronization unit 204; a merchant terminal 300; a merchant terminal login unit 301; a merchant-side storage unit 302; a merchant-side network detection unit 304; merchant-side data synchronization unit 305.
Detailed Description
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present invention, and are not intended to limit the scope of the present invention.
As shown in fig. 1-5, the method for offline using an electronic ticket disclosed in the present invention provides a cloud system 100, a user terminal 200, and a merchant terminal 300 to encrypt and verify an electronic ticket layer by layer based on an asymmetric encryption algorithm, generates encrypted offline-usable electronic ticket information for the user terminal 200 in advance in a network-connectable state through the cloud system 100, verifies the offline-usable electronic ticket process of the user terminal 200, verifies the offline-usable electronic ticket process, and verifies, completes an order and merchant encryption when the user terminal 300 reads offline, and uploads all the offline-finished electronic ticket information to the cloud system 100 in the network-connectable state of the merchant terminal 300, and the cloud system 100 verifies all the offline-finished electronic ticket information of the order and performs credit evaluation on the user and the merchant respectively according to the verification result, so as to evaluate credit or limit the offline use permission of the user merchant.
The method comprises the following steps:
s1, a cloud system 100 generates a corresponding public key and a corresponding private key for the system by adopting an asymmetric encryption algorithm;
s2, a user registers an account with the cloud system 100 through the user side 200, the cloud system 100 generates a corresponding user ID for the user, and generates a corresponding public key and a corresponding private key for the user by adopting an asymmetric encryption algorithm, when the user logs in, the cloud system 100 encrypts the user ID and the expiration time by using the public key of the cloud system 100 to generate a user login token, and returns the user login token, the private key corresponding to the user and the public key of the cloud system 100 to the user side 200 and stores the user login token, the private key corresponding to the user and the public key of the cloud system 100 to the user side storage unit 202 of the user side 200;
s3, a merchant registers an account with the cloud end system 100 through the merchant end 300, the cloud end system 100 generates a corresponding merchant ID for the merchant, and generates a corresponding public key and a private key for the merchant by adopting an asymmetric encryption algorithm, when the merchant logs in, the cloud end system 100 encrypts the merchant ID and the expiration time by using the public key of the cloud end system 100 to generate a merchant login token, and returns the merchant login token, the private key corresponding to the merchant and the public key of the cloud end system 100 to the merchant end 300 and stores the merchant login token, the private key corresponding to the merchant and the public key of the cloud end system 100 to the merchant end storage unit 302 of the merchant end 300;
s4, data synchronization of the user side 200: the user side network detection unit 203 starts a data transmission unit when detecting that the user side 200 is connected to the cloud system 100, the data transmission unit accesses the cloud system 100 by using a user login information token, the cloud system 100 decrypts the user login information token by using a private key of the cloud system 100, if decryption is successful, whether expiration time is longer than current system time is judged, if yes, unsynchronized electronic coupon information corresponding to a user is obtained from the cloud system 100 according to a user ID, the electronic coupon information comprises a serial number, service item information, a service item name, an effective period, creation time and other information, then each piece of electronic coupon information is encrypted by using the private key of the user to generate electronic coupon encrypted content, then the electronic coupon information is encrypted by using an MD5 algorithm to obtain an MD5 value with a fixed length, then the MD5 value is encrypted by using the private key of the cloud system 100 to obtain a signature of the cloud system 100, the electronic coupon encrypted content and the signature of the cloud system 100 are returned to the user side 200, the user side 200 uses the private key of the user to decrypt the encrypted data to obtain the electronic coupon information, the MD5 information, and the signature is stored if the MD5 value is equal, the MD5 value is obtained, and the MD5 data is stored by comparing the MD5 with the MD5, if the encrypted data, the MD5 data is equal to obtain a plaintext data, and the MD5, the MD5 is stored in the MD information, and the MD information is stored in the MD5, and the MD5, the MD information is stored in the MD information, the MD5 is stored in the MD information, and the MD information is equal plaintext is stored;
s5, displaying the two-dimensional code 400 of the electronic ticket to the merchant: the user side 200 reads a user private key, electronic ticket information and a cloud system 100 signature from a user side storage unit 202, then encrypts the electronic ticket information and the content of the user information by using an MD5 algorithm to obtain an MD5 value, then encrypts the MD5 by using the user private key to obtain a user signature, then combines the electronic ticket information, the user information, the cloud system 100 signature and the user signature into a character string according to a certain rule, and then converts the character string into a two-dimensional code image by using a two-dimensional code generation technology;
s6, reading the two-dimensional code 400 of the electronic ticket by the merchant terminal 300: the merchant 300 reads the two-dimensional code information through a camera or a two-dimensional code reader integrated on the equipment to obtain electronic ticket information, user information, a cloud system 100 signature and a user signature, then reads the merchant information and service item information from a merchant storage unit 302 of the merchant 300, generates order information according to the electronic ticket information, the user information and service content, then carries out MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, then carries out encryption on the MD5 value by using a merchant private key to obtain a merchant signature, and then defines the electronic ticket information, the user information, the merchant information, the order information, the cloud system 100 signature, the user signature and the merchant signature as a group of order data and stores the order data in a storage unit; in the step, before generating order information according to the electronic ticket information, the user information and the service content, checking whether the electronic ticket supports the use of the current merchant, and if so, performing the step of generating the order;
s7, data synchronization of the merchant terminal 300: when a merchant-side network detection unit 304 of the merchant side 300 detects that the merchant side 300 is connected to a cloud service, a merchant-side data synchronization unit 305 is started, a data transmission unit accesses the cloud system 100 by using a merchant login information token, the cloud system 100 decrypts the merchant login information token by using a private key of the cloud system 100, if decryption is successful, whether expiration time is longer than current system time is judged, if yes, electronic ticket information, user information, merchant information, order information, a signature of the cloud system 100, user signature and merchant signature information are taken out from the merchant-side data synchronization unit 305 and uploaded to the cloud system 100, after the cloud system 100 receives the data, the data are stored in a cloud storage unit 103, corresponding user public keys are taken out from the cloud storage unit 103 according to the user information, corresponding merchant public keys are taken out according to the merchant information, then public keys of the cloud system 100 are taken out, and then related signatures are verified: firstly, verifying the signature of the cloud system 100, encrypting the electronic ticket information by using an MD5 algorithm to obtain an MD5 value, decrypting the signature of the cloud system 100 by using a public key of the cloud system 100 to obtain a decrypted value, comparing the two values to determine whether the two values are equal, and if the two values are not equal, indicating that the signature of the cloud system 100 is illegal, and generating the electronic ticket by using a non-cloud system 100; secondly, verifying the user signature, encrypting the electronic ticket information and the user information by using an MD5 algorithm to obtain an MD5 value, decrypting the user signature by using a public key of the user to obtain a decrypted value, comparing the two values to determine whether the two values are equal or not, and if the two values are not equal, indicating that the user signature is illegal, wherein the electronic ticket is not provided by the user side 200; performing merchant signature verification again, performing MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, then decrypting the merchant signature by using a merchant public key, comparing the two values, judging whether the two values are equal or not, if not, indicating that the merchant signature is illegal and not indicating that the merchant signature is uploaded by the merchant end 300, then storing the electronic ticket information, the user information, the merchant information, the order information, the cloud end system 100 signature, the user signature, the merchant signature, the cloud end system 100 signature verification result, the user signature verification result and the merchant signature verification result into the cloud end storage unit 103, and finally creating order data if the cloud end system 100 signature, the user signature and the merchant signature are legal;
s8, credit assessment: reading user information, merchant information, electronic ticket information and order information from the cloud storage unit 103, then establishing a credit evaluation model aiming at the user and the merchant, calculating credit grades of the user and the merchant by carrying out multi-dimensional analysis on the user data and the merchant data, and guaranteeing or limiting the authority of the merchant for using the electronic ticket offline according to the credit grades; in the step, the effective rate of the number of the electronic coupons used by the user offline in the period is calculated, and an effective rate threshold value for stopping the offline use of the electronic coupons of the user is set; and calculating the effective rate of the merchant offline verification electronic ticket in the period, and setting an effective rate threshold for stopping the merchant from having the offline verification electronic ticket.
The off-line using system for the electronic ticket comprises a cloud system 100, a user side 200, a merchant side 300 and an electronic ticket two-dimensional code 400; the cloud system 100 comprises a key management unit 101, an electronic ticket unit 102, a cloud storage unit 103, a user management unit 104, a merchant management unit 105 and a credit evaluation unit 106; the client 200 comprises a client login unit 201, a client storage unit 202, a client network detection unit 203 and a client data synchronization unit 204; the merchant terminal 300 includes a merchant terminal login unit 301, a merchant terminal storage unit 302, a verification and cancellation unit 303, a merchant terminal network detection unit 304 and a merchant terminal data synchronization unit 305;
the key management unit 101, the cloud storage unit 103, the user management unit 104, and the merchant management unit 105 are responsible for completing generation, storage, and management of a key and a public key of the cloud system 100, a key and a public key of a user, and a key and a public key of a merchant;
the user management unit 104 is responsible for managing user information, wherein the user information comprises a platform unique user ID and mobile phone number information;
the merchant management unit 105 is responsible for managing merchant information, wherein the merchant information comprises a platform unique merchant ID, a merchant name, business license information, longitude and latitude, an address, a door head-up and service item information;
the electronic ticket unit 102 is responsible for managing electronic ticket information, and when the electronic ticket information is generated, a unique serial number is created, and the electronic ticket information further includes an available administrative area, a supportable merchant, expiration date information and service item information;
the cloud storage unit 103 is responsible for storing data of parameters of the key management unit 101, the user management unit 104, the electronic ticket unit 102, the merchant management unit 105 and the credit evaluation unit 106;
the credit evaluation unit 106 evaluates whether the merchant and the user can support offline use of the electronic ticket by performing multidimensional analysis on the user information, the order information, the merchant information and the electronic ticket information stored in the cloud storage unit 103;
the user side login unit 201 is responsible for completing user account registration and login functions, and meanwhile, the user side login unit has the functions of acquiring a public key of the cloud system 100 and a user private key of the cloud system 100 and storing the public key and the user private key into the user side storage unit 202;
the user storage unit 202 is responsible for storing data generated by the user login unit 201 and the network transmission unit 204;
the user side network detection unit 203 is responsible for detecting the communication condition of the user side 200 connected with the cloud system 100 in real time and storing the communication condition to the user side storage unit 202;
the user data synchronization unit 204 starts the unit according to the communication detection result of the user network detection unit 203 on the connection cloud system 100, acquires the electronic ticket information of the user from the cloud system 100, and stores the electronic ticket information in the user storage unit 202;
the merchant side login unit 301 is responsible for completing the merchant account registration and login functions, and meanwhile, the merchant side login unit acquires the cloud system 100 public key and the merchant private key of the cloud system 100 and stores the public key and the merchant private key into the merchant side storage unit 302;
the merchant terminal network detection unit 304 is responsible for detecting the communication situation of the merchant terminal 300 connected to the cloud system 100 in real time, and storing the communication situation in the merchant terminal storage unit 302;
the verification and sale unit 303 reads the two-dimensional code 400 data of the electronic ticket displayed by the user terminal 200 by calling the camera device, reads the service item ID and the administrative region information of the merchant from the merchant terminal storage unit 302, compares the service item ID and the administrative region information of the merchant with the electronic ticket information of the two-dimensional code, judges whether the electronic ticket supports the use under the merchant, and if the service item ID and the administrative region information of the merchant are supported, creates order data and stores the order data in the merchant terminal storage unit 302;
the merchant side storage unit 302 is responsible for storing data generated by the merchant side login unit 301, the merchant side network detection unit 304, the merchant side data synchronization unit 305 and the verification and cancellation unit 303;
the merchant-side data synchronization unit 305 starts the unit according to the communication detection result of the merchant-side network detection unit 304 on the connection cloud system 100, reads the electronic ticket information, the user information, the merchant information, the order information, the signature of the cloud system 100, the user signature, and the merchant signature information in the merchant-side storage unit 302, and uploads the electronic ticket information, the user information, the merchant information, the order information, the signature of the cloud system 100, and the merchant signature information to the cloud system 100.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and any simple modifications, equivalent variations and modifications made on the above embodiment according to the technical spirit of the present invention without departing from the technical spirit of the present invention are within the scope of the technical solution of the present invention.

Claims (7)

1. The off-line use method for the electronic ticket is characterized in that the method provides a cloud system (100), a user side (200) and a merchant side (300) to encrypt and check the electronic ticket layer by layer based on an asymmetric encryption algorithm, encrypted off-line usable electronic ticket information is generated for the user side (200) in advance in a networking state through the cloud system (100), the user side (200) checks the off-line use process of the electronic ticket, the user side (200) checks the user encryption and the merchant side (300) in an off-line reading process, orders and merchant encryption are completed, all information of the electronic ticket with the orders completed off-line is uploaded to the cloud system (100) in the networking state of the merchant side (300), the cloud system (100) checks all the information of the electronic ticket with the orders completed off-line, and credit evaluation is respectively performed on the user and the merchant according to the check results, so that the off-line use permission of the merchant of the user is guaranteed or limited.
2. The offline use method for electronic tickets according to claim 1, characterized in that: the method comprises the following steps:
s1, a cloud system (100) adopts an asymmetric encryption algorithm to generate a corresponding public key and a corresponding private key for the system;
s2, a user registers an account with the cloud system (100) through the user side (200), the cloud system (100) generates a corresponding user ID for the user, a corresponding public key and a corresponding private key are generated for the user by adopting an asymmetric encryption algorithm, when the user logs in, the cloud system (100) encrypts the user ID and the expiration time by using the public key of the cloud system (100) to generate a user login token, and the user login token, the private key corresponding to the user and the public key of the cloud system (100) are returned to the user side (200) and stored in a user side storage unit (202) of the user side (200);
s3, a merchant registers an account with the cloud end system (100) through the merchant end (300), the cloud end system (100) generates a corresponding merchant ID for the merchant, a corresponding public key and a corresponding private key are generated for the merchant by adopting an asymmetric encryption algorithm, when the merchant logs in, the cloud end system (100) encrypts the merchant ID and the expiration time by using the public key of the cloud end system (100) to generate a merchant login token, and the merchant login token, the private key corresponding to the merchant and the public key of the cloud end system (100) are returned to the merchant end (300) and stored in a merchant end storage unit (302) of the merchant end (300);
s4, data synchronization of the user side (200): when a user network detection unit (203) detects that a user (200) is connected to a cloud system (100), a data transmission unit is started, the data transmission unit accesses the cloud system (100) by using a user login information token, the cloud system (100) decrypts the user login information token by using a private key of the cloud system (100), if decryption is successful, whether the failure time is longer than the current system time is judged, if so, unsynchronized electronic ticket information corresponding to a user is obtained from the cloud system (100) according to the user ID, and the electronic ticket information comprises information such as a serial number, service item information, a service item name, an effective period, creation time and the like, then, the private key of the user is used for encrypting each piece of electronic ticket information to generate electronic ticket encrypted content, then, using an MD5 algorithm to encrypt the electronic ticket information to obtain an MD5 value with a fixed length, then using a private key of a cloud system (100) to encrypt the MD5 value to obtain a signature of the cloud system (100), returning the encrypted content of the electronic ticket and the signature of the cloud system (100) to a user side (200), using the private key of the user by the user side (200), decrypting the encrypted data packet to obtain clear text information of the electronic ticket, decrypting the signature of the cloud system (100) by using a public key of the cloud system (100) to obtain an MD5 value, encrypting the clear text information of the electronic ticket by using an MD5 algorithm to obtain the MD5 value, comparing whether the two MDs 5 are equal or not, if so, indicating that the data is not modified, and storing the plaintext information and the signature content of the electronic ticket in a user side storage unit (202);
s5, displaying the two-dimensional code of the electronic ticket to the merchant (400): the method comprises the steps that a user side (200) reads a user private key, electronic ticket information and a cloud system (100) signature from a user side storage unit (202), then an MD5 algorithm is used for encrypting the electronic ticket information and the content of the user information to obtain an MD5 value, then the MD5 is encrypted by the user private key to obtain a user signature, then the electronic ticket information, the user information, the cloud system (100) signature and the user signature are combined into a character string according to a certain rule, and then a two-dimensional code generation technology is used for converting the character string into a two-dimensional code image;
s6, reading the two-dimensional code (400) of the electronic ticket by the merchant terminal (300): a merchant (300) reads two-dimensional code information through a camera or a two-dimensional code reader integrated on equipment to obtain electronic ticket information, user information, a cloud system (100) signature and a user signature, then reads merchant information and service item information from a merchant storage unit (302) of the merchant (300), generates order information according to the electronic ticket information, the user information and service content, then carries out MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, then carries out encryption on the MD5 value by using a merchant private key to obtain a merchant signature, and then defines the electronic ticket information, the user information, the merchant information, the order information, the cloud system (100) signature, the user signature and the merchant signature into a group of order data and stores the order data in a storage unit;
s7, data synchronization of the merchant end (300): when a merchant network detection unit (304) of a merchant (300) detects that the merchant (300) is connected to a cloud service, a merchant data synchronization unit (305) is started, the data transmission unit accesses a cloud system (100) by using a merchant login information token, the cloud system (100) decrypts the merchant login information token by using a private key of the cloud system (100), if decryption is successful, whether expiration time is longer than current system time is judged, if yes, electronic ticket information, user information, merchant information, order information, a cloud system (100) signature, a user signature and merchant signature information are taken out from the merchant data synchronization unit (305) and uploaded to the cloud system (100), after the cloud system (100) receives the data, the data are stored in the cloud storage unit (103), corresponding user public keys are taken out from the cloud storage unit (103) according to the user information, corresponding merchants are taken out according to the merchant information, then the cloud public key system (100) is taken out and verification is carried out, and then related signatures are obtained: firstly, signature verification of a cloud system (100) is carried out, an MD5 algorithm is used for encrypting electronic ticket information to obtain an MD5 value, then a public key of the cloud system (100) is used for decrypting a signature of the cloud system (100) to obtain a decrypted value, the two values are compared to determine whether the two values are equal, if not, the signature of the cloud system (100) is illegal, and the electronic ticket is generated by a non-cloud system (100); secondly, verifying the user signature, encrypting the electronic ticket information and the user information by using an MD5 algorithm to obtain an MD5 value, decrypting the user signature by using a public key of the user to obtain a decrypted value, comparing the two values to determine whether the two values are equal, and if the two values are not equal, indicating that the user signature is illegal and the electronic ticket is not provided by a user side (200); performing merchant signature verification again, performing MD5 encryption on a character string consisting of the electronic ticket information, the user information, the merchant information and the order information by using an MD5 algorithm to obtain an MD5 value, decrypting the merchant signature by using a merchant public key, comparing the two values, judging whether the two values are equal or not, if not, judging that the merchant signature is illegal, and storing data uploaded by a non-merchant terminal (300), storing the electronic ticket information, the user information, the merchant information, the order information, the signature of a cloud system (100), the user signature, the merchant signature, the signature verification result of the cloud system (100), the user signature verification result and the merchant signature verification result into a cloud storage unit (103), and finally creating order data if the signature of the cloud system (100), the user signature and the merchant signature are legal;
s8, credit assessment: the method comprises the steps of reading user information, merchant information, electronic ticket information and order information from a cloud storage unit (103), then establishing a credit evaluation model aiming at the user and the merchant, carrying out multi-dimensional analysis on the user data and the merchant data, calculating credit levels of the user and the merchant, and guaranteeing or limiting the offline electronic ticket using authority of the merchant according to the credit levels.
3. The offline use method for electronic tickets according to claim 2, characterized in that: in step S6, before generating the order information according to the electronic ticket information, the user information, and the service content, it is further checked whether the electronic ticket is supported by the current merchant, and if so, the step of generating the order is performed.
4. The offline use method for electronic tickets according to claim 2, characterized in that: step S8, calculating the effective rate of the number of the electronic coupons used by the user offline in the period, and setting an effective rate threshold value for stopping the offline use of the electronic coupons of the user; and calculating the effective rate of the merchant offline verification electronic ticket in the period, and setting an effective rate threshold for stopping the merchant from having the offline verification electronic ticket.
5. An offline use system for electronic tickets, characterized in that: the system comprises a cloud system (100), a user side (200), a merchant side (300) and an electronic ticket two-dimensional code (400); the cloud system (100) comprises a key management unit (101), an electronic ticket unit (102), a cloud storage unit (103), a user management unit (104), a merchant management unit (105) and a credit evaluation unit (106); the client (200) comprises a client login unit (201), a client storage unit (202), a client network detection unit (203) and a client data synchronization unit (204); the merchant terminal (300) comprises a merchant terminal login unit (301), a merchant terminal storage unit (302), a verification and cancellation unit (303), a merchant terminal network detection unit (304) and a merchant terminal data synchronization unit (305);
the key management unit (101), the cloud storage unit (103), the user management unit (104) and the merchant management unit (105) are responsible for completing generation, storage and management of a key and a public key of the cloud system (100), a key and a public key of a user and a key and a public key of a merchant;
the user management unit (104) is responsible for managing user information, and the user information comprises a platform unique user ID and mobile phone number information;
the merchant management unit (105) is responsible for managing merchant information, wherein the merchant information comprises a platform unique merchant ID, a merchant name, business license information, longitude and latitude, an address, a door head picture and service item information;
the electronic ticket unit (102) is responsible for managing electronic ticket information, a unique serial number is created when the electronic ticket information is generated, and the electronic ticket information further comprises a usable administrative region, a supportable merchant, validity period information and service item information;
the cloud storage unit (103) is used for storing data of parameters of a key management unit (101), a user management unit (104), an electronic ticket unit (102), a merchant management unit (105) and a credit evaluation unit (106);
the credit evaluation unit (106) evaluates whether the merchant and the user can support offline use of the electronic ticket through multi-dimensional analysis of user information, order information, merchant information and electronic ticket information stored in the cloud storage unit (103).
6. The offline use system for electronic tickets according to claim 5, characterized in that:
the user side login unit (201) is responsible for completing user account registration and login functions, and meanwhile, the user side login unit is capable of acquiring a public key and a user private key of the cloud system (100) and storing the public key and the user private key into the user side storage unit (202);
the user side storage unit (202) is responsible for storing data generated by the user side login unit (201) and the network transmission unit 204;
the user side network detection unit (203) is responsible for detecting the communication condition of the user side (200) connected with the cloud system (100) in real time and storing the communication condition to the user side storage unit (202);
and the user data synchronization unit (204) starts the unit according to the communication detection result of the user network detection unit (203) to the connection cloud system (100), acquires the electronic ticket information of the user from the cloud system (100), and stores the electronic ticket information to the user storage unit (202).
7. The offline use system for electronic tickets according to claim 5, wherein:
the merchant side login unit (301) is responsible for completing the merchant account registration and login functions, and meanwhile, the merchant side login unit is provided with a cloud system (100) public key and a merchant private key of the cloud system (100) and stores the public key and the merchant private key into the merchant side storage unit (302);
the merchant terminal network detection unit (304) is responsible for detecting the communication condition of the merchant terminal (300) connected with the cloud system (100) in real time and storing the communication condition to the merchant terminal storage unit (302);
the verification and sale unit (303) reads the data of the two-dimensional code (400) of the electronic ticket displayed by the user terminal (200) by calling camera equipment, reads the service item ID and the administrative region information of the merchant from the merchant terminal storage unit (302), compares the service item ID and the administrative region information with the electronic ticket information of the two-dimensional code, judges whether the electronic ticket supports the use under the merchant, and if the service item ID and the administrative region information support the creation of order data, stores the order data in the merchant terminal storage unit (302);
the merchant terminal storage unit (302) is responsible for storing data generated by a merchant terminal login unit (301), a merchant terminal network detection unit (304), a merchant terminal data synchronization unit (305) and a verification and cancellation unit (303);
and the merchant data synchronization unit (305) starts the merchant data synchronization unit according to the communication detection result of the merchant network detection unit (304) on the cloud system (100), and reads the electronic coupon information, the user information, the merchant information, the order information, the signature of the cloud system (100), the user signature and the merchant signature information in the merchant storage unit (302) and uploads the electronic coupon information, the user information, the merchant information, the order information, the signature of the cloud system (100) to the cloud system (100).
CN202211682394.4A 2022-12-27 2022-12-27 Offline use method for electronic ticket Pending CN115879998A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211682394.4A CN115879998A (en) 2022-12-27 2022-12-27 Offline use method for electronic ticket

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211682394.4A CN115879998A (en) 2022-12-27 2022-12-27 Offline use method for electronic ticket

Publications (1)

Publication Number Publication Date
CN115879998A true CN115879998A (en) 2023-03-31

Family

ID=85754662

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211682394.4A Pending CN115879998A (en) 2022-12-27 2022-12-27 Offline use method for electronic ticket

Country Status (1)

Country Link
CN (1) CN115879998A (en)

Similar Documents

Publication Publication Date Title
US11799668B2 (en) Electronic identification verification methods and systems with storage of certification records to a side chain
US11777726B2 (en) Methods and systems for recovering data using dynamic passwords
CN102325139B (en) Electronic document processing method, processing system and verification system
CN106302502B (en) A kind of secure access authentication method, user terminal and server-side
AU2010240822B2 (en) System and method for personal certification using a mobile device
CN101521569B (en) Method, equipment and system for realizing service access
US6789193B1 (en) Method and system for authenticating a network user
US6105012A (en) Security system and method for financial institution server and client web browser
CN103107996B (en) Digital certificate download online method and system, digital certificate are provided platform
CN108092779A (en) A kind of method and device for realizing electronic signature
US20110231645A1 (en) System and method to validate and authenticate digital data
WO2018145127A1 (en) Electronic identification verification methods and systems with storage of certification records to a side chain
US20020165830A1 (en) Process and device for electronic payment
CN101546407B (en) Electronic commerce system and management method thereof based on digital certificate
CN104156862A (en) Wechat-platform-based two-dimensional code anti-fake and anti-channel conflict inquiry system and method
US20080284565A1 (en) Apparatus, System and Methods for Supporting an Authentication Process
US7660981B1 (en) Verifiable chain of transfer for digital documents
US20210234705A1 (en) Improved system and method for internet access age-verification
CN106656955A (en) Communication method and system and user terminal
CN108900472B (en) Information transmission method and device
CN111369364A (en) Electronic signature method and device based on super counter
CN105610570A (en) Registration method and system for installation of compiling environment
JP2001147984A (en) System and method for electronic voting
CN115879998A (en) Offline use method for electronic ticket
CN114862529A (en) Method and system for remote bidding and centralized bid opening

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