Distributed station ticket business processing method and device, electronic equipment and storage medium

Through the method of forwarding invoice data between distributed station servers, the problem of large data processing volume and low efficiency of station servers is solved, efficient and safe ticketing processing is achieved, and the risk of single point failure is reduced, and the normal operation of the station when offline is supported.

CN120378445APending Publication Date: 2025-07-25CHINA RAILWAY ELECTRIFICATION ENGINEERING GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510251333.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the field of rail transit, in the prior art, the data processing volume of station servers is large, the processing efficiency is low, and the risk of single point failure is high due to relying on the network center.

Method used

The distributed station ticketing processing method is adopted, and the distributed station server forwards the ticketing data to each other, so that each server stores the ticketing data of all stations. Each server only processes the ticketing service of this station, and uses point-to-point network technology and the proof-of-stake consensus mechanism to ensure data consistency and security.

Benefits of technology

It reduces the data processing volume of each distributed station server, improves processing efficiency, reduces the risk of single point failure, improves data transparency and reliability, and supports the station to sell tickets, check and pay normally when offline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378445A_ABST
    Figure CN120378445A_ABST
Patent Text Reader

Abstract

The invention provides a distributed station ticket business processing method and device, electronic equipment and a storage medium, and belongs to the technical field of rail transit, and the method comprises the steps: receiving ticket business data sent by an adjacent distributed station server; the ticket business of the station is processed, and ticket business data of the station is generated in the ticket business processing process; and forwarding the ticket business data sent by other distributed station servers and the ticket business data of the station to adjacent distributed station servers, so that each distributed station server stores the ticket business data of all stations. According to the method for mutually forwarding the ticket business data through the distributed station servers, each distributed station server has the ticket business data of all stations, and each distributed station server only needs to process the ticket business of the station and only needs to generate the ticket business data of the station; the data volume processed by each distributed station server is smaller, and the processing efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rail transit, and particularly to a distributed station ticketing processing method, device, electronic device and storage medium. Background Art

[0002] In the field of rail transit, an Internet ticketing platform is usually deployed in an online network center, which is mainly used for processing ticketing such as ticket purchase, entry, exit, payment, etc. and generating ticketing data. Terminal devices at each station are all connected to the network center, and the data collected by each station terminal device is uploaded to the network center server for processing.

[0003] Since the ticketing of each station is processed by the server in the network center and the ticketing data of each station is generated by the server in the network center, it results in a large amount of data processed by the server and low processing efficiency. Summary of the Invention

[0004] The present invention provides a distributed station ticketing processing method, device, electronic device and storage medium, which are used to solve the technical problem of large data processing volume and low processing efficiency of the station server in the prior art, can reduce the data volume processed by the station server, improve the processing efficiency, and each station no longer depends on the mode of the network center server, reducing the risk of single point of failure.

[0005] The present invention provides a distributed station ticketing processing method, which is applied to a distributed station server, and the distributed station server is deployed at each station. Each of the distributed station servers is linked through a distributed network. The method includes: Receiving ticketing data sent by an adjacent distributed station server; the ticketing data includes one or more of in-station ticket status information, in-station transaction record information, in-station travel information, out-station travel information, out-station ticket status information, out-station transaction record information, deduction order data, daily settlement data, in-station biometric information and out-station biometric information; Processing the ticketing of the local station and generating the ticketing data of the local station during the process of processing the ticketing; Forwarding the ticketing data sent by other distributed station servers and the ticketing data of the local station to an adjacent distributed station server, so that each distributed station server stores the ticketing data of all stations.

[0006] According to the distributed station ticketing processing method provided by the present invention, the tickets corresponding to the ticket data include one or more of prepaid paper two-dimensional code single-trip tickets, prepaid paper two-dimensional code multi-trip tickets, prepaid paper two-dimensional code group tickets, prepaid two-dimensional code electronic daily tickets, prepaid two-dimensional code electronic monthly tickets, prepaid two-dimensional code electronic group tickets, prepaid two-dimensional code electronic multi-trip tickets, postpaid two-dimensional code electronic tickets, prepaid biometric information electronic single-trip tickets, prepaid biometric information electronic daily tickets, prepaid biometric information electronic monthly tickets, prepaid biometric information electronic group tickets, and postpaid biometric information electronic tickets.

[0007] According to the distributed station ticketing processing method provided by the present invention, the biometric information includes face, palm vein, finger vein, or iris.

[0008] According to the distributed station ticketing processing method provided by the present invention, each of the distributed station servers uses a proof-of-stake consensus mechanism to ensure the consistency of the ticket data stored in each of the distributed station servers, and determines the distributed station server for processing tickets as the distributed station server corresponding to the station where the ticket transaction occurs.

[0009] According to the distributed station ticketing processing method provided by the present invention, the forwarding of the ticket data sent by other distributed station servers and the ticket data of this station to the adjacent distributed station servers includes: Using peer-to-peer network technology to forward ticket data.

[0010] According to the distributed station ticketing processing method provided by the present invention, the ticket data includes the outbound ticket status information; The processing of the tickets of this station and the generation of the ticket data of this station during the ticket processing process include: After the outbound ticket verification is passed, send an opening instruction to the outbound turnstile; Obtain the switch status of the outbound turnstile; If the switch status of the outbound turnstile is the closed state, generate the outbound ticket status information in the first state; If the switch status of the outbound turnstile is the open state, generate the outbound ticket status information in the second state; If the outbound ticket is verified again and passed, the outbound turnstile is allowed to be opened when the outbound ticket status information is in the first state, and the outbound turnstile is prohibited from being opened when the outbound ticket status information is in the second state.

[0011] According to the distributed station ticketing processing method provided by the present invention, the tickets corresponding to the ticket data include postpaid electronic tickets; The processing of the tickets of this station includes: In the process of processing the inbound tickets of this station, determine the payment account corresponding to the postpaid electronic ticket; Determine the account balance of the payment account; If the account balance is not less than the maximum value of the ticket prices between any two distributed stations, lock the part of the amount in the payment account that is equal to the maximum value of the ticket price, and allow the inbound gate to be opened; If the account balance is lower than the maximum value of the ticket price, prohibit the opening of the inbound gate.

[0012] The present invention also provides a distributed station ticket processing device, which is applied to a distributed station server. The distributed station server is deployed at each station, and each of the distributed station servers is linked through a distributed network. The device includes: A receiving module, configured to receive ticket data sent by an adjacent distributed station server; the ticket data includes one or more of inbound ticket status information, inbound transaction record information, inbound trip information, outbound trip information, outbound ticket status information, outbound transaction record information, deduction order data, daily settlement data, inbound biometric information, and outbound biometric information; A processing module, configured to process the tickets of this station and generate ticket data of this station during the process of processing the tickets; A forwarding module, configured to forward the ticket data sent by other distributed station servers and the ticket data of this station to an adjacent distributed station server, so that each distributed station server stores the ticket data of all stations.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the distributed station ticket processing method as described in any one of the above.

[0014] The present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the distributed station ticket processing method as described in any one of the above.

[0015] The present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the distributed station ticket processing method as described in any one of the above.

[0016] The distributed station ticket handling method, device, electronic device and storage medium provided by the present invention transfer ticket data to each distributed station server through the method of mutually transferring ticket data by the distributed station servers, so that each distributed station server has the ticket data of all stations. Each distributed station server only needs to handle the tickets of its own station and only needs to generate the ticket data of its own station. Compared with the traditional centralized server, the amount of data processed by each distributed station server is smaller and the processing efficiency is higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0018] Figure 1 It is a schematic structural diagram of the distributed station system provided by the present invention.

[0019] Figure 2 It is one of the schematic flowcharts of the entry process of the two-dimensional code ticket provided by the present invention.

[0020] Figure 3 It is one of the schematic flowcharts of the exit process of the two-dimensional code ticket provided by the present invention.

[0021] Figure 4 It is one of the schematic flowcharts of the entry process of the biometric information ticket provided by the present invention.

[0022] Figure 5 It is one of the schematic flowcharts of the exit process of the biometric information ticket provided by the present invention.

[0023] Figure 6 It is a flowchart of the distributed station ticket handling method provided by the present invention.

[0024] Figure 7 It is the second schematic flowchart of the entry process of the two-dimensional code ticket provided by the present invention.

[0025] Figure 8 It is the second schematic flowchart of the exit process of the two-dimensional code ticket provided by the present invention.

[0026] Figure 9 It is the second schematic flowchart of the entry process of the biometric information ticket provided by the present invention.

[0027] Figure 10 It is the second schematic flowchart of the exit process of the biometric information ticket provided by the present invention.

[0028] Figure 11It is a schematic structural diagram of the distributed station ticket handling device provided by the present invention.

[0029] Figure 12 It is a schematic structural diagram of the electronic device provided by the present invention. Specific embodiments

[0030] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0031] The following is combined with Figures 1-12 Describe the distributed station ticket handling method, device, electronic device, and storage medium provided by the present invention. The aim is to transfer ticket data to each distributed station server through the method of mutually forwarding ticket data by distributed station servers, so that each distributed station server has the ticket data of all stations, and each distributed station server only needs to process the tickets of its own station and only needs to generate the ticket data of its own station. Compared with the traditional centralized server, the amount of data processed by each distributed server is smaller and the processing efficiency is higher.

[0032] The present invention first constructs a distributed station system as Figure 1 shown. Each station has terminal devices (such as ticket vending machines, automatic ticket gates, semi-automatic ticket vending machines, self-service terminals, etc.) and servers, that is, each station deploys a distributed station server, and each distributed station server is linked through a distributed network. The CPU resources, memory resources, and hard disk resources of the distributed station system are unified and virtualized through cloud computing technology, and virtual machines are reallocated, and the computing resources are dynamically adjusted according to the actual business size. Each distributed station can independently perform ticket handling, including ticket purchasing, ticket checking for entry, ticket checking for exit, payment, etc.

[0033] As Figure 2 shown, each distributed station server may include an account subsystem, a ticket subsystem, a payment subsystem, an order subsystem, and a code issuing subsystem, and can realize the entry and exit of two-dimensional code tickets. The two-dimensional code tickets include prepaid paper two-dimensional code single-journey tickets, prepaid paper two-dimensional code multi-journey tickets, prepaid paper two-dimensional code group tickets, prepaid two-dimensional code electronic daily tickets, prepaid two-dimensional code electronic monthly tickets, prepaid two-dimensional code electronic group tickets, prepaid two-dimensional code electronic multi-journey tickets, postpaid two-dimensional code electronic tickets, etc.

[0034] The entry process of the QR code ticket includes: the automatic ticket gate reads the QR code in the QR code ticket and performs QR code verification; the account subsystem checks the validity period of the single-journey ticket / day ticket / monthly ticket and judges whether the QR code has expired; the code-issuing subsystem returns the QR code timestamp; the account subsystem continues to judge the QR code mode and verify the entry and exit order; after the verification passes, the server issues an opening instruction to control the opening of the entry gate of the automatic ticket gate, and the passenger enters the station; for group tickets, the automatic ticket gate also returns the number of times the entry gate is opened; after the passenger enters the station, the account subsystem generates the entry ticket status information of the QR code ticket, and the ticketing subsystem generates the entry transaction record information of the QR code ticket and extracts the entry trip information in the entry transaction record information. Among them, the entry ticket status information represents whether the passenger has entered the station. After the passenger enters the station, the entry ticket status information is "entered the station"; the entry transaction record information includes information such as the entry station, entry time, and consumption amount, and the entry trip information includes information such as the entry station and entry time.

[0035] As Figure 3 shown, the exit process of the QR code ticket includes: the automatic ticket gate reads the QR code in the QR code ticket and performs QR code verification; the account subsystem checks the validity period of the single-journey ticket / day ticket / monthly ticket and judges whether the QR code has expired; the code-issuing subsystem returns the QR code timestamp; the account subsystem continues to judge the QR code mode, verify the entry and exit order, and perform overtime and over-distance verification; after the verification passes, the ticketing subsystem generates the exit trip information of the QR code ticket, and the server issues an opening instruction to control the opening of the exit gate of the automatic ticket gate, and the passenger exits the station; for group tickets, the automatic ticket gate also returns the number of times the exit gate is opened; after the passenger exits the station, the account subsystem generates the exit ticket status information of the QR code ticket, the ticketing subsystem generates the exit transaction record information of the QR code ticket, performs trip matching, and generates daily settlement data, and the account subsystem writes off single-journey tickets, group tickets, deducts the number of times of the sub-ticket, and generates a deduction request for the post-paid QR code e-ticket; the order subsystem generates deduction order data according to the deduction request, and the payment subsystem performs deduction according to the deduction order data. Among them, the exit trip information includes the exit station, exit time, etc.; the exit ticket status information represents whether the passenger has exited the station. After the passenger exits the station, the exit ticket status information is "exited the station"; the exit transaction record information includes the exit station, exit time, and consumption amount, etc.

[0036] For QR code tickets, the ticketing data during the entry and exit processes includes entry ticket status information, entry transaction record information, entry trip information, exit trip information, exit ticket status information, exit transaction record information, deduction order data, and daily settlement data.

[0037] As Figure 4As shown, each distributed station server may further include an account subsystem, a ticketing subsystem, a biometric subsystem, a payment subsystem, and an order subsystem, which can implement the entry and exit of biometric tickets. Biometric tickets include prepaid biometric electronic single-journey tickets, prepaid biometric electronic daily tickets, prepaid biometric electronic monthly tickets, prepaid biometric electronic group tickets, and postpaid biometric electronic tickets, etc. In some embodiments, biometric information may include face, palm vein, finger vein, iris, etc.

[0038] The entry process of biometric tickets includes: the automatic ticket gate reads the passenger's biometric information; the biometric subsystem identifies the biometric information and generates entry biometric information, and returns the recognition comparison result; the automatic ticket gate selects the nearest biometric information and combines it with the ID, entry time, and entry station; the account subsystem conducts validity check of single-journey ticket / daily ticket / monthly ticket, mode judgment, and in-out order verification; after the verification passes, the server issues an opening instruction to control the opening of the entry gate of the automatic ticket gate, and the passenger enters the station; after the passenger enters the station, the account subsystem generates the entry ticket status information of the biometric ticket, and the ticketing subsystem generates the entry transaction record information of the biometric ticket and extracts the entry trip information from the entry transaction record information.

[0039] As Figure 5 shown, the exit process of biometric tickets includes: the automatic ticket gate reads the passenger's biometric information; the biometric subsystem identifies the biometric information and generates exit biometric information, and returns the recognition comparison result; the automatic ticket gate selects the nearest biometric information and combines it with the ID, exit time, and exit station; the account subsystem conducts biometric recognition validity verification, mode judgment, in-out order verification, timeout and over-distance verification; after the verification passes, the ticketing subsystem generates the exit trip information of the biometric ticket, and the server issues an opening instruction to control the opening of the exit gate of the automatic ticket gate, and the passenger exits the station; after the passenger exits the station, the account subsystem generates the exit ticket status information of the biometric ticket, the ticketing subsystem generates the exit transaction record information of the biometric ticket, conducts trip matching, generates daily settlement data, the account subsystem cancels single-journey tickets, group tickets, deducts the number of times of the sub-tickets, and generates a deduction request for the postpaid biometric electronic ticket; the order subsystem generates deduction order data according to the deduction request, and the payment subsystem conducts deduction according to the deduction order data; the biometric subsystem also needs to delete the biometric information of single-journey tickets and group tickets.

[0040] For biometric tickets, the ticketing data during the entry and exit processes includes entry ticket status information, entry transaction record information, entry trip information, exit trip information, exit ticket status information, exit transaction record information, deduction order data, daily settlement data, entry biometric information, and exit biometric information.

[0041] Figure 6It is a flowchart of the distributed station ticketing processing method provided by the present invention for a distributed station server. As Figure 6 shown, it includes but is not limited to the following steps: Step S1: Receive ticketing data sent by an adjacent distributed station server; the ticketing data includes one or more of the following: inbound ticket status information, inbound transaction record information, inbound journey information, outbound journey information, outbound ticket status information, outbound transaction record information, deducted order data, daily settlement data, inbound biometric information, and outbound biometric information. Step S2: Process the tickets of this station and generate the ticketing data of this station during the ticket processing. Step S3: Forward the ticketing data sent by other distributed station servers and the ticketing data of this station to the adjacent distributed station server, so that each distributed station server stores the ticketing data of all stations.

[0042] It should be noted that when the distributed station server of this station processes the inbound tickets of this station, it does not require the ticketing data of other stations; when processing the outbound tickets of this station, it may not require the ticketing data of other stations either, such as when processing the outbound tickets of prepaid tickets; when processing the outbound tickets of this station, it may also require the ticketing data of other stations, such as when processing the outbound tickets of postpaid tickets. Therefore, each distributed station server needs to have the ticketing data of all stations.

[0043] For two-dimensional code tickets, the forwarding process of each item of ticketing data during the inbound process is as Figure 7 shown, and the forwarding process of each item of ticketing data during the outbound process is as Figure 8 shown. For biometric information tickets, the forwarding process of each item of ticketing data during the inbound process is as Figure 9 shown, and the forwarding process of each item of ticketing data during the outbound process is as Figure 10As shown. When the forwarded ticket data includes in-station ticket status information, an in-station ticket status information chain can be formed; when the forwarded ticket data includes in-station transaction record information, an in-station transaction record information chain can be formed; when the forwarded ticket data includes in-station trip information, an in-station trip information chain can be formed; when the forwarded ticket data includes out-station trip information, an out-station trip information chain can be formed; when the forwarded ticket data includes out-station ticket status information, an out-station ticket status information chain can be formed; when the forwarded ticket data includes out-station transaction record information, an out-station transaction record information chain can be formed; when the forwarded ticket data includes deducted order data, a deducted order data chain can be formed; when the forwarded ticket data includes daily settlement data, a daily settlement data chain can be formed; when the forwarded ticket data includes in-station biometric information, an in-station biometric information chain can be formed; when the forwarded ticket data includes out-station biometric information, an out-station biometric information chain can be formed. Thus, multiple data chains can be formed in the present invention.

[0044] It can be understood that each distributed station server only needs to generate the ticket data of its own station, and can either forward the ticket data of its own station to the adjacent distributed station server or continue to forward the ticket data forwarded by the adjacent distributed station server to the adjacent distributed station server. The ticket data is transmitted to each distributed station server by the method of mutually forwarding the ticket data by the distributed station servers, so that each distributed station server has the ticket data of all stations, so that each distributed station server can independently process all the tickets of its own station. Each distributed station server only needs to process the tickets of its own station. Compared with the traditional centralized server, the amount of data processed by each distributed station server is smaller and the processing efficiency is higher.

[0045] In addition, different from the traditional centralized line network center for processing tickets, the distributed station server has no single control point, and all participants can access and verify the data. Each node participates in the storage and update of the data, realizing the decentralized feature. In the scenario where the station and the line network center are offline, the station server still has the full set of data and can also perform Origin-Destination (OD) matching. Passengers can still use the ticket to pass through the turnstile, and no longer rely on the mode of the line network center server. The distributed structure improves the transparency and reliability of the data and reduces the risk of single point of failure.

[0046] In addition, in the centralized line network center mode, each station uploads the transaction records to the ticketing subsystem of the line network center, and then provides the transaction records to the clearing subsystem for OD pairing and clearing settlement operations. The daily settlement data is given to the report subsystem to form a reconciliation report. Each station needs to complete the settlement of each station before the daily settlement of the line network center, and then reconcile the accounts between each station and the line network center according to the report, which involves a large amount of work and is cumbersome to find the reasons for the reconciliation differences. However, when the ticketing data forwarded in the present invention includes daily settlement data, after each distributed station completes a transaction, the ticketing subsystem aggregates the relevant transaction records, performs OD matching on the inbound and outbound transactions and then executes the daily settlement operation, and then automatically forwards the data to each distributed station server through the daily settlement data chain. The accounting books of each station are the same, and there is no need to reconcile the accounts with the line network center, which reduces the workload and improves the data processing efficiency.

[0047] In addition, in the centralized line network center mode, after the station goes offline, the station cannot realize functions such as ticket selling, ticket checking for entry, ticket checking for exit, and electronic payment. However, the present invention adopts a distributed network. After the station and the line network center go offline, the distributed station server can still support the station to realize functions such as ticket selling, ticket checking for entry, ticket checking for exit, and electronic payment.

[0048] As can be seen from the above, in some embodiments, the tickets corresponding to the ticketing data forwarded may include one or more of prepaid paper two-dimensional code single-trip tickets, prepaid paper two-dimensional code multiple-trip tickets, prepaid paper two-dimensional code group tickets, prepaid two-dimensional code electronic daily tickets, prepaid two-dimensional code electronic monthly tickets, prepaid two-dimensional code electronic group tickets, prepaid two-dimensional code electronic multiple-trip tickets, postpaid two-dimensional code electronic tickets, prepaid biometric information electronic daily tickets, prepaid biometric information electronic monthly tickets, prepaid biometric information electronic group tickets, and postpaid biometric information electronic tickets.

[0049] In this way, each station can realize the entry and exit of a variety of tickets, giving passengers more choices and being conducive to improving the user experience.

[0050] In some embodiments, each distributed station server in the present invention can adopt the Proof of Stake (PoS) consensus mechanism to ensure the consistency of the ticketing data stored in each distributed station server, and determine that the distributed station server for processing tickets is the distributed station server corresponding to the station where the tickets occur.

[0051] The consensus mechanism is a protocol used to reach a consensus in a distributed network, ensuring that all distributed station nodes reach a consensus on ticket data. The present invention adopts the PoS consensus mechanism, and selects the distributed station server node that executes the accounting task according to the station where the ticket transaction occurs, that is, the distributed station server node that processes tickets. The consensus mechanism can ensure that a small number of distributed station server nodes cannot tamper with ticket data, and each distributed station server stores the same ticket data, eliminating the problem that the transaction record and trip information can be modified in the centralized network mode.

[0052] For QR code electronic tickets, a passenger's boarding code may be photographed and copied to pass through the turnstile, resulting in the inability of the real-name passenger himself / herself to pass through the turnstile, and thus leading to ticket disputes. To avoid the problem of QR code electronic tickets being copied, in some embodiments, when the ticket corresponding to the forwarded ticket data in the present invention includes a QR code electronic ticket, the QR code electronic ticket can be encrypted using an asymmetric encryption algorithm.

[0053] In the asymmetric encryption algorithm, the encryption machine generates a pair of keys (public key and private key) for encryption and decryption. The public key can be made public and is forwarded to and saved in the upper computer program of each distributed station automatic ticket gate. The private key is kept confidential and is used for the public key and private key to decrypt and verify each other when a real-name user with an electronic card passes through the turnstile, confirming that the boarding QR code is locally generated and the person passing through the turnstile by swiping the code is the real-name passenger himself / herself, which can avoid passing through the turnstile by copying the boarding code.

[0054] In some embodiments, step S3 of the present invention may include: forwarding ticket data using the peer-to-peer (P2P) network technology.

[0055] The P2P network technology enables each distributed station server node in the network to act as both a server providing services and a client sending requests, realizing the direct sharing and utilization of resources among each distributed station server node. The characteristics of the P2P network technology implement a point-to-point distributed and decentralized system. Applying the P2P point-to-point network protocol to automatically forward ticket data between adjacent stations changes the current situation where each station can only access the network center, can improve the background access efficiency, and ensure the passenger turnstile passing efficiency.

[0056] Generally, during the process of a passenger leaving the station, when the passenger swipes the ticket for the first time to leave the station, the local server will set the status information of the outbound ticket to "already left the station". When the status information of the outbound ticket is in the "already left the station" state, when the passenger swipes the same ticket again to leave the station, the server will not control the opening of the outbound turnstile, thus avoiding multiple passengers using the same ticket to leave the station. However, in the case where the outbound turnstile fails to open, there will be a situation where the passenger has not left the station but the ticket has already been marked as having left the station, resulting in the passenger being unable to leave the station through other outbound turnstiles and reducing the passenger experience.

[0057] In some embodiments, to improve the passenger's experience of exiting the station, the ticketing data includes the status information of the outbound ticket. Step S2 may include: After the outbound ticket verification is passed, send an opening instruction to the outbound turnstile. Obtain the switch status of the outbound turnstile. If the switch status of the outbound turnstile is the closed state, generate the outbound ticket status information in the first state. If the switch status of the outbound turnstile is the open state, generate the outbound ticket status information in the second state. If the outbound ticket verification is passed again, allow the outbound turnstile to be opened when the outbound ticket status information is in the first state, and prohibit the outbound turnstile from being opened when the outbound ticket status information is in the second state.

[0058] When a passenger initially swipes the ticket to exit the station, the local distributed station server will send an opening instruction to the outbound turnstile, but the outbound turnstile may or may not open. If the switch status of the outbound turnstile is the closed state, it means that the outbound turnstile fails to open and the passenger has not exited the station, then generate the outbound ticket status information in the first state, and the first state represents that the outbound turnstile is not opened and the passenger has not exited the station. Thereafter, the passenger can change to other turnstiles to continue swiping the ticket to exit the station, and at this time the outbound ticket status information is in the first state, and the local distributed station server will send an opening instruction to this outbound turnstile to open it so that the passenger can smoothly exit the station.

[0059] Of course, if the switch status of the outbound turnstile is the open state when the passenger initially swipes the ticket to exit the station, the passenger can smoothly exit the station, then generate the outbound ticket status information in the second state, and the first state represents that the outbound turnstile has been opened and the passenger has exited the station. When subsequent other passengers use the same ticket to swipe the ticket to exit the station, the outbound ticket status information is in the second state, and the distributed station server will prohibit the outbound turnstile from being opened to prevent multiple passengers from using the same ticket to exit the station.

[0060] In some embodiments, the present invention can utilize smart contract rules to avoid the ticketing risk of being unable to collect the ticket payment.

[0061] When the ticket corresponding to the ticketing data includes a postpaid electronic ticket, such as a postpaid two-dimensional code electronic ticket or a postpaid biometric information electronic ticket, in step S2, processing the ticketing of this station may include: During the process of processing the inbound ticketing of this station, determine the payment account corresponding to the postpaid electronic ticket. Determine the account balance of the payment account. If the account balance is not less than the maximum value of the ticket prices between any two distributed stations, lock the part of the amount in the payment account that is equal to the maximum value of the ticket price, and allow the inbound turnstile to be opened. If the account balance is lower than the maximum fare, the entry gate will not be opened.

[0062] Among them, the payment account corresponding to the post-paid electronic ticket is also the passenger's payment account. The balance of the passenger's payment account is not less than the maximum fare between any two distributed stations, which means that no matter which station the passenger gets on or off, the passenger's payment account can pay the fare. However, the passenger's account balance may become less after entering the station, and there is a risk that the account balance will not be able to pay the full fare when the passenger exits the station. Locking the part of the payment account that is equal to the maximum fare can ensure that the passenger's account balance is not less than the maximum fare, avoiding the ticketing risk of not being able to collect the ticket money. Of course, if the passenger's account balance is lower than the maximum fare, the station gate can be prohibited from opening, and the passenger can be prohibited from entering the station, eliminating the ticketing risk.

[0063] In some embodiments, the present invention can use smart contract rules to avoid the problem of repeated deductions caused by network problems or system problems. The boundary conditions are triggered on the distributed network. For example, a passenger uses a post-paid biometric electronic ticket to enter the station. Due to a network failure, the outbound biometric information is not synchronized to the adjacent distributed station. The passenger buys a card-type one-way ticket to enter the station again at the offline station, but accidentally recognizes the biometric electronic ticket when leaving the station, resulting in OD matching with the first entry information, and repeated deductions for the second journey. After the network is restored and the first segment of the outbound biometric information is automatically forwarded, the boundary is automatically triggered. The same OD entry data matches two outbound data, and the system automatically re-arranges the OD and automatically refunds the passenger.

[0064] Furthermore, the present invention adopts a distributed station system. After the entry station is offline, the local server can compare the ticket purchase site with the entry site to restrict the entry of tickets not sold at this station; and the entry ticket status information can be updated to entered when the ticket enters the station for the first time, which can prevent the same paper QR code ticket from being repeatedly scanned and passed through multiple entry gates.

[0065] Furthermore, the present invention adopts a distributed station system, and the travel control is implemented by the account subsystem of the local server. If illegal passengers are identified, such as those on the blacklist, timed out, exceeded the distance, or have unilateral transactions, the gate can be controlled not to open the door to let them pass.

[0066] Furthermore, the present invention adopts a distributed station system. After the station is offline, the local server can check the validity period of the QR code daily ticket and monthly ticket to avoid entering the station and riding the train with expired QR code daily ticket and monthly ticket.

[0067] Furthermore, the present invention adopts a distributed station system. After the exit station goes offline, the account subsystem of the local server can perform OD pairing and billing. The entry data has been sent to this station before the exit station goes offline, and timeout and over-distance judgment can be performed.

[0068] Furthermore, the present invention adopts a distributed station system. After the outbound station goes offline, the order subsystem of the local server can generate corresponding transaction orders and send a deduction request to the payment subsystem of the local server. The deduction can be delayed until the network is restored.

[0069] Furthermore, the present invention adopts a distributed station system. After a passenger purchases a prepaid biometric single-trip ticket and the inbound station goes offline, the local server can still support face / vein / finger vein / iris entry.

[0070] Furthermore, the present invention adopts a distributed station system. After a passenger purchases a prepaid biometric single-trip ticket, the inbound biometric information has been synchronized to the outbound station. Even if the outbound station goes offline, the outbound station server can still support face / vein / finger vein / iris gate passing. The outbound station provides biometric recognition functions and judges for timeout and over-distance. When a passenger uses a registered biometric e-ticket to pass through the gate and the ticket data fails to be synchronized to the outbound station, and the passenger is still offline when leaving the station, the passenger can use a QR code e-ticket to leave the station. The QR code ticket retains fields to record the entry time and station, and is verified using the outbound station's Internet ticketing platform. After passing the verification, the passenger can leave the station smoothly. Then, OD matching and billing are performed based on the transaction record, a deduction request is issued, and a deduction order is generated. If the user has situations such as timeout or over-distance, an offline payment supplement function needs to be supported. The station queries the saved inbound data, determines the supplementary payment amount, records the supplementary payment data, and updates the background ticket information. If the ticket purchase information is not synchronized to each distributed station in time, the passenger will not be able to enter the station, and the passenger can request a refund. Each distributed station can provide an offline refund function. After the network is restored, the station automatically forwards and synchronizes the data of offline gate passing trips, passenger offline payment supplements, and offline refunds to each distributed station node.

[0071] Furthermore, the present invention adopts a distributed station system. When the inbound station goes offline, according to the PoS proof-of-stake consensus mechanism, the inbound station server can perform local authentication services and ticketing operations, enabling ticket purchase using electronic payment methods. After the network is restored, delayed deductions are made through the interface between the network center and the third-party payment channel, without affecting passenger payment and ticket issuance.

[0072] Furthermore, the present invention adopts a distributed station system. For postpaid tickets, when the passenger leaves the station for ticket checking, if the inbound station data has been automatically forwarded to each distributed station through the service, normal ticket checking and deduction can be performed. If the inbound data is not synchronized, it is also defaulted that the passenger can leave the station. Of course, in the offline state, this ticket can leave the station at different stations. After the network is restored, the abnormal data is compared and verified in the background. The passenger can leave the station smoothly, and the deduction is delayed. The deduction is made after the network is restored.

[0073] Furthermore, the present invention adopts a distributed station system. When the station is offline, the account subsystem of the local server can initiate a deduction request, the order subsystem generates an order, and the payment for the deduction by the payment subsystem needs to wait until the station network resumes for third-party channel withholding. Although there is a delay in the deduction, it does not affect passengers' ticket purchase and exit, solving the pain point problem that passengers can only use cash to purchase tickets when the station is offline in the centralized line network mode, and passengers can use electronic payment.

[0074] Furthermore, for postpaid biometric electronic tickets, since the biometric electronic tickets themselves cannot record the entry time and entry station, when there is a network failure, the exit station cannot receive the ticket status and entry information sent by the distributed station server and cannot determine whether the passenger has exceeded the time limit or the journey limit. In this regard, the present invention can bind the postpaid biometric electronic ticket and the QR code electronic ticket under one account, reserve fields in the QR code electronic ticket, and record the entry time and entry station in the QR code fields when the passenger enters the station using the postpaid biometric electronic ticket. When the exit station does not receive the ticket status and entry information during a network failure, the turnstile can prompt the passenger to use the QR code bound to the postpaid biometric electronic ticket, and extract the entry time and entry station from the QR code, so as to determine whether the time limit or the journey limit has been exceeded.

[0075] The present invention takes the prepaid face electronic group ticket as an example to elaborate on the ticket sale, gate passing, and refund processes in detail.

