Information processing method, device, equipment and storage medium

By using key-value databases in the number source system to process resource modification requests and asynchronously update the relational database, the problem of database downtime in the existing medium-sized source system in the existing technology is solved, and the stability and availability of the system are improved.

CN113806381BActive Publication Date: 2025-05-16BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110336460.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-29
Publication Date
2025-05-16
Estimated Expiration
2041-03-29

AI Technical Summary

Technical Problem

The existing source system depends on a relational database, which makes it easy for database operations to time out or downtime when there is instantaneous high concurrent traffic, resulting in system unavailability.

Method used

The key-value database is used to process resource modification requests, and send resource modification notifications to the message queue through the key-value database, and update the relational database asynchronously, so as to switch to the relational database for processing when the key-value database goes down.

Benefits of technology

While implementing high-performance processing of key-value databases, it switches to a relational database when the key-value database goes down, improving the stability and availability of information processing of the number source system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113806381B_ABST
    Figure CN113806381B_ABST
Patent Text Reader

Abstract

The present disclosure provides an information processing method, apparatus, device and storage medium, which relate to the field of computer technology. The method includes: generating a resource modification request in response to a resource modification operation; processing the resource modification request and updating a first database, wherein the first database is a key-value database; sending a resource modification notification to a message queue through the first database, wherein the resource modification notification is obtained according to the update result of the first database; monitoring the message queue to update a second database according to the resource modification notification, wherein the second database is a relational database. The method realizes high-performance processing through a key-value database, and switches to a relational database for processing when the key-value database is down, thereby improving the stability and availability of information processing in the number source system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an information processing method, apparatus, device, and readable storage medium. Background Art

[0002] In recent years, health care services based on the Internet and technical means have flourished. Internet medicine represents a new development direction for the medical industry, which is conducive to solving the contradiction between the imbalance of medical resources and people's increasing health care needs. With the continuous improvement of people's health awareness, some physical examination institutions, dental institutions, etc. use the number source system provided by related technologies to support online reservations. Users can make reservations on dates with number sources according to the number source system provided by the institution and then go to the store for consumption. The changes in the number source in the number source system provided by related technologies rely on relational databases. When the server and database configurations are not high, instantaneous high concurrent traffic can easily cause database operation timeouts or even crashes, resulting in the unavailability of the number source system.

[0003] As mentioned above, how to improve the stability of the signal source system has become an urgent problem to be solved.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0005] The purpose of the present disclosure is to provide an information processing method, device, equipment and readable storage medium, which at least to a certain extent overcome the technical problem that the signal source system provided by the related technology is prone to timeout or even crash when there is instantaneous high concurrent traffic due to its reliance on a relational database.

[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0007] According to one aspect of the present disclosure, there is provided an information processing method, comprising: generating a resource modification request in response to a resource modification operation; processing the resource modification request and updating a first database, wherein the first database is a key-value database; sending a resource modification notification to a message queue through the first database, wherein the resource modification notification is obtained based on an update result of the first database; and monitoring the message queue to update a second database based on the resource modification notification, wherein the second database is a relational database.

[0008] According to an embodiment of the present disclosure, the processing of the resource modification request and updating the first database includes: when obtaining a distributed lock according to the resource modification request, responding to the resource modification request and updating the first database.

[0009] According to one embodiment of the present disclosure, the resource modification request includes a resource identifier and a resource available time; the first database includes a key obtained according to the resource identifier and the resource available time and its corresponding value; when obtaining a distributed lock according to the resource modification request, updating the first database according to the resource modification request includes: when a command for generating a distributed lock with the resource identifier and the resource available time as a key is executed successfully, responding to the resource modification request, updating the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database.

[0010] According to one embodiment of the present disclosure, the resource modification operation is a resource reservation operation, the resource modification request is a resource reservation request, and the resource available time includes a reservation date and a reservation time period start time; when the command for generating a distributed lock with the resource identifier and the resource available time as the key is executed successfully, responding to the resource modification request, and updating the value corresponding to the key obtained in the first database according to the resource identifier and the resource available time includes: when the command for generating a distributed lock with the resource identifier, the reservation date and the reservation time period start time as the key is executed successfully, responding to the resource reservation request, when the current value of the field with the resource identifier and the reservation date as the key and the reservation time period start time as the field in the first database is greater than a preset value, updating the value of the field with the resource identifier and the reservation date as the key and the reservation time period start time as the field in the first database to the current value minus one.

[0011] According to an embodiment of the present disclosure, the resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request also includes a resource availability modification value; the resource available time includes a resource available date and a resource available time period start time; when the command for generating a distributed lock with the resource identifier and the resource available time as keys is executed successfully, responding to the resource modification request, updating the value corresponding to the key obtained in the first database according to the resource identifier and the resource available time includes: when the command for generating a distributed lock with the resource identifier, the resource available date and the resource available time period start time as keys is executed successfully, responding to the resource availability modification request, updating the value in the first database with the resource identifier and the resource available date as keys and the resource available time period start time as the field to the resource availability modification value.

[0012] According to an embodiment of the present disclosure, the method further includes: in response to a resource generation rule selection request, obtaining a selected resource generation rule, the selected resource generation rule including a predetermined time unit for generating resources; the resource modification operation is a resource allocation operation, the resource modification request is a resource allocation request, the resource allocation request includes a predetermined amount of available resources allocated for each predetermined time unit; the processing of the resource modification request and updating the first database include: obtaining a time unit in which resources are available; when the time unit currently being processed is the time unit in which the resources are available, setting the resource availability status parameter corresponding to the time unit currently being processed in the first database to available.

[0013] According to an embodiment of the present disclosure, the resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request includes a time unit for modifying the resource availability; the processing of the resource modification request and updating the first database include: modifying the resource availability status parameters corresponding to the time unit for modifying the resource availability in the first database.

