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

文档序号:228131 发布日期:2021-11-09 浏览:24次 中文

阅读说明:本技术 基于二次发售的地铁票务系统及地铁票二次发售方法 (Subway ticket business system based on secondary selling and subway ticket secondary selling method ) 是由 何铁军 王健 李晓港 张宁 于 2021-06-30 设计创作,主要内容包括:本申请涉及一种基于二次发售的地铁票务系统及地铁票二次发售方法。包括:用户终端APP、云服务器、二维码闸机、第三方后台服务器,用户终端APP用于与第三方后台服务器进行通信,实现获取二维码地铁票和显示;第三方后台服务器用于与用户终端APP和云服务器进行通信,实现向用户终端APP发送二维码地铁票数据包;云服务器用于与第三方后台服务器和二维码闸机通信,实现二维码地铁票的发放,以及对二维码地铁票的合法性和有效性进行验证;二维码闸机用于实现扫描二维码地铁票并读取对应的二维码信息,并与云服务器通信,对二维码地铁票进行合法性和有效性验证,根据验证结果控制扇门的开关,克服了二维码地铁票业务扩展较难的问题。(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 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 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.)

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 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.

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 metro 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.

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 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.

4. The system of claim 1, wherein the cloud server comprises: 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 inbound and outbound 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 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 account checking and reconciliation module is used for realizing the reconciliation and charging to a third party according to the transaction record saved in the second database module.

5. 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 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 metro ticket and determining that the two-dimension code metro ticket is generated and issued by the cloud server.

6. A subway ticket secondary selling method is characterized by comprising the following steps:

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.

7. The method of claim 6, further comprising:

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.

8. The method of claim 6, further comprising:

and when the identity authentication of the user does not pass, returning error prompt information to the user terminal APP.

9. A subway ticket secondary selling method is characterized by comprising the following steps:

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 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 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.

10. The method of claim 9, further comprising:

and when the verification fails, returning error prompt information to the third-party background server.

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 metro 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 inbound and outbound 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 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 account checking and reconciliation module is used for realizing the reconciliation and charging to a third party according to the transaction record saved 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 metro ticket and determining that the two-dimension code metro 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 method for secondary sale of subway tickets, 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 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 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 two-dimensional code subway ticket and reading the corresponding two-dimensional code information, and communicate with cloud ware, carry out legitimacy and validity verification to two-dimensional code subway ticket, the switch of fan door is controlled according to the verification result, the difficult problem of two-dimensional code subway ticket business extension has been overcome, through subway direction third party company issue two-dimensional code subway ticket, the third party company can sell two-dimensional code subway ticket to the passenger through user terminal APP form, need not to drop 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 backend server is a backend server established by a company that sells the two-dimensional code metro tickets for the second time, and may also be referred to as a backend server of a third-party company, the number of the third-party companies may be more than one, as shown in fig. 2, taking three third-party companies as an example, the three third-party companies respectively have corresponding backend 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.

Above-mentioned subway ticketing system based on secondary is sold includes: 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 two-dimensional code subway ticket and reading the corresponding two-dimensional code information, and communicate with cloud ware, carry out legitimacy and validity verification to two-dimensional code subway ticket, the switch of fan door is controlled according to the verification result, the difficult problem of two-dimensional code subway ticket business extension has been overcome, through subway direction third party company issue two-dimensional code subway ticket, third party company can sell 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 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 realizing on-line verification of the validity and validity of the two-dimension code metro ticket.

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.

Step S240, the digital certificate of the user is acquired according to the two-dimensional code metro 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 metro ticket data packet fed back by the server, sending the two-dimensional code metro ticket data packet to the user terminal APP, and enabling the user terminal APP to display the two-dimensional code metro ticket according to the two-dimensional code metro 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 user does not pass the authentication, 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 subway ticket secondary selling method is described with 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 metro ticket generated through the two-dimensional code metro ticket data packet, and controlling the opening and closing of the leaf gate 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 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; 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 cloud server key module generates a pair of keys (the keys comprise a private key and a public key), the generated private key is used for digitally signing a two-dimensional 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 subway ticket data packet is firstly transmitted to a third-party background server and then transmitted to a user terminal APP by the third-party background server, the user terminal APP generates a two-dimensional subway ticket according to the two-dimensional subway ticket data packet transmitted by the cloud server, as the information of the two-dimensional subway ticket comprises two-dimensional 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 subway ticket is obtained from the cloud server through the third-party background server, otherwise, the two-dimension code metro ticket cannot be used.

(2) Entering and exiting the station: the user is when the two-dimensional code scanning module of two-dimensional code gate machine with two-dimensional code subway ticket alignment when entering the station, two-dimensional code subway ticket on the user terminal APP is gathered to the two-dimensional code gate machine, this two-dimensional code subway ticket is by the encrypted two-dimensional code subway ticket of cloud ware signature, two-dimensional code subway ticket is decoded to the two-dimensional code gate machine, obtain two-dimensional code information, this two-dimensional code information includes the data package that contains information such as third party company information, user information, two-dimensional code generation time, two-dimensional code effective time that the private key signature was used to the cloud ware. 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, the processing process is further described by the angle of the two-dimensional code gate:

(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 machine verification module of the two-dimensional code gate machine analyzes the digital signature according to the public key generated and transmitted by the cloud server, and the two-dimensional code metro ticket can be judged to be generated and issued by the cloud server as long as the gate machine verification module can correctly verify the digital signature, so that the content is not tampered, and the two-dimensional code metro 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 catalogues from the second database module in the cloud server and applies for payment to the corresponding third party company, and the third party company performs 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 company 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 performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. 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 more specific and detailed, but not construed 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, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于大数据的城市智慧停车管理系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!