CN114298351A - Ticket booking method based on block chain, terminal and storage medium - Google Patents

Ticket booking method based on block chain, terminal and storage medium Download PDF

Info

Publication number
CN114298351A
CN114298351A CN202111318800.4A CN202111318800A CN114298351A CN 114298351 A CN114298351 A CN 114298351A CN 202111318800 A CN202111318800 A CN 202111318800A CN 114298351 A CN114298351 A CN 114298351A
Authority
CN
China
Prior art keywords
ticket
information
node
ticket booking
booking
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
CN202111318800.4A
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.)
Zhejiang Institute of Communications
Original Assignee
Zhejiang Institute of Communications
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 Zhejiang Institute of Communications filed Critical Zhejiang Institute of Communications
Priority to CN202111318800.4A priority Critical patent/CN114298351A/en
Publication of CN114298351A publication Critical patent/CN114298351A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a ticket booking method, a terminal and a storage medium based on a block chain, wherein the ticket booking method comprises the following steps: s101: classifying and splitting ticket information according to a preset classification rule and generating a processing node; s102: receiving a ticket booking request sent by a ticketing node, judging whether the ticket booking request meets a preset condition, if so, executing S103, and if not, determining that the ticket booking is failed; s103: sending the ticket booking request to a processing node corresponding to the ticket classification; s104: judging whether the ticket booking processing result passes the consensus verification, if so, executing S105, and if not, determining that the data is wrong; s105: and respectively sending the booking processing result to a billing node and a ticketing node, and storing the booking processing result and the billing information of the billing node in a block of a block chain. The invention realizes the supervision of ticket booking and protects the utilization of consumers, and improves the ticket booking processing speed and efficiency and improves the user experience by a mode of processing ticket booking information in parallel.

Description