[0014] According to another aspect of the present disclosure, there is provided an information processing device, including: a resource modification operation response module, used to generate a resource modification request in response to a resource modification operation; a resource modification request processing module, used to process the resource modification request and update a first database, the first database being a key-value database; a resource modification notification sending module, used to send a resource modification notification to a message queue through the first database, the resource modification notification being obtained based on an update result of the first database; and an asynchronous backup module, used to monitor the message queue to update a second database based on the resource modification notification, the second database being a relational database.

[0015] According to an embodiment of the present disclosure, the resource modification request processing module is further used to: when obtaining a distributed lock according to the resource modification request, respond to the resource modification request and update the first database.

[0016] According to one embodiment of the present disclosure, the resource modification request includes a resource identifier and a resource available time; the first database includes a key obtained according to the resource identifier and the resource available time and its corresponding value; the resource modification request processing module is also used to: when a command for generating a distributed lock using the resource identifier and the resource available time as a key is executed successfully, respond to the resource modification request and update the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database.

[0017] According to one embodiment of the present disclosure, the resource modification operation is a resource reservation operation, the resource modification request is a resource reservation request, and the resource available time includes a reservation date and a reservation time period start time; the resource modification request processing module is also used to: when a command for generating a distributed lock with the resource identifier, the reservation date and the reservation time period start time as keys is executed successfully, respond to the resource reservation request, and when the current value of the field with the resource identifier and the reservation date as keys and the reservation time period start time in the first database is greater than a preset value, update the value of the field with the resource identifier and the reservation date as keys and the reservation time period start time in the first database to the current value minus one.

[0018] According to one embodiment of the present disclosure, the resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request also includes a resource availability modification value; the resource available time includes a resource available date and a resource available time period start time; the resource modification request processing module is also used to: when a command for generating a distributed lock with the resource identifier, the resource available date and the resource available time period start time as keys is successfully executed, respond to the resource availability modification request, and update the value in the first database with the resource identifier and the resource available date as keys and the resource available time period start time as the field to the resource availability modification value.

[0019] According to an embodiment of the present disclosure, the device also includes: a resource generation rule acquisition module, which is used to obtain the selected resource generation rule in response to a resource generation rule selection request, and the selected resource generation rule includes a predetermined time unit for generating resources; the resource modification operation is a resource allocation operation, and the resource modification request is a resource allocation request, and the resource allocation request includes a predetermined available resource amount allocated for each predetermined time unit; the resource modification request processing module includes: a business day acquisition module, which is used to obtain the time unit in which resources are available; a signal source quantity setting module, which is used to set the resource availability status parameter corresponding to the time unit currently being processed in the first database to available when the time unit currently being processed is the time unit in which the resources are available.

[0020] According to one embodiment of the present disclosure, the resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request includes a time unit for modifying the resource availability; the resource modification request processing module is also used to: modify the resource availability status parameter corresponding to the time unit for modifying the resource availability in the first database.

[0021] According to another aspect of the present disclosure, a device is provided, comprising: a memory, a processor, and executable instructions stored in the memory and executable in the processor, wherein the processor implements any of the above methods when executing the executable instructions.

[0022] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, and when the executable instructions are executed by a processor, any of the above methods is implemented.

[0023] The information processing method provided by the embodiments of the present disclosure generates a resource modification request in response to a resource modification operation, processes the resource modification request and updates a first database, which is a key-value database, and then sends a resource modification notification obtained according to the update result of the first database to a message queue through the first database, monitors the message queue to update a second database, which is a relational database, according to the resource modification notification. By using the key-value database to process and then asynchronously sending message queue messages to update the relational database, high-performance processing of the key-value database can be achieved, and when the key-value database is down, it can switch to the relational database for processing, thereby improving the stability and availability of information processing of the number source system.

[0024] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.

[0026] Figure 1 A schematic diagram showing a system structure in an embodiment of the present disclosure.

[0027] Figure 2 A flow chart of an information processing method in an embodiment of the present disclosure is shown.

[0028] Figure 3 The figure is a flow chart of a method for processing reservation information according to an exemplary embodiment.

[0029] Figure 4A The invention is a flowchart of an information processing method according to an exemplary embodiment.

[0030] Figure 4B According to an exemplary embodiment, a logic block diagram for increasing the number of signal sources is shown.

[0031] Figure 4C According to an exemplary embodiment, a logic block diagram of reducing the number of signal sources is shown.

[0032] Figure 4DAccording to an exemplary embodiment, a logic block diagram of modifying the number of signal sources is shown.

[0033] Figure 4E According to an exemplary embodiment, a logic block diagram of modifying the number of signal sources is shown.

[0034] Figure 4F According to an exemplary embodiment, an interactive interface diagram for modifying the number of number sources in batches is shown.

[0035] Figure 5A The present invention is a flowchart of a method for processing resource allocation information according to an exemplary embodiment.

[0036] Figure 5B According to an exemplary embodiment, a schematic diagram of an interactive interface for selecting a signal source generation rule is shown.

[0037] Figure 5C According to an exemplary embodiment, another schematic diagram of an interactive interface for selecting a signal source generation rule is shown.

[0038] Figure 5D According to an exemplary embodiment, a schematic diagram of another interactive interface for selecting a signal source generation rule is shown.

[0039] Figure 5E According to an exemplary embodiment, a schematic diagram of another interactive interface for selecting a signal source generation rule is shown.

[0040] Fig. 5F According to an exemplary embodiment, a schematic diagram of an institution data setting interaction interface is shown.

[0041] Figure 5G According to an exemplary embodiment, a schematic diagram of a remainder sign display interface is shown.

[0042] Figure 5H According to an exemplary embodiment, a schematic diagram of a remainder sign display interface is shown.

[0043] Fig. 6A The figure is a flowchart of a method for processing available status information according to an exemplary embodiment.

