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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap