Based on ticket-checking system and the method for bluetooth and Quick Response Code
Technical field
The present invention relates to the ticket checking field of public transport, specifically based on ticket-checking system and the method for bluetooth and Quick Response Code.
Background technology
Along with the development of network technology, the mode that public transport adopts mobile payment to carry out ticket checking because of convenient, fast, cost is low and become a kind of trend.In disclosed scheme, at network backend by paying support platform, ticket checking terminal is established in wicket, form ticket-checking system with the mobile phone of user.Some schemes uses mobile intelligent terminal scanning Quick Response Code to carry out transmission information, and to be the communication of mobile intelligent terminal and ticket checking terminal be some schemes realizes both sides by Bluetooth technology and verify and the exchange of information.Front a kind of scheme can only carry out unidirectional information transmission, poor user experience, is difficult to carry out license confirmation, is easily maliciously abused.Rear a kind of scheme, although can carry out bidirectional transfer of information, can carry out license confirmation, the smart mobile phone model on market is numerous, and the smart mobile phone of several generations different editions commercially uses simultaneously.Show that part mobile phone is unstable, unreliable from communication during machine as bluetooth after tested.For these reasons, this mobile payment is carried out ticket checking and can not extensively be promoted.
Summary of the invention
The problem to be solved in the present invention is exactly: the ticket-checking system existence that existing mobile intelligent terminal carries out ticket checking uses dangerous, unstable, the problem that can not extensively use.
The invention provides a kind of use reliable and stable, be convenient to the ticket-checking system extensively used, specifically based on the ticket-checking system of bluetooth and Quick Response Code, comprise be located at network backend support platform, mobile intelligent terminal containing mixed-media network modules mixed-media and bluetooth module and client end AP P, comprise the ticket checking POS of bluetooth module, CPU (central processing unit) module, memory module, mixed-media network modules mixed-media, encryption/decryption module and serial port module, it is characterized in that: described mobile intelligent terminal also comprises two-dimensional code generation module, for transmitting data to described ticket checking POS; Described ticket checking POS is also provided with Quick Response Code scan module, for scanning the 2 D code information that described mobile intelligent terminal generates.
Further, described encryption/decryption module is PSAM card.
Further, described Quick Response Code is the Quick Response Code of PTF417 algorithm.
Further, described bluetooth module is low-power consumption bluetooth 4.0 and above version, and described ticket checking POS adopts Bluetooth broadcast pattern, and described mobile intelligent terminal obtains broadcast data by bluetooth scan mode.
Described mobile intelligent terminal is smart mobile phone, panel computer or notebook computer.
The present invention also provides a kind of based on the ticket checking method based on bluetooth and Quick Response Code, comprises the steps:
S10, mobile intelligent terminal install client end AP P, and time inbound, user logs in client end AP P;
S20, mobile intelligent terminal to be entered the station consumption certificate to support platform request by network, and support platform generates the consumption certificate that enters the station containing sequence number, rise time and remaining sum, returns to mobile intelligent terminal;
S30, mobile intelligent terminal generate comprise described in enter the station the Quick Response Code a of consumption certificate and user OID;
S40, the ticket checking POS that enters the station, by scanning Quick Response Code a, obtain enter the station consumption certificate and user OID, and decipher by encryption/decryption module the consumption certificate that enters the station, authenticating users;
S50, the ticket checking POS that enters the station generate the inbound voucher comprising the consumption certificate sequence number that enters the station, inbound numbering, inbound temporal information by encryption/decryption module, and are broadcasted by bluetooth module;
S60, mobile intelligent terminal obtain broadcast data by bluetooth scan mode, generate the Quick Response Code b containing confirmation simultaneously;
S70, the ticket checking POS that enters the station scanning Quick Response Code b, obtains confirmation, confirms that user is legal, allow user to enter the station;
When s80, departures, open the client end AP P of mobile intelligent terminal, inbound voucher is sent to support platform, support platform generates the departures consumption certificate comprising the information such as inbound numbering, inbound time, remaining sum, returns to mobile intelligent terminal;
S90, mobile intelligent terminal generate comprise described in the consumption certificate that enters the station turn and the Quick Response Code c of user OID;
S100, departures ticket checking POS scanning Quick Response Code c, obtain departures consumption certificate and user OID, and by encryption/decryption module deciphering departures consumption certificate, authenticating users;
S110, departures ticket checking POS are generated the departures voucher comprising departures consumption certificate sequence number, departures numbering, departures time, admission fee information, and are broadcasted by bluetooth module by encryption/decryption module;
S120, mobile intelligent terminal obtain broadcast data by bluetooth scan mode, generate the Quick Response Code d containing confirmation simultaneously;
S130, departures ticket checking POS scanning Quick Response Code d, obtain confirmation, after confirming that user is legal, allow user's departures.
Further, described Quick Response Code is the Quick Response Code of PTF417 algorithm.
Further, described bluetooth is low-power consumption bluetooth 4.0 and above version.
Further, described mobile intelligent terminal is smart mobile phone, panel computer or notebook computer.
Further, also comprise step S140, the ticket checking POS of departures deducts fees according to setting rule, generate customer consumption record, upload to support platform by wired network or wireless network, carry out sorting and clearing by support platform.
In the present invention, mobile intelligent terminal and ticket checking pos machine adopt bluetooth to be combined the mode communicated with Quick Response Code to carry out ticket checking, be applicable to the mobile intelligent terminal comprising smart mobile phone nearly all at present, be use reliable and stable, use scheme widely.
Accompanying drawing explanation
Fig. 1 is the system diagram of the embodiment of the present invention,
Fig. 2 is the process flow diagram () of the embodiment of the present invention,
Fig. 3 is the process flow diagram (two) of the embodiment of the present invention,
S10 ~ S140 is step code.
Fig. 4 ~ Fig. 7 is respectively Quick Response Code a, the Quick Response Code b of the embodiment of the present invention, Quick Response Code c, Quick Response Code d scheme.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is further described.
Herein: " enter the station consumption certificate " generates for support platform and issue one section of ciphertext of mobile intelligent terminal, comprises the information such as consumption certificate sequence number, rise time, remaining sum, limit that enter the station.Prove for transmission of information and legitimacy in this process of consumption of user, user must have one's ticket punched with this voucher.
" inbound voucher " generates for the ticket checking POS entered the station and issues one section of ciphertext of mobile intelligent terminal and support platform, comprises the information such as the consumption certificate sequence number that enters the station, inbound numbering, inbound time.For transmitting relevant information to support platform.
" departures consumption certificate " generates for support platform and issues one section of ciphertext of mobile terminal, comprises the information such as the consumption certificate sequence number that enters the station, inbound numbering, inbound time, remaining sum.User must set off with this voucher ticket checking.
" departures voucher " generates for the ticket checking POS of departures and issues one section of ciphertext of mobile intelligent terminal and support platform, comprises the information such as the consumption certificate sequence number that enters the station, inbound numbering, admission fee.
As shown in Figure 1, support platform is located at network backend, includes (not indicating in figure) such as app service module, boss service module and encryption and decryption machines; Mobile intelligent terminal (smart mobile phone, panel computer or notebook computer) is containing mixed-media network modules mixed-media and bluetooth module (bluetooth 4.0 or more) and install client end AP P, mobile intelligent terminal also comprises two-dimensional code generation module, for transmitting data to ticket checking POS; Ticket checking POS comprises bluetooth module, CPU (central processing unit) module, memory module, mixed-media network modules mixed-media, encryption/decryption module and serial port module, and ticket checking POS is also provided with Quick Response Code scan module, for scanning the 2 D code information that mobile intelligent terminal generates.
User is by registering account number to support platform, and certain fund that prestores.When entering the station, mobile intelligent terminal logs in client end AP P, comprises the consumption certificate that enters the station of user profile to support platform request.The two-dimensional code generation module of mobile intelligent terminal generates the Quick Response Code a(Fig. 4 comprising the consumption certificate that enters the station).
The ticket checking POS that enters the station receives by scanning Quick Response Code a the consumption certificate that enters the station, obtaining information is deciphered by encryption/decryption module, through confirm legal after, generate the inbound voucher containing the consumption certificate sequence number that enters the station, the numbering that enters the station, the information such as time that enter the station, and send with broadcast mode.After the scanning of mobile intelligent terminal bluetooth obtains inbound voucher, regeneration one comprises confirmation Quick Response Code b(Fig. 5).Quick Response Code b collects for confirming that inbound voucher is legal.The ticket checking POS that enters the station scanning Quick Response Code b, confirms inbound voucher by after legal collecting, opens gate, clearance user by serial port module order industry control module.
During departures, mobile intelligent terminal opens client end AP P, generates the Quick Response Code c(Fig. 6 comprising departures consumption certificate), departures ticket checking POS is given in scanning.Departures ticket checking POS obtains by scanning Quick Response Code c the consumption certificate that enters the station, and is deciphered by encryption/decryption module, through confirm legal after, send the departures voucher comprising the information such as departures numbering, departures time, admission fee with the broadcast mode of bluetooth.After mobile intelligent terminal scanning obtains, regeneration one comprises confirmation Quick Response Code d(Fig. 7), confirm that departures voucher is by after legal collecting, and opens gate, clearance user by serial port module order industry control module.
As shown in Figure 2, the present invention also provides a kind of ticket checking method based on bluetooth and Quick Response Code, specifically following steps:
S10, mobile intelligent terminal install client end AP P, and time inbound, user logs in client end AP P;
S20, mobile intelligent terminal to be entered the station consumption certificate to support platform request by network, and support platform generates the consumption certificate that enters the station containing sequence number, rise time and remaining sum, returns to mobile intelligent terminal;
S30, mobile intelligent terminal generate comprise described in enter the station Quick Response Code a(Fig. 4 of consumption certificate and user OID);
S40, the ticket checking POS entered the station pass through scanning Quick Response Code a, obtain enter the station consumption certificate and user OID, and decipher by encryption/decryption module the consumption certificate that enters the station, authenticating users;
S50, the ticket checking POS entered the station are generated the inbound voucher comprising the consumption certificate sequence number that enters the station, inbound numbering, inbound temporal information, and are broadcasted by bluetooth module by encryption/decryption module;
S60, mobile intelligent terminal obtain broadcast data by bluetooth scan mode, generate the Quick Response Code b(Fig. 5 containing confirmation simultaneously);
S70, the ticket checking POS that enters the station scanning Quick Response Code b, obtains confirmation, confirms that user is legal, allow user to enter the station;
When s80, departures, open the client end AP P of mobile intelligent terminal, inbound voucher is sent to support platform, support platform generates the departures consumption certificate comprising the information such as inbound numbering, inbound time, remaining sum, returns to mobile intelligent terminal;
S90, mobile intelligent terminal generate and comprise described departures consumption certificate and turn and Quick Response Code c(Fig. 6 of user OID);
The ticket checking POS of s100, departures, by scanning Quick Response Code c, obtains departures consumption certificate and user OID, and by encryption/decryption module deciphering departures consumption certificate, authenticating users;
The ticket checking POS of s110, departures generates the departures voucher comprising departures consumption certificate sequence number, departures numbering, departures time, admission fee information by encryption/decryption module, and is broadcasted by bluetooth module;
S120, mobile intelligent terminal obtain broadcast data by bluetooth scan mode, generate the Quick Response Code d(Fig. 7 containing confirmation simultaneously);
S130, departures ticket checking POS scanning Quick Response Code d, obtain confirmation, after confirming that user is legal, allow user's departures;
S140, for ease of MTR's management, the ticket checking POS of departures is deducted fees according to setting rule, generates customer consumption record, uploads to support platform, carry out sorting and clearing by support platform by wired network or wireless network.
For improving the reliability of Quick Response Code scanning, Quick Response Code is the Quick Response Code of PTF417 algorithm.
In the present invention, bluetooth is 4.0 or more versions.