[0044] Figure 6B According to an exemplary embodiment, a schematic diagram of an interactive interface for setting a resource availability status is shown.

[0045] Figure 6C According to an exemplary embodiment, a schematic diagram of an interactive interface for setting a resource availability status is shown.

[0046] Figure 7 is based on Figures 2 to 6C A block diagram showing an information processing flow.

[0047] Figure 8 A block diagram of an information processing device in an embodiment of the present disclosure is shown.

[0048] Fig. 9 A block diagram showing another information processing device in an embodiment of the present disclosure.

[0049] Fig.10 A schematic structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The accompanying drawings are only schematic illustrations of the disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0051] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, devices, steps, etc. may be adopted. In other cases, well-known structures, methods, devices, implementations or operations are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0052] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present disclosure, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. The symbol " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0053] In this disclosure, unless otherwise clearly specified and limited, terms such as "connection" should be understood in a broad sense, for example, it can be an electrical connection or can communicate with each other; it can be directly connected or indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.

[0054] As mentioned above, some number source systems provided by related technologies rely on databases when performing number source change operations such as reservations, modification of reservations, and cancellation of reservations. When the server and database configurations are not high, instantaneous high concurrent traffic can easily cause database operation timeouts or even crashes, resulting in unavailability of the number source system.

[0055] Therefore, the present disclosure provides an information processing method, which generates a resource modification request in response to a resource modification operation, processes the resource modification request and updates a first database, which is a key-value database, and then sends a resource modification notification obtained according to the update result of the first database to a message queue through the first database, monitors the message queue to update a second database according to the resource modification notification, and the second database is a relational database. By using the key-value database to process and then asynchronously send message queue messages to update the relational database, high-performance processing of the key-value database can be achieved, and when the key-value database fails, it can switch to the relational database for processing, thereby improving the stability and availability of information processing of the number source system.

[0056] Figure 1 An exemplary system architecture 10 to which the information processing method or information processing apparatus of the present disclosure can be applied is shown.

[0057] like Figure 1 As shown, the system architecture 10 may include a terminal device 102, a network 104, a server 106, and a database 108. The terminal device 102 may be various electronic devices having a display screen and supporting input and output, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, wearable devices, virtual reality devices, smart homes, etc. The network 104 is used to provide a medium for a communication link between the terminal device 102 and the server 106. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The server 106 may be a server or server cluster that provides various services, etc. The database 108 may be a large database software placed on a server, or a small database software installed on a computer, for storing data, such as a key-value database, a memory-based database, or a relational database.

[0058] The user can use the terminal device 102 to interact with the server 106 and the database 108 through the network 104 to receive or send data, etc. For example, the user performs a resource modification operation through the software on the terminal device 102, and the software on the terminal device 102 responds to the operation and generates a resource modification request, and then sends the resource modification request to the server 106 through the network 104 for processing. The server 106 can also receive data from the database 108 or send data to the database 108 through the network 104. For example, after processing the resource modification request, the server 106 can update the database 108 through the network 104 according to the processing result.

[0059] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0060] Figure 2 FIG. 1 is a flowchart of an information processing method according to an exemplary embodiment. Figure 2 The method shown can be applied to the server side of the above system, for example, and can also be applied to the terminal device of the above system.

[0061] refer to Figure 2 , the method 20 provided in the embodiment of the present disclosure may include the following steps.

[0062] In step S202, in response to the resource modification operation, a resource modification request is generated. The resource may be a virtual resource used to provide a service, such as a number source in a physical examination or a medical institution reservation system. The user terminal or a server connected to the user terminal may respond to the resource modification operation performed by the user and generate a corresponding request for processing.

[0063] In some embodiments, for example, the resource modification operation may be a resource reservation operation. For specific implementations, see Figure 3 .

[0064] In some embodiments, for example, the resource modification operation may be a resource availability modification operation. For specific implementations, refer to FIG. 4A to FIG. 4E .

[0065] In some embodiments, for example, the resource modification operation may be a resource allocation operation. For specific implementations, see FIG. 5A to FIG. 5H .

[0066] In some embodiments, for example, the resource modification operation may be a resource availability modification operation. For specific implementations, refer to FIG. 6A to FIG. 6C .

[0067] In step S204, the resource modification request is processed and the first database is updated, which is a key-value database. When the system is not online or is in the maintenance stage, only the staff performs resource modification operations, and there will not be a large number of requests in the same period. At this time, the first database can be directly processed and updated accordingly; when users use the system, there may be a large number of users operating at the same time. When a large number of requests appear in the same period, a distributed lock can be added for processing. When the distributed lock is obtained according to the resource modification request, the resource modification request is responded to and the first database is updated.

[0068] In some embodiments, for example, the first database may be Redis, in which a hash data type is used to store resource data, such as key = resource organization identification (identification, id) + service package id + date (yyyy (year) -MM (month) -dd (day)), field (field) = time period start time (yyyy-MM-dd HH (hour): mm (minute): ss (second)), value = resource quantity.

[0069] In some embodiments, when the resource modification operation is a resource allocation operation or a resource availability modification operation, it can be directly processed and the first database can be updated accordingly. For a specific implementation, please refer to FIG. 5 or FIG. 6 .

[0070] In some embodiments, when the resource modification operation is a resource reservation operation or a resource availability modification operation, an attempt may be made to obtain a distributed lock according to a resource modification request including a resource identifier and a resource availability time, for example, an attempt may be made to execute a command to generate a distributed lock using the resource identifier and the resource availability time as a key, and when the execution is successful, the value corresponding to the key obtained according to the resource identifier and the resource availability time in the first database is updated according to the resource modification request. For specific implementations, please refer to Figure 3 or FIG. 4A to FIG. 4E .

[0071] In step S206, a resource modification notification is sent to the message queue through the first database, and the resource modification notification is obtained according to the update result of the first database. After the first database updates the inventory, a message queue (MQ) message can be sent, and the inventory is updated to the second database by monitoring the MQ message to achieve consistency between the first database and the second database.

[0072] In step S208, the message queue is monitored to update the second database according to the resource modification notification, and the second database is a relational database. The resources are processed by the first database first, and then the MQ message is sent asynchronously to update the second database. When the first database is down for some reason, the main data source can be switched to the second database.

[0073] In some embodiments, for example, when the first database is Redis and the second database is Mysql, the method using Redis will send an MQ message after updating the inventory, and the system monitors the MQ message to update the inventory to Mysql to achieve consistency between the Redis and Mysql inventories. When Redis hangs up, the system switches to using the database method, and the inventory is maintained directly based on Mysql. Redis is a memory-based database, and its advantages include ultra-high performance. In theory, the number of queries per second (QPS) of a Redis can reach 5w / s, that is, 50,000 requests can be processed in one second. This performance is unattainable by ordinary databases.

[0074] According to the information processing method provided by the embodiment of the present disclosure, a resource modification request is generated in response to a resource modification operation, the resource modification request is processed and the first database is updated, the first database is a key-value database, and then a resource modification notification obtained according to the update result of the first database is sent to the message queue through the first database, and the message queue is monitored to update the second database according to the resource modification notification, the second database is a relational database, and by adopting a strategy with the key-value database as the main and the relational database as the auxiliary, the key-value database is processed and then the message queue message is asynchronously sent to update the relational database, which can achieve high-performance processing of the key-value database while switching to the relational database for processing when the key-value database is down, thereby improving the stability and availability of information processing of the number source system.

[0075] Figure 3 FIG. 1 is a flow chart of a method for processing reservation information according to an exemplary embodiment. Figure 3 The method shown is applied, for example, to a scenario of processing user reservation and queuing, and can be applied to the server side of the above system, and can also be applied to the terminal device of the above system.

[0076] refer to Figure 3 , the method 30 provided in the embodiment of the present disclosure may include the following steps.

[0077] In step S302, in response to the resource reservation operation, a resource reservation request is generated. The resource reservation request includes a resource identifier and a resource available time, and the resource available time may include a reservation date and a reservation time period start time. The resource may be a reservation number for a physical examination package, a dental package, a hair package, and other services, and the resource identifier may include an institution store ID and a package ID.

[0078] In step S304, try to execute the command to generate a distributed lock with resource identifier, reservation date and reservation time period start time as the key. Distributed lock key = store id + package id + date (yyyy-MM-dd) + time period start time (yyyy-MM-dd HH:mm:ss), ensuring that only one request is modifying the source data in a time period at the same time, adding or subtracting inventory, and the locking process of the current time period will not affect users who have reserved other time periods.

[0079] In step S305, if the command in step S304 is not successfully executed, the command returns to step S304 and attempts to execute again. The request that has not obtained the lock will continue to try to execute the command until the lock is obtained for processing, or wait until the system returns a prompt of request timeout and service congestion, and then try to execute again later.

[0080] In step S306, when the command in step S304 is executed successfully, in response to the resource reservation request, it is determined whether the current value of the field in the first database with the resource identifier and the reservation date as keys and the reservation time period start time as a field is greater than a preset value.

[0081] In step S308, when the judgment result of step S306 is yes, the value of the field in the first database with the resource identifier and the reservation date as the key and the reservation time period start time as the field is updated to the current value minus one. For example, when a user initiates a request to make an appointment for store A, package a, and service at 10 am on 2021-01-05, after receiving the request, the system will use the string "Aa-2021-01-05-10:00" as the key of the distributed lock and try to obtain the distributed lock. Only requests that obtain the lock can update the inventory. For example, when the value value is greater than 0, the existing value is subtracted by 1 and the value value is updated, and the reservation is successful; if the value value is 0, the reservation is failed. Requests that have not obtained the lock will wait until the lock is obtained for processing (or wait until the request times out and returns that the service is congested and try again later).

[0082] In some embodiments, the update of the second database may refer to Figure 2 , I will not go into details here.

[0083] According to the reservation information processing method provided by the embodiment of the present disclosure, which involves the maintenance of the number source scheduling inventory, in the reservation scenario that may be accompanied by a large flow of requests (such as rush buying, grabbing number sources), an extended, distributed key-value database is adopted. By generating a distributed lock to maintain the number of number sources with the smallest inventory granularity, that is, the number source available time period, only one request can get the lock to add or subtract inventory at a time point, effectively preventing the occurrence of overselling of numbers when the actual number of reservations is more than the number given by the system, thereby ensuring the high performance and high availability of the reservation system.

[0084] Figure 4A FIG. 1 is a flowchart of an information processing method according to an exemplary embodiment. Figure 4A The method shown is applied, for example, to a scenario where a staff member modifies a number source, and can be applied to a server side of the above system, or to a terminal device of the above system.

[0085] refer to Figure 4A , the method 40 provided in the embodiment of the present disclosure may include the following steps.

[0086] In step S402, in response to the resource availability modification operation, a resource availability modification request is generated. The resource availability modification request includes a resource identifier, a resource available time, and a resource availability modification value. The resource available time may include a resource available date and a resource available time period start time. The resource may be a number source for booking physical examination packages, dental packages, hair packages, and other services. The resource identifier may include an institution store ID and a package ID. The institution providing the service may modify the number source that can be booked (available) for a certain time period according to its own needs after the number source has been generated. The number source may be increased or decreased. Store institutions can modify the number source in batches through the method provided in the present disclosure. Store operators can select dates (resource availability dates) in batches, set new number source availability, and refresh the available number of reservations.

[0087] In step S404, try to execute a command to generate a distributed lock using the resource identifier, resource availability date, and resource availability time period start time as the key. The key of the distributed lock = store id + package id + date (yyyy-MM-dd) + time period start time (yyyy-MM-dd HH:mm:ss), ensuring that only one request is modifying the source data in a time period at the same time, adding or subtracting inventory, and the locking process of the current time period will not affect users who have reserved other time periods.

[0088] In step S405, when the command in step S404 is not successfully executed, the command returns to step S404 and attempts to execute again. The request that has not obtained the lock will continue to attempt to execute the command until the lock is obtained for processing, or until the system returns a prompt indicating that the request has timed out and the service is congested, and then attempt to execute again later.

[0089] In step S406, when the command in step S404 is executed successfully, in response to the resource availability modification request, the resource identifier and resource availability date are used as keys and the resource availability time period start time is used as the field value in the first database to update the resource availability modification value. The basic logic of number source modification is to obtain the total number of number sources and the number of reserved number under the current maintenance rule of the number source in the time period. When modifying the number source, the difference between the two is taken to update the remaining available number, and the number of rule number sources is then updated to the newly modified number of number sources. FIG. 4B to FIG. 4FSeveral situations of modifying the number of source numbers are shown.

[0090] Figure 4B According to an exemplary embodiment, a logic block diagram for increasing the number of signal sources is shown. Figure 4B As shown, when the number source is initialized in a certain time period, the maintenance rule sets 10 numbers every 30 minutes (0.5 hours, 0.5h). Currently, it needs to be increased to 15 numbers every 30 minutes. It is calculated that the number of number sources has increased by 5 compared with the old rule, so the current number of available reservations has increased by 5 numbers. Three people have made reservations in this time period, so the number of numbers available for users is updated from (10-3=) 7 people to (7+5=) 12 people, and the number of available number sources is updated to 15 numbers every 30 minutes.

[0091] Figure 4C According to an exemplary embodiment, a logic block diagram for reducing the number of signal sources is shown. Figure 4C As shown, when the number source is initialized in a certain time period, the maintenance rule is set to 10 sources every 30 minutes (0.5 hours, 0.5h). Currently, it is reduced to 2 sources every 30 minutes. It is calculated that the number of number sources is reduced by 8 compared with the old rule, so the current reservation quantity is reduced by 8 sources. In this time period, 3 people have made reservations, so the user's available number source is updated from (10-3=)7 people to (7-8=)-1 people, and the status is changed to fully booked. The last user who successfully made a reservation can be processed by SMS, application (APP) message notification, etc. The number of available number sources is updated to 2 sources every 30 minutes.

[0092] Figure 4D According to an exemplary embodiment, a logic block diagram for modifying the number of signal sources is shown. Figure 4D As shown, in the first step (Step 1), the system changes the number source for the 11:00-11:30 time period on a certain day from No. 10 every 30 minutes (0.5 hours, 0.5h) to No. 15 every 30 minutes. There is currently No. 10 in this time period (No. 5 has been reserved). At this time, if a user is reserving a number source for 11:00-11:30, it is necessary to wait for the system to complete the modification of the number source before processing the reservation request; if a user is reserving a number source for other time periods, such as 12:30-13:00, the reservation request can be processed normally. In the second step (Step 2), the system completes the processing and changes the number source 10 for the 11:00-11:30 time period to 15. After the number source is subtracted from the number source that the user has successfully reserved, the remaining number source is 14, and the number source for 12:30-13:00 is reduced from 10 to 9 after the number source that the user has successfully reserved is subtracted.

[0093] Figure 4E According to an exemplary embodiment, a logic block diagram for modifying the number of signal sources is shown. Figure 4EAs shown, in the first step (Step 1), the system changes the number source for the 11:00-11:30 time period on a certain day from number 10 every 30 minutes (0.5 hours, 0.5h) to number 2 every 30 minutes. There is currently number 7 in this time period (number 3 has been reserved). At this time, if there are 3 users who are reserving the number source for 11:00-11:30, they need to wait for the system to complete the number source modification before processing the reservation request. In the second step (Step 2), the system completes the processing and changes the number source 10 for the 11:00-11:30 time period to 2. After the number source is insufficient, the remaining number source is -1 after subtracting the number source 3 to be reserved, and the reservation failure can be returned to the last user who requested the reservation.

[0094] Figure 4F According to an exemplary embodiment, an interactive interface diagram for batch modification of the number of number sources is shown. Figure 4F As shown, for example, when modifying the number of signal sources, you can select November 26 and 27, 2020 at the same time and change their signal sources from 20 / 0.5h to 10 / 0.5h.

[0095] The reservation system provided by some institutions can only make reservations on a daily basis and cannot be accurate to the time period. For example, 100 people can be scheduled for physical examinations on the same day. If these 100 people all arrive at the store for the physical examination at 9 am, it will cause congestion for the physical examinations. Customers have to queue for a long time to get one examination, which wastes time and increases the pressure on physical examination, dental and other institutions.

[0096] According to the information processing method provided by the embodiment of the present disclosure, by adopting an extended, distributed key-value database, a distributed lock is generated with the smallest inventory granularity, i.e., the available time period of the number source to modify the number of number sources, and batch modification of number sources is supported, which helps staff to deal with emergencies.

[0097] Figure 5A FIG. 1 is a flow chart of a method for processing resource allocation information according to an exemplary embodiment. Figure 5A The method shown is applied, for example, to a scenario of processing a staff member's assigned number source, and can be applied to the server side of the above system, and can also be applied to a terminal device of the above system.

[0098] refer to Figure 5A , the method 50 provided in the embodiment of the present disclosure may include the following steps.

[0099] In step S502, in response to the resource generation rule selection request, the selected resource generation rule is obtained, and the selected resource generation rule includes a predetermined time unit for generating resources. For example, the package data associated with the organization can be created first, and then the number source generation rule can be set. Different number source generation rules can be selected for different packages, that is, the predetermined time unit can be a week, ten days, month, etc. For example, an organization can provide two packages of services to guests. Package A can be maintained weekly here, and only have numbers on Mondays and Wednesdays. Package B can be maintained monthly here, and there are numbers from the 1st to the 10th of each month for guests to make reservations.

