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
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-...
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, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com