Last updated on: December 31st, 2021 18:23 pm
What is turnstile ticketing system?
Turnstile ticketing system is a kind of comprehensive access control management system, which is composed of a pedestrian turnstile gate and ticketing system. To be more specific, a secondary development kit of the ticketing mainboard, integrating with the customer’s QR/Barcode ticket platform protocol, then connecting with the opening signal of the mainboard of pedestrian turnstile gates to form the turnstile ticketing system.
When the customer’s paper ticket platform is successfully connected with the ticket board, the QR code scanner of the turnstile gate will read the QR code information and directly transmit it to the QR code platform for verification. After verification, the turnstile gate opening instruction will be issued to the ticket board to verify that the gate is opened effectively, and the gate will not be opened if it is invalid.
With the wide application of turnstile ticketing systems in many ticket charging places, the requirements for the reliability, real-time, and flexibility of turnstile ticketing systems are becoming higher and higher.
The turnstile ticketing system is generally used in scenic spots, museums, natatoriums, gymnasiums, clubs, and other places where tickets need to be checked and charged. We will provide the SDK(software development kit) package and API interface board of this mainboard. If you need secondary development or your ticketing system needs to connect to our turnstile gate, please don’t hesitate to contact us.
The ticketing system integrates with a turnstile, can my electronic ticketing system integrate with your QR code turnstile?
If you have your own or a third-party electronic ticketing system that needs to integrate with our QR code turnstile gate, or you have other systems that need to integrate with our QR code turnstile, we can provide our SDK package and API interface board for you to connect. If you need us to connect for you, you can also send us the integrating protocol of your system, We will evaluate whether the integrating can be successful and let you know later. For more details, please contact us. Our professional sales staff will provide suitable solutions according to your needs. If you want to know more details about QR code turnstile, please check another article: how does QR code turnstile work
With the continuous development of information technology, ticket checking in scenic spots, cinemas, and sports venues has gradually changed from manual to automatic ticket checking systems based on automatic ticketing turnstile. A pedestrian turnstile gate is a kind of access blocking device, which is used to manage the pedestrian flow and regulate pedestrian access. Its most basic and core function is to read the user’s tickets information and realize only one person to pass at a time. It can be used at the entrance of various charging and access control occasions.
A reliable, stable, and fast turnstile ticketing system is very important for the normal operation of the above check-in places. Next, we will introduce the design and development method of a turnstile ticketing system.
Composition of turnstile ticketing system
The turnstile ticketing system consists of a pedestrian turnstile gate and ticket checking server. The turnstile gate adopts the embedded control system with ARM7 processor as the core, and the operating system is win CE. The local database adopts the lightweight relational database SQLite. The ticket checking server uses the window serve 2008 operating system based on Intel 64 bit processor, and the database adopts SQL SERVE 2008. The turnstile gate is connected with the ticket checking server through the bureau city network and communicates with the standard TCP/IP protocol.
The turnstile gate will download the ticket inspection data to the local database through the network before ticket inspection. During ticket inspection, match the ticket inspection information in the local database first. If the matching is successful, the user is allowed to pass. Otherwise, the turnstile gate sends a ticket inspection request to the ticket inspection service, and the server uses the ticket database of the server to match the ticket information. If the matching is successful, the success information will be returned to the turnstile gate through the network. Otherwise, the failure information will be returned to the turnstile gate. The turnstile gate performs corresponding operations according to the returned information.
After the pedestrian turnstile gate reads the unique information on the user’s ticket, it verifies the ticket information. If it succeeds, the user is allowed to pass, otherwise, it is rejected. When the turnstile gate validates the ticket information, it can adopt offline and online methods. The offline mode is to copy the ticket inspection information to the local database of the turnstile gate before ticket inspection. During ticket inspection, the turnstile gate uses the local database to match the ticket information for ticket inspection.
The advantage of offline mode is stable and reliable: the disadvantage is that it is not flexible enough to add the latest ticket information to the local database in real-time. The online mode is that the turnstile gate does not store ticket inspection information locally, and is connected with the ticket inspection server through the Bureau Urban Network.
When comparing tickets, the ticket information is sent to the ticket inspection server, and the ticket inspection server returns the ticket inspection results to the turnstile gate. The advantage of online mode is that it can conveniently and quickly update and add ticket information in real-time. It can flexibly set the ticket inspection strategy: the disadvantage is that it is not reliable enough. If there is any fault in the LAN, the ticket can not be checked normally. Therefore, when designing the turnstile ticketing system, we can combine offline and online methods to ensure the reliability and flexibility of the system.
Where to buy turnstile ticketing system?
Where to buy a turnstile ticketing system? If you want to buy a turnstile ticketing system, please contact us, directly click the online chat button on the lower-left corner or scan the QR code on the right to add my what’s app. Our sales experts will provide you with the perfect turnstile ticketing system solution. Mairs provide the whole system, including all accessories hardware products, and software, for example, card readers, pedestrian automatic ticketing turnstile, ticketing system, etc. If you need details of all these accessories, please contact our staff for details.
Software of turnstile ticketing system
Design of communication protocol between turnstile gate and server
In order to ensure normal and reliable communication between the turnstile gate and the server, we specify the data frame transmission protocol.
Because there are many different data frames transmitted in the LAN at the same time, the frame header and frame identification at the beginning of the data frame are used to distinguish from other data packets. Command byte allows encoding of up to 255 different types of commands, including ticketing data transmission, ticket inspection, gate opening, and closing, and other commands. Some commands do not require additional data, such as opening and closing the turnstile gate.
At this time, the additional data length field is 0. Some commands will carry additional data, such as the transmission of ticket data. At this time, the additional data length field is the actual length of the subsequent additional data. In order to ensure the integrity of data transmission, the frame flag, command, additional data length, and checksum of additional data are calculated and recorded in the checksum field. After receiving the data, check the frame header, frame ID, checksum, and frame tail information. If they are inconsistent, the data frame error information will be returned. Otherwise, analyze the data frame and execute the corresponding command.
Design and implementation of ticket checking software at turnstile end
After the turnstile gate end ticket checking software is started, multiple service threads are started at the same time to process ticket checking requests in a multi-threaded manner. Each thread completes a function independently. Multiple threads can communicate by sharing variables.
Specifically, it includes the following threads:
Heartbeat thread: regularly send status reports to the server to maintain a continuous connection with the server. If the transmitted heartbeat data packets do not receive the response from the server for 5 consecutive times, it is considered that the network is abnormal and an alarm is given through sound and LED display screen.
Ticket checking thread: read the ticket information of the user and verify it. If the ticket check is successful, the ticket check result will be inserted into the ticket check result queue shared by multiple threads. If no matching ticket information is found in the local database, the ticket inspection information is inserted into the ticket inspection information queue shared by multiple threads, and the network communication thread performs the ticket inspection on the server-side.
Network communication thread: it receives and parses the commands sent by the server in real-time and performs corresponding operations. The network communication thread can complete the following functions.
1. The server can control the operation of the turnstile gate by sending commands to the thread.
2. In the ticket checking process, the thread can read the ticket checking data from the ticket checking information queue shared by multiple threads, send ticket information to the server, and check the ticket through the server. After receiving the ticket inspection result returned by the server, insert the ticket inspection result into the ticket inspection result queue shared by multiple threads.
3. After all ticket checks are completed, the thread can respond to the request of the server and upload all ticket check data to the server.
Turnstile gate control thread: read the ticket inspection information from the ticket inspection result queue shared by multiple threads. If the ticket inspection result is successful, send the gate opening signal to allow the user to pass the turnstile gate. At the same time, according to the ticket information, play the ticket type and the prompt voice allowed to pass, and display the prompt information allowed to pass on the LED display screen.
If the ticket information verified successfully is “group ticket”, the turnstile gate control thread will send gate opening information multiple times according to the number of people on the ticket. If the ticket inspection result is failed, the failed prompt voice will be played and the prompt message of ticket inspection failure will be displayed.
The advantage of using multithreading is that on the one hand, the communication overhead between threads is low; On the other hand, the functional structure is clear, and each function will not affect each other. For example, even if the network temporarily fails, if the ticket inspection thread needs to perform ticket inspection on the server-side, it can continue to process the next ticket inspection request by adding the ticket inspection request to the ticket inspection information queue, and will not be blocked because the network ticket inspection cannot be performed.
Design and implementation of server-side program
The server-side program mainly completes the two functions of displaying the turnstile gate status and responding to the ticket inspection request. The ticket checking server allows multiple turnstile gates to be connected at the same time for ticket checking, so the status of each turnstile gate connected to the server needs to be displayed in real-time to ensure that each turnstile gate can be connected normally.
The ticket checking server starts the network monitoring process and receives the heartbeat packet sent by the turnstile gate in real-time. If the heartbeat data packet sent by the turnstile gate is not received for more than 3-time cycles, the turnstile gate status will be identified as abnormal, which needs to be confirmed and handled by the staff in time.
Another function is to respond to ticket inspection requests. After the local ticket inspection of the turnstile gate fails, the network communication thread at the turnstile gate end establishes a TCP/IP connection with the ticket inspection server and sends the ticket inspection information. After receiving the ticket inspection information sent by the turnstile gate, the server uses the ticket inspection information to match in the database of the server. If the matching is successful, the success information will be returned to the turnstile gate through the network; otherwise, the failure information will be returned.
The turnstile ticketing system has been widely used in many places where tickets are needed. According to the actual ticket checking needs of many places, we designed and developed the turnstile ticketing system. The system adopts a combination of off-line and online ticket inspection solutions, which not only ensures the reliability and efficiency of the turnstile ticketing system, but also facilitates the timely update of ticket inspection information and the flexible management of the system.Sharing this: