Reservation service processing method and device, program product and storage medium

By using internal cache and cache components in the online reservation service system to accelerate query response and using message queues to process peak traffic, the existing system's lag and interrupt problems during peak periods are solved, and service efficiency and user experience are improved.

CN119809000APending Publication Date: 2025-04-11DIGITAL GUANGDONG NETWORK CONSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411871593.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During peak periods, the existing online reservation service system frequently obtains or operates information from the database, resulting in system lag, service interruption and excessive reservations, which seriously affects the user experience and service efficiency.

Method used

By using internal cache and cache components to quickly respond to user query requests, reduce waiting time, and send appointment logging information to the message queue, the server can better cope with instantaneous high traffic during peak periods. At the same time, the cache component is used to store the execution progress of the appointment service, display it to users, and reduce the pressure on the service database.

Benefits of technology

It improves the efficiency and stability of appointment services, avoids problems such as system lag, service interruption and excessive appointments, improves user experience, and increases the transparency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119809000A_ABST
    Figure CN119809000A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a reservation service processing method and device, a program product and a storage medium, and the method comprises the steps: receiving a query service request sent by a user, and determining a query service inventory list in an internal cache, a cache component or a service database in response to the query service request; receiving an appointment service request sent by a user based on query of the service inventory list, and generating an appointment record message and appointment service list information based on the cache component or the service database in response to the appointment service request; sending the reservation record information to a preset message queue, and executing a reservation service according to the message queue; and obtaining the execution progress of the reservation service from the cache component, and displaying the execution progress to the user. According to the method, the query request of the user can be quickly responded, and the waiting time is shortened. The method can better deal with instantaneous high flow generated when a large number of users reserve services at the same time, and improves the stability and response speed of the reservation services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a reservation service processing method, device, program product and storage medium. Background Art

[0002] In the current digital age, the development of information technology has brought revolutionary changes to all walks of life. For example, in appointment technology, users used to need to go to the site where the appointment service is provided to make an appointment, but now they can make an appointment online directly on the appointment service platform.

[0003] Most of the current online appointment services are to query the relevant information of the service in the appointment service database after receiving the user's appointment request, including the number of appointments for the service and the detailed information of each service that can be booked. Users can make service appointments based on the relevant information of the service. This method requires continuous query of service information from the database, and the amount of service information stored in the database is generally large. As a result, this method will cause problems such as system freezes or service interruptions during the appointment service process, which seriously affects the user experience and service efficiency. For example, in the medical diagnosis appointment service, during non-peak service hours, the system may be able to stably query medical diagnosis information, generate appointment orders, and delete scheduled services in the database to provide users with medical diagnosis appointment services. However, during the peak vaccination period, frequent acquisition or operation of medical diagnosis information from the database will cause system freezes, service interruptions, and even overbooking. These problems seriously affect the user experience and even require a lot of manual intervention to maintain basic operations, wasting human and material resources. Summary of the invention

[0004] The embodiments of the present invention provide a reservation service processing method, device, program product and storage medium, which can improve the efficiency and stability of the reservation service, avoid problems such as freeze, service interruption or over-reservation, and improve user experience.

[0005] In a first aspect, an embodiment of the present invention provides a reservation service processing method, including:

[0006] Receiving a query service request sent by a user, and in response to the query service request, determining a query service inventory list in an internal cache, a cache component, or a service database; a first duration for storing data in the internal cache is less than a second duration for storing data in the cache component;

[0007] Receiving a reservation service request sent by the user based on the query service inventory list, and generating a reservation record message and reservation service order information based on the cache component or the service database in response to the reservation service request;

[0008] Sending the reservation record information to a preset message queue, and executing the reservation service according to the message queue;

[0009] The execution progress of the reservation service is obtained from the cache component, and the execution progress is displayed to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or a reservation failure.

[0010] In a second aspect, an embodiment of the present invention provides a reservation service processing device, the device comprising:

[0011] An information receiving module, configured to receive a query service request sent by a user, and in response to the query service request, determine a query service inventory list in an internal cache, a cache component, or a service database; a first duration for storing data in the internal cache is less than a second duration for storing data in the cache component;

