CN112002023A - Electronic ticket generating method, ticket checking method, electronic device and storage medium - Google Patents

Electronic ticket generating method, ticket checking method, electronic device and storage medium Download PDF

Info

Publication number
CN112002023A
CN112002023A CN202011185627.0A CN202011185627A CN112002023A CN 112002023 A CN112002023 A CN 112002023A CN 202011185627 A CN202011185627 A CN 202011185627A CN 112002023 A CN112002023 A CN 112002023A
Authority
CN
China
Prior art keywords
ticket
electronic ticket
electronic
information
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011185627.0A
Other languages
Chinese (zh)
Inventor
杨忠凯
程城
王�义
韩耀强
东超
秦志虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shengwei Times Technology Group Co ltd
Original Assignee
Shengwei Times Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shengwei Times Technology Group Co ltd filed Critical Shengwei Times Technology Group Co ltd
Priority to CN202011185627.0A priority Critical patent/CN112002023A/en
Publication of CN112002023A publication Critical patent/CN112002023A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B3/00Machines for issuing preprinted tickets
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07BTICKET-ISSUING APPARATUS; FARE-REGISTERING APPARATUS; FRANKING APPARATUS
    • G07B11/00Apparatus for validating or cancelling issued tickets

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides an electronic ticket generating method, a ticket checking method, electronic equipment and a storage medium; the method comprises the following steps: generating an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service; generating an electronic ticket number according to the electronic service factor and the ticket selling time information; generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information; and storing the electronic ticket number and the two-dimensional code information of the electronic ticket, and distributing the two-dimensional code information of the electronic ticket to passengers. The electronic ticket generating method, the ticket checking method, the electronic equipment and the storage medium provided by the embodiment of the invention generate the electronic ticket through the information such as the electronic service factor, the ticket selling time and the like, so that the electronic ticket can be conveniently and quickly generated, a user does not need to go to a specific ticket selling site to purchase a paper ticket, great convenience is brought to the user, the safety of the electronic ticket is ensured, and the electronic ticket is prevented from being falsely used by other people.

Description

Electronic ticket generating method, ticket checking method, electronic device and storage medium
Technical Field
The invention relates to the technical field of traffic, in particular to an electronic ticket generating method, a ticket checking method, electronic equipment and a storage medium.
Background
At present, the road passenger transport system realizes the online ticket selling and issuing. However, the ticket itself is also a paper ticket, and the passenger is required to go to a ticket vending window or a self-service machine to print the paper ticket after purchasing the ticket.
In the ticket checking link, a passenger needs to hold a paper ticket to go to a ticket checking port, ticket staff checks ticket information on the spot, checks the train number and date, and then tears the ticket sub-link after confirming that no error exists, and the ticket is granted to pass.
In the ticket generating method and the ticket checking method in the prior art, a station needs to purchase a special printer and related consumables, and needs to invest full-time human resources to check the ticket, and ticket checking errors can be caused by busy or negligence of personnel.
In addition, although the electronic ticket is also available in the prior art, the electronic ticket must be in data communication with the electronic ticket center server to exchange ticket information during the verification, and once the communication with the ticket center server is disconnected, the completion of the ticket checking work is influenced.
Disclosure of Invention
To solve the problems in the prior art, embodiments of the present invention provide an electronic ticket generating method, a ticket checking method, an electronic device, and a storage medium.
An embodiment of a first aspect of the present invention provides an electronic ticket generating method, including:
generating an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service;
generating an electronic ticket number according to the electronic service factor and the ticket selling time information;
generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information;
and storing the electronic ticket number and the two-dimensional code information of the electronic ticket, and distributing the two-dimensional code information of the electronic ticket to passengers.
In the above technical solution, the generating an electronic ticket number according to the electronic service factor and the ticket selling time information includes:
generating a middle character string according to the electronic service factor, the time value of the ticket selling time and the serial number related to the ticket selling time;
calculating the intermediate character string to obtain a first intermediate value;
adding a value for distinguishing countries before the first intermediate value to obtain a second intermediate value;
generating a check bit according to the second intermediate value;
and splicing the check digit after the second intermediate value to obtain the electronic ticket number.
In the above technical solution, the generating an electronic service factor according to the identification number of the ticket selling server and the station information includes:
obtaining an identification number of the ticket selling server according to a server corresponding to the ticket selling behavior;
obtaining station information according to a starting point station of a journey;
and carrying out encryption calculation on the identification number of the ticket selling server and the station information to obtain the electronic service factor.
In the above technical solution, the riding information includes one or more of the following information: the system comprises a starting station code, an arrival station code, a shift, a ticket type, a ticket price, a taking date, an departure date, a seat number, a name, a certificate type, a certificate number, a reserved bit and a check bit.
In the above technical scheme, the storing the electronic ticket number and the electronic ticket two-dimensional code information includes:
when the network is smooth, the electronic ticket number and the electronic ticket two-dimensional code information are stored in an electronic ticket center server;
and when the network is interrupted, storing the electronic ticket number and the electronic ticket two-dimensional code information into a ticketing server.
An embodiment of a second aspect of the present invention provides an electronic ticket checking method, which is used for checking an electronic ticket generated by the electronic ticket generating method according to the embodiment of the first aspect of the present invention, and includes:
analyzing the two-dimensional code information of the electronic ticket to obtain the number of the electronic ticket and riding information;
and respectively checking the electronic ticket number and the riding information to determine the validity of the electronic ticket.
In the above technical solution, the verifying the electronic ticket number and the riding information respectively to determine the validity of the electronic ticket includes:
comparing the first riding information with the second riding information, if the first riding information is consistent with the second riding information, executing the next step, and if the first riding information is inconsistent with the second riding information, the electronic ticket is invalid; the first riding information is riding information obtained by analyzing the electronic ticket two-dimensional code information; the second riding information is riding information pre-stored in a ticketing server or an electronic ticket center server;
and calculating the numerical values except the check digit in the electronic ticket number to obtain a new check digit value, comparing the new check digit value with the original check digit value of the electronic ticket number, wherein if the comparison result is consistent, the electronic ticket is valid, and if the comparison result is inconsistent, the electronic ticket is invalid.
In a third aspect, the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the steps of the electronic ticket generating method according to the first aspect of the present invention, or to implement the steps of the electronic ticket checking method according to the second aspect of the present invention.
A fourth aspect of the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program, when being executed by a processor, implementing the steps of the electronic ticket generating method according to the first aspect of the present invention or implementing the steps of the electronic ticket verifying method according to the second aspect of the present invention.
The electronic ticket generating method, the ticket checking method, the electronic equipment and the storage medium provided by the embodiment of the invention generate the electronic ticket through the information such as the electronic service factor, the ticket selling time and the like, so that the electronic ticket can be conveniently and quickly generated, a user does not need to go to a specific ticket selling site to purchase a paper ticket, great convenience is brought to the user, the safety of the electronic ticket is ensured, and the electronic ticket is prevented from being falsely used by other people.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of an electronic ticket generating method according to an embodiment of the present invention;
FIG. 2 is a flowchart of an electronic ticket checking method according to another embodiment of the present invention;
fig. 3 is a schematic diagram of an electronic ticket generating apparatus according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of an electronic ticket checking device according to still another embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an electronic ticket generating method according to an embodiment of the present invention, and as shown in fig. 1, the electronic ticket generating method according to the embodiment of the present invention is applied to a ticketing server side, and the method includes:
and step 101, generating an electronic service factor according to the identification number of the ticket selling server and the station information.
An electronic service factor is information used to identify the source of an electronic service. The electronic service factor may be a number, a letter, or a combination of a number and a letter, and other symbols that can be used to distinguish different sources of electronic services. In an embodiment of the invention, the electronic service factor is composed of numbers.
The ticket selling server side can be provided with one or more servers, and each server is provided with an identification number (ID). In a specific ticketing behavior, which server executes the ticketing operation of the server side, the identification number of the server is selected as the identification number of the ticket selling server based on which the electronic service factor is generated.
The station information refers to information of a trip departure station. In a computer system, in order to distinguish different stations in a regional area (e.g., different stations nationwide), a unique code is generally configured for a station, such as 654224TL for a certain station. However, the length of the station codes is too long, which is not beneficial to subsequent processing. Therefore, in the embodiment of the present invention, the station information uses a mapping value corresponding to the station code, such as mapping the aforementioned station code 654224TL to 2.
The process of generating the mapping value according to the station code may be implemented by a mapping algorithm, which may be an algorithm known in the art, such as a hash algorithm.
After the identification number of the ticket selling server and the station information are obtained, the electronic service factor can be generated according to the two types of information. Specifically, the identification number of the ticket selling server and the station information can be used as input values of an encryption algorithm, and the result obtained through encryption calculation is the electronic service factor. The encryption algorithm may be a binary operation.
In the embodiment of the present invention, the length of the electronic service factor is 10 bits (bit). For example, an electronic service factor is: 4055040 (the value obtained after conversion of a 10-bit binary number).
The electronic service factor can ensure that the ticket number of the electronic ticket is not repeated when the electronic ticket is generated subsequently.
And 102, generating an electronic ticket number according to the electronic service factor and the ticket selling time information.
In the embodiment of the invention, the electronic ticket number is a part of the electronic ticket and is characteristic information for distinguishing different electronic tickets.
The ticket selling time information refers to the occurrence time of the ticket selling behavior, and in the embodiment of the invention, the time when the ticket selling server receives the ticket selling request can be used as the occurrence time of the ticket selling behavior. The unit of the ticket selling time information is millisecond, and the ticket selling time information can be expressed by a figure with the length of 41 bits.
Since a plurality of ticketing actions may occur at the same time at one time point, a serial number may be set for distinguishing different ticketing actions, and different ticketing actions at the same time point may correspond to different serial numbers. If the serial number corresponding to the ticketing behavior of the user A at the time point a is 000000000001, the serial number corresponding to the ticketing behavior of the user B at the time point a is 000000000002, and the serial number corresponding to the ticketing behavior of the user C at the time point a is 000000000003.
In the embodiment of the present invention, the length of the sequence number is set to 12 bits.
Based on the electronic service factor, ticket time information, and serial number, a 64-bit string may be generated.
The 64-bit string includes:
invalid bit (1 bit) + electronic service factor (10 bits) + ticket selling time information (41 bits) + serial number (12 bits).
After the 64-bit string is obtained, a first intermediate value with a length of 19 bits can be obtained by operating on the 64-bit string. In the embodiment of the present invention, the specific operation manner for operating the 64-bit string is a bit operation.
A fixed value for distinguishing countries can be added before the first intermediate value with the length of 19 bits, for example, the fixed value corresponding to the E-ticket sold in China is 86, and a second intermediate value with the length of 21 bits is formed.
And generating a check bit according to the second intermediate value with the length of 21 bits. The value of the check bit may be calculated from the second intermediate value using a particular algorithm. The specific algorithm may be a specific encryption algorithm. In order to avoid guessing the value of the check bit, as a preferred implementation, the result of the cryptographic calculation of the second intermediate value may be mapped, and the mapped value may be used as the value of the check bit. In the embodiment of the present invention, the length of the parity bit is 1 bit.
After the check digit with the length of 1 digit is spliced with the second intermediate value with the length of 21 digits, the electronic ticket number with the length of 22 digits can be obtained. For example, one electronic ticket number is: 867528492995233628162.
and 103, generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information.
In an embodiment of the invention, the ride information comprises one or more of the following information: the system comprises a starting station code, an arrival station code, a shift, a ticket type, a ticket price, a taking date, an departure date, a seat number, a name, a certificate type, a certificate number, a reserved bit and a check bit.
The electronic ticket number and the riding information belong to text information, and how to convert the text information into two-dimensional code information is common knowledge of those skilled in the art, so that the description is not repeated here.
And step 104, storing the electronic ticket number and the electronic ticket two-dimensional code information, and distributing the electronic ticket two-dimensional code information to passengers.
And after the ticketing server generates the electronic ticket number and the electronic ticket two-dimensional code information, storing the electronic ticket number and the electronic ticket two-dimensional code information in a database file for a subsequent ticket checking link.
Since the information of the electronic ticket number is already contained in the electronic ticket two-dimensional code information, only the electronic ticket two-dimensional code information needs to be distributed to passengers. The two-dimensional code information of the electronic ticket is generally distributed to users in an electronic mode, for example, the two-dimensional code information is distributed to passengers in a short message mode and/or a communication mode with a mobile application (such as a payment treasure, a WeChat and the like), so that the passengers can obtain the information of the electronic ticket as soon as possible.
The electronic ticket generating method provided by the embodiment of the invention generates the electronic ticket through the information such as the electronic service factor, the ticket selling time and the like, not only can conveniently and quickly generate the electronic ticket, but also does not need a user to purchase a paper ticket at a specific ticket selling site, thereby greatly facilitating the user, ensuring the safety of the electronic ticket and avoiding the electronic ticket from being falsely used by other people.
Based on any one of the above embodiments, in an embodiment of the present invention, the storing the electronic ticket number and the electronic ticket two-dimensional code information includes:
when the network is smooth, the electronic ticket number and the electronic ticket two-dimensional code information are stored in an electronic ticket center server;
and when the network is interrupted, storing the electronic ticket number and the electronic ticket two-dimensional code information into a ticketing server.
In the field of road transportation, the distribution of the ticket selling servers is relatively dispersed, and if each station can be locally provided with the ticket selling servers, the uniform management of the electronic tickets is not facilitated. Therefore, it is common in the industry to provide an electronic ticket center server, which specially processes all electronic ticket data, including data statistics and maintenance in the later period.
As will be readily understood by those skilled in the art, the electronic ticket center server and the ticketing server are usually located in different geographical locations, and the two servers need to be connected by way of a network.
When the network between the ticketing server and the electronic ticket center server is smooth, after the electronic ticket number and the electronic ticket two-dimensional code information are generated, the electronic ticket number and the electronic ticket two-dimensional code information are stored in the electronic ticket center server. And when the ticket is subsequently checked, the electronic ticket number and the two-dimensional code information of the electronic ticket can be acquired from the electronic ticket center server.
When the network between the ticketing server and the electronic ticket center server is interrupted, after the electronic ticket number and the electronic ticket two-dimensional code information are generated, the electronic ticket number and the electronic ticket two-dimensional code information are stored in the local ticketing server. In the field of road traffic, the number of a ticket selling station and the number of a ticket checking station are usually one, so that the number of the electronic ticket and the two-dimensional code information of the electronic ticket can be acquired from a ticket selling server during subsequent ticket checking.
The electronic ticket generating method provided by the embodiment of the invention stores and manages the electronic ticket number and the two-dimensional code information of the electronic ticket according to the state of the network, can adapt to different network states, and has wider adaptability.
Based on any of the above embodiments, fig. 2 is a flowchart of an electronic ticket checking method according to another embodiment of the present invention, and as shown in fig. 2, the electronic ticket checking method according to another embodiment of the present invention is applied to a ticket checking terminal, and the method includes:
and step 201, analyzing the two-dimensional code information of the electronic ticket to obtain the number of the electronic ticket and the riding information.
When a passenger approaches the ticket checking terminal to check the ticket, the ticket checking terminal sends a two-dimensional code ticket checking request, and therefore the two-dimensional code information of the electronic ticket provided by the passenger is analyzed.
After the two-dimensional code information of the electronic ticket is analyzed, the number of the electronic ticket and the riding information can be obtained. Wherein the riding information comprises one or more of the following information: the system comprises a starting station code, an arrival station code, a shift, a ticket type, a ticket price, a taking date, an departure date, a seat number, a name, a certificate type, a certificate number, a reserved bit and a check bit. The electronic ticket number is obtained according to the electronic service factor and the ticket selling time information, and the electronic service factor is obtained according to the identification number of the ticket selling server and the station information.
In the previous embodiment of the present invention, a detailed description has been made of how to generate an electronic ticket number, and thus a repeated description will not be made herein.
Step 202, the electronic ticket number and the riding information are respectively checked, and the validity of the electronic ticket is determined.
When an electronic ticket is generated, the electronic ticket number, riding information, and the like are stored in a database file of a ticketing server or an electronic ticket center server. Before checking the ticket, the electronic ticket number and the riding information which are pre-stored in advance can be obtained from the corresponding server.
When checking the ticket, the first ride information is first compared with the second ride information. The first riding information is riding information obtained by analyzing the electronic ticket two-dimensional code information; the second riding information is riding information pre-stored in the ticket selling server or the electronic ticket center server.
And according to the comparison result, if the first riding information is consistent with the second riding information, carrying out the next ticket checking operation, if the first riding information is inconsistent with the second riding information, indicating that the electronic ticket is invalid, and giving corresponding prompt information.
And when the first riding information is consistent with the second riding information, checking the electronic ticket number.
In the foregoing description, it has been mentioned that the electronic ticket number in the embodiment of the present invention has 22 bits, wherein the 22 nd bit is a check bit whose size is calculated by a specific algorithm according to the value of the first 21 bits. Because the ticket checking terminal is embedded with the specific algorithm in advance, if the specific algorithm adopted by the ticket checking terminal is consistent with the specific algorithm adopted during ticket selling, the value of the check digit calculated by the ticket checking terminal according to the value of the first 21 digits of the electronic ticket number is consistent with the value of the check digit of the electronic ticket number, and the electronic ticket number passes the check and is proved to be effective. If the specific algorithm adopted by the ticket checking terminal is inconsistent with the specific algorithm adopted during ticket selling, the value of the check digit calculated by the ticket checking terminal according to the value of the first 21 digits of the electronic ticket number is inconsistent with the value of the check digit of the electronic ticket number, and the electronic ticket number is proved to be invalid if not verified.
The electronic ticket number is checked to determine whether the electronic ticket is generated by a specific ticket selling server, so that the aim of preventing counterfeit electronic tickets is fulfilled.
The electronic ticket checking method provided by the embodiment of the invention can realize the quick check of the electronic ticket, and can avoid the counterfeit of the electronic ticket by using the check bit value.
Based on any one of the above embodiments, fig. 3 is a schematic diagram of an electronic ticket generating apparatus according to another embodiment of the present invention, and as shown in fig. 3, the electronic ticket generating apparatus according to another embodiment of the present invention includes:
an electronic service factor generating module 301, configured to generate an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service;
the electronic ticket number generating module 302 is used for generating an electronic ticket number according to the electronic service factor and the ticket selling time information;
the electronic ticket two-dimensional code information generating module 303 is configured to generate electronic ticket two-dimensional code information according to the electronic ticket number and the riding information;
and the storage and distribution module 304 is used for storing the electronic ticket number and the electronic ticket two-dimensional code information and distributing the electronic ticket two-dimensional code information to passengers.
The electronic ticket generating device provided by the embodiment of the invention generates the electronic ticket through the information such as the electronic service factor, the ticket selling time and the like, can conveniently and quickly generate the electronic ticket, does not need a user to purchase a paper ticket at a specific ticket selling site, greatly facilitates the user, ensures the safety of the electronic ticket and avoids being falsely used by other people.
Based on any of the above embodiments, fig. 4 is a schematic view of an electronic ticket checking device according to still another embodiment of the present invention, and as shown in fig. 4, the electronic ticket checking device according to still another embodiment of the present invention includes:
the analysis module 401 is configured to analyze the two-dimensional code information of the electronic ticket to obtain an electronic ticket number and riding information;
the checking module 402 is configured to check the electronic ticket number and the riding information respectively, and determine validity of the electronic ticket.
The electronic ticket checking device provided by the embodiment of the invention can realize the quick checking of the electronic ticket, and the counterfeiting of the electronic ticket can be avoided by using the checking bit value.
Fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may call logic instructions in memory 530 to perform the following method:
generating an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service;
generating an electronic ticket number according to the electronic service factor and the ticket selling time information;
generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information;
and storing the electronic ticket number and the two-dimensional code information of the electronic ticket, and distributing the two-dimensional code information of the electronic ticket to passengers.
Or performing the following method:
analyzing the two-dimensional code information of the electronic ticket to obtain the number of the electronic ticket and riding information;
and respectively checking the electronic ticket number and the riding information to determine the validity of the electronic ticket.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented by a processor to perform the method provided by the foregoing embodiments, for example, including:
generating an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service;
generating an electronic ticket number according to the electronic service factor and the ticket selling time information;
generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information;
and storing the electronic ticket number and the two-dimensional code information of the electronic ticket, and distributing the two-dimensional code information of the electronic ticket to passengers.
Or for example, include:
analyzing the two-dimensional code information of the electronic ticket to obtain the number of the electronic ticket and riding information;
and respectively checking the electronic ticket number and the riding information to determine the validity of the electronic ticket.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. An electronic ticket generating method, comprising:
generating an electronic service factor according to the identification number of the ticket selling server and the station information; wherein, the electronic service factor is information for identifying the source of the electronic service;
generating an electronic ticket number according to the electronic service factor and the ticket selling time information;
generating electronic ticket two-dimensional code information according to the electronic ticket number and the riding information;
and storing the electronic ticket number and the two-dimensional code information of the electronic ticket, and distributing the two-dimensional code information of the electronic ticket to passengers.
2. The electronic ticket generating method of claim 1, wherein generating the electronic ticket number according to the electronic service factor and the ticket selling time information comprises:
generating a middle character string according to the electronic service factor, the time value of the ticket selling time and the serial number related to the ticket selling time;
calculating the intermediate character string to obtain a first intermediate value;
adding a value for distinguishing countries before the first intermediate value to obtain a second intermediate value;
generating a check bit according to the second intermediate value;
and splicing the check digit after the second intermediate value to obtain the electronic ticket number.
3. The electronic ticket generating method of claim 1, wherein generating the electronic service factor according to the identification number of the ticketing server and the station information comprises:
obtaining an identification number of the ticket selling server according to a server corresponding to the ticket selling behavior;
obtaining station information according to a starting point station of a journey;
and carrying out encryption calculation on the identification number of the ticket selling server and the station information to obtain the electronic service factor.
4. The electronic ticket generating method of claim 1 wherein the ride information comprises one or more of the following: the system comprises a starting station code, an arrival station code, a shift, a ticket type, a ticket price, a taking date, an departure date, a seat number, a name, a certificate type, a certificate number, a reserved bit and a check bit.
5. The electronic ticket generating method of claim 1, wherein the storing the electronic ticket number and the electronic ticket two-dimensional code information comprises:
when the network is smooth, the electronic ticket number and the electronic ticket two-dimensional code information are stored in an electronic ticket center server;
and when the network is interrupted, storing the electronic ticket number and the electronic ticket two-dimensional code information into a ticketing server.
6. An electronic ticket checking method for checking an electronic ticket generated by the electronic ticket generating method according to any one of claims 1 to 5, comprising:
analyzing the two-dimensional code information of the electronic ticket to obtain the number of the electronic ticket and riding information;
and respectively checking the electronic ticket number and the riding information to determine the validity of the electronic ticket.
7. The electronic ticket checking method of claim 6, wherein the verifying the electronic ticket number and the riding information respectively to determine the validity of the electronic ticket comprises:
comparing the first riding information with the second riding information, if the first riding information is consistent with the second riding information, executing the next step, and if the first riding information is inconsistent with the second riding information, the electronic ticket is invalid; the first riding information is riding information obtained by analyzing the electronic ticket two-dimensional code information; the second riding information is riding information pre-stored in a ticketing server or an electronic ticket center server;
and calculating the numerical values except the check digit in the electronic ticket number to obtain a new check digit value, comparing the new check digit value with the original check digit value of the electronic ticket number, wherein if the comparison result is consistent, the electronic ticket is valid, and if the comparison result is inconsistent, the electronic ticket is invalid.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the electronic ticket generating method of any one of claims 1 to 5 or the steps of the electronic ticket verifying method of claim 6 or 7.
9. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the steps of the electronic ticket generating method according to any one of claims 1 to 5 or the steps of the electronic ticket validating method according to claim 6 or 7.
CN202011185627.0A 2020-10-30 2020-10-30 Electronic ticket generating method, ticket checking method, electronic device and storage medium Pending CN112002023A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011185627.0A CN112002023A (en) 2020-10-30 2020-10-30 Electronic ticket generating method, ticket checking method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011185627.0A CN112002023A (en) 2020-10-30 2020-10-30 Electronic ticket generating method, ticket checking method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112002023A true CN112002023A (en) 2020-11-27

