I am not sure which part is impractical. In India we already use QR code for metro tickets. The system design is definitely different from one mentioned and mimics more of how airport tickets work.
How does the system know that the ticket was already used?
The thing with plane and long-distance train tickets is that you buy them for a specific route. So all the checking only needs to be done at your departure station/airport, the code for which is encoded in the ticket, and the rest of the system doesn't need to know anything about it. But you can't do that with city transport. When there aren't multi-use tickets, people would often buy multiple single-use ones at a time and use them as the need arises, without knowing in advance when, where, and from where they'll be going.
Fair enough. I went through qr code of my previous metro ticket to see what info they encode. It is non standard so there were
- some hashes
- type of ticket, in my case single use,
- time of issue,
- valid upto time, approx 10hrs, approx journey time was only 30 min
- ticket id
- I could not directly see source/destination address, but it is my hunch that atleast the destination address is encoded
Now this one time ticket needs to generated before entering the metro station and the qr code is scanned at * both entry and exit*.
I think the entire system works on daily rotating ticket id validated using unique hashes where a ticket validity period is tracked. I think this should be enough to ensure non-reuse of same ticket.
The caveat is, I have always only bough one time ticket which is the only mode allowed in qr. For daily traveller's, they need to buy token/card which is NFC based.
The system can just keep track of whether the ticket has already been used before. You don't have to store the information on the ticket itself. You can store the information on a central server, connected to all the gates.
The ticket itself just has to encode an ID, and then the central database contains an entry for that ID that is checked by the gate in real time. When the ticket is scanned at a gate, the database gets updated.
grishka|1 year ago
The thing with plane and long-distance train tickets is that you buy them for a specific route. So all the checking only needs to be done at your departure station/airport, the code for which is encoded in the ticket, and the rest of the system doesn't need to know anything about it. But you can't do that with city transport. When there aren't multi-use tickets, people would often buy multiple single-use ones at a time and use them as the need arises, without knowing in advance when, where, and from where they'll be going.
mav3ri3k|1 year ago
Now this one time ticket needs to generated before entering the metro station and the qr code is scanned at * both entry and exit*.
I think the entire system works on daily rotating ticket id validated using unique hashes where a ticket validity period is tracked. I think this should be enough to ensure non-reuse of same ticket.
The caveat is, I have always only bough one time ticket which is the only mode allowed in qr. For daily traveller's, they need to buy token/card which is NFC based.
DiogenesKynikos|1 year ago
The ticket itself just has to encode an ID, and then the central database contains an entry for that ID that is checked by the gate in real time. When the ticket is scanned at a gate, the database gets updated.