[0012] An information generation module, configured to receive a reservation service request sent by the user based on the query service inventory list, and generate a reservation record message and reservation service order information based on the cache component or the service database in response to the reservation service request;

[0013] A service execution module, used for sending the reservation record information to a preset message queue and executing the reservation service according to the message queue;

[0014] The information display module is used to obtain the execution progress of the reservation service from the cache component and display the execution progress to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or a reservation failure.

[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a reservation service processing method as described in any one of the embodiments of the present invention is implemented.

[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a reservation service processing method as described in any one of the embodiments of the present invention is implemented.

[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the computer program implements a reservation service processing method as described in any one of the embodiments of the present invention.

[0018] In an embodiment of the present invention, a query service request sent by a user is received, and in response to the query service request, a query service inventory list is determined in an internal cache, a cache component or a service database; the first duration of the data stored in the internal cache is less than the second duration of the data stored in the cache component; a reservation service request sent by the user based on the query service inventory list is received, and in response to the reservation service request, a reservation record message and reservation service order information are generated based on the cache component or the service database; the reservation record information is sent to a pre-set message queue, and the reservation service is executed according to the message queue; the execution progress of the reservation service is obtained from the cache component, and the execution progress is displayed to the user; wherein the execution progress includes the execution result, and the execution result is a reservation success or a reservation failure. The method of the embodiment of the present invention can quickly respond to the user's query request and reduce the waiting time by using the internal cache and the cache component. The reservation record information is sent to the message queue, so that the server can better cope with the instantaneous high traffic generated when a large number of users make reservations for services at the same time, thereby improving the stability and response speed of the reservation service. The cache component is used to store the execution progress of the reservation service, and the execution progress is displayed to the user, which reduces the pressure on the service database, and allows the user to understand the reservation status in time, thereby increasing the transparency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a reservation service processing method provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a structure for determining a query service inventory list provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a structure for sending reservation record information to a message queue provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of the execution reservation service provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of a structure for displaying execution progress to a user provided by an embodiment of the present invention;

[0025] Figure 6 A schematic diagram of a structure in which a reservation platform provided by an embodiment of the present invention provides reservation services to users;

[0026] Figure 7 A schematic diagram of the structure of a reservation service processing device provided by an embodiment of the present invention;

[0027] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0029] Figure 1 The present invention provides a flowchart of a reservation service processing method according to an embodiment of the present invention. The method according to an embodiment of the present invention can improve the efficiency and stability of the reservation service, avoid problems such as freezing, service interruption or overbooking, and improve the user experience. The information collected in the method according to the embodiment of the present invention is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation portals for users to choose to authorize or refuse. The method can be executed by a reservation service processing device provided by an embodiment of the present invention. The device can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a server or computer device carrying a reservation platform, etc. The reservation platform is used to provide users with various online reservation services. Figure 1 , the method may specifically include the following steps:

[0030] Step 101: Receive a query service request sent by a user, and in response to the query service request, determine a query service inventory list in an internal cache, a cache component, or a service database.

[0031] Among them, the query service request is a request sent to the reservation platform when the user needs to make a reservation for a service on the reservation platform. The query service request includes a query service identifier, which is used to mark different services, such as service names. The internal cache is the local cache of the device where the reservation platform is located. The cache component is a middleware or service for managing and storing cache data, which is distributed on multiple nodes. Multiple nodes can share cache data in the cache component, such as Redis cache components and Memcached cache components. The first duration of the internal cache storing data is less than the second duration of the cache component storing data, and the first duration and the second duration are both less than the duration of the service database storing data. Therefore, the speed of accessing data in the internal cache is greater than the speed of accessing data in the cache component, and the speed of accessing data in the cache component is greater than the speed of accessing data in the service database. The query service inventory list is a list of all reservable services corresponding to the service queried by the user. The query service inventory list can reflect information such as the available time and available quantity of the service queried by the user, and the user can make a service reservation based on the query service inventory list. The service database in this solution can be a distributed database or any relational database.

[0032] Specifically, after receiving the query service request, the reservation platform can search for all reservable services corresponding to the query service identifier in the internal cache, cache component or service database according to the query service identifier in the query request, and determine the query service inventory list according to all reservable services. In this solution, optionally, determining the query service inventory list in the internal cache, cache component or service database includes: searching for the query service inventory list corresponding to the service identifier in the internal cache; if the query service inventory list cannot be found in the internal cache, searching for the query service inventory list in the cache component; if the query service inventory list cannot be found in the cache component, determining the query service inventory list in the service database.

[0033] Specifically, the speed of accessing data in the internal cache is greater than the speed of accessing data in the cache component, and the speed of accessing data in the cache component is greater than the speed of accessing data in the database. Therefore, when receiving a query service request, the reservation platform can preferentially search for all the reservable services corresponding to the query service identifier in the internal cache. If the relevant information of the service corresponding to the query service identifier does not exist in the internal cache, it means that the service is queried by the user for the first time, or the duration of the information of the service cached in the internal cache has exceeded the first duration. Further, the reservation platform can immediately search for all the reservable services corresponding to the query service identifier in the cache component. If the relevant information of the service corresponding to the query service identifier does not exist in the cache component, it means that the service is queried by the user for the first time, or the duration of the information of the service cached in the cache component has exceeded the second duration. Further, the reservation platform can directly search for all the reservable services corresponding to the query service identifier in the service database storing all service information, and generate a query service inventory list based on the reservable services, and display the query service inventory list to the user. If all the reservable services corresponding to the query service identifier cannot be found in the service database, it means that the query request sent by the user may be wrong, and the reservation platform can send a prompt message "Please re-enter the reservation service information" to the user.

[0034] In an optional embodiment, after all reservable services corresponding to the query service identifier are queried in the service database, in order to facilitate users who subsequently query the service to quickly obtain the query service inventory list, the reservation platform stores the query service inventory list determined from the service database to the internal cache and cache component; determines the moment when the internal cache receives the query service inventory list as the first moment, and determines the moment when the cache component receives the query service inventory list as the second moment; deletes the query service inventory list in the internal cache at a moment of a first time length after the first moment, and deletes the query service inventory list in the cache component at a moment of a second time length after the second moment.

[0035] Specifically, to ensure the response speed of the internal cache and cache component, when the duration of storing the query service inventory list in the internal cache and cache component reaches the first duration and the second duration respectively, the query service inventory list stored in the internal cache and cache component is deleted in time. Figure 2 A schematic diagram of the structure of determining the query service inventory list provided by an embodiment of the present invention. Figure 2 As shown, the user sends a service query request to the reservation platform. The reservation platform first queries the service inventory list in the internal cache. If the query fails, the service inventory list is searched in the cache component. If the service inventory list is not found in the cache component, the query service inventory list is determined in the service database. Further, the determined query service inventory list is returned to the user.

[0036] Exemplarily, the first duration is 12 seconds and the second duration is 30 seconds. The user needs to make an appointment for medical diagnosis service A on the appointment platform, and the appointment platform opens the appointment service for medical diagnosis service A at 8:00:00 in the morning. The appointment platform receives the query service request sent by the first user at 8:00:01. After receiving the query service request, the appointment platform searches for the inventory list of medical diagnosis service A in the internal cache according to the query service identifier "A". Since the query service request is the first request to query medical diagnosis service A, the inventory list of medical diagnosis service A does not exist in the internal cache. Further, the appointment platform queries the inventory list of medical diagnosis service A in the cache component. Since the query service request is the first request to query medical diagnosis service A, the inventory list of medical diagnosis service A does not exist in the cache component either. Further, the appointment platform searches for all medical diagnosis services A that can be booked in the service database, generates the inventory list of medical diagnosis service A, and displays the inventory list of medical diagnosis service A to the user. After obtaining the inventory list of medical diagnosis service A, the inventory list of medical diagnosis service A is stored in the internal cache and the cache component. Assuming that the reservation platform stores the inventory list of medical diagnosis service A in the internal cache and cache component at 8:00:02, when the reservation platform receives the query service request of medical diagnosis service A before 8:00:14, it can directly and quickly determine the inventory list of medical diagnosis service A from the internal cache. When the first query service request of medical diagnosis service A is received between 8:00:14 and 8:00:32, the inventory list of medical diagnosis service A can be directly determined from the cache component and stored in the internal cache, which will enable the inventory list of medical diagnosis service A to be directly determined from the internal cache within the next 12 seconds.

[0037] In the above steps, after receiving the query request, the internal cache is queried first, which can significantly improve the data access speed, reduce the reservation platform's dependence on remote cache components, and reduce network latency and load. If the query service inventory list is not in the internal cache, querying the cache component first can ensure data consistency and reliability. At the same time, the response speed of the cache component is faster than the response speed of the service database. Therefore, when the query service inventory list cannot be found in the internal cache, searching in the cache component first can also improve the query speed. When the query service inventory list does not exist in both the internal cache and the cache component, query the service database to ensure that the latest data is obtained. Although the query speed of the service database is relatively slow, the service database is the ultimate guarantee of data persistence, ensuring the integrity and accuracy of the queried query service inventory list.

[0038] Step 102: receiving a service reservation request sent by a user based on querying a service inventory list, and generating a reservation record message and service reservation order information based on a cache component or a service database in response to the service reservation request.

[0039] Among them, the reservation service request is sent by the user to the reservation platform according to the query service inventory list, which is used to instruct the reservation platform to make a service reservation. The reservation service request includes a reservation service identifier, and the reservation service identifier is used to mark different reservation services, such as the number of the reservation service. Exemplarily, the query service inventory list includes 10 A medical diagnosis services, and the 10 A medical diagnosis services are numbered from 001 to 010. If the user selects A medical diagnosis service No. 002, the reservation platform can determine that the reservation service identifier is 002 according to the reservation service request. The reservation record message is a notification information generated by the reservation platform according to the reservation service information after the user submits the reservation service request. The reservation service order is a reservation order generated in response to the user's reservation service request, and the reservation service order information includes the reservation service order identifier and the reservation service order status.

[0040] Specifically, after the reservation platform displays the query service list to the user, the user can select a service in the query service list to make a reservation. After the user selects the service, the reservation platform receives the reservation service request sent by the user and determines the reservation service identifier according to the reservation service request. After obtaining the reservation service identifier, the user is made a service reservation in the cache component or service database according to the reservation service identifier, and a reservation record message and reservation service order information are obtained. In this solution, optionally, the reservation record message is generated based on the cache component or service database, including the following steps A1-A3:

[0041] Step A1: searching for the reservation service inventory information corresponding to the reservation service identifier in the cache component. If the reservation service inventory information is found in the cache component, the reservation service inventory information stored in the cache component is updated based on the reservation service identifier.

[0042] Among them, the service inventory information includes the detailed background data of each service stored in the appointment service platform. For example, the service inventory information of medical diagnosis services includes the background data such as the departments of each hospital that provide medical diagnosis services, the number of people undertaken by the departments, and the time when the services can be provided. The cache component adopts a distributed cache. Each distributed node shares the data stored in the cache component, while the internal cache only stores internal data. The appointment service inventory information is the detailed information of the service that the user wants to make an appointment for. Therefore, the background data of each appointment service (appointment service inventory information) will not be stored in the internal cache, and the appointment service inventory information cannot be found in the internal cache.

[0043] In an optional implementation, after receiving the reservation service request sent by the user, the reservation platform can perform basic verification on the reservation service request, including checking whether the reservation service request parameters are legal, such as checking whether the date format is correct and whether the personal information entered by the user is complete. In order to prevent the same user from making multiple reservations in a short period of time or repeated reservations in the same time period, the reservation platform can also check the user's reservation records to ensure that no repeated reservations occur. When the reservation service request passes the basic verification, the reservation platform can search for the reservation service inventory information corresponding to the reservation service identifier in the cache component. If the reservation service inventory information is found in the cache component, the inventory corresponding to the service in the reservation service inventory information is deducted to update the reservation service inventory information stored in the cache component. In this solution, the inventory is deducted by atomic deduction. That is, in a multi-threaded environment, the deduction operation is either all successful or all failed, and no intermediate state will occur. For example, in a medical diagnosis reservation platform, the atomic deduction operation can ensure the accuracy and consistency of the inventory quantity under high concurrency. If the reservation service inventory information is found in the cache component, but the atomic deduction operation fails, it means that the service inventory may have been fully booked in other threads. In this case, the reservation platform can send a prompt message to the user saying "Reservation failed, please try again" so that the user can make a new reservation.

[0044] Step A2: if the reservation service inventory information cannot be found in the cache component, obtain the reservation service inventory information from the service database and store the reservation service inventory information in the cache component; update the reservation service inventory information stored in the cache component based on the reservation service identifier.

[0045] Specifically, if the reservation service inventory information is not found in the cache component, the reservation service library information of the cache component cannot be atomically deducted. In order to ensure the consistency and accuracy of the data, the reservation platform can find the reservation service inventory information in the service database according to the reservation service identifier, and store the reservation service inventory information in the cache component. At the same time, the reservation platform can use a distributed lock to lock the reservation service corresponding to the reservation service identifier in the service database to avoid data inconsistency. A distributed lock is a lock mechanism across multiple computer nodes or processes, which is used to coordinate access to shared resources. This mechanism ensures that only one process or thread can access a specific resource at the same time, thereby avoiding data inconsistency and race conditions. After the reservation service inventory information is stored in the cache component, the reservation service inventory information in the cache component is atomically deducted again according to the reservation service identifier to update the reservation service inventory information stored in the cache component.

[0046] Step A3: Generate a reservation record message according to the reservation service identifier and the reservation service inventory information in the cache component.

[0047] Among them, the reservation record message is a notification message generated by the reservation platform based on the reservation service information after the user submits the reservation service request. The reservation service inventory information in the cache component is atomically deducted, indicating that the service has been "locked" for the user. Furthermore, the reservation platform can generate a reservation record message based on the reservation service identifier, so that the service reservation can be made for the user in a timely manner based on the reservation record message.

[0048] After atomically deducting the reservation service inventory information in the cache component, it has been preliminarily determined that the service corresponding to the reservation service identifier can be successfully reserved for the user. In an optional implementation, after generating the reservation record message, the reservation service order information can be determined based on the reservation service identifier. The reservation service order information includes the reservation service identifier and the reservation service order status, and the reservation service order status is in process, completed, or not scheduled. In this solution, optionally, after generating the reservation service order information, it also includes: storing the reservation service order information in the cache component; obtaining the reservation service order status in real time, and updating the reservation service order information in the cache component according to the reservation service order status.

[0049] Specifically, after obtaining the reservation service order information, the reservation service order information needs to be stored in the cache component so that other distributed nodes can share the reservation service order information. The reservation service order status can reflect the reservation progress of the user's reservation service. If the reservation service order status is in process, it means that the service is being reserved for the user. If the reservation service order status is completed, it means that the service has been successfully reserved for the user. If the reservation service order status is not reserved, it means that the service cannot be successfully reserved for the user. After storing the reservation service order information in the cache component, the reservation platform can obtain the reservation service order status in real time and update the reservation service order information in the cache component in a timely manner.

[0050] Step 103: Send the reservation record information to a preset message queue, and execute the reservation service according to the message queue.

[0051] Among them, the message queue is a data structure used to store and manage data. The message queue allows data to enter and be retrieved in a certain order to ensure the orderliness and efficiency of data processing. In a high-concurrency scenario such as appointment service, when a large number of requests occur for appointment medical diagnosis, the backend service may not be able to process all requests immediately. Therefore, the appointment record information can be placed in the message queue to avoid overloading the appointment platform and ensure the stability of the appointment platform. Figure 3 A schematic diagram of a structure for sending reservation record information to a message queue provided by an embodiment of the present invention. Figure 3As shown, the user sends a reservation service request to the reservation platform. The reservation platform atomically deducts the reservation service inventory information in the cache component according to the reservation service identifier. If the reservation service inventory information cannot be found in the cache component, the service inventory information is searched in the service data. The service inventory information is stored in the cache component, and then the reservation service inventory information is atomically deducted from the cache component. After the atomic deduction is completed, the reservation record information is generated and sent to the message queue to wait for the reservation platform to process. At the same time, the reservation service order information is generated and returned to the user.

[0052] Specifically, after obtaining the reservation record information, the reservation record information is sent to the message queue. The reservation platform can execute the reservation service corresponding to each reservation record information from the message queue in the order in which the reservation record information is stored in the message queue. In this solution, optionally, executing the reservation service according to the message queue includes: obtaining the reservation record information from the message queue; updating the reservation service inventory information in the service database according to the reservation record information, and adding the reservation record information in the service database.

[0053] The reservation platform can obtain the reservation record information to be executed from the message queue, parse the reservation record information, and obtain the reservation service identifier and other information. The reservation service inventory information in the service database is updated according to the reservation service identifier. For example, the actual inventory of the service in the service database is deducted by using the database optimistic lock method. Database optimistic lock is a concurrency control mechanism that assumes that no other transaction will modify the data during the transaction process. Therefore, when submitting a transaction, it checks whether the data has been modified. If the data has not been modified, the transaction is submitted; if the data has been modified, the transaction is submitted again. After successfully deducting the inventory, that is, after successfully updating the reservation service inventory information in the service database, the reservation platform can add a new reservation record information in the service database. The reservation record information contains all the detailed information of the reservation service, such as the reservation number, user information, reservation time and location, etc. At this time, the reservation platform can determine that the reservation service order status is completed, and change the reservation service order status in the cache component to completed. Figure 4 This is a schematic diagram of the structure of the execution reservation service provided by an embodiment of the present invention. Figure 4 As shown, the reservation platform obtains the reservation record information from the message queue, deducts the actual inventory of the service in the service database according to the reservation record information, and adds the reservation record information to the service database. At the same time, the reservation service order status is updated and the updated reservation service order status is stored in the cache component.

[0054] Through the above steps, the reservation platform can ensure the efficiency and consistency of the reservation service, and keep the data accurate and reliable even in high concurrency. At the same time, the use of message queues can help the reservation platform cope with instantaneous high traffic and improve the stability and response speed of the system.

[0055] Step 104: Obtain the execution progress of the reservation service from the cache component, and display the execution progress to the user.

[0056] Among them, the execution progress includes the execution result, and the execution result is a successful appointment or a failed appointment. Specifically, the cache component stores the appointment service order information, and the appointment service order information includes the appointment service order status. The execution progress of the appointment service can be determined according to the appointment service order status. After executing the appointment service, the appointment service order information is obtained from the cache component. If the appointment service order status is not scheduled, it means that the appointment service task has failed. If the appointment service order status is completed, it means that the service has been successfully booked for the user. After obtaining the execution progress, the appointment execution progress can be displayed to the user through the front-end page. In addition, in this solution, in order to ensure that the user can see the latest execution progress, the appointment platform can automatically refresh the execution progress every certain period of time (such as every 3 seconds). In this way, even if the back-end processing takes some time, the user can see the latest progress. In addition to the timed refresh, the appointment platform can also implement a polling mechanism, that is, if the first query does not or obtains the execution status, the appointment platform will continue to try to query until a certain number of times is reached (such as 5 times). This mechanism can increase the probability of obtaining the appointment result and improve the user experience. Figure 5 A schematic diagram of a structure for displaying execution progress to a user provided by an embodiment of the present invention. Figure 5 As shown, the reservation platform can obtain the reservation service order status from the cache component, determine the execution progress according to the reservation service order status, and return the execution progress to the user.

[0057] Figure 6 A schematic diagram of the structure of the reservation platform provided by the embodiment of the present invention providing reservation services to users. Figure 6 As shown, the reservation platform includes a reservation service and a reservation service order execution service. The user sends a query service request to the reservation platform. The reservation service obtains the query service inventory list from the internal cache, cache component or service database according to the query request, and returns the query service inventory list to the user. The reservation service receives the user's reservation service request, generates reservation record information according to the reservation service request, and sends the reservation record information to the message queue. The reservation service order execution service obtains the reservation record information from the message queue, updates the inventory and adds the reservation record information to the service database according to the reservation record information, and completes the reservation service. At the same time, the reservation service order execution service stores the execution results in the cache component, so that the user can query the execution progress of the reservation service.

[0058] The technical solution of this embodiment receives a query service request sent by a user, and in response to the query service request, determines a query service inventory list in an internal cache, a cache component or a service database; the first duration of the data stored in the internal cache is less than the second duration of the data stored in the cache component; receives a reservation service request sent by the user based on the query service inventory list, and in response to the reservation service request, generates a reservation record message and reservation service order information based on the cache component or the service database; sends the reservation record information to a pre-set message queue, and executes the reservation service according to the message queue; obtains the execution progress of the reservation service from the cache component, and displays the execution progress to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or reservation failure. The technical solution of this embodiment can quickly respond to the user's query request and reduce the waiting time by using an internal cache and a cache component. Sending the reservation record information to the message queue enables the server to better cope with the instantaneous high traffic generated when a large number of users make reservations for services at the same time, thereby improving the stability and response speed of the reservation service. The cache component is used to store the execution progress of the reservation service and display the execution progress to users, which reduces the pressure on the service database. At the same time, it allows users to understand the reservation status in a timely manner, increasing the transparency of the system.

[0059] Figure 7 Schematic diagram of the structure of a reservation service processing device provided in an embodiment of the present invention, which is suitable for executing the reservation service processing method provided in an embodiment of the present invention. Figure 7 As shown, the device may specifically include:

[0060] The information receiving module 701 is used to receive a query service request sent by a user, and in response to the query service request, determine a query service inventory list in an internal cache, a cache component or a service database; the first time length of storing data in the internal cache is less than the second time length of storing data in the cache component;

[0061] An information generation module 702 is used to receive a reservation service request sent by the user based on the query service inventory list, and generate a reservation record message and reservation service order information based on the cache component or the service database in response to the reservation service request;

[0062] The service execution module 703 is used to send the reservation record information to a preset message queue and execute the reservation service according to the message queue;

[0063] The information display module 704 is used to obtain the execution progress of the reservation service from the cache component and display the execution progress to the user; wherein the execution progress includes the execution result, and the execution result is reservation success or reservation failure.

[0064] Optionally, the information receiving module 701 is specifically used to: search the internal cache for a query service inventory list corresponding to the service identifier;

[0065] If the query service inventory list cannot be found in the internal cache, searching the cache component for the query service inventory list;

[0066] If the query service inventory list cannot be found in the cache component, the query service inventory list is determined in the service database.

[0067] Optionally, the information receiving module 701 is further used to: store the query service inventory list in the internal cache and the cache component;

[0068] Determine the time when the internal cache receives the query service inventory list as a first time, and determine the time when the cache component receives the query service inventory list as a second time;

[0069] The query service inventory list in the internal cache is deleted at a first time period after the first time period, and the query service inventory list in the cache component is deleted at a second time period after the second time period.

[0070] Optionally, the information generation module 702 is specifically used to: search the cache component for the reservation service inventory information corresponding to the reservation service identifier,

[0071] If the reservation service inventory information is found in the cache component, updating the reservation service inventory information stored in the cache component based on the reservation service identifier;

[0072] The reservation record message is generated according to the reservation service identifier and the reservation service inventory information in the cache component.

[0073] Optionally, the information generation module 702 is further configured to: if the reservation service inventory information cannot be found in the cache component, obtain the reservation service inventory information in the service database, and store the reservation service inventory information in the cache component;

[0074] The reservation service inventory information stored in the cache component is updated based on the reservation service identifier.

[0075] Optionally, the service execution module 703 is specifically used to: obtain the reservation record information from the message queue;

[0076] The reservation service inventory information in the service database is updated according to the reservation record information, and the reservation record information is added to the service database.

[0077] Optionally, the service execution module 703 is further used to: store the reservation service order information in the cache component;

[0078] The reservation service order status is acquired in real time, and the reservation service order information in the cache component is updated according to the reservation service order status.

[0079] The reservation service processing device provided in the embodiment of the present invention can execute the reservation service processing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description in any method embodiment of the present invention.

[0080] An embodiment of the present invention also provides a computer program product.

[0081] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0082] Figure 8 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 8 , Figure 8 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 8As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).

[0083] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0084] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.

[0085] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.

[0086] A program / utility 40 having a set (at least one) of program modules 46 may be stored, for example, in the memory 28, such program modules 46 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 46 generally perform the functions and / or methods of the embodiments described herein.

[0087] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0088] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, to implement a reservation service processing method provided by an embodiment of the present invention: receiving a query service request sent by a user, and determining a query service inventory list in an internal cache, a cache component or a service database in response to the query service request; a first duration of storing data in the internal cache is less than a second duration of storing data in the cache component; receiving a reservation service request sent by the user based on the query service inventory list, and generating a reservation record message and reservation service order information based on the cache component or the service database in response to the reservation service request; sending the reservation record information to a preset message queue, and executing the reservation service according to the message queue; obtaining the execution progress of the reservation service from the cache component, and displaying the execution progress to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or a reservation failure.

[0089] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, a reservation service processing method provided by all the embodiments of the present invention is implemented: receiving a query service request sent by a user, and determining a query service inventory list in an internal cache, a cache component or a service database in response to the query service request; the first duration of the data stored in the internal cache is less than the second duration of the data stored in the cache component; receiving a reservation service request sent by the user based on the query service inventory list, and generating a reservation record message and reservation service order information based on the cache component or the service database in response to the reservation service request; sending the reservation record information to a pre-set message queue, and executing the reservation service according to the message queue; obtaining the execution progress of the reservation service from the cache component, and displaying the execution progress to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or a reservation failure. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0090] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.