[0076] The ticket purchasing process for prepaid face recognition electronic group tickets includes: (1) The clearing system calculates the ticket price, the parameter subsystem generates ticket price parameters, and the mobile APP or mini-program and the automatic ticket vending machine receive the ticket price parameters, install and take effect; (2) The passenger first selects the starting and ending stations on the mobile APP or mini-program and the automatic ticket vending machine, then selects to purchase a face recognition group ticket, and finally selects the number of people. The terminal sends a ticket purchasing request to the background; (3) The account subsystem initiates a payment request according to the ticket price, the order subsystem generates a payment order, the payment subsystem inserts the data sent from the order system into the database, judges whether the order is repeated, and then the payment subsystem calls the third-party payment channel through a network request. The third-party payment channel generates a payment QR code and returns it to the payment subsystem; The mobile APP or mini-program and the automatic ticket vending machine receive the payment QR code and display it, and the passenger scans the code; After the third-party payment channel successfully deducts the money, the order subsystem modifies the status of the ticket purchase order and notifies the terminal that the payment is successful; (4) The terminal prompts the passenger to input the face. A passenger in the group uses the face camera of the mobile APP or mini-program and the automatic ticket vending machine to collect the face image. The face algorithm background saves the face picture. The face system saves the picture address and generates a 32-bit random id, that is, faceID, and manages it; (5) The face recognition group tickets are all one-time. The account subsystem binds the face faceID to the ticket table and writes the number of people allowed to pass; (6) The mobile APP or mini-program generates a ticket purchase order, and the automatic ticket vending machine prints a ticket purchase voucher; (7) The backend of the mobile APP or mini-program generates a transaction record, and the automatic ticket vending machine generates a transaction record, both of which are uploaded to the ticketing subsystem.

[0077] The process of passing through the turnstile for prepaid face recognition electronic group tickets includes: (1) The automatic ticket checker is set with a face recognition terminal. When a passenger walks in front of the terminal device, the face recognition camera of the turnstile detects and collects the passenger's face recognition; the recognition interface of the central face recognition server is called for verification. (2) The face algorithm background finds the face picture with the highest matching degree with the face passing through the turnstile, and the face subsystem returns the corresponding face ID. If the matching fails, the passenger is reminded that the ticket used is invalid. (3) If the recognition is successful, the automatic ticket checker calls the ticket checking interface and submits the face picture, face ID, passenger's entry time, and station information to the account subsystem for itinerary inspection and judgment. First, it checks whether the ticket is within the valid period, and second, it checks whether the current station has entered the degraded operation mode. If it has entered, it will not allow entry or be exempted from inspection according to the ticketing rules under the degraded operation mode. In the normal operation mode, itinerary control will be carried out. (4) The account subsystem searches for the ticket information and conducts an in-out order verification. If the order is incorrect, itinerary control will be carried out and the ticket check will not pass. (5) After the verification passes, the account subsystem checks the face group ticket information in the ticket table and sends the number of people allowed to pass through the turnstile for a single ticket to the turnstile. (6) For example, if a group ticket allows five people to pass through with one face recognition, after the upper computer of the automatic ticket checker receives the result that this ticket can allow five people to pass through in the background ticket checking result, it sends five authorizations to the door mechanism. After the automatic ticket checker opens the door, through the sensor counting, it can know how many passengers have passed through. The set rule can be that if only one passenger has actually passed through and no one else passes through the turnstile within 30 seconds, the number of people allowed to pass through will automatically return to zero and the automatic ticket checker will close the gate; even if only one person passes through the turnstile after the ticket check for the group ticket, the ticket status will be updated to "entered the station"; if there are fewer people passing through the face group ticket, it is regarded as the passenger's responsibility, just like when the passenger fails to pass through within the time limit, the device will directly close the door at the specified time; in case of a passenger dispute, the station staff needs to view the face recognition entry video for judgment. If it is indeed found that there are fewer people passing through the group ticket, the entry operation can be cancelled at the semi-automatic ticket vending machine.

[0078] After the passenger passes through the verification when leaving the station, the turnstile opens the door, the account subsystem conducts fare cancellation, and the face library deletes the face picture and face_ID corresponding to the temporary group ticket.

[0079] The refund process for prepaid face recognition electronic group tickets includes: The user enters their face, and the face algorithm background conducts a comparison, finds the face picture with the highest similarity and returns the face ID; the account subsystem searches for the corresponding face group ticket information according to the face ID; the terminal device displays the ticket information, and the passenger or station staff member selects a refund. The account subsystem determines that it meets the correct refund rules. For example, if the passenger's ticket has not been used and a refund request is initiated, the order subsystem generates a refund order, and the payment system sends a refund request to the third-party payment channel. The third-party payment channel gradually returns a refund success notification; the terminal device displays that the refund is successful.

[0080] The non-instant refund process for prepaid face electronic group tickets includes: the user inputs their face, and the face algorithm in the background checks and finds the face image with the highest similarity and returns the face ID; the account subsystem searches for the corresponding face group ticket information based on the face ID; the semi-automatic ticket vending machine displays the face group ticket information, and the station attendant clicks to select and obtain the passenger's itinerary information. The ticketing subsystem returns the passenger's itinerary list and displays it on the semi-automatic ticket vending machine. The face group ticket is registered and the reason for the refund is written, such as the passenger's ticket has not been used, or the vehicle broke down after the passenger entered the station and could not continue, or the vehicle broke down halfway during the passenger's journey, and it has been more than a certain period of time since entering the station and the system cannot automatically refund the passenger, so a refund needs to be registered. The semi-automatic ticket vending machine uploads the registration result to the ticketing operation platform; the ticketing center engineer approves the non-instant refunds registered on the ticketing operation platform during the centralized time period on the same day. After passing the review, the account subsystem initiates a refund request, the order subsystem generates a refund order, the payment system initiates a refund request to the third-party payment channel, and the third-party payment channel returns a refund success notice step by step; the device displays that the refund is successful; for non-instant refunds on the semi-automatic ticket vending machine, the backend of the small program will not generate a transaction record. Only when a manual refund is made on the small program, the backend of the small program will generate a refund transaction record.

[0081] As a mediumless ticket, the prepaid face electronic group ticket can meet the needs of tourist groups or family groups to pass through the turnstile by face scanning. One person scans their face, and others can directly pass through, which can improve the touchless passing experience of group passengers for passengers.

