WO2018112945A1 - 查询电子票的状态信息的方法、装置及区块链节点 - Google Patents

查询电子票的状态信息的方法、装置及区块链节点 Download PDF

Info

Publication number
WO2018112945A1
WO2018112945A1 PCT/CN2016/111856 CN2016111856W WO2018112945A1 WO 2018112945 A1 WO2018112945 A1 WO 2018112945A1 CN 2016111856 W CN2016111856 W CN 2016111856W WO 2018112945 A1 WO2018112945 A1 WO 2018112945A1
Authority
WO
WIPO (PCT)
Prior art keywords
blockchain
electronic ticket
status information
query request
ticket
Prior art date
Application number
PCT/CN2016/111856
Other languages
English (en)
French (fr)
Inventor
骆磊
Original Assignee
深圳前海达闼云端智能科技有限公司
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 深圳前海达闼云端智能科技有限公司 filed Critical 深圳前海达闼云端智能科技有限公司
Priority to PCT/CN2016/111856 priority Critical patent/WO2018112945A1/zh
Priority to CN201680002695.4A priority patent/CN107077682A/zh
Publication of WO2018112945A1 publication Critical patent/WO2018112945A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/018Certifying business or products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Definitions

  • the present disclosure relates to the field of information processing technologies, and in particular, to a method, an apparatus, and a blockchain node for querying status information of an electronic ticket.
  • the use of e-tickets also has drawbacks.
  • the issuer of the electronic ticket hoards a large number of hot tickets to make huge profits.
  • the ticket seller uses a fake electronic ticket or an electronic ticket that has been used to defraud.
  • the ticket seller buys a popular ticket at a low price, and then sells it at a high price. Therefore, there is a need to improve the electronic ticketing system in the related art.
  • a first aspect of the present disclosure provides a method of querying status information of an electronic ticket, the method being applied to a blockchain node in a blockchain network, the blockchain node storing a plurality of zones a block chain consisting of blocks, each block for storing information, the block chain being a distributed database in which all block chain nodes in the blockchain network participate in maintenance, the method comprising:
  • the historical status information of the electronic ticket is output.
  • the method further includes:
  • the verification result is output or sent to the query end, and the verification result is used to prompt whether the status information of the query request representation is trusted.
  • the method further includes:
  • the method further includes:
  • the changed state information is written into the blockchain.
  • the historical status information of the electronic ticket is searched from the blockchain stored by the blockchain node in response to the query request, including:
  • a second aspect of the present disclosure provides an apparatus for querying status information of an electronic ticket, which is applied to a blockchain node in a blockchain network, wherein the blockchain node stores a zone composed of a plurality of blocks. a block chain, each block is used for storing information, and the blockchain is a distributed database that is jointly maintained by all blockchain nodes in the blockchain network, and the device includes:
  • Obtaining a module configured to obtain a query request, where the query request is used to query historical state information of the electronic ticket;
  • a searching module configured to search historical status information of the electronic ticket from the blockchain in response to the query request
  • an output module configured to output historical state information of the electronic ticket.
  • the device further includes:
  • a verification module configured to verify whether the historical status information of the electronic ticket matches the status information of the query request representation
  • a processing module configured to output a verification result or send the verification result to the query end, where the verification result is used to prompt whether the status information of the query request representation is trusted.
  • the device further includes:
  • a receiving module configured to receive the query request sent by the querying end
  • a detecting module configured to detect whether the input interface of the blockchain node has the query request.
  • the device further includes:
  • a generating module configured to generate the electronic ticket according to a ticket issuing policy
  • a first writing module configured to write initial state information of the electronic ticket into the blockchain
  • a determining module configured to determine that the status information of the electronic ticket changes
  • a second writing module configured to write the changed state information into the blockchain.
  • the searching module is configured to: according to the identifier information that is used by the query request to identify the electronic ticket, search for historical state information that matches the identifier information from the blockchain.
  • a third aspect of the present disclosure provides a blockchain node, the blockchain node comprising:
  • processor a communication interface, a memory, and a communication bus; the processor, the communication interface, and the memory complete communication with each other through the communication bus;
  • the memory is for storing an application
  • the processor is configured to execute the application to implement the method for querying status information of an electronic ticket.
  • a fourth aspect of the present disclosure provides a blockchain network, the blockchain network including a plurality of blockchain nodes, each blockchain node being a node as described in the third aspect of the present disclosure.
  • a fifth aspect of the present disclosure provides a computer readable storage medium for storing a computer program, the computer program comprising instructions for performing the method of the first aspect described above.
  • the blockchain technology is used to store the historical state information of the electronic ticket, so that the historical state information of the electronic ticket is transparent and transparent, and the issuance, purchase, transfer, change, refund, and use of the electronic ticket are stored in The blockchain can not be rewritten, so that the user of the electronic ticket can track the historical status information of the electronic ticket.
  • it effectively stops the issuer from privately issuing tickets, ticket sellers using fake electronic tickets or used electronic tickets to defraud, ticket sellers buying popular tickets at low prices, and then selling at high prices.
  • FIG. 1 is a schematic diagram of a blockchain network suitable for use in the present disclosure, according to an exemplary embodiment.
  • FIG. 2A is a schematic diagram of an implementation environment, according to an exemplary embodiment.
  • 2B is a schematic diagram of an implementation environment, according to another exemplary embodiment.
  • FIG. 3 is a flowchart of a method for querying status information of an electronic ticket, according to an exemplary embodiment.
  • FIG. 4 is a flowchart of a method of storing a blockchain, according to an exemplary embodiment.
  • FIG. 5 is a block diagram of an apparatus for querying status information of an electronic ticket, according to an exemplary embodiment.
  • FIG. 6 is a block diagram of a blockchain node, according to an exemplary embodiment.
  • the present disclosure finds that the above drawbacks are due to information asymmetry and opacity.
  • the information asymmetry refers to the information asymmetry between the user of the electronic ticket and the issuer of the electronic ticket.
  • the ticket-sending strategy is approved by the government or the management, and the issuer of the electronic ticket is issued according to the ticket-sending strategy.
  • the ticketing strategy refers to the rules followed in issuing new tickets.
  • the billing strategy may include the time and number of sheets for issuing electronic coupons of various discount types.
  • all electronic tickets for the next day are automatically issued at 18 o'clock every day, or a predetermined number of e-tickets are issued periodically (for example, weekly).
  • the ticket issuing strategy is not transparent to the user of the electronic ticket. Therefore, on the one hand, the user of the electronic ticket cannot supervise whether the issuer of the electronic ticket can issue the ticket according to the ticket issuing policy, that is, the issuer of the electronic ticket cannot be verified according to whether or not the issuer of the electronic ticket is released.
  • Ticket policy is issued, and whether the issuer of the e-ticket is privately invoiced.
  • the user of the electronic ticket cannot verify whether the electronic ticket held by the user is in compliance with the ticket issuing policy, that is, the authenticity of the electronic ticket cannot be verified.
  • Information opacity means that the user of the electronic ticket cannot know the historical status information of the electronic ticket. For example, the user of the electronic ticket cannot verify whether the electronic ticket has been used, the number of times the electronic ticket is resold, and the price of the resale.
  • the present disclosure proposes to use the blockchain technology to store the historical state information of the electronic ticket, thereby making the historical state information of the electronic ticket transparent and transparent, and the issuance, purchase, transfer, change, refund, and use of the electronic ticket. It is stored in the blockchain and cannot be rewritten, so that the user of the electronic ticket can track the historical status information of the electronic ticket. In addition, it effectively stops the issuer from privately issuing tickets, ticket sellers using fake electronic tickets or used electronic tickets to defraud, ticket sellers buying popular tickets at low prices, and then selling at high prices. Accordingly, the present disclosure proposes a method of querying status information of an electronic ticket. Before describing the method, a blockchain network suitable for the present disclosure will first be described.
  • a blockchain network suitable for use in the present disclosure includes a plurality of blockchain nodes, the blockchain nodes storing blockchains composed of a plurality of blocks, each of which is used for storing information, and the blockchain is composed of blocks.
  • the blockchain node may be a blockchain node, which may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like. It can also be provided as a server.
  • FIG. 1 is a schematic diagram of a blockchain network suitable for use in the present disclosure, according to an exemplary embodiment.
  • the blockchain network 1000 includes a blockchain node 101, a blockchain node 102, a blockchain node 103, and a blockchain node 104.
  • a blockchain network suitable for use in the present disclosure is coupled to a server that grants all nodes in the blockchain network ticketing rights, or upon receipt of all nodes in the blockchain Register the request and authorize it to get the ticketing rights.
  • the server broadcasts a ticket policy to each node in the blockchain network, or each node obtains a ticketing policy from the server, or manually configures the ticketing policy in each node.
  • one or more blockchain nodes suitable for use in the blockchain network of the present disclosure are configured with a ticketing policy, by one or more blockchains configured with a ticketing policy
  • the node broadcasts the ticketing policy to other nodes in the blockchain network, or other nodes in the blockchain network obtain the ticketing policy from one or more blockchain nodes configured with the ticketing policy.
  • FIG. 2A is a schematic diagram of an implementation environment according to an exemplary embodiment.
  • the implementation environment can include an electronic device 100, and the electronic device 100 is a blockchain node in the blockchain network 100.
  • the electronic device 100 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
  • the electronic device 100 is a smart phone as an example.
  • the implementation environment may include an electronic device 100 and a server 200, and the electronic device 100 and the server 200 satisfy that the electronic device 100 is not a blockchain node in the blockchain network 100, and the server 200 is a block.
  • the electronic device 100 and the server 200 can communicate with each other through various wired or wireless methods.
  • the electronic device 100 communicates with the server 200 via WiFi, Bluetooth, 2G, 3G, 4G, and the like.
  • the electronic device 100 can upload data to the server 200 so that the server 200 performs operations such as data storage, data processing, and the like.
  • FIG. 3 is a flowchart of a method for querying status information of an electronic ticket, according to an exemplary embodiment. As shown in FIG. 3, the method includes the following steps:
  • Step S31 Obtain a query request, where the query request is used to query historical state information of the electronic ticket;
  • Step S32 Query, according to the query request, historical state information of the electronic ticket from the blockchain;
  • Step S33 Output historical state information of the electronic ticket.
  • step S31 may include the following steps:
  • the querier uses the electronic device 100 as the query end, and the querier uses the electronic device 100 to input a query request, and the electronic device 100 sends the query request to the server 200 to make the server 200 received the query request.
  • step S32 is performed.
  • the electronic device 100 is required to open the input.
  • the electronic device 100 detects whether the input interface has a query request. When it is detected that the input interface has a query request, step S32 is performed.
  • the subject of the method in the present disclosure is a blockchain node in a blockchain network.
  • the premise of performing step S32 is that the blockchain node stores a blockchain, so that the blockchain node searches for the historical state information of the electronic ticket specified by the querying end from the blockchain stored by itself. Therefore, before the description of step S32, the process of storing the blockchain by the blockchain node will first be described.
  • FIG. 4 is a flowchart of a method for storing a blockchain according to an exemplary embodiment. As shown in FIG. 4, the process of storing a blockchain includes the following steps:
  • Step S41 Generate the electronic ticket according to a ticket issuing policy
  • Step S42 writing initial state information of the electronic ticket into the blockchain
  • Step S43 determining that the status information of the electronic ticket changes
  • Step S44 Write the changed state information into the blockchain.
  • each blockchain node in the blockchain network can obtain the ticketing strategy. Since each blockchain node in the blockchain network is strictly synchronized in time, each blockchain node is placed in the same place. The ticket policy generates a specified number of electronic tickets at the same time. There is no need to broadcast an electronic ticket between the various blockchain nodes. When each blockchain node generates an electronic ticket, the initial state information of the generated electronic ticket is written into one of the blocks in the blockchain node.
  • Each e-ticket generated for the blockchain except that each e-ticket is generated, writes initial state information of each e-ticket to a block stored in the block chain node, and is still in each block
  • the changed status information of each electronic ticket is written in a block stored in the block chain node.
  • the storage capacity of the block storing the initial state information of the electronic ticket if the block is already full, the changed state information of the electronic ticket can be written into another one different from the block. Within the block; if the block is not full, the changed status information of the electronic ticket can also be written into the block.
  • each area Blocks are chained together in an orderly fashion to form a data chain, visually referred to as a blockchain. The above is the process of storing the blockchain.
  • the status information of each electronic ticket stored within each block can be represented by a data structure.
  • One possible data structure is as follows:
  • the identification of the electronic ticket (the information used to identify an electronic ticket may be one or a combination of the following: the unique ticket number of the electronic ticket, or the unique ticket number of the electronic ticket within the specified period, or the electronic ticket at the designated place. The unique ticket number, or the unique ticket number of the electronic ticket at the designated release batch);
  • the designated place of use of the electronic ticket may also be one or a combination of: the designated departure place of the electronic ticket, the designated arrival place of the electronic ticket);
  • the type of discount for the electronic ticket may be one or a combination of the following: adult ticket, group ticket, child ticket, senior ticket, package, coupon);
  • the identity information of the owner of the electronic ticket may be one or a combination of: the name of the owner of the electronic ticket, the identification number, the physiological characteristic information, the password set by the owner of the electronic ticket);
  • An array of transaction prices for electronic tickets may be one or a combination of: the price of the electronic ticket for sale, the price at which the electronic ticket is sold, the price after the electronic ticket is used, the price after the electronic ticket is changed each time, The price of the electronic ticket after it has been changed, the price after the electronic ticket is refunded, and the transaction price at which the electronic ticket is resold each time);
  • An array of historical status of the electronic ticket (may be one or a combination of: for sale, sold, used, refunded, number of times changed, number of times changed, number of resales).
  • the data structure can be set as required. That is to say, the data structure in the block may include the above eight items, but is not limited to the above eight items, and new items may be added according to requirements, some of them may be deleted or some of them may be replaced.
  • the initial state information contained in a structure may be as follows:
  • each status information change record of the electronic ticket can be retained.
  • the initial state information of the electronic ticket and the changed state information are also written into different blocks.
  • the blockchain stored in each blockchain node in the blockchain network is in the blockchain.
  • the changed status information contained in another new block may be as follows:
  • the electronic ticket is resold once after being purchased, and the changed status information contained in another new block in the blockchain stored in each blockchain node in the blockchain network may be as follows:
  • the electronic ticket is purchased, resold, and used again.
  • the changed status information contained in another new block in the blockchain stored in each blockchain node in the blockchain network may be as follows:
  • each block in the blockchain can store all historical state information of the electronic ticket.
  • all the historical state information of the electronic ticket can be queried from the latest block in the blockchain, thereby improving the query efficiency.
  • each block in the blockchain can also store only the latest state information of the electronic ticket.
  • the blockchain node may, according to the identification information, Locating a plurality of blocks matching the identification information in the stored blockchain, and then splicing the historical state information matching the identification information among the plurality of found blocks to obtain the electronic ticket specified by the querying end. All historical status information. Examples are as follows:
  • the initial state information contained in one structure may be as follows:
  • the initial state information of the electronic ticket and the changed state information are also written into different blocks.
  • the blockchain stored in each blockchain node in the blockchain network is in the blockchain.
  • the changed status information contained in another new block may be as follows:
  • the electronic ticket is resold once after being purchased, and the changed status information contained in another new block in the blockchain stored in each blockchain node in the blockchain network may be as follows:
  • the electronic ticket is purchased, resold, and used again, and the changed state information included in another new block in the blockchain stored in each blockchain node in the blockchain network may be Can be as follows:
  • step S32 After the blockchain node is used to store the blockchain according to the method shown in FIG. 4, step S32 may be performed, that is, the electronic ticket specified by the query end is searched from the blockchain stored in the blockchain node. Historical status information.
  • the blockchain stores the historical state information of the electronic ticket specified by the query end, and the blockchain node may be from the stored blockchain.
  • the historical status information of the electronic ticket specified by the query end is found, and then step S33 is performed to output the found historical status information.
  • the electronic ticket specified by the query end is not one of the electronic tickets generated by the blockchain node, the history status information of the electronic ticket specified by the query end is not stored in the blockchain, and the blockchain node searches for the stored blockchain. If the history status information of the electronic ticket specified by the query end is not available, the prompt information is output to prompt the query for the historical status information of the electronic ticket specified by the query end.
  • the possible reason is: the electronic ticket specified by the query side is a fake ticket, or the electronic ticket specified by the query end is privately hoarded by the blockchain node (that is, the blockchain node does not vote according to the ticketing strategy) Instead, some electronic tickets are hoarded privately, resulting in no historical status information of some electronic tickets in the blockchain stored in the blockchain node.
  • step S32 includes the following steps:
  • the blockchain node may search for the historical state information matching the identifier information from the stored blockchain according to the identifier information.
  • the query request is: the query specifies that the use location is Shanghai Disney, and the unique ticket number of the designated use location is the historical status information of the electronic ticket of 2016080000001, and the identifier information carried by the query request is: the designated use location is Shanghai Disney, and The unique ticket number for the specified place of use is 2016080000001.
  • the blockchain node searches for the historical state information matching the identification information (the designated use location is Shanghai Disney, and the unique ticket number of the designated use location is 2016080000001) from the stored blockchain. And then output the found history status information, the output history status information is as follows:
  • the user of the blockchain node can know the history of the electronic ticket with the identification information (for example, the designated use location is Shanghai Disney, and the unique ticket number of the designated use location is 2016080000001) according to the historical state information output by the blockchain node. status information. So far, the symmetry and transparency of the historical state information of the electronic ticket has been realized.
  • the user of the blockchain node can verify whether the blockchain node votes according to the ticketing policy according to the historical state information of the electronic ticket, and can also verify whether an electronic ticket is false according to the historical state information output by the blockchain node. Ticket, expired ticket, used ticket, yellow Cattle tickets, etc.
  • the method further includes:
  • the verification result is output or sent to the query end, and the verification result is used to prompt whether the status information of the query request representation is trusted.
  • the user of the blockchain node is not required to perform the verification, but the blockchain node performs the verification.
  • the query request represents the status information of the electronic ticket specified by the query end
  • the blockchain node finds the corresponding historical state information from the stored blockchain, it can verify whether the state information of the query request representation is found and found. The historical status information is matched, and then the verification result is output, or the verification result is sent to the query end, and the verification result is used to prompt whether the status of the query request representation is credible.
  • the query request characterizes that the electronic ticket with certain identification information (eg, the designated use location is Shanghai Disney, and the unique ticket number of the designated usage location is 2016080000001) is unused, and the blockchain node is from the stored area.
  • the historical status information matching the identification information (the designated use location is Shanghai Disney and the unique ticket number of the designated use location is 2016080000001) is found in the blockchain, and the historical status information found is as follows:
  • the blockchain node learns that the electronic ticket specified by the query end is used according to the found historical state information, and does not match the state information (unused) of the query request representation. Therefore, the verification result is output, or the verification result is sent to the query end.
  • the verification result is used to prompt the user of the blockchain node or the queryer using the query side: the status of the query request representation is untrustworthy, for example, the verification result is: untrusted, the designated use location is Shanghai Disney, and the designated use place
  • the only ticket number is 2016080000001 which has been used.
  • the electronic ticket user can decide whether the transaction for the electronic ticket is completed according to the historical status information of the electronic ticket. Avoid buying fake tickets, expired tickets, used tickets, scalper tickets, etc.
  • the blockchain network may provide a query interface, so that the query end sends the query request to the query port.
  • the query interface may allocate the query request to the blockchain node specified by the query end, and perform the verification by the blockchain node specified by the query end;
  • the query interface may randomly allocate the query request to a blockchain node in the blockchain network, and perform verification by a blockchain node randomly designated by the query interface, or the query interface may request the query. Randomly assigned to some blockchain nodes in the blockchain network, the multiple blockchain nodes randomly specified by the query interface perform verification, or the query interface allocates the query request to all blockchains in the blockchain network. Nodes are verified by all blockchain nodes in the blockchain network.
  • the blockchain node may perform verification, and the blockchain node may also randomly allocate the query request to the blockchain network.
  • a blockchain node which is verified by a blockchain node randomly designated by the blockchain node, or the blockchain node can randomly allocate the query request to some blockchains in the blockchain network
  • the node performs verification by multiple blockchain nodes randomly designated by the query interface, or the blockchain node may forward the query request to all blockchain nodes in the blockchain network, and then block All blockchain nodes in the chain network perform verification.
  • multiple blockchain nodes can generate verification results, and then perform verification on the verification results generated by all the blockchain nodes that perform verification, and analyze and use for prompting query request representation.
  • the state is the proportion of all the verification results by the credible verification result (hereinafter referred to as the trusted verification result), assuming that there are N blockchain nodes performing verification, and the proportion of the number of nodes N1 generating a reliable verification result
  • the preset threshold may be between 90% and 95%.
  • FIG. 5 is a block diagram of an apparatus for querying status information of an electronic ticket, according to an exemplary embodiment. As shown in FIG. 5, the apparatus 500 includes:
  • the obtaining module 501 is configured to obtain a query request, where the query request is used to query historical state information of the electronic ticket;
  • the searching module 502 is configured to search historical status information of the electronic ticket from the blockchain in response to the query request;
  • the output module 503 is configured to output historical state information of the electronic ticket.
  • the device further includes:
  • a verification module configured to verify whether the historical status information of the electronic ticket matches the status information of the query request representation
  • a processing module configured to output a verification result or send the verification result to the query end, where the verification result is used to prompt whether the status information of the query request representation is trusted.
  • the device further includes:
  • a receiving module configured to receive the query request sent by the querying end
  • a detecting module configured to detect whether the input interface of the blockchain node has the query request.
  • the device further includes:
  • a generating module configured to generate the electronic ticket according to a ticket issuing policy
  • a first writing module configured to write initial state information of the electronic ticket into the blockchain
  • a determining module configured to determine that the status information of the electronic ticket changes
  • a second writing module configured to write the changed state information into the blockchain.
  • the searching module is configured to: according to the identifier information that is used by the query request to identify the electronic ticket, search for historical state information that matches the identifier information from the blockchain.
  • each module of the device for querying the status information of the electronic ticket is only a logical function division, and the actual implementation may have another division manner.
  • the physical implementation of each module may also be in various manners, which is not limited by the present invention.
  • FIG. 6 is a block diagram of a blockchain node according to an exemplary embodiment. As shown in FIG. 6, the blockchain node 600 includes:
  • the processor 601, the memory 602, the communication interface 603, and the communication bus 604; the processor 601, the memory 602, and the communication interface 603 complete communication with each other through the communication bus 604.
  • the processor 601 may be a multi-core central processing unit CPU, or an application specific integrated circuit (ASIC), or configured to implement the embodiment of the present invention.
  • ASIC application specific integrated circuit
  • One or more integrated circuits One or more integrated circuits.
  • the memory 602 is for storing program code, and the program code includes computer operation instructions and a network flow diagram.
  • Memory 602 may carry high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the communication interface 603 is used to implement connection communication between these devices.
  • the processor 601 executes program code for implementing the method illustrated in FIG. 3 or FIG. 4 at runtime.
  • the embodiment of the invention further provides a blockchain network, the blockchain network comprising a plurality of blockchain nodes.
  • the blockchain network comprising a plurality of blockchain nodes.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above integrated unit implemented in the form of a software functional unit can be stored in a computer Readable in storage media.
  • the software functional units described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform portions of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store data.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Accounting & Taxation (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computing Systems (AREA)
  • Finance (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种查询电子票的状态信息的方法、装置及区块链节点。所述查询电子票的状态信息的方法利用区块链技术,存储电子票的历史状态信息,进而使得电子票的历史状态信息是公开透明的,电子票的发放、购买、转让、变更、退票、使用都被存储在区块链中且不可改写,方便电子票的使用者对电子票的历史状态信息进行追踪。进而有效制止发行方私自屯票、售票者使用假的电子票或者已使用的电子票行骗、贩票者以低价购入抢手票,再以高价卖出等。

Description

查询电子票的状态信息的方法、装置及区块链节点 技术领域
本公开涉及信息处理技术领域,尤其涉及一种查询电子票的状态信息的方法、装置及区块链节点。
背景技术
随着电子票务系统的发展,电子票在人们的日常生活中被频繁使用,例如:公园门票,游乐场门票,火车票等均可为电子票。购票者直接扫二维码取票,或者刷身份证入园,十分便利。此外,与纸质票的转卖相比,电子票的转卖也十分便利,不再需要转卖方快递纸质票。
然而,在某些场景下,使用电子票也存在弊端。例如:电子票的发行方私自囤积大量热门票,以牟取暴利。又例如:售票者使用假的电子票或者已使用的电子票行骗。再例如:贩票者以低价购入抢手票,再以高价卖出等。因此,需要对相关技术中的电子票务系统进行改进。
发明内容
本公开的目的是提供一种查询电子票的状态信息的方法、装置及区块链节点,以便于对电子票的历史状态信息进行跟踪。
为了实现上述目的,本公开第一方面提供一种查询电子票的状态信息的方法,所述方法应用于区块链网络中的区块链节点,所述区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,所述区块链是由所述区块链网络中所有区块链节点共同参与维护的分布式数据库,所述方法包括:
获得查询请求,所述查询请求用于查询电子票的历史状态信息;
响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信 息;
输出所述电子票的历史状态信息。
可选地,所述方法还包括:
验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
可选地,所述方法还包括:
接收查询端发送的所述查询请求;或
检测所述区块链节点的输入接口是否有所述查询请求。
可选地,所述方法还包括:
根据放票策略,生成所述电子票;
将所述电子票的初始状态信息写入所述区块链中;
确定所述电子票的状态信息发生改变;
将改变后的状态信息写入所述区块链中。
可选地,响应于所述查询请求,从所述区块链节点所存储的区块链中查找所述电子票的历史状态信息,包括:
根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块链中查找与所述标识信息匹配的历史状态信息。
本公开第二方面提供一种查询电子票的状态信息的装置,其特征在于,应用于区块链网络中的区块链节点,所述区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,所述区块链是由所述区块链网络中所有区块链节点共同参与维护的分布式数据库,所述装置包括:
获得模块,用于获得查询请求,所述查询请求用于查询电子票的历史状态信息;
查找模块,用于响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信息;
输出模块,用于输出所述电子票的历史状态信息。
可选地,所述装置还包括:
验证模块,用于验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
处理模块,用于输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
可选地,所述装置还包括:
接收模块,用于接收查询端发送的所述查询请求;或
检测模块,用于检测所述区块链节点的输入接口是否有所述查询请求。
可选地,所述装置还包括:
生成模块,用于根据放票策略,生成所述电子票;
第一写入模块,用于将所述电子票的初始状态信息写入所述区块链中;
确定模块,用于确定所述电子票的状态信息发生改变;
第二写入模块,用于将改变后的状态信息写入所述区块链中。
可选地,所述查找模块用于:根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块链中查找与所述标识信息匹配的历史状态信息。
本公开第三方面提供一种区块链节点,所述区块链节点包括:
处理器、通信接口、存储器和通信总线;所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;
所述存储器用于存储应用程序;
所述处理器用于执行所述应用程序以实现上述查询电子票的状态信息的方法。
本公开第四方面提供一种区块链网络,所述区块链网络包括多个区块链节点,每个区块链节点是如本公开第三方面所述的节点。
本公开第五方面提供一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序,所述计算机程序包括用于执行上述第一方面所述的方法的指令。
采用上述技术方案,利用区块链技术,存储电子票的历史状态信息,进而使得电子票的历史状态信息是公开透明的,电子票的发放、购买、转让、变更、退票、使用都被存储在区块链中且不可改写,方便电子票的使用者对电子票的历史状态信息进行追踪。进而有效制止发行方私自屯票、售票者使用假的电子票或者已使用的电子票行骗、贩票者以低价购入抢手票,再以高价卖出等。
附图说明
图1是根据一示例性实施例示出的适用于本公开的区块链网络的示意图。
图2A是根据一示例性实施例示出的一种实施环境的示意图。
图2B是根据另一示例性实施例示出的一种实施环境的示意图。
图3是根据一示例性实施例示出的一种查询电子票的状态信息的方法的流程图。
图4是根据一示例性实施例示出的一种存储区块链的方法的流程图。
图5是根据一示例性实施例示出的一种查询电子票的状态信息的装置的框图。
图6是根据一示例性实施例示出的一种区块链节点的框图。
具体实施方式
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。
在背景技术中已经提及,使用电子票存在弊端。本公开发现,之所以存在上述弊端,是因为信息不对称以及不透明。其中,信息不对称是指:电子票的使用者与电子票的发行方之间信息不对称。通常来说,放票策略是得到政府或管理部门认可的,电子票的发行方按照放票策略放票。其中,放票策略是指:发放新票所遵循的规则。放票策略可以包括发放各种折扣类型的电子票的时间和张数。例如:每日的18点整自动发放次日的所有的电子票,或者定期(例如:每周)发放规定数量的电子票等。然而,放票策略对电子票的使用者不是公开透明的,因而一方面电子票的使用者无法监督电子票的发行方是否按照放票策略放票,即无法验证电子票的发行方是否按照放票策略放票,以及电子票的发行方是否私自屯票。另一方面,电子票的使用者也无法验证自己持有的电子票是否符合放票策略,即无法验证电子票的真伪。信息不透明是指:电子票的使用者无法获知电子票的历史状态信息。例如:电子票的使用者无法验证电子票是否已被使用、电子票被转卖的次数以及被转卖的价格等。
为减少上述弊端,本公开提出利用区块链技术,存储电子票的历史状态信息,进而使得电子票的历史状态信息是公开透明的,电子票的发放、购买、转让、变更、退票、使用都被存储在区块链中且不可改写,方便电子票的使用者对电子票的历史状态信息进行追踪。进而有效制止发行方私自屯票、售票者使用假的电子票或者已使用的电子票行骗、贩票者以低价购入抢手票,再以高价卖出等。因此,本公开提出一种查询电子票的状态信息的方法。在对该方法进行说明前,首先对适用于本公开的区块链网络进行说明。
适用于本公开的区块链网络包括多个区块链节点,区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,区块链是由区块链网络中所有区块链节点共同参与维护的分布式数据库。其中,区块链节点可为区块链节点可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。还可以被提供为一服务器。
请参考图1,图1是根据一示例性实施例示出的适用于本公开的区块链网络的示意图。如图1所示,区块链网络1000包括区块链节点101、区块链节点102、区块链节点103和区块链节点104。
在本公开的一个实施例中,适用于本公开的区块链网络与一服务器连接,该服务器授予区块链网络中的全部节点放票权限,或者在接收到区块链中的全部节点的注册请求,对其进行授权,使其获得放票权限。服务器向区块链网络中的各个节点广播放票策略,或者各个节点分别从该服务器中获取放票策略,或者通过人工将放票策略配置在各个节点中。
在本公开的另一个实施例中,适用于本公开的区块链网络中有一个或多个区块链节点被配置有放票策略,由配置有放票策略的一个或多个区块链节点将放票策略广播给区块链网络中的其他节点,或者区块链网络中的其他节点从配置有放票策略的一个或多个区块链节点中获取放票策略。
以上为对适用于本公开的区块链网络做出的说明。下面对适用于本公开的实施环境进行说明。请参考图2A,图2A是根据一示例性实施例示出的一种实施环境的示意图。如图2A所示,该实施环境可以包括电子设备100,且电子设备100是区块链网络100中的一个区块链节点。在本公开中,电子设备100可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。图2A中以电子设备100是智能手机为例来示意。
图2B是根据另一示例性实施例示出的一种实施环境的示意图。如图2B所示,该实施环境可以包括电子设备100及服务器200,且电子设备100及服务器200满足:电子设备100不是区块链网络100中的一个区块链节点,且服务器200是区块链网络100中的一个区块链节点。其中,电子设备100与服务器200之间可以通过各种有线或无线方式进行通信。示例地,电子设备100与服务器200之间通过WiFi、蓝牙、2G、3G、4G等方式进行通信。电子设备100可以向服务器200上传数据,以便服务器200进行数据存储、数据处理等操作。
下面对本公开提供的查询电子票的状态信息的方法进行说明。该方法可以应用于电子设备或服务器,例如:图2A或图2B所示的电子设备100或图2B所示的服务器。请参考图3,图3是根据一示例性实施例示出的一种查询电子票的状态信息的方法的流程图。如图3所示,该方法包括以下步骤:
步骤S31:获得查询请求,所述查询请求用于查询电子票的历史状态信息;
步骤S32:响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信息;
步骤S33:输出所述电子票的历史状态信息。
其中,根据执行该方法的主体的不同,步骤S31可以包括以下步骤:
接收查询端发送的所述查询请求;或
检测所述区块链节点的输入接口是否有所述查询请求。
若该方法应用于图2B所示的实施环境,则查询者使用电子设备100即为查询端,查询者使用电子设备100输入查询请求,电子设备100将该查询请求发送给服务器200,以使得服务器200接收到该查询请求。在服务器接收到该查询请求时,执行步骤S32。
若该方法应用于图2A所示的实施环境,则要求电子设备100开放输入 接口,以便于查询者通过该输入接口输入查询请求。电子设备100检测输入接口是否有查询请求,在检测到输入接口有查询请求时,执行步骤S32。
如前所述,本公开中执行该方法的主体是区块链网络中的一个区块链节点。执行步骤S32的前提是:该区块链节点存储有区块链,以便于该区块链节点从自身所存储的区块链中查找查询端指定的电子票的历史状态信息。因此,在对步骤S32进行说明之前,首先对区块链节点存储区块链的过程进行说明。
请参考图4,图4是根据一示例性实施例示出的一种存储区块链的方法的流程图。如图4所示,存储区块链的过程包括以下步骤:
步骤S41:根据放票策略,生成所述电子票;
步骤S42:将所述电子票的初始状态信息写入所述区块链中;
步骤S43:确定所述电子票的状态信息发生改变;
步骤S44:将改变后的状态信息写入所述区块链中。
如前所述,区块链网络中的各个区块链节点均可以获得放票策略,由于区块链网络中的各个区块链节点在时间上严格同步,所以各个区块链节点按照同一放票策略在同一时刻生成规定数量的电子票。各个区块链节点之间不需要通过广播来同步生成电子票。在各个区块链节点生成电子票时,将所生成的电子票的初始状态信息写入存储在该区块链节点中的一个区块内。对该区块链生成的每张电子票,除在每张电子票被生成时,将每张电子票的初始状态信息写入存储在该区块链节点中的一个区块内外,还在每张电子票的状态信息发生改变时,将每张电子票的改变后的状态信息写入存储在该区块链节点中的一个区块内。在实际应用中,根据存储电子票的初始状态信息的区块的存储容量,若该区块已被存满,则可以将电子票的改变后的状态信息写入与该区块不同的另一区块内;若该区块未被存满,则可以将电子票的改变后的状态信息也写入该区块内。根据各个区块产生时间的先后顺序,各个区 块被有序地链接在一起,形成一个数据链条,被形象地称为区块链。以上为存储区块链的过程。
示例地,每个区块内存储的各个电子票的状态信息可以用数据结构表示。一种可能的数据结构如下:
1)电子票的标识(用于标识一张电子票的信息,可能是以下一者或组合:电子票的唯一票号、或电子票在指定期限的唯一票号、或电子票在指定地点的唯一票号、或电子票在指定发放批次的唯一票号);
2)电子票的指定使用地点(还可能是以下一者或组合:电子票的指定出发地点、电子票的指定到达地点);
3)电子票的指定使用日期和电子票的有效期中至少一者;
4)电子票的折扣类型(可能是以下一者或组合:成人票、团购票、儿童票、老年人票、套票、联票);
5)电子票的所有者的身份信息(可能是以下一者或组合:电子票的所有者的姓名、证件号码、生理特征信息、电子票的所有者设定的密码);
6)电子票的成交价格数组(可能是以下一者或组合:电子票的待售价格、电子票售出的价格、电子票被使用后的价格、电子票每次被改签后的价格、电子票每次被变更后的价格、电子票被退票后的价格、电子票每次被转卖的成交价格);
7)电子票的成交时间数组;
8)电子票的历史状态数组(可能是以下一者或组合:待售、已售出、已使用、已退票、已变更的次数、已改签的次数、已转卖的次数)。
在实际应用中,可以根据需求设置数据结构。也就是说,区块内的数据结构可以包括上述8项,但不局限于上述8项,可以根据需求增加新的项、删除其中某些项或者替换其中某些项。
示例地,假设放票策略是:每周五18:00整发放5万张电子票且打折类 型为成人票,则区块链网络中的所有区块链节点将按照该放票策略在每周五18:00整同时在各自的区块链中的一个区块内添加5万个结构体,一个结构体中包含的初始状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL
所有者的证件号码:NULL
成交价格:¥499
成交时间:2016年8月26日18:00整(即放票策略规定的放票时间)
历史状态:待售
由于区块链的特性,在电子票被购买或转卖后,已存储的该电子票的状态信息并不会被覆盖,也就是说,该电子票的每次状态信息改变记录都能被保留。以将电子票的初始状态信息和改变后的状态信息也写入不同区块内为例,例如,电子票被购买后,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内中包含的改变后的状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL,张三
所有者的证件号码:NULL,123456
成交价格:¥499,¥499
成交时间:2016年8月26日18:00整,2016年8月27日9:00整
历史状态:待售,已售出
又例如,电子票被购买后再被转卖一次,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内包含的改变后的状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL,张三,李四
所有者的证件号码:NULL,123456,143234
成交价格:¥499,¥499,¥480
成交时间:2016年8月26日18:00整,2016年8月27日9:00整,2016年8月28日15:00整
历史状态:待售,已售出,转卖一次
又例如,电子票被购买、被转卖一次后再被使用,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内包含的改变后的状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL,张三,李四,NULL
所有者的证件号码:NULL,123456,143234,NULL
成交价格:¥499,¥499,¥480,0
成交时间:2016年8月26日18:00整,2016年8月27日9:00整,2016年8月28日15:00整,2016年8月29日10:00整
历史状态:待售,已售出,转卖一次,已使用
在实际应用中,区块链中的每个区块可以存储电子票的所有历史状态信息,具体可参考上述例子。以便于在检测到查询端指定的电子票的查询请求时,从区块链中最新的区块中即可查询到电子票的所有历史状态信息,提高查询效率。
为了减少数据冗余,提高存储空间利用率,区块链中的每个区块还可以仅存储电子票的最新的状态信息。在这种存储方式下,在检测到查询端指定的电子票的查询请求时,在查询请求携带用于标识查询端指定的电子票的标识信息时,区块链节点可以根据该标识信息,从所存储的区块链中查找与该标识信息匹配的多个区块,然后将查找到的多个区块中与该标识信息匹配的历史状态信息拼凑起来,以得到查询端指定的电子票的全部历史状态信息。举例如下:
假设放票策略是:每周五18:00整发放5万张电子票且打折类型为成人票,则区块链网络中的所有区块链节点将按照该放票策略在每周五18:00整同时在各自的区块链中的一个区块内添加5万个结构体,一个结构体中包含的初始状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL
所有者的证件号码:NULL
成交价格:¥499
成交时间:2016年8月26日18:00整(即放票策略规定的放票时间)
历史状态:待售
以将电子票的初始状态信息和改变后的状态信息也写入不同区块内为例,例如,电子票被购买后,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内中包含的改变后的状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:张三
所有者的证件号码:123456
成交价格:¥499
成交时间:2016年8月27日9:00整
历史状态:已售出
又例如,电子票被购买后再被转卖一次,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内包含的改变后的状态信息可能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:李四
所有者的证件号码:143234
成交价格:¥480
成交时间:2016年8月28日15:00整
历史状态:转卖一次
又例如,电子票被购买、被转卖一次后再被使用,区块链网络中每个区块链节点所存储的区块链中的另一个新区块内包含的改变后的状态信息可 能如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL
所有者的证件号码:NULL
成交价格:0
成交时间:2016年8月29日10:00整
历史状态:已使用在区块链节点按照图4所示的方法存储区块链后,即可执行步骤S32,即从该区块链节点所存储的区块链中查找查询端指定的电子票的历史状态信息。
若查询端指定的电子票是区块链节点生成的电子票之一,则区块链中存储有查询端指定的电子票的历史状态信息,区块链节点可以从所存储的区块链中找到查询端指定的电子票的历史状态信息,然后执行步骤S33,输出所找到的历史状态信息。
若查询端指定的电子票不是区块链节点生成的电子票之一,则区块链中未存储查询端指定的电子票的历史状态信息,区块链节点从所存储的区块链中找不到查询端指定的电子票的历史状态信息,则输出提示信息,以提示查询不到查询端指定的电子票的历史状态信息。之所以会出现这种情况,可能的原因是:查询端指定的电子票是假票,或者查询端指定的电子票被区块链节点私自囤积(即区块链节点未按照放票策略放票,而是私自囤积部分电子票,导致区块链节点所存储的区块链中没有部分电子票的历史状态信息)。
可选地,步骤S32包括以下步骤:
根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块 链中查找与所述标识信息匹配的历史状态信息。
在查询请求携带用于标识查询端指定的电子票的标识信息时,区块链节点可以根据该标识信息,从所存储的区块链中查找与该标识信息匹配的历史状态信息。
示例地,查询请求为:查询指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001的电子票的历史状态信息,则查询请求携带的标识信息为:指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001。则区块链节点在检测到该查询请求时,从所存储的区块链中查找与该标识信息(指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001)匹配的历史状态信息,然后输出所找到的历史状态信息,所输出的历史状态信息如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL,张三,李四,NULL
所有者的证件号码:NULL,123456,143234,NULL
成交价格:¥499,¥499,¥480,0
历史状态:待售,已售出,转卖一次,已使用
区块链节点的用户根据区块链节点所输出的历史状态信息,即可获知具有标识信息(例如:指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001)的电子票的历史状态信息。至此,实现了电子票的历史状态信息的对称化和透明化。区块链节点的用户可以依据电子票的历史状态信息,验证区块链节点是否按照放票策略放票,还可以根据区块链节点所输出的历史状态信息,验证一张电子票是否是假票、过期票、已使用票、黄 牛票等。
可选地,所述方法还包括:
验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
在另一实施例中,无需区块链节点的用户执行验证,而是由区块链节点执行验证。在查询请求表征查询端指定的电子票的状态信息时,区块链节点在从所存储的区块链中查找到对应的历史状态信息后,可以验证查询请求表征的状态信息是否与所找到的历史状态信息匹配,然后输出验证结果,或者将验证结果发送给查询端,验证结果用于提示查询请求表征的状态是否可信。
示例地,查询请求表征具有某一标识信息(例如:指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001)的电子票是未使用的,而区块链节点从所存储的区块链中查找与该标识信息(指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001)匹配的历史状态信息,所找到的历史状态信息如下:
指定使用地点:上海迪士尼
指定使用地点的唯一票号:2016080000001
折扣类型:成人票
有效期:2016年8月31日
所有者的姓名:NULL,张三,李四,NULL
所有者的证件号码:NULL,123456,143234,NULL
成交价格:¥499,¥499,¥480,0
历史状态:待售,已售出,转卖一次,已使用
区块链节点根据找到的历史状态信息,获知查询端指定的电子票是已使用的,与查询请求表征的状态信息(未使用)不匹配,因此,输出验证结果,或向查询端发送验证结果,该验证结果用于提示区块链节点的用户或者使用查询端的查询者:查询请求表征的状态是不可信的,例如,验证结果为:不可信,指定使用地点是上海迪士尼,且指定使用地点的唯一票号是2016080000001已被使用。
可见,在电子票的历史状态信息的对称化和透明化的基础上,电子票使用者可以根据电子票的历史状态信息,决定针对该电子票的买卖是否成交。避免买到假票、过期票、已使用票、黄牛票等。
在实际应用中,在查询请求来自于区块链网络外部的查询端的情况下,区块链网络可以提供查询接口,以便于查询端将查询请求发送到该查询端口。在查询请求携带查询端指定的区块链节点时,查询接口可以将该查询请求分配给查询端指定的区块链节点,由查询端指定的区块链节点执行验证;在查询端未指定区块链节点时,查询接口可以将该查询请求随机分配给区块链网络中的某个区块链节点,由查询接口随机指定的一个区块链节点执行验证,或者查询接口可以将该查询请求随机分配给区块链网络中的某些区块链节点,由查询接口随机指定的多个区块链节点执行验证,或查询接口将该查询请求分配给区块链网络中的全部区块链节点,由区块链网络中的全部区块链节点执行验证。
在查询请求来自于区块链网络中的某一区块链节点的情况下,可以由该区块链节点执行验证,该区块链节点也可以将该查询请求随机分配给区块链网络中的某个区块链节点,由该区块链节点随机指定的一个区块链节点执行验证,或者该区块链节点可以将该查询请求随机分配给区块链网络中的某些区块链节点,由查询接口随机指定的多个区块链节点执行验证,或者该区块链节点可以将该查询请求转发给区块链网络中的全部区块链节点,然后区块 链网络中的全部区块链节点均执行验证。
对于有多个区块链节点执行验证的情况,多个区块链节点均可以生成验证结果,再对所有执行验证的区块链节点生成的验证结果进行统计,分析用于提示查询请求表征的状态是可信的验证结果(下文简称为可信的验证结果)占所有验证结果的比例,假设有N个区块链节点执行验证,若生成可信的验证结果的节点数N1所占的比例高于预设阈值(即N1/N的值高于预设阈值),则最终验证结果为:查询请求表征的状态是可信的;否则,最终验证结果为:查询请求表征的状态是不可信的。在一个实施例中,预设阈值可为90%~95%。
基于同一发明构思,本公开还提供一种查询电子票的状态信息的装置,应用于区块链网络中的区块链节点,所述区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,所述区块链是由所述区块链网络中所有区块链节点共同参与维护的分布式数据库。请参考图5,图5是根据一示例性实施例示出的一种查询电子票的状态信息的装置的框图。如图5所示,该装置500包括:
获得模块501,用于获得查询请求,所述查询请求用于查询电子票的历史状态信息;
查找模块502,用于响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信息;
输出模块503,用于输出所述电子票的历史状态信息。
可选地,所述装置还包括:
验证模块,用于验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
处理模块,用于输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
可选地,所述装置还包括:
接收模块,用于接收查询端发送的所述查询请求;或
检测模块,用于检测所述区块链节点的输入接口是否有所述查询请求。
可选地,所述装置还包括:
生成模块,用于根据放票策略,生成所述电子票;
第一写入模块,用于将所述电子票的初始状态信息写入所述区块链中;
确定模块,用于确定所述电子票的状态信息发生改变;
第二写入模块,用于将改变后的状态信息写入所述区块链中。
可选地,所述查找模块用于:根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块链中查找与所述标识信息匹配的历史状态信息。
所属本领域的技术人员应该清楚地了解到,为描述的方便和简洁,上述描述的查询电子票的状态信息的装置的各模块的具体工作过程,可以参考前述方法实施例中对应的过程,此处不再赘述。
另外,上述对查询电子票的状态信息的装置的组成模块进行的划分,仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。并且,各个模块的物理实现也可以有多种方式,本发明对此不做限定。
基于同一发明构思,本公开还提供一种区块链节点。请参考图6,图6是根据一示例性实施例示出的一种区块链节点的框图。如图6所示,该区块链节点600包括:
处理器601、存储器602、通信接口603和通信总线604;所述处理器601、所述存储器602和所述通信接口603通过所述通信总线604完成相互间的通信。
处理器601可能是一个多核中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例 的一个或多个集成电路。
存储器602用于存放程序代码,所述程序代码包括计算机操作指令和网络流图。存储器602可能携带高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。
所述通信接口603,用于实现这些装置之间的连接通信。
所述处理器601执行程序代码,所述程序代码在运行时用于实现图3或图4所示的方法。
本发明实施例还提供一种区块链网络,所述区块链网络包括多个区块链节点。每个区块链节点可参照上述对图6的说明,此处不再赘述。
在本申请所提供的几个实施例中,应该理解到,所公开的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机 可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储数据的介质。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。