[0091] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0092] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0093] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A reservation service processing method, characterized in that: The method comprises: Receiving a query service request sent by a user, and determining a query service inventory list in an internal cache, a cache component, or a service database in response to the query service request; a first duration for storing data in the internal cache is less than a second duration for storing data in the cache component; receiving a reservation service request sent by the user based on the query service inventory list, and generating a reservation record message based on the cache component or the service database in response to the reservation service request; Sending the reservation record information to a preset message queue, and executing the reservation service according to the message queue; The execution progress of the reservation service is obtained from the cache component, and the execution progress is displayed to the user; wherein the execution progress includes an execution result, and the execution result is a reservation success or a reservation failure.

2. The method according to claim 1, characterized in that The query service request includes a query service identifier, and determining a query service inventory list in an internal cache, a cache component, or a service database includes: Searching the internal cache for a query service inventory list corresponding to the service identifier; If the query service inventory list cannot be found in the internal cache, searching the cache component for the query service inventory list; If the query service inventory list cannot be found in the cache component, the query service inventory list is determined in the service database.

3. The method according to claim 2, characterized in that After determining the query service inventory list in the service database, the method further includes: storing the query service inventory list in the internal cache and the cache component; Determine the time when the internal cache receives the query service inventory list as a first time, and determine the time when the cache component receives the query service inventory list as a second time; The query service inventory list in the internal cache is deleted at a first time period after the first time period, and the query service inventory list in the cache component is deleted at a second time period after the second time period.

