Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Seat locking and ticket buying method and device based on cache and storage medium

A seat and cache technology, applied in other database retrieval, network data browsing optimization, network data retrieval and other directions, can solve problems such as affecting the user's experience of selecting seats and purchasing tickets, increasing interface time, and database hangs, etc., to improve storage. and interface lookup speed, redundant data volume reduction, response time reduction effect

Pending Publication Date: 2019-04-05
SHANGHAI HODE INFORMATION TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] (1) The interface takes a long time. It may take about 200ms for the user to lock the seat, and the front end will always be on the loading interface, which affects the user experience of seat selection and ticket purchase;
[0005] (2) When a large number of users operate the same seat, they will update the same row in the database, which will affect the performance of the database due to row locks, and may cause the database to hang up in severe cases;
[0006] (3) A large amount of useless seat-locked data will be redundant in the data, wasting the space of the database
[0007] (4) If you want to limit the maximum number of seats locked by a user, you need to query all the seats locked by the user in the database, and the interface time consumption will further increase

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Seat locking and ticket buying method and device based on cache and storage medium
  • Seat locking and ticket buying method and device based on cache and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0063] In this embodiment, the process of the cache-based seat locking method is as follows figure 1 As shown, it can be seen from the figure that we first create a seat cache set for each session-area seat in the Redis cache system, which is recorded as cache A (type is set), and this cache A specifically records this area. All locked seats and the valid time of the seats, at the same time, build a user cache for each user, which is recorded as cache B (type is key-value), used to store the seats selected by the user, and splicing multiple seats into a field. For example, the user (id: 123) chooses 1-1 and 1-2 seats, then the record in cache A is {1-1:timestamp+120,1-2:timestamp+120}, and the record in cache B It is {1-1,1-2}, that is, the position of the seat is recorded in the cache A, and the time between the current lock seat time (timestamp) and the set lock duration (2min or 120s in this embodiment) is recorded at the same time. and.

[0064] In this embodiment, it i...

Embodiment 2

[0069] In this embodiment, a seat ticketing method that applies the seat locking method in Embodiment 1 is specifically proposed. The complete process is as follows figure 2 As shown, as can be seen from the figure, the specific process of the seat ticketing method in the present embodiment is as follows:

[0070] First, the user selects the seat he wants to purchase in the seat ticketing system and submits it. At this time, the system will first determine whether the user has locked the seat before buying the ticket. If not, it will enter the seat locking process. , if it has been done, it will judge whether the currently submitted seat position is consistent with the seat position locked by the user before. If they are consistent, it means that the seat lock is successful, and enter the subsequent ordering step. If they are inconsistent, update the seat cache set and user cache, release After the user locked the seat before, enter the seat locking process.

[0071] The so-...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a seat locking and ticket buying method and device based on caching and a storage medium, and belongs to the technical field of the Internet. The locking method comprises thefollowing steps: reading locking information input by a user; Updating the seat cache set according to the locking information; After the seat cache set is updated successfully, updating a user cachecorresponding to the user; The ticket buying method comprises the steps of reading seat ticket buying information input by a user; When the seat ticket buying information is consistent with the locking information stored in the cache system, returning to successful ticket buying; The device comprises a processor and a memory, a computer program is stored in the memory, and when the computer program is executed by the processor, the locking method is achieved; A computer program is stored in the medium, and when the computer program is executed by the processor, the locking method is achieved.Compared with the prior art, the method has the advantages of high interface response speed, data space saving and the like.

Description

technical field [0001] The present invention relates to the field of Internet technology, in particular to the field of Internet ticket purchase and seat selection, and specifically refers to a cache-based seat locking and ticket purchase method, device and storage medium. Background technique [0002] With the rapid development of Internet technology, buying tickets online has become a normal life. When buying tickets online, it is often possible to select a seat in advance and lock it, that is, lock the seat. There are two scenarios for the lock seat, one is the lock seat when placing an order, which is usually implemented based on the database; the other is the temporary lock seat before placing an order, which refers to the process from selecting a seat to generating an order before placing an order. Between pages, the seat is temporarily locked for the user. [0003] For the second lock seat scenario, the existing lock seat is mainly realized through the database, and...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/957
Inventor 徐军刘湛邱亮
Owner SHANGHAI HODE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products