CN106407192A - Seat data processing method and device, and seat data querying method and device - Google Patents

Seat data processing method and device, and seat data querying method and device Download PDF

Info

Publication number
CN106407192A
CN106407192A CN201510448200.8A CN201510448200A CN106407192A CN 106407192 A CN106407192 A CN 106407192A CN 201510448200 A CN201510448200 A CN 201510448200A CN 106407192 A CN106407192 A CN 106407192A
Authority
CN
China
Prior art keywords
seat
occupied
cache
data
server
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201510448200.8A
Other languages
Chinese (zh)
Other versions
CN106407192B (en
Inventor
李鸿杰
林海林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510448200.8A priority Critical patent/CN106407192B/en
Publication of CN106407192A publication Critical patent/CN106407192A/en
Application granted granted Critical
Publication of CN106407192B publication Critical patent/CN106407192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • 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
    • G06Q10/00Administration; Management
    • G06Q10/02Reservations, e.g. for tickets, services or events

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a seat data processing method and device, and a seat data querying method and device. The seat data processing method includes: receiving an occupied seat querying request sent by a user side; responding to the occupied seat querying request, and detecting whether a condition that data is cached in an occupied seat cache and the valid date of the cached data is not out of date is met or not; reading an occupied seat data set from the occupied seat cache if so, and returning the occupied seat data set to the user side; and fetching an occupied seat data set from a third part seat data server so as to return the occupied seat data set to the user side if not, and updating the occupied seat cache and the valid date according to the fetched occupied seat data set. The seat data processing method and device and the seat data querying method and device can decrease the load of the third party seat data server, and then lower the downtime risk.

Description

Seat data processing method and device and seat data query method and device
Technical Field
The invention relates to the field of online seat management, in particular to a seat data processing method and device and a seat data query method and device.
Background
Currently, a movie ticket purchasing application may be installed on a user terminal, through which the user may connect to an application server, or the user may access the application server through a browser. The user terminal can further acquire and view information such as the schedule of the movie and seat sales conditions from the application server.
However, currently, the user terminal obtains the seat sales situation from the application server, and the application server needs to pull the data of the sold seat from the third-party seat data server in real time to provide the data to the user terminal. The fact that data are pulled from the third-party seat data server in real time can ensure that the pulled data are the newest and the most accurate, but the pressure of the third-party seat data server is increased, and the downtime risk is increased.
Disclosure of Invention
Therefore, it is necessary to provide a seat data processing method and device, and a seat data query method and device, for solving the technical problem that the pressure of a third-party seat data server is increased by pulling data from the third-party seat data server in real time at present.
A method of seat data processing, the method comprising:
receiving an occupied seat query request initiated by a user side;
in response to the occupied seat query request, detecting whether a condition is satisfied: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
if yes, reading an occupied seat data set from the occupied seat cache, and returning the read occupied seat data set to the user side;
if not, pulling the occupied seat data set from the third-party seat data server to return to the user side, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
A seat data processing apparatus, the apparatus comprising:
the request receiving module is used for receiving an occupied seat query request initiated by a user side;
a detection module for detecting whether a condition is satisfied in response to the occupied seat query request: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
the first processing module is used for reading the occupied seat data set from the occupied seat cache if the condition is met, and returning the read occupied seat data set to the user side;
and the second processing module is used for pulling the occupied seat data set from the third-party seat data server to return to the user side if the condition is not met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
According to the seat data processing method and device, the occupied seat data set is cached in the occupied seat cache, and the corresponding validity period is recorded. After receiving an occupied seat query request initiated by a user terminal, if data is cached in an occupied seat cache and the validity period of the cached data is not expired, it is indicated that the cached data in the occupied seat cache is available, and at this time, the data does not need to be pulled from a third-party seat data server, but the cached occupied seat data set is directly read and returned to the user terminal. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and then the data is pulled from the third-party seat data server and returned to the user side. And updating the occupied seat cache and the validity period so that data can not be pulled from the third-party seat data server within the validity period. Therefore, the occupied seat data set and the corresponding validity period are cached, the dependency on a third-party seat data server is reduced, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
A seat data query method, the method comprising:
drawing a seat base map;
sending an occupied seat query request to a cache server, so that the cache server detects whether the conditions are met: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
receiving an occupied seat data set read from the occupied seat cache returned by the cache server when the condition is detected to be met, or receiving an occupied seat data set pulled from a third-party seat data server returned by the cache server when the condition is detected to be not met; the occupied seat cache and the validity period are updated according to the pulled occupied seat data set;
-marking occupied seats in the seat bottom map according to the received occupied seat data sets.
A seat data querying device, the device comprising:
the seat bottom map drawing module is used for drawing a seat bottom map;
an occupied seat query request sending module, configured to send an occupied seat query request to a cache server, so that the cache server detects whether a condition is met: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
an occupied seat data set receiving module, configured to receive an occupied seat data set read from the occupied seat cache returned by the cache server when it is detected that the condition is satisfied, or receive an occupied seat data set pulled from a third-party seat data server returned by the cache server when it is detected that the condition is not satisfied; the occupied seat cache and the validity period are updated according to the pulled occupied seat data set;
a marking module for marking occupied seats in the seat base map according to the received occupied seat data set.
According to the seat data query method and device, the occupied seat data set is cached in the occupied seat cache, and the corresponding validity period is recorded. After receiving the occupied seat query request, the cache server indicates that the data cached in the occupied seat cache is available if the data is cached in the occupied seat cache and the validity period of the cached data is not expired, and at this time, the cache server does not need to pull the data from a third-party seat data server, but directly reads the cached occupied seat data set and returns the data set. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and the cache server pulls the data from the third-party seat data server. And updating the occupied seat cache and the validity period, so that the cache server can not pull data from the third-party seat data server in the validity period. Therefore, the dependency of the cache server on the third-party seat data server is reduced through caching the occupied seat data set and the corresponding valid period, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
Drawings
FIG. 1 is an environmental diagram of an online seat management system in one embodiment;
fig. 2 is a schematic diagram illustrating an internal structure of a user terminal according to an embodiment;
FIG. 3 is a diagram illustrating an internal architecture of a cache server in one embodiment;
FIG. 4 is a flow diagram that illustrates a method for seat data processing in accordance with one embodiment;
FIG. 5 is a schematic view of a bottom view of a seat in one embodiment;
FIG. 6 is a schematic flow chart of the steps of occupying a seat in one embodiment;
FIG. 7 is a schematic view of a seat bottom with occupied seats marked in one embodiment;
FIG. 8 is a schematic flow chart illustrating the steps of occupying a seat in another embodiment;
FIG. 9 is a flowchart illustrating a method for processing seat data in a specific application scenario;
FIG. 10 is a schematic flow chart diagram illustrating a method for seat data query in one embodiment;
FIG. 11 is a schematic flow chart showing steps of occupying a seat in still another embodiment;
FIG. 12 is a block diagram of a seat data processing apparatus in one embodiment;
FIG. 13 is a block diagram of a seat data query device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, in one embodiment, an online seat management system 100 is provided that includes a client 102 and a cache server 104, the cache server 104 being connectable to a third party seat data server 110. The third party is a third party with respect to both the client 102 and the cache server 104, and the third party seat data server 110 is the source of seat data. The seats may be seats of movie theaters, restaurants, opera halls or stadiums, and the seat data is data representing physical seats.
As shown in fig. 2, in one embodiment, a user terminal 102 is provided, which includes a processor, a non-volatile storage medium, an internal memory, a network interface, a display screen, and an input device connected through a system bus. Wherein the processor has a computing function and a function of controlling the operation of the user terminal 102, and the processor is configured to execute a seat data query method. The non-volatile storage medium includes at least one of a magnetic storage medium, an optical storage medium, and a flash memory storage medium, and stores an operating system and a seat data querying device for implementing a seat data querying method. The internal memory is used to provide a cache for the operation of the operating system and the seat data query device, and the network interface is used to connect to the network to the cache server 104 and the third party seat data server 110. The display screen includes any one of a liquid crystal display screen, an electronic ink display screen, and a Light Emitting Diode (LED) display screen. The input device comprises at least one of a keyboard, a mouse, a touch pad, a touch layer overlapped with the display screen and the like, and the touch layer and the display screen are overlapped to form the touch screen. The user terminal 102 may be a mobile terminal or a desktop computer, and the mobile terminal includes a mobile phone, a tablet computer, and a Point of Sale (POS) machine.
As shown in fig. 3, in one embodiment, a cache server 104 is provided that includes a processor, a non-volatile storage medium, an internal memory, and a network interface connected by a system bus. Wherein the processor has computing functionality and functionality to control the operation of the cache server 104, the processor being configured to perform a method of processing seating data. The nonvolatile storage medium comprises at least one of a magnetic storage medium, an optical storage medium and a flash memory type storage medium, the nonvolatile storage medium stores an operating system and a seat data processing device, and the seat data processing device is used for realizing a seat data processing method. The internal memory is used to provide a cache for the operation of the operating system and the seat data query device, and the network interface is used to connect to the network and further to the user terminal 102 and the third party seat data server 110.
As shown in fig. 4, in one embodiment, a seat data processing method is provided, and this embodiment is illustrated by applying the method to the cache server 104 in fig. 1 and fig. 3. The method specifically comprises the following steps:
step 402, receiving an occupied seat query request initiated by a user terminal.
Specifically, the seats may be seats of various venues, where the venues refer to venues where seats are provided, such as movie theaters, restaurants, operas, stadium viewing tables, open venues, classrooms, and the like. The seat data is data indicating a physical seat. If the seat is sold, the sold seat is an occupied seat; if the seat is scheduled, the scheduled seat can also be an occupied seat; if a seat can be sold or reserved, the seat is an unoccupied seat. The occupied seat query request is used to query the occupied seat data set.
The user side can run a booking application or a browser, and the booking application can be a movie ticket purchasing application or a restaurant booking application and the like. The user side can draw the seat base map through the booking application or the browser, and in order to mark occupied seats in the seat base map, a data set of the occupied seats needs to be obtained from the cache server. The seat bottom map refers to an image describing the seat situation, and as shown in fig. 5, each seat in the seat bottom map has a unique seat identifier for distinguishing different seats. The client side can send occupied seat query requests to the cache server to be received by the cache server immediately after the seat base map is drawn or in response to user operation.
In one embodiment, the occupied seat query request may carry an identification of a venue in which the seat is located, and the occupied seat query request is used to request an occupied seat data set corresponding to the identification of the venue. The occupied seat query request may not carry the identifier of the site where the seat is located, and is used to request the occupied seat data set corresponding to the identifier of the default site.
Step 404, responding to the occupied seat inquiry request, detecting whether the conditions are met: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired; if the condition is satisfied, step 406 is executed, and if the condition is not satisfied, step 408 is executed.
Specifically, the cache server responds to the occupied seat inquiry request and detects whether a predefined condition is met, wherein the condition is as follows: data is cached in the occupied seat cache and the validity period of the cached data is not expired. In one embodiment, the occupied seat query request may also carry user login information, and the cache server may check the user login information, and detect whether the above condition is satisfied after the check is passed.
The cache server is provided with an occupied seat cache for caching occupied seat data; each occupied seat data has a corresponding seat identification, and each occupied seat data cached in the occupied seat cache forms an occupied seat data set. The occupied seat data in the occupied seat cache can be stored corresponding to the identification of the place where the seat is located.
The occupied seat data cached in the occupied seat cache correspondingly records a validity period, which may be an absolute time period or a time length relative to an update time point, for example, the validity period may be 13: 00 to 13: 15 or, for example, within 10 minutes from the point in time when occupied seat data is buffered in the occupied seat buffer. The occupied seat data cached in the occupied seat cache may correspond to different validity periods, respectively, or may correspond to the same validity period. Corresponding to the same validity period, is convenient for management and maintenance.
The cache server acquires the current time when detecting whether the validity period of the cached data is expired, and if the current time is within the validity period, the cache server judges that the data is not expired; if the current time exceeds the validity period, the expiration is determined. When the cache server detects whether the conditions are met, if data are cached in the occupied seat cache and the validity period of the cached data is not expired, judging that the conditions are met; if the occupied seat cache has no cached data or the cached data is expired although the data is cached, the condition is judged not to be met.
Step 406, reading the occupied seat data set from the occupied seat cache, and returning the read occupied seat data set to the user side.
Specifically, when detecting that the above condition is satisfied, specifically when detecting that data is cached in the occupied seat cache and the validity period of the cached data is not expired, the cache server reads the occupied seat data set specified by the occupied seat query request from the occupied seat cache, and further returns the read occupied seat data set to the user side.
In one embodiment, the cache server may extract the identifier of the place where the seat is located from the occupied seat query request, so as to read the occupied seat data set corresponding to the identifier of the place where the seat is located from the occupied seat cache, and return the read occupied seat data set to the user side.
And step 408, pulling the occupied seat data set from the third-party seat data server to return to the user side, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
Specifically, when the cache server detects that the condition is not met, specifically, when it detects that data is not cached in the occupied seat cache, or when the validity period of the cached data is expired although the data is cached, the cache server pulls the occupied seat data set from the third-party seat data server and returns the occupied seat data set to the user side, specifically, the cache server pulls the occupied seat data set corresponding to the identifier of the place where the seat is located from the third-party seat data server and returns the occupied seat data set to the user side.
And when the cache server updates the occupied seat cache and the validity period according to the pulled occupied seat data set, the cache server specifically replaces the cached data in the occupied seat cache with the pulled occupied seat data set and resets the validity period. When the validity period is reset, if the validity period is the absolute time period, the starting point of the absolute time period is reset to be the current time; and if the validity period is the time length relative to the updating time point, resetting the updating time point.
According to the seat data processing method, the occupied seat data set is cached in the occupied seat cache, and the corresponding validity period is recorded. After receiving an occupied seat query request initiated by a user terminal, if data is cached in an occupied seat cache and the validity period of the cached data is not expired, it is indicated that the cached data in the occupied seat cache is available, and at this time, the data does not need to be pulled from a third-party seat data server, but the cached occupied seat data set is directly read and returned to the user terminal. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and then the data is pulled from the third-party seat data server and returned to the user side. And updating the occupied seat cache and the validity period so that data can not be pulled from the third-party seat data server within the validity period. Therefore, the occupied seat data set and the corresponding validity period are cached, the dependency on a third-party seat data server is reduced, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
As shown in fig. 6, in an embodiment, the seat data processing method further includes a step of occupying a seat, specifically including the following steps:
step 602, receiving a seat occupancy result sent by the third party seat data server according to the seat occupancy request with the seat identifier initiated by the user terminal.
Specifically, after receiving the occupied seat data set, the user side marks the occupied seats in the seat base map according to the received occupied seat data set, and the unmarked seats are the unoccupied seats. The user end can mark the occupied seats in a different color or shape than the unoccupied seats when marking the occupied seats, for example, referring to fig. 7, the unoccupied seats are not filled or are filled with white, while the occupied seats are filled with black or gray.
And the user terminal acquires a seat selection command for triggering unoccupied seats in the seat bottom map, so that the unoccupied seat identification is selected from the seat bottom map according to the seat selection command. Wherein the seat selection instruction can be triggered by a user clicking or touching an unoccupied seat in the seat bottom map.
The user terminal generates a seat occupation request carrying the selected seat identification, sends the seat occupation request to a third-party seat data server, and can also forward the seat occupation request to the third-party seat data server through the cache server.
And the third-party seat data server executes the operation of occupying the seat corresponding to the seat identification according to the seat occupying request. Occupancy seats may also be referred to herein as locked seats. Specifically, if the seat data corresponding to the seat identifier is unoccupied seat data, a seat occupancy result with a successful seat occupancy is generated and returned to the cache server; if the seat data corresponding to the seat identification is occupied seat data, generating a seat occupation result which fails to be occupied due to the occupied seat and returning the seat occupation result to the cache server; if the seat occupation request is processed with errors, a seat occupation result of the failed occupation due to the processing errors can be returned to the cache server.
The various seat occupancy results can be represented by different symbols, for example, 0 can represent successful seat occupancy, 1 can represent failed occupancy due to occupied seats, and 2 can represent failed occupancy due to processing errors.
Step 604, if the seat occupancy result is that the seat occupancy is successful, the occupied seat data corresponding to the seat identifier is added to the occupied seat data set cached in the occupied seat cache.
Specifically, if the cache server receives a seat occupancy result that the seat occupancy is successful, which indicates that the third-party seat data server has updated the unoccupied seat data corresponding to the seat identifier to the occupied seat data, the occupied seat data corresponding to the seat identifier may be directly added to the occupied seat data set cached in the occupied seat cache, so as to update the occupied seat cache.
Step 606, if the seat occupancy result is that the occupancy fails because the seat is occupied, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period.
Specifically, if the cache server receives a seat occupancy result that the seat occupancy has failed due to the occupied seat, it indicates that the seat corresponding to the seat identifier is occupied before the seat occupancy request is received on the third-party seat data server, and the seat cannot be occupied again, so that the seat occupancy result that the seat occupancy has failed due to the occupied seat is generated. This indicates that the occupied data on the cache server and the third-party seat data server are inconsistent, and at this time, the occupied seat data set needs to be pulled from the third-party seat data server, and the occupied seat cache is updated according to the pulled occupied seat data set and the expiration date is reset.
And then, the cache server generates an occupation result notification according to the seat occupation result and feeds the occupation result notification back to the user side, so that the user side displays a corresponding prompt according to the occupation result notification. If the cache server returns a notification of successful seat occupancy to the user terminal, the user terminal may display a prompt of successful seat booking, where the prompt may further include a seat identifier and/or seat related information, the seat identifier may be, for example, a seat number of a seat in a movie theater, and the seat related information may be, for example, information such as a name and time of a movie being shown. If the cache server returns a notice of the occupation failure due to the occupied seat to the user side, the user side can display a prompt of the reservation failure, and the prompt can also display the specific reason of the reservation failure, such as the seat is sold.
In this embodiment, the client requests the third-party seat data server to occupy the seat, and when the third-party seat data server successfully occupies the seat, the cache server adds the occupied seat data corresponding to the seat identifier to the occupied seat data set cached in the occupied seat cache, so that the number of times of pulling data from the third-party seat data server can be reduced, and the pressure of the third-party seat data server can be reduced. And when the occupied seat result is that the occupied seat fails to be occupied because the seat is occupied, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period, so that the consistency of the occupied seat data set on the cache server and the third-party seat data server can be ensured, and the accuracy of subsequent processing of the occupied seat query request is further ensured.
As shown in fig. 8, in an embodiment, the seat data processing method further includes a step of occupying a seat according to another embodiment, specifically including the following steps:
step 802, receiving a seat occupancy result sent by the third party seat data server according to the seat occupancy request with the seat identifier initiated by the user terminal.
Step 804, if the seat occupancy result is that the seat occupancy is successful or the occupancy fails because the seat is occupied, the occupied seat data corresponding to the seat identifier is added to the occupied seat data set cached in the occupied seat cache.
Specifically, no matter the seat occupancy result is that the seat occupancy succeeds or the occupancy fails because the seat is already occupied, the cache server adds occupied seat data corresponding to the seat identifier to the occupied seat data set cached in the occupied seat cache, so as to update the occupied seat cache.
In this embodiment, when the occupied seat cache is updated after the third-party seat data server of the user processes the seat occupancy request, no matter whether the seat occupancy result is that the seat occupancy succeeds or the occupancy fails because the seat is occupied, data does not need to be pulled from the third-party seat data server, the pressure of the third-party seat data server can be further reduced, and the downtime risk is further reduced.
In one embodiment, the seat data processing method further comprises: adjusting the length of the validity period according to the seat-related popularity; the validity period duration is inversely related to the hotness.
Specifically, the popularity refers to quantitative data of the popularity of an object, and the popularity of the seat-related object refers to the popularity of the seat-related object, such as the popularity of the area where the seat is located, the popularity of the theater where the seat is located, the popularity of the movie corresponding to the seat, and the like. The movie corresponding to the seat refers to the movie played in the movie hall where the seat is located in a specific time period.
The validity period duration refers to a length of time from a validity period start time point to a validity period end time point of the validity period. The validity period is inversely related to the hotness, meaning that the validity period decreases with increasing hotness and increases with decreasing hotness. This negative correlation may be discrete or continuous. The discrete is that a plurality of specific hot statuses correspond to specific validity duration, for example, the hot statuses are divided into a plurality of intervals, and the hot statuses in the same interval correspond to the same validity duration. Continuous is a continuous functional relationship with a negative correlation between the validity period duration and the popularity. The negative correlation relationship may be implemented as a linear function or a non-linear function of the negative correlation.
In this embodiment, when the popularity is high, the requirement for the user to occupy the seat is high, and the effective period duration needs to be shortened to ensure the cache hit rate. When the popularity is low, the requirement that the user occupies the seat is low, the effective period duration can be properly prolonged, the times of pulling data from the third-party seat data server are reduced, and the pressure of the third-party seat data server is further reduced.
In one embodiment, the seat data processing method further comprises: adjusting the effective period duration according to at least one of the popularity of the region where the seat is located, the popularity of the cinema where the seat is located and the popularity of the movie corresponding to the seat; the validity period duration is inversely related to the hotness.
Specifically, in this embodiment, the seat-related popularity includes at least one of the popularity of the area where the seat is located, the popularity of the theater where the seat is located, and the popularity of the movie corresponding to the seat. The regions include cities, districts in the cities or regions divided by other dividing modes. For example, the corresponding valid periods of the cinemas in the Nanshan region of Shenzhen City and the Dragon sentry region of Shenzhen City are different. Hot areas, theaters or movies may be appropriate for reducing the expiration time, and non-hot areas, theaters or movies may be appropriate for increasing the expiration time. The adjusted validity period duration may be limited to not exceed a preset multiple of the default validity period duration.
In one embodiment, the seat data processing method further comprises: adjusting the effective period duration according to the time interval between the current time and the preset occurrence time of the event corresponding to the seat; the duration of the validity period is positively correlated with the time interval.
Specifically, the event corresponding to the seat includes showing of a movie, starting of a show, or a sports competition, and the like, and the event corresponding to the seat is generally related to the type of the venue where the seat is located. The occurrence of the event is preset occurrence time and is not an emergency event. The cache server obtains the current time and the preset occurrence time of the event corresponding to the seat, so that the time interval between the current time and the preset occurrence time is calculated, and the effective period duration is adjusted according to the time interval.
The validity duration is positively correlated with the time interval, specifically, the validity duration decreases with the decrease of the time interval and increases with the increase of the time interval. This positive correlation may be discrete or continuous. The positive correlation may be implemented as a linear function or a non-linear function of the positive correlation.
In this embodiment, when the time interval is large, there is still much time for the distance event, and the demand that the user occupies the seat is low, so that the validity period duration can be properly increased, and the number of times of pulling data from the third-party seat data server is reduced, thereby reducing the pressure of the third-party seat data server. When the time interval is small and the time is closer to the time occurrence time, the requirement of the user for occupying the seat is higher, and the effective period duration needs to be shortened to ensure the cache hit rate.
In one embodiment, the seat data processing method further comprises: adjusting the effective period duration according to the time interval between the current time and the showing time of the film corresponding to the seat; the duration of the validity period is positively correlated with the time interval.
Specifically, in this embodiment, the event corresponding to the seat is that the movie corresponding to the seat is shown, and the corresponding preset occurrence time is the showing time. And dynamically adjusting the effective period duration according to the time interval between the current time and the showing time of the movie corresponding to the seat so as to balance the cache hit rate and the pressure of the third-party seat data server.
As shown in fig. 9, in a specific application scenario, a seat data processing method specifically includes the following steps:
and step 902, drawing a seat base map at the user end.
In step 904, the user sends a query request for occupied seats to the cache server.
In step 906, the cache server responds to the occupied seat query request, and detects whether the conditions are met: data is cached in the occupied seat cache and the validity period of the cached data is not expired. If the condition is satisfied, go to step 908; if the condition is not satisfied, go to step 910.
In step 908, the cache server reads the occupied seat data set from the occupied seat cache.
In step 910, the cache server pulls the occupied seat data set from the third party seat data server.
In step 912, the cache server returns the read or pulled occupied seat data set to the client.
In step 914, the user end marks the occupied seats in the seat base map according to the received occupied seat data sets.
In step 916, the user end obtains the seat selection instruction, and selects the unoccupied seat identifier from the seat base map according to the seat selection instruction.
Step 918, the user end sends a seat occupation request carrying the seat identification to the third-party seat data server.
And step 920, the third party seat data server sends the seat occupation result to the cache server according to the seat occupation request.
And step 922, the cache server updates the occupied seat cache according to the seat occupation result.
Specifically, if the seat occupancy result is that the seat occupancy is successful, occupied seat data corresponding to the seat identifier is added to the occupied seat data set cached in the occupied seat cache; if the seat occupation result is that the seat is occupied and the occupation fails, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period.
If the seat occupation result is that the seat is occupied and the occupation fails, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period, and the occupied seat cache and the validity period can be replaced by: if the seat occupation result is that the seat is occupied and the occupation fails, the occupied seat data corresponding to the seat identification is added to the occupied seat data set cached in the occupied seat cache.
Step 924, the cache server returns an occupation result notification to the user side.
In step 926, the user end displays a corresponding prompt for the occupancy result notification.
As shown in fig. 10, in one embodiment, a seat data query method is provided, and this embodiment is illustrated by applying the method to the user terminal 102 in fig. 1 and fig. 2. The method specifically comprises the following steps:
step 1002, drawing a seat bottom map.
Specifically, the user can obtain the seat base map and draw the seat base map. A particular client may obtain the seat base map from a local, cache server, or third party seat data server. The user side can run a booking application or a browser, and the booking application can be a movie ticket purchasing application or a restaurant booking application and the like. The user end can draw the seat base map through the booking application or the browser. The seat bottom map refers to an image describing the seat situation, and as shown in fig. 5, each seat in the seat bottom map has a unique seat identifier for distinguishing different seats.
The seats may be seats in various venues, where venues refer to venues where seats are provided, such as movie theaters, restaurants, operas, stadium viewing tables, open venues, classrooms, and the like. The seat data is data indicating a physical seat. If the seat is sold, the sold seat is an occupied seat; if the seat is scheduled, the scheduled seat can also be an occupied seat; if a seat can be sold or reserved, the seat is an unoccupied seat.
Step 1004, sending occupied seat query request to the cache server, so that the cache server detects whether the conditions are met: data is cached in the occupied seat cache and the validity period of the cached data is not expired.
Specifically, the client may send the occupied seat query request to the cache server to be received by the cache server immediately after the seat base map is drawn or in response to a user operation.
In one embodiment, the occupied seat query request may carry an identification of a venue in which the seat is located, and the occupied seat query request is used to request an occupied seat data set corresponding to the identification of the venue. The occupied seat query request may not carry the identifier of the site where the seat is located, and is used to request the occupied seat data set corresponding to the identifier of the default site.
Specifically, the cache server responds to the occupied seat inquiry request and detects whether a predefined condition is met, wherein the condition is as follows: data is cached in the occupied seat cache and the validity period of the cached data is not expired. In one embodiment, the occupied seat query request may also carry user login information, and the cache server may check the user login information, and detect whether the above condition is satisfied after the check is passed.
The cache server is provided with an occupied seat cache for caching occupied seat data; each occupied seat data has a corresponding seat identification, and each occupied seat data cached in the occupied seat cache forms an occupied seat data set. The occupied seat data in the occupied seat cache can be stored corresponding to the identification of the place where the seat is located.
The occupied seat data cached in the occupied seat cache correspondingly records a validity period, which may be an absolute time period or a time length relative to an update time point, for example, the validity period may be 13: 00 to 13: 15 or, for example, within 10 minutes from the point in time when occupied seat data is buffered in the occupied seat buffer. The occupied seat data cached in the occupied seat cache may correspond to different validity periods, respectively, or may correspond to the same validity period. Corresponding to the same validity period, is convenient for management and maintenance.
The cache server acquires the current time when detecting whether the validity period of the cached data is expired, and if the current time is within the validity period, the cache server judges that the data is not expired; if the current time exceeds the validity period, the expiration is determined. When the cache server detects whether the conditions are met, if data are cached in the occupied seat cache and the validity period of the cached data is not expired, judging that the conditions are met; if the occupied seat cache has no cached data or the cached data is expired although the data is cached, the condition is judged not to be met.
Step 1006, receiving an occupied seat data set read from an occupied seat cache returned by the cache server when detecting that the condition is satisfied; or receiving an occupied seat data set pulled from a third-party seat data server returned by the cache server when the condition is detected not to be met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
Specifically, when detecting that the above condition is satisfied, specifically when detecting that data is cached in the occupied seat cache and the validity period of the cached data is not expired, the cache server reads the occupied seat data set specified by the occupied seat query request from the occupied seat cache, and further returns the read occupied seat data set to the user side.
In one embodiment, the occupied seat query request carries an identifier of a place where the seat is located, and the user terminal may receive an occupied seat data set corresponding to the identifier of the place where the seat is located, which is read from the occupied seat cache and returned by the cache server.
When the cache server detects that the condition is not met, specifically when the cache server detects that the data is not cached in the occupied seat cache, or when the validity period of the cached data is expired although the data is cached, the occupied seat data set is pulled from the third-party seat data server and returned to the user side, and specifically, the occupied seat data set corresponding to the identifier of the place where the seat is located can be pulled from the third-party seat data server and returned to the user side.
And when the cache server updates the occupied seat cache and the validity period according to the pulled occupied seat data set, the cache server specifically replaces the cached data in the occupied seat cache with the pulled occupied seat data set and resets the validity period. When the validity period is reset, if the validity period is the absolute time period, the starting point of the absolute time period is reset to be the current time; and if the validity period is the time length relative to the updating time point, resetting the updating time point.
In step 1008, occupied seats are marked in the seat bottom map according to the received occupied seat data sets.
Specifically, after receiving the occupied seat data set, the user side marks the occupied seats in the seat base map according to the received occupied seat data set, and the unmarked seats are the unoccupied seats. The user end can mark the occupied seats in a different color or shape than the unoccupied seats when marking the occupied seats, for example, referring to fig. 7, the unoccupied seats are not filled or are filled with white, while the occupied seats are filled with black or gray.
According to the seat data query method, the occupied seat data set is cached in the occupied seat cache, and the corresponding validity period is recorded. After receiving the occupied seat query request, the cache server indicates that the data cached in the occupied seat cache is available if the data is cached in the occupied seat cache and the validity period of the cached data is not expired, and at this time, the cache server does not need to pull the data from a third-party seat data server, but directly reads the cached occupied seat data set and returns the data set. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and the cache server pulls the data from the third-party seat data server. And updating the occupied seat cache and the validity period, so that the cache server can not pull data from the third-party seat data server in the validity period. Therefore, the dependency of the cache server on the third-party seat data server is reduced through caching the occupied seat data set and the corresponding valid period, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
As shown in fig. 11, in one embodiment, the seat data query method further includes the step of occupying a seat, specifically including the following steps:
in step 1102, a seat selection instruction is obtained.
Specifically, the user side obtains a seat selection triggering instruction for unoccupied seats in the seat bottom map. Wherein the seat selection instruction can be triggered by a user clicking or touching an unoccupied seat in the seat bottom map.
In step 1104, unoccupied seat identifiers are selected from the seat base map according to the seat selection command. Wherein the unoccupied seat identification refers to the seat identification of the unoccupied seat.
Step 1106, sending a seat occupation request carrying a seat identifier to the third-party seat data server, so that the third-party seat data server sends a seat occupation result to the cache server according to the seat occupation request, so that the cache server updates the occupied seat cache according to the seat occupation result.
The user terminal generates a seat occupation request carrying the selected seat identification, sends the seat occupation request to a third-party seat data server, and can also forward the seat occupation request to the third-party seat data server through the cache server.
And the third-party seat data server executes the operation of occupying the seat corresponding to the seat identification according to the seat occupying request. Specifically, if the seat data corresponding to the seat identifier is unoccupied seat data, a seat occupancy result with a successful seat occupancy is generated and returned to the cache server; if the seat data corresponding to the seat identification is occupied seat data, generating a seat occupation result which fails to be occupied due to the occupied seat and returning the seat occupation result to the cache server; if the seat occupation request is processed with errors, a seat occupation result of the failed occupation due to the processing errors can be returned to the cache server.
And sending a seat occupation request carrying a seat identification to a third-party seat data server, so that the third-party seat data server sends a seat occupation result to the cache server according to the seat occupation request, and in the process, a payment process can be realized.
The various seat occupancy results can be represented by different symbols, for example, 0 can represent successful seat occupancy, 1 can represent failed occupancy due to occupied seats, and 2 can represent failed occupancy due to processing errors.
If the seat occupation result is that the seat occupation is successful, adding occupied seat data corresponding to the seat identification in an occupied seat data set cached in an occupied seat cache; if the seat occupation result is that the seat is occupied and the occupation fails, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period.
Specifically, if the cache server receives a seat occupancy result that the seat occupancy is successful, which indicates that the third-party seat data server has updated the unoccupied seat data corresponding to the seat identifier to the occupied seat data, the occupied seat data corresponding to the seat identifier may be directly added to the occupied seat data set cached in the occupied seat cache, so as to update the occupied seat cache.
If the cache server receives the seat occupation result that the seat occupation fails due to the occupied seat, it indicates that the seat corresponding to the seat identifier is occupied before the seat occupation request is received on the third-party seat data server, and the seat cannot be occupied again, so that the seat occupation result that the seat occupation fails due to the occupied seat can be generated. This indicates that the occupied data on the cache server and the third-party seat data server are inconsistent, and at this time, the occupied seat data set needs to be pulled from the third-party seat data server, and the occupied seat cache is updated according to the pulled occupied seat data set and the expiration date is reset.
In one embodiment, if the seat occupancy result is that the occupied seat fails to be occupied because the seat is occupied, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period, which may be replaced by: if the seat occupation result is that the seat is occupied and the occupation fails, the occupied seat data corresponding to the seat identification is added to the occupied seat data set cached in the occupied seat cache.
Step 1108, receiving an occupancy result notification returned by the cache server according to the seat occupancy result and displaying a corresponding prompt.
Specifically, the cache server generates an occupation result notification according to the seat occupation result, and feeds the occupation result notification back to the user side, so that the user side displays a corresponding prompt according to the occupation result notification. If the cache server returns a notification of successful seat occupancy to the user terminal, the user terminal may display a prompt of successful seat booking, where the prompt may further include a seat identifier and/or seat related information, the seat identifier may be, for example, a seat number of a seat in a movie theater, and the seat related information may be, for example, information such as a name and time of a movie being shown. If the cache server returns a notice of the occupation failure due to the occupied seat to the user side, the user side can display a prompt of the reservation failure, and the prompt can also display the specific reason of the reservation failure, such as the seat is sold.
In this embodiment, the client requests the third-party seat data server to occupy the seat, and when the third-party seat data server successfully occupies the seat, the cache server adds the occupied seat data corresponding to the seat identifier to the occupied seat data set cached in the occupied seat cache, so that the number of times of pulling data from the third-party seat data server can be reduced, and the pressure of the third-party seat data server can be reduced. And when the occupied seat result is that the occupied seat fails to be occupied because the seat is occupied, the occupied seat data set is pulled from the third-party seat data server to update the occupied seat cache and the validity period, so that the consistency of the occupied seat data set on the cache server and the third-party seat data server can be ensured, and the accuracy of subsequent processing of the occupied seat query request is further ensured.
In one embodiment, the cache server may adjust the expiration time duration based on seat-related popularity; the validity period duration is inversely related to the hotness.
In one embodiment, the cache server may adjust the validity period according to at least one of the popularity of the area where the seat is located, the popularity of the theater where the seat is located, and the popularity of the movie corresponding to the seat; the validity period duration is inversely related to the hotness.
In one embodiment, the cache server may adjust the validity period duration according to a time interval between the current time and a preset occurrence time of an event corresponding to the seat; the duration of the validity period is positively correlated with the time interval.
In one embodiment, the cache server may adjust the validity period duration according to the time interval between the current time and the showing time of the movie corresponding to the seat; the duration of the validity period is positively correlated with the time interval.
As shown in FIG. 12, in one embodiment, a seat data processing apparatus 1200 is provided, comprising: a request receiving module 1201, a detecting module 1202, a first processing module 1203 and a second processing module 1204.
A request receiving module 1201, configured to receive an occupied seat query request initiated by a user end.
A detection module 1202 for detecting whether a condition is satisfied in response to an occupied seat query request: data is cached in the occupied seat cache and the validity period of the cached data is not expired.
The first processing module 1203 is configured to, if the condition is met, read the occupied seat data set from the occupied seat cache, and return the read occupied seat data set to the user side.
The second processing module 1204 is configured to, if the condition is not met, pull the occupied seat data set from the third-party seat data server to return to the user side, and update the occupied seat cache and the validity period according to the pulled occupied seat data set.
The seat data processing apparatus 1200 buffers the occupied seat data set in the occupied seat buffer and records the corresponding validity period. After receiving an occupied seat query request initiated by a user terminal, if data is cached in an occupied seat cache and the validity period of the cached data is not expired, it is indicated that the cached data in the occupied seat cache is available, and at this time, the data does not need to be pulled from a third-party seat data server, but the cached occupied seat data set is directly read and returned to the user terminal. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and then the data is pulled from the third-party seat data server and returned to the user side. And updating the occupied seat cache and the validity period so that data can not be pulled from the third-party seat data server within the validity period. Therefore, the occupied seat data set and the corresponding validity period are cached, the dependency on a third-party seat data server is reduced, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
In one embodiment, the seat data processing apparatus 1200 further comprises: a seat occupancy results receiving module 1205, a first updating module 1206a, and a second updating module 1206 b.
A seat occupation result receiving module 1205, configured to receive a seat occupation result sent by the third party seat data server according to a seat occupation request carrying a seat identifier and initiated by the user side;
a first updating module 1206a, configured to add occupied seat data corresponding to the seat identifier to an occupied seat data set cached in an occupied seat cache when the seat occupancy result is that the seat occupancy is successful;
the second updating module 1206b is configured to pull the occupied seat data set from the third-party seat data server to update the occupied seat cache and the validity period when the seat occupancy result is that the occupancy fails due to the occupied seat.
In one embodiment, the seat data processing apparatus 1200 further comprises: a seat occupancy results receiving module 1205 and an updating module 1206.
The seat occupancy result receiving module 1205 is configured to receive a seat occupancy result sent by the third party seat data server according to the seat occupancy request with the seat identifier and initiated by the user side.
The updating module 1206 is configured to add occupied seat data corresponding to the seat identifier to the occupied seat data set cached in the occupied seat cache when the seat occupancy result is that the seat occupancy succeeds or the occupancy fails because the seat is occupied.
In one embodiment, the seat data processing apparatus 1200 further comprises: the valid period duration adjusting module 1207 is configured to adjust the valid period duration according to at least one of the popularity of the area where the seat is located, the popularity of the theater where the seat is located, and the popularity of the movie corresponding to the seat; the validity period duration is inversely related to the hotness.
In one embodiment, the validity period duration adjusting module 1207 is configured to adjust the validity period duration according to a time interval between the current time and the showing time of the movie corresponding to the seat; the duration of the validity period is positively correlated with the time interval.
As shown in fig. 13, in one embodiment, there is provided a seat data query apparatus 1300, including: a seat floor mapping module 1301, an occupied seat query request sending module 1302, an occupied seat data set receiving module 1303, and a marking module 1304.
And a seat bottom drawing module 1301 for drawing a seat bottom.
An occupied seat query request sending module 1302, configured to send an occupied seat query request to the cache server, so that the cache server detects whether a condition is met: data is cached in the occupied seat cache and the validity period of the cached data is not expired.
An occupied seat data set receiving module 1303, configured to receive an occupied seat data set read from an occupied seat cache returned by the cache server when it is detected that the condition is met; or receiving an occupied seat data set pulled from a third-party seat data server returned by the cache server when the condition is detected not to be met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set;
a marking module 1304 for marking occupied seats in the seat base map based on the received occupied seat data sets.
The seat data query device 1300 buffers the occupied seat data set in the occupied seat cache and records the corresponding validity period. After receiving the occupied seat query request, the cache server indicates that the data cached in the occupied seat cache is available if the data is cached in the occupied seat cache and the validity period of the cached data is not expired, and at this time, the cache server does not need to pull the data from a third-party seat data server, but directly reads the cached occupied seat data set and returns the data set. If the occupied seat cache does not have data or the validity period of the cached data is expired, the data cached in the occupied seat cache is not available, and the cache server pulls the data from the third-party seat data server. And updating the occupied seat cache and the validity period, so that the cache server can not pull data from the third-party seat data server in the validity period. Therefore, the dependency of the cache server on the third-party seat data server is reduced through caching the occupied seat data set and the corresponding valid period, the times of pulling data from the third-party seat data server are reduced, the pressure of the third-party seat data server is reduced, and the downtime risk is further reduced.
In one embodiment, the seat data query device 1300 further comprises: a seat selection instruction acquisition module 1305, a selection module 1306, a seat occupancy request transmission module 1307, and an occupancy result notification processing module 1308.
A seat selection instruction obtaining module 1305, configured to obtain a seat selection instruction.
A selection module 1306 is configured to select an unoccupied seat identifier from the seat map according to the seat selection command.
A seat occupation request sending module 1307, configured to send a seat occupation request carrying a seat identifier to a third-party seat data server, so that the third-party seat data server sends a seat occupation result to the cache server according to the seat occupation request, so that the cache server updates the occupied seat cache according to the seat occupation result.
The occupancy result notification processing module 1308 is configured to receive an occupancy result notification returned by the cache server according to the seat occupancy result, and display a corresponding prompt.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (13)

1. A method of seat data processing, the method comprising:
receiving an occupied seat query request initiated by a user side;
in response to the occupied seat query request, detecting whether a condition is satisfied: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
if yes, reading an occupied seat data set from the occupied seat cache, and returning the read occupied seat data set to the user side;
if not, pulling the occupied seat data set from the third-party seat data server to return to the user side, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
2. The method of claim 1, further comprising:
receiving a seat occupation result sent by a third party seat data server according to a seat occupation request which is initiated by a user side and carries a seat identification;
if the seat occupation result is that the seat occupation is successful, adding occupied seat data corresponding to the seat identification in an occupied seat data set cached in the occupied seat cache;
and if the seat occupation result is that the occupation fails because the seat is occupied, pulling the occupied seat data set from a third-party seat data server to update the occupied seat cache and the validity period.
3. The method of claim 1, further comprising:
receiving a seat occupation result sent by a third party seat data server according to a seat occupation request which is initiated by a user side and carries a seat identification;
and if the seat occupation result is that the seat occupation is successful or the seat occupation is failed because the seat is occupied, adding the occupied seat data corresponding to the seat identification in the occupied seat data set cached in the occupied seat cache.
4. The method of claim 1, further comprising:
adjusting the effective period duration according to at least one of the popularity of the region where the seat is located, the popularity of the cinema where the seat is located and the popularity of the movie corresponding to the seat; the validity period duration is inversely related to the popularity.
5. The method of claim 1, further comprising:
adjusting the duration of the validity period according to the time interval between the current time and the showing time of the film corresponding to the seat; the validity period duration is positively correlated with the time interval.
6. A seat data query method, comprising:
drawing a seat base map;
sending an occupied seat query request to a cache server, so that the cache server detects whether the conditions are met: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
receiving an occupied seat data set read from the occupied seat cache returned by the cache server upon detecting that the condition is satisfied; or receiving an occupied seat data set pulled from a third-party seat data server returned by the cache server when the condition is detected not to be met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set;
-marking occupied seats in the seat bottom map according to the received occupied seat data sets.
7. The method of claim 6, further comprising:
acquiring a seat selection instruction;
selecting unoccupied seat identifiers from the seat base map according to the seat selection instruction;
sending a seat occupation request carrying the seat identification to a third-party seat data server, so that the third-party seat data server sends a seat occupation result to the cache server according to the seat occupation request, and the cache server updates the occupied seat cache according to the seat occupation result;
and receiving an occupation result notification returned by the cache server according to the seat occupation result and displaying a corresponding prompt.
8. A seat data processing apparatus, comprising:
the request receiving module is used for receiving an occupied seat query request initiated by a user side;
a detection module for detecting whether a condition is satisfied in response to the occupied seat query request: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
the first processing module is used for reading the occupied seat data set from the occupied seat cache if the condition is met, and returning the read occupied seat data set to the user side;
and the second processing module is used for pulling the occupied seat data set from the third-party seat data server to return to the user side if the condition is not met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set.
9. The apparatus of claim 8, further comprising:
the seat occupation result receiving module is used for receiving a seat occupation result sent by the third-party seat data server according to a seat occupation request which is initiated by the user side and carries the seat identification;
a first updating module, configured to add occupied seat data corresponding to the seat identifier to an occupied seat data set cached in the occupied seat cache when the seat occupancy result is that seat occupancy is successful;
and the second updating module is used for pulling the occupied seat data set from a third-party seat data server to update the occupied seat cache and the validity period when the seat occupation result is that the seat is occupied and the occupation fails.
10. The apparatus of claim 8, further comprising:
the seat occupation result receiving module is used for receiving a seat occupation result sent by the third-party seat data server according to a seat occupation request which is initiated by the user side and carries the seat identification;
and the updating module is used for increasing occupied seat data corresponding to the seat identification in an occupied seat data set cached in the occupied seat cache when the seat occupancy result is that the seat occupancy succeeds or the seat occupancy fails due to the occupied seat.
11. The apparatus of claim 8, further comprising: the effective period duration adjusting module is used for adjusting the effective period duration according to at least one of the popularity of the region where the seat is located, the popularity of the cinema where the seat is located and the popularity of the movie corresponding to the seat; the expiration time duration is inversely related to the popularity; or,
the effective duration adjusting module is used for adjusting the effective duration according to the time interval between the current time and the showing time of the film corresponding to the seat; the validity period duration is positively correlated with the time interval.
12. A seat data querying device, the device comprising:
the seat bottom map drawing module is used for drawing a seat bottom map;
an occupied seat query request sending module, configured to send an occupied seat query request to a cache server, so that the cache server detects whether a condition is met: the occupied seat cache has data cached in the occupied seat cache, and the validity period of the cached data is not expired;
an occupied seat data set receiving module, configured to receive an occupied seat data set read from the occupied seat cache returned by the cache server when it is detected that the condition is satisfied; or receiving an occupied seat data set pulled from a third-party seat data server returned by the cache server when the condition is detected not to be met, and updating the occupied seat cache and the validity period according to the pulled occupied seat data set;
a marking module for marking occupied seats in the seat base map according to the received occupied seat data set.
13. The apparatus of claim 12, further comprising:
the seat selection instruction acquisition module is used for acquiring a seat selection instruction;
the selection module is used for selecting unoccupied seat identifiers from the seat base map according to the seat selection instruction;
a seat occupation request sending module, configured to send a seat occupation request carrying the seat identifier to a third-party seat data server, so that the third-party seat data server sends a seat occupation result to the cache server according to the seat occupation request, and the cache server updates the occupied seat cache according to the seat occupation result;
and the occupancy result notification processing module is used for receiving the occupancy result notification returned by the cache server according to the seat occupancy result and displaying a corresponding prompt.
CN201510448200.8A 2015-07-27 2015-07-27 Seat data processing method and device and seat data query method and device Active CN106407192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510448200.8A CN106407192B (en) 2015-07-27 2015-07-27 Seat data processing method and device and seat data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510448200.8A CN106407192B (en) 2015-07-27 2015-07-27 Seat data processing method and device and seat data query method and device

Publications (2)

Publication Number Publication Date
CN106407192A true CN106407192A (en) 2017-02-15
CN106407192B CN106407192B (en) 2020-11-13

Family

ID=58008546

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510448200.8A Active CN106407192B (en) 2015-07-27 2015-07-27 Seat data processing method and device and seat data query method and device

Country Status (1)

Country Link
CN (1) CN106407192B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932556A (en) * 2017-05-27 2018-12-04 北京微影时代科技有限公司 A kind of method and device of locking seat
CN109582894A (en) * 2018-11-30 2019-04-05 上海哔哩哔哩科技有限公司 Seat locking and booking method, apparatus and storage medium based on caching
CN110324259A (en) * 2018-03-30 2019-10-11 北京红马传媒文化发展有限公司 Seat data transmission method and device, seat image rendering method and device
CN112200333A (en) * 2020-10-16 2021-01-08 江苏小梦科技有限公司 Seat sharing mode based on Internet software platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882988A (en) * 2011-07-13 2013-01-16 上海聚力传媒技术有限公司 Method, device and equipment for acquiring address information of resource information
CN103279873A (en) * 2013-06-21 2013-09-04 大连万达集团股份有限公司 Theatre chain self-service ticket purchasing system
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating
US20140086046A1 (en) * 2010-05-26 2014-03-27 Sprint Communications Company L.P. Quality of service optimizer for mobile device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140086046A1 (en) * 2010-05-26 2014-03-27 Sprint Communications Company L.P. Quality of service optimizer for mobile device
CN102882988A (en) * 2011-07-13 2013-01-16 上海聚力传媒技术有限公司 Method, device and equipment for acquiring address information of resource information
CN103279873A (en) * 2013-06-21 2013-09-04 大连万达集团股份有限公司 Theatre chain self-service ticket purchasing system
CN103530349A (en) * 2013-09-30 2014-01-22 乐视致新电子科技(天津)有限公司 Method and equipment for cache updating

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108932556A (en) * 2017-05-27 2018-12-04 北京微影时代科技有限公司 A kind of method and device of locking seat
CN110324259A (en) * 2018-03-30 2019-10-11 北京红马传媒文化发展有限公司 Seat data transmission method and device, seat image rendering method and device
CN109582894A (en) * 2018-11-30 2019-04-05 上海哔哩哔哩科技有限公司 Seat locking and booking method, apparatus and storage medium based on caching
CN112200333A (en) * 2020-10-16 2021-01-08 江苏小梦科技有限公司 Seat sharing mode based on Internet software platform

Also Published As

Publication number Publication date
CN106407192B (en) 2020-11-13

Similar Documents

Publication Publication Date Title
US20220027948A1 (en) Methods, systems, and media for presenting advertisements relevant to nearby users on a public display device
CN106407192B (en) Seat data processing method and device and seat data query method and device
JP6267789B2 (en) Adaptive embedding of visual advertising content in media content
US11604565B2 (en) Personalization of map content via an application programming interface
US9271137B2 (en) Orchestrating user devices to form images at venue events
US20160062612A1 (en) Information Access Technique
US20120030596A1 (en) User interface
CN105915599B (en) Interface display method and device
US20200053071A1 (en) Backend service integration
US10154114B2 (en) Delivery apparatus, delivery method, terminal device, and non-transitory computer readable storage medium
CN106462878B (en) Methods, systems, and media for presenting advertisements during background presentation of media content
US20140232702A1 (en) Method, system, and device for selecting and displaying information on a mobile digital display device
US8942921B1 (en) Displaying dynamic entertainment information on marquees in street-level imagery
US8963952B2 (en) Display control system, corrected display information output method and computer readable medium
US10476944B2 (en) Backend service integration
US20190272561A1 (en) Digital Signage Control Apparatus And Digital Signage Control Program
KR102539212B1 (en) Method, system and non-transitory computer-readable recording medium for managing augmented reality interface related to contents provided on digital signage
US20170116964A1 (en) Method, system, and device for selecting and displaying information on a mobile digital display device
JP6749967B2 (en) Information processing apparatus, method and program
KR101921663B1 (en) Notification information display method and device using the same
KR102573553B1 (en) Method, device and system for providing digital information display advertising content service using display device capable of communication
JP2020187517A (en) Information processing system, information processing method and information processing program
JP5851574B2 (en) Facility information providing apparatus, facility information providing method, and facility information providing program
JP6592925B2 (en) Service presentation terminal, service presentation system, service presentation method and program
JP7185337B2 (en) Information processing device, program and information processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant