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

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

Example Embodiment

[0062] Example 1

[0063] In this embodiment, the process of the cache-based seat locking method is as follows: figure 1 As shown in the figure, we can see that we first establish a seat cache set for each session-area seat in the Redis cache system, which is marked as cache A (type set), and the specific records in this cache A are under this area All locked seats and the effective time of the seats. At the same time, a user cache is created for each user, which is recorded as cache B (key-value type), which is used to store the seats selected by the user, and stitch multiple seats into A field. For example, if the user (id: 123) chooses two seats 1-1 and 1-2, 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, not only the position of the seat is recorded in the cache A, but also the time (timestamp) of the current seat lock and the set lock time (in this embodiment, 2min or 120s) with.

[0064] In this embod...

Example Embodiment

[0068] Example 2

[0069] This embodiment specifically proposes a seat ticket purchase method using the seat locking method in embodiment 1. The complete process is as follows: figure 2 As shown, it can be seen from the figure that the specific process of the seat ticket purchase method in this embodiment is as follows:

[0070] First, the user selects the seat he wants to buy the ticket in the seat purchase system and submits it. At this time, the system will first determine whether the user has locked the seat before purchasing the ticket. If it has not been done, 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 it is the same, it means that the seat is locked successfully and enter the subsequent order step. If it is inconsistent, update the seat cache set and user cache and release After the user previously locked the seat, he enters the s...

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 Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products