Ticket booking method based on block chain, terminal and storage medium
Technical Field
The present invention relates to the field of block chain technologies, and in particular, to a method, a terminal, and a storage medium for booking tickets based on a block chain.
Background
In recent years, with the development of economy, the living standard of people is continuously improved, more people start to go out to travel to enjoy life and improve the quality of life, and a large number of tourists drive the development of the tourism industry and the aviation industry. The rapid development of the travel industry has brought excellent business opportunities for travel agencies and ticket suppliers.
In order to facilitate the user to purchase the air ticket, the airline ticket business company pushes out the ticket ordering business through the air ticket business ordering platform, after the air ticket business ordering platform receives the ordering information of the user, the user ordering information is forwarded to the airline ticket business company, and after the airline ticket business company receives the air ticket cost paid by the user, a part of the air ticket business ordering platform is distributed to be used as a reward. However, due to the lack of the supervision mechanism, the airline ticket ordering platform may privately modify the ticket information of the airline ticket company, so as to obtain more spread as the bad income of the platform, which affects the integrity and image of the travel agency, or may sell false airline tickets, which damages the interests of consumers. And with the expansion of ticket buying crowd, the concurrency of ticket ordering is extremely large, the problem of blocking or delaying during ticket ordering is easily caused by the performance limitation of the server, and the use experience of users is reduced.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention provides a block chain-based ticket booking method, a terminal and a storage medium, after ticket information is acquired, a processing node is generated according to the ticket information, a ticket booking request sent by the ticket node is distributed to the corresponding processing node for parallel processing, verification is carried out in a mode of a consensus algorithm, and after the verification is passed, the information is stored in a block chain network.
In order to solve the above problems, the present invention adopts a technical solution as follows: a block chain-based ticket booking method comprises the following steps: s101: acquiring ticket information, classifying and splitting the ticket information according to a preset classification rule, generating processing nodes, and issuing the ticket splitting information to a block chain network, wherein the ticket splitting information comprises the processing nodes corresponding to each type of ticket information; s102: receiving a ticket booking request sent by a ticketing node, judging whether the ticket booking request meets a preset condition, if so, executing S103, and if not, determining that the ticket booking fails; s103: acquiring a ticket classification corresponding to the ticket booking request, and sending the ticket booking request to a processing node corresponding to the ticket classification; s104: acquiring a ticket booking processing result broadcasted by the processing node in a block chain, executing a consensus algorithm on the ticket booking processing result, judging whether the ticket booking processing result passes consensus verification, if so, executing S105, and if not, determining that data is wrong; s105: and respectively sending the booking processing result to a billing node and a ticketing node, and storing the booking processing result and the billing information of the billing node in a block of a block chain.
Further, the step of obtaining ticket information further comprises: and acquiring ticket selling platform information, and establishing a ticket selling node and a bookkeeping node according to the ticket selling platform information.
Further, after the step of establishing a ticketing node and a billing node according to the ticketing platform information, the method further comprises the following steps: and generating a private key corresponding to each ticketing node, correspondingly sending the private key to the ticketing nodes, and storing a public key corresponding to the private key through the accounting node.
Further, before the step of determining whether the ticket booking request meets a preset condition, the method further includes: and acquiring a public key corresponding to the ticketing node from the accounting node, and decrypting the ticket booking request encrypted by the private key according to the public key.
Further, the step of classifying and splitting the ticket information and generating the processing node according to a preset classification rule specifically includes: classifying the ticket information according to at least one of flights, airlines and slots corresponding to the ticket information; and determining the number of the processing nodes and generating the processing nodes according to the classification number of the ticket information and the number of the air tickets corresponding to each classification.
Further, the step of determining whether the ticket booking request meets a preset condition specifically includes: acquiring ticket booking person information and ticket business resource information according to the ticket booking request, and judging whether the ticket booking request passes through the ticket booking person information and the ticket business resource information; if yes, determining that a preset condition is met; if not, determining that the preset condition is not met.
Further, the step of obtaining the booking processing result broadcasted by the processing node in the blockchain further comprises: and judging whether the transaction is successful according to the ticket booking processing result, and carrying out transaction statistics and updating the ticket information according to the transaction result.
Further, after the step of determining that the data is incorrect, the method further includes: and controlling the processing node to perform rollback operation and controlling the ticket selling node corresponding to the ticket booking request to send prompt information of ticket booking failure.
Based on the same inventive concept, the invention further provides an intelligent terminal, which comprises a processor and a memory, wherein the processor is in communication connection with the memory, the memory stores a computer program, and the processor executes the block chain-based booking method according to the computer program.
Based on the same inventive concept, the present invention also proposes a computer-readable storage medium storing program data for executing the block chain-based ticket booking method as described above.
Compared with the prior art, the invention has the beneficial effects that: after ticket information is acquired, processing nodes are generated according to the ticket information, ticket booking requests sent by ticket selling nodes are distributed to corresponding processing nodes for parallel processing, verification is carried out in a mode of a consensus algorithm, the information is stored to a block chain network after the verification is passed, the ticket information and the ticket booking information can be prevented from being falsified in a mode of distributing the ticket information to the block chain network and storing the ticket booking information by using the block chain network, ticket selling supervision and utilization of consumers are achieved, ticket booking processing speed and efficiency are improved and user experience is improved in a mode of parallel processing of the ticket booking information.
Drawings
FIG. 1 is a flowchart of an embodiment of a block chain-based booking method according to the present invention;
FIG. 2 is a block diagram of an embodiment of an intelligent terminal according to the present invention;
fig. 3 is a block diagram of an embodiment of a computer-readable storage medium of the present invention.
Detailed Description
The following description of the embodiments of the present application is provided by way of specific examples, and other advantages and effects of the present application will be readily apparent to those skilled in the art from the disclosure herein. The present application is capable of other and different embodiments and its several details are capable of modifications and/or changes in various respects, all without departing from the spirit of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The terminology used in the description of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
Referring to fig. 1, in which fig. 1 is a flowchart illustrating a block chain-based ticket booking method according to an embodiment of the present invention. The block chain-based booking method of the invention is explained in detail with reference to fig. 1.
In this embodiment, the device for executing the block chain-based ticket booking method may be a server, a computer, a cloud platform, or other intelligent terminals capable of establishing a block chain network and performing ticket booking processing.
In this embodiment, the block chain-based ticket booking method includes:
s101: the method comprises the steps of obtaining ticket information, classifying and splitting the ticket information according to preset classification rules, generating processing nodes, and issuing the ticket splitting information to a block chain network, wherein the ticket splitting information comprises the processing nodes corresponding to each type of ticket information.
The intelligent terminal obtains ticket information related to sold air tickets, divides the ticket information into different classifications according to preset classification rules, creates processing nodes corresponding to the classifications in the block chain network, and sends the ticket dividing information to the block chain network. The intelligent terminal exists as a main node of the block chain.
In this embodiment, the ticket splitting information further includes information such as a price of the air ticket, a corresponding slot, a flight, and a date.
In this embodiment, the step of acquiring ticket information further includes: and acquiring the information of the ticket selling platform, and establishing a ticket selling node and a bookkeeping node according to the information of the ticket selling platform.
The steps of classifying and splitting ticket information and generating processing nodes according to preset classification rules specifically comprise: classifying the ticket information according to at least one of the flight, the airline and the space corresponding to the ticket information; and determining the number of processing nodes and generating the processing nodes according to the classification number of the ticket information and the number of the air tickets corresponding to each classification. The number of processing nodes corresponding to one classification may be one or multiple.
In other embodiments, the price, departure time, departure airport, airline, and other information in the ticketing information may also be used.
In a specific embodiment, the ticketing information includes flight number, departure time, arrival time, airport, model, seat type, ticket price, and the flight number, departure time, arrival time, airport, model, seat type.
In this embodiment, the step of establishing the ticketing node and the accounting node according to the ticketing platform information further includes: and generating a private key corresponding to each ticketing node, correspondingly sending the private key to the ticketing nodes, and storing a public key corresponding to the private key through the accounting node.
S102: receiving a ticket booking request sent by a ticketing node, judging whether the ticket booking request meets a preset condition, if so, executing S103, and if not, determining that the ticket booking is failed.
The intelligent terminal receives a ticket booking request sent by each ticket selling node connected with the intelligent terminal, analyzes the ticket booking request or ticket booking person information and preset air ticket information, judges whether the information meets preset conditions or not, if so, determines that the preset conditions are met, otherwise, determines that the preset conditions are not met, determines that the ticket booking fails, and sends prompt information of the ticket booking failure to the ticket selling nodes.
The step of judging whether the ticket booking request meets the preset conditions further comprises the following steps: and acquiring a public key corresponding to the ticket selling node from the accounting node, and decrypting the ticket booking request encrypted by the private key according to the public key.
In this embodiment, the step of determining whether the ticket booking request meets the preset condition specifically includes: acquiring ticket booking person information and ticket business resource information according to the ticket booking request, and judging whether the ticket booking request passes or not according to the ticket booking person information and the ticket business resource information; if yes, determining that a preset condition is met; if not, determining that the preset condition is not met. The ticket booking method comprises the steps of determining whether ticket booking conditions are allowed or not through ticket booking person information, determining whether the air ticket is sold or exists or not by using ordered air ticket information and ticket service resource information, and determining that preset conditions are met if the conditions are met.
In this embodiment, the information of the ticket booking failure may be encrypted by the public key and then sent to the ticket selling node, and the ticket selling node decrypts the information by the pre-stored private key and sends the decrypted information to the user.
S103: and acquiring the ticket classification corresponding to the ticket booking request, and sending the ticket booking request to a processing node corresponding to the ticket classification.
The intelligent terminal acquires the information of the air ticket after determining that the ticket booking request meets the preset condition, identifies the ticket classification corresponding to the ticket booking request according to the information, further determines a processing node corresponding to the ticket classification, places the ticket booking request into a message queue by the processing node, and processes the ticket booking request according to the message queue.
When a plurality of corresponding processing nodes exist, the length of a message queue in the plurality of processing nodes is checked, and a booking request is sent to the processing node with the shortest message queue.
In this embodiment, when the ticket booking request is sent to the processing node, a block for storing the ticket booking request may be created in the blockchain, and the block is used to avoid the possibility of tampering with the ticket booking request.
After the ticket booking fund is sent to the processing node, the processing node transfers corresponding resources from ticket resources corresponding to the ticket information to ticket booking persons corresponding to the ticket booking request according to the ticket booking request, and transfers the ticket booking fund of the ticket booking persons corresponding to the ticket booking request to a designated account and generates a ticket booking processing result after the transfer is successful.
S104: acquiring a ticket booking processing result broadcasted by the processing node in the block chain, executing a consensus algorithm on the ticket booking processing result, judging whether the ticket booking processing result passes the consensus verification, if so, executing S105, and if not, determining that the data has errors.
And the ticketing node, the accounting node and the processing node in the block chain acquire a booking processing result broadcasted in the block chain, execute a consensus algorithm according to the result, and judge whether the booking processing result passes the consensus verification according to the operation result of the consensus algorithm. If yes, executing the next step, and if the common identification verification is not passed, determining that the data is falsified or has errors. And after the data is determined to be tampered or mistaken, controlling the processing node issuing the ticket booking processing result to perform rollback operation, and sending the information of ticket booking failure to the corresponding ticket selling node.
In this embodiment, the step of obtaining the ticket booking processing result broadcasted by the processing node in the blockchain further includes: and judging whether the transaction is successful according to the ticket booking processing result, and carrying out transaction statistics and updating ticket information according to the transaction result.
In this embodiment, the blockchain further includes a monitoring node, and after the data is determined to be incorrect, the intelligent terminal may further send the ticket booking processing result, the ticket booking request, and the ticket information to the monitoring node, and the monitoring node is used to check the ticket booking processing result, the ticket booking request, and the ticket information to find out where the data is incorrect.
S105: and respectively sending the booking processing result to the accounting node and the ticketing node, and storing the booking processing result and the accounting information of the accounting node in a block of the block chain.
After passing the consensus verification, the intelligent terminal or the processing node issuing the ticket booking processing result respectively sends the ticket booking processing result to the accounting node and the ticketing node, so that the ticketing node can issue tickets or give information of ticket booking failure according to the ticket booking processing result. And storing the ticket booking processing result and recording the index or position information of the ticket booking processing result and the ticket booking request by the accounting node by using the block of the block chain.
Has the advantages that: the block chain-based ticket booking method acquires ticket information, generates the processing nodes according to the ticket information, distributes a ticket booking request sent by the ticket node to the corresponding processing nodes for parallel processing, verifies the ticket booking request in a mode of a consensus algorithm, stores the information to the block chain network after the verification is passed, can prevent the ticket information and the ticket booking information from being falsified by distributing the ticket information to the block chain network and storing the ticket booking information by using the block chain network, realizes ticket booking supervision and protects the utilization of consumers, improves the ticket booking processing speed and efficiency and improves user experience by processing the ticket booking information in a parallel mode.
Based on the same inventive concept, the present invention further provides an intelligent terminal, please refer to fig. 2, fig. 2 is a structural diagram of an embodiment of the intelligent terminal of the present invention, and the intelligent terminal of the present invention is described with reference to fig. 2.
In this embodiment, the intelligent terminal includes a processor and a memory, the processor is connected to the memory in a communication manner, the memory stores a computer program, and the processor executes the ticket booking method based on the block chain according to the computer program.
In some embodiments, memory may include, but is not limited to, high speed random access memory, non-volatile memory. Such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices.
The processor may be a general-purpose processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the integrated circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
Based on the same inventive concept, the present invention further provides a computer-readable storage medium, please refer to fig. 3, fig. 3 is a structural diagram of an embodiment of the computer-readable storage medium of the present invention, and the computer-readable storage medium of the present invention is described with reference to fig. 3.
In the present embodiment, a computer-readable storage medium stores program data used for executing the block chain-based ticket booking method as described in the above embodiment.
The computer-readable storage medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs (compact disc-read only memories), magneto-optical disks, ROMs (read only memories), RAMs (random access memories), EPROMs (erasable programmable read only memories), EEPROMs (electrically erasable programmable read only memories), magnetic or optical cards, flash memory, or other type of media/machine-readable medium suitable for storing machine-executable instructions. The computer readable storage medium may be an article of manufacture that is not accessible to the computer device or may be a component that is used by an accessed computer device.
In particular implementations, computer-readable storage media store program data such as routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
The above embodiments are merely illustrative of the principles and utilities of the present application and are not intended to limit the application. Any person skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present application. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical concepts disclosed in the present application shall be covered by the claims of the present application.