Claims (13)

  1. 一种查询电子票的状态信息的方法,其特征在于,所述方法应用于区块链网络中的区块链节点,所述区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,所述方法包括:
    获得查询请求,所述查询请求用于查询电子票的历史状态信息;
    响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信息;
    输出所述电子票的历史状态信息。
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
    输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    接收查询端发送的所述查询请求;或
    检测所述区块链节点的输入接口是否有所述查询请求。
  4. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    根据放票策略,生成所述电子票;
    将所述电子票的初始状态信息写入所述区块链中;
    确定所述电子票的状态信息发生改变;
    将改变后的状态信息写入所述区块链中。
  5. 根据权利要求1所述的方法,其特征在于,响应于所述查询请求,从所述区块链节点所存储的区块链中查找所述电子票的历史状态信息,包括:
    根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块链中查找与所述标识信息匹配的历史状态信息。
  6. 一种查询电子票的状态信息的装置,其特征在于,应用于区块链网络中的区块链节点,所述区块链节点存储有由多个区块组成的区块链,每个区块用于存储信息,所述区块链是由所述区块链网络中所有区块链节点共同参与维护的分布式数据库,所述装置包括:
    获得模块,用于获得查询请求,所述查询请求用于查询电子票的历史状态信息;
    查找模块,用于响应于所述查询请求,从所述区块链中查找所述电子票的历史状态信息;
    输出模块,用于输出所述电子票的历史状态信息。
  7. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    验证模块,用于验证所述电子票的历史状态信息与所述查询请求表征的状态信息是否匹配;
    处理模块,用于输出验证结果或将所述验证结果发送给查询端,所述验证结果用于提示所述查询请求表征的状态信息是否可信。
  8. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    接收模块,用于接收查询端发送的所述查询请求;或
    检测模块,用于检测所述区块链节点的输入接口是否有所述查询请求。
  9. 根据权利要求6所述的装置,其特征在于,所述装置还包括:
    生成模块,用于根据放票策略,生成所述电子票;
    第一写入模块,用于将所述电子票的初始状态信息写入所述区块链中;
    确定模块,用于确定所述电子票的状态信息发生改变;
    第二写入模块,用于将改变后的状态信息写入所述区块链中。
  10. 根据权利要求6所述的装置,其特征在于,所述查找模块用于:根据所述查询请求携带的用于标识所述电子票的标识信息,从所述区块链中查找与所述标识信息匹配的历史状态信息。
  11. 一种区块链节点,其特征在于,所述区块链节点包括:
    处理器、通信接口、存储器和通信总线;所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;
    所述存储器用于存储应用程序;
    所述处理器用于执行所述应用程序以实现权利要求1至5任一项所述的方法。
  12. 一种区块链网络,其特征在于,所述区块链网络包括多个区块链节点,每个区块链节点是如权利要求11所述的节点。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储计算机程序,所述计算机程序包括用于执行权利要求1至5任一项所述的方法的指令。
