CN113628352B - Subway ticket business system based on secondary selling and subway ticket secondary selling method - Google Patents

Subway ticket business system based on secondary selling and subway ticket secondary selling method Download PDF

Info

Publication number
CN113628352B
CN113628352B CN202110734835.XA CN202110734835A CN113628352B CN 113628352 B CN113628352 B CN 113628352B CN 202110734835 A CN202110734835 A CN 202110734835A CN 113628352 B CN113628352 B CN 113628352B
Authority
CN
China
Prior art keywords
dimensional code
ticket
user
party
module
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
CN202110734835.XA
Other languages
Chinese (zh)
Other versions
CN113628352A (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.)
Southeast University
Original Assignee
Southeast University
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 Southeast University filed Critical Southeast University
Priority to CN202110734835.XA priority Critical patent/CN113628352B/en
Publication of CN113628352A publication Critical patent/CN113628352A/en
Application granted granted Critical
Publication of CN113628352B publication Critical patent/CN113628352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B3/00Machines for issuing preprinted tickets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10544Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum
    • G06K7/10821Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation by scanning of the records by radiation in the optical part of the electromagnetic spectrum further details of bar or optical code scanning devices
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Devices For Checking Fares Or Tickets At Control Points (AREA)

Abstract

The application relates to a subway ticket business system based on secondary selling and a subway ticket secondary selling method. The method comprises the following steps: the system comprises a user terminal APP, a cloud server, a two-dimension code gate machine and a third-party background server, wherein the user terminal APP is used for communicating with the third-party background server to achieve the purposes of obtaining and displaying a two-dimension code subway ticket; the third-party background server is used for communicating with the user terminal APP and the cloud server to send the two-dimensional code metro ticket data packet to the user terminal APP; the cloud server is used for communicating with a third-party background server and the two-dimensional code gate, issuing the two-dimensional code subway ticket and verifying the validity of the two-dimensional code subway ticket; the two-dimensional code gate machine is used for scanning the two-dimensional code metro ticket and reading corresponding two-dimensional code information, communicates with the cloud server, verifies the validity and effectiveness of the two-dimensional code metro ticket, controls the opening and closing of the door according to the verification result, and solves the problem that the two-dimensional code metro ticket business is difficult to expand.

Description

Subway ticket business system based on secondary selling and subway ticket secondary selling method
Technical Field
The application relates to the technical field of internet, in particular to a subway ticket business system based on secondary selling and a subway ticket secondary selling method.
Background
With the application of the internet plus technology in rail transit, a new generation of mobile payment technology represented by two-dimensional code passing brake is rapidly developed. According to statistics, in all the brake passing technologies, the ratio of the APP two-dimensional code brake passing riding is 34%, and the ratio is the highest. At present, two-dimensional code passing brake riding is realized in most urban subways in China, and the two-dimensional code riding coverage rate reaches 100%.
At present, the two-dimensional bus taking code adopted by each subway company in China mainly comprises official APP (application), cloud flash payment bus taking codes, paibao bus taking codes, weChat bus taking codes, suning bus taking codes and the like, the two-dimensional bus payment gate-crossing industry is basically monopolized by the huge numbers, some companies with smaller scales cannot participate in the bus taking process, and the subway two-dimensional bus gate-crossing business is difficult to expand.
Disclosure of Invention
Therefore, it is necessary to provide a subway ticket service system and a subway ticket secondary selling method based on secondary selling aiming at the problem that the subway two-dimensional code gate-passing service is difficult to expand.
A subway ticketing system based on secondary distribution, the system comprising: the system comprises a user terminal APP, a cloud server, a two-dimensional code gate machine and a third-party background server;
the user terminal APP is used for communicating with the third-party background server to achieve the purposes of obtaining and displaying the two-dimensional code subway ticket;
the third-party background server is used for communicating with the user terminal APP and the cloud server to send a two-dimensional code metro ticket data packet to the user terminal APP;
the cloud server is used for communicating with the third-party background server and the two-dimensional code gate to realize the issuing of the two-dimensional code subway ticket and verify the validity and validity of the two-dimensional code subway ticket;
the two-dimension code gate is used for scanning the two-dimension code metro ticket, reading corresponding two-dimension code information, communicating with the cloud server, verifying the validity and validity of the two-dimension code metro ticket, and controlling the opening and closing of the door according to a verification result.
In one embodiment, the user terminal APP includes: the system comprises a user management module, a card management module, a travel management module, a payment management module, a two-dimensional code management module and a login supplementing module;
the user management module is used for realizing user registration of a user and management of user identity information;
the card management module is used for managing subway electronic cards and issued coupons of different cities;
the travel management module is used for inquiring the travel record of the user;
the payment management module is used for realizing payment operation after the user completes two-dimensional code subway ticket transaction;
the two-dimension code management module is used for realizing acquisition, refreshing and display of the two-dimension code subway ticket;
the subsidy module is used for completing the transaction subsidy operation by the user under the condition that abnormal transactions occur.
In one embodiment, the third-party backend server includes: the system comprises a user registration module, a first database module and an interface management module;
the user registration module is used for realizing information interaction with the user terminal APP, completing user registration and generating a user digital certificate;
the first database module is used for storing user identity information and transaction records of users;
the interface management module is used for verifying according to the two-dimensional code metro ticket acquisition request sent by the user terminal APP, sending a data packet acquisition request for acquiring the two-dimensional code metro ticket data packet to the cloud server when the verification is passed, and sending the acquired two-dimensional code metro ticket data packet to the user terminal APP.
In one embodiment, the cloud server includes: the system comprises a third-party registration module, a key module, a code sending module, a transaction verification module, a travel matching module, a transaction fee deduction module, a second database module and a clearing and reconciliation module;
the third party registration module is used for realizing the registration of a third party and generating a third party digital certificate;
the secret key module is used for generating a public secret key and a private secret key, the private secret key is used for signing the two-dimensional code metro ticket, and the public secret key is sent to the two-dimensional code gate;
the code sending module is used for realizing communication with a third-party background server and the two-dimensional code gate, acquiring and verifying user identity information and third-party information of a user, performing digital signature on the verified user by using the private key according to the user identity information and the contained third-party information, and issuing a two-dimensional code metro ticket;
the transaction verification module is used for verifying the validity and validity of the two-dimension code metro ticket on line;
the travel matching module is used for matching the travel route of the user according to the information of the user on/off and the time information;
the transaction fee deduction module is used for calculating fee according to the travel information of the user, applying for money to the user, and transmitting transaction records and fee deduction information to the user terminal APP through the third-party background server to enable the user to complete payment operation;
the second database module is used for storing information of a third party to which the two-dimensional code metro ticket belongs, user identity information, station line information, station entering and exiting information, abnormal ticket business information and completed transaction records, and classified storage of the transaction records is realized according to the third party to which the two-dimensional code metro ticket belongs;
and the checking and account checking module is used for realizing charging to a third party according to the transaction record stored in the second database module.
In one embodiment, the two-dimensional code gate comprises: the system comprises a two-dimensional code scanning module, a gate verification module and a key management module;
the two-dimension code scanning module is used for scanning the two-dimension code subway ticket and reading corresponding two-dimension code information;
the gate machine verification module is used for analyzing the content of the two-dimension code information, generating transaction data, wirelessly communicating with the cloud server, verifying the legality and validity of the two-dimension code metro ticket according to the transaction data on line, controlling the opening and closing of the leaf door, completing uploading of the transaction data, verifying the legality of the two-dimension code metro ticket when the two-dimension code metro ticket is in an off-line mode, controlling the opening and closing of the leaf door, storing the transaction record of the two-dimension code metro ticket in the local, and completing uploading of the transaction data after network recovery.
The key management module is used for obtaining a public key issued by the cloud server, analyzing the content of the two-dimension code information by using the public key, verifying the validity of the two-dimension code subway ticket and determining that the two-dimension code subway ticket is generated and issued by the cloud server.
A method for secondary sale of subway tickets, comprising:
receiving a two-dimensional code metro ticket acquisition request sent by a user through a user terminal APP,
acquiring a digital certificate of the user according to the two-dimensional code metro ticket acquisition request for identity verification;
when the identity of the user passes verification, sending a data packet acquisition request for acquiring a two-dimensional code subway ticket data packet to the cloud server, enabling the cloud server to generate a pair of secret keys according to the data packet acquisition request, generating the two-dimensional code subway ticket data packet by using a private key of the secret keys, sending a public key of the secret keys to the two-dimensional code gate, wherein the data packet acquisition request carries an information data packet signed by using a private key of a third party, and the information data packet comprises third party information and user information;
receiving the two-dimension code subway ticket data packet fed back by the server, and sending the two-dimension code subway ticket data packet to the user terminal APP, so that the user terminal APP displays the two-dimension code subway ticket according to the two-dimension code subway ticket data packet.
In one embodiment, the method further comprises:
receiving a user registration request sent by the user terminal APP, wherein the user registration request carries a user name, an identity card number, a mobile phone number and a payment mode;
and generating a digital certificate of the user according to the user name, the identity card number, the mobile phone number and the payment mode.
In one embodiment, the method further comprises:
and when the identity authentication of the user does not pass, returning error prompt information to the user terminal APP.
A subway ticket secondary sale method, the method comprising:
receiving the data packet acquisition request sent by the third-party background server, wherein the data packet acquisition request carries an information data packet signed by a private key of a third party, and the information data packet comprises third-party information and user information;
according to the data packet obtaining request, obtaining a digital certificate of the third party to verify the validity of the information data packet;
when the verification passes, generating a pair of keys;
generating a two-dimensional code subway ticket data packet according to a private key of the secret key, and sending the two-dimensional code subway ticket data packet to the third-party background server, wherein the two-dimensional code subway ticket data packet is a data packet which is digitally signed by using the private key, and the data packet comprises third-party information, user information and a timestamp;
and sending a public key of the key to the two-dimensional code gate, so that the two-dimensional code gate verifies the legality and validity of the two-dimensional code metro ticket generated by the two-dimensional code metro ticket data packet, and controlling the opening and closing of the leaf door according to a verification result.
In one embodiment, the method further comprises:
and when the verification fails, returning error prompt information to the third-party background server.
The subway ticket business system based on secondary selling and the subway ticket secondary selling method comprise the following steps: the system comprises a user terminal APP, a cloud server, a two-dimension code gate machine and a third-party background server, wherein the user terminal APP is used for communicating with the third-party background server to achieve the purposes of obtaining and displaying a two-dimension code metro ticket; the third-party background server is used for communicating with the user terminal APP and the cloud server to send the two-dimensional code metro ticket data packet to the user terminal APP; the cloud server is used for communicating with a third-party background server and the two-dimensional code gate, issuing the two-dimensional code subway ticket and verifying the validity of the two-dimensional code subway ticket; the two-dimensional code floodgate machine is used for realizing scanning the two-dimensional code subway ticket and reads the two-dimensional code information that corresponds, and communicate with cloud ware, carry out legitimacy and validity verification to the two-dimensional code subway ticket, according to the switch of verification result control fan door, the difficult problem of two-dimensional code subway ticket business extension has been overcome, issue the two-dimensional code subway ticket to third party company through subway direction, the third party company can sell the two-dimensional code subway ticket to the passenger through user terminal APP form, need not to put into too high cost and can realize the extension of business, the operation cost of subway side has been reduced, the income of operation company has been improved, the development of internet economy has been promoted.
Drawings
Fig. 1 is a schematic structural diagram of a subway ticketing system based on secondary selling in one embodiment;
fig. 2 is a schematic structural diagram of a subway ticketing system based on secondary sale in another embodiment;
FIG. 3 is a schematic flow chart illustrating a secondary subway ticket distribution method according to an embodiment;
FIG. 4 is a schematic flow chart illustrating a secondary subway ticket distribution method according to another embodiment;
fig. 5 is a schematic view of a processing flow of a two-dimensional code gate of the subway ticket secondary selling method in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, there is provided a subway ticketing system based on secondary sales, including: the system comprises a user terminal APP, a cloud server, a two-dimensional code gate machine and a third-party background server; user terminal APP communicates with a third party background server through a network, the third party background server communicates with a cloud server through the network, the cloud server communicates with a two-dimensional code gate machine through the network, and the two-dimensional code gate machine is provided with a two-dimensional code metro ticket displayed on a terminal of the user terminal APP through scanning.
The user terminal APP is used for communicating with a third-party background server to achieve the purposes of obtaining and displaying the two-dimensional code subway ticket; the third-party background server is used for communicating with the user terminal APP and the cloud server to send the two-dimensional code metro ticket data packet to the user terminal APP; the cloud server is used for communicating with a third-party background server and the two-dimensional code gate, issuing the two-dimensional code subway ticket and verifying the validity of the two-dimensional code subway ticket; the two-dimensional code gate machine is used for scanning the two-dimensional code metro ticket and reading corresponding two-dimensional code information, communicates with the cloud server, verifies the validity and effectiveness of the two-dimensional code metro ticket, and controls the opening and closing of the door according to the verification result.
The third-party background server is a background server established by a company which performs secondary selling on the two-dimensional code subway ticket, and can also be called as a background server of a third-party company, the number of the third-party companies can be more than one, as shown in fig. 2, for example, three third-party companies are taken as an example, and the three third-party companies respectively have corresponding background servers and corresponding user terminals (APP). The subway side is used for issuing two-dimensional code subway tickets and processing transactions by establishing a special cloud server, the subway side issues internet tickets to a third party company in a large scale, a user acquires the two-dimensional code subway tickets through a user terminal APP released by the third party company to realize subway station entrance and exit operation, secondary issuing is realized, a cloud server is adopted to realize a cloud architecture, the traditional AFC five-layer architecture is optimized, and the requirements of high-efficiency storage, reading and writing and calculation are met.
The subway ticketing system based on secondary selling comprises: the system comprises a user terminal APP, a cloud server, a two-dimension code gate machine and a third-party background server, wherein the user terminal APP is used for communicating with the third-party background server to achieve the purposes of obtaining and displaying a two-dimension code metro ticket; the third-party background server is used for communicating with the user terminal APP and the cloud server to send the two-dimensional code metro ticket data packet to the user terminal APP; the cloud server is used for communicating with a third-party background server and the two-dimensional code gate, issuing the two-dimensional code subway ticket and verifying the validity of the two-dimensional code subway ticket; the two-dimensional code floodgate machine is used for realizing scanning the two-dimensional code subway ticket and reads the two-dimensional code information that corresponds, and communicate with cloud ware, carry out legitimacy and validity verification to the two-dimensional code subway ticket, according to the switch of verification result control fan door, the difficult problem of two-dimensional code subway ticket business extension has been overcome, issue the two-dimensional code subway ticket to third party company through subway direction, the third party company can sell the two-dimensional code subway ticket to the passenger through user terminal APP form, need not to put into too high cost and can realize the extension of business, the operation cost of subway has been reduced, the income of operation company has been improved, the development of internet economy has been promoted.
In one embodiment, the user terminal APP comprises: the system comprises a user management module, a card management module, a travel management module, a payment management module, a two-dimensional code management module and a login supplementing module; the user management module is used for realizing user registration of a user and management of user identity information; the card management module is used for managing subway electronic cards and issued coupons of different cities; the travel management module is used for inquiring travel records of the user; the payment management module is used for realizing payment operation after the user completes two-dimensional code metro ticket transaction; the two-dimension code management module is used for realizing acquisition, refreshing and display of the two-dimension code subway ticket; and the subsidy module is used for completing the transaction subsidy operation by the user under the condition that abnormal transactions occur.
In one embodiment, the third party backend server comprises: the system comprises a user registration module, a first database module and an interface management module; the user registration module is used for realizing information interaction with a user terminal APP, completing user registration and generating a user digital certificate; the first database module is used for storing user identity information and transaction records of users; the interface management module is used for verifying according to a two-dimensional code subway ticket acquisition request sent by a user terminal APP, and when the verification is passed, sending a data packet acquisition request for acquiring a two-dimensional code subway ticket data packet to the cloud server, and sending the acquired two-dimensional code subway ticket data packet to the user terminal APP.
In one embodiment, a cloud server includes: the system comprises a third-party registration module, a key module, a code sending module, a transaction verification module, a travel matching module, a transaction fee deduction module, a second database module and a clearing and reconciliation module; the third party registration module is used for realizing the registration of a third party and generating a third party digital certificate; the secret key module is used for generating a public secret key and a private secret key, the private secret key is used for signing the two-dimensional subway ticket, and the public secret key is sent to the two-dimensional gate; the code sending module is used for realizing communication with a third-party background server and a two-dimensional code gate, acquiring and verifying user identity information and third-party information of a user, performing digital signature on the verified user by using a private key according to the user identity information and the contained third-party information, and issuing a two-dimensional code metro ticket; the transaction verification module is used for verifying the validity and validity of the two-dimensional code subway ticket on line.
And after receiving the public key, the two-dimensional code gate updates and stores the latest public key. And verifying the legality and validity of the two-dimensional code metro ticket, wherein the legality mainly verifies the digital signature of the two-dimensional code metro ticket, and the validity verification mainly verifies whether the transaction is duplicated, whether the travel time is overtime, the travel station is accessed or not, and whether unprocessed ticketing abnormity exists or not.
The travel matching module is used for matching the travel route of the user according to the input and output information and the time information of the user; the transaction fee deduction module is used for calculating fee according to the travel information of the user, applying for money to the user, transmitting transaction records and fee deduction information to the user terminal APP through the third-party background server, and enabling the user to finish payment operation; the second database module is used for storing information of a third party to which the two-dimensional code metro ticket belongs, user identity information, site line information, station entrance and exit information, abnormal ticket business information and completed transaction records, and storing the transaction records in a classified manner according to the third party to which the two-dimensional code metro ticket belongs; and the account checking and reconciliation module is used for realizing the reconciliation and charging to the third party according to the transaction record stored in the second database module.
In one embodiment, a two-dimensional code gate comprises: the system comprises a two-dimensional code scanning module, a gate verification module and a key management module; the two-dimensional code scanning module is used for scanning the two-dimensional code subway ticket and reading corresponding two-dimensional code information; the gate machine verification module is used for analyzing the content of the two-dimension code information, generating transaction data, wirelessly communicating with the cloud server, verifying the legality and validity of the two-dimension code metro ticket according to the transaction data on line, controlling the opening and closing of the leaf door, completing uploading of the transaction data, verifying the legality of the two-dimension code metro ticket when the two-dimension code metro ticket is in an off-line mode, controlling the opening and closing of the leaf door, storing the transaction record of the two-dimension code metro ticket in the local, and completing uploading of the transaction data after network recovery. The key management module is used for obtaining a public key issued by the cloud server, analyzing the content of the two-dimensional code information by using the public key, verifying the validity of the two-dimensional code metro ticket and determining that the two-dimensional code metro ticket is generated and issued by the cloud server.
In an embodiment, as shown in fig. 3, a subway ticket secondary selling method is described with a third-party background server as an execution subject, and includes the following steps:
step S220, receiving a two-dimensional code metro ticket acquisition request sent by a user through a user terminal APP.
And S240, acquiring a digital certificate of the user according to the two-dimensional code subway ticket acquisition request for identity verification.
Step S260, when the identity of the user passes the verification, a data packet obtaining request for obtaining the two-dimensional code subway ticket data packet is sent to the cloud server, so that the cloud server generates a pair of secret keys according to the data packet obtaining request, the two-dimensional code subway ticket data packet is generated through a private key of the secret keys, a public key of the secret keys is sent to the two-dimensional code gate, an information data packet signed by a private key of a third party is carried in the data packet obtaining request, and the information data packet comprises third party information and user information.
Step S280, receiving the two-dimensional code subway ticket data packet fed back by the server, sending the two-dimensional code subway ticket data packet to the user terminal APP, and enabling the user terminal APP to display the two-dimensional code subway ticket according to the two-dimensional code subway ticket data packet.
In one embodiment, the subway ticket secondary selling method further comprises the following steps:
receiving a user registration request sent by a user terminal APP, wherein the user registration request carries a user name, an identity card number, a mobile phone number and a payment mode; and generating a digital certificate of the user according to the user name, the identity card number, the mobile phone number and the payment mode.
In one embodiment, the subway ticket secondary selling method further comprises the following steps: and when the identity authentication of the user does not pass, returning error prompt information to the user terminal APP.
According to the method for selling the subway tickets for the second time, a two-dimensional code subway ticket acquisition request sent by a user through a user terminal APP is received, and a digital certificate of the user is acquired according to the two-dimensional code subway ticket acquisition request for identity verification; when the identity of a user passes verification, a data packet acquisition request for acquiring a two-dimensional code subway ticket data packet is sent to a cloud server, so that the cloud server generates a pair of secret keys according to the data packet acquisition request, the two-dimensional code subway ticket data packet is generated through a private key of the secret keys, a public key of the secret keys is sent to a two-dimensional code gate machine, an information data packet signed by a private key of a third party is carried in the data packet acquisition request, and the information data packet comprises third party information and user information; receive the two-dimensional code subway ticket data package of server feedback, and send the two-dimensional code subway ticket data package to user terminal APP, make user terminal APP show that two-dimensional code subway ticket is shown according to two-dimensional code subway ticket data package, overcome the difficult problem of two-dimensional code subway ticket business extension, through subway direction third party company issue two-dimensional code subway ticket, third party company can sell the two-dimensional code subway ticket to the passenger through user terminal APP form, need not to invest too high cost and can realize the extension of business, the operation cost of subway side has been reduced, the income of operation company has been improved, the development of internet economy has been promoted.
In one embodiment, as shown in fig. 4, a method for secondarily selling subway tickets is described by taking a cloud server as an execution subject, and the method includes:
step S420, a data packet obtaining request sent by the third-party backend server is received, where the data packet obtaining request carries an information data packet signed by using a private key of the third party, and the information data packet includes third-party information and user information.
Step S440, according to the data packet obtaining request, obtaining a digital certificate of a third party to verify the validity of the information data packet.
In step S460, when the verification passes, a pair of keys is generated.
Step S480, generating a two-dimensional code metro ticket data packet according to a private key of the secret key, and sending the two-dimensional code metro ticket data packet to a third-party background server, wherein the two-dimensional code metro ticket data packet is a data packet digitally signed by using the private key, and the data packet comprises third-party information, user information and a timestamp.
And S500, sending a public key of the key to the two-dimensional code gate, enabling the two-dimensional code gate to verify the validity and validity of the two-dimensional code subway ticket generated through the two-dimensional code subway ticket data packet, and controlling the opening and closing of the door according to a verification result.
In one embodiment, the subway ticket secondary selling method further comprises the following steps: and when the verification fails, returning error prompt information to the third-party background server.
According to the method for selling the subway tickets for the second time, a data packet acquisition request sent by a third-party background server is received, wherein the data packet acquisition request carries an information data packet signed by a private key of the third party, and the information data packet comprises third-party information and user information; according to the data packet acquisition request, acquiring a digital certificate of a third party to verify the validity of the information data packet; when the verification passes, generating a pair of keys; generating a two-dimensional code subway ticket data packet according to a private key of the secret key, and sending the two-dimensional code subway ticket data packet to a third-party background server, wherein the two-dimensional code subway ticket data packet is a data packet digitally signed by using the private key, and comprises third-party information, user information and a timestamp; the public key of the key is sent to the two-dimensional code gate, the two-dimensional code gate is enabled to verify the legality and the validity of the two-dimensional code metro ticket generated through the two-dimensional code metro ticket data packet, the door is controlled to be opened and closed according to the verification result, the problem that the two-dimensional code metro ticket business is difficult to expand is solved, the two-dimensional code metro ticket is issued to a third party company through the metro, the third party company can sell the two-dimensional code metro ticket to a passenger through a user terminal APP mode, the business expansion can be achieved without investing too high cost, the operation cost of the metro is reduced, the income of the operation company is improved, and the development of internet economy is promoted.
In order to clearly describe the subway ticket secondary selling method, the concrete steps are described by combining each execution main body, and the concrete steps are as follows:
before the subway ticket secondary selling method is executed, a third party company needs to be registered, a company needing to purchase a two-dimensional code subway ticket sold by a subway party registers in the subway party and uploads the company to a second database module of a cloud server based on the subway party sold for the second time, a digital certificate of the third party company is generated, and the registration and authentication of the third party company are completed.
Before a user purchases a two-dimensional code metro ticket through a user terminal APP developed by a third party company which completes registration and authentication, user registration is needed, the user registers a user name, an identity card number, a mobile phone number and a payment mode in a user management module in the user terminal APP, the user communicates with a third party background server to generate a digital certificate of the user, registration is completed, and when information needs to be changed subsequently, the user also operates in the user management module.
Referring to fig. 5, a process of taking a subway by a user using a user terminal APP:
(1) Please code: the user firstly establishes communication with a third-party background server through a two-dimension code management module of the user terminal APP, and the user terminal APP carries out digital signature on user information by using a user private key and sends the user information to the third-party background server to apply for the two-dimension code metro ticket. And the third-party background server inquires the digital certificate of the user, verifies the validity of the signature of the user by using the digital certificate of the user, and returns error prompt information to the user terminal APP if the verification fails. If the verification is passed, the third-party background server sends an information data packet (namely a data packet acquisition request) containing third-party company information and user information and signed by using a private key of the third-party company to the cloud server through the interface management module, wherein the data packet acquisition request is a request carrying the information data packet containing the third-party company information and the user information and signed by using the private key of the third-party company, and the code sending module of the cloud server judges the validity of the data packet by inquiring a digital certificate of the third-party company and verifying the validity of the signature of the third-party company by using the digital certificate. And if the verification fails, returning error prompt information to the third-party company background server. If the verification is passed, firstly, a pair of keys (the keys comprise a private key and a public key) is generated by a cloud server key module, the generated private key is used for carrying out digital signature on a two-dimensional code subway ticket data packet containing information such as third-party company information, user information, a timestamp and the like, the public key is transmitted to a key management module of a two-dimensional code gate machine through wireless communication, then the two-dimensional code subway ticket data packet is firstly sent to a third-party background server and then sent to a user terminal APP by the third-party background server, the user terminal APP generates a two-dimensional code subway ticket according to the two-dimensional code subway ticket data packet transmitted by the cloud server, and as the information of the two-dimensional code subway ticket comprises two-dimensional code subway ticket generation time and effective time (the effective time can be set according to actual conditions, if the effective time is set to be 30s, a code requesting process needs to be carried out again every 30s, a new two-dimensional code subway ticket is obtained from the cloud server through the third-party background server, and otherwise the two-dimensional code subway ticket cannot be used.
(2) Entering and exiting the station: the user aims at the two-dimensional code scanning module of two-dimensional code gate with the two-dimensional code subway ticket when the arrival, two-dimensional code subway ticket on the user terminal APP is gathered to the two-dimensional code gate, this two-dimensional code subway ticket is the two-dimensional code subway ticket of being encrypted by cloud ware signature, two-dimensional code subway ticket is decoded to the two-dimensional code gate, obtain the two-dimensional code information, this two-dimensional code information includes the data packet of information such as third party company information that contains of cloud ware use private key signature, user information, two-dimensional code generation time, two-dimensional code effective time. The gate verification module verifies the digital signature of the two-dimensional code metro ticket through a public key issued by the cloud server, and judges the validity of the two-dimensional code metro ticket. And if the judgment result is illegal, displaying error information on a gate display screen. If the two-dimensional code metro ticket is legal, the cloud server transaction verification module is communicated with the cloud server transaction verification module, the validity of the two-dimensional code metro ticket is verified on line, and verification contents comprise: the method comprises the steps of checking transaction weight, judging whether the travel time is overtime or not, logically judging whether the travel station enters or exits or not, judging whether unprocessed ticketing is abnormal or not, controlling a door of a two-dimensional code gate to be opened after verification is passed, and transmitting the identified two-dimensional code information to a second database module of a cloud server. If the verification fails, the abnormal information is transmitted to a third-party background server in a wireless transmission mode through a transaction verification module of the cloud server, the third-party background server wirelessly transmits the abnormal information to the user terminal APP through an interface management module and displays the abnormal information in a login supplementing module of the user terminal APP, and a user can complete transaction login supplementing operation in the user terminal APP according to the abnormal information.
(3) Transaction processing: the travel matching module of the cloud server generates user travel information according to the station passing in and out and the time in the transaction records uploaded by the two-dimensional code gate machine, the transaction fee deduction module calculates the fee according to the travel information, the cloud server requests money from the third-party background server, then the third-party background server requests money from the user terminal APP, the fee deduction information is wirelessly transmitted to the user terminal APP, the user completes payment operation, meanwhile, the transaction information is stored in the second database module of the cloud server and the first database module of the third-party background server, and the subsequent subway party carries out account settlement on different third-party companies.
Wherein, further describe the processing procedure with the angle of two-dimensional code floodgate machine:
(1) Scanning the two-dimensional code subway ticket: the two-dimensional code gate machine collects a two-dimensional code subway ticket displayed on a user terminal APP, and the two-dimensional code subway ticket is signed and encrypted by a cloud server.
(2) Decoding the two-dimension code metro ticket: and decoding the two-dimension code metro ticket to obtain a data packet which is signed by the cloud server by using a private key and contains information of third party company, user information, two-dimension code generation time, two-dimension code effective time and the like.
(3) And (3) decrypting the digital signature: the gate verification module of the two-dimensional code gate analyzes the digital signature according to the public key generated and transmitted by the cloud server, and the two-dimensional code subway ticket can be judged to be generated and issued by the cloud server as long as the gate verification module can correctly verify the digital signature, so that the content is not tampered, and the two-dimensional code subway ticket is real and credible. And the gate machine verification module transmits the analyzed two-dimension code information and the station information to which the two-dimension code gate machine belongs to the cloud server in a wireless communication mode.
(4) And (3) two-dimensional code verification: the cloud server verifies the validity and effectiveness of the two-dimensional code subway ticket, judges the logic of entering and leaving the station of the two-dimensional code subway ticket, and respectively verifies whether the two-dimensional code subway ticket enters the station or leaves the station. The inbound verification comprises whether unprocessed unilateral transaction or abnormal information exists; the outbound verification comprises the conditions of whether unprocessed unilateral transaction or abnormal information exists, whether the travel time is overtime and whether the two-dimensional code subway ticket is multiplexed. And the cloud server stores the information after transaction verification and transmits a verification result to the two-dimensional code gate.
(5) And (4) opening and closing a gate: if the verification is passed, the two-dimensional code gate machine controls the opening of the leaf door according to the verification result transmitted by the cloud server. If the verification fails, the cloud server transmits the abnormal information to the user terminal APP through the third-party background server, and the user needs to complete the login operation on the user terminal APP, so that the user can continue to use the two-dimensional code subway ticket to complete the station entering and exiting operation.
During the cooperation of the subway party and the third party company, the processing process of accounting of the subway party and the third party company comprises the following steps: and the subway party reads the transaction records under different third-party company directories from the second database module in the cloud server and applies for money to the corresponding third-party companies, and the third-party companies perform account checking according to the transaction records stored in the first database module of the corresponding third-party background server, so that the financial settlement process of the subway party to the third-party companies is realized.
It should be understood that although the steps in the flowcharts of fig. 4 and 5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least some of the steps in fig. 4 and 5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is specific and detailed, but not to be understood as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. A subway ticketing system based on secondary selling is characterized in that the system comprises: the system comprises a user terminal APP, a cloud server, a two-dimensional code gate machine and a third-party background server;
the user terminal APP is used for communicating with the third-party background server to achieve the purposes of obtaining and displaying the two-dimensional code subway ticket;
the third-party background server is used for communicating with the user terminal APP and the cloud server to send a two-dimensional subway ticket data packet to the user terminal APP;
the cloud server is used for communicating with the third-party background server and the two-dimensional code gate to realize the issuing of the two-dimensional code subway ticket and verify the validity and validity of the two-dimensional code subway ticket;
the two-dimensional code gate is used for scanning the two-dimensional code subway ticket, reading corresponding two-dimensional code information, communicating with the cloud server, verifying the legality and validity of the two-dimensional code subway ticket and controlling the opening and closing of a door according to a verification result;
the cloud server includes: the system comprises a third party registration module, a key module, a code sending module, a transaction verification module, a travel matching module, a transaction fee deduction module, a second database module and a sorting and reconciliation module;
the third party registration module is used for realizing the registration of a third party and generating a third party digital certificate;
the secret key module is used for generating a public secret key and a private secret key, the private secret key is used for signing the two-dimensional code metro ticket, and the public secret key is sent to the two-dimensional code gate;
the code sending module is used for realizing communication with a third-party background server and the two-dimensional code gate, acquiring and verifying user identity information and third-party information of a user, performing digital signature on the verified user by using the private key according to the user identity information and the contained third-party information, and issuing a two-dimensional code metro ticket;
the transaction verification module is used for verifying the validity and validity of the two-dimension code metro ticket on line;
the travel matching module is used for matching the travel route of the user according to the information of the user on/off and the time information;
the transaction fee deduction module is used for calculating fee according to the travel information of the user, applying for money to the user, transmitting transaction records and fee deduction information to the user terminal APP through the third-party background server, and enabling the user to complete payment operation;
the second database module is used for storing third party information, user identity information, site line information, station entering and exiting information, abnormal ticket information and completed transaction records of the two-dimensional code subway ticket, and the transaction records are stored in a classified mode according to the third party to which the two-dimensional code subway ticket belongs;
and the checking and account checking module is used for realizing charging to a third party according to the transaction record stored in the second database module.
2. The system according to claim 1, characterized in that said user terminal APP comprises: the system comprises a user management module, a card management module, a travel management module, a payment management module, a two-dimensional code management module and a login supplementing module;
the user management module is used for realizing user registration of a user and management of user identity information;
the card management module is used for managing subway electronic cards and issued coupons of different cities;
the travel management module is used for inquiring the travel record of the user;
the payment management module is used for realizing payment operation after the user completes two-dimensional code subway ticket transaction;
the two-dimension code management module is used for realizing acquisition, refreshing and display of the two-dimension code subway ticket;
the login supplementing module is used for completing transaction login supplementing operation of the user under the condition that abnormal transactions occur.
3. The system of claim 1, wherein the third-party backend server comprises: the system comprises a user registration module, a first database module and an interface management module;
the user registration module is used for realizing information interaction with the user terminal APP, completing user registration and generating a user digital certificate;
the first database module is used for storing user identity information and transaction records of users;
the interface management module is used for verifying according to the two-dimensional code subway ticket acquisition request sent by the user terminal APP, sending a data packet acquisition request for acquiring a two-dimensional code subway ticket data packet to the cloud server when the verification is passed, and sending the acquired two-dimensional code subway ticket data packet to the user terminal APP.
4. The system of claim 1, wherein the two-dimensional code gate comprises: the system comprises a two-dimensional code scanning module, a gate verification module and a key management module;
the two-dimension code scanning module is used for scanning the two-dimension code subway ticket and reading corresponding two-dimension code information;
the gate machine verification module is used for analyzing the content of the two-dimension code information, generating transaction data, wirelessly communicating with the cloud server, verifying the legality and validity of the two-dimension code metro ticket according to the transaction data on line, controlling the opening and closing of a door, completing uploading of the transaction data, verifying the legality of the two-dimension code metro ticket when the two-dimension code metro ticket is in an off-line mode, controlling the opening and closing of the door, storing the transaction record of the two-dimension code metro ticket in the local, and completing uploading of the transaction data after network recovery;
the key management module is used for obtaining a public key issued by the cloud server, analyzing the content of the two-dimension code information by using the public key, verifying the validity of the two-dimension code metro ticket and determining that the two-dimension code metro ticket is generated and issued by the cloud server.
5. A subway ticket secondary selling method is characterized by comprising the following steps:
receiving a data packet acquisition request sent by a third-party background server, wherein the data packet acquisition request carries an information data packet signed by a private key of a third party, and the information data packet comprises third-party information and user information;
according to the data packet obtaining request, obtaining a digital certificate of the third party to verify the validity of the information data packet;
when the verification is passed, generating a pair of keys;
generating a two-dimensional code metro ticket data packet according to a private key of the secret key, and sending the two-dimensional code metro ticket data packet to the third-party background server, wherein the two-dimensional code metro ticket data packet is a data packet which is digitally signed by using the private key, and the data packet comprises third-party information, user information and a timestamp;
and sending a public key of the key to a two-dimensional code gate, so that the two-dimensional code gate verifies the legality and validity of the two-dimensional code metro ticket generated by the two-dimensional code metro ticket data packet, and controlling the opening and closing of the leaf door according to a verification result.
6. The method of claim 5, further comprising:
and when the verification fails, returning error prompt information to the third-party background server.
CN202110734835.XA 2021-06-30 2021-06-30 Subway ticket business system based on secondary selling and subway ticket secondary selling method Active CN113628352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110734835.XA CN113628352B (en) 2021-06-30 2021-06-30 Subway ticket business system based on secondary selling and subway ticket secondary selling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110734835.XA CN113628352B (en) 2021-06-30 2021-06-30 Subway ticket business system based on secondary selling and subway ticket secondary selling method

Publications (2)

Publication Number Publication Date
CN113628352A CN113628352A (en) 2021-11-09
CN113628352B true CN113628352B (en) 2023-04-07

Family

ID=78378644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110734835.XA Active CN113628352B (en) 2021-06-30 2021-06-30 Subway ticket business system based on secondary selling and subway ticket secondary selling method

Country Status (1)

Country Link
CN (1) CN113628352B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114282892B (en) * 2021-12-22 2023-05-02 成都智元汇信息技术股份有限公司 SDK (software development kit) based method, subway client and system
CN115082051B (en) * 2022-08-24 2022-12-16 中铁电气化局集团有限公司 Diversified payment platform, encryption method and payment equipment for railway ticket business

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105225274A (en) * 2015-09-07 2016-01-06 兴旺 Self-service ticket and ticket checking method and system
CN105787722A (en) * 2016-02-29 2016-07-20 陕西科技大学 System and method for realizing subway charging by mileage based on advanced online payment
CN106779654A (en) * 2016-11-21 2017-05-31 河南辉煌城轨科技有限公司 A kind of subway based on third-party platform is ridden payment methods
CN108234517A (en) * 2018-01-29 2018-06-29 成都智元汇信息技术股份有限公司 A kind of subway based on offline Quick Response Code ticket card is ridden off-line processing system and method
CN111784327A (en) * 2020-07-23 2020-10-16 北京如易行科技有限公司 Two-dimensional code based method and system for selling and verifying promissory tickets

Also Published As

Publication number Publication date
CN113628352A (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN106846506B (en) Method and system for information verification based on information identification code
US7716129B1 (en) Electronic payment methods
CN108010137A (en) A kind of urban track traffic system of real name carrier ticket-checking system and method
EP3688961B1 (en) Federated closed-loop system
WO2002039342A1 (en) Private electronic value bank system
CN113628352B (en) Subway ticket business system based on secondary selling and subway ticket secondary selling method
CN112508575B (en) Subway passing brake payment method and system based on digital currency
US11847233B2 (en) Token state synchronization
CN106529938A (en) Virtual card issuing method, device and terminal
KR20020082670A (en) A payment information input method and mobile commerce system using symmetric cipher system
CN109242663A (en) A kind of bookkeeping methods and system based on block chain technology
CN106934608B (en) Multi-state two-dimensional code synthesis and user signless and signless trading method
CN108460593A (en) A kind of offline Quick Response Code method of payment and device
CN116802661A (en) Token-based out-of-chain interaction authorization
CN110490684B (en) Railway ticket buying management system based on block chain
CN109308608A (en) Ticket checking consumption system and method are sold in rail traffic based on the certification of two dimensional code off line
CN111325585A (en) Asset transfer method, device and computer readable storage medium
CN101571939A (en) Method, device and system for using electronic checks for business transaction
CN109272588A (en) By bus code ride management system and based on code by bus by bus control method
CN107341656A (en) A kind of interactive coded image recognition methods and system
WO2016136798A1 (en) Combination authentication method, combination authentication device and authentication system for station service equipment
KR20200016157A (en) System and method for processing card payment based on block-chain
CN101799941A (en) Highway toll payment system and method thereof based on dual-function card
CN105359192A (en) Method and apparatus for mobile ticketing
CN115409504A (en) Transaction settlement method and device for digital currency and gate machine

Legal Events

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