Claims (10)

1. A block chain-based ticket booking method is characterized in that the block chain-based ticket booking method comprises the following steps:
s101: acquiring ticket information, classifying and splitting the ticket information according to a preset classification rule, generating processing nodes, and issuing the ticket splitting information to a block chain network, wherein the ticket splitting information comprises the processing nodes corresponding to each type of ticket information;
s102: receiving a ticket booking request sent by a ticketing node, judging whether the ticket booking request meets a preset condition, if so, executing S103, and if not, determining that the ticket booking fails;
s103: acquiring a ticket classification corresponding to the ticket booking request, and sending the ticket booking request to a processing node corresponding to the ticket classification;
s104: acquiring a ticket booking processing result broadcasted by the processing node in a block chain, executing a consensus algorithm on the ticket booking processing result, judging whether the ticket booking processing result passes consensus verification, if so, executing S105, and if not, determining that data is wrong;
s105: and respectively sending the booking processing result to a billing node and a ticketing node, and storing the booking processing result and the billing information of the billing node in a block of a block chain.
2. The block chain based ticketing method of claim 1, wherein said step of obtaining ticketing information further comprises:
and acquiring ticket selling platform information, and establishing a ticket selling node and a bookkeeping node according to the ticket selling platform information.
3. The block chain-based booking method of claim 2, wherein the step of establishing a ticketing node and a billing node according to the ticketing platform information further comprises the following steps:
and generating a private key corresponding to each ticketing node, correspondingly sending the private key to the ticketing nodes, and storing a public key corresponding to the private key through the accounting node.
4. The block chain-based ticket booking method of claim 3, wherein the step of determining whether the ticket booking request meets a preset condition further comprises:
and acquiring a public key corresponding to the ticketing node from the accounting node, and decrypting the ticket booking request encrypted by the private key according to the public key.
5. The block chain-based ticket booking method of claim 1, wherein the step of classifying and splitting the ticket information and generating the processing node according to a preset classification rule specifically comprises:
classifying the ticket information according to at least one of flights, airlines and slots corresponding to the ticket information;
and determining the number of the processing nodes and generating the processing nodes according to the classification number of the ticket information and the number of the air tickets corresponding to each classification.
6. The block chain-based ticket booking method of claim 1, wherein the step of judging whether the ticket booking request meets a preset condition specifically comprises:
acquiring ticket booking person information and ticket business resource information according to the ticket booking request, and judging whether the ticket booking request passes through the ticket booking person information and the ticket business resource information;
if yes, determining that a preset condition is met;
if not, determining that the preset condition is not met.
7. The blockchain-based ticketing method of claim 1, wherein said step of obtaining the ticketing processing results broadcast by said processing nodes in the blockchain further comprises:
and judging whether the transaction is successful according to the ticket booking processing result, and carrying out transaction statistics and updating the ticket information according to the transaction result.
8. The blockchain-based ticket booking method of claim 1, wherein the step of determining that the data is erroneous further comprises:
and controlling the processing node to perform rollback operation and controlling the ticket selling node corresponding to the ticket booking request to send prompt information of ticket booking failure.
9. An intelligent terminal, characterized in that the intelligent terminal comprises a processor and a memory, the processor is connected with the memory in communication, the memory stores a computer program, and the processor executes the block chain-based booking method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores program data for executing the block chain-based ticket booking method according to any one of claims 1 to 8.
CN202111318800.4A 2021-11-09 2021-11-09 Ticket booking method based on block chain, terminal and storage medium Pending CN114298351A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111318800.4A CN114298351A (en) 2021-11-09 2021-11-09 Ticket booking method based on block chain, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111318800.4A CN114298351A (en) 2021-11-09 2021-11-09 Ticket booking method based on block chain, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN114298351A true CN114298351A (en) 2022-04-08

Family

ID=80964354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111318800.4A Pending CN114298351A (en) 2021-11-09 2021-11-09 Ticket booking method based on block chain, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN114298351A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115719101A (en) * 2022-12-23 2023-02-28 中国民航信息网络股份有限公司 Electronic passenger ticket face certificate processing method, device and platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115719101A (en) * 2022-12-23 2023-02-28 中国民航信息网络股份有限公司 Electronic passenger ticket face certificate processing method, device and platform

Similar Documents

Publication Publication Date Title
US11573976B2 (en) Method and apparatus for managing a service request in a blockchain network
US9870251B2 (en) Semantic-aware and user-aware admission control for performance management in data analytics and data storage systems
WO2020186819A1 (en) Product data processing
CN112073269B (en) Block chain network testing method, device, server and storage medium
RU2591651C2 (en) Method and system for programming service initialisation
US8954588B1 (en) Reservations in real-time brokering of digital content delivery
US10885472B2 (en) Dynamic transportation pooling
US20180293687A1 (en) Ridesharing management for autonomous vehicles
US9894148B2 (en) Brokering for application hosting computing resources of multiple vendor-specific provisioned computing environments
US10467576B2 (en) Distributed software process tracking
US11113244B1 (en) Integrated data pipeline
US11200587B2 (en) Facilitating use of select hyper-local data sets for improved modeling
US20080004920A1 (en) Airline management system generating routings in real-time
CN113283990B (en) Data sharing processing method and device
CN110401630A (en) Verification method, device, electronic equipment and the medium of transaction certificate
US20200134764A1 (en) Booking management system
CN114298351A (en) Ticket booking method based on block chain, terminal and storage medium
US11503108B1 (en) Systems and methods of distributed processing
FR3104296A1 (en) OPTIMIZED PRODUCT DETERMINATION SYSTEM
US11715123B2 (en) System and method for testing multiple variants
CN110262892B (en) Ticket issuing method and device based on distributed storage data chain and data chain node
US11122437B2 (en) Detection of GPS spoofing using wireless network visibility to mobile devices
US20210081850A1 (en) Managing electronic ticket transfers
US11915011B2 (en) Systems and methods of distributed processing
KR102230113B1 (en) Systems and methods for test deployment of computational code on virtual servers

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20220408