PCT/CN2016/111856 2016-12-23 2016-12-23 查询电子票的状态信息的方法、装置及区块链节点 WO2018112945A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2016/111856 WO2018112945A1 (zh) 2016-12-23 2016-12-23 查询电子票的状态信息的方法、装置及区块链节点
CN201680002695.4A CN107077682A (zh) 2016-12-23 2016-12-23 查询电子票的状态信息的方法、装置及区块链节点

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/111856 WO2018112945A1 (zh) 2016-12-23 2016-12-23 查询电子票的状态信息的方法、装置及区块链节点

Publications (1)

Publication Number Publication Date
WO2018112945A1 true WO2018112945A1 (zh) 2018-06-28

Family

ID=59624189

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/111856 WO2018112945A1 (zh) 2016-12-23 2016-12-23 查询电子票的状态信息的方法、装置及区块链节点

Country Status (2)

Country Link
CN (1) CN107077682A (zh)
WO (1) WO2018112945A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961030A (zh) * 2018-08-15 2018-12-07 腾讯科技(深圳)有限公司 关于电子票据的数据处理方法、装置、系统、介质和设备
CN109542888A (zh) * 2018-12-03 2019-03-29 百度在线网络技术(北京)有限公司 区块链的数据修改和同步方法、装置、设备及存储介质
CN110866816A (zh) * 2019-11-19 2020-03-06 腾讯科技(深圳)有限公司 一种基于区块链网络的数据处理方法、装置及存储介质
CN111144958A (zh) * 2018-11-06 2020-05-12 航天信息股份有限公司 基于区块链的电子发票开具方法、装置及系统
CN112711565A (zh) * 2019-10-25 2021-04-27 航天信息股份有限公司 一种基于区块链的票单管理方法、系统、装置及存储介质
CN112714095A (zh) * 2019-10-25 2021-04-27 航天信息股份有限公司 一种基于区块链的发票管理方法、装置及计算机设备

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109886703A (zh) * 2017-12-04 2019-06-14 北京红马传媒文化发展有限公司 电子票务信息处理方法、装置及电子票务系统
CN107943996B (zh) * 2017-12-04 2020-06-30 四川长虹电器股份有限公司 一种基于区块链的学历查询方法及装置
US10715323B2 (en) 2017-12-29 2020-07-14 Ebay Inc. Traceable key block-chain ledger
US10896418B2 (en) 2017-12-29 2021-01-19 Ebay Inc. Secure management of data files using a blockchain
CN110322028A (zh) * 2018-03-29 2019-10-11 北京红马传媒文化发展有限公司 资源管理方法、装置及电子设备
CN108805590A (zh) * 2018-06-20 2018-11-13 佛山科学技术学院 一种基于区块链的农产品追溯系统
CN110400188B (zh) * 2018-08-16 2021-08-13 深圳市智税链科技有限公司 电子票据生成方法、装置、存储介质和计算机设备
CN109191272B (zh) * 2018-08-17 2023-04-07 深圳市智税链科技有限公司 关于电子票据的数据处理方法、装置、存储介质和设备
CN109087024B (zh) * 2018-08-28 2023-07-04 深圳市智税链科技有限公司 关于电子票据的数据处理方法、装置、存储介质和设备
CN109255084B (zh) * 2018-08-28 2023-04-25 深圳市智税链科技有限公司 电子票据查询方法、装置、存储介质和计算机设备
US11301452B2 (en) 2018-10-09 2022-04-12 Ebay, Inc. Storing and verification of derivative work data on blockchain with original work data
CN109493194B (zh) * 2018-12-22 2023-09-05 复旦大学 一种基于区块链的影院售票系统和实施方法
CN110019326A (zh) * 2018-12-25 2019-07-16 阿里巴巴集团控股有限公司 基于区块链的发票真伪验证方法及装置和电子设备
CN109903058B (zh) * 2019-02-21 2021-05-18 中国联合网络通信集团有限公司 一种基于区块链的养卡识别方法和装置
CN110135848A (zh) * 2019-05-23 2019-08-16 北京亿生生网络科技有限公司 基于区块链的兑换券管理方法及装置
CN110472012A (zh) * 2019-07-19 2019-11-19 深圳市中农易讯信息技术有限公司 一种区块链敏感词处理方法、装置、存储介质及设备
CN110532324B (zh) * 2019-09-05 2023-10-03 腾讯科技(深圳)有限公司 基于区块链的公告信息展示方法、装置、设备及存储介质
CN110830549A (zh) * 2019-09-24 2020-02-21 北京海益同展信息科技有限公司 一种获取业务信息的方法、装置、电子设备及存储介质
CN110599211A (zh) * 2019-09-27 2019-12-20 腾讯科技(深圳)有限公司 一种票务信息处理方法、装置及计算机设备
CN112583870B (zh) * 2019-09-29 2022-09-09 比亚迪股份有限公司 售检票系统及其控制方法
CN110909044A (zh) * 2019-11-15 2020-03-24 腾讯科技(深圳)有限公司 一种基于区块链网络的数据处理方法及装置
CN112926974B (zh) * 2019-12-06 2024-02-13 环球数科集团有限公司 一种基于分布式账本原理的可离线票防伪方法
CN111835863B (zh) * 2020-07-23 2023-04-18 度小满科技(北京)有限公司 电子资源处理方法、装置、设备及存储介质
CN115796903B (zh) * 2023-02-07 2023-12-26 中国民航信息网络股份有限公司 一种基于区块链的机票处理方法、装置及平台

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546195A (zh) * 2009-05-20 2009-09-30 乔超 一种防倒票的票务系统及方法
CN102279982A (zh) * 2010-06-09 2011-12-14 北京红马传媒文化发展有限公司 验票系统以及验票方法
CN105844505A (zh) * 2016-03-17 2016-08-10 深圳市新世纪启航科技开发有限公司 一种通过区块链技术进行数字货币交易的方法
CN105913174A (zh) * 2016-04-07 2016-08-31 彭军红 一种基于区块链的彩票发行方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608588A (zh) * 2016-01-04 2016-05-25 布比(北京)网络技术有限公司 一种溯源记录处理的方法及装置
CN105975868A (zh) * 2016-04-29 2016-09-28 杭州云象网络技术有限公司 一种基于区块链的证据保全方法及装置
CN106055597B (zh) * 2016-05-24 2022-05-20 布比(北京)网络技术有限公司 数字交易系统、及用于其的账户信息查询方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101546195A (zh) * 2009-05-20 2009-09-30 乔超 一种防倒票的票务系统及方法
CN102279982A (zh) * 2010-06-09 2011-12-14 北京红马传媒文化发展有限公司 验票系统以及验票方法
CN105844505A (zh) * 2016-03-17 2016-08-10 深圳市新世纪启航科技开发有限公司 一种通过区块链技术进行数字货币交易的方法
CN105913174A (zh) * 2016-04-07 2016-08-31 彭军红 一种基于区块链的彩票发行方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
APPLICATION RESEARCH ON BLOCK CHAIN TECHNOLOGY IN FIELD OF NEGOTIABLE INSTRUMENT P2P, 28 January 2016 (2016-01-28), pages 1 - 6, Retrieved from the Internet <URL:http://www.wanbizu.com/blockchain/201601286431.html> *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961030A (zh) * 2018-08-15 2018-12-07 腾讯科技(深圳)有限公司 关于电子票据的数据处理方法、装置、系统、介质和设备
CN111144958A (zh) * 2018-11-06 2020-05-12 航天信息股份有限公司 基于区块链的电子发票开具方法、装置及系统
CN111144958B (zh) * 2018-11-06 2023-07-14 航天信息股份有限公司 基于区块链的电子发票开具方法、装置及系统
CN109542888A (zh) * 2018-12-03 2019-03-29 百度在线网络技术(北京)有限公司 区块链的数据修改和同步方法、装置、设备及存储介质
CN112711565A (zh) * 2019-10-25 2021-04-27 航天信息股份有限公司 一种基于区块链的票单管理方法、系统、装置及存储介质
CN112714095A (zh) * 2019-10-25 2021-04-27 航天信息股份有限公司 一种基于区块链的发票管理方法、装置及计算机设备
CN112711565B (zh) * 2019-10-25 2024-04-12 航天信息股份有限公司 一种基于区块链的票单管理方法、系统、装置及存储介质
CN110866816A (zh) * 2019-11-19 2020-03-06 腾讯科技(深圳)有限公司 一种基于区块链网络的数据处理方法、装置及存储介质

Also Published As

Publication number Publication date
CN107077682A (zh) 2017-08-18

Similar Documents

Publication Publication Date Title
WO2018112945A1 (zh) 查询电子票的状态信息的方法、装置及区块链节点
US10977626B2 (en) Semi-private blockchain virtual currency exchange systems
CN109711858B (zh) 经由区块链防止欺诈性礼品卡的方法和系统
US12001906B2 (en) Tracking and authentication of asset via distributed ledger
US10872330B2 (en) Enhancing probabilistic signals indicative of unauthorized access to stored value cards by routing the cards to geographically distinct users
CN108768665A (zh) 区块链生成方法、装置、计算机设备以及存储介质
US20210125181A1 (en) Low-latency approximation of combinatorial optimization of residual amounts when allocating large collections of stored value cards
US20220164791A1 (en) Method for distributing collectables ownership based on blockchain networks and online transaction server using the same
US11304059B2 (en) Techniques for determining authenticity of an item
CN109146573A (zh) 基于区块链的商品积分方法及其装置、区块链节点
US10685348B2 (en) System and method for secured tax refund for cross border transactions with mobile device wallet application
CN110046900A (zh) 基于区块链的发票作废方法和装置、电子设备
CN115190455B (zh) 车载电子标签设备的检测及数据处理方法、系统和设备
KR102136976B1 (ko) 토큰화된 모바일 상품권 서비스 방법 및 이를 이용한 서비스 제공 장치
CN108537065A (zh) 征信信息处理方法
US20150317635A1 (en) Electronic gesture-based signatures
CN105283892A (zh) 用于提供安全电子商务交易的方法
RU2322692C1 (ru) Способ идентификации и учета движения маркированных объектов и информационная система для его осуществления
US20150073985A1 (en) Selectively Using Degree Confidence for Image Validation to Authorize Transactions
KR20190132098A (ko) 거래 시스템을 위한 전자 장치 및 전자 시스템
JP2003271883A (ja) 電子チケットを有する記録媒体、電子チケットを有する情報処理装置、電子チケット検証装置、電子チケット処理システム及び電子チケット処理方法
WO2018013458A1 (en) Low-latency approximation of combination optimization of residual amounts when allocating large collections of stored value cards
TWI765158B (zh) 認證管理系統
US20230298064A1 (en) Systems and methods for facilitating redemption of unique digital asset utility
JP5458790B2 (ja) 販売可否管理装置および方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16924472

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/10/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 16924472

Country of ref document: EP

Kind code of ref document: A1