[0100] Figure 5B According to an exemplary embodiment, a schematic diagram of an interactive interface for selecting a signal source generation rule is shown. Figure 5B As shown, maintenance can be performed on a weekly basis. For example, Monday to Friday can be selected to exclude statutory holidays and use them as business days for number source setting.

[0101] Figure 5C According to an exemplary embodiment, another schematic diagram of an interactive interface for selecting a signal source generation rule is shown, such as Figure 5C As shown, maintenance can be performed on a monthly basis. For example, the 1st, 10th, and 20th of each month can be selected to set the number source quantity as business days after excluding statutory holidays.

[0102] In step S504, the time unit of resource availability is obtained. The time unit of resource availability can be a business day. On the basis of Monday to Friday as working days, the statutory holidays (such as Spring Festival, May Day holiday, National Day holiday, etc.) between the first day and the last day of the number source data can be queried to set whether the statutory holiday is a business day.

[0103] In step S506, when the time unit currently being processed is a time unit in which resources are available, the resource availability status parameter corresponding to the time unit currently being processed in the first database is set to available. The 15-day number source data can be initialized for the first time by default (thereafter, the daily scheduled task generates the scheduling data for the next day). According to the weekly and monthly maintenance set by the number source rules, compare whether the date of the scheduling data meets the conditions. If it meets the conditions (i.e., normal working dates from Monday to Friday), determine whether the business is open on statutory holidays and holidays. If the verification is a business day, put the date in the business day list; if it is a non-business day, put the date in the rest day list. Figure 5D According to an exemplary embodiment, a schematic diagram of another interactive interface for selecting a signal source generation rule is shown. Figure 5D As shown, you can choose whether to open on holidays.

[0104] In some embodiments, after the business day is set, the FIG. 4A to FIG. 4EThe method generates the number source data for each business day. For example, the number source data can be generated by day: the dates in the business day list are scheduled according to the configured number source quantity, and the status is set to be available for reservation; the dates in the rest day list are scheduled with the number source as 0, and the status is set to rest day. The number source data can also be generated by time period: get the business hours of the institution, and divide the business hours into several time periods according to the configuration every n (n is a positive integer) minutes (for example, the business hours are 9:00-12:00, and the number of number sources every 30 minutes is x (x is a positive integer), then the time can be divided into 9:00-9:30, 9:30-10:00, 10:00-10:30, 10:30-11:00, 11:00-11:30, 11:30-12:00), the dates in the business day list generate scheduling data for each time period based on the number of number sources x, and set the status to available for reservation; the dates in the rest day list generate scheduling data for each time period based on the number of number sources 0, and set the status to rest day. Figure 5E According to an exemplary embodiment, another schematic diagram of a signal source generation rule selection interactive interface is shown, such as Figure 5E As shown, you can choose to generate number sources by day or by time period, and you can set the number of number sources per day and the number of number sources every few minutes accordingly.

[0105] For example, the scheduling data generated by time period is stored in Redis in the following format:

[0106] RedisService.hset(storeId+goodsId+”2020-11-16”,”2020-11-169:00:00”, value)

[0107] RedisService.hset(storeId+goodsId+”2020-11-16”,”2020-11-169:30:00”, value)

[0108] ………

[0109] For example, the schedule data generated by day is put into Redis in the following format:

[0110] RedisService.hset(storeId+goodsId+”2020-11-16”,”2020-11-1600:00:00”,value)

[0111] ………

[0112] Fig. 5F According to an exemplary embodiment, a schematic diagram of an organization data setting interaction interface is shown. Fig. 5FAs shown, you can create data for dental and physical examination institutions, including name, address, phone number, etc. You can also set the business hours of the institution.

[0113] use Figure 5A The scheduling system of the method can display the scheduling calendar to the front end for users to view and make reservations according to different number source rules set. Figure 5G According to an exemplary embodiment, a schematic diagram of a residual number display interface is shown, such as Figure 5G As shown, the number of remaining numbers can be displayed by day. The dates that can display the remaining numbers in December 2020 are 2-9, and the number of remaining numbers on each date is displayed. Figure 5H According to an exemplary embodiment, a schematic diagram of a residual number display interface is shown, such as Figure 5H As shown, the number of remaining numbers can be displayed by time period, and the remaining number (number of people available for appointment) every half hour starting from 9:00 am on December 19, 2020.

[0114] According to the method provided in the embodiment of the present disclosure, it is possible to support the generation and maintenance of scheduling data of different granularities, and to effectively solve the congestion and time waste caused by a large number of users coming to the store for physical examinations and dental services at the same time.

[0115] Fig. 6A FIG. 1 is a flowchart of a method for processing available status information according to an exemplary embodiment. Fig. 6A The method shown is applied, for example, to a scenario where a staff member temporarily closes or closes a business, and can be applied to a server side of the above system, or to a terminal device of the above system.

[0116] refer to Fig. 6A , the method 60 provided in the embodiment of the present disclosure may include the following steps.

[0117] In step S602, in response to the resource availability modification operation, a resource availability modification request is generated. The resource availability modification request includes the time unit for modifying the resource availability. The scheduling system using the method of the embodiment of the present disclosure supports setting temporary closures, can add temporary closures by day or time period, also supports canceling temporary closures, and can also set holidays that are originally closed, that is, modifying the availability status of time units (days or time periods).

[0118] In step S604, the resource availability status parameter corresponding to the time unit for modifying the resource availability in the first database is modified. The basic logic is to obtain the time period schedule included in the time range according to the time period, and lock and set the suspension status in the schedule data to suspended / not suspended in sequence. Figure 6B According to an exemplary embodiment, a schematic diagram of an interactive interface for setting the available status of resources is shown. Figure 6BAs shown, you can set the suspension of business on a daily basis, for example, you can set the suspension of business on November 16. Figure 6C According to an exemplary embodiment, a schematic diagram of an interactive interface for setting the available status of resources is shown. Figure 6C As shown, you can set the suspension of business according to time periods, for example, you can set the suspension of business from 9:00 to 12:00 on November 16.

[0119] According to the method provided in the embodiment of the present disclosure, temporary closure of business, batch modification of number sources, setting of holiday business, etc. can be supported, helping stores to deal with emergencies in a friendly and comprehensive manner.

[0120] Figure 7 is based on Figures 2 to 6C A block diagram of an information processing flow is shown. Figure 7 As shown, the scheduling system 7002 can be used for information processing, including user appointment information processing (S702), merchant temporary suspension information processing (S704), merchant number source modification information processing (S706), etc.; the scheduling system 7002 processes number source data using a strategy of Redis 7006 as the main processing and backup database 7008 as the auxiliary. The scheduling data is processed by Redis first, and then the backup database 7008 is updated asynchronously by sending mq messages. When Redis is manually disabled or Redis is down, the main data source can be switched from Redis to the backup database through the distributed configuration center 7004 to ensure high performance and high availability of the scheduling system. The distributed configuration center 7004 configures a Boolean parameter, and the scheduling system 7002 executes different methods (S708, S710) according to whether the distributed configuration center 7004 parameter is true (true) or false (false). The method using Redis will send a message (S712) to the message queue (MQ) 7010 after updating the inventory. The scheduling system 7002 will monitor the MQ message and update the inventory to the backup database 7008 to achieve consistency between the Redis and backup database inventories. When Redis is disabled or down, the scheduling system 7002 switches to the method using the backup database 7008 and directly maintains the inventory based on the backup database 7008.

[0121] Figure 8 FIG. 1 is a block diagram of an information processing device according to an exemplary embodiment. Figure 8 The device shown can be applied to, for example, a server end of the above system, or can be applied to a terminal device of the above system.

[0122] refer to Figure 8 The device 80 provided in the embodiment of the present disclosure may include a resource modification operation response module 802 , a resource modification request processing module 804 , a resource modification notification sending module 806 and an asynchronous backup module 808 .

[0123] The resource modification operation response module 802 may be configured to generate a resource modification request in response to a resource modification operation.

[0124] The resource modification request processing module 804 may be used to process resource modification requests and update a first database, where the first database is a key-value database.

[0125] The resource modification notification sending module 806 may be used to send a resource modification notification to the message queue via the first database, where the resource modification notification is obtained according to an update result of the first database.

[0126] The asynchronous backup module 808 may be used to monitor the message queue to update the second database according to the resource modification notification, where the second database is a relational database.

[0127] Fig. 9 FIG. 1 is a block diagram of another information processing device according to an exemplary embodiment. Fig. 9 The device shown can be applied to, for example, a server end of the above system, or can be applied to a terminal device of the above system.

[0128] refer to Fig. 9 The device 90 provided in the embodiment of the present disclosure may include a resource generation rule acquisition module 901, a resource modification operation response module 902, a resource modification request processing module 904, a resource modification notification sending module 906 and an asynchronous backup module 908, wherein the resource modification request processing module 904 may include: a business day acquisition module 9042 and a number source quantity setting module 9044.

[0129] The resource generation rule acquisition module 901 may be used to respond to a resource generation rule selection request and acquire a selected resource generation rule, where the selected resource generation rule includes a predetermined time unit for generating a resource.

[0130] The resource modification operation response module 902 may be configured to generate a resource modification request in response to a resource modification operation.

[0131] The resource modification request processing module 904 may be used to process resource modification requests and update a first database, where the first database is a key-value database.

[0132] The resource modification request processing module 904 may also be configured to respond to a resource modification request and update the first database when a distributed lock is obtained according to the resource modification request.

[0133] The resource modification request includes a resource identifier and resource available time; the first database includes a key obtained according to the resource identifier and resource available time and its corresponding value.

[0134] The resource modification request processing module 904 can also be used to respond to the resource modification request and update the value corresponding to the key obtained according to the resource identifier and resource available time in the first database when the command to generate a distributed lock using the resource identifier and resource available time as the key is executed successfully.

[0135] The resource modification operation may be a resource reservation operation, the resource modification request may be a resource reservation request, and the resource available time may include a reservation date and a reservation time period start time.

[0136] The resource modification request processing module 904 can also be used to respond to a resource reservation request when a command for generating a distributed lock using the resource identifier, reservation date and reservation time period start time as keys is successfully executed. When the current value of the field using the resource identifier and reservation date as keys and the reservation time period start time as the field in the first database is greater than a preset value, the value of the field using the resource identifier and reservation date as keys and the reservation time period start time as the field in the first database is updated to the current value minus one.

[0137] The resource modification operation may be a resource availability modification operation, the resource modification request may be a resource availability modification request, and the resource availability modification request may further include a resource availability modification value; the resource availability time may include a resource availability date and a resource availability time period start time.

[0138] The resource modification request processing module 904 can also be used to respond to a resource availability modification request when a command for generating a distributed lock using the resource identifier, resource availability date, and resource availability time period start time as keys is successfully executed, and update the value in the first database using the resource identifier and resource availability date as keys and the resource availability time period start time as the field to a resource availability modification value.

[0139] The resource modification operation may be a resource availability modification operation, and the resource modification request may be a resource availability modification request. The resource availability modification request includes a time unit for modifying the resource availability.

[0140] The resource modification request processing module 904 may also be used to modify the resource availability status parameter corresponding to the time unit for modifying the resource availability in the first database.

[0141] The resource modification operation may be a resource allocation operation, the resource modification request may be a resource allocation request, and the resource allocation request may include a predetermined amount of available resources allocated per predetermined time unit.

[0142] The business day acquisition module 9042 may be used to acquire the time unit in which resources are available.

[0143] The signal source quantity setting module 9044 can be used to set the resource availability state parameter corresponding to the time unit currently processed in the first database to available when the time unit currently processed is a time unit where resources are available.

[0144] The resource modification notification sending module 906 may be used to send a resource modification notification to the message queue via the first database, where the resource modification notification is obtained according to an update result of the first database.

[0145] The asynchronous backup module 908 may be used to monitor the message queue to update the second database according to the resource modification notification, where the second database is a relational database.

[0146] The specific implementation of each module in the device provided by the embodiment of the present disclosure can refer to the content of the above method, which will not be repeated here.

[0147] Fig.10 The following is a schematic diagram showing the structure of an electronic device in an embodiment of the present disclosure. It should be noted that: Fig.10 The device shown is only an example of a computer system, which should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0148] like Fig.10 As shown, the device 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0149] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0150] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present disclosure are executed.

[0151] It should be noted that the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal 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 computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0152] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0153] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a resource modification operation response module, a resource modification request processing module, a resource modification notification sending module and an asynchronous backup module. The names of these modules do not constitute a limitation on the modules themselves in certain cases, for example, the resource modification operation response module may also be described as a "module that responds to resource modification operations performed by users at the terminal".

[0154] As another aspect, the present disclosure further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0155] In response to a resource modification operation, a resource modification request is generated; the resource modification request is processed and a first database is updated, which is a key-value database; a resource modification notification is sent to a message queue through the first database, which is obtained based on an update result of the first database; the message queue is monitored to update a second database based on the resource modification notification, which is a relational database.

[0156] The exemplary embodiments of the present disclosure are specifically shown and described above. It should be understood that the present disclosure is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present disclosure is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended claims.

Claims

1. An information processing method, characterized in that: include: In response to the resource modification operation, generating a resource modification request; Processing the resource modification request, updating a first database, wherein the resource modification request includes a resource identifier and a resource available time, and the first database is a key-value database, and the first database includes a key obtained according to the resource identifier and the resource available time and a corresponding value thereof; Sending a resource modification notification to a message queue through the first database, where the resource modification notification is obtained according to an update result of the first database; Monitoring the message queue to update a second database according to the resource modification notification, wherein the second database is a relational database; The processing of the resource modification request and updating the first database comprises: When the command for generating a distributed lock using the resource identifier and the resource available time as a key is executed successfully, the resource modification request is responded to and the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database is updated.

2. The method according to claim 1, characterized in that The resource modification operation is a resource reservation operation, the resource modification request is a resource reservation request, and the resource available time includes a reservation date and a reservation time period start time; When the command to generate a distributed lock using the resource identifier and the resource available time as a key is executed successfully, responding to the resource modification request and updating the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database includes: When the command to generate a distributed lock using the resource identifier, the reservation date and the reservation time period start time as keys is executed successfully, in response to the resource reservation request, when the current value of the field using the resource identifier and the reservation date as keys and the reservation time period start time as the field in the first database is greater than a preset value, the value of the field using the resource identifier and the reservation date as keys and the reservation time period start time as the field in the first database is updated to the current value minus one.

3. The method according to claim 1, characterized in that The resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request also includes a resource availability modification value; the resource available time includes a resource available date and a resource available time period start time; When the command to generate a distributed lock using the resource identifier and the resource available time as a key is executed successfully, responding to the resource modification request and updating the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database includes: When the command for generating a distributed lock with the resource identifier, the resource availability date and the start time of the resource availability time period as keys is executed successfully, in response to the resource availability modification request, the value in the first database with the resource identifier and the resource availability date as keys and the start time of the resource availability time period as the field is updated to the resource availability modification value.

4. The method according to claim 1, characterized in that: Also includes: In response to the resource generation rule selection request, obtaining a selected resource generation rule, the selected resource generation rule including a predetermined time unit for generating a resource; The resource modification operation is a resource allocation operation, the resource modification request is a resource allocation request, and the resource allocation request includes a predetermined amount of available resources allocated per predetermined time unit; The processing of the resource modification request and updating the first database comprises: Get the time unit in which the resource is available; When the time unit currently being processed is the time unit in which the resource is available, the resource availability state parameter corresponding to the time unit currently being processed in the first database is set to available.

5. The method according to claim 1, characterized in that The resource modification operation is a resource availability modification operation, the resource modification request is a resource availability modification request, and the resource availability modification request includes a time unit for modifying the resource availability; The processing of the resource modification request and updating the first database comprises: The resource availability status parameter corresponding to the time unit for modifying the resource availability in the first database is modified.

6. An information processing device, characterized in that: include: A resource modification operation response module, used to generate a resource modification request in response to a resource modification operation; A resource modification request processing module, used to process the resource modification request and update a first database, wherein the resource modification request includes a resource identifier and a resource available time, and the first database is a key-value database, and the first database includes a key obtained according to the resource identifier and the resource available time and its corresponding value; The resource modification request processing module is further used to: when the command for generating a distributed lock using the resource identifier and the resource available time as a key is successfully executed, respond to the resource modification request and update the value corresponding to the key obtained according to the resource identifier and the resource available time in the first database; A resource modification notification sending module, used to send a resource modification notification to a message queue through the first database, wherein the resource modification notification is obtained according to an update result of the first database; The asynchronous backup module is used to monitor the message queue to update the second database according to the resource modification notification, and the second database is a relational database.

7. A device comprising: A memory, a processor, and executable instructions stored in the memory and executable in the processor, wherein the processor implements the method according to any one of claims 1 to 5 when executing the executable instructions.

8. A computer-readable storage medium having computer-executable instructions stored thereon, characterized in that: When the executable instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data processing method, data processing device and e-commerce platform

    CN105808707A