CN111611081A - Request method, request device, computer equipment and storage medium - Google Patents

Request method, request device, computer equipment and storage medium Download PDF

Info

Publication number
CN111611081A
CN111611081A CN202010450297.7A CN202010450297A CN111611081A CN 111611081 A CN111611081 A CN 111611081A CN 202010450297 A CN202010450297 A CN 202010450297A CN 111611081 A CN111611081 A CN 111611081A
Authority
CN
China
Prior art keywords
service
reservation
request
target service
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010450297.7A
Other languages
Chinese (zh)
Other versions
CN111611081B (en
Inventor
马福龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010450297.7A priority Critical patent/CN111611081B/en
Publication of CN111611081A publication Critical patent/CN111611081A/en
Application granted granted Critical
Publication of CN111611081B publication Critical patent/CN111611081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02WCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO WASTEWATER TREATMENT OR WASTE MANAGEMENT
    • Y02W90/00Enabling technologies or technologies with a potential or indirect contribution to greenhouse gas [GHG] emissions mitigation

Abstract

The present disclosure provides a request method, apparatus, computer device and storage medium, wherein the method comprises: receiving a reservation canceling request initiated by a first service request terminal aiming at a target service; canceling the reservation for the target service based on the cancel reservation request; judging whether the reservation canceling request meets a preset condition or not; if the reservation canceling request meets the preset condition, synchronizing the reservation canceling result according to a first synchronization mode, and storing the target service to a recyclable service database; under the first synchronization mode, the reservation cancellation result is synchronized to the first service request end only. The method and the device reduce the condition of service resource waste caused by service cancellation to a certain extent, and improve the utilization rate of the service resources.

Description

Request method, request device, computer equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a request method, an apparatus, a computer device, and a storage medium.
Background
At present, with the rapid development of internet technology, the development of online service platforms (such as online education platforms, online medical platforms, etc.) is also rapid. As a remote service mode, the online service platform may be subscribed in a one-to-one manner or a one-to-many manner.
For one-to-one reservation, after a service party reserves a corresponding service, the reservation is often canceled for various reasons, and with the service canceling operation, service resources are released, which results in waste of service resources.
Disclosure of Invention
The present disclosure provides at least one request scheme, which enables the service of canceling the reservation to be recycled through a synchronous setting mode, and improves the utilization rate of service resources.
Mainly comprises the following aspects:
in a first aspect, the present disclosure provides a method for requesting, the method comprising:
receiving a reservation canceling request initiated by a first service request terminal aiming at a target service;
canceling the reservation for the target service based on the cancel reservation request;
judging whether the reservation canceling request meets the preset condition or not;
if the reservation canceling request meets the preset condition, synchronizing a reservation canceling result according to a first synchronization mode, and storing the target service to a recyclable service database; and under the first synchronization mode, synchronizing the reservation cancellation result to the first service request end only.
In one embodiment, the method further comprises:
if the reservation canceling request does not meet the preset condition, synchronizing the reservation canceling result according to a second synchronization mode; and under the second synchronization mode, synchronizing the reservation cancellation result to the first service request end and the service provider providing the target service.
In one embodiment, the method further comprises:
responding to a service reservation request initiated by a second service request terminal, and inquiring whether a target service matched with the service reservation request exists in the recyclable service database;
if a target service matched with the service reservation request is inquired, the target service is distributed to the second service request end, the reservation result is synchronized to the second service request end, and the target service is deleted from the recyclable service database;
and if the target service matched with the service reservation request is not inquired, allocating the reservable service matched with the service reservation request to the second service request terminal.
In one embodiment, the determining whether the reservation cancellation request meets a preset condition includes:
and if the time length between the current cancellation time corresponding to the service cancellation reservation request and the service time of the target service is greater than the preset time length, determining that the service cancellation reservation request meets the preset condition.
In one embodiment, the method further comprises:
and if the target service exists in the recoverable service database after the time length between the current cancellation time and the service time of the target service reaches the preset time length, informing a service provider corresponding to the target service that the target service is cancelled and reserved.
In one embodiment, the method further comprises:
and after the target service is reserved, sending service reservation information to a service providing terminal corresponding to the target service, wherein the service reservation information comprises virtual information of a service requesting terminal of the target service.
In one embodiment, the method further comprises:
and after the time length between the current time and the service time of the target service reaches a preset time length, sending the real information of the service request end reserving the target service to the service providing end corresponding to the target service.
In one embodiment, the method further comprises:
when a service reservation request of the first service request end to a target service in the recoverable service database is received, attempting to distribute a distributed lock of the recoverable service database for the first service request end;
and if the distribution is successful, reserving the target service for the first service request end, and releasing the distributed lock after the reservation is completed.
In a second aspect, the present disclosure also provides a requesting device, the device comprising:
the system comprises a receiving module, a reservation canceling module and a reservation transmitting module, wherein the receiving module is used for receiving a reservation canceling request initiated by a first service request end aiming at a target service;
a cancellation module for canceling a reservation for the target service based on the reservation cancellation request;
the judging module is used for judging whether the reservation canceling request meets a preset condition or not;
the synchronization module is used for synchronizing the reservation cancellation result according to a first synchronization mode and storing the target service to a recyclable service database if the reservation cancellation request meets a preset condition; and under the first synchronization mode, synchronizing the reservation cancellation result to the first service request end only.
In a third aspect, the present disclosure also provides a computer device, including: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when a computer device is running, the machine-readable instructions when executed by the processor performing the steps of the method of requesting as described in the first aspect and any of its various embodiments.
In a fourth aspect, the present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of requesting as described in the first aspect and any of its various embodiments.
By adopting the request scheme, after receiving a reservation canceling request initiated by a first service request end aiming at a target service, the reservation canceling system cancels reservation aiming at the target service based on the reservation canceling request, and synchronizes a reservation canceling result to the first service request end only according to a first synchronization mode and stores the target service to a recyclable service database if the service reservation canceling request is judged to meet a preset condition.
The target service stored in the recoverable service database is in a recoverable state and can be reserved again by other service request terminals, so that the condition of service resource waste caused by service cancellation is reduced to a certain extent, and the service resource utilization rate is improved. In addition, after the service is cancelled, only the result of the cancellation of the reservation is synchronized to the first service request terminal and not to the service provider terminal, that is, the service provider terminal is in an unaware state of the cancellation of the service, which further improves the service quality. .
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
FIG. 1 is a flow chart illustrating a method for requesting according to a first embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a specific method for reserving a service in a request method according to a first embodiment of the disclosure;
fig. 3 is a schematic diagram illustrating a requesting device according to a second embodiment of the disclosure;
fig. 4 shows a schematic diagram of a computer device provided in a third embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It is found through research that, in the related art, for one-to-one subscription, after a service party subscribes to a corresponding service, a situation that the subscription is cancelled due to various reasons often occurs, and with the service cancelling operation, service resources are released, which results in waste of service resources.
Based on the research, the present disclosure provides a request method, device, computer device, and storage medium, which enable a service for canceling a reservation to be recycled again by a synchronous setting manner, thereby improving the utilization rate of service resources.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
To facilitate understanding of the present embodiment, first, a request method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the request method provided in the embodiments of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a server or other processing device. In some possible implementations, the request method may be implemented by a processor invoking computer readable instructions stored in a storage medium.
The biopsy method provided by the embodiment of the present disclosure is described below by taking an execution subject as a server.
Example one
Referring to fig. 1, which is a flowchart of a request method provided in an embodiment of the present disclosure, the method includes steps S101 to S102, where:
s101, receiving a service reservation canceling request initiated by a first service request end aiming at a target service;
s102, canceling reservation aiming at the target service based on the reservation canceling request;
s103, judging whether the reservation canceling request meets a preset condition or not;
s104, if the reservation canceling request meets the preset condition, synchronizing the reservation canceling result according to a first synchronization mode, and storing the target service to a recyclable service database; under the first synchronization mode, the reservation cancellation result is synchronized to the first service request end only.
Here, in order to facilitate understanding of the request method provided by the embodiment of the present disclosure, first, an application scenario of the request method is briefly described below. The embodiment of the disclosure can be applied to various online service platforms, such as lessons appointment under a one-to-one teaching mode under an online education platform, and appointment medical treatment under a one-to-one doctor-patient relationship under an online medical platform. Taking one-to-one teaching as an example, one teacher may correspond to one student. Therefore, under the condition that the student intends to carry out lesson appointment, corresponding lesson appointment information can be input through the student end, the server can search the teacher matched with the lesson appointment information after the lesson appointment information input by the student end is determined, for example, the teacher matched with the lesson appointment information of the student end is selected, and after the teacher is searched, the service providing end held by the teacher can inform the teacher of carrying out lesson appointment. The lesson appointment information may include lesson time, lesson content, lesson teachers and other information related to lessons, which is not specifically limited in the embodiments of the present disclosure.
In this embodiment of the present disclosure, the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like.
In the related art, in the scheme that after a student cancels an appointment, the course of the corresponding lesson teacher is also cancelled synchronously, since the teacher may miss the opportunity of being appointed by other students after being appointed, and the teacher may have already made a preparation for the previous appointment, if the teacher resource is not successfully appointed subsequently because the previous appointment is cancelled, the teacher resource is wasted, and the utilization rate of the teacher resource is greatly reduced.
Similarly, in the one-to-one relationship, there is a similar problem that the doctor resources are wasted due to the cancellation of the appointment.
In order to solve the above problems, embodiments of the present disclosure provide a solution for performing service recovery based on a synchronous setting manner. According to the request method provided by the embodiment of the disclosure, after a service reservation cancellation request initiated by a first service request end for a target service is received, reservation for the target service can be cancelled based on the service reservation cancellation request, and when the service reservation cancellation request meets a preset condition is judged, a reservation cancellation result is synchronized according to a first synchronization mode, and the target service is stored in a recyclable service database.
In addition, when the second service request end has a service reservation requirement, the target service which is in the recyclable service database and meets the service reservation requirement can be allocated to the second service request end, namely, the target service in the recyclable service database is allocated preferentially, so that the waste of service resources can be avoided, and the utilization rate of the service resources can be improved.
It should be noted that the first service request end and the second service request end may be the same service request end, for example, a student makes a reservation again after the student (corresponding to the service request end) cancels a course, or different service request ends, for example, after a student cancels a course by using the student (corresponding to the first service request end), another student makes a reservation by using the student (corresponding to the second service request end), which is not limited in this disclosure.
The target service can be a service selected by the service request end before canceling the reservation and when making the service reservation, so that the first service request end can view the service information related to the target service. The request for canceling the reservation may be sent by the first service request terminal triggering a corresponding cancel button, and after the server receives the request for canceling the reservation, the server may cancel the reservation and may determine whether to perform a recycling operation of the target service (correspondingly store the target service in the recyclable service database) by determining a preset condition.
In the embodiment of the present disclosure, when it is determined that the reservation cancellation request satisfies the preset condition, the reservation cancellation result may be synchronized according to the first synchronization method, and when it is determined that the preset condition is not satisfied, the reservation cancellation result may be synchronized according to the second synchronization method. In the second synchronization mode, the reservation cancellation result is synchronized to the first service request end and the service provider providing the target service, that is, the reservation condition of the target service is cancelled synchronously in the first service request end and the service provider providing the target service.
Considering that the request method provided by the embodiment of the present disclosure needs enough time for information search when reservation is performed after reservation cancellation, the preset condition for service recovery in the embodiment of the present disclosure may be a condition related to time, and here, it may be determined that the preset condition is satisfied when it is determined that a time length between the current cancellation time corresponding to the reservation cancellation request and the service time of the target service is longer than the preset time length.
The preset time length is not suitable for being too long and not suitable for being too short, the too long preset time length may possibly cause insufficient utilization rate of service resources, and the too short preset time length may possibly cause that a matched service party cannot be found, so that the embodiment of the disclosure may select 2 hours as the preset time length, for example, when the course cancellation time is determined to be 8:00 in the morning and the session time (corresponding to the service time) of the relevant course is 10:30 in the morning, it may be determined that the preset condition is met to execute the warehousing operation, and only the cancellation result of the reservation is synchronously made to the student end, if the same is the course cancellation time of 8:00 in the morning, but the session time of the relevant course is 9 in the morning: 00, it can be determined that the preset condition is not met and the warehousing operation is not performed, and meanwhile, the appointment cancellation result is synchronized to the student end and the teacher end.
In the embodiment of the disclosure, the result of canceling the reservation related to the target service in the recoverable service database is not synchronized to the service provider, and at this time, any service request terminal can make a reservation for the target service in the recoverable service data, thereby improving the utilization rate of the service resource, and considering that the service provider is not affected during the service recovery process, thus, the service reservation can be realized only by matching the service information, thereby greatly improving the success rate of the reservation, and at the same time, the service provider is in an unaware state during the target service recovery process, which further improves the service quality.
In the process of making a service reservation by initiating a service reservation request at the second service request terminal, on one hand, the reservation can be made based on the recyclable service database, and on the other hand, the reservation can be made based on the reserved service, which mainly needs to determine whether a target service matching the service reservation request exists in the recyclable service database.
First, if it is determined that there is a target service matching the service reservation request, the target service may be allocated to the second service request end, and the reservation result is synchronized to the second service request end, that is, after the first service request end performs a cancellation operation for the target service and performs a recovery operation for the target service, the target service may also be allocated to the second service request end, and at this time, the target service may be deleted from the recoverable service database, so as to implement the service reservation under the condition that the service is recycled.
Secondly, if it is determined that there is no target service matching the service reservation request, a reservable service in an unsubscribed state matching the service reservation request may be allocated to the second service requesting terminal, thereby implementing service reservation.
In the embodiment of the present disclosure, whether the service is matched for the second service request end from the target service of the recyclable service database or the second service request end from the unsubscribed reservable service, the corresponding distribution scheme may be determined based on the matching degree of the service information.
For example, for a student a, the service reservation request carries lesson appointment information (corresponding to service information) with lesson attendance time of 14:00 to 15:00 and lesson content of finding work, and if it is determined that a target lesson matched with the lesson appointment information exists in the recyclable service database, the target lesson is directly distributed to the student a, wherein the target lesson is a lesson matched with a teacher B in advance, that is, the matching between the student a and the teacher B is realized.
In order to facilitate better service status management, embodiments of the present disclosure may manage service information based on the created recyclable service database. That is, the embodiment of the present disclosure may use the recoverable service database to store the related information of each service, and may mark the states of canceling the reservation, successfully reserving, recovering the service, and the like, so that the information matching may be performed conveniently and quickly by searching the recoverable service database. In the embodiment of the present disclosure, the recoverable service database may be built by using a database structure such as mysql (a relational database management system), SQLite (an open source embedded relational database), Oracle (a relational database management system), and the like, which is not limited specifically.
In order to avoid the problem of reservation conflict which may occur when different service requesters reserve services, the embodiments of the present disclosure may perform lock constraint based on the above-created recyclable service database. As shown in fig. 2, the request method specifically includes the following steps:
s201, when a service reservation request of a first service request end to a target service in a recoverable service database is received, trying to distribute a distributed lock of the recoverable service database for the first service request end;
s202, if the distribution is successful, reserving the target service for the first service request end, and releasing the distributed lock after the reservation is completed.
Here, based on the pre-established recoverable service database, when a service reservation request of a first service request end to a target service in the recoverable service database is received, a distributed lock of the recoverable service database may be allocated to the student end in an attempt, that is, only the service request end is allowed to modify the data state at the current access time, and no other service request end is allowed to modify the data.
The lock can be used for making a request to a system where the database is located before the service reservation transaction accesses data in the recyclable service database, and blocking the resource, so that the service reservation transaction obtains the control right of the data after obtaining the lock. Before the service reservation transaction releases its lock, other transactions cannot access the data, and after the service reservation transaction is cancelled, the locked resource is released, so that isolated access of different service request ends is realized.
It should be noted that the distributed lock adopted in the embodiment of the present disclosure may be a zookeeper distributed lock adapted to a cluster architecture, or may be a distributed lock adapted to a non-cluster architecture.
In order to further improve the experience degree of the service provider, in the embodiment of the present disclosure, after the service request end initiates a request for canceling the reservation of the target service, if it is determined that the duration between the current canceling time and the service time of the target service is greater than the preset duration, the service provider may not be notified that the target service is cancelled, but if it is determined that the duration between the current canceling time and the service time of the target service reaches the preset duration, the service provider corresponding to the target service may be notified that the target service is cancelled for reservation when it is determined that the target service exists in the current recyclable service database, so as to ensure the experience degree of the service provider while ensuring that the service provider knows the service dynamics in time.
In order to further improve the use experience of the service provider, the request method provided by the embodiment of the disclosure may send the service reservation information to the service provider corresponding to any service after the service is reserved, and avoid the problem of the decrease of the use experience of the service provider due to the inconsistency of the information of the service provider before and after the service is cancelled through the virtual information of the service requester of any service included in the service reservation information.
In addition, in order to further ensure that the service provider knows the service dynamics in time, the embodiment of the disclosure may send the real information of the service request end reserving any service to the service provider end corresponding to any service after the time length between the current time and the service time of any service reaches the preset time length. Taking a target service as an example, in the case that the target service is just reserved, the virtual information is sent to the service side of the target service, because the reservation cancellation in the embodiment of the present disclosure has a time limit, when the reservation time is reached, the service is in a state that the cancellation is impossible, that is, the real information can be sent to the service side, so that the service side can better provide the service for the requesting side by using the real information.
The virtual information of the student end may include information such as a system default student name and a student head portrait, and the real information may include information such as a real student name and a student head portrait.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a request device corresponding to the request method is also provided in the embodiments of the present disclosure, and since the principle of solving the problem of the device in the embodiments of the present disclosure is similar to the above request method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Example two
Referring to fig. 3, which is a schematic diagram of a requesting device according to a second embodiment of the present disclosure, the requesting device includes: a receiving module 301, a canceling module 302, a judging module 303 and a synchronizing module 304; wherein the content of the first and second substances,
a receiving module 301, configured to receive a reservation cancellation request initiated by a first service request end for a target service;
a cancellation module 302 for canceling a reservation for the target service based on the cancel reservation request;
a judging module 303, configured to judge whether the reservation cancellation request meets a preset condition;
a synchronization module 304, configured to synchronize the reservation cancellation result according to a first synchronization manner and store the target service to the recyclable service database if the reservation cancellation request meets a preset condition; under the first synchronization mode, the reservation cancellation result is synchronized to the first service request end only.
The request device provided by the embodiment of the disclosure reduces the condition of service resource waste caused by service cancellation to a certain extent, and improves the utilization rate of service resources; in addition, the service provider is in an unaware state of the service cancellation, which further improves the service quality.
In an embodiment, the synchronization module 304 is further configured to synchronize the reservation cancellation result according to a second synchronization manner if it is determined that the reservation cancellation request does not satisfy the preset condition; and under the second synchronization mode, synchronizing the reservation cancellation result to the first service request end and the service providing end for providing the target service.
In one embodiment, the above apparatus further comprises:
a reservation module 305, configured to respond to a service reservation request initiated by a second service request terminal, and query whether a target service matching the service reservation request exists from the recyclable service database; if the target service matched with the service reservation request is inquired, the target service is distributed to the second service request end, the reservation result is synchronized to the second service request end, and the target service is deleted from the recyclable service database; and if the target service matched with the service reservation request is not inquired, allocating the reservable service matched with the service reservation request to the second service request terminal.
In one embodiment, the determining module 303 is configured to determine whether the reservation cancellation request meets a preset condition according to the following steps:
and if the time length between the current cancellation time corresponding to the reservation cancellation request and the service time of the target service is greater than the preset time length, determining that the reservation cancellation request meets the preset condition.
In one embodiment, the above apparatus further comprises:
the notifying module 306 is configured to notify that the target service of the service provider corresponding to the target service has been cancelled for reservation if the target service exists in the recoverable service database after the time length between the current cancellation time and the service time of the target service reaches a preset time length.
In one embodiment, the above apparatus further comprises:
the system comprises a sending module, a receiving module and a sending module, wherein the sending module is used for sending service reservation information to a service providing end corresponding to any service after the service is reserved, and the service reservation information comprises virtual information of a service request end of the service;
and after the time length between the current time and the service time of any service reaches a preset time length, sending the real information of the service initiating end reserving any service to the service providing end corresponding to any service.
In one embodiment, the above apparatus further comprises:
an allocating module 307, configured to, when receiving a service reservation request of a first service request end to a target service in a recoverable service database, attempt to allocate a distributed lock of the recoverable service database to the first service request end; and if the distribution is successful, reserving the target service for the first service request end, and releasing the distributed lock after the reservation is completed.
EXAMPLE III
A third embodiment of the present disclosure provides a computer device, as shown in fig. 4, the computer device includes: a processor 401, a storage medium 402 and a bus 403, where the storage medium 402 stores machine-readable instructions executable by the processor 401 (such as execution instructions corresponding to the receiving module 301, the canceling module 302, the judging module 303 and the synchronizing module 304 in the requesting device in fig. 3, etc.), when the computer device is operated, the processor 401 communicates with the storage medium 402 through the bus 403, and the machine-readable instructions are executed by the processor 401 to perform the following processes:
receiving a reservation canceling request initiated by a first service request terminal aiming at a target service;
canceling the reservation for the target service based on the cancel reservation request;
judging whether the reservation canceling request meets a preset condition or not;
if the reservation canceling request meets the preset condition, synchronizing the reservation canceling result according to a first synchronization mode, and storing the target service to a recyclable service database; under the first synchronization mode, the reservation cancellation result is synchronized to the first service request end only.
In one embodiment, the instructions executed by the processor 401 further include:
if the reservation canceling request does not meet the preset condition, synchronizing the reservation canceling result according to a second synchronization mode; and under the second synchronization mode, synchronizing the reservation cancellation result to the first service request end and the service providing end for providing the target service.
In one embodiment, the instructions executed by the processor 401 further include:
responding to a service reservation request initiated by a second service request end, and inquiring whether a target service matched with the service reservation request exists in a recoverable service database;
if the target service matched with the service reservation request is inquired, the target service is distributed to the second service request end, the reservation result is synchronized to the second service request end, and the target service is deleted from the recyclable service database;
and if the target service matched with the service reservation request is not inquired, allocating the reservable service matched with the service reservation request to the second service request terminal.
In an embodiment, the determining whether the reservation cancellation request satisfies a preset condition in the instruction executed by the processor 401 includes:
and if the time length between the current cancellation time corresponding to the reservation cancellation request and the service time of the target service is greater than the preset time length, determining that the reservation cancellation request meets the preset condition.
In one embodiment, the instructions executed by the processor 401 further include:
and if the target service exists in the recoverable service database after the time length between the current cancellation time and the service time of the target service reaches the preset time length, informing the service provider corresponding to the target service that the target service is cancelled and reserved.
In one embodiment, the instructions executed by the processor 401 further include:
after any service is reserved, service reservation information is sent to a service providing terminal corresponding to the service, and the service reservation information comprises virtual information of a service requesting terminal of the service.
In one embodiment, the instructions executed by the processor 401 further include:
and after the time length between the current time and the service time of any service reaches a preset time length, sending the real information of the service request end reserving any service to the service provider end corresponding to any service.
In one embodiment, the instructions executed by the processor 401 further include:
when a service reservation request of a first service request end to a target service in a recoverable service database is received, trying to distribute a distributed lock of the recoverable service database for the first service request end;
and if the distribution is successful, reserving the target service for the first service request end, and releasing the distributed lock after the reservation is completed.
The disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which, when executed by the processor 401, performs the steps of the method of the above-mentioned method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the request method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the request method in the foregoing method embodiment, so as to solve a problem in the related art that, for a one-to-one reservation mode, when a reservation is cancelled due to various reasons, a service resource is released along with a service cancellation operation, which may cause waste of the service resource, and achieve a technical effect of improving service resource utilization rate and improving service quality.
The embodiments of the present disclosure also provide a computer program, which when executed by a processor implements any one of the methods of the foregoing embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. A method of requesting, the method comprising:
receiving a reservation canceling request initiated by a first service request terminal aiming at a target service;
canceling the reservation for the target service based on the cancel reservation request;
judging whether the reservation canceling request meets the preset condition or not;
if the reservation canceling request meets the preset condition, synchronizing a reservation canceling result according to a first synchronization mode, and storing the target service to a recyclable service database; and under the first synchronization mode, synchronizing the reservation cancellation result to the first service request end only.
2. The method of claim 1, wherein the method further comprises:
if the reservation canceling request does not meet the preset condition, synchronizing the reservation canceling result according to a second synchronization mode; and under the second synchronization mode, synchronizing the reservation cancellation result to the first service request end and the service provider providing the target service.
3. The method of claim 1, wherein the method further comprises:
responding to a service reservation request initiated by a second service request terminal, and inquiring whether a target service matched with the service reservation request exists in the recyclable service database;
if a target service matched with the service reservation request is inquired, the target service is distributed to the second service request end, the reservation result is synchronized to the second service request end, and the target service is deleted from the recyclable service database;
and if the target service matched with the service reservation request is not inquired, allocating the reservable service matched with the service reservation request to the second service request terminal.
4. The method of claim 1, wherein the method further comprises:
and if the target service exists in the recoverable service database after the time length between the current cancellation time and the service time of the target service reaches a preset time length, informing a service provider corresponding to the target service that the target service is cancelled and reserved.
5. The method of claim 1 or 3, wherein the method further comprises:
and after the target service is reserved, sending service reservation information to a service providing terminal corresponding to the target service, wherein the service reservation information comprises virtual information of a service requesting terminal of the target service.
6. The method of claim 5, wherein the method further comprises:
and after the time length between the current time and the service time of the target service reaches a preset time length, sending the real information of the service request end reserving the target service to the service providing end corresponding to the target service.
7. The method of claim 1, wherein the method further comprises:
when a service reservation request of the first service request end to a target service in the recoverable service database is received, attempting to distribute a distributed lock of the recoverable service database for the first service request end;
and if the distribution is successful, reserving the target service for the first service request end, and releasing the distributed lock after the reservation is completed.
8. A requesting device, the device comprising:
the system comprises a receiving module, a reservation canceling module and a reservation transmitting module, wherein the receiving module is used for receiving a reservation canceling request initiated by a first service request end aiming at a target service;
a cancellation module for canceling a reservation for the target service based on the reservation cancellation request;
the judging module is used for judging whether the reservation canceling request meets a preset condition or not;
the synchronization module is used for synchronizing the reservation cancellation result according to a first synchronization mode and storing the target service to a recyclable service database if the reservation cancellation request meets a preset condition; and under the first synchronization mode, synchronizing the reservation cancellation result to the first service request end only.
9. A computer device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the computer device is running, the machine-readable instructions when executed by the processor performing the steps of the requesting method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method of requesting as claimed in any one of claims 1 to 7.
CN202010450297.7A 2020-05-25 2020-05-25 Request method, request device, computer equipment and storage medium Active CN111611081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010450297.7A CN111611081B (en) 2020-05-25 2020-05-25 Request method, request device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010450297.7A CN111611081B (en) 2020-05-25 2020-05-25 Request method, request device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111611081A true CN111611081A (en) 2020-09-01
CN111611081B CN111611081B (en) 2023-05-09

Family

ID=72200444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010450297.7A Active CN111611081B (en) 2020-05-25 2020-05-25 Request method, request device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111611081B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261115A (en) * 2020-10-19 2021-01-22 北京字节跳动网络技术有限公司 Resource allocation method, device and computer storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070127527A1 (en) * 2005-12-06 2007-06-07 International Business Machines Corporation Methods and apparatus for implementing a flexible multi-user advance reservation system where reservation requests are specified in terms of multiple options and where each option has an associated business value
CN106503229A (en) * 2016-10-27 2017-03-15 深圳市家创易科技有限公司 A kind of reservation query method and system
JP2019003611A (en) * 2017-06-09 2019-01-10 株式会社コンテンツパーク Service providing assist system
CN110334823A (en) * 2019-06-17 2019-10-15 北京大米科技有限公司 Reserving method, device, electronic equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070127527A1 (en) * 2005-12-06 2007-06-07 International Business Machines Corporation Methods and apparatus for implementing a flexible multi-user advance reservation system where reservation requests are specified in terms of multiple options and where each option has an associated business value
CN106503229A (en) * 2016-10-27 2017-03-15 深圳市家创易科技有限公司 A kind of reservation query method and system
JP2019003611A (en) * 2017-06-09 2019-01-10 株式会社コンテンツパーク Service providing assist system
CN110334823A (en) * 2019-06-17 2019-10-15 北京大米科技有限公司 Reserving method, device, electronic equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112261115A (en) * 2020-10-19 2021-01-22 北京字节跳动网络技术有限公司 Resource allocation method, device and computer storage medium
CN112261115B (en) * 2020-10-19 2023-02-07 北京字节跳动网络技术有限公司 Resource allocation method, device and computer storage medium

Also Published As

Publication number Publication date
CN111611081B (en) 2023-05-09

Similar Documents

Publication Publication Date Title
CN108595919B (en) Software activation method, device, system and storage medium
CN111694649A (en) Resource scheduling method and device, computer equipment and storage medium
CN102110121A (en) Method and system for processing data
CN111861310B (en) Distribution method, device, server and storage medium for freight order
CN107895049A (en) Data processing method and device, computer-readable recording medium, electronic equipment
US11171880B2 (en) Reservation managing method, and information processing device, and non-transitory computer-readable storage medium for storing reservation managing program
CN112261115B (en) Resource allocation method, device and computer storage medium
CN109274701A (en) Negative one screen content push and requesting method, device, server and terminal
CN115424624B (en) Man-machine interaction service processing method and device and related equipment
CN113949885B (en) Live broadcast processing method and device, electronic equipment and computer readable storage medium
CN111611081A (en) Request method, request device, computer equipment and storage medium
US11493349B2 (en) Information processing apparatus, information processing method, and non-transitory storage medium
CN104184822A (en) Data synchronism method and system
CN106055353A (en) Data update method and apparatus
CN107844310B (en) Configuration information updating method and system
CN107633080B (en) User task processing method and device
CN114520830A (en) Message pushing method, device and system
CN111179008B (en) Information state updating method, device, system and storage medium
CN113312588A (en) Method, device, equipment and storage medium for managing operation authority of online document
CN111949354A (en) Page content updating method and device
CN114205354A (en) Event management system, event management method, server, and storage medium
CN108989063B (en) Group account data processing method, device and equipment and readable storage medium
CN113377724A (en) Cache space management method, device and storage medium
CN111953722A (en) Terminal address book synchronization method and device
CN110855750A (en) Downloading method of software development kit and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.