[0082] Figure 11 It is a schematic diagram of a distributed station ticketing processing device applied to a distributed station server provided by the present invention, including: A receiving module for receiving ticketing data sent by an adjacent distributed station server; the ticketing data includes one or more of the inbound ticket status information, inbound transaction record information, inbound itinerary information, outbound itinerary information, outbound ticket status information, outbound transaction record information, deducted order data, daily settlement data, inbound biometric information, and outbound biometric information; A processing module for processing the ticketing of the current station and generating the ticketing data of the current station during the process of processing the ticketing; A forwarding module for forwarding the ticketing data sent by other distributed station servers and the ticketing data of the current station to an adjacent distributed station server, so that each distributed station server stores the ticketing data of all stations.

[0083] It should be noted that the distributed station ticketing processing device provided by the present invention, during specific operation, can execute the distributed station ticketing processing method of any of the above embodiments, and this embodiment will not be elaborated here.

[0084] Figure 12It is a schematic structural diagram of an electronic device provided by the present invention. The electronic device may include: a processor, a communications interface, a memory, and a communication bus. Among them, the processor, the communications interface, and the memory complete their mutual communication through the communication bus. The processor can call the logical instructions in the memory to execute the distributed station ticketing processing method.

[0085] In addition, when the logical instructions in the above-mentioned memory are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0086] On the other hand, the present invention also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the distributed station ticketing processing methods provided in the above-mentioned various embodiments.

[0087] On another aspect, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the distributed station ticketing processing methods provided in the above-mentioned various embodiments.

[0088] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative labor.

[0089] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A distributed station ticketing processing method, which is applied to a distributed station server, and the distributed station server is deployed at each station, and each of the distributed station servers is linked through a distributed network, and is characterized in that, The method includes: Receiving ticket data sent by an adjacent distributed station server; the ticket data includes one or more of in-station ticket status information, in-station transaction record information, in-station trip information, out-station trip information, out-station ticket status information, out-station transaction record information, deduction order data, daily settlement data, in-station biometric information, and out-station biometric information; Processing the tickets of the current station and generating the ticket data of the current station during the ticket processing; Forwarding the ticket data sent by other distributed station servers and the ticket data of the current station to the adjacent distributed station servers, so that each distributed station server stores the ticket data of all stations.

2. The distributed station ticket handling method according to claim 1, characterized in that The tickets corresponding to the ticket data include one or more of prepaid paper two-dimensional code single-journey tickets, prepaid paper two-dimensional code multiple-journey tickets, prepaid paper two-dimensional code group tickets, prepaid two-dimensional code electronic daily tickets, prepaid two-dimensional code electronic monthly tickets, prepaid two-dimensional code electronic group tickets, prepaid two-dimensional code electronic multiple-journey tickets, postpaid two-dimensional code electronic tickets, prepaid biometric information electronic single-journey tickets, prepaid biometric information electronic daily tickets, prepaid biometric information electronic monthly tickets, prepaid biometric information electronic group tickets, and postpaid biometric information electronic tickets.

3. The distributed station ticketing processing method according to claim 2, wherein The biometric information includes face, palm vein, finger vein, or iris.

4. The distributed station ticketing processing method according to claim 1, wherein, Each of the distributed station servers uses a proof-of-stake consensus mechanism to ensure the consistency of the ticket data stored in each distributed station server, and determines that the distributed station server processing the tickets is the distributed station server corresponding to the station where the ticket transaction occurs.

5. The distributed station ticket handling method according to claim 1, wherein The forwarding the ticket data sent by other distributed station servers and the ticket data of the current station to the adjacent distributed station servers includes: Using a peer-to-peer network technology to forward the ticket data.

6. The distributed station ticketing processing method according to claim 1, wherein The ticket data includes the out-station ticket status information; The processing the tickets of the current station and generating the ticket data of the current station during the ticket processing includes: After the out-station ticket is verified and passed, sending an opening instruction to the out-station turnstile; Obtaining the switch state of the out-station turnstile; If the switch state of the out-station turnstile is the closed state, generating the out-station ticket status information in the first state; If the switch state of the out-station turnstile is the open state, generating the out-station ticket status information in the second state; If the out-station ticket is verified and passed again, allowing the out-station turnstile to be opened when the out-station ticket status information is in the first state, and prohibiting the out-station turnstile from being opened when the out-station ticket status information is in the second state.

7. The distributed station ticketing processing method according to claim 1, characterized in that The tickets corresponding to the ticket data include postpaid electronic tickets; The processing the tickets of the current station includes: During the process of processing the in-station tickets of the current station, determining the payment account corresponding to the postpaid electronic ticket; Determining the account balance of the payment account; If the account balance is not less than the maximum fare between any two distributed stations, locking the part of the amount in the payment account equal to the maximum fare and allowing the in-station turnstile to be opened; If the account balance is lower than the maximum fare, prohibiting the in-station turnstile from being opened.

8. A distributed station ticket processing device is applied to a distributed station server. The distributed station server is deployed at each station, and each of the distributed station servers is linked through a distributed network. It is characterized in that The device includes: a receiving module, configured to receive ticket data sent by an adjacent distributed station server; the ticket data includes one or more of in-station ticket status information, in-station transaction record information, in-station journey information, out-station journey information, out-station ticket status information, out-station transaction record information, deduction order data, daily settlement data, in-station biometric information, and out-station biometric information; a processing module, configured to process the tickets of the station and generate the ticket data of the station during the ticket processing; a forwarding module, configured to forward the ticket data sent by other distributed station servers and the ticket data of the station to an adjacent distributed station server, so that each distributed station server stores the ticket data of all stations.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the distributed station ticket processing method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the distributed station ticket processing method according to any one of claims 1 to 7.