Family

ID=73475293

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011185627.0A Pending CN112002023A (en) 2020-10-30 2020-10-30 Electronic ticket generating method, ticket checking method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112002023A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112509158A (en) * 2020-11-30 2021-03-16 北京博途智控科技有限公司 Two-dimensional code ticket checking method and system for suspended monorail train
CN115376231A (en) * 2022-07-28 2022-11-22 中国建设银行股份有限公司 Encryption verification method and device, computer equipment and storage medium
CN115457668A (en) * 2022-08-17 2022-12-09 广州零加零科技有限公司 Rapid ticket checking method, device and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112509158A (en) * 2020-11-30 2021-03-16 北京博途智控科技有限公司 Two-dimensional code ticket checking method and system for suspended monorail train
CN115376231A (en) * 2022-07-28 2022-11-22 中国建设银行股份有限公司 Encryption verification method and device, computer equipment and storage medium
CN115457668A (en) * 2022-08-17 2022-12-09 广州零加零科技有限公司 Rapid ticket checking method, device and system
CN115457668B (en) * 2022-08-17 2024-04-02 广州零加零科技有限公司 Quick ticket checking method, device and system

Similar Documents

Publication Publication Date Title
CN112002023A (en) Electronic ticket generating method, ticket checking method, electronic device and storage medium
CN105787786A (en) E-commerce transaction system
CN106779698B (en) Method, system and device for distributing payment mark and safely paying payment mark
EP3432542A1 (en) Method and device for linking to account and providing service process
BG64913B1 (en) Method for verifying the validity of digital franking notes
CN102792325A (en) System and method for securely validating transactions
CN101706933A (en) Method and background system for realizing joint account service operation
CA2427595A1 (en) Verifying digital signatures using a postal security device
CN112532392B (en) Key processing method, device, equipment and storage medium
CN108154362A (en) Method of commerce, apparatus and system based on figure bar code
CN111091430B (en) Billing two-dimensional code processing method and system
CN110599355A (en) Block chain-based vehicle insurance information system, insurance policy registration method and claim settlement method
CN112069893A (en) Bill processing method and device, electronic equipment and storage medium
US8788376B2 (en) System, method and computer program product for an acquisition partner interface for integrating multiple partner channels into a transaction account issuer platform
CN107451902A (en) The management method and device of ticket
JP6368261B2 (en) Authentication system and authentication method
CN111539869B (en) Ticket requesting method and device and computer readable storage medium
EP1338990A1 (en) Clearing method using a communications network (variants)
CN114066573A (en) Order pushing method and device, storage medium and equipment
CN1898705A (en) Method for user registration with a proxy for further work with one of the server units
CN106022982A (en) Computer technology exchange platform
CN111612564B (en) Ticket processing method and device and computer readable storage medium
JP7435009B2 (en) Information processing device, information processing method, information processing program
CN116884098A (en) Outbound exception processing method, device, equipment and storage medium
JP2003256664A (en) Method and system for collating slips

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201127