4. The method according to claim 1, characterized in that: The reservation service request includes a reservation service identifier, and generating a reservation record message based on the cache component or the service database includes: searching the cache component for the reservation service inventory information corresponding to the reservation service identifier, If the reservation service inventory information is found in the cache component, updating the reservation service inventory information stored in the cache component based on the reservation service identifier; The reservation record message is generated according to the reservation service identifier and the reservation service inventory information in the cache component.

5. The method according to claim 4, characterized in that The method further comprises: If the reservation service inventory information cannot be found in the cache component, obtaining the reservation service inventory information in the service database, and storing the reservation service inventory information in the cache component; The reservation service inventory information stored in the cache component is updated based on the reservation service identifier.

6. The method according to claim 1, characterized in that Executing a reservation service according to the message queue includes: Acquire the reservation record information from the message queue; The reservation service inventory information in the service database is updated according to the reservation record information, and the reservation record information is added to the service database.

7. The method according to claim 1, characterized in that Before obtaining the execution progress of the reservation service from the cache component, the method further includes: Generate a reservation record message based on the cache component or the service database, and store the reservation service order information in the cache component; the reservation service order information includes a reservation service order identifier and a reservation service order status, The reservation service order status is acquired in real time, and the reservation service order information in the cache component is updated according to the reservation service order status.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a reservation service processing method according to any one of claims 1 to 7.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a reservation service processing method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a reservation service processing method as described in any one of claims 1 